From cf0b22771b5e2ae17a5cc6b9559bfd9463b0f9f5 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 26 Mar 2023 19:23:09 +0200 Subject: [PATCH 001/470] Cache extruder settings. When writing GCode, there are certain settings that need to be checked over and over again. Instead of pulling them from the Settings hash table every time, read them once and then save them. This speeds up single-threaded slicing by about 3% (one thread of a 5950X; with many threads, it seems to be more like 10%, since GCode writing then takes proportionally more of the time). There is a very large long tail of code that keeps reading these settings, in particular from mesh settings, so there is probably more to be gained here, but this patch takes out the two biggest cases. --- include/gcodeExport.h | 2 ++ src/gcodeExport.cpp | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/include/gcodeExport.h b/include/gcodeExport.h index a8c2c57b55..d577bd94d6 100644 --- a/include/gcodeExport.h +++ b/include/gcodeExport.h @@ -87,6 +87,8 @@ class GCodeExport : public NoCopy double last_e_value_after_wipe; //!< The current material amount extruded since last wipe unsigned fan_number; // nozzle print cooling fan number + Point nozzle_offset; //!< Cache of setting machine_nozzle_offset_[xy] + bool machine_firmware_retract; //!< Cache of setting machine_firmware_retract std::deque extruded_volume_at_previous_n_retractions; // in mm^3 diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index 4758ec5503..e75a084a0d 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -87,6 +87,18 @@ void GCodeExport::preSetup(const size_t start_extruder) extruder_attr[extruder_nr].last_retraction_prime_speed = train.settings.get("retraction_prime_speed"); // the alternative would be switch_extruder_prime_speed, but dual extrusion might not even be configured... extruder_attr[extruder_nr].fan_number = train.settings.get("machine_extruder_cooling_fan_number"); + + // Cache some settings that we use frequently. + const Settings& extruder_settings = Application::getInstance().current_slice->scene.extruders[extruder_nr].settings; + if (use_extruder_offset_to_offset_coords) + { + extruder_attr[extruder_nr].nozzle_offset = Point(extruder_settings.get("machine_nozzle_offset_x"), extruder_settings.get("machine_nozzle_offset_y")); + } + else + { + extruder_attr[extruder_nr].nozzle_offset = Point(0, 0); + } + extruder_attr[extruder_nr].machine_firmware_retract = extruder_settings.get("machine_firmware_retract"); } machine_name = mesh_group->settings.get("machine_name"); @@ -294,18 +306,9 @@ bool GCodeExport::getExtruderIsUsed(const int extruder_nr) const Point GCodeExport::getGcodePos(const coord_t x, const coord_t y, const int extruder_train) const { - if (use_extruder_offset_to_offset_coords) - { - const Settings& extruder_settings = Application::getInstance().current_slice->scene.extruders[extruder_train].settings; - return Point(x - extruder_settings.get("machine_nozzle_offset_x"), y - extruder_settings.get("machine_nozzle_offset_y")); - } - else - { - return Point(x, y); - } + return Point(x, y) - extruder_attr[extruder_train].nozzle_offset; } - void GCodeExport::setFlavor(EGCodeFlavor flavor) { this->flavor = flavor; @@ -383,8 +386,7 @@ void GCodeExport::setFilamentDiameter(const size_t extruder, const coord_t diame double GCodeExport::getCurrentExtrudedVolume() const { double extrusion_amount = current_e_value; - const Settings& extruder_settings = Application::getInstance().current_slice->scene.extruders[current_extruder].settings; - if (! extruder_settings.get("machine_firmware_retract")) + if (! extruder_attr[current_extruder].machine_firmware_retract) { // no E values are changed to perform a retraction extrusion_amount -= extruder_attr[current_extruder].retraction_e_amount_at_e_start; // subtract the increment in E which was used for the first unretraction instead of extrusion extrusion_amount += extruder_attr[current_extruder].retraction_e_amount_current; // add the decrement in E which the filament is behind on extrusion due to the last retraction @@ -832,8 +834,7 @@ void GCodeExport::writeUnretractionAndPrime() current_e_value += prime_volume_e; if (extruder_attr[current_extruder].retraction_e_amount_current) { - const Settings& extruder_settings = Application::getInstance().current_slice->scene.extruders[current_extruder].settings; - if (extruder_settings.get("machine_firmware_retract")) + if (extruder_attr[current_extruder].machine_firmware_retract) { // note that BFB is handled differently *output_stream << "G11" << new_line; // Assume default UM2 retraction settings. @@ -926,8 +927,7 @@ void GCodeExport::writeRetraction(const RetractionConfig& config, bool force, bo } } - const Settings& extruder_settings = Application::getInstance().current_slice->scene.extruders[current_extruder].settings; - if (extruder_settings.get("machine_firmware_retract")) + if (extruder_attr[current_extruder].machine_firmware_retract) { if (extruder_switch && extr_attr.retraction_e_amount_current) { From 5db1eae3a06fbb39bb7d41625a5675d6ca455e1f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 25 Apr 2023 09:49:07 +0200 Subject: [PATCH 002/470] Initial CuraEngine plugin architecture Contributes to [CURA-10475] --- CMakeLists.txt | 7 +- conanfile.py | 4 +- include/Application.h | 6 +- include/plugins/pluginproxy.h | 110 +++++++++++++++++++++++ include/plugins/slots.h | 45 ++++++++++ include/plugins/types.h | 43 +++++++++ include/plugins/validator.h | 44 +++++++++ plugin.proto | 46 ++++++++++ src/Application.cpp | 10 +++ src/communication/ArcusCommunication.cpp | 4 +- 10 files changed, 312 insertions(+), 7 deletions(-) create mode 100644 include/plugins/pluginproxy.h create mode 100644 include/plugins/slots.h create mode 100644 include/plugins/types.h create mode 100644 include/plugins/validator.h create mode 100644 plugin.proto diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b86a3bad4..6dc9aa87da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,8 @@ if (ENABLE_ARCUS) find_package(arcus REQUIRED) find_package(protobuf REQUIRED) - protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto) + protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto plugin.proto) + protobuf_generate_cpp(plugin_PB_SRCS plugin_PB_HEADERS plugin.proto) endif () ### Compiling CuraEngine ### @@ -133,7 +134,7 @@ set(engine_SRCS # Except main.cpp. src/utils/ToolpathVisualizer.cpp src/utils/VoronoiUtils.cpp src/utils/VoxelUtils.cpp - ) + include/plugins/validator.h) add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS}) use_threads(_CuraEngine) @@ -178,6 +179,7 @@ find_package(spdlog REQUIRED) find_package(fmt REQUIRED) find_package(range-v3 REQUIRED) find_package(scripta REQUIRED) +find_package(neargye-semver REQUIRED) if (ENABLE_TESTING) find_package(GTest REQUIRED) @@ -193,6 +195,7 @@ target_link_libraries(_CuraEngine stb::stb boost::boost scripta::scripta + neargye-semver::neargye-semver $<$:GTest::gtest>) if (NOT WIN32) diff --git a/conanfile.py b/conanfile.py index db8f50331e..ea9ebc6896 100644 --- a/conanfile.py +++ b/conanfile.py @@ -64,7 +64,7 @@ def validate(self): def build_requirements(self): self.test_requires("standardprojectsettings/[>=0.1.0]@ultimaker/stable") if self.options.enable_arcus: - self.test_requires("protobuf/3.21.4") + self.test_requires("protobuf/3.21.9") if self.options.enable_testing: self.test_requires("gtest/1.12.1") if self.options.enable_benchmarks: @@ -72,6 +72,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: + self.requires("protobuf/3.21.9") self.requires("arcus/5.2.2") self.requires("zlib/1.2.12") self.requires("clipper/6.4.2") @@ -82,6 +83,7 @@ def requirements(self): self.requires("fmt/9.0.0") self.requires("range-v3/0.12.0") self.requires("scripta/0.1.0@ultimaker/testing") + self.requires("neargye-semver/0.3.0") def generate(self): deps = CMakeDeps(self) diff --git a/include/Application.h b/include/Application.h index 3d781f702a..eaedbc79e5 100644 --- a/include/Application.h +++ b/include/Application.h @@ -1,5 +1,5 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef APPLICATION_H #define APPLICATION_H @@ -134,6 +134,8 @@ class Application : NoCopy * This destroys the Communication instance along with it. */ ~Application(); + + void registerPlugins(); }; } //Cura namespace. diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h new file mode 100644 index 0000000000..846c4b0866 --- /dev/null +++ b/include/plugins/pluginproxy.h @@ -0,0 +1,110 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_INCLUDE_PLUGINS_PLUGINPROXY_H +#define CURAENGINE_INCLUDE_PLUGINS_PLUGINPROXY_H + +#include +#include + +#include +#include +#include +#include +#include + +#include "plugins/validator.h" + +#include "plugin.pb.h" + +namespace cura::plugins +{ +namespace detail +{ +template +class PluginListener : public Arcus::SocketListener +{ +public: + PluginListener(std::shared_ptr validator) noexcept : validator_{ validator } + { + } + + void stateChanged(Arcus::SocketState) override{}; + + void messageReceived() override + { + auto message = getSocket()->takeNextMessage(); + // Check if the message is a Version_ret and update the validator + if (message->GetDescriptor() == &plugins::proto::Version_ret::default_instance()) + { + auto* version_ret = dynamic_cast(message.get()); + validator_->version = semver::from_string(version_ret->version()); + spdlog::info("Plugin version: {}", validator_->version.to_string()); + } + + // TODO: Handle Receive and Send messages + }; + + void error(const Arcus::Error& error) override{}; + +private: + std::shared_ptr validator_{}; +}; + +} // namespace detail + +template +class PluginProxy +{ + std::unique_ptr socket_{}; + std::shared_ptr> validator_{}; + std::unique_ptr>> listener_{}; + ranges::semiregular_box projection_{}; + + PluginProxy(const std::string& ip, int port, Proj&& proj = Proj{}) noexcept + : socket_{ std::make_unique() } + , validator_{ std::make_shared>() } + , listener_{ std::make_unique(validator_) } + , projection_{ std::forward(proj) } + { + // Add the listener + socket_->addListener(listener_.get()); + + // Register all message types + socket_->registerMessageType(&plugins::proto::Version_ret::default_instance()); + socket_->registerMessageType(&Receive::default_instance()); + socket_->registerMessageType(&Send::default_instance()); + + // Connect to the plugin + spdlog::info("Connecting to plugin at {}:{}", ip, port); + socket_->connect(ip, port); + while (socket_->getState() == Arcus::SocketState::Connecting || socket_->getState() == Arcus::SocketState::Opening) + { + std::this_thread::sleep_for(std::chrono::milliseconds{ 100 }); // TODO: Fix magic number + // TODO: Add timeout??? Is this blocking even necessary? + } + + // Send request for version + auto version_args = std::make_shared(); + version_args->set_version_range(VersionRange.value); + socket_->sendMessage(version_args); + } + + auto operator()(auto&&... args) + { + if (*validator_ && socket_->getState() == Arcus::SocketState::Connected) + { + auto send = std::make_shared(std::forward(args)...); + socket_->sendMessage(send); + // TODO: Block until message is received + // TODO: Convert return message to actual return value + return projection_(std::forward(args)...); // FIXME: This is not correct + } + return projection_(std::forward(args)...); + } +}; + +} // namespace cura::plugins + + +#endif // CURAENGINE_INCLUDE_PLUGINS_PLUGINPROXY_H diff --git a/include/plugins/slots.h b/include/plugins/slots.h new file mode 100644 index 0000000000..4320e5de77 --- /dev/null +++ b/include/plugins/slots.h @@ -0,0 +1,45 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTS_H +#define CURAENGINE_INCLUDE_PLUGINS_SLOTS_H + +#include +#include + +#include "plugins/types.h" + +namespace cura::plugins +{ + +class Slots +{ + constexpr Slots() noexcept = default; + std::unordered_map> slots_{}; + +public: + Slots(const Slots&) = delete; + Slots(Slots&&) = delete; + + static Slots& instance() noexcept + { + static Slots instance{}; + return instance; + } + + /*! \brief Register a plugin to a slot + * + * \param slot The slot to register the plugin to + * \param plugin The plugin to register + */ + void registerSlot(Slot slot, std::shared_ptr plugin) noexcept + { + slots_.insert_or_assign(slot, std::move(plugin)); + } +}; + + +} // namespace cura::plugins + + +#endif // CURAENGINE_INCLUDE_PLUGINS_SLOTS_H diff --git a/include/plugins/types.h b/include/plugins/types.h new file mode 100644 index 0000000000..0b143e93b5 --- /dev/null +++ b/include/plugins/types.h @@ -0,0 +1,43 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_INCLUDE_PLUGINS_TYPES_H +#define CURAENGINE_INCLUDE_PLUGINS_TYPES_H + +#include "plugins/pluginproxy.h" +#include "utils/polygon.h" + +#include "plugin.pb.h" + +#include + +namespace cura::plugins +{ +namespace defaults +{ +constexpr auto simplify = [](const Polygons& polygons, const size_t max_deviation, const size_t max_angle) -> Polygons { return polygons; }; +constexpr auto postprocess = [](const std::string& gcode_word) -> std::string { return gcode_word; }; + +} // namespace defaults + +// Register the plugin types +// TODO: Try to determine the projections from the instantiation of the PluginProxy. +// TODO: Add custom converters for proto calls to CuraEngine types. +using simplify_plugin = PluginProxy<">=1.0.0 <2.0.0 || >3.2.1", plugins::proto::Simplify_args, plugins::proto::Simplify_ret, decltype(defaults::simplify)>; +using postproces_plugin = PluginProxy<">=1.0.0 <2.0.0 || >3.2.1", plugins::proto::Postprocess_args, plugins::proto::Postprocess_ret, decltype(defaults::postprocess)>; + +using plugin_t = std::variant; + +// Register the slots here. +enum class Slot +{ + SIMPLIFY, + POSTPROCESS +}; + + + +} // namespace cura::plugins + + +#endif // CURAENGINE_INCLUDE_PLUGINS_TYPES_H diff --git a/include/plugins/validator.h b/include/plugins/validator.h new file mode 100644 index 0000000000..ea3b578490 --- /dev/null +++ b/include/plugins/validator.h @@ -0,0 +1,44 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H +#define CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H + +#include + +namespace cura::plugins +{ + +template +struct VersionRangeLiteral +{ + constexpr VersionRangeLiteral(const char (&str)[N]) + { + std::copy_n(str, N, value); + } + + char value[N]; +}; + + +template +struct Validator +{ + semver::version version{ "1.0.0" }; + bool include_prerelease{ false }; + semver::range::detail::range version_range{ VersionRange.value }; + + constexpr operator bool() const noexcept + { + return version_range.satisfies(version, include_prerelease); + } + + constexpr bool operator()(const semver::version& actual_version) const noexcept + { + return version_range.satisfies(actual_version, include_prerelease); + } +}; + +} // namespace cura::plugins + +#endif // CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H diff --git a/plugin.proto b/plugin.proto new file mode 100644 index 0000000000..8c008709dc --- /dev/null +++ b/plugin.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; + +package cura.plugins.proto; + +// TODO: Add error propagation +// TODO: Add progress reporting +// TODO: Add priority queueing (if multiple plugins are hooked up to the slot) + +message Version_args { + string version_range = 1; +} + +message Version_ret { + string version = 1; +} + +message Point_2d { + sint64 x = 1; + sint64 y = 2; +} + +message Polygon { + repeated Point_2d path = 1; +} + +message Polygons { + repeated Polygon paths = 1; +} + +message Simplify_args { + Polygons polygons = 1; + uint64 max_deviation = 2; + uint64 max_angle = 3; +} + +message Simplify_ret { + Polygons polygons = 1; +} + +message Postprocess_args { + string gcode_word = 1; +} + +message Postprocess_ret { + string gcode_word = 1; +} \ No newline at end of file diff --git a/src/Application.cpp b/src/Application.cpp index c5a3a6f102..27e6a10c16 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -23,6 +23,8 @@ #include "utils/ThreadPool.h" #include "utils/string.h" //For stringcasecompare. +#include "plugins/slots.h" + namespace cura { @@ -186,6 +188,8 @@ void Application::run(const size_t argc, char** argv) exit(1); } + registerPlugins(); + #ifdef ARCUS if (stringcasecompare(argv[1], "connect") == 0) { @@ -247,4 +251,10 @@ void Application::startThreadPool(int nworkers) thread_pool = new ThreadPool(nthreads); } +void Application::registerPlugins() +{ +// plugins::Slots::instance().register("simplify", "[>=0.1.0]"); +// plugins::Slots::instance().register("postprocess", "[>=0.1.0]"); +} + } // namespace cura \ No newline at end of file diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 30786e2cce..c1686d34e0 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Ultimaker B.V. +// Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher #ifdef ARCUS @@ -316,7 +316,7 @@ void ArcusCommunication::connect(const std::string& ip, const uint16_t port) std::this_thread::sleep_for(std::chrono::milliseconds(private_data->millisecUntilNextTry)); // Wait until we're connected. Check every XXXms. socket_state = private_data->socket->getState(); } - if (socket_state != Arcus::SocketState::Connected) + if (socket_state == Arcus::SocketState::Connected) { spdlog::info("Connected to {}:{}", ip, port); } From 27f021604d65770b27c4fb425aef67ec99b55f00 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 25 Apr 2023 18:37:34 +0200 Subject: [PATCH 003/470] Added converters to the PluginProxy [CURA-10475] --- CMakeLists.txt | 2 +- include/plugins/pluginproxy.h | 71 +++++++++++++++++------------- include/plugins/slots.h | 35 ++++++++++----- include/plugins/types.h | 83 +++++++++++++++++++++++++++-------- include/plugins/validator.h | 19 ++++---- plugin.proto | 14 ++++-- 6 files changed, 150 insertions(+), 74 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dc9aa87da..7729d06e27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,7 @@ set(engine_SRCS # Except main.cpp. src/utils/ToolpathVisualizer.cpp src/utils/VoronoiUtils.cpp src/utils/VoxelUtils.cpp - include/plugins/validator.h) + ) add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS}) use_threads(_CuraEngine) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 846c4b0866..e9d705e38a 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,13 +19,15 @@ namespace cura::plugins { +using SlotID = proto::SlotID; + namespace detail { -template +template class PluginListener : public Arcus::SocketListener { public: - PluginListener(std::shared_ptr validator) noexcept : validator_{ validator } + PluginListener(std::shared_ptr plugin) noexcept : plugin_{ plugin } { } @@ -34,46 +36,53 @@ class PluginListener : public Arcus::SocketListener void messageReceived() override { auto message = getSocket()->takeNextMessage(); - // Check if the message is a Version_ret and update the validator - if (message->GetDescriptor() == &plugins::proto::Version_ret::default_instance()) + + if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") { - auto* version_ret = dynamic_cast(message.get()); - validator_->version = semver::from_string(version_ret->version()); - spdlog::info("Plugin version: {}", validator_->version.to_string()); + auto* plugin_ret = dynamic_cast(message.get()); + plugin_->validator->version = semver::from_string( plugin_ret->version()); + plugin_->validator->plugin_hash = plugin_ret->plugin_hash(); + spdlog::info("Plugin version: {}", plugin_->validator->version.to_string()); + } + else if (message->GetTypeName() == Plugin::receive_t::default_instance().GetTypeName()) + { + // unblock plugin } - - // TODO: Handle Receive and Send messages }; void error(const Arcus::Error& error) override{}; private: - std::shared_ptr validator_{}; + std::shared_ptr plugin_{}; }; } // namespace detail -template +template class PluginProxy { +public: + using receive_t = Converter::receive_t; + using send_t = Converter::send_t; + using validator_t = Validator; + using plugin_t = PluginProxy; + static constexpr SlotID slot_id{ Slot }; + std::unique_ptr socket_{}; - std::shared_ptr> validator_{}; - std::unique_ptr>> listener_{}; - ranges::semiregular_box projection_{}; + validator_t validator{}; + std::unique_ptr> listener_{}; + Converter converter{ }; - PluginProxy(const std::string& ip, int port, Proj&& proj = Proj{}) noexcept + PluginProxy(const std::string& ip, int port) noexcept : socket_{ std::make_unique() } - , validator_{ std::make_shared>() } - , listener_{ std::make_unique(validator_) } - , projection_{ std::forward(proj) } + , listener_{ std::make_unique(std::make_shared(this)) } { // Add the listener socket_->addListener(listener_.get()); - // Register all message types - socket_->registerMessageType(&plugins::proto::Version_ret::default_instance()); - socket_->registerMessageType(&Receive::default_instance()); - socket_->registerMessageType(&Send::default_instance()); + // Register all receiving message types + socket_->registerMessageType(&plugins::proto::Plugin_ret::default_instance()); + socket_->registerMessageType(&receive_t::default_instance()); // Connect to the plugin spdlog::info("Connecting to plugin at {}:{}", ip, port); @@ -84,23 +93,23 @@ class PluginProxy // TODO: Add timeout??? Is this blocking even necessary? } - // Send request for version - auto version_args = std::make_shared(); - version_args->set_version_range(VersionRange.value); - socket_->sendMessage(version_args); + // TODO: Use Plugin Message instead of Version_args + auto plugin_args = std::make_shared(); + plugin_args->set_id(slot_id); + socket_->sendMessage(plugin_args); + // No need to wait for the response, since the listener will set the version } auto operator()(auto&&... args) { - if (*validator_ && socket_->getState() == Arcus::SocketState::Connected) + if (validator && socket_->getState() == Arcus::SocketState::Connected) { - auto send = std::make_shared(std::forward(args)...); - socket_->sendMessage(send); + socket_->sendMessage(converter(std::forward(args)...)); // TODO: Block until message is received // TODO: Convert return message to actual return value - return projection_(std::forward(args)...); // FIXME: This is not correct + return 1; // FIXME: This is not correct } - return projection_(std::forward(args)...); + return 1; // FIXME: handle plugin not connected } }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 4320e5de77..7a2328de31 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -6,16 +6,26 @@ #include #include +#include +#include "plugins/pluginproxy.h" +#include "plugins/validator.h" #include "plugins/types.h" namespace cura::plugins { +using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "">, details::simplify_converter_fn>; +using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "">, details::postprocess_converter_fn>; + + +using plugins_t = std::variant; + + class Slots { constexpr Slots() noexcept = default; - std::unordered_map> slots_{}; + std::unordered_map slots_{}; public: Slots(const Slots&) = delete; @@ -27,15 +37,20 @@ class Slots return instance; } - /*! \brief Register a plugin to a slot - * - * \param slot The slot to register the plugin to - * \param plugin The plugin to register - */ - void registerSlot(Slot slot, std::shared_ptr plugin) noexcept - { - slots_.insert_or_assign(slot, std::move(plugin)); - } + + +// template +// constexpr void registerSlot(Slot&& slot) +// { +// slots_.emplace(slot.slot_id, std::forward(slot)); +// } +// +// +// simplify_slot getSlot() +// { +// return std::get(slots_.at(SlotID::SIMPLIFY)); +// } + }; diff --git a/include/plugins/types.h b/include/plugins/types.h index 0b143e93b5..0e654b18f8 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -4,37 +4,84 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_TYPES_H #define CURAENGINE_INCLUDE_PLUGINS_TYPES_H -#include "plugins/pluginproxy.h" +#include + +#include + +#include "utils/IntPoint.h" #include "utils/polygon.h" #include "plugin.pb.h" -#include - namespace cura::plugins { -namespace defaults +namespace details { -constexpr auto simplify = [](const Polygons& polygons, const size_t max_deviation, const size_t max_angle) -> Polygons { return polygons; }; -constexpr auto postprocess = [](const std::string& gcode_word) -> std::string { return gcode_word; }; - -} // namespace defaults +template +struct converter_base +{ + using send_t = Send; + using receive_t = Receive; +}; -// Register the plugin types -// TODO: Try to determine the projections from the instantiation of the PluginProxy. -// TODO: Add custom converters for proto calls to CuraEngine types. -using simplify_plugin = PluginProxy<">=1.0.0 <2.0.0 || >3.2.1", plugins::proto::Simplify_args, plugins::proto::Simplify_ret, decltype(defaults::simplify)>; -using postproces_plugin = PluginProxy<">=1.0.0 <2.0.0 || >3.2.1", plugins::proto::Postprocess_args, plugins::proto::Postprocess_ret, decltype(defaults::postprocess)>; +template +struct simplify_converter_fn : public converter_base +{ + Polygons operator()(const Receive& args) const noexcept + { + Polygons poly{}; + for (const auto& paths : args.polygons().paths() ) + { + Polygon p{}; + for (const auto& point : paths.path() ) + { + p.add(Point { point.y(), point.y() }); + } + poly.add(p); + } + return poly; + } -using plugin_t = std::variant; + auto operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const noexcept + { + Send args{}; + args.set_max_deviation(max_deviation); + args.set_max_angle(max_angle); + for (const auto& polygon : polygons.paths ) + { + auto poly = args.polygons(); + for (const auto& path : polygons.paths) + { + auto* p = poly.add_paths(); + for (const auto& point : path ) + { + auto* pt = p->add_path(); + pt->set_x(point.X); + pt->set_y(point.Y); + } + } + } + return std::make_shared(args); + } +}; -// Register the slots here. -enum class Slot +template +struct postprocess_converter_fn : public converter_base { - SIMPLIFY, - POSTPROCESS + std::string operator()(const Receive& args) const noexcept + { + return args.gcode(); + } + + auto operator()(const std::string& gcode) const noexcept + { + Send args{}; + args.set_gcode(gcode); + return std::make_shared(args); + } }; +} // namespace details } // namespace cura::plugins diff --git a/include/plugins/validator.h b/include/plugins/validator.h index ea3b578490..f9fd18d28a 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -8,11 +8,12 @@ namespace cura::plugins { - +namespace details +{ template -struct VersionRangeLiteral +struct CharRangeLiteral { - constexpr VersionRangeLiteral(const char (&str)[N]) + constexpr CharRangeLiteral(const char (&str)[N]) { std::copy_n(str, N, value); } @@ -20,22 +21,20 @@ struct VersionRangeLiteral char value[N]; }; +} // namespace details -template +template struct Validator { semver::version version{ "1.0.0" }; + std::string_view plugin_hash{ }; bool include_prerelease{ false }; semver::range::detail::range version_range{ VersionRange.value }; constexpr operator bool() const noexcept { - return version_range.satisfies(version, include_prerelease); - } - - constexpr bool operator()(const semver::version& actual_version) const noexcept - { - return version_range.satisfies(actual_version, include_prerelease); + // TODO: Add proper security checking + return version_range.satisfies(version, include_prerelease) && plugin_hash == PluginHash.value; } }; diff --git a/plugin.proto b/plugin.proto index 8c008709dc..e3122b14e8 100644 --- a/plugin.proto +++ b/plugin.proto @@ -6,12 +6,18 @@ package cura.plugins.proto; // TODO: Add progress reporting // TODO: Add priority queueing (if multiple plugins are hooked up to the slot) -message Version_args { - string version_range = 1; +enum SlotID { + SIMPLIFY = 0; + POSTPROCESS = 1; } -message Version_ret { - string version = 1; +message Plugin_args { + SlotID id = 1; +} + +message Plugin_ret { + string plugin_hash = 1; + string version = 2; } message Point_2d { From a6ff6a494400ec98ac66187dc566af74fbd2ce60 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 26 Apr 2023 08:02:04 +0200 Subject: [PATCH 004/470] Add documentation Contributes to [CURA-10475] --- plugin.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugin.proto b/plugin.proto index e3122b14e8..0632036ec2 100644 --- a/plugin.proto +++ b/plugin.proto @@ -2,24 +2,32 @@ syntax = "proto3"; package cura.plugins.proto; +// TODO: Move proto defintions to a separate repo // TODO: Add error propagation // TODO: Add progress reporting // TODO: Add priority queueing (if multiple plugins are hooked up to the slot) + +// These are the different slots that plugins can hook into enum SlotID { SIMPLIFY = 0; POSTPROCESS = 1; } +// --------------------------------------------------------------------- +// This is the message which is sent to the plugin to request identification message Plugin_args { SlotID id = 1; } +// This is the message which is sent back to CuraEngine to identify and validate the plugin message Plugin_ret { string plugin_hash = 1; string version = 2; } +// --------------------------------------------------------------------- +// Some basic types that are used in the messages below message Point_2d { sint64 x = 1; sint64 y = 2; @@ -33,20 +41,26 @@ message Polygons { repeated Polygon paths = 1; } +// --------------------------------------------------------------------- +// The SIMPLIFY slot request message message Simplify_args { Polygons polygons = 1; uint64 max_deviation = 2; uint64 max_angle = 3; } +// The SIMPLIFY slot response message message Simplify_ret { Polygons polygons = 1; } +// --------------------------------------------------------------------- +// The POSTPROCESS slot request message message Postprocess_args { string gcode_word = 1; } +// The POSTPROCESS slot response message message Postprocess_ret { string gcode_word = 1; } \ No newline at end of file From 2e800c4f2891e8ecdb41f7c185ae86c943c81a25 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 26 Apr 2023 08:04:20 +0200 Subject: [PATCH 005/470] Add hashes Just some fake hash to play around with [CURA-10475] --- include/plugins/slots.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 7a2328de31..6e0125dbec 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -9,14 +9,14 @@ #include #include "plugins/pluginproxy.h" -#include "plugins/validator.h" #include "plugins/types.h" +#include "plugins/validator.h" namespace cura::plugins { -using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "">, details::simplify_converter_fn>; -using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "">, details::postprocess_converter_fn>; +using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, details::simplify_converter_fn>; +using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, details::postprocess_converter_fn>; using plugins_t = std::variant; From ef8de6d4883d89836611ac52c3b2482334ee35ad Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 26 Apr 2023 08:40:08 +0200 Subject: [PATCH 006/470] Cleaned up some type aliases and namespaces [CURA-10475] --- include/plugins/pluginproxy.h | 43 +++++++++++++++++++---------------- include/plugins/slots.h | 4 ++-- include/plugins/types.h | 29 +++++++++++++++-------- include/plugins/validator.h | 2 +- 4 files changed, 47 insertions(+), 31 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index e9d705e38a..a957bcc2b6 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -23,11 +23,14 @@ using SlotID = proto::SlotID; namespace detail { -template +template class PluginListener : public Arcus::SocketListener { public: - PluginListener(std::shared_ptr plugin) noexcept : plugin_{ plugin } + using validator_t = Validator; + using receive_t = Receive; + + PluginListener(std::shared_ptr validator) noexcept : validator_{ validator_ } { } @@ -40,11 +43,11 @@ class PluginListener : public Arcus::SocketListener if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") { auto* plugin_ret = dynamic_cast(message.get()); - plugin_->validator->version = semver::from_string( plugin_ret->version()); - plugin_->validator->plugin_hash = plugin_ret->plugin_hash(); - spdlog::info("Plugin version: {}", plugin_->validator->version.to_string()); + validator_->version = semver::from_string(plugin_ret->version()); + validator_->plugin_hash = plugin_ret->plugin_hash(); + spdlog::info("Plugin version: {}", validator_->version.to_string()); } - else if (message->GetTypeName() == Plugin::receive_t::default_instance().GetTypeName()) + else if (message->GetTypeName() == receive_t::default_instance().GetTypeName()) { // unblock plugin } @@ -53,7 +56,7 @@ class PluginListener : public Arcus::SocketListener void error(const Arcus::Error& error) override{}; private: - std::shared_ptr plugin_{}; + std::shared_ptr validator_{}; }; } // namespace detail @@ -62,23 +65,28 @@ template class PluginProxy { public: + // type aliases for easy use using receive_t = Converter::receive_t; using send_t = Converter::send_t; using validator_t = Validator; + using converter_t = Converter; using plugin_t = PluginProxy; + using listener_t = detail::PluginListener; + static constexpr SlotID slot_id{ Slot }; + std::shared_ptr validator{}; + converter_t converter{}; + +private: std::unique_ptr socket_{}; - validator_t validator{}; - std::unique_ptr> listener_{}; - Converter converter{ }; + std::shared_ptr listener_{}; - PluginProxy(const std::string& ip, int port) noexcept - : socket_{ std::make_unique() } - , listener_{ std::make_unique(std::make_shared(this)) } +public: + PluginProxy(const std::string& ip, int port) : socket_{ std::make_unique() }, listener_{ std::make_shared(validator) } { // Add the listener - socket_->addListener(listener_.get()); + socket_->addListener(listener_); // Register all receiving message types socket_->registerMessageType(&plugins::proto::Plugin_ret::default_instance()); @@ -93,10 +101,7 @@ class PluginProxy // TODO: Add timeout??? Is this blocking even necessary? } - // TODO: Use Plugin Message instead of Version_args - auto plugin_args = std::make_shared(); - plugin_args->set_id(slot_id); - socket_->sendMessage(plugin_args); + socket_->sendMessage(converter(slot_id)); // No need to wait for the response, since the listener will set the version } @@ -109,7 +114,7 @@ class PluginProxy // TODO: Convert return message to actual return value return 1; // FIXME: This is not correct } - return 1; // FIXME: handle plugin not connected + return 1; // FIXME: handle plugin not connected } }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 6e0125dbec..34a386d48d 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -15,8 +15,8 @@ namespace cura::plugins { -using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, details::simplify_converter_fn>; -using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, details::postprocess_converter_fn>; +using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::simplify_converter_fn>; +using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::postprocess_converter_fn>; using plugins_t = std::variant; diff --git a/include/plugins/types.h b/include/plugins/types.h index 0e654b18f8..db57bfec9d 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -5,8 +5,7 @@ #define CURAENGINE_INCLUDE_PLUGINS_TYPES_H #include - -#include +#include #include "utils/IntPoint.h" #include "utils/polygon.h" @@ -15,13 +14,25 @@ namespace cura::plugins { -namespace details +namespace converters { template struct converter_base { using send_t = Send; using receive_t = Receive; + + auto operator()(const SlotID slot_id) + { + proto::Plugin_args args{}; + args.set_id(slot_id); + return std::make_shared(args); + } + + std::tuple operator()(const proto::Plugin_ret& args) + { + return { args.version(), args.plugin_hash() }; + } }; template @@ -30,12 +41,12 @@ struct simplify_converter_fn : public converter_base Polygons operator()(const Receive& args) const noexcept { Polygons poly{}; - for (const auto& paths : args.polygons().paths() ) + for (const auto& paths : args.polygons().paths()) { Polygon p{}; - for (const auto& point : paths.path() ) + for (const auto& point : paths.path()) { - p.add(Point { point.y(), point.y() }); + p.add(Point{ point.y(), point.y() }); } poly.add(p); } @@ -47,13 +58,13 @@ struct simplify_converter_fn : public converter_base Send args{}; args.set_max_deviation(max_deviation); args.set_max_angle(max_angle); - for (const auto& polygon : polygons.paths ) + for (const auto& polygon : polygons.paths) { auto poly = args.polygons(); for (const auto& path : polygons.paths) { auto* p = poly.add_paths(); - for (const auto& point : path ) + for (const auto& point : path) { auto* pt = p->add_path(); pt->set_x(point.X); @@ -81,7 +92,7 @@ struct postprocess_converter_fn : public converter_base } }; -} // namespace details +} // namespace converters } // namespace cura::plugins diff --git a/include/plugins/validator.h b/include/plugins/validator.h index f9fd18d28a..f1e1e4d249 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -27,7 +27,7 @@ template Date: Wed, 26 Apr 2023 08:41:44 +0200 Subject: [PATCH 007/470] Moved CharLiteral to types [CURA-10475] --- include/plugins/types.h | 15 +++++++++++++++ include/plugins/validator.h | 15 ++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/plugins/types.h b/include/plugins/types.h index db57bfec9d..d4b181316b 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -14,6 +14,21 @@ namespace cura::plugins { +namespace details +{ +template +struct CharRangeLiteral +{ + constexpr CharRangeLiteral(const char (&str)[N]) + { + std::copy_n(str, N, value); + } + + char value[N]; +}; + +} // namespace details + namespace converters { template diff --git a/include/plugins/validator.h b/include/plugins/validator.h index f1e1e4d249..48ff6e8b69 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -4,24 +4,13 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H #define CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H +#include "plugins/types.h" + #include namespace cura::plugins { -namespace details -{ -template -struct CharRangeLiteral -{ - constexpr CharRangeLiteral(const char (&str)[N]) - { - std::copy_n(str, N, value); - } - - char value[N]; -}; -} // namespace details template struct Validator From 4c5fe4370f533718ab581e0a41ca74b0edcbf326 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 26 Apr 2023 09:23:31 +0200 Subject: [PATCH 008/470] Listener uses converter [CURA-10475] --- include/plugins/pluginproxy.h | 20 +++++++++++--------- include/plugins/types.h | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index a957bcc2b6..119f309c86 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -13,22 +13,23 @@ #include #include +#include "plugins/types.h" #include "plugins/validator.h" #include "plugin.pb.h" namespace cura::plugins { -using SlotID = proto::SlotID; namespace detail { -template +template class PluginListener : public Arcus::SocketListener { public: using validator_t = Validator; using receive_t = Receive; + using converter_t = Converter; PluginListener(std::shared_ptr validator) noexcept : validator_{ validator_ } { @@ -42,9 +43,9 @@ class PluginListener : public Arcus::SocketListener if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") { - auto* plugin_ret = dynamic_cast(message.get()); - validator_->version = semver::from_string(plugin_ret->version()); - validator_->plugin_hash = plugin_ret->plugin_hash(); + auto [version, plugin_hash] = converter_(*message); + validator_->version = semver::from_string(version); + validator_->plugin_hash = plugin_hash; spdlog::info("Plugin version: {}", validator_->version.to_string()); } else if (message->GetTypeName() == receive_t::default_instance().GetTypeName()) @@ -57,6 +58,7 @@ class PluginListener : public Arcus::SocketListener private: std::shared_ptr validator_{}; + converter_t converter_{}; }; } // namespace detail @@ -71,16 +73,16 @@ class PluginProxy using validator_t = Validator; using converter_t = Converter; using plugin_t = PluginProxy; - using listener_t = detail::PluginListener; + using listener_t = detail::PluginListener; static constexpr SlotID slot_id{ Slot }; std::shared_ptr validator{}; - converter_t converter{}; private: std::unique_ptr socket_{}; std::shared_ptr listener_{}; + converter_t converter_{}; public: PluginProxy(const std::string& ip, int port) : socket_{ std::make_unique() }, listener_{ std::make_shared(validator) } @@ -101,7 +103,7 @@ class PluginProxy // TODO: Add timeout??? Is this blocking even necessary? } - socket_->sendMessage(converter(slot_id)); + socket_->sendMessage(converter_(slot_id)); // No need to wait for the response, since the listener will set the version } @@ -109,7 +111,7 @@ class PluginProxy { if (validator && socket_->getState() == Arcus::SocketState::Connected) { - socket_->sendMessage(converter(std::forward(args)...)); + socket_->sendMessage(converter_(std::forward(args)...)); // TODO: Block until message is received // TODO: Convert return message to actual return value return 1; // FIXME: This is not correct diff --git a/include/plugins/types.h b/include/plugins/types.h index d4b181316b..c15f8dfb18 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -14,6 +14,8 @@ namespace cura::plugins { +using SlotID = proto::SlotID; + namespace details { template From 7924542b52fb14548032944e2bb7b626b85d3b14 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 1 May 2023 11:47:00 +0200 Subject: [PATCH 009/470] Add converter Still WIP and doesn't compile due to the overloading of the operator() in child class. [CURA-10475] --- include/plugins/pluginproxy.h | 88 +++++++++++++++++++++++------------ include/plugins/slots.h | 4 ++ include/plugins/types.h | 53 +++++++++++++-------- src/Application.cpp | 2 + 4 files changed, 98 insertions(+), 49 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 119f309c86..d50261beb1 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -23,15 +23,28 @@ namespace cura::plugins namespace detail { -template +template class PluginListener : public Arcus::SocketListener { public: using validator_t = Validator; - using receive_t = Receive; + using receive_t = Converter::receive_t; using converter_t = Converter; - PluginListener(std::shared_ptr validator) noexcept : validator_{ validator_ } + bool msgReceived() noexcept + { + bool msg_received = msg_received_; + msg_received_ = false; + return msg_received; + } + +private: + std::shared_ptr validator_{}; + converter_t converter_{}; + bool msg_received_{ false }; + +public: + explicit PluginListener(std::shared_ptr validator) noexcept : validator_{ validator_ } { } @@ -39,31 +52,29 @@ class PluginListener : public Arcus::SocketListener void messageReceived() override { - auto message = getSocket()->takeNextMessage(); - - if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") - { - auto [version, plugin_hash] = converter_(*message); - validator_->version = semver::from_string(version); - validator_->plugin_hash = plugin_hash; - spdlog::info("Plugin version: {}", validator_->version.to_string()); - } - else if (message->GetTypeName() == receive_t::default_instance().GetTypeName()) - { - // unblock plugin - } +// auto message = getSocket()->takeNextMessage(); +// +// if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") +// { +// auto* msg = dynamic_cast(message.get()); +// cura::plugins::proto::Plugin_ret mm {}; +// auto x = converter_(mm); +//// validator_->version = semver::from_string(version); +//// validator_->plugin_hash = plugin_hash; +// spdlog::info("Plugin version: {}", validator_->version.to_string()); +// } +// else if (message->GetTypeName() == receive_t::default_instance().GetTypeName()) +// { +// // unblock plugin +// } }; void error(const Arcus::Error& error) override{}; - -private: - std::shared_ptr validator_{}; - converter_t converter_{}; }; } // namespace detail -template +template class PluginProxy { public: @@ -72,20 +83,19 @@ class PluginProxy using send_t = Converter::send_t; using validator_t = Validator; using converter_t = Converter; - using plugin_t = PluginProxy; - using listener_t = detail::PluginListener; + using listener_t = detail::PluginListener; - static constexpr SlotID slot_id{ Slot }; + plugins::SlotID slot_id{ Slot }; - std::shared_ptr validator{}; + std::shared_ptr validator; private: - std::unique_ptr socket_{}; - std::shared_ptr listener_{}; + std::unique_ptr socket_; + listener_t* listener_; // FIXME: in Arcus use smart_ptr for listeners otherwise we need to add a deconstructor in this class and that forces us to define the big 6 converter_t converter_{}; public: - PluginProxy(const std::string& ip, int port) : socket_{ std::make_unique() }, listener_{ std::make_shared(validator) } + PluginProxy(const std::string& ip, int port) : validator{ std::make_shared() }, socket_{ std::make_unique() }, listener_{ new listener_t(validator) } { // Add the listener socket_->addListener(listener_); @@ -103,7 +113,27 @@ class PluginProxy // TODO: Add timeout??? Is this blocking even necessary? } - socket_->sendMessage(converter_(slot_id)); + converters::simplify_converter_fn convvvvv{}; + + SlotID slotId { SlotID::SIMPLIFY }; + auto x = convvvvv(slotId); + + proto::Plugin_args args{}; + args.set_id(slot_id); + + socket_->sendMessage(std::make_shared(args)); + if (listener_->msgReceived()) + { + auto message = socket_->takeNextMessage(); + if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") + { + auto* msg = dynamic_cast(message.get()); + validator->version = semver::from_string(msg->version()); + validator->plugin_hash = msg->plugin_hash(); + spdlog::info("Plugin version: {}", validator->version.to_string()); + } + } + // // No need to wait for the response, since the listener will set the version } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 34a386d48d..7cb8aadd03 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -37,6 +37,10 @@ class Slots return instance; } + void registerPlugin(auto&& plugin) + { + slots_.emplace(plugin.slot_id, std::forward(plugin)); + } // template diff --git a/include/plugins/types.h b/include/plugins/types.h index c15f8dfb18..019ab26038 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -4,6 +4,7 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_TYPES_H #define CURAENGINE_INCLUDE_PLUGINS_TYPES_H +#include #include #include @@ -33,29 +34,37 @@ struct CharRangeLiteral namespace converters { -template -struct converter_base +template +class converter_base { - using send_t = Send; - using receive_t = Receive; - - auto operator()(const SlotID slot_id) + friend T; +public: + auto operator()(auto& arg, auto&&... args) { - proto::Plugin_args args{}; - args.set_id(slot_id); - return std::make_shared(args); - } - - std::tuple operator()(const proto::Plugin_ret& args) - { - return { args.version(), args.plugin_hash() }; + if constexpr (std::is_same_v) + { + proto::Plugin_args msg{}; + msg.set_id(arg); + return std::make_shared(msg); + } + else if constexpr (std::is_same_v) + { + return std::tuple{ arg.version(), arg.plugin_hash() }; + } + return 1; + //return static_cast(*this).make(arg, std::forward(args)...); } }; template -struct simplify_converter_fn : public converter_base +class simplify_converter_fn : public converter_base> { - Polygons operator()(const Receive& args) const noexcept +public: + using receive_t = Receive; + using send_t = Send; + +private: + Polygons make(const Receive& args) { Polygons poly{}; for (const auto& paths : args.polygons().paths()) @@ -70,7 +79,7 @@ struct simplify_converter_fn : public converter_base return poly; } - auto operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const noexcept + std::shared_ptr make(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) { Send args{}; args.set_max_deviation(max_deviation); @@ -94,14 +103,18 @@ struct simplify_converter_fn : public converter_base }; template -struct postprocess_converter_fn : public converter_base +class postprocess_converter_fn : public converter_base> { - std::string operator()(const Receive& args) const noexcept +public: + using receive_t = Receive; + using send_t = Send; + + std::string make(const Receive& args) { return args.gcode(); } - auto operator()(const std::string& gcode) const noexcept + std::shared_ptr make(const std::string& gcode) { Send args{}; args.set_gcode(gcode); diff --git a/src/Application.cpp b/src/Application.cpp index 27e6a10c16..1808317f78 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -253,6 +253,8 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { + auto simplifyPlugin = plugins::simplify_plugin { "127.0.0.1", 50010 }; +// plugins::Slots::instance().addPlugin(plugins::simplify_plugin{"127.0.0.1", 50010}); // plugins::Slots::instance().register("simplify", "[>=0.1.0]"); // plugins::Slots::instance().register("postprocess", "[>=0.1.0]"); } From 95e79a1cb6bda889cb2cb138e59121d1485ec92c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 12 May 2023 11:48:29 +0200 Subject: [PATCH 010/470] Make it compile on Win64+VS2022 part of CURA-10475 --- include/plugins/types.h | 2 +- src/InsetOrderOptimizer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plugins/types.h b/include/plugins/types.h index 019ab26038..8decaa7ef0 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -51,7 +51,7 @@ class converter_base { return std::tuple{ arg.version(), arg.plugin_hash() }; } - return 1; + return std::make_shared(); //return static_cast(*this).make(arg, std::forward(args)...); } }; diff --git a/src/InsetOrderOptimizer.cpp b/src/InsetOrderOptimizer.cpp index 7129ec2d52..e080f43989 100644 --- a/src/InsetOrderOptimizer.cpp +++ b/src/InsetOrderOptimizer.cpp @@ -14,8 +14,8 @@ #include #include +#include #include -#include #include #include #include From 97214493d1b412223069a003bd76d458037454aa Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 09:27:46 +0200 Subject: [PATCH 011/470] Write get/set for plugin in slot This currently fails compiling due to the unique_ptr of libArcus. But if we decide to go with Asio that shouldn't be a problem [CURA-10475] --- include/plugins/pluginproxy.h | 2 +- include/plugins/slots.h | 28 +++++++++------------------- src/Application.cpp | 8 ++++---- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index d50261beb1..87ec316db4 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -85,7 +85,7 @@ class PluginProxy using converter_t = Converter; using listener_t = detail::PluginListener; - plugins::SlotID slot_id{ Slot }; + static inline constexpr plugins::SlotID slot_id{ Slot }; std::shared_ptr validator; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 7cb8aadd03..8e1298b002 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -5,6 +5,7 @@ #define CURAENGINE_INCLUDE_PLUGINS_SLOTS_H #include +#include #include #include @@ -18,7 +19,6 @@ namespace cura::plugins using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::simplify_converter_fn>; using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::postprocess_converter_fn>; - using plugins_t = std::variant; @@ -37,28 +37,18 @@ class Slots return instance; } - void registerPlugin(auto&& plugin) + template + constexpr void set(T&& plugin) { - slots_.emplace(plugin.slot_id, std::forward(plugin)); + slots_.emplace(T::slot_id, std::forward(plugin)); } - -// template -// constexpr void registerSlot(Slot&& slot) -// { -// slots_.emplace(slot.slot_id, std::forward(slot)); -// } -// -// -// simplify_slot getSlot() -// { -// return std::get(slots_.at(SlotID::SIMPLIFY)); -// } - + template + constexpr auto get() const + { + return std::get(slots_.at(T::slot_id)); + } }; - - } // namespace cura::plugins - #endif // CURAENGINE_INCLUDE_PLUGINS_SLOTS_H diff --git a/src/Application.cpp b/src/Application.cpp index 1808317f78..56c3175a54 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -253,10 +253,10 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { - auto simplifyPlugin = plugins::simplify_plugin { "127.0.0.1", 50010 }; -// plugins::Slots::instance().addPlugin(plugins::simplify_plugin{"127.0.0.1", 50010}); -// plugins::Slots::instance().register("simplify", "[>=0.1.0]"); -// plugins::Slots::instance().register("postprocess", "[>=0.1.0]"); + // TODO: remove this + plugins::Slots::instance().set({ "127.0.0.1", 50010 }); + auto x = plugins::Slots::instance().get(); + auto y = x(); } } // namespace cura \ No newline at end of file From a991682756ba32141f83b4a907d397ed47d772f2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Mon, 15 May 2023 10:06:41 +0200 Subject: [PATCH 012/470] W.I.P. on splitting converters to send/receive. Push now to prevent conflict. [Engine Plugin WIP]. part of CURA-10475 --- include/plugins/pluginproxy.h | 28 +++++++++++++++------------- include/plugins/types.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 87ec316db4..0b08cb7b0b 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -23,13 +23,12 @@ namespace cura::plugins namespace detail { -template +template class PluginListener : public Arcus::SocketListener { public: using validator_t = Validator; - using receive_t = Converter::receive_t; - using converter_t = Converter; + using receive_t = Receiver; bool msgReceived() noexcept { @@ -40,7 +39,7 @@ class PluginListener : public Arcus::SocketListener private: std::shared_ptr validator_{}; - converter_t converter_{}; + receive_t receiver_{}; bool msg_received_{ false }; public: @@ -74,28 +73,31 @@ class PluginListener : public Arcus::SocketListener } // namespace detail -template -class PluginProxy +template +class SlotProxy { public: // type aliases for easy use - using receive_t = Converter::receive_t; - using send_t = Converter::send_t; + using receive_t = Receiver; + using send_t = Sender; using validator_t = Validator; - using converter_t = Converter; - using listener_t = detail::PluginListener; + using listener_t = detail::PluginListener; static inline constexpr plugins::SlotID slot_id{ Slot }; - std::shared_ptr validator; + //std::shared_ptr validator; private: std::unique_ptr socket_; listener_t* listener_; // FIXME: in Arcus use smart_ptr for listeners otherwise we need to add a deconstructor in this class and that forces us to define the big 6 - converter_t converter_{}; + receiver_t receiver_{}; + sender_t sender_{}; public: - PluginProxy(const std::string& ip, int port) : validator{ std::make_shared() }, socket_{ std::make_unique() }, listener_{ new listener_t(validator) } + SlotProxy(const std::string& ip, int port) : + validator{ std::make_shared() }, + socket_{ std::make_unique() }, + listener_{ new listener_t(validator) } { // Add the listener socket_->addListener(listener_); diff --git a/include/plugins/types.h b/include/plugins/types.h index 8decaa7ef0..b1ef0cf946 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -34,6 +34,36 @@ struct CharRangeLiteral namespace converters { + +template +class ReceiveConverterBase +{ + friend T; +public: + auto operator()(const proto::Plugin_ret& message) + { + return std::tuple{ arg.version(), arg.plugin_hash() }; + } +}; + +template +class SendConverterBase +{ + friend T +public: + auto operator()(const cura::plugins::proto::SlotID& slot_id, auto&&... args) + { + proto::Plugin_args msg{}; + msg.set_id(arg); + return std::make_shared(msg); + } +}; + +//class SimplifyReceiveConverter : ReceiveConverterBase<> +//{ +// +//}; + template class converter_base { From eea59300b1c4ff006be759e340e2e5c47c52ba0b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 10:26:35 +0200 Subject: [PATCH 013/470] Add support for asio-grpc and update protobuf usage - Add asio-grpc to requirements and link it to _CuraEngine - Generate plugin types using asio_grpc_protobuf_generate - Update protobuf usage in conanfile.py and CMakeLists.txt - Update plugin.proto to use services and rpc calls [CURA-10475] --- CMakeLists.txt | 25 ++++++++++++++++++------- conanfile.py | 17 ++++++++++++----- plugin.proto | 26 ++++++++++++++++++++------ 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36135a78ab..1a7a390ad1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,14 +13,22 @@ option(EXTENSIVE_WARNINGS "Build with all warnings" ON) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) -# Create Protobuf files if Arcus is used + +# Generate the plugin types +find_package(protobuf REQUIRED) +asio_grpc_protobuf_generate( + GENERATE_GRPC GENERATE_MOCK_CODE + OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" + OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" + IMPORT_DIRS "${CMAKE_CURRENT_LIST_DIR}" + PROTOS "${CMAKE_CURRENT_LIST_DIR}/plugin.proto" +) + + if (ENABLE_ARCUS) message(STATUS "Building with Arcus") - find_package(arcus REQUIRED) - find_package(protobuf REQUIRED) - protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto plugin.proto) - protobuf_generate_cpp(plugin_PB_SRCS plugin_PB_HEADERS plugin.proto) + protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto) endif () ### Compiling CuraEngine ### @@ -137,7 +145,7 @@ set(engine_SRCS # Except main.cpp. src/utils/VoxelUtils.cpp ) -add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS}) +add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS} ${ASIO_GRPC_PLUGIN_PROTO_SOURCES}) use_threads(_CuraEngine) target_include_directories(_CuraEngine @@ -146,7 +154,9 @@ target_include_directories(_CuraEngine $ PRIVATE $ # Include Cura.pb.h + $ # Include generated plugin types ) + target_compile_definitions(_CuraEngine PUBLIC $<$:ARCUS> @@ -197,6 +207,7 @@ target_link_libraries(_CuraEngine boost::boost scripta::scripta neargye-semver::neargye-semver + asio-grpc::asio-grpc $<$:GTest::gtest>) if (NOT WIN32) @@ -226,4 +237,4 @@ endif () if (ENABLE_BENCHMARKS) add_subdirectory(benchmark) -endif() \ No newline at end of file +endif () \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index ea9ebc6896..6c6e3fd90e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -50,9 +50,15 @@ def export_sources(self): def configure(self): self.options["boost"].header_only = True self.options["clipper"].shared = True + self.options["protobuf"].shared = True + self.options["grpc"].csharp_plugin = False + self.options["grpc"].node_plugin = False + self.options["grpc"].objective_c_plugin = False + self.options["grpc"].php_plugin = False + self.options["grpc"].python_plugin = False + self.options["grpc"].ruby_plugin = False if self.options.enable_arcus: self.options["arcus"].shared = True - self.options["protobuf"].shared = True def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -63,8 +69,7 @@ def validate(self): def build_requirements(self): self.test_requires("standardprojectsettings/[>=0.1.0]@ultimaker/stable") - if self.options.enable_arcus: - self.test_requires("protobuf/3.21.9") + self.test_requires("protobuf/3.21.9") if self.options.enable_testing: self.test_requires("gtest/1.12.1") if self.options.enable_benchmarks: @@ -72,9 +77,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("protobuf/3.21.9") self.requires("arcus/5.2.2") - self.requires("zlib/1.2.12") self.requires("clipper/6.4.2") self.requires("boost/1.79.0") self.requires("rapidjson/1.1.0") @@ -84,6 +87,10 @@ def requirements(self): self.requires("range-v3/0.12.0") self.requires("scripta/0.1.0@ultimaker/testing") self.requires("neargye-semver/0.3.0") + self.requires("protobuf/3.21.9") + self.requires("zlib/1.2.12") + self.requires("openssl/1.1.1l") + self.requires("asio-grpc/2.4.0") def generate(self): deps = CMakeDeps(self) diff --git a/plugin.proto b/plugin.proto index 0632036ec2..a435e00685 100644 --- a/plugin.proto +++ b/plugin.proto @@ -16,12 +16,16 @@ enum SlotID { // --------------------------------------------------------------------- // This is the message which is sent to the plugin to request identification -message Plugin_args { +service Plugin { + rpc Identify(PluginRequest) returns (PluginResponse) {} +} + +message PluginRequest { SlotID id = 1; } // This is the message which is sent back to CuraEngine to identify and validate the plugin -message Plugin_ret { +message PluginResponse { string plugin_hash = 1; string version = 2; } @@ -43,24 +47,34 @@ message Polygons { // --------------------------------------------------------------------- // The SIMPLIFY slot request message -message Simplify_args { + +service Simplify { + rpc Simplify(SimplifyRequest) returns (SimplifyResponse) {} +} + +message SimplifyRequest { Polygons polygons = 1; uint64 max_deviation = 2; uint64 max_angle = 3; } // The SIMPLIFY slot response message -message Simplify_ret { +message SimplifyResponse { Polygons polygons = 1; } // --------------------------------------------------------------------- // The POSTPROCESS slot request message -message Postprocess_args { + +service Postprocess { + rpc Postprocess(PostprocessRequest) returns (PostprocessResponse) {} +} + +message PostprocessRequest { string gcode_word = 1; } // The POSTPROCESS slot response message -message Postprocess_ret { +message PostprocessResponse { string gcode_word = 1; } \ No newline at end of file From a5d5a4d23fa4c8ddb14fbc02ec894367f0cf65a6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 10:33:17 +0200 Subject: [PATCH 014/470] Add UNKNOWN SlotID As is common practice when working with gRPC and Protobuf [CURA-10475] --- plugin.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.proto b/plugin.proto index a435e00685..dba2fea2f2 100644 --- a/plugin.proto +++ b/plugin.proto @@ -10,8 +10,9 @@ package cura.plugins.proto; // These are the different slots that plugins can hook into enum SlotID { - SIMPLIFY = 0; - POSTPROCESS = 1; + UNKNOWN = 0; + SIMPLIFY = 1; + POSTPROCESS = 2; } // --------------------------------------------------------------------- From e6cc85853de78e5e0b71be8dd0b9281d541d6db3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 10:55:35 +0200 Subject: [PATCH 015/470] Remove protobuf from build requirements and add asio-grpc to CMakeLists.txt - Remove protobuf from build requirements in conanfile.py - Add asio-grpc to find_package in CMakeLists.txt [CURA-10475] --- CMakeLists.txt | 1 + conanfile.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a7a390ad1..83e152de3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) # Generate the plugin types find_package(protobuf REQUIRED) +find_package(asio-grpc REQUIRED) asio_grpc_protobuf_generate( GENERATE_GRPC GENERATE_MOCK_CODE OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" diff --git a/conanfile.py b/conanfile.py index 6c6e3fd90e..99a176cee9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -69,7 +69,6 @@ def validate(self): def build_requirements(self): self.test_requires("standardprojectsettings/[>=0.1.0]@ultimaker/stable") - self.test_requires("protobuf/3.21.9") if self.options.enable_testing: self.test_requires("gtest/1.12.1") if self.options.enable_benchmarks: From fd7a8962054ffcc554c8bbd46e55ae1af4c02c9f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 11:25:03 +0200 Subject: [PATCH 016/470] Refactor: Rename PluginProxy to SlotProxy - Renamed include/plugins/pluginproxy.h to include/plugins/slotproxy.h - Updated references to PluginProxy to SlotProxy in include/plugins/slots.h - Updated include guard in include/plugins/slotproxy.h - Updated plugin.pb.h to plugin.grpc.pb.h in include/plugins/types.h [CURA-10475] --- include/plugins/{pluginproxy.h => slotproxy.h} | 6 +++--- include/plugins/slots.h | 10 +++++----- include/plugins/types.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename include/plugins/{pluginproxy.h => slotproxy.h} (97%) diff --git a/include/plugins/pluginproxy.h b/include/plugins/slotproxy.h similarity index 97% rename from include/plugins/pluginproxy.h rename to include/plugins/slotproxy.h index 0b08cb7b0b..59877d8e0f 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/slotproxy.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef CURAENGINE_INCLUDE_PLUGINS_PLUGINPROXY_H -#define CURAENGINE_INCLUDE_PLUGINS_PLUGINPROXY_H +#ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H +#define CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H #include #include @@ -155,4 +155,4 @@ class SlotProxy } // namespace cura::plugins -#endif // CURAENGINE_INCLUDE_PLUGINS_PLUGINPROXY_H +#endif // CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 8e1298b002..b4877286df 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -9,23 +9,23 @@ #include #include -#include "plugins/pluginproxy.h" +#include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" namespace cura::plugins { -using simplify_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::simplify_converter_fn>; -using postprocess_plugin = PluginProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::postprocess_converter_fn>; +using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::simplify_converter_fn>; +using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::postprocess_converter_fn>; -using plugins_t = std::variant; +using slots_t = std::variant; class Slots { constexpr Slots() noexcept = default; - std::unordered_map slots_{}; + std::unordered_map slots_{}; public: Slots(const Slots&) = delete; diff --git a/include/plugins/types.h b/include/plugins/types.h index b1ef0cf946..725026cf42 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -11,7 +11,7 @@ #include "utils/IntPoint.h" #include "utils/polygon.h" -#include "plugin.pb.h" +#include "plugin.grpc.pb.h" namespace cura::plugins { From 47d1127bf8093c412c050bb427b8ee62d8372821 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 12:53:42 +0200 Subject: [PATCH 017/470] Update Conan and CMake configurations - Change protobuf option to shared=False in conanfile.py - Add protobuf/3.21.9 as a tool requirement in conanfile.py - Update arcus requirement to latest version in conanfile.py - Remove libprotobuf from target_link_libraries for _CuraEngine when ENABLE_ARCUS is true in CMakeLists.txt - Add libprotobuf to target_link_libraries for _CuraEngine in CMakeLists.txt [CURA-10475] --- CMakeLists.txt | 5 +++-- conanfile.py | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83e152de3e..5bc58a4ed5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) # Generate the plugin types find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) + asio_grpc_protobuf_generate( GENERATE_GRPC GENERATE_MOCK_CODE OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" @@ -25,7 +26,6 @@ asio_grpc_protobuf_generate( PROTOS "${CMAKE_CURRENT_LIST_DIR}/plugin.proto" ) - if (ENABLE_ARCUS) message(STATUS "Building with Arcus") find_package(arcus REQUIRED) @@ -180,7 +180,7 @@ if (${EXTENSIVE_WARNINGS}) endif () if (ENABLE_ARCUS) - target_link_libraries(_CuraEngine PRIVATE arcus::arcus protobuf::libprotobuf) + target_link_libraries(_CuraEngine PUBLIC arcus::arcus ) endif () find_package(clipper REQUIRED) @@ -209,6 +209,7 @@ target_link_libraries(_CuraEngine scripta::scripta neargye-semver::neargye-semver asio-grpc::asio-grpc + protobuf::libprotobuf $<$:GTest::gtest>) if (NOT WIN32) diff --git a/conanfile.py b/conanfile.py index 99a176cee9..d87d83b840 100644 --- a/conanfile.py +++ b/conanfile.py @@ -50,7 +50,8 @@ def export_sources(self): def configure(self): self.options["boost"].header_only = True self.options["clipper"].shared = True - self.options["protobuf"].shared = True + + self.options["protobuf"].shared = False self.options["grpc"].csharp_plugin = False self.options["grpc"].node_plugin = False self.options["grpc"].objective_c_plugin = False @@ -69,6 +70,7 @@ def validate(self): def build_requirements(self): self.test_requires("standardprojectsettings/[>=0.1.0]@ultimaker/stable") + self.tool_requires("protobuf/3.21.9") if self.options.enable_testing: self.test_requires("gtest/1.12.1") if self.options.enable_benchmarks: @@ -76,7 +78,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/5.2.2") + self.requires("arcus/(latest)@ultimaker/cura_10475") self.requires("clipper/6.4.2") self.requires("boost/1.79.0") self.requires("rapidjson/1.1.0") From 63757a1c46b8dee7728db9358c2e060af4c43921 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 13:14:41 +0200 Subject: [PATCH 018/470] Refactor SlotProxy and related classes - Comment out code in SlotProxy constructor and operator() methods - Change class to struct for ReceiveConverterBase and SendConverterBase - Update proto::Plugin_args and proto::Plugin_ret to proto::PluginRequest and proto::PluginResponse respectively - Update simplify_plugin to simplify_slot in Application::registerPlugins() - Add includes for plugin.grpc.pb.h and plugin.pb.h in slots.h - Update simplify_slot and postprocess_slot to use ReceiveConverterBase and SendConverterBase [CURA-10475] --- include/plugins/slotproxy.h | 84 ++++++++++++++++++------------------- include/plugins/slots.h | 6 ++- include/plugins/types.h | 28 +++++-------- src/Application.cpp | 4 +- 4 files changed, 59 insertions(+), 63 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 59877d8e0f..027fcad04e 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -88,62 +88,62 @@ class SlotProxy //std::shared_ptr validator; private: - std::unique_ptr socket_; - listener_t* listener_; // FIXME: in Arcus use smart_ptr for listeners otherwise we need to add a deconstructor in this class and that forces us to define the big 6 - receiver_t receiver_{}; - sender_t sender_{}; +// std::unique_ptr socket_; +// listener_t* listener_; // FIXME: in Arcus use smart_ptr for listeners otherwise we need to add a deconstructor in this class and that forces us to define the big 6 +// receiver_t receiver_{}; +// sender_t sender_{}; public: - SlotProxy(const std::string& ip, int port) : - validator{ std::make_shared() }, - socket_{ std::make_unique() }, - listener_{ new listener_t(validator) } + SlotProxy(const std::string& ip, int port) +// validator{ std::make_shared() }, +// socket_{ std::make_unique() } +// listener_{ new listener_t(validator) } { // Add the listener - socket_->addListener(listener_); - - // Register all receiving message types - socket_->registerMessageType(&plugins::proto::Plugin_ret::default_instance()); - socket_->registerMessageType(&receive_t::default_instance()); - - // Connect to the plugin - spdlog::info("Connecting to plugin at {}:{}", ip, port); - socket_->connect(ip, port); - while (socket_->getState() == Arcus::SocketState::Connecting || socket_->getState() == Arcus::SocketState::Opening) - { - std::this_thread::sleep_for(std::chrono::milliseconds{ 100 }); // TODO: Fix magic number - // TODO: Add timeout??? Is this blocking even necessary? - } - - converters::simplify_converter_fn convvvvv{}; +// socket_->addListener(listener_); +// +// // Register all receiving message types +// socket_->registerMessageType(&plugins::proto::PluginRequest::default_instance()); +// socket_->registerMessageType(&receive_t::default_instance()); +// +// // Connect to the plugin +// spdlog::info("Connecting to plugin at {}:{}", ip, port); +// socket_->connect(ip, port); +// while (socket_->getState() == Arcus::SocketState::Connecting || socket_->getState() == Arcus::SocketState::Opening) +// { +// std::this_thread::sleep_for(std::chrono::milliseconds{ 100 }); // TODO: Fix magic number +// // TODO: Add timeout??? Is this blocking even necessary? +// } - SlotID slotId { SlotID::SIMPLIFY }; - auto x = convvvvv(slotId); +// converters::simplify_converter_fn convvvvv{}; - proto::Plugin_args args{}; - args.set_id(slot_id); +// SlotID slotId { SlotID::SIMPLIFY }; +// auto x = convvvvv(slotId); +// +// proto::PluginRequest args{}; +// args.set_id(slot_id); - socket_->sendMessage(std::make_shared(args)); - if (listener_->msgReceived()) - { - auto message = socket_->takeNextMessage(); - if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") - { - auto* msg = dynamic_cast(message.get()); - validator->version = semver::from_string(msg->version()); - validator->plugin_hash = msg->plugin_hash(); - spdlog::info("Plugin version: {}", validator->version.to_string()); - } - } +// socket_->sendMessage(std::make_shared(args)); +// if (listener_->msgReceived()) +// { +// auto message = socket_->takeNextMessage(); +// if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") +// { +//// auto* msg = dynamic_cast(message.get()); +//// validator->version = semver::from_string(msg->version()); +//// validator->plugin_hash = msg->plugin_hash(); +//// spdlog::info("Plugin version: {}", validator->version.to_string()); +// } +// } // // No need to wait for the response, since the listener will set the version } auto operator()(auto&&... args) { - if (validator && socket_->getState() == Arcus::SocketState::Connected) + if (true)//validator && socket_->getState() == Arcus::SocketState::Connected) { - socket_->sendMessage(converter_(std::forward(args)...)); +// socket_->sendMessage(converter_(std::forward(args)...)); // TODO: Block until message is received // TODO: Convert return message to actual return value return 1; // FIXME: This is not correct diff --git a/include/plugins/slots.h b/include/plugins/slots.h index b4877286df..c0c03f13e1 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -9,6 +9,8 @@ #include #include +#include "plugin.grpc.pb.h" +#include "plugin.pb.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" @@ -16,8 +18,8 @@ namespace cura::plugins { -using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::simplify_converter_fn>; -using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::postprocess_converter_fn>; +using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::ReceiveConverterBase, converters::SendConverterBase>; +using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::ReceiveConverterBase, converters::SendConverterBase>; using slots_t = std::variant; diff --git a/include/plugins/types.h b/include/plugins/types.h index 725026cf42..4f1983aa99 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -36,26 +36,22 @@ namespace converters { template -class ReceiveConverterBase +struct ReceiveConverterBase { - friend T; -public: - auto operator()(const proto::Plugin_ret& message) + auto operator()(const proto::PluginResponse& message) { - return std::tuple{ arg.version(), arg.plugin_hash() }; + return std::tuple{ message.version(), message.plugin_hash() }; } }; template -class SendConverterBase +struct SendConverterBase { - friend T -public: auto operator()(const cura::plugins::proto::SlotID& slot_id, auto&&... args) { - proto::Plugin_args msg{}; - msg.set_id(arg); - return std::make_shared(msg); + proto::PluginRequest msg{}; + msg.set_id(slot_id); + return std::make_shared(msg); } }; @@ -67,21 +63,19 @@ class SendConverterBase template class converter_base { - friend T; -public: auto operator()(auto& arg, auto&&... args) { if constexpr (std::is_same_v) { - proto::Plugin_args msg{}; + proto::PluginRequest msg{}; msg.set_id(arg); - return std::make_shared(msg); + return std::make_shared(msg); } - else if constexpr (std::is_same_v) + else if constexpr (std::is_same_v) { return std::tuple{ arg.version(), arg.plugin_hash() }; } - return std::make_shared(); + return std::make_shared(); //return static_cast(*this).make(arg, std::forward(args)...); } }; diff --git a/src/Application.cpp b/src/Application.cpp index 56c3175a54..d874f9c474 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -254,8 +254,8 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { // TODO: remove this - plugins::Slots::instance().set({ "127.0.0.1", 50010 }); - auto x = plugins::Slots::instance().get(); + plugins::Slots::instance().set({ "127.0.0.1", 50010 }); + auto x = plugins::Slots::instance().get(); auto y = x(); } From 474027de2091f4dd3f4e0e476cf3c575334950c5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 13:54:50 +0200 Subject: [PATCH 019/470] Refactor SlotProxy to use gRPC - Remove Arcus::Socket and Arcus::SocketListener related code - Add includes for agrpc/grpc_context.hpp, boost/asio/awaitable.hpp, agrpc/asio_grpc.hpp, boost/asio/co_spawn.hpp, boost/asio/detached.hpp, grpcpp/client_context.h, grpcpp/create_channel.h - Add includes for plugin.grpc.pb.h and plugin.pb.h - Update SlotProxy constructor to use gRPC [CURA-10475] --- include/plugins/slotproxy.h | 138 ++++++++---------------------------- 1 file changed, 31 insertions(+), 107 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 027fcad04e..1a74f3977e 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,75 +4,27 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H #define CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H +#include +#include #include #include -#include -#include +#include +#include +#include +#include +#include #include -#include #include +#include "plugin.grpc.pb.h" +#include "plugin.pb.h" #include "plugins/types.h" #include "plugins/validator.h" -#include "plugin.pb.h" - namespace cura::plugins { -namespace detail -{ -template -class PluginListener : public Arcus::SocketListener -{ -public: - using validator_t = Validator; - using receive_t = Receiver; - - bool msgReceived() noexcept - { - bool msg_received = msg_received_; - msg_received_ = false; - return msg_received; - } - -private: - std::shared_ptr validator_{}; - receive_t receiver_{}; - bool msg_received_{ false }; - -public: - explicit PluginListener(std::shared_ptr validator) noexcept : validator_{ validator_ } - { - } - - void stateChanged(Arcus::SocketState) override{}; - - void messageReceived() override - { -// auto message = getSocket()->takeNextMessage(); -// -// if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") -// { -// auto* msg = dynamic_cast(message.get()); -// cura::plugins::proto::Plugin_ret mm {}; -// auto x = converter_(mm); -//// validator_->version = semver::from_string(version); -//// validator_->plugin_hash = plugin_hash; -// spdlog::info("Plugin version: {}", validator_->version.to_string()); -// } -// else if (message->GetTypeName() == receive_t::default_instance().GetTypeName()) -// { -// // unblock plugin -// } - }; - - void error(const Arcus::Error& error) override{}; -}; - -} // namespace detail - template class SlotProxy { @@ -81,69 +33,41 @@ class SlotProxy using receive_t = Receiver; using send_t = Sender; using validator_t = Validator; - using listener_t = detail::PluginListener; static inline constexpr plugins::SlotID slot_id{ Slot }; - //std::shared_ptr validator; - private: -// std::unique_ptr socket_; -// listener_t* listener_; // FIXME: in Arcus use smart_ptr for listeners otherwise we need to add a deconstructor in this class and that forces us to define the big 6 -// receiver_t receiver_{}; -// sender_t sender_{}; + // receiver_t receiver_{}; + // sender_t sender_{}; public: SlotProxy(const std::string& ip, int port) -// validator{ std::make_shared() }, -// socket_{ std::make_unique() } -// listener_{ new listener_t(validator) } { - // Add the listener -// socket_->addListener(listener_); -// -// // Register all receiving message types -// socket_->registerMessageType(&plugins::proto::PluginRequest::default_instance()); -// socket_->registerMessageType(&receive_t::default_instance()); -// -// // Connect to the plugin -// spdlog::info("Connecting to plugin at {}:{}", ip, port); -// socket_->connect(ip, port); -// while (socket_->getState() == Arcus::SocketState::Connecting || socket_->getState() == Arcus::SocketState::Opening) -// { -// std::this_thread::sleep_for(std::chrono::milliseconds{ 100 }); // TODO: Fix magic number -// // TODO: Add timeout??? Is this blocking even necessary? -// } - -// converters::simplify_converter_fn convvvvv{}; - -// SlotID slotId { SlotID::SIMPLIFY }; -// auto x = convvvvv(slotId); -// -// proto::PluginRequest args{}; -// args.set_id(slot_id); - -// socket_->sendMessage(std::make_shared(args)); -// if (listener_->msgReceived()) -// { -// auto message = socket_->takeNextMessage(); -// if (message->GetTypeName() == "cura.plugins.proto.Plugin_ret") -// { -//// auto* msg = dynamic_cast(message.get()); -//// validator->version = semver::from_string(msg->version()); -//// validator->plugin_hash = msg->plugin_hash(); -//// spdlog::info("Plugin version: {}", validator->version.to_string()); -// } -// } - // - // No need to wait for the response, since the listener will set the version + grpc::Status status; + proto::Plugin::Stub plugin_stub(grpc::CreateChannel(ip + ":" + std::to_string(port), grpc::InsecureChannelCredentials())); + agrpc::GrpcContext grpc_context; + + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; + grpc::ClientContext client_context{}; + proto::PluginRequest request{}; + request.set_id(slot_id); + proto::PluginResponse response{}; + status = co_await RPC::request(grpc_context, plugin_stub, client_context, request, response, boost::asio::use_awaitable); + spdlog::info("Received response from plugin: {}", response.DebugString()); + }, + boost::asio::detached); + grpc_context.run(); } auto operator()(auto&&... args) { - if (true)//validator && socket_->getState() == Arcus::SocketState::Connected) + if (true) // validator && socket_->getState() == Arcus::SocketState::Connected) { -// socket_->sendMessage(converter_(std::forward(args)...)); + // socket_->sendMessage(converter_(std::forward(args)...)); // TODO: Block until message is received // TODO: Convert return message to actual return value return 1; // FIXME: This is not correct From 8ea8818640c8b1f1b15fc3e842c6f999982de6eb Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 15 May 2023 14:03:35 +0200 Subject: [PATCH 020/470] Refactor SlotProxy to store plugin_stub_ and status_ - Add member variables plugin_stub_ and status_ - Update SlotProxy constructor to initialize plugin_stub_ - Update co_spawn lambda to use plugin_stub_ and status_ member variables [CURA-10475] --- include/plugins/slotproxy.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 1a74f3977e..ef641ccfc0 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -40,12 +40,13 @@ class SlotProxy // receiver_t receiver_{}; // sender_t sender_{}; + proto::Plugin::Stub plugin_stub_; + grpc::Status status_; + public: - SlotProxy(const std::string& ip, int port) + SlotProxy(const std::string& ip, int port) : plugin_stub_(grpc::CreateChannel(ip + ":" + std::to_string(port), grpc::InsecureChannelCredentials())) { - grpc::Status status; - proto::Plugin::Stub plugin_stub(grpc::CreateChannel(ip + ":" + std::to_string(port), grpc::InsecureChannelCredentials())); - agrpc::GrpcContext grpc_context; + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? boost::asio::co_spawn( grpc_context, @@ -56,7 +57,7 @@ class SlotProxy proto::PluginRequest request{}; request.set_id(slot_id); proto::PluginResponse response{}; - status = co_await RPC::request(grpc_context, plugin_stub, client_context, request, response, boost::asio::use_awaitable); + status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); spdlog::info("Received response from plugin: {}", response.DebugString()); }, boost::asio::detached); From 83e256f2cd39e35d6d16b0ed9709e1297f3cc617 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 15 May 2023 14:56:21 +0200 Subject: [PATCH 021/470] Fix copyright date in printLicense --- src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application.cpp b/src/Application.cpp index d874f9c474..5a559667d9 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -147,7 +147,7 @@ void Application::printLicense() const { fmt::print("\n"); fmt::print("Cura_SteamEngine version {}\n", CURA_ENGINE_VERSION); - fmt::print("Copyright (C) 2022 Ultimaker\n"); + fmt::print("Copyright (C) 2023 Ultimaker\n"); fmt::print("\n"); fmt::print("This program is free software: you can redistribute it and/or modify\n"); fmt::print("it under the terms of the GNU Affero General Public License as published by\n"); From 1025f12b895fa856cb5b49c09cfa5709feab83a9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Mon, 15 May 2023 14:27:29 +0200 Subject: [PATCH 022/470] Rework converters into separeted (send,receive) concepted closures. Work in progress! Just adjusted the types.h, the rest of the code has been changed underneath of me anyway (since we now have about 3 to 4 devs on the same piece of code) -- Need to make it work afterwards. This change, if it works properly, should simplify everything, since you only need to specify two 'loose' functions that get typechecked properly by the concepting. part of CURA-10475 --- include/plugins/types.h | 109 ++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/include/plugins/types.h b/include/plugins/types.h index 4f1983aa99..0bb03cf098 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -16,6 +16,9 @@ namespace cura::plugins { using SlotID = proto::SlotID; +using MessageIn = proto::PluginResponse; +using MessageOut = proto::PluginRequest; +using MessageOutPtr = std::shared_ptr; namespace details { @@ -35,63 +38,44 @@ struct CharRangeLiteral namespace converters { -template -struct ReceiveConverterBase +template +concept ReceiveCallable = requires(C callable, MessageIn message) { - auto operator()(const proto::PluginResponse& message) - { - return std::tuple{ message.version(), message.plugin_hash() }; - } + { callable(message) } -> std::same_as; +}; + +template +concept SendCallable = requires(C callable, S... args) +{ + { callable(args...) } -> std::same_as; }; -template -struct SendConverterBase +const auto receive_slot_id { - auto operator()(const cura::plugins::proto::SlotID& slot_id, auto&&... args) + [](const MessageIn& message) { - proto::PluginRequest msg{}; - msg.set_id(slot_id); - return std::make_shared(msg); + return std::tuple{ message.version(), message.plugin_hash() }; } }; +static_assert(ReceiveCallable>); -//class SimplifyReceiveConverter : ReceiveConverterBase<> -//{ -// -//}; - -template -class converter_base +const auto send_slot_id { - auto operator()(auto& arg, auto&&... args) + [](const cura::plugins::proto::SlotID& slot_id) { - if constexpr (std::is_same_v) - { - proto::PluginRequest msg{}; - msg.set_id(arg); - return std::make_shared(msg); - } - else if constexpr (std::is_same_v) - { - return std::tuple{ arg.version(), arg.plugin_hash() }; - } - return std::make_shared(); - //return static_cast(*this).make(arg, std::forward(args)...); + MessageOut message{}; + message.set_id(slot_id); + return std::make_shared(message); } }; +static_assert(SendCallable); -template -class simplify_converter_fn : public converter_base> +const auto receive_simplify { -public: - using receive_t = Receive; - using send_t = Send; - -private: - Polygons make(const Receive& args) + [](const MessageIn& message) { Polygons poly{}; - for (const auto& paths : args.polygons().paths()) + for (const auto& paths : message.polygons().paths()) { Polygon p{}; for (const auto& point : paths.path()) @@ -102,15 +86,19 @@ class simplify_converter_fn : public converter_base); - std::shared_ptr make(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) +const auto send_simplify +{ + [](const Polygons& polygons, const size_t max_deviation, const size_t max_angle) { - Send args{}; - args.set_max_deviation(max_deviation); - args.set_max_angle(max_angle); + MessageOut message{}; + message.set_max_deviation(max_deviation); + message.set_max_angle(max_angle); for (const auto& polygon : polygons.paths) { - auto poly = args.polygons(); + auto poly = message.polygons(); for (const auto& path : polygons.paths) { auto* p = poly.add_paths(); @@ -122,34 +110,33 @@ class simplify_converter_fn : public converter_base(args); + return std::make_shared(message); } }; +static_assert(SendCallable); -template -class postprocess_converter_fn : public converter_base> +const auto receive_postprocess { -public: - using receive_t = Receive; - using send_t = Send; - - std::string make(const Receive& args) + [](const MessageIn& message) { - return args.gcode(); + return message.gcode(); } +}; +static_assert(ReceiveCallable); - std::shared_ptr make(const std::string& gcode) +const auto send_postprocess +{ + [](const std::string& gcode) { - Send args{}; - args.set_gcode(gcode); - return std::make_shared(args); + MessageOut message{}; + message.set_gcode(gcode); + return std::make_shared(message); } }; +static_assert(SendCallable); } // namespace converters - } // namespace cura::plugins - #endif // CURAENGINE_INCLUDE_PLUGINS_TYPES_H From 5b188e7f7862d16859bd02a4c57e04a24c59c4a6 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Mon, 15 May 2023 20:03:32 +0200 Subject: [PATCH 023/470] Fix complilation of asio (boost) on windows. Otherwise it'll complain about the winsock header being included already. done as part of CURA-10475 --- include/utils/gettime.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/utils/gettime.h b/include/utils/gettime.h index b2c8088a97..52bc73556a 100644 --- a/include/utils/gettime.h +++ b/include/utils/gettime.h @@ -5,6 +5,7 @@ #define GETTIME_H #ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN 1 #include #else #ifdef USE_CPU_TIME From 656cc375e1dfb255433fd1dbaf57f5f0a266c508 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Mon, 15 May 2023 23:52:08 +0200 Subject: [PATCH 024/470] More work on converters. The things we receive and send aren't plain protobuf messages of course, adapt the concepts and the rest of the types.h code to fit that reality. part of CURA-10475 --- include/plugins/slotproxy.h | 2 +- include/plugins/slots.h | 4 ++-- include/plugins/types.h | 47 ++++++++++++++++++------------------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index ef641ccfc0..c2f2bafd8f 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -25,7 +25,7 @@ namespace cura::plugins { -template +template class SlotProxy { public: diff --git a/include/plugins/slots.h b/include/plugins/slots.h index c0c03f13e1..40f87f5f89 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -18,8 +18,8 @@ namespace cura::plugins { -using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::ReceiveConverterBase, converters::SendConverterBase>; -using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::ReceiveConverterBase, converters::SendConverterBase>; +using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::receive_simplify, converters::send_simplify>; +using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::receive_postprocess, converters::send_postprocess>; using slots_t = std::variant; diff --git a/include/plugins/types.h b/include/plugins/types.h index 0bb03cf098..71aeb36e08 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -16,9 +16,6 @@ namespace cura::plugins { using SlotID = proto::SlotID; -using MessageIn = proto::PluginResponse; -using MessageOut = proto::PluginRequest; -using MessageOutPtr = std::shared_ptr; namespace details { @@ -38,41 +35,43 @@ struct CharRangeLiteral namespace converters { -template -concept ReceiveCallable = requires(C callable, MessageIn message) +template +concept ReceiveCallable = requires(C callable, M message) { { callable(message) } -> std::same_as; + std::is_base_of_v; }; -template +template concept SendCallable = requires(C callable, S... args) { - { callable(args...) } -> std::same_as; + { callable(args...) } -> std::same_as>; + std::is_base_of_v; }; const auto receive_slot_id { - [](const MessageIn& message) + [](const proto::PluginResponse& message) { return std::tuple{ message.version(), message.plugin_hash() }; } }; -static_assert(ReceiveCallable>); +static_assert(ReceiveCallable>); const auto send_slot_id { [](const cura::plugins::proto::SlotID& slot_id) { - MessageOut message{}; + proto::PluginRequest message{}; message.set_id(slot_id); - return std::make_shared(message); + return std::make_shared(message); } }; -static_assert(SendCallable); +static_assert(SendCallable); const auto receive_simplify { - [](const MessageIn& message) + [](const proto::SimplifyResponse& message) { Polygons poly{}; for (const auto& paths : message.polygons().paths()) @@ -87,13 +86,13 @@ const auto receive_simplify return poly; } }; -static_assert(ReceiveCallable); +static_assert(ReceiveCallable); const auto send_simplify { [](const Polygons& polygons, const size_t max_deviation, const size_t max_angle) { - MessageOut message{}; + proto::SimplifyRequest message{}; message.set_max_deviation(max_deviation); message.set_max_angle(max_angle); for (const auto& polygon : polygons.paths) @@ -110,30 +109,30 @@ const auto send_simplify } } } - return std::make_shared(message); + return std::make_shared(message); } }; -static_assert(SendCallable); +static_assert(SendCallable); const auto receive_postprocess { - [](const MessageIn& message) + [](const proto::PostprocessResponse& message) { - return message.gcode(); + return message.gcode_word(); } }; -static_assert(ReceiveCallable); +static_assert(ReceiveCallable); const auto send_postprocess { [](const std::string& gcode) { - MessageOut message{}; - message.set_gcode(gcode); - return std::make_shared(message); + proto::PostprocessRequest message{}; + message.set_gcode_word(gcode); + return std::make_shared(message); } }; -static_assert(SendCallable); +static_assert(SendCallable); } // namespace converters From 185cc85c47cf6ce4941371e96de6e7ef6d1ed430 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 08:26:49 +0200 Subject: [PATCH 025/470] Refactor slot proxies to use grpc stubs - Replace ip and port parameters with a shared grpc channel - Add a stub template parameter to each slot proxy type - Use the stub to call the corresponding grpc service method - Remove unused receiver and sender members from slot proxy [CURA-10475] --- include/plugins/slotproxy.h | 10 +++++----- include/plugins/slots.h | 4 ++-- src/Application.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index c2f2bafd8f..c341fefd72 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -25,7 +26,7 @@ namespace cura::plugins { -template +template class SlotProxy { public: @@ -33,18 +34,17 @@ class SlotProxy using receive_t = Receiver; using send_t = Sender; using validator_t = Validator; + using stub_t = Stub; static inline constexpr plugins::SlotID slot_id{ Slot }; private: - // receiver_t receiver_{}; - // sender_t sender_{}; - proto::Plugin::Stub plugin_stub_; + stub_t process_stub_; grpc::Status status_; public: - SlotProxy(const std::string& ip, int port) : plugin_stub_(grpc::CreateChannel(ip + ":" + std::to_string(port), grpc::InsecureChannelCredentials())) + SlotProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) { agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 40f87f5f89..982232e15a 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -18,8 +18,8 @@ namespace cura::plugins { -using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::receive_simplify, converters::send_simplify>; -using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, converters::receive_postprocess, converters::send_postprocess>; +using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Simplify::Stub, converters::receive_simplify, converters::send_simplify>; +using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, converters::receive_postprocess, converters::send_postprocess>; using slots_t = std::variant; diff --git a/src/Application.cpp b/src/Application.cpp index 5a559667d9..8c84219276 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -254,7 +254,7 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { // TODO: remove this - plugins::Slots::instance().set({ "127.0.0.1", 50010 }); + plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 5555), grpc::InsecureChannelCredentials())); auto x = plugins::Slots::instance().get(); auto y = x(); } From 419c3616fff7d3ed4094e73dcabe7b84dc15aa1c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 09:03:15 +0200 Subject: [PATCH 026/470] Refactor SlotProxy template arguments and move concepts to utils - Move ReceiveCallable and SendCallable concepts to utils/concepts/generic.h and rename them to receive_callable and send_callable - Change SlotProxy template arguments to use class types instead of concepts - Add missing includes in slotproxy.h and generic.h - Reformat simplify_slot and postprocess_slot definitions in slots.h [CURA-10475] --- include/plugins/slotproxy.h | 7 +++++-- include/plugins/slots.h | 12 ++++++++++-- include/plugins/types.h | 27 +++++++-------------------- include/utils/concepts/generic.h | 16 ++++++++++++++++ 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index c341fefd72..b8b0a8e93d 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -12,9 +12,9 @@ #include #include #include +#include #include #include -#include #include #include @@ -26,7 +26,7 @@ namespace cura::plugins { -template +template class SlotProxy { public: @@ -39,6 +39,9 @@ class SlotProxy static inline constexpr plugins::SlotID slot_id{ Slot }; private: + receive_t receive_conv_ {}; + send_t send_conv_{}; + validator_t valid_{}; proto::Plugin::Stub plugin_stub_; stub_t process_stub_; grpc::Status status_; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 982232e15a..1dc5837baa 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -18,8 +18,16 @@ namespace cura::plugins { -using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Simplify::Stub, converters::receive_simplify, converters::send_simplify>; -using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, converters::receive_postprocess, converters::send_postprocess>; +using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, + proto::Simplify::Stub, + decltype(converters::receive_simplify), + decltype(converters::send_simplify)>; +using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, + proto::Postprocess::Stub, + decltype(converters::receive_postprocess), + decltype(converters::send_postprocess)>; using slots_t = std::variant; diff --git a/include/plugins/types.h b/include/plugins/types.h index 71aeb36e08..c0b1e7b6b0 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -9,6 +9,7 @@ #include #include "utils/IntPoint.h" +#include "utils/concepts/generic.h" #include "utils/polygon.h" #include "plugin.grpc.pb.h" @@ -35,20 +36,6 @@ struct CharRangeLiteral namespace converters { -template -concept ReceiveCallable = requires(C callable, M message) -{ - { callable(message) } -> std::same_as; - std::is_base_of_v; -}; - -template -concept SendCallable = requires(C callable, S... args) -{ - { callable(args...) } -> std::same_as>; - std::is_base_of_v; -}; - const auto receive_slot_id { [](const proto::PluginResponse& message) @@ -56,7 +43,7 @@ const auto receive_slot_id return std::tuple{ message.version(), message.plugin_hash() }; } }; -static_assert(ReceiveCallable>); +static_assert(receive_callable>); const auto send_slot_id { @@ -67,7 +54,7 @@ const auto send_slot_id return std::make_shared(message); } }; -static_assert(SendCallable); +static_assert(send_callable); const auto receive_simplify { @@ -86,7 +73,7 @@ const auto receive_simplify return poly; } }; -static_assert(ReceiveCallable); +static_assert(receive_callable); const auto send_simplify { @@ -112,7 +99,7 @@ const auto send_simplify return std::make_shared(message); } }; -static_assert(SendCallable); +static_assert(send_callable); const auto receive_postprocess { @@ -121,7 +108,7 @@ const auto receive_postprocess return message.gcode_word(); } }; -static_assert(ReceiveCallable); +static_assert(receive_callable); const auto send_postprocess { @@ -132,7 +119,7 @@ const auto send_postprocess return std::make_shared(message); } }; -static_assert(SendCallable); +static_assert(send_callable); } // namespace converters diff --git a/include/utils/concepts/generic.h b/include/utils/concepts/generic.h index 309c5c115f..523d681db0 100644 --- a/include/utils/concepts/generic.h +++ b/include/utils/concepts/generic.h @@ -7,6 +7,8 @@ #include #include +#include + namespace cura { template @@ -14,6 +16,20 @@ concept hashable = requires(T value) { { std::hash{}(value) } -> concepts::convertible_to; }; + +template +concept receive_callable = requires(C callable, M message) +{ + { callable(message) } -> std::same_as; + std::is_base_of_v; +}; + +template +concept send_callable = requires(C callable, S... args) +{ + { callable(args...) } -> std::same_as>; + std::is_base_of_v; +}; } // namespace cura #endif // CURAENGINE_GENERIC_H From de783c41a17ba3fdac818defa7a94123f634de4b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 09:37:26 +0200 Subject: [PATCH 027/470] Use constexpr [CURA-10475] --- include/plugins/types.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/plugins/types.h b/include/plugins/types.h index c0b1e7b6b0..8db6303bc2 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -36,7 +36,7 @@ struct CharRangeLiteral namespace converters { -const auto receive_slot_id +constexpr auto receive_slot_id { [](const proto::PluginResponse& message) { @@ -45,7 +45,7 @@ const auto receive_slot_id }; static_assert(receive_callable>); -const auto send_slot_id +constexpr auto send_slot_id { [](const cura::plugins::proto::SlotID& slot_id) { @@ -56,7 +56,7 @@ const auto send_slot_id }; static_assert(send_callable); -const auto receive_simplify +constexpr auto receive_simplify { [](const proto::SimplifyResponse& message) { @@ -75,7 +75,7 @@ const auto receive_simplify }; static_assert(receive_callable); -const auto send_simplify +constexpr auto send_simplify { [](const Polygons& polygons, const size_t max_deviation, const size_t max_angle) { @@ -101,7 +101,7 @@ const auto send_simplify }; static_assert(send_callable); -const auto receive_postprocess +constexpr auto receive_postprocess { [](const proto::PostprocessResponse& message) { @@ -110,7 +110,7 @@ const auto receive_postprocess }; static_assert(receive_callable); -const auto send_postprocess +constexpr auto send_postprocess { [](const std::string& gcode) { From ee5d4023e46c8f47761a0573d08e6111e3de3b6f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 11:52:31 +0200 Subject: [PATCH 028/470] Reworked converters The used proto types are needed in the slotproxy instead of sending that type info twice, the simple closures had to be replaced with a slightly heavier one. - Placed converters in their own header - Use structs - Update slotproxy to use these converters [CURA-10475] --- include/plugins/converters.h | 127 +++++++++++++++++++++++++++++++++++ include/plugins/slotproxy.h | 25 ++++--- include/plugins/slots.h | 9 +-- include/plugins/types.h | 90 ------------------------- 4 files changed, 147 insertions(+), 104 deletions(-) create mode 100644 include/plugins/converters.h diff --git a/include/plugins/converters.h b/include/plugins/converters.h new file mode 100644 index 0000000000..46259a851e --- /dev/null +++ b/include/plugins/converters.h @@ -0,0 +1,127 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PLUGINS_CONVERTERS_H +#define PLUGINS_CONVERTERS_H + +#include + +#include "plugin.grpc.pb.h" +#include "plugins/types.h" + +namespace cura::plugins +{ + +namespace details +{ +template +struct plugin_request +{ + using value_type = Request; + + auto operator()(const cura::plugins::proto::SlotID& slot_id) const + { + proto::PluginRequest message{}; + message.set_id(slot_id); + return std::make_shared(message); + } +}; + +template +struct plugin_response +{ + using value_type = Response; + + auto operator()(const value_type& message) const + { + return std::make_pair( message.version(), message.plugin_hash() ); + } +}; + +template +struct simplify_request +{ + using value_type = Request; + + auto operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const + { + proto::SimplifyRequest message{}; + message.set_max_deviation(max_deviation); + message.set_max_angle(max_angle); + for (const auto& polygon : polygons.paths) + { + auto poly = message.polygons(); + for (const auto& path : polygons.paths) + { + auto* p = poly.add_paths(); + for (const auto& point : path) + { + auto* pt = p->add_path(); + pt->set_x(point.X); + pt->set_y(point.Y); + } + } + } + return std::make_shared(message); + } +}; + +template +struct simplify_response +{ + using value_type = Response; + + auto operator()(const value_type& message) const + { + Polygons poly{}; + for (const auto& paths : message.polygons().paths()) + { + Polygon p{}; + for (const auto& point : paths.path()) + { + p.add(Point{ point.y(), point.y() }); + } + poly.add(p); + } + return poly; + } +}; + +template +struct postprocess_request +{ + using value_type = Request; + + auto operator()(const std::string& gcode) const + { + proto::PostprocessRequest message{}; + message.set_gcode_word(gcode); + return std::make_shared(message); + } +}; + +template +struct postprocess_response +{ + using value_type = Response; + + auto operator()(const value_type& message) const + { + return message.gcode_word(); + } +}; + +} // namespace details + + +using plugin_request_t = details::plugin_request; +using plugin_response_t = details::plugin_response; +using simplify_request_t = details::simplify_request; +using simplify_response_t = details::simplify_request; +using postprocess_request_t = details::postprocess_request; +using postprocess_response_t = details::postprocess_response; + +} // namespace cura::plugins + + +#endif diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index b8b0a8e93d..e39ff7541d 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -18,29 +18,34 @@ #include #include -#include "plugin.grpc.pb.h" -#include "plugin.pb.h" #include "plugins/types.h" #include "plugins/validator.h" +#include "plugins/converters.h" + +#include "plugin.grpc.pb.h" namespace cura::plugins { -template +template class SlotProxy { public: // type aliases for easy use - using receive_t = Receiver; - using send_t = Sender; + using request_plugin_t = typename plugin_request_t::value_type; + using response_plugin_t = typename plugin_response_t::value_type; + using request_converter_t = Request; + using request_process_t = typename Request::value_type; + using response_converter_t = Response; + using response_process_t = typename Response::value_type; using validator_t = Validator; using stub_t = Stub; static inline constexpr plugins::SlotID slot_id{ Slot }; private: - receive_t receive_conv_ {}; - send_t send_conv_{}; + request_converter_t request_converter_{}; + response_converter_t response_converter_{}; validator_t valid_{}; proto::Plugin::Stub plugin_stub_; stub_t process_stub_; @@ -49,7 +54,7 @@ class SlotProxy public: SlotProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? boost::asio::co_spawn( grpc_context, @@ -57,9 +62,9 @@ class SlotProxy { using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; grpc::ClientContext client_context{}; - proto::PluginRequest request{}; + request_plugin_t request{}; request.set_id(slot_id); - proto::PluginResponse response{}; + response_plugin_t response{}; status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); spdlog::info("Received response from plugin: {}", response.DebugString()); }, diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 1dc5837baa..35f7a2f0be 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -14,6 +14,7 @@ #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" +#include "plugins/converters.h" namespace cura::plugins { @@ -21,13 +22,13 @@ namespace cura::plugins using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Simplify::Stub, - decltype(converters::receive_simplify), - decltype(converters::send_simplify)>; + simplify_request_t, + simplify_response_t>; using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, - decltype(converters::receive_postprocess), - decltype(converters::send_postprocess)>; + postprocess_request_t, + postprocess_response_t>; using slots_t = std::variant; diff --git a/include/plugins/types.h b/include/plugins/types.h index 8db6303bc2..3c3c1b9f02 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -33,96 +33,6 @@ struct CharRangeLiteral } // namespace details -namespace converters -{ - -constexpr auto receive_slot_id -{ - [](const proto::PluginResponse& message) - { - return std::tuple{ message.version(), message.plugin_hash() }; - } -}; -static_assert(receive_callable>); - -constexpr auto send_slot_id -{ - [](const cura::plugins::proto::SlotID& slot_id) - { - proto::PluginRequest message{}; - message.set_id(slot_id); - return std::make_shared(message); - } -}; -static_assert(send_callable); - -constexpr auto receive_simplify -{ - [](const proto::SimplifyResponse& message) - { - Polygons poly{}; - for (const auto& paths : message.polygons().paths()) - { - Polygon p{}; - for (const auto& point : paths.path()) - { - p.add(Point{ point.y(), point.y() }); - } - poly.add(p); - } - return poly; - } -}; -static_assert(receive_callable); - -constexpr auto send_simplify -{ - [](const Polygons& polygons, const size_t max_deviation, const size_t max_angle) - { - proto::SimplifyRequest message{}; - message.set_max_deviation(max_deviation); - message.set_max_angle(max_angle); - for (const auto& polygon : polygons.paths) - { - auto poly = message.polygons(); - for (const auto& path : polygons.paths) - { - auto* p = poly.add_paths(); - for (const auto& point : path) - { - auto* pt = p->add_path(); - pt->set_x(point.X); - pt->set_y(point.Y); - } - } - } - return std::make_shared(message); - } -}; -static_assert(send_callable); - -constexpr auto receive_postprocess -{ - [](const proto::PostprocessResponse& message) - { - return message.gcode_word(); - } -}; -static_assert(receive_callable); - -constexpr auto send_postprocess -{ - [](const std::string& gcode) - { - proto::PostprocessRequest message{}; - message.set_gcode_word(gcode); - return std::make_shared(message); - } -}; -static_assert(send_callable); - -} // namespace converters - } // namespace cura::plugins #endif // CURAENGINE_INCLUDE_PLUGINS_TYPES_H From 73048fa62f724f762b562e4d8dbbd4195f618a51 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 11:59:56 +0200 Subject: [PATCH 029/470] operator implementation Doesn't compile yet but shows intent, how the SlotProxy, converters and protobuf message could work. [CURA-10475] --- include/plugins/slotproxy.h | 25 +++++++++++++++++-------- src/Application.cpp | 3 ++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index e39ff7541d..194054b2c1 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -18,9 +18,9 @@ #include #include +#include "plugins/converters.h" #include "plugins/types.h" #include "plugins/validator.h" -#include "plugins/converters.h" #include "plugin.grpc.pb.h" @@ -74,13 +74,22 @@ class SlotProxy auto operator()(auto&&... args) { - if (true) // validator && socket_->getState() == Arcus::SocketState::Connected) - { - // socket_->sendMessage(converter_(std::forward(args)...)); - // TODO: Block until message is received - // TODO: Convert return message to actual return value - return 1; // FIXME: This is not correct - } + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; + grpc::ClientContext client_context{}; + request_process_t request{ request_converter_(std::forward(args)...) }; + response_process_t response{}; + status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); + spdlog::info("Received response from plugin: {}", response.DebugString()); + }, + boost::asio::detached); + grpc_context.run(); + return 1; // FIXME: handle plugin not connected } }; diff --git a/src/Application.cpp b/src/Application.cpp index 8c84219276..a34fe5696b 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -256,7 +256,8 @@ void Application::registerPlugins() // TODO: remove this plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 5555), grpc::InsecureChannelCredentials())); auto x = plugins::Slots::instance().get(); - auto y = x(); + Polygons poly; + auto y = x(poly, 100, 100); } } // namespace cura \ No newline at end of file From d444e9a1218d89a6fe71abed7e2e641d4d1cd2e5 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 16 May 2023 15:33:36 +0200 Subject: [PATCH 030/470] Remove templating for converters, make compile again. Co-authored-by: Casper Lamboo Co-authored-by: Jelle Spijker --- include/plugins/converters.h | 36 +++++++++--------------------------- include/plugins/slotproxy.h | 34 +++++++++++++++++----------------- include/plugins/slots.h | 8 ++++---- 3 files changed, 30 insertions(+), 48 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 46259a851e..dec0e88e60 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -12,25 +12,21 @@ namespace cura::plugins { -namespace details -{ -template struct plugin_request { - using value_type = Request; + using value_type = proto::PluginRequest; auto operator()(const cura::plugins::proto::SlotID& slot_id) const { - proto::PluginRequest message{}; + value_type message{}; message.set_id(slot_id); return std::make_shared(message); } }; -template struct plugin_response { - using value_type = Response; + using value_type = proto::PluginResponse; auto operator()(const value_type& message) const { @@ -38,14 +34,13 @@ struct plugin_response } }; -template struct simplify_request { - using value_type = Request; + using value_type = proto::SimplifyRequest; auto operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const { - proto::SimplifyRequest message{}; + value_type message{}; message.set_max_deviation(max_deviation); message.set_max_angle(max_angle); for (const auto& polygon : polygons.paths) @@ -66,10 +61,9 @@ struct simplify_request } }; -template struct simplify_response { - using value_type = Response; + using value_type = proto::SimplifyResponse; auto operator()(const value_type& message) const { @@ -87,23 +81,21 @@ struct simplify_response } }; -template struct postprocess_request { - using value_type = Request; + using value_type = proto::PostprocessRequest; auto operator()(const std::string& gcode) const { - proto::PostprocessRequest message{}; + value_type message{}; message.set_gcode_word(gcode); return std::make_shared(message); } }; -template struct postprocess_response { - using value_type = Response; + using value_type = proto::PostprocessResponse; auto operator()(const value_type& message) const { @@ -111,16 +103,6 @@ struct postprocess_response } }; -} // namespace details - - -using plugin_request_t = details::plugin_request; -using plugin_response_t = details::plugin_response; -using simplify_request_t = details::simplify_request; -using simplify_response_t = details::simplify_request; -using postprocess_request_t = details::postprocess_request; -using postprocess_response_t = details::postprocess_response; - } // namespace cura::plugins diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 194054b2c1..4eacf9322a 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -32,8 +32,8 @@ class SlotProxy { public: // type aliases for easy use - using request_plugin_t = typename plugin_request_t::value_type; - using response_plugin_t = typename plugin_response_t::value_type; + using request_plugin_t = typename plugin_request::value_type; + using response_plugin_t = typename plugin_response::value_type; using request_converter_t = Request; using request_process_t = typename Request::value_type; using response_converter_t = Response; @@ -74,21 +74,21 @@ class SlotProxy auto operator()(auto&&... args) { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - boost::asio::co_spawn( - grpc_context, - [&]() -> boost::asio::awaitable - { - using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; - grpc::ClientContext client_context{}; - request_process_t request{ request_converter_(std::forward(args)...) }; - response_process_t response{}; - status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); - spdlog::info("Received response from plugin: {}", response.DebugString()); - }, - boost::asio::detached); - grpc_context.run(); + //agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + + //boost::asio::co_spawn( + // grpc_context, + // [&]() -> boost::asio::awaitable + // { + // using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; + // grpc::ClientContext client_context{}; + // request_process_t request{ request_converter_(std::forward(args)...) }; + // response_process_t response{}; + // status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); + // spdlog::info("Received response from plugin: {}", response.DebugString()); + // }, + // boost::asio::detached); + //grpc_context.run(); return 1; // FIXME: handle plugin not connected } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 35f7a2f0be..a68d830064 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -22,13 +22,13 @@ namespace cura::plugins using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Simplify::Stub, - simplify_request_t, - simplify_response_t>; + simplify_request, + simplify_response>; using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, - postprocess_request_t, - postprocess_response_t>; + postprocess_request, + postprocess_response>; using slots_t = std::variant; From b20d222cc3a082f55a7afc60088d42efd2096cbd Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 16 May 2023 16:29:44 +0200 Subject: [PATCH 031/470] Fix install on macOS CURA-10475 --- conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index d87d83b840..1dc0be75b3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -58,6 +58,7 @@ def configure(self): self.options["grpc"].php_plugin = False self.options["grpc"].python_plugin = False self.options["grpc"].ruby_plugin = False + self.options["asio-grpc"].local_allocator = "recycling_allocator" if self.options.enable_arcus: self.options["arcus"].shared = True @@ -80,7 +81,7 @@ def requirements(self): if self.options.enable_arcus: self.requires("arcus/(latest)@ultimaker/cura_10475") self.requires("clipper/6.4.2") - self.requires("boost/1.79.0") + self.requires("boost/1.81.0") self.requires("rapidjson/1.1.0") self.requires("stb/20200203") self.requires("spdlog/1.10.0") From 46fbb9cfd52e2af5df2cec4d623a27b078f65c7a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 16:35:09 +0200 Subject: [PATCH 032/470] Add support for async prepare in slotproxy Refactor slot proxy and converters for plugins - Reorder include headers in alphabetical order - Add Prepare template parameter to SlotProxy class - Use value_type instead of shared_ptr in Converter class - Uncomment grpc_context in SlotProxy operator() [CURA-10475] --- include/plugins/converters.h | 4 ++-- include/plugins/slotproxy.h | 35 +++++++++++++++++------------------ include/plugins/slots.h | 7 +++++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index dec0e88e60..d2df1e34a7 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -16,11 +16,11 @@ struct plugin_request { using value_type = proto::PluginRequest; - auto operator()(const cura::plugins::proto::SlotID& slot_id) const + value_type operator()(const cura::plugins::proto::SlotID& slot_id) const { value_type message{}; message.set_id(slot_id); - return std::make_shared(message); + return message; } }; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 4eacf9322a..d2a1452f23 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,11 +4,11 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H #define CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H -#include -#include #include #include +#include +#include #include #include #include @@ -27,7 +27,7 @@ namespace cura::plugins { -template +template class SlotProxy { public: @@ -74,21 +74,20 @@ class SlotProxy auto operator()(auto&&... args) { - //agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - //boost::asio::co_spawn( - // grpc_context, - // [&]() -> boost::asio::awaitable - // { - // using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; - // grpc::ClientContext client_context{}; - // request_process_t request{ request_converter_(std::forward(args)...) }; - // response_process_t response{}; - // status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); - // spdlog::info("Received response from plugin: {}", response.DebugString()); - // }, - // boost::asio::detached); - //grpc_context.run(); + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + grpc::ClientContext client_context{}; + request_process_t request {};// { request_converter_(std::forward(args)...) }; + response_process_t response{}; + status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); + spdlog::info("Received response from plugin: {}", response.DebugString()); + }, + boost::asio::detached); + grpc_context.run(); return 1; // FIXME: handle plugin not connected } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index a68d830064..4c225a1d20 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -9,24 +9,27 @@ #include #include -#include "plugin.grpc.pb.h" -#include "plugin.pb.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" #include "plugins/converters.h" +#include "plugin.grpc.pb.h" +#include "plugin.pb.h" + namespace cura::plugins { using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Simplify::Stub, + agrpc::RPC<&proto::Simplify::Stub::PrepareAsyncSimplify>, simplify_request, simplify_response>; using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, + agrpc::RPC<&proto::Postprocess::Stub::PrepareAsyncPostprocess>, postprocess_request, postprocess_response>; From 05609db7c90616b1d07912c6cd9c5f5a7894acc5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 16 May 2023 16:38:12 +0200 Subject: [PATCH 033/470] Fix request converter usage in slot proxy - Use value_type instead of shared_ptr in Converter classes - Pass converted request to Prepare::request in SlotProxy operator() [CURA-10475] --- include/plugins/converters.h | 8 ++++---- include/plugins/slotproxy.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index d2df1e34a7..4c3bb166dd 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -38,7 +38,7 @@ struct simplify_request { using value_type = proto::SimplifyRequest; - auto operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const + value_type operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const { value_type message{}; message.set_max_deviation(max_deviation); @@ -57,7 +57,7 @@ struct simplify_request } } } - return std::make_shared(message); + return message; } }; @@ -85,11 +85,11 @@ struct postprocess_request { using value_type = proto::PostprocessRequest; - auto operator()(const std::string& gcode) const + value_type operator()(const std::string& gcode) const { value_type message{}; message.set_gcode_word(gcode); - return std::make_shared(message); + return message; } }; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index d2a1452f23..7a1b884963 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -81,7 +81,7 @@ class SlotProxy [&]() -> boost::asio::awaitable { grpc::ClientContext client_context{}; - request_process_t request {};// { request_converter_(std::forward(args)...) }; + request_process_t request { request_converter_(std::forward(args)...) }; response_process_t response{}; status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); spdlog::info("Received response from plugin: {}", response.DebugString()); From e25cf92731b25dad864d389cc078bc9869da7f97 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 16 May 2023 17:07:45 +0200 Subject: [PATCH 034/470] Correctly initialise points CURA-10475 --- include/plugins/converters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index dec0e88e60..4c73df6043 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -73,7 +73,7 @@ struct simplify_response Polygon p{}; for (const auto& point : paths.path()) { - p.add(Point{ point.y(), point.y() }); + p.add(Point{ point.x(), point.y() }); } poly.add(p); } From 5b1643b8ab4163e0457412e66f282c29b304c386 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 08:06:52 +0200 Subject: [PATCH 035/470] Refactor validator and simplify slot classes - Change validator from struct to class and add constructor - Add TODO comment for hash and other checks - Change version range for simplify slot validator - Rename variables and add log messages in application and slotproxy [CURA-10475] --- include/plugins/slotproxy.h | 42 +++++++++++++++++++++---------------- include/plugins/slots.h | 2 +- include/plugins/validator.h | 27 ++++++++++++++---------- src/Application.cpp | 9 ++++---- 4 files changed, 46 insertions(+), 34 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 7a1b884963..85d51e7b9e 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -62,11 +62,15 @@ class SlotProxy { using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; grpc::ClientContext client_context{}; - request_plugin_t request{}; - request.set_id(slot_id); + plugin_request plugin_request_conv{}; + request_plugin_t request{ plugin_request_conv(slot_id) }; response_plugin_t response{}; status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); - spdlog::info("Received response from plugin: {}", response.DebugString()); + plugin_response plugin_response_conv{}; + auto [version, _] = plugin_response_conv( response ); + spdlog::debug("Received response from plugin: {}", response.DebugString()); + valid_ = Validator{ version }; + spdlog::info("Plugin: {} validated: {}", slot_id, static_cast(valid_)); }, boost::asio::detached); grpc_context.run(); @@ -74,21 +78,23 @@ class SlotProxy auto operator()(auto&&... args) { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - boost::asio::co_spawn( - grpc_context, - [&]() -> boost::asio::awaitable - { - grpc::ClientContext client_context{}; - request_process_t request { request_converter_(std::forward(args)...) }; - response_process_t response{}; - status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); - spdlog::info("Received response from plugin: {}", response.DebugString()); - }, - boost::asio::detached); - grpc_context.run(); - + if (valid_) + { + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + grpc::ClientContext client_context{}; + request_process_t request{ request_converter_(std::forward(args)...) }; + response_process_t response{}; + status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); + spdlog::info("Received response from plugin: {}", response.DebugString()); + }, + boost::asio::detached); + grpc_context.run(); + } return 1; // FIXME: handle plugin not connected } }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 4c225a1d20..85dfde53d6 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -21,7 +21,7 @@ namespace cura::plugins { using simplify_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, + Validator<"<=0.0.1", "qwerty-azerty-temp-hash">, proto::Simplify::Stub, agrpc::RPC<&proto::Simplify::Stub::PrepareAsyncSimplify>, simplify_request, diff --git a/include/plugins/validator.h b/include/plugins/validator.h index 48ff6e8b69..6f436d129f 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H -#define CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H +#ifndef PLUGINS_VALIDATOR_H +#define PLUGINS_VALIDATOR_H #include "plugins/types.h" @@ -11,22 +11,27 @@ namespace cura::plugins { - +// TODO: Implement hash and other checks template -struct Validator +class Validator { - semver::version version{ "1.0.0" }; - std::string_view plugin_hash{}; - bool include_prerelease{ false }; - semver::range::detail::range version_range{ VersionRange.value }; +public: + constexpr Validator() noexcept = default; + constexpr explicit Validator(std::string_view version) : version_{ version }, valid_{ version_range_.satisfies(version_, include_prerelease_) } {}; constexpr operator bool() const noexcept { - // TODO: Add proper security checking - return version_range.satisfies(version, include_prerelease) && plugin_hash == PluginHash.value; + return valid_; } + +private: + semver::version version_{ "1.0.0" }; + std::string_view plugin_hash_{}; + bool include_prerelease_{ false }; + semver::range::detail::range version_range_{ VersionRange.value }; + bool valid_{ false }; }; } // namespace cura::plugins -#endif // CURAENGINE_INCLUDE_PLUGINS_VALIDATOR_H +#endif // PLUGINS_VALIDATOR_H diff --git a/src/Application.cpp b/src/Application.cpp index a34fe5696b..af8991eaa3 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -254,10 +254,11 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { // TODO: remove this - plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 5555), grpc::InsecureChannelCredentials())); - auto x = plugins::Slots::instance().get(); - Polygons poly; - auto y = x(poly, 100, 100); + plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 50010), grpc::InsecureChannelCredentials())); + auto simplify_plugin = plugins::Slots::instance().get(); + Polygons poly{}; + auto x = simplify_plugin(poly, 100, 100); + spdlog::info("simplified poly received"); } } // namespace cura \ No newline at end of file From fd6b31eb690d7e5fbfd1c08014d0a0f9d4adce36 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 08:26:06 +0200 Subject: [PATCH 036/470] Use native types for plugin converters - Add native_value_type aliases for plugin request and response types - Use native types in converter operators and slot proxy operator - Add a test polygon in application - Reorder include headers in slot proxy [CURA-10475] --- include/plugins/converters.h | 20 +++++++++++++------- include/plugins/slotproxy.h | 31 ++++++++++++++++++++----------- src/Application.cpp | 1 + 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 68552ba417..646a4d0018 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -15,8 +15,9 @@ namespace cura::plugins struct plugin_request { using value_type = proto::PluginRequest; + using native_value_type = cura::plugins::SlotID; - value_type operator()(const cura::plugins::proto::SlotID& slot_id) const + value_type operator()(const native_value_type & slot_id) const { value_type message{}; message.set_id(slot_id); @@ -27,8 +28,9 @@ struct plugin_request struct plugin_response { using value_type = proto::PluginResponse; + using native_value_type = std::pair; - auto operator()(const value_type& message) const + native_value_type operator()(const value_type& message) const { return std::make_pair( message.version(), message.plugin_hash() ); } @@ -37,8 +39,9 @@ struct plugin_response struct simplify_request { using value_type = proto::SimplifyRequest; + using native_value_type = Polygons; - value_type operator()(const Polygons& polygons, const size_t max_deviation, const size_t max_angle) const + value_type operator()(const native_value_type& polygons, const size_t max_deviation, const size_t max_angle) const { value_type message{}; message.set_max_deviation(max_deviation); @@ -64,10 +67,11 @@ struct simplify_request struct simplify_response { using value_type = proto::SimplifyResponse; + using native_value_type = Polygons; - auto operator()(const value_type& message) const + native_value_type operator()(const value_type& message) const { - Polygons poly{}; + native_value_type poly{}; for (const auto& paths : message.polygons().paths()) { Polygon p{}; @@ -84,8 +88,9 @@ struct simplify_response struct postprocess_request { using value_type = proto::PostprocessRequest; + using native_value_type = std::string; - value_type operator()(const std::string& gcode) const + value_type operator()(const native_value_type& gcode) const { value_type message{}; message.set_gcode_word(gcode); @@ -96,8 +101,9 @@ struct postprocess_request struct postprocess_response { using value_type = proto::PostprocessResponse; + using native_value_type = std::string; - auto operator()(const value_type& message) const + native_value_type operator()(const value_type& message) const { return message.gcode_word(); } diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 85d51e7b9e..094756646b 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -7,9 +7,9 @@ #include #include -#include -#include #include +#include +#include #include #include #include @@ -32,25 +32,32 @@ class SlotProxy { public: // type aliases for easy use + using value_type = typename Response::native_value_type; + using request_plugin_t = typename plugin_request::value_type; using response_plugin_t = typename plugin_response::value_type; - using request_converter_t = Request; + using request_process_t = typename Request::value_type; - using response_converter_t = Response; using response_process_t = typename Response::value_type; + + using request_converter_t = Request; + using response_converter_t = Response; + using validator_t = Validator; - using stub_t = Stub; + using process_stub_t = Stub; static inline constexpr plugins::SlotID slot_id{ Slot }; private: + validator_t valid_{}; request_converter_t request_converter_{}; response_converter_t response_converter_{}; - validator_t valid_{}; - proto::Plugin::Stub plugin_stub_; - stub_t process_stub_; + grpc::Status status_; + proto::Plugin::Stub plugin_stub_; + process_stub_t process_stub_; + public: SlotProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) { @@ -67,7 +74,7 @@ class SlotProxy response_plugin_t response{}; status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); plugin_response plugin_response_conv{}; - auto [version, _] = plugin_response_conv( response ); + auto [version, _] = plugin_response_conv(response); spdlog::debug("Received response from plugin: {}", response.DebugString()); valid_ = Validator{ version }; spdlog::info("Plugin: {} validated: {}", slot_id, static_cast(valid_)); @@ -76,8 +83,9 @@ class SlotProxy grpc_context.run(); } - auto operator()(auto&&... args) + value_type operator()(auto&&... args) { + value_type ret_value {}; if (valid_) { agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? @@ -91,11 +99,12 @@ class SlotProxy response_process_t response{}; status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); spdlog::info("Received response from plugin: {}", response.DebugString()); + ret_value = response_converter_(response); }, boost::asio::detached); grpc_context.run(); } - return 1; // FIXME: handle plugin not connected + return ret_value; // FIXME: handle plugin not connected } }; diff --git a/src/Application.cpp b/src/Application.cpp index af8991eaa3..3b1a1cd103 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -257,6 +257,7 @@ void Application::registerPlugins() plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 50010), grpc::InsecureChannelCredentials())); auto simplify_plugin = plugins::Slots::instance().get(); Polygons poly{}; + poly.paths = {{0,1}, {2,3}, {4,5}}; auto x = simplify_plugin(poly, 100, 100); spdlog::info("simplified poly received"); } From bc61987635234455e0bfe0633cd4ea04311d88ea Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 10:12:17 +0200 Subject: [PATCH 037/470] Throw on validator and communication errors Validator: Added a member variable semver_range_ to store the version range Moved the version_range_ member variable to semver_range_ Added a valid_version() function to check if the version satisfies the range Added a getVersion() function to retrieve the version as a string SlotProxy: Added an #include directive for Added exception handling for plugin validation and communication errors Throws a std::runtime_error if the plugin version is invalid or cannot be validated Throws a std::runtime_error if communication with the plugin fails Improved log messages for plugin responses These changes improve the error handling and validation in the SlotProxy class. [CURA-10475] --- include/plugins/slotproxy.h | 27 ++++++++++++++++++++++++--- include/plugins/validator.h | 25 ++++++++++++++++++------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 094756646b..35991633fa 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,6 +4,7 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H #define CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H +#include #include #include @@ -12,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -75,17 +77,31 @@ class SlotProxy status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); plugin_response plugin_response_conv{}; auto [version, _] = plugin_response_conv(response); - spdlog::debug("Received response from plugin: {}", response.DebugString()); + spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); valid_ = Validator{ version }; spdlog::info("Plugin: {} validated: {}", slot_id, static_cast(valid_)); }, boost::asio::detached); grpc_context.run(); + + if (! valid_) + { + if (! valid_.valid_version()) + { + throw std::runtime_error(fmt::format("Could not validate plugin '{}' due to an invalid version '{}', expected '{}'!", slot_id, valid_.getVersion(), valid_.version_range)); + } + throw std::runtime_error(fmt::format("Could not validate plugin '{}' for an unknown reason!", slot_id)); + } + + if (! status_.ok()) + { + throw std::runtime_error(fmt::format("Communication with plugin '{}' {}", slot_id, status_.error_message())); + } } value_type operator()(auto&&... args) { - value_type ret_value {}; + value_type ret_value{}; if (valid_) { agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? @@ -98,12 +114,17 @@ class SlotProxy request_process_t request{ request_converter_(std::forward(args)...) }; response_process_t response{}; status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); - spdlog::info("Received response from plugin: {}", response.DebugString()); + spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); ret_value = response_converter_(response); }, boost::asio::detached); grpc_context.run(); } + + if (! status_.ok()) + { + throw std::runtime_error(fmt::format("Communication with plugin '{}' failed, due: {}", slot_id, status_.error_message())); + } return ret_value; // FIXME: handle plugin not connected } }; diff --git a/include/plugins/validator.h b/include/plugins/validator.h index 6f436d129f..c074ddbda0 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -15,21 +15,32 @@ namespace cura::plugins template class Validator { + semver::range::detail::range semver_range_{ VersionRange.value }; + semver::version version_{ "1.0.0" }; + std::string_view plugin_hash_{}; + bool include_prerelease_{ false }; + bool valid_{ false }; + public: constexpr Validator() noexcept = default; - constexpr explicit Validator(std::string_view version) : version_{ version }, valid_{ version_range_.satisfies(version_, include_prerelease_) } {}; + constexpr explicit Validator(std::string_view version) : version_{ version }, valid_{ valid_version() } {}; constexpr operator bool() const noexcept { return valid_; } -private: - semver::version version_{ "1.0.0" }; - std::string_view plugin_hash_{}; - bool include_prerelease_{ false }; - semver::range::detail::range version_range_{ VersionRange.value }; - bool valid_{ false }; + [[nodiscard]] constexpr bool valid_version() const + { + return semver_range_.satisfies(version_, include_prerelease_); + } + + std::string getVersion() const + { + return version_.to_string(); + } + + static inline constexpr std::string_view version_range{ VersionRange.value }; }; } // namespace cura::plugins From 8d8ed12836dbcc4a9556cfd5fc73d4868d913056 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 13:54:16 +0200 Subject: [PATCH 038/470] Allow for default behaviour if no plugin is used This commit updates the plugin registration in the Application class in the Application.cpp file. The changes include: Adding support for default functions in the simplify_slot and postprocess_slot classes. Creating a slot_registry typedef to hold the slots for simplification and post-processing. Conditionally registering the simplify_slot based on whether the front-end starts a plugin. Registering the postprocess_slot unconditionally. Demonstrating the usage of the simplify_slot by invoking it with sample data. These changes allow for flexible plugin registration and usage in the application. Note: Further modifications may be required based on the specific requirements and configuration of the application. [CURA-10475] --- include/plugins/converters.h | 16 ++++++++------ include/plugins/slotproxy.h | 25 +++++++++++++++++++-- include/plugins/slots.h | 42 +++++++++++++++++++++++------------- plugin.proto | 10 ++++----- src/Application.cpp | 38 ++++++++++++++++++++++++++++---- 5 files changed, 98 insertions(+), 33 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 646a4d0018..e65ae58ed6 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -17,7 +17,7 @@ struct plugin_request using value_type = proto::PluginRequest; using native_value_type = cura::plugins::SlotID; - value_type operator()(const native_value_type & slot_id) const + value_type operator()(const native_value_type& slot_id) const { value_type message{}; message.set_id(slot_id); @@ -32,7 +32,7 @@ struct plugin_response native_value_type operator()(const value_type& message) const { - return std::make_pair( message.version(), message.plugin_hash() ); + return std::make_pair(message.version(), message.plugin_hash()); } }; @@ -41,17 +41,19 @@ struct simplify_request using value_type = proto::SimplifyRequest; using native_value_type = Polygons; - value_type operator()(const native_value_type& polygons, const size_t max_deviation, const size_t max_angle) const + value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const { value_type message{}; - message.set_max_deviation(max_deviation); - message.set_max_angle(max_angle); + message.set_max_resolution(max_resolution); + message.set_max_deviation(max_resolution); + message.set_max_area_deviation(max_resolution); for (const auto& polygon : polygons.paths) { - auto poly = message.polygons(); + auto* poly = message.mutable_polygons(); for (const auto& path : polygons.paths) { - auto* p = poly.add_paths(); + auto p = poly->add_paths(); + for (const auto& point : path) { auto* pt = p->add_path(); diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 35991633fa..45d5f94216 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -30,7 +30,7 @@ namespace cura::plugins { template -class SlotProxy +class PluginProxy { public: // type aliases for easy use @@ -61,7 +61,7 @@ class SlotProxy process_stub_t process_stub_; public: - SlotProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) + PluginProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) { agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? @@ -129,6 +129,27 @@ class SlotProxy } }; +template +class SlotProxy +{ + std::optional> plugin_{ std::nullopt }; + +public: + static inline constexpr plugins::SlotID slot_id{ Slot }; + + constexpr SlotProxy() noexcept = default; + SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; + + auto operator()(auto&&... args) + { + if (plugin_.has_value()) + { + return std::invoke(plugin_.value(), std::forward(args)...); + } + return std::invoke(Default, std::forward(args)...); + } +}; + } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 85dfde53d6..250f6a8877 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -1,43 +1,56 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTS_H -#define CURAENGINE_INCLUDE_PLUGINS_SLOTS_H +#ifndef PLUGINS_SLOTS_H +#define PLUGINS_SLOTS_H #include -#include #include #include +#include +#include + +#include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" -#include "plugins/converters.h" #include "plugin.grpc.pb.h" #include "plugin.pb.h" +#include "utils/Simplify.h" // TODO: remove need for including implementation headers + namespace cura::plugins { +//namespace details +//{ +//constexpr auto process_default = [](auto&& args...){ return std::forward(args); }; +//} +template using simplify_slot = SlotProxy, proto::Simplify::Stub, agrpc::RPC<&proto::Simplify::Stub::PrepareAsyncSimplify>, simplify_request, - simplify_response>; + simplify_response, + Default>; + +template using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, agrpc::RPC<&proto::Postprocess::Stub::PrepareAsyncPostprocess>, postprocess_request, - postprocess_response>; - -using slots_t = std::variant; - + postprocess_response, + Default>; +template class Slots { + using slots_t = std::variant;//, Postprocess>; + constexpr Slots() noexcept = default; std::unordered_map slots_{}; @@ -51,18 +64,17 @@ class Slots return instance; } - template - constexpr void set(T&& plugin) + constexpr void set(auto&& plugin) { - slots_.emplace(T::slot_id, std::forward(plugin)); + slots_.emplace(plugin.slot_id, std::forward(plugin)); } - template + template constexpr auto get() const { - return std::get(slots_.at(T::slot_id)); + return std::get(slots_.at(SlotID)); } }; } // namespace cura::plugins -#endif // CURAENGINE_INCLUDE_PLUGINS_SLOTS_H +#endif // PLUGINS_SLOTS_H diff --git a/plugin.proto b/plugin.proto index dba2fea2f2..39a15fb0bb 100644 --- a/plugin.proto +++ b/plugin.proto @@ -10,9 +10,8 @@ package cura.plugins.proto; // These are the different slots that plugins can hook into enum SlotID { - UNKNOWN = 0; - SIMPLIFY = 1; - POSTPROCESS = 2; + SIMPLIFY = 0; + POSTPROCESS = 1; } // --------------------------------------------------------------------- @@ -55,8 +54,9 @@ service Simplify { message SimplifyRequest { Polygons polygons = 1; - uint64 max_deviation = 2; - uint64 max_angle = 3; + uint64 max_resolution = 2; + uint64 max_deviation = 3; + uint64 max_area_deviation = 4; } // The SIMPLIFY slot response message diff --git a/src/Application.cpp b/src/Application.cpp index 3b1a1cd103..ff23770e21 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -251,14 +251,44 @@ void Application::startThreadPool(int nworkers) thread_pool = new ThreadPool(nthreads); } + + + void Application::registerPlugins() { // TODO: remove this - plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 50010), grpc::InsecureChannelCredentials())); - auto simplify_plugin = plugins::Slots::instance().get(); + + auto host = "localhost"; + auto port = 50010; + + constexpr auto simplify_default = [](const Polygons& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) + { + const Simplify simplify{ max_resolution, max_deviation, max_area_deviation }; + return simplify.polygon(polygons); + }; + using simplify_t = plugins::simplify_slot; + + constexpr auto postprocess_default = [](std::string word){ return word; }; + using postprocess_t = plugins::postprocess_slot; + + using slot_registry = plugins::Slots; + + if (true) // determine wat to register depending if front-end starts a plugin + { + slot_registry::instance().set(simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + } + else + { + slot_registry::instance().set(simplify_t{}); + } + slot_registry::instance().set(postprocess_t{}); + + auto simplify_plugin = slot_registry::instance().get(); Polygons poly{}; - poly.paths = {{0,1}, {2,3}, {4,5}}; - auto x = simplify_plugin(poly, 100, 100); + Polygon p{}; + p.poly = {{0,1}, {2,3}, {4,5}}; + poly.add(p); + auto x = simplify_plugin(poly, 100, 200, 300); spdlog::info("simplified poly received"); } From 04c177b02cead363ea452f0c054f4b5094fcc28b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 16:42:55 +0200 Subject: [PATCH 039/470] Use curaengine_grpc_definitions conan package [plugin.proto] Remove plugin.proto and related definitions This commit removes the plugin.proto file and its related definitions. The file contained definitions for plugin identification and validation, as well as messages and services for the SIMPLIFY and POSTPROCESS slots. These definitions are no longer needed and can be removed from the codebase. [conanfile.py] Add dependency on curaengine_grpc_definitions This commit adds a new dependency on the curaengine_grpc_definitions package. The package provides the latest gRPC definitions for CuraEngine plugins. This dependency is necessary for proper integration with the plugin system and ensures that the correct gRPC definitions are available during the build process. [include/plugins/slots.h] Update gRPC include paths This commit updates the include paths for gRPC headers in the slots.h file. It replaces the previous inclusion of "plugin.grpc.pb.h" with "simplify.grpc.pb.h" and "postprocess.grpc.pb.h". This change reflects the updated structure of the gRPC definitions and ensures that the correct headers are included for the SIMPLIFY and POSTPROCESS slots. [include/plugins/converters.h] Update gRPC include paths This commit updates the include paths for gRPC headers in the converters.h file. It replaces the previous inclusion of "plugin.grpc.pb.h" with "simplify.grpc.pb.h" and "postprocess.grpc.pb.h". This change reflects the updated structure of the gRPC definitions and ensures that the correct headers are included for the SIMPLIFY and POSTPROCESS slots. [CMakeLists.txt] Update gRPC protos variable This commit updates the GRPC_PROTOS variable in CMakeLists.txt. The variable now contains a list of all gRPC definitions provided by the curaengine_grpc_definitions package. The list is used during the build process to generate the necessary code for gRPC services and messages. The updated variable ensures that all required gRPC definitions are included in the build. [CURA-10475] --- CMakeLists.txt | 6 +-- conanfile.py | 5 +++ include/plugins/converters.h | 3 +- include/plugins/slots.h | 3 +- plugin.proto | 81 ------------------------------------ 5 files changed, 12 insertions(+), 86 deletions(-) delete mode 100644 plugin.proto diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bc58a4ed5..4a006328c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,8 @@ option(ENABLE_TESTING "Build with unit tests" OFF) option(EXTENSIVE_WARNINGS "Build with all warnings" ON) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) - +#set(GRPC_PROTOS "List of all gRPC definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") +message(STATUS ${GRPC_PROTOS}) # Generate the plugin types find_package(protobuf REQUIRED) @@ -22,8 +23,7 @@ asio_grpc_protobuf_generate( GENERATE_GRPC GENERATE_MOCK_CODE OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" - IMPORT_DIRS "${CMAKE_CURRENT_LIST_DIR}" - PROTOS "${CMAKE_CURRENT_LIST_DIR}/plugin.proto" + PROTOS "${GRPC_PROTOS}" ) if (ENABLE_ARCUS) diff --git a/conanfile.py b/conanfile.py index 1dc0be75b3..926154d084 100644 --- a/conanfile.py +++ b/conanfile.py @@ -2,6 +2,7 @@ # CuraEngine is released under the terms of the AGPLv3 or higher from os import path +from pathlib import Path from conan import ConanFile from conan.errors import ConanInvalidConfiguration @@ -93,6 +94,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") def generate(self): deps = CMakeDeps(self) @@ -104,6 +106,9 @@ def generate(self): tc.variables["ENABLE_TESTING"] = self.options.enable_testing tc.variables["ENABLE_BENCHMARKS"] = self.options.enable_benchmarks tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings + cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info + tc.variables["GRPC_PROTOS"] = ";".join([str(p) for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) + tc.generate() def layout(self): diff --git a/include/plugins/converters.h b/include/plugins/converters.h index e65ae58ed6..dc618e9c65 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -6,8 +6,9 @@ #include -#include "plugin.grpc.pb.h" #include "plugins/types.h" +#include "simplify.grpc.pb.h" +#include "postprocess.grpc.pb.h" namespace cura::plugins { diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 250f6a8877..1bddb0641f 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -17,7 +17,8 @@ #include "plugins/validator.h" #include "plugin.grpc.pb.h" -#include "plugin.pb.h" +#include "simplify.grpc.pb.h" +#include "postprocess.grpc.pb.h" #include "utils/Simplify.h" // TODO: remove need for including implementation headers diff --git a/plugin.proto b/plugin.proto deleted file mode 100644 index 39a15fb0bb..0000000000 --- a/plugin.proto +++ /dev/null @@ -1,81 +0,0 @@ -syntax = "proto3"; - -package cura.plugins.proto; - -// TODO: Move proto defintions to a separate repo -// TODO: Add error propagation -// TODO: Add progress reporting -// TODO: Add priority queueing (if multiple plugins are hooked up to the slot) - - -// These are the different slots that plugins can hook into -enum SlotID { - SIMPLIFY = 0; - POSTPROCESS = 1; -} - -// --------------------------------------------------------------------- -// This is the message which is sent to the plugin to request identification -service Plugin { - rpc Identify(PluginRequest) returns (PluginResponse) {} -} - -message PluginRequest { - SlotID id = 1; -} - -// This is the message which is sent back to CuraEngine to identify and validate the plugin -message PluginResponse { - string plugin_hash = 1; - string version = 2; -} - -// --------------------------------------------------------------------- -// Some basic types that are used in the messages below -message Point_2d { - sint64 x = 1; - sint64 y = 2; -} - -message Polygon { - repeated Point_2d path = 1; -} - -message Polygons { - repeated Polygon paths = 1; -} - -// --------------------------------------------------------------------- -// The SIMPLIFY slot request message - -service Simplify { - rpc Simplify(SimplifyRequest) returns (SimplifyResponse) {} -} - -message SimplifyRequest { - Polygons polygons = 1; - uint64 max_resolution = 2; - uint64 max_deviation = 3; - uint64 max_area_deviation = 4; -} - -// The SIMPLIFY slot response message -message SimplifyResponse { - Polygons polygons = 1; -} - -// --------------------------------------------------------------------- -// The POSTPROCESS slot request message - -service Postprocess { - rpc Postprocess(PostprocessRequest) returns (PostprocessResponse) {} -} - -message PostprocessRequest { - string gcode_word = 1; -} - -// The POSTPROCESS slot response message -message PostprocessResponse { - string gcode_word = 1; -} \ No newline at end of file From 9ffebb37e0bbe5806f3ed9dfbca2ab3dedf07479 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 17:05:26 +0200 Subject: [PATCH 040/470] Move pluginproxy to seperate header include/utils/concepts/generic.h: The concept definition hashable is updated to use the std::convertible_to concept instead of concepts::convertible_to which likely caused a compilation error. include/plugins/slots.h: Unused includes for range/v3 and simplify.grpc.pb.h are removed. The commented-out code block related to details::process_default is removed. A comment mentioning the removal of the need for implementation headers is added as a TODO reminder. Some formatting changes are made for code readability. include/plugins/slotproxy.h: The unnecessary include guards and includes for , , , , , , , , , , and are removed. The unused plugin.grpc.pb.h include is removed. Formatting changes are made for code readability. src/Application.cpp: The missing include is added to fix a compilation error related to creating a gRPC channel. No other changes were made in this file. [CURA-10475] --- include/plugins/pluginproxy.h | 119 ++++++++++++++++++++++++++++++ include/plugins/slotproxy.h | 121 ++----------------------------- include/plugins/slots.h | 11 +-- include/utils/concepts/generic.h | 2 +- src/Application.cpp | 1 + 5 files changed, 128 insertions(+), 126 deletions(-) create mode 100644 include/plugins/pluginproxy.h diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h new file mode 100644 index 0000000000..6c25d6996f --- /dev/null +++ b/include/plugins/pluginproxy.h @@ -0,0 +1,119 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PLUGINS_PLUGINPROXY_H +#define PLUGINS_PLUGINPROXY_H + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "plugin.grpc.pb.h" + +namespace cura::plugins +{ + +template Validator, class Stub, class Prepare, class Request, class Response> +class PluginProxy +{ +public: + // type aliases for easy use + using value_type = typename Response::native_value_type; + + using request_plugin_t = typename plugin_request::value_type; + using response_plugin_t = typename plugin_response::value_type; + + using request_process_t = typename Request::value_type; + using response_process_t = typename Response::value_type; + + using request_converter_t = Request; + using response_converter_t = Response; + + using validator_t = Validator; + using process_stub_t = Stub; + + static inline constexpr plugins::SlotID slot_id{ Slot }; + +private: + validator_t valid_{}; + request_converter_t request_converter_{}; + response_converter_t response_converter_{}; + + grpc::Status status_; + + proto::Plugin::Stub plugin_stub_; + process_stub_t process_stub_; + +public: + PluginProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) + { + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; + grpc::ClientContext client_context{}; + plugin_request plugin_request_conv{}; + request_plugin_t request{ plugin_request_conv(slot_id) }; + response_plugin_t response{}; + status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); + plugin_response plugin_response_conv{}; + auto [version, _] = plugin_response_conv(response); + spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); + valid_ = Validator{ version }; + spdlog::info("Plugin: {} validated: {}", slot_id, static_cast(valid_)); + }, + boost::asio::detached); + grpc_context.run(); + + if (! valid_) + { + throw std::runtime_error(fmt::format("Could not validate plugin '{}'", slot_id)); + } + + if (! status_.ok()) + { + throw std::runtime_error(fmt::format("Communication with plugin '{}' {}", slot_id, status_.error_message())); + } + } + + value_type operator()(auto&&... args) + { + value_type ret_value{}; + if (valid_) + { + agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? + + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + grpc::ClientContext client_context{}; + request_process_t request{ request_converter_(std::forward(args)...) }; + response_process_t response{}; + status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); + spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); + ret_value = response_converter_(response); + }, + boost::asio::detached); + grpc_context.run(); + } + + if (! status_.ok()) + { + throw std::runtime_error(fmt::format("Communication with plugin '{}' failed, due: {}", slot_id, status_.error_message())); + } + return ret_value; // FIXME: handle plugin not connected + } +}; +} // namespace cura::plugins + +#endif // PLUGINS_PLUGINPROXY_H diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 45d5f94216..a677a622c1 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -1,134 +1,23 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H -#define CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H +#ifndef PLUGINS_SLOTPROXY_H +#define PLUGINS_SLOTPROXY_H -#include #include #include +#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include #include "plugins/converters.h" +#include "plugins/pluginproxy.h" #include "plugins/types.h" #include "plugins/validator.h" -#include "plugin.grpc.pb.h" - namespace cura::plugins { -template -class PluginProxy -{ -public: - // type aliases for easy use - using value_type = typename Response::native_value_type; - - using request_plugin_t = typename plugin_request::value_type; - using response_plugin_t = typename plugin_response::value_type; - - using request_process_t = typename Request::value_type; - using response_process_t = typename Response::value_type; - - using request_converter_t = Request; - using response_converter_t = Response; - - using validator_t = Validator; - using process_stub_t = Stub; - - static inline constexpr plugins::SlotID slot_id{ Slot }; - -private: - validator_t valid_{}; - request_converter_t request_converter_{}; - response_converter_t response_converter_{}; - - grpc::Status status_; - - proto::Plugin::Stub plugin_stub_; - process_stub_t process_stub_; - -public: - PluginProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) - { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - boost::asio::co_spawn( - grpc_context, - [&]() -> boost::asio::awaitable - { - using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; - grpc::ClientContext client_context{}; - plugin_request plugin_request_conv{}; - request_plugin_t request{ plugin_request_conv(slot_id) }; - response_plugin_t response{}; - status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); - plugin_response plugin_response_conv{}; - auto [version, _] = plugin_response_conv(response); - spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); - valid_ = Validator{ version }; - spdlog::info("Plugin: {} validated: {}", slot_id, static_cast(valid_)); - }, - boost::asio::detached); - grpc_context.run(); - - if (! valid_) - { - if (! valid_.valid_version()) - { - throw std::runtime_error(fmt::format("Could not validate plugin '{}' due to an invalid version '{}', expected '{}'!", slot_id, valid_.getVersion(), valid_.version_range)); - } - throw std::runtime_error(fmt::format("Could not validate plugin '{}' for an unknown reason!", slot_id)); - } - - if (! status_.ok()) - { - throw std::runtime_error(fmt::format("Communication with plugin '{}' {}", slot_id, status_.error_message())); - } - } - - value_type operator()(auto&&... args) - { - value_type ret_value{}; - if (valid_) - { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - boost::asio::co_spawn( - grpc_context, - [&]() -> boost::asio::awaitable - { - grpc::ClientContext client_context{}; - request_process_t request{ request_converter_(std::forward(args)...) }; - response_process_t response{}; - status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); - spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); - ret_value = response_converter_(response); - }, - boost::asio::detached); - grpc_context.run(); - } - - if (! status_.ok()) - { - throw std::runtime_error(fmt::format("Communication with plugin '{}' failed, due: {}", slot_id, status_.error_message())); - } - return ret_value; // FIXME: handle plugin not connected - } -}; - template class SlotProxy { @@ -153,4 +42,4 @@ class SlotProxy } // namespace cura::plugins -#endif // CURAENGINE_INCLUDE_PLUGINS_SLOTPROXY_H +#endif // PLUGINS_SLOTPROXY_H diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 1bddb0641f..0aab9ec114 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -8,26 +8,19 @@ #include #include -#include -#include - #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" #include "plugin.grpc.pb.h" -#include "simplify.grpc.pb.h" #include "postprocess.grpc.pb.h" +#include "simplify.grpc.pb.h" #include "utils/Simplify.h" // TODO: remove need for including implementation headers namespace cura::plugins { -//namespace details -//{ -//constexpr auto process_default = [](auto&& args...){ return std::forward(args); }; -//} template using simplify_slot = SlotProxy class Slots { - using slots_t = std::variant;//, Postprocess>; + using slots_t = std::variant; //, Postprocess>; constexpr Slots() noexcept = default; std::unordered_map slots_{}; diff --git a/include/utils/concepts/generic.h b/include/utils/concepts/generic.h index 523d681db0..197ad918cc 100644 --- a/include/utils/concepts/generic.h +++ b/include/utils/concepts/generic.h @@ -14,7 +14,7 @@ namespace cura template concept hashable = requires(T value) { - { std::hash{}(value) } -> concepts::convertible_to; + { std::hash{}(value) } -> std::convertible_to; }; template diff --git a/src/Application.cpp b/src/Application.cpp index ff23770e21..81bc3fb078 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include From 7b9ae1253ade7d342d7e66ccba1f59c8f5697bc9 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 17:31:39 +0200 Subject: [PATCH 041/470] Refactor plugin-related code and update includes This commit makes several changes to the plugin-related code: 1. include/plugins/pluginproxy.h: - Updated the template parameters of the PluginProxy class to use grpc_convertable for Request and Response types. - This change ensures compatibility with gRPC conversion requirements. 2. include/utils/concepts/generic.h: - Renamed the include guard to UTILS_CONCEPTS_GENERIC_H to match the file name. - Updated the concept grpc_convertable to handle gRPC-specific conversion requirements. 3. include/plugins/slotproxy.h: - Added the include to use concepts in the code. - Updated the template parameters of the SlotProxy class to use grpc_convertable for Request and Response types. - This change ensures compatibility with gRPC conversion requirements. 4. include/plugins/converters.h: - Reordered the include statements for clarity. - Removed the unnecessary include for postprocess.grpc.pb.h. These changes aim to improve code clarity, ensure compatibility with gRPC conversion requirements, and update includes for consistency and readability. [CURA-10475] --- include/plugins/converters.h | 3 ++- include/plugins/pluginproxy.h | 2 +- include/plugins/slotproxy.h | 3 ++- include/utils/concepts/generic.h | 21 ++++++++------------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index dc618e9c65..90b0015dd4 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -7,8 +7,9 @@ #include #include "plugins/types.h" -#include "simplify.grpc.pb.h" + #include "postprocess.grpc.pb.h" +#include "simplify.grpc.pb.h" namespace cura::plugins { diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 6c25d6996f..d45c35835a 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,7 +19,7 @@ namespace cura::plugins { -template Validator, class Stub, class Prepare, class Request, class Response> +template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response> class PluginProxy { public: diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index a677a622c1..58aab07099 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,6 +4,7 @@ #ifndef PLUGINS_SLOTPROXY_H #define PLUGINS_SLOTPROXY_H +#include #include #include #include @@ -18,7 +19,7 @@ namespace cura::plugins { -template +template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response, auto Default> class SlotProxy { std::optional> plugin_{ std::nullopt }; diff --git a/include/utils/concepts/generic.h b/include/utils/concepts/generic.h index 197ad918cc..72c4f70dba 100644 --- a/include/utils/concepts/generic.h +++ b/include/utils/concepts/generic.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef CURAENGINE_GENERIC_H -#define CURAENGINE_GENERIC_H +#ifndef UTILS_CONCEPTS_GENERIC_H +#define UTILS_CONCEPTS_GENERIC_H #include #include @@ -17,19 +17,14 @@ concept hashable = requires(T value) { std::hash{}(value) } -> std::convertible_to; }; -template -concept receive_callable = requires(C callable, M message) +template +concept grpc_convertable = requires(T value) { - { callable(message) } -> std::same_as; - std::is_base_of_v; + requires std::semiregular; + requires std::semiregular; + requires std::semiregular; }; -template -concept send_callable = requires(C callable, S... args) -{ - { callable(args...) } -> std::same_as>; - std::is_base_of_v; -}; } // namespace cura -#endif // CURAENGINE_GENERIC_H +#endif // UTILS_CONCEPTS_GENERIC_H From f892b1b5d67074968ae1807b7f0b8052c53d462a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 17 May 2023 17:37:41 +0200 Subject: [PATCH 042/470] Prerequisites for secure validator. Have secure communication when enterprise compile flag is set. The engine and plugins will both be started with the same shibolet, a plugin will then hash this with an openly avialable public key, so the engine can check that with the private key. It's assumed that the key-pair will only have to change when there has been a security violation. part of CURA-10475 --- CMakeLists.txt | 2 ++ conanfile.py | 1 + include/Application.h | 4 +++- src/Application.cpp | 40 ++++++++++++++++++++++++++++++++++++---- 4 files changed, 42 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bc58a4ed5..09d3dce1f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) # Generate the plugin types find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) +find_package(grpc REQUIRED) asio_grpc_protobuf_generate( GENERATE_GRPC GENERATE_MOCK_CODE @@ -209,6 +210,7 @@ target_link_libraries(_CuraEngine scripta::scripta neargye-semver::neargye-semver asio-grpc::asio-grpc + grpc::grpc protobuf::libprotobuf $<$:GTest::gtest>) diff --git a/conanfile.py b/conanfile.py index 1dc0be75b3..4c8af34f10 100644 --- a/conanfile.py +++ b/conanfile.py @@ -93,6 +93,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") + self.requires("grpc/1.50.1") def generate(self): deps = CMakeDeps(self) diff --git a/include/Application.h b/include/Application.h index eaedbc79e5..13dbdc150c 100644 --- a/include/Application.h +++ b/include/Application.h @@ -14,6 +14,8 @@ class Communication; class Slice; class ThreadPool; +struct PluginSetupConfiguration; + /*! * A singleton class that serves as the starting point for all slicing. * @@ -135,7 +137,7 @@ class Application : NoCopy */ ~Application(); - void registerPlugins(); + void registerPlugins(const PluginSetupConfiguration& plugins_config); }; } //Cura namespace. diff --git a/src/Application.cpp b/src/Application.cpp index af8991eaa3..fbae3d36c5 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -3,6 +3,9 @@ #include "Application.h" +// TODO: Make this (enterprise) happen from build-system. +#define ENTERPRISE_BUILD 1 + #include #include #include @@ -25,9 +28,23 @@ #include "plugins/slots.h" +#ifdef ENTERPRISE_BUILD +#include "../secrets/private.pem.h" +#endif + namespace cura { +//TODO: Get these from the command-line and/or frontend. +struct PluginSetupConfiguration +{ +public: + std::string host = "localhost"; + uint64_t port = 50010UL; + + uint64_t shibolet = 56785678UL; // Assume both us and the plugin have been given this on start-up, in a scenario that needs more security. +} PLUGIN_CONFIG; + Application::Application() { auto dup_sink = std::make_shared(std::chrono::seconds{ 10 }); @@ -188,7 +205,7 @@ void Application::run(const size_t argc, char** argv) exit(1); } - registerPlugins(); + registerPlugins(PLUGIN_CONFIG); #ifdef ARCUS if (stringcasecompare(argv[1], "connect") == 0) @@ -251,14 +268,29 @@ void Application::startThreadPool(int nworkers) thread_pool = new ThreadPool(nthreads); } -void Application::registerPlugins() +// TODO: Where to put this in the structure, does this belong to 'Application'? +auto createChannel(const PluginSetupConfiguration& plugins_config) +{ +#ifdef ENTERPRISE_BUILD + auto creds_config = grpc::SslCredentialsOptions(); + creds_config.pem_cert_chain = "./plugins.crt"; // TODO: Release this next to the engine. (It's ok, the private one can still be inside.) + creds_config.pem_private_key = secrets::private_key; + auto channel_creds = grpc::SslCredentials(creds_config); +#else // NOT ENTERPRISE_BUILD + // TODO: Do we want security to be on always? + auto channel_creds = grpc::InsecureChannelCredentials(); +#endif + return grpc::CreateChannel(fmt::format("{}:{}", plugins_config.host, plugins_config.port), channel_creds); +} + +void Application::registerPlugins(const PluginSetupConfiguration& plugins_config) { // TODO: remove this - plugins::Slots::instance().set(grpc::CreateChannel(fmt::format("{}:{}", "localhost", 50010), grpc::InsecureChannelCredentials())); + plugins::Slots::instance().set(createChannel(plugins_config)); auto simplify_plugin = plugins::Slots::instance().get(); Polygons poly{}; auto x = simplify_plugin(poly, 100, 100); spdlog::info("simplified poly received"); } -} // namespace cura \ No newline at end of file +} // namespace cura From 2226ca0215f57ef272294004d9a170b89ae06732 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 17:55:50 +0200 Subject: [PATCH 043/470] Document the classes [CURA-10475] --- include/plugins/converters.h | 93 +++++++++++++++++++++++++++++------ include/plugins/pluginproxy.h | 50 ++++++++++++++++--- include/plugins/slotproxy.h | 39 +++++++++++++++ include/plugins/slots.h | 48 +++++++++++++++--- include/plugins/validator.h | 47 +++++++++++++++--- 5 files changed, 244 insertions(+), 33 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 90b0015dd4..ffb73d9190 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -14,11 +14,23 @@ namespace cura::plugins { +/** + * @brief A converter struct for plugin requests. + * + * The `plugin_request` struct provides a conversion function that converts a native slot ID + * to a `proto::PluginRequest` message. + */ struct plugin_request { - using value_type = proto::PluginRequest; - using native_value_type = cura::plugins::SlotID; - + using value_type = proto::PluginRequest; ///< The protobuf message type. + using native_value_type = cura::plugins::SlotID; ///< The native value type. + + /** + * @brief Converts a native slot ID to a `proto::PluginRequest` message. + * + * @param slot_id The native slot ID. + * @return The converted `proto::PluginRequest` message. + */ value_type operator()(const native_value_type& slot_id) const { value_type message{}; @@ -27,22 +39,49 @@ struct plugin_request } }; +/** + * @brief A converter struct for plugin responses. + * + * The `plugin_response` struct provides a conversion function that converts a `proto::PluginResponse` + * message to a native value type. + */ struct plugin_response { - using value_type = proto::PluginResponse; - using native_value_type = std::pair; - + using value_type = proto::PluginResponse; ///< The protobuf message type. + using native_value_type = std::pair; ///< The native value type. + + /** + * @brief Converts a `proto::PluginResponse` message to a native value type. + * + * @param message The `proto::PluginResponse` message. + * @return The converted native value. + */ native_value_type operator()(const value_type& message) const { return std::make_pair(message.version(), message.plugin_hash()); } }; +/** + * @brief A converter struct for simplify requests. + * + * The `simplify_request` struct provides a conversion function that converts native data for + * simplification (polygons and simplification parameters) to a `proto::SimplifyRequest` message. + */ struct simplify_request { - using value_type = proto::SimplifyRequest; - using native_value_type = Polygons; - + using value_type = proto::SimplifyRequest; ///< The protobuf message type. + using native_value_type = Polygons; ///< The native value type. + + /** + * @brief Converts native data for simplification to a `proto::SimplifyRequest` message. + * + * @param polygons The polygons to be simplified. + * @param max_resolution The maximum resolution for the simplified polygons. + * @param max_deviation The maximum deviation for the simplified polygons. + * @param max_area_deviation The maximum area deviation for the simplified polygons. + * @return The converted `proto::SimplifyRequest` message. + */ value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const { value_type message{}; @@ -68,11 +107,23 @@ struct simplify_request } }; +/** + * @brief A converter struct for simplify responses. + * + * The `simplify_response` struct provides a conversion function that converts a `proto::SimplifyResponse` + * message to a native value type. + */ struct simplify_response { - using value_type = proto::SimplifyResponse; - using native_value_type = Polygons; - + using value_type = proto::SimplifyResponse; ///< The protobuf message type. + using native_value_type = Polygons; ///< The native value type. + + /** + * @brief Converts a `proto::SimplifyResponse` message to a native value type. + * + * @param message The `proto::SimplifyResponse` message. + * @return The converted native value. + */ native_value_type operator()(const value_type& message) const { native_value_type poly{}; @@ -89,11 +140,23 @@ struct simplify_response } }; +/** + * @brief A converter struct for postprocess requests. + * + * The `postprocess_request` struct provides a conversion function that converts a native G-code string + * to a `proto::PostprocessRequest` message. + */ struct postprocess_request { - using value_type = proto::PostprocessRequest; - using native_value_type = std::string; - + using value_type = proto::PostprocessRequest; ///< The protobuf message type. + using native_value_type = std::string; ///< The native value type. + + /** + * @brief Converts a native G-code string to a `proto::PostprocessRequest` message. + * + * @param gcode The native G-code string. + * @return The converted `proto::PostprocessRequest` message. + */ value_type operator()(const native_value_type& gcode) const { value_type message{}; diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index d45c35835a..4241b7baca 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,6 +19,19 @@ namespace cura::plugins { +/** + * @brief A class template representing a proxy for a plugin. + * + * The PluginProxy class template facilitates communication with plugins by providing + * an interface for sending requests and receiving responses. It uses gRPC for communication. + * + * @tparam Slot The plugin slot ID. + * @tparam Validator The type used for validating the plugin. + * @tparam Stub The process stub type. + * @tparam Prepare The prepare type. + * @tparam Request The gRPC convertible request type. + * @tparam Response The gRPC convertible response type. + */ template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response> class PluginProxy { @@ -41,16 +54,28 @@ class PluginProxy static inline constexpr plugins::SlotID slot_id{ Slot }; private: - validator_t valid_{}; - request_converter_t request_converter_{}; - response_converter_t response_converter_{}; + validator_t valid_; ///< The validator object for plugin validation. + request_converter_t request_converter_; ///< The request converter object. + response_converter_t response_converter_; ///< The response converter object. - grpc::Status status_; + grpc::Status status_; ///< The gRPC status object. + + proto::Plugin::Stub plugin_stub_; ///< The gRPC stub for plugin communication. + process_stub_t process_stub_; ///< The gRPC stub for process communication. - proto::Plugin::Stub plugin_stub_; - process_stub_t process_stub_; public: + /** + * @brief Constructs a PluginProxy object. + * + * This constructor initializes the PluginProxy object by establishing communication + * channels with the plugin identified by the given slot ID. It performs plugin validation + * and checks for communication errors. + * + * @param channel A shared pointer to the gRPC channel for communication with the plugin. + * + * @throws std::runtime_error if the plugin fails validation or communication errors occur. + */ PluginProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) { agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? @@ -85,6 +110,19 @@ class PluginProxy } } + /** + * @brief Executes the plugin operation. + * + * This operator allows the PluginProxy object to be invoked as a callable, which sends + * a request to the plugin and waits for the response. The response is converted using + * the response_converter_ object, and the converted value is returned. + * + * @tparam Args The argument types for the plugin request. + * @param args The arguments for the plugin request. + * @return The converted response value. + * + * @throws std::runtime_error if communication with the plugin fails. + */ value_type operator()(auto&&... args) { value_type ret_value{}; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 58aab07099..0c375a150e 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -19,6 +19,21 @@ namespace cura::plugins { +/** + * @brief A class template representing a proxy for a plugin slot. + * + * The SlotProxy class template acts as a proxy for a plugin slot and provides an interface + * for communication with plugins assigned to the slot. It delegates plugin requests to the + * corresponding PluginProxy object and provides a default behavior when no plugin is available. + * + * @tparam Slot The plugin slot ID. + * @tparam Validator The type used for validating the plugin. + * @tparam Stub The process stub type. + * @tparam Prepare The prepare type. + * @tparam Request The gRPC convertible request type. + * @tparam Response The gRPC convertible response type. + * @tparam Default The default behavior when no plugin is available. + */ template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response, auto Default> class SlotProxy { @@ -27,9 +42,33 @@ class SlotProxy public: static inline constexpr plugins::SlotID slot_id{ Slot }; + /** + * @brief Default constructor. + * + * Constructs a SlotProxy object without initializing the plugin. + */ constexpr SlotProxy() noexcept = default; + + /** + * @brief Constructs a SlotProxy object with a plugin. + * + * Constructs a SlotProxy object and initializes the plugin using the provided gRPC channel. + * + * @param channel A shared pointer to the gRPC channel for communication with the plugin. + */ SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; + /** + * @brief Executes the plugin operation. + * + * This operator allows the SlotProxy object to be invoked as a callable, which delegates the + * plugin request to the corresponding PluginProxy object if available. If no plugin is available, + * it invokes the default behavior provided by the `Default` callable object. + * + * @tparam Args The argument types for the plugin request. + * @param args The arguments for the plugin request. + * @return The result of the plugin request or the default behavior. + */ auto operator()(auto&&... args) { if (plugin_.has_value()) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 0aab9ec114..25548c6151 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -17,11 +17,16 @@ #include "postprocess.grpc.pb.h" #include "simplify.grpc.pb.h" -#include "utils/Simplify.h" // TODO: remove need for including implementation headers - namespace cura::plugins { +/** + * @brief Alias for the Simplify slot. + * + * This alias represents the Simplify slot, which is used for simplifying polygons. + * + * @tparam Default The default behavior when no plugin is registered. + */ template using simplify_slot = SlotProxy, @@ -31,6 +36,13 @@ using simplify_slot = SlotProxy; +/** + * @brief Alias for the Postprocess slot. + * + * This alias represents the Postprocess slot, which is used for post-processing G-code. + * + * @tparam Default The default behavior when no plugin is registered. + */ template using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, @@ -40,29 +52,53 @@ using postprocess_slot = SlotProxy; -template +/** + * @brief Class for managing plugin slots. + * + * The `Slots` class provides functionality to manage plugin slots. It allows registering and retrieving plugins + * for specific slots. + * + * @tparam Simplify The Simplify slot type. + * @tparam Postprocess The Postprocess slot type. + */ +template // TODO: use variadic template args class Slots { - using slots_t = std::variant; //, Postprocess>; + using slots_t = std::variant; ///< The variant representing available slots. + std::unordered_map slots_{}; ///< The map storing registered slots. constexpr Slots() noexcept = default; - std::unordered_map slots_{}; - public: Slots(const Slots&) = delete; Slots(Slots&&) = delete; + /** + * @brief Returns the instance of the Slots class. + * + * @return The instance of the Slots class. + */ static Slots& instance() noexcept { static Slots instance{}; return instance; } + /** + * @brief Registers a plugin for the specified slot. + * + * @param plugin The plugin to register. + */ constexpr void set(auto&& plugin) { slots_.emplace(plugin.slot_id, std::forward(plugin)); } + /** + * @brief Retrieves the plugin for the specified slot. + * + * @tparam SlotID The ID of the slot. + * @return The plugin for the specified slot. + */ template constexpr auto get() const { diff --git a/include/plugins/validator.h b/include/plugins/validator.h index c074ddbda0..88c9fefcfb 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -11,35 +11,70 @@ namespace cura::plugins { -// TODO: Implement hash and other checks +/** + * @brief A class for validating plugin versions and hashes. + * + * The `Validator` class provides functionality to validate plugin versions and hashes against + * specified version ranges and plugin hashes. + * + * @tparam VersionRange The version range specified as a character range literal. + * @tparam PluginHash The plugin hash specified as a character range literal. + */ template class Validator { - semver::range::detail::range semver_range_{ VersionRange.value }; - semver::version version_{ "1.0.0" }; - std::string_view plugin_hash_{}; - bool include_prerelease_{ false }; - bool valid_{ false }; + semver::range::detail::range semver_range_{ VersionRange.value }; ///< The semver range object. + semver::version version_{ "1.0.0" }; ///< The version to validate. + std::string_view plugin_hash_{}; ///< The plugin hash to validate. TODO: implement and use + bool include_prerelease_{ false }; ///< Flag indicating whether to include prerelease versions. + bool valid_{ false }; ///< Flag indicating the validity of the version. public: + /** + * @brief Default constructor. + */ constexpr Validator() noexcept = default; + + /** + * @brief Constructor that sets the version to validate. + * + * @param version The version to validate. + */ constexpr explicit Validator(std::string_view version) : version_{ version }, valid_{ valid_version() } {}; + /** + * @brief Conversion operator to bool. + * + * @return True if the version is valid, false otherwise. + */ constexpr operator bool() const noexcept { return valid_; } + /** + * @brief Checks if the version is valid according to the specified version range. + * + * @return True if the version is valid, false otherwise. + */ [[nodiscard]] constexpr bool valid_version() const { return semver_range_.satisfies(version_, include_prerelease_); } + /** + * @brief Returns the version string. + * + * @return The version string. + */ std::string getVersion() const { return version_.to_string(); } + /** + * @brief The version range specified as a string view. + */ static inline constexpr std::string_view version_range{ VersionRange.value }; }; From 8a2f74062c55b625a220e654a92cc48489b97060 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 17 May 2023 18:00:50 +0200 Subject: [PATCH 044/470] Build: Make passing of .proto-filenames work on Windows. done as part of CURA-10475 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 81d90e752c..b11a6f4d7c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -108,7 +108,7 @@ def generate(self): tc.variables["ENABLE_BENCHMARKS"] = self.options.enable_benchmarks tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info - tc.variables["GRPC_PROTOS"] = ";".join([str(p) for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) + tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\","/") for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) tc.generate() From 470ea3bc60ee86ba031c3198cd041378b979af51 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 17 May 2023 18:01:38 +0200 Subject: [PATCH 045/470] Use variadic SlotTypes in registry [CURA-10475] --- include/plugins/slots.h | 7 +++---- src/Application.cpp | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 25548c6151..3fc0a1fe87 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -58,13 +58,12 @@ using postprocess_slot = SlotProxy // TODO: use variadic template args +template class Slots { - using slots_t = std::variant; ///< The variant representing available slots. + using slots_t = std::variant; ///< The variant representing available slots. std::unordered_map slots_{}; ///< The map storing registered slots. constexpr Slots() noexcept = default; diff --git a/src/Application.cpp b/src/Application.cpp index 81bc3fb078..14bcb7827c 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -25,6 +25,7 @@ #include "utils/string.h" //For stringcasecompare. #include "plugins/slots.h" +#include "utils/Simplify.h" // TODO: remove when we're properly setting the plugins in the process namespace cura { From a80b699c586631ff93322b7244a002fb4b4c0a1f Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 17 May 2023 19:20:24 +0200 Subject: [PATCH 046/470] Load plugin validation certificate and 'chain'. part of CURA-10475 --- src/Application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 52a95ac2a6..56eac34f7f 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -30,7 +30,8 @@ #include "plugins/slots.h" #ifdef ENTERPRISE_BUILD -#include "../secrets/private.pem.h" +#include "../secrets/plugins.crt.h" +#include "../secrets/plugins.key.h" #endif namespace cura @@ -274,7 +275,8 @@ auto createChannel(const PluginSetupConfiguration& plugins_config) { #ifdef ENTERPRISE_BUILD auto creds_config = grpc::SslCredentialsOptions(); - creds_config.pem_cert_chain = "./plugins.crt"; // TODO: Release this next to the engine. (It's ok, the private one can still be inside.) + creds_config.pem_root_certs = secrets::certificate; + creds_config.pem_cert_chain = secrets::certificate; creds_config.pem_private_key = secrets::private_key; auto channel_creds = grpc::SslCredentials(creds_config); #else // NOT ENTERPRISE_BUILD From b5531733bd6dc4de87d3e4fa1c0f414df59ed749 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 08:54:19 +0200 Subject: [PATCH 047/470] Moved default behaviour to slots.h [CURA-10475] --- include/plugins/slots.h | 23 +++++++++++++++++++++-- src/Application.cpp | 22 ++++------------------ 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 3fc0a1fe87..d082238807 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -12,6 +12,7 @@ #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" +#include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed #include "plugin.grpc.pb.h" #include "postprocess.grpc.pb.h" @@ -19,6 +20,15 @@ namespace cura::plugins { +namespace details +{ +constexpr auto default_process = [](auto&& arg, auto&&...) { return std::forward(arg); }; + +constexpr auto simplify_default = [](const Polygons& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) +{ + const Simplify simplify{ max_resolution, max_deviation, max_area_deviation }; + return simplify.polygon(polygons); +}; /** * @brief Alias for the Simplify slot. @@ -27,7 +37,7 @@ namespace cura::plugins * * @tparam Default The default behavior when no plugin is registered. */ -template +template using simplify_slot = SlotProxy, proto::Simplify::Stub, @@ -43,7 +53,7 @@ using simplify_slot = SlotProxy +template using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, @@ -52,6 +62,8 @@ using postprocess_slot = SlotProxy; +} // namespace details + /** * @brief Class for managing plugin slots. * @@ -104,6 +116,13 @@ class Slots return std::get(slots_.at(SlotID)); } }; + +using simplify_t = details::simplify_slot; +using postprocess_t = details::postprocess_slot<>; + +// The Template arguments should be ordered in the same ordering as the SlotID enum +using slot_registry = plugins::Slots; + } // namespace cura::plugins #endif // PLUGINS_SLOTS_H diff --git a/src/Application.cpp b/src/Application.cpp index 14bcb7827c..2ae76d8964 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -25,7 +25,6 @@ #include "utils/string.h" //For stringcasecompare. #include "plugins/slots.h" -#include "utils/Simplify.h" // TODO: remove when we're properly setting the plugins in the process namespace cura { @@ -258,32 +257,19 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { - // TODO: remove this - + using plugins::slot_registry; auto host = "localhost"; auto port = 50010; - constexpr auto simplify_default = [](const Polygons& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) - { - const Simplify simplify{ max_resolution, max_deviation, max_area_deviation }; - return simplify.polygon(polygons); - }; - using simplify_t = plugins::simplify_slot; - - constexpr auto postprocess_default = [](std::string word){ return word; }; - using postprocess_t = plugins::postprocess_slot; - - using slot_registry = plugins::Slots; - if (true) // determine wat to register depending if front-end starts a plugin { - slot_registry::instance().set(simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); } else { - slot_registry::instance().set(simplify_t{}); + slot_registry::instance().set(plugins::simplify_t{}); } - slot_registry::instance().set(postprocess_t{}); + slot_registry::instance().set(plugins::postprocess_t{}); auto simplify_plugin = slot_registry::instance().get(); Polygons poly{}; From 1757694957ebcaeb14e28ef019b107f97e5947c2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 16:18:53 +0200 Subject: [PATCH 048/470] Fixed anonymous namespaces in multiple translation units - Add default_process struct to slots.h - Change Default template parameter from auto to class in slots.h and slotproxy.h - Add default_process member to SlotProxy - Remove unused code in Application.cpp Parsing anonymous lambda's in the header, results in different slots registry types in different translation units. Which is kinda bad if it is a Singleton ;-) [CURA-10475] --- include/plugins/slotproxy.h | 5 +++-- include/plugins/slots.h | 21 +++++++++++++++------ src/Application.cpp | 17 +++++------------ 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 0c375a150e..018af6292d 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -34,9 +34,10 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response, auto Default> +template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response, class Default> class SlotProxy { + Default default_process{}; std::optional> plugin_{ std::nullopt }; public: @@ -75,7 +76,7 @@ class SlotProxy { return std::invoke(plugin_.value(), std::forward(args)...); } - return std::invoke(Default, std::forward(args)...); + return std::invoke(default_process, std::forward(args)...); } }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index d082238807..7c7ae0972e 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -8,11 +8,14 @@ #include #include +#include + #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed +#include "utils/NoCopy.h" #include "plugin.grpc.pb.h" #include "postprocess.grpc.pb.h" @@ -22,12 +25,18 @@ namespace cura::plugins { namespace details { -constexpr auto default_process = [](auto&& arg, auto&&...) { return std::forward(arg); }; +struct default_process +{ + constexpr auto operator()(auto&& arg, auto&&...){ return std::forward(arg); }; +}; -constexpr auto simplify_default = [](const Polygons& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) +struct simplify_default { - const Simplify simplify{ max_resolution, max_deviation, max_area_deviation }; - return simplify.polygon(polygons); + auto operator()(auto&& arg, auto&&... args) + { + const Simplify simplify{ std::forward(args)... }; + return simplify.polygon(std::forward(arg)); + } }; /** @@ -37,7 +46,7 @@ constexpr auto simplify_default = [](const Polygons& polygons, const coord_t max * * @tparam Default The default behavior when no plugin is registered. */ -template +template using simplify_slot = SlotProxy, proto::Simplify::Stub, @@ -53,7 +62,7 @@ using simplify_slot = SlotProxy +template using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, proto::Postprocess::Stub, diff --git a/src/Application.cpp b/src/Application.cpp index 2ae76d8964..a9f53ae6a5 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -257,27 +257,20 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { - using plugins::slot_registry; auto host = "localhost"; auto port = 50010; if (true) // determine wat to register depending if front-end starts a plugin { - slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); } else { - slot_registry::instance().set(plugins::simplify_t{}); + plugins::slot_registry::instance().set(plugins::simplify_t{}); } - slot_registry::instance().set(plugins::postprocess_t{}); - - auto simplify_plugin = slot_registry::instance().get(); - Polygons poly{}; - Polygon p{}; - p.poly = {{0,1}, {2,3}, {4,5}}; - poly.add(p); - auto x = simplify_plugin(poly, 100, 200, 300); - spdlog::info("simplified poly received"); + plugins::slot_registry::instance().set(plugins::postprocess_t{}); + + } } // namespace cura \ No newline at end of file From b633f6e9907323022f5e1bace2ff0f93e138a86a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 16:20:00 +0200 Subject: [PATCH 049/470] Use the simplify plugin to simplify the layer polygons [CURA-10475] --- src/slicer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slicer.cpp b/src/slicer.cpp index 889429ceb0..4ae513a162 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -20,6 +20,8 @@ #include "utils/gettime.h" #include "utils/section_type.h" +#include "plugins/slots.h" + namespace cura { @@ -771,7 +773,9 @@ void SlicerLayer::makePolygons(const Mesh* mesh) polygons.erase(it, polygons.end()); // Finally optimize all the polygons. Every point removed saves time in the long run. - polygons = Simplify(mesh->settings).polygon(polygons); +// polygons = Simplify(mesh->settings).polygon(polygons); + auto simplify = plugins::slot_registry::instance().get(); + polygons = simplify(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), mesh->settings.get("meshfix_maximum_extrusion_area_deviation")); polygons.removeDegenerateVerts(); // remove verts connected to overlapping line segments From 05780ed35b59e34f8569830df6e1f045f8b8c96e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 16:37:12 +0200 Subject: [PATCH 050/470] Added fmt formatter for slot_id parsing the SlotID in `fmt::format` and/or `spdlog` will give a humanreadable name, should handy for logging and communication with front-end [CURA-10475] --- include/plugins/pluginproxy.h | 1 - include/plugins/types.h | 42 ++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 4241b7baca..0030343426 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -138,7 +138,6 @@ class PluginProxy request_process_t request{ request_converter_(std::forward(args)...) }; response_process_t response{}; status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); - spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); ret_value = response_converter_(response); }, boost::asio::detached); diff --git a/include/plugins/types.h b/include/plugins/types.h index 3c3c1b9f02..308b6c6563 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef CURAENGINE_INCLUDE_PLUGINS_TYPES_H -#define CURAENGINE_INCLUDE_PLUGINS_TYPES_H +#ifndef PLUGINS_TYPES_H +#define PLUGINS_TYPES_H #include #include @@ -35,4 +35,40 @@ struct CharRangeLiteral } // namespace cura::plugins -#endif // CURAENGINE_INCLUDE_PLUGINS_TYPES_H + +// Custom formatter for humanreadable slot_id's +template<> +struct fmt::formatter +{ + // The formatting function + template + auto format(cura::plugins::SlotID slot_id, FormatContext& ctx) + { + std::string slot_name; + + switch (slot_id) + { + case cura::plugins::SlotID::SIMPLIFY: + slot_name = "Simplify"; + break; + case cura::plugins::SlotID::POSTPROCESS: + slot_name = "Postprocess"; + break; + default: + slot_name = "Unknown"; + break; + } + + return fmt::format_to(ctx.out(), "{}", slot_name); + } + + // The parsing function + template + auto parse(ParseContext& ctx) + { + // Not implemented for simplicity in this example + return ctx.begin(); + } +}; + +#endif // PLUGINS_TYPES_H From 6e1c95da88619cac928482d55a5865cebdc78cdf Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 19:13:54 +0200 Subject: [PATCH 051/470] Added some benchmarking for the plugins and slots I ported the simplification algorithm to the plugin https://github.com/Ultimaker/curaengine_example_plugin with some small modifications to make it work with vectors of containers instead of our Polygons. and I wrote three different Benchmarks, guess which scenario was the best: 1st scenario = is our current simplify logic 2nd scenario = a plugin slot, which will default to the current simplify logic (scenario 1), because there is no plugin loaded. 3th scenario = a plugin slot, with the example plugin loaded. All scenarios would result in the same simplification, but it is a good indication that the slots/plugin logic as it is now seems to have minimum overhead. It is even quicker by a whooping 1.5 nanosecond :wink: ----------------------------------------------------------------------------------- Benchmark Time CPU Iterations ----------------------------------------------------------------------------------- SimplifyTestFixture/simplify_local 20.4 ns 20.4 ns 34223484 SimplifyTestFixture/simplify_slot_noplugin 20.2 ns 20.2 ns 34762914 SimplifyTestFixture/simplify_slot_localplugin 18.9 ns 18.9 ns 36288158 [CURA-10475] --- benchmark/CMakeLists.txt | 5 +- benchmark/main.cpp | 3 +- benchmark/simplify_benchmark.h | 86 ++++++++++++++++++++++++++++++++++ include/plugins/types.h | 3 +- src/SkeletalTrapezoidation.cpp | 2 +- 5 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 benchmark/simplify_benchmark.h diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 289b634dd7..4cb27361e2 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -5,6 +5,7 @@ message(STATUS "Building benchmarks...") find_package(benchmark REQUIRED) + add_executable(benchmarks main.cpp) -target_link_libraries(benchmarks PRIVATE _CuraEngine benchmark::benchmark) -target_include_directories(benchmarks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +target_link_libraries(benchmarks PRIVATE _CuraEngine benchmark::benchmark test_helpers) +target_include_directories(benchmarks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/generated) \ No newline at end of file diff --git a/benchmark/main.cpp b/benchmark/main.cpp index 6d519d5de7..cdea597f35 100644 --- a/benchmark/main.cpp +++ b/benchmark/main.cpp @@ -1,8 +1,9 @@ -// Copyright (c) 2022 Ultimaker B.V. +// Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher #include "infill_benchmark.h" #include "wall_benchmark.h" +#include "simplify_benchmark.h" #include // Run the benchmark diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h new file mode 100644 index 0000000000..7f71c5c153 --- /dev/null +++ b/benchmark/simplify_benchmark.h @@ -0,0 +1,86 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_BENCHMARK_SIMPLIFY_BENCHMARK_H +#define CURAENGINE_BENCHMARK_SIMPLIFY_BENCHMARK_H + +#include + +#include +#include +#include + +#include "../tests/ReadTestPolygons.h" +#include "utils/Simplify.h" +#include "plugins/slots.h" + +namespace cura +{ +class SimplifyTestFixture : public benchmark::Fixture +{ +public: + const std::vector POLYGON_FILENAMES = { + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave_hole.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square_hole.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_triangle.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_two_squares.txt").string() + }; + + std::vector shapes; + + void SetUp(const ::benchmark::State& state) + { + readTestPolygons(POLYGON_FILENAMES, shapes); + } + + void TearDown(const ::benchmark::State& state) + { + } +}; + +BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_local)(benchmark::State& st) +{ + Simplify simplify(MM2INT(0.25), MM2INT(0.025), 50000); + for (auto _ : st) + { + for (const auto& polys : shapes) + { + auto simplified = simplify.polygon(polys); + } + } +} + +BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_local); + +BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State& st) +{ + plugins::slot_registry::instance().set(plugins::simplify_t{}); + auto simplify = plugins::slot_registry::instance().get(); + for (auto _ : st) + { + for (const auto& polys : shapes) + { + auto simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000); + } + } +} + +BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_noplugin); + +BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::State& st) +{ + auto host = "localhost"; + auto port = 50010; + plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + auto simplify = plugins::slot_registry::instance().get(); + for (auto _ : st) + { + for (const auto& polys : shapes) + { + auto simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000); + } + } +} + +BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_localplugin); +} // namespace cura +#endif // CURAENGINE_BENCHMARK_SIMPLIFY_BENCHMARK_H diff --git a/include/plugins/types.h b/include/plugins/types.h index 308b6c6563..050a032d6e 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -4,10 +4,11 @@ #ifndef PLUGINS_TYPES_H #define PLUGINS_TYPES_H -#include #include #include +#include + #include "utils/IntPoint.h" #include "utils/concepts/generic.h" #include "utils/polygon.h" diff --git a/src/SkeletalTrapezoidation.cpp b/src/SkeletalTrapezoidation.cpp index 580c5781e3..48479df859 100644 --- a/src/SkeletalTrapezoidation.cpp +++ b/src/SkeletalTrapezoidation.cpp @@ -1091,7 +1091,7 @@ void SkeletalTrapezoidation::generateTransitionEnds(edge_t& edge, coord_t mid_po #ifdef DEBUG if (! generateTransitionEnd(edge, start_pos, end_pos, transition_half_length, mid_rest, end_rest, lower_bead_count, edge_transition_ends)) { - spdlog::warn("There must have been at least one direction in which the bead count is increasing enough for the transition to happen!"); + spdlog::debug("There must have been at least one direction in which the bead count is increasing enough for the transition to happen!"); } #else generateTransitionEnd(edge, start_pos, end_pos, transition_half_length, mid_rest, end_rest, lower_bead_count, edge_transition_ends); From b0826abcae8a0ccc827d9bc73d976ed570d28736 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 19:21:47 +0200 Subject: [PATCH 052/470] Skip with error for benchmark [CURA-10475] --- include/utils/views/densify.h | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 include/utils/views/densify.h diff --git a/include/utils/views/densify.h b/include/utils/views/densify.h new file mode 100644 index 0000000000..1301adfe5e --- /dev/null +++ b/include/utils/views/densify.h @@ -0,0 +1,89 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_INCLUDE_UTILS_VIEWS_DENSIFY_H +#define CURAENGINE_INCLUDE_UTILS_VIEWS_DENSIFY_H + +#include +#include +#include + +#include "utils/concepts/geometry.h" + +namespace cura::views +{ +namespace details +{ +template +struct PointsOnLineGenerator { + struct promise_type { + std::vector points; + std::size_t index = 0; + + PointsOnLineGenerator get_return_object() { return {this}; } + std::suspend_always initial_suspend() { return {}; } + std::suspend_always final_suspend() noexcept { return {}; } + void unhandled_exception() {} + + bool done() const { return index == points.size(); } + + T current_value() const { return points[index]; } + + void advance() { ++index; } + + std::suspend_always yield_value(T value) { + points.push_back(value); + return {}; + } + + void return_void() {} + }; + + using Handle = std::coroutine_handle; + + Handle handle; + + PointsOnLineGenerator(promise_type* p) + : handle(Handle::from_promise(*p)) {} + + ~PointsOnLineGenerator() { + if (handle) handle.destroy(); + } + + bool done() const { return handle.done(); } + + T operator()() { + T value = handle.promise().current_value(); + handle.promise().advance(); + if (!handle.done()) handle.resume(); + return value; + } +}; + +template +PointsOnLineGenerator generatePointsOnLine(const T& point_start, const T& point_end, size_t n) { + co_yield point_start; + + double dx = (point_end.X - point_start.X) / (n + 1); + double dy = (point_end.Y - point_start.Y) / (n + 1); + + for (int i = 1; i <= n; ++i) { + co_yield T{point_start.X + i * dx, point_end.Y + i * dy}; + } + + co_yield point_end; +} + +struct densify_view_fn +{ + template + constexpr auto operator()(Rng&& rng, size_t n) const + { + auto generator = generatePointsOnLine(rng, n); + } +}; + +} // namespace details +} // namespace cura::views + +#endif // CURAENGINE_INCLUDE_UTILS_VIEWS_DENSIFY_H From cc24c6ad40dbec6b0d46dda22616dc7828367865 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 18 May 2023 19:22:45 +0200 Subject: [PATCH 053/470] fix benchmark and unit test on runners When plugin isn't loaded [CURA-10475] --- benchmark/simplify_benchmark.h | 10 +++++++++- src/Application.cpp | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 7f71c5c153..608243fb3a 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -70,7 +70,15 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St { auto host = "localhost"; auto port = 50010; - plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + + try + { + plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + } + catch (std::runtime_error e) + { + st.SkipWithError(e.what()); + } auto simplify = plugins::slot_registry::instance().get(); for (auto _ : st) { diff --git a/src/Application.cpp b/src/Application.cpp index a9f53ae6a5..4efa87ff12 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -260,7 +260,7 @@ void Application::registerPlugins() auto host = "localhost"; auto port = 50010; - if (true) // determine wat to register depending if front-end starts a plugin + if (false) // determine wat to register depending if front-end starts a plugin { plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); } From e699aea13c31b30bf21d99075a6fad7a7a0d8404 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 09:24:34 +0200 Subject: [PATCH 054/470] Enable secure (no plugins) compilation This should be the default for Enterprise. [CURA-10475] --- CMakeLists.txt | 2 ++ conanfile.py | 11 +++++++++-- include/plugins/slots.h | 7 ++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a006328c9..eb3cd65770 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ AssureOutOfSourceBuilds() option(ENABLE_ARCUS "Enable support for ARCUS" ON) option(ENABLE_TESTING "Build with unit tests" OFF) option(EXTENSIVE_WARNINGS "Build with all warnings" ON) +option(ENABLE_PLUGINS "Build with all warnings" ON) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) #set(GRPC_PROTOS "List of all gRPC definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") @@ -161,6 +162,7 @@ target_include_directories(_CuraEngine target_compile_definitions(_CuraEngine PUBLIC $<$:ARCUS> + $<$:PLUGINS> CURA_ENGINE_VERSION=\"${CURA_ENGINE_VERSION}\" $<$:BUILD_TESTS> PRIVATE diff --git a/conanfile.py b/conanfile.py index 926154d084..30b5b55c12 100644 --- a/conanfile.py +++ b/conanfile.py @@ -28,15 +28,21 @@ class CuraEngineConan(ConanFile): "enable_arcus": [True, False], "enable_testing": [True, False], "enable_benchmarks": [True, False], - "enable_extensive_warnings": [True, False] + "enable_extensive_warnings": [True, False], + "enable_plugins": [True, False], } default_options = { "enable_arcus": True, "enable_testing": False, "enable_benchmarks": False, "enable_extensive_warnings": False, + "enable_plugins": True, } + def set_version(self): + if not self.version: + self.version = "5.4.0-alpha.1" + def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) copy(self, "Cura.proto", self.recipe_folder, self.export_sources_folder) @@ -80,7 +86,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/cura_10475") + self.requires("arcus/(latest)@ultimaker/cura_10475") # TODO: point to `testing` once the CURA-10475 from libArcus is main self.requires("clipper/6.4.2") self.requires("boost/1.81.0") self.requires("rapidjson/1.1.0") @@ -106,6 +112,7 @@ def generate(self): tc.variables["ENABLE_TESTING"] = self.options.enable_testing tc.variables["ENABLE_BENCHMARKS"] = self.options.enable_benchmarks tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings + tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info tc.variables["GRPC_PROTOS"] = ";".join([str(p) for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 7c7ae0972e..15163cd098 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -110,7 +110,12 @@ class Slots */ constexpr void set(auto&& plugin) { - slots_.emplace(plugin.slot_id, std::forward(plugin)); + using plugin_t = decltype(plugin); +#ifdef PLUGINS + slots_.emplace(plugin.slot_id, std::forward(plugin)); +#else + slots_.emplace(plugin.slot_id, std::forward(plugin_t{})); // Allways create a default (not connected) plugin +#endif } /** From 559656754d02d4fcef6c23abfc1208e09371b395 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 09:25:16 +0200 Subject: [PATCH 055/470] Revert "Skip with error for benchmark" This reverts commit b0826abcae8a0ccc827d9bc73d976ed570d28736. --- include/utils/views/densify.h | 89 ----------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 include/utils/views/densify.h diff --git a/include/utils/views/densify.h b/include/utils/views/densify.h deleted file mode 100644 index 1301adfe5e..0000000000 --- a/include/utils/views/densify.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher - -#ifndef CURAENGINE_INCLUDE_UTILS_VIEWS_DENSIFY_H -#define CURAENGINE_INCLUDE_UTILS_VIEWS_DENSIFY_H - -#include -#include -#include - -#include "utils/concepts/geometry.h" - -namespace cura::views -{ -namespace details -{ -template -struct PointsOnLineGenerator { - struct promise_type { - std::vector points; - std::size_t index = 0; - - PointsOnLineGenerator get_return_object() { return {this}; } - std::suspend_always initial_suspend() { return {}; } - std::suspend_always final_suspend() noexcept { return {}; } - void unhandled_exception() {} - - bool done() const { return index == points.size(); } - - T current_value() const { return points[index]; } - - void advance() { ++index; } - - std::suspend_always yield_value(T value) { - points.push_back(value); - return {}; - } - - void return_void() {} - }; - - using Handle = std::coroutine_handle; - - Handle handle; - - PointsOnLineGenerator(promise_type* p) - : handle(Handle::from_promise(*p)) {} - - ~PointsOnLineGenerator() { - if (handle) handle.destroy(); - } - - bool done() const { return handle.done(); } - - T operator()() { - T value = handle.promise().current_value(); - handle.promise().advance(); - if (!handle.done()) handle.resume(); - return value; - } -}; - -template -PointsOnLineGenerator generatePointsOnLine(const T& point_start, const T& point_end, size_t n) { - co_yield point_start; - - double dx = (point_end.X - point_start.X) / (n + 1); - double dy = (point_end.Y - point_start.Y) / (n + 1); - - for (int i = 1; i <= n; ++i) { - co_yield T{point_start.X + i * dx, point_end.Y + i * dy}; - } - - co_yield point_end; -} - -struct densify_view_fn -{ - template - constexpr auto operator()(Rng&& rng, size_t n) const - { - auto generator = generatePointsOnLine(rng, n); - } -}; - -} // namespace details -} // namespace cura::views - -#endif // CURAENGINE_INCLUDE_UTILS_VIEWS_DENSIFY_H From bb31da329a1d22d7e6c6463954f5f13d769fa174 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 10:38:20 +0200 Subject: [PATCH 056/470] Fix failing integration tests The Slots need to be registered here as well, since we're skipping the normal registration step in this test [CURA-10475] --- tests/CMakeLists.txt | 2 +- tests/integration/SlicePhaseTest.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 357ee011a6..8e718d50b1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -51,7 +51,7 @@ endif () add_library(test_helpers ${TESTS_HELPERS_SRC}) target_compile_definitions(test_helpers PUBLIC $<$:BUILD_TESTS> $<$:ARCUS>) -target_include_directories(test_helpers PUBLIC "../include") +target_include_directories(test_helpers PUBLIC "../include" ${CMAKE_BINARY_DIR}/generated) target_link_libraries(test_helpers PRIVATE _CuraEngine GTest::gtest GTest::gmock clipper::clipper) if (ENABLE_ARCUS) target_link_libraries(test_helpers PUBLIC arcus::arcus protobuf::libprotobuf) diff --git a/tests/integration/SlicePhaseTest.cpp b/tests/integration/SlicePhaseTest.cpp index c90a96fabe..8a9b4cd9c6 100644 --- a/tests/integration/SlicePhaseTest.cpp +++ b/tests/integration/SlicePhaseTest.cpp @@ -8,6 +8,7 @@ #include "utils/FMatrix4x3.h" // To load STL files. #include "utils/polygon.h" // Creating polygons to compare to sliced layers. #include "utils/polygonUtils.h" // Comparing similarity of polygons. +#include "plugins/slots.h" #include #include @@ -26,6 +27,9 @@ class SlicePhaseTest : public testing::Test { // Start the thread pool Application::getInstance().startThreadPool(); + plugins::slot_registry::instance().set(plugins::simplify_t{}); + plugins::slot_registry::instance().set(plugins::postprocess_t{}); + // Set up a scene so that we may request settings. Application::getInstance().current_slice = new Slice(1); From 2802bec1bd533be1bdccac2f51971ca3acb09d03 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 10:54:29 +0200 Subject: [PATCH 057/470] Use complex polygons to test simplification [CURA-10475] --- benchmark/simplify_benchmark.h | 13 +- tests/resources/slice_polygon_1.txt | 47 + tests/resources/slice_polygon_2.txt | 117 + tests/resources/slice_polygon_3.txt | 233 ++ tests/resources/slice_polygon_4.txt | 5045 +++++++++++++++++++++++++++ 5 files changed, 5451 insertions(+), 4 deletions(-) create mode 100644 tests/resources/slice_polygon_1.txt create mode 100644 tests/resources/slice_polygon_2.txt create mode 100644 tests/resources/slice_polygon_3.txt create mode 100644 tests/resources/slice_polygon_4.txt diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 608243fb3a..35c9a3b158 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -22,7 +22,9 @@ class SimplifyTestFixture : public benchmark::Fixture const std::vector POLYGON_FILENAMES = { std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave_hole.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square_hole.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_triangle.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_two_squares.txt").string() + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_triangle.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_two_squares.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_1.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_2.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_3.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_4.txt").string() }; std::vector shapes; @@ -42,9 +44,10 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_local)(benchmark::State& st) Simplify simplify(MM2INT(0.25), MM2INT(0.025), 50000); for (auto _ : st) { + Polygons simplified; for (const auto& polys : shapes) { - auto simplified = simplify.polygon(polys); + benchmark::DoNotOptimize(simplified = simplify.polygon(polys)); } } } @@ -57,9 +60,10 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State auto simplify = plugins::slot_registry::instance().get(); for (auto _ : st) { + Polygons simplified; for (const auto& polys : shapes) { - auto simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000); + benchmark::DoNotOptimize(simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } @@ -82,9 +86,10 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St auto simplify = plugins::slot_registry::instance().get(); for (auto _ : st) { + Polygons simplified; for (const auto& polys : shapes) { - auto simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000); + benchmark::DoNotOptimize(simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } diff --git a/tests/resources/slice_polygon_1.txt b/tests/resources/slice_polygon_1.txt new file mode 100644 index 0000000000..d07ee348a1 --- /dev/null +++ b/tests/resources/slice_polygon_1.txt @@ -0,0 +1,47 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +# + +A polygon from a real world example. This polygon is generated from tree support diff --git a/tests/resources/slice_polygon_2.txt b/tests/resources/slice_polygon_2.txt new file mode 100644 index 0000000000..a36c67170c --- /dev/null +++ b/tests/resources/slice_polygon_2.txt @@ -0,0 +1,117 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +# + +A polygon from a real world example. This polygon is generated from tree support diff --git a/tests/resources/slice_polygon_3.txt b/tests/resources/slice_polygon_3.txt new file mode 100644 index 0000000000..18d86abf5e --- /dev/null +++ b/tests/resources/slice_polygon_3.txt @@ -0,0 +1,233 @@ +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 diff --git a/tests/resources/slice_polygon_4.txt b/tests/resources/slice_polygon_4.txt new file mode 100644 index 0000000000..a6ce356288 --- /dev/null +++ b/tests/resources/slice_polygon_4.txt @@ -0,0 +1,5045 @@ +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 +x +v 127470 164447 +v 127806 164494 +v 128024 164722 +v 128075 165037 +v 127933 165382 +v 127468 165831 +v 127067 165975 +v 126530 165890 +v 126607 166299 +v 126462 166638 +v 126341 166754 +v 126682 167110 +v 126822 167452 +v 126776 167780 +v 126558 168001 +v 126227 168048 +v 125897 167909 +v 125594 167606 +v 125323 167879 +v 124886 168043 +v 124559 167994 +v 124316 167776 +v 124258 167468 +v 124401 167144 +v 124774 166786 +v 124586 166599 +v 124446 166266 +v 124497 165952 +v 124714 165719 +v 125045 165671 +v 125396 165812 +v 125532 165952 +v 125628 165856 +v 125980 165724 +v 126520 165797 +v 126442 165399 +v 126576 165081 +v 126726 164935 +v 126756 164822 +v 126986 164538 +v 127314 164412 +x +v 117979 155034 +v 118691 155162 +v 119350 155356 +v 119957 155618 +v 120564 155959 +v 121103 156355 +v 121609 156815 +v 122090 157380 +v 122445 157897 +v 122782 158541 +v 123021 159165 +v 123183 159797 +v 123284 160451 +v 123305 161000 +v 123305 161822 +v 123344 162220 +v 123457 162604 +v 123645 162964 +v 123891 163269 +v 124194 163522 +v 124540 163710 +v 124915 163825 +v 125305 163865 +v 147845 163861 +v 147845 166410 +v 79916 166411 +v 79356 166378 +v 78804 166282 +v 78265 166123 +v 77747 165904 +v 77256 165628 +v 76799 165297 +v 76381 164917 +v 72155 160597 +v 72155 156966 +v 79718 161223 +v 82189 162602 +v 82938 162982 +v 83715 163295 +v 84515 163541 +v 85333 163717 +v 86162 163825 +v 86997 163860 +v 109305 163865 +v 109695 163825 +v 110070 163710 +v 110416 163522 +v 110719 163269 +v 110970 162956 +v 111153 162604 +v 111267 162220 +v 111305 161823 +v 111305 161000 +v 111322 160543 +v 111385 160031 +v 111440 159736 +v 111578 159211 +v 111824 158543 +v 112171 157895 +v 112530 157368 +v 112970 156847 +v 113466 156389 +v 114045 155959 +v 114683 155600 +v 115327 155336 +v 115909 155165 +v 116608 155040 +v 117301 155000 +x +v 116798 157534 +v 116267 157654 +v 115775 157853 +v 115362 158089 +v 114935 158425 +v 114551 158841 +v 114282 159238 +v 114041 159725 +v 113883 160269 +v 113815 160744 +v 113815 161266 +v 113882 161746 +v 114048 162283 +v 114250 162707 +v 114554 163171 +v 114940 163584 +v 115371 163920 +v 115776 164148 +v 116295 164358 +v 116837 164472 +v 117305 164500 +v 117829 164466 +v 118339 164348 +v 118834 164149 +v 119279 163890 +v 119671 163585 +v 120057 163170 +v 120359 162708 +v 120561 162284 +v 120727 161747 +v 120794 161267 +v 120796 160745 +v 120721 160219 +v 120567 159719 +v 120329 159239 +v 120037 158807 +v 119677 158426 +v 119249 158090 +v 118837 157854 +v 118342 157654 +v 117813 157535 +v 117305 157500 +x +v 87502 90642 +v 87560 90841 +v 87699 90816 +v 88009 90915 +v 88376 90819 +v 88584 90852 +v 88648 90631 +v 88682 90595 +v 89550 90595 +v 89704 90718 +v 89827 90968 +v 89816 90968 +v 89758 91188 +v 89553 91335 +v 89251 91372 +v 89117 91332 +v 88963 91691 +v 88757 91854 +v 88794 92050 +v 88997 92113 +v 89094 92091 +v 89413 92113 +v 89986 92258 +v 90409 92644 +v 90519 92963 +v 90768 92950 +v 90866 92526 +v 91135 92253 +v 91195 91929 +v 90920 91688 +v 90770 91319 +v 90635 91357 +v 90352 91318 +v 90127 91161 +v 90065 90962 +v 90041 90963 +v 90169 90704 +v 90309 90595 +v 91204 90595 +v 91242 90634 +v 91302 90842 +v 91449 90817 +v 91756 90914 +v 92123 90820 +v 92332 90854 +v 92395 90631 +v 92430 90595 +v 93524 90595 +v 93576 90759 +v 93583 90759 +v 93461 91010 +v 93229 91184 +v 92889 91274 +v 92711 91690 +v 92409 91930 +v 92513 92055 +v 92652 92391 +v 93224 92227 +v 93787 92346 +v 94184 92718 +v 94327 93215 +v 94143 93731 +v 93894 93953 +v 94057 94459 +v 95000 93476 +v 94786 93272 +v 94615 92820 +v 94717 92381 +v 94893 92203 +v 94937 91969 +v 94623 91651 +v 94566 91294 +v 94204 91159 +v 93956 90960 +v 93834 90720 +v 93862 90595 +v 94938 90595 +v 94996 90663 +v 95062 90595 +v 96022 90595 +v 96126 90689 +v 96200 90595 +v 97045 90595 +v 97199 90718 +v 97322 90968 +v 97311 90968 +v 97253 91188 +v 97048 91335 +v 96746 91372 +v 96560 91318 +v 96511 91662 +v 96196 91979 +v 96308 92109 +v 96443 92526 +v 97010 92365 +v 97578 92484 +v 97939 92820 +v 98093 92422 +v 98172 92350 +v 98241 92157 +v 98558 91811 +v 98415 91688 +v 98266 91319 +v 98130 91357 +v 97847 91318 +v 97622 91161 +v 97560 90962 +v 97536 90963 +v 97664 90704 +v 97804 90595 +v 98699 90595 +v 98737 90634 +v 98797 90842 +v 98944 90817 +v 99252 90915 +v 99619 90819 +v 99827 90852 +v 99891 90631 +v 99926 90595 +v 101020 90595 +v 101071 90757 +v 101079 90757 +v 100958 91010 +v 100719 91187 +v 100384 91275 +v 100206 91692 +v 99851 91972 +v 100093 92200 +v 100207 92631 +v 100180 92706 +v 100329 92854 +v 100987 92614 +v 101511 92737 +v 101866 93141 +v 101978 93669 +v 101792 94240 +v 101545 94541 +v 101630 94942 +v 101563 95229 +v 101475 95547 +v 101634 96158 +v 101229 97596 +v 100444 98425 +v 99369 98762 +v 98344 98463 +v 97545 97615 +v 97257 96503 +v 97072 96453 +v 96681 96842 +v 95693 97154 +v 94771 96920 +v 94068 96221 +v 93794 95154 +v 93273 95601 +v 93187 95623 +v 93005 95943 +v 92269 96703 +v 91311 97012 +v 90412 96772 +v 89715 96051 +v 89482 95123 +v 89570 94841 +v 89005 94952 +v 88957 94936 +v 88540 95062 +v 87813 94885 +v 87441 94530 +v 87016 94665 +v 86658 94585 +v 86538 94799 +v 87488 95788 +v 87812 96787 +v 87559 97809 +v 86839 98526 +v 85816 98780 +v 84782 98446 +v 84039 98685 +v 83252 98491 +v 82654 97897 +v 82459 97114 +v 82726 96318 +v 82902 96134 +v 82922 96080 +v 83274 95733 +v 83316 95549 +v 83684 95128 +v 83347 95048 +v 83010 94773 +v 82958 94629 +v 82896 94578 +v 82739 94148 +v 82874 93728 +v 83234 93405 +v 83739 93294 +v 83981 93340 +v 84235 93364 +v 84245 93089 +v 84336 92724 +v 84104 92655 +v 83751 92327 +v 84069 92036 +v 84183 91898 +v 84584 91530 +v 84674 91555 +v 84820 91708 +v 85168 91841 +v 85391 92017 +v 85638 92261 +v 85749 92561 +v 85676 92869 +v 85883 93095 +v 86499 92486 +v 86587 92458 +v 86657 92382 +v 87407 92158 +v 87454 91935 +v 87173 91688 +v 87059 91413 +v 86896 91480 +v 86634 91452 +v 86444 91284 +v 86408 91042 +v 86531 90786 +v 86693 90633 +v 86716 90630 +v 87020 90595 +v 87457 90595 +x +v 85773 94292 +v 85528 94548 +v 86309 94777 +v 86438 94550 +v 85894 94043 + +# Big polygon \ No newline at end of file From 5b4793279dd583a71ab493c9da58b78bae6d78eb Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 13:32:19 +0200 Subject: [PATCH 058/470] Allow Cura front-end to set plugins (port & address) This can currently be done by setting the environment variables: - SIMPLIFY_ENABLE: default disabled, setting this to any value will enable the plugin - SIMPLIFY_ADDRESS: defaults to localhost - SIMPLIFY_PORT: defaults to 33700 - POSTPROCESS_ENABLE: default disabled, setting this to any value will enable the plugin - POSTPROCESS_ADDRESS: defaults to localhost - POSTPROCESS_PORT: defaults to 33701 [CURA-10475] --- Cura.proto | 13 +++++++++ src/Application.cpp | 27 ++++++++---------- src/communication/ArcusCommunication.cpp | 36 ++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 15 deletions(-) diff --git a/Cura.proto b/Cura.proto index 284b4eb9d5..5c82d7c112 100644 --- a/Cura.proto +++ b/Cura.proto @@ -8,12 +8,25 @@ message ObjectList repeated Setting settings = 2; // meshgroup settings (for one-at-a-time printing) } +enum SlotID { + SIMPLIFY = 0; + POSTPROCESS = 1; +} + +message EnginePlugin +{ + SlotID id = 1; + optional string address = 2; + optional uint32 port = 3; +} + message Slice { repeated ObjectList object_lists = 1; // The meshgroups to be printed one after another SettingList global_settings = 2; // The global settings used for the whole print job repeated Extruder extruders = 3; // The settings sent to each extruder object repeated SettingExtruder limit_to_extruder = 4; // From which stack the setting would inherit if not defined per object + repeated EnginePlugin engine_plugins = 5; } message Extruder diff --git a/src/Application.cpp b/src/Application.cpp index 4efa87ff12..43d7c0e711 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -24,8 +23,6 @@ #include "utils/ThreadPool.h" #include "utils/string.h" //For stringcasecompare. -#include "plugins/slots.h" - namespace cura { @@ -257,18 +254,18 @@ void Application::startThreadPool(int nworkers) void Application::registerPlugins() { - auto host = "localhost"; - auto port = 50010; - - if (false) // determine wat to register depending if front-end starts a plugin - { - plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); - } - else - { - plugins::slot_registry::instance().set(plugins::simplify_t{}); - } - plugins::slot_registry::instance().set(plugins::postprocess_t{}); +// auto host = "localhost"; +// auto port = 50010; +// +// if (false) // determine wat to register depending if front-end starts a plugin +// { +// plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); +// } +// else +// { +// plugins::slot_registry::instance().set(plugins::simplify_t{}); +// } +// plugins::slot_registry::instance().set(plugins::postprocess_t{}); } diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index c1686d34e0..bc30f98d16 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -7,6 +7,8 @@ #include //To sleep while waiting for the connection. #include //To map settings to their extruder numbers for limit_to_extruder. +#include +#include #include #include "Application.h" //To get and set the current slice command. @@ -22,6 +24,8 @@ #include "settings/types/Velocity.h" //To send to layer view how fast stuff is printing. #include "utils/polygon.h" +#include "plugins/slots.h" + namespace cura { @@ -504,6 +508,38 @@ void ArcusCommunication::sliceNext() } spdlog::debug("Received a Slice message."); + // TODO: Use typemap + constexpr auto create_channel = [&](auto&&... args){ return grpc::CreateChannel(fmt::format("{}:{}", std::forward(args)...), grpc::InsecureChannelCredentials()); }; + for (const auto& plugin : slice_message->engine_plugins()) + { + if (plugin.has_address() && plugin.has_port()) + { + switch (plugin.id()) + { + case cura::proto::SlotID::SIMPLIFY: + plugins::slot_registry::instance().set(plugins::simplify_t{ create_channel(plugin.address(), plugin.port()) }); + break; + case cura::proto::SlotID::POSTPROCESS: + plugins::slot_registry::instance().set(plugins::postprocess_t{ create_channel(plugin.address(), plugin.port()) }); + break; + default: break; + } + } + else + { + switch (plugin.id()) + { + case cura::proto::SlotID::SIMPLIFY: + plugins::slot_registry::instance().set(plugins::simplify_t{ }); + break; + case cura::proto::SlotID::POSTPROCESS: + plugins::slot_registry::instance().set(plugins::postprocess_t{ }); + break; + default: break; + } + } + } + Slice slice(slice_message->object_lists().size()); Application::getInstance().current_slice = &slice; From 780364c6508006f970054bc0033a418b22526838 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 14:27:03 +0200 Subject: [PATCH 059/470] Removed register plugins from Application This is now done in the communication class Only implemented this for Arcus communication, not yet commandline [CURA-10475] --- include/Application.h | 2 -- src/Application.cpp | 23 ----------------------- 2 files changed, 25 deletions(-) diff --git a/include/Application.h b/include/Application.h index eaedbc79e5..6f67b799d0 100644 --- a/include/Application.h +++ b/include/Application.h @@ -134,8 +134,6 @@ class Application : NoCopy * This destroys the Communication instance along with it. */ ~Application(); - - void registerPlugins(); }; } //Cura namespace. diff --git a/src/Application.cpp b/src/Application.cpp index 43d7c0e711..0d152408da 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -186,8 +186,6 @@ void Application::run(const size_t argc, char** argv) exit(1); } - registerPlugins(); - #ifdef ARCUS if (stringcasecompare(argv[1], "connect") == 0) { @@ -249,25 +247,4 @@ void Application::startThreadPool(int nworkers) thread_pool = new ThreadPool(nthreads); } - - - -void Application::registerPlugins() -{ -// auto host = "localhost"; -// auto port = 50010; -// -// if (false) // determine wat to register depending if front-end starts a plugin -// { -// plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); -// } -// else -// { -// plugins::slot_registry::instance().set(plugins::simplify_t{}); -// } -// plugins::slot_registry::instance().set(plugins::postprocess_t{}); - - -} - } // namespace cura \ No newline at end of file From 1a4016c7459e850ef51c615e787730db0b5ff1b6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 17:48:14 +0200 Subject: [PATCH 060/470] Fixing new polygons proto types WIP [CURA-10475] --- include/plugins/converters.h | 49 ++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index ffb73d9190..b8e9b8bd7b 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -5,6 +5,7 @@ #define PLUGINS_CONVERTERS_H #include +#include #include "plugins/types.h" @@ -88,19 +89,25 @@ struct simplify_request message.set_max_resolution(max_resolution); message.set_max_deviation(max_resolution); message.set_max_area_deviation(max_resolution); - for (const auto& polygon : polygons.paths) + + auto* msg_polygons = message.mutable_polygons(); + auto* msg_polygon = msg_polygons->add_polygons(); + auto* msg_outline_path = msg_polygon->mutable_outline()->add_path(); + + for (const auto& point : polygons.front()) { - auto* poly = message.mutable_polygons(); - for (const auto& path : polygons.paths) - { - auto p = poly->add_paths(); + msg_outline_path->set_x(point.X); + msg_outline_path->set_y(point.Y); + } - for (const auto& point : path) - { - auto* pt = p->add_path(); - pt->set_x(point.X); - pt->set_y(point.Y); - } + auto* msg_holes = msg_polygon->mutable_holes(); + for (const auto& polygon : polygons.paths | ranges::views::drop(1)) + { + auto* msg_path = msg_holes->Add()->add_path(); + for (const auto& point : polygon) + { + msg_path->set_x(point.X); + msg_path->set_y(point.Y); } } return message; @@ -127,14 +134,24 @@ struct simplify_response native_value_type operator()(const value_type& message) const { native_value_type poly{}; - for (const auto& paths : message.polygons().paths()) + for (const auto& paths : message.polygons().polygons()) { - Polygon p{}; - for (const auto& point : paths.path()) + Polygon o{}; + for (const auto& point : paths.outline().path()) + { + o.add(Point{ point.x(), point.y() }); + } + poly.add(o); + + for (const auto& hole : paths.holes()) { - p.add(Point{ point.x(), point.y() }); + Polygon h{}; + for (const auto& point : hole.path()) + { + h.add(Point{ point.x(), point.y() }); + } + poly.add(h); } - poly.add(p); } return poly; } From 6e15ca8521cdb6c7f0aaa037adce5157f0b32dd2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 20:05:55 +0200 Subject: [PATCH 061/470] Fixed new polygons proto types [CURA-10475] --- include/plugins/converters.h | 14 +++++++++++--- include/plugins/pluginproxy.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index b8e9b8bd7b..ab30e61132 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -5,6 +5,7 @@ #define PLUGINS_CONVERTERS_H #include +#include #include #include "plugins/types.h" @@ -90,12 +91,18 @@ struct simplify_request message.set_max_deviation(max_resolution); message.set_max_area_deviation(max_resolution); + if (polygons.empty()) + { + return message; + } + auto* msg_polygons = message.mutable_polygons(); auto* msg_polygon = msg_polygons->add_polygons(); - auto* msg_outline_path = msg_polygon->mutable_outline()->add_path(); + auto* msg_outline = msg_polygon->mutable_outline(); - for (const auto& point : polygons.front()) + for (const auto& point : ranges::front(polygons.paths)) { + auto* msg_outline_path = msg_outline->add_path(); msg_outline_path->set_x(point.X); msg_outline_path->set_y(point.Y); } @@ -103,9 +110,10 @@ struct simplify_request auto* msg_holes = msg_polygon->mutable_holes(); for (const auto& polygon : polygons.paths | ranges::views::drop(1)) { - auto* msg_path = msg_holes->Add()->add_path(); + auto* msg_hole = msg_holes->Add(); for (const auto& point : polygon) { + auto* msg_path = msg_hole->add_path(); msg_path->set_x(point.X); msg_path->set_y(point.Y); } diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 0030343426..588cfecfa5 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -136,9 +136,11 @@ class PluginProxy { grpc::ClientContext client_context{}; request_process_t request{ request_converter_(std::forward(args)...) }; +// spdlog::debug("Request: {}", request.DebugString()); response_process_t response{}; status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); ret_value = response_converter_(response); +// spdlog::debug("Response: {}", response.DebugString()); }, boost::asio::detached); grpc_context.run(); From 0f8974abd9107cb04a0133675ead2f5be74cdc1e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 19 May 2023 20:11:04 +0200 Subject: [PATCH 062/470] Use port 33700 [CURA-10475] --- benchmark/simplify_benchmark.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 35c9a3b158..71cb18ee8d 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -73,7 +73,7 @@ BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_noplugin); BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::State& st) { auto host = "localhost"; - auto port = 50010; + auto port = 33700; try { From 9c79d48626450e8aef8185d1ea53819d25d73b32 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 20 May 2023 12:26:08 +0200 Subject: [PATCH 063/470] Update protobuf and grpc files This commit updates the protobuf and grpc files to reflect the changes made on the arcus_replacement branch of the CuraEngine_grpc_definitions repository. The changes were necessary to ensure compatibility and consistency with the updated definitions. This branch now uses the by @casperlamboo proposed new Protobuf types, but modified, such that we can start pulling out libArcus and pyArcus. Codebase consistency: The modifications made in this commit ensure that the protobuf and grpc files used in the current branch align with the definitions present in the arcus_replacement branch of the CuraEngine_grpc_definitions repository. [CURA-10475] --- conanfile.py | 2 +- include/plugins/converters.h | 33 ++++++++++++++++++---------- include/plugins/pluginproxy.h | 41 +++++++++++++++++------------------ include/plugins/slotproxy.h | 4 ++-- include/plugins/slots.h | 6 +++-- include/plugins/validator.h | 3 +-- 6 files changed, 50 insertions(+), 39 deletions(-) diff --git a/conanfile.py b/conanfile.py index 30b5b55c12..a335e21923 100644 --- a/conanfile.py +++ b/conanfile.py @@ -100,7 +100,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/arcus_replacement") def generate(self): deps = CMakeDeps(self) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index ab30e61132..8aca64fe87 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -4,7 +4,9 @@ #ifndef PLUGINS_CONVERTERS_H #define PLUGINS_CONVERTERS_H -#include +#include +#include + #include #include @@ -22,10 +24,12 @@ namespace cura::plugins * The `plugin_request` struct provides a conversion function that converts a native slot ID * to a `proto::PluginRequest` message. */ +template struct plugin_request { - using value_type = proto::PluginRequest; ///< The protobuf message type. + using value_type = proto::PluginRequest; ///< The protobuf message type. using native_value_type = cura::plugins::SlotID; ///< The native value type. + const std::string slot_version_range{ SlotVersionRng.value }; /** * @brief Converts a native slot ID to a `proto::PluginRequest` message. @@ -36,7 +40,8 @@ struct plugin_request value_type operator()(const native_value_type& slot_id) const { value_type message{}; - message.set_id(slot_id); + message.set_slot_version_range(slot_version_range); + message.set_slot_id(slot_id); return message; } }; @@ -50,7 +55,7 @@ struct plugin_request struct plugin_response { using value_type = proto::PluginResponse; ///< The protobuf message type. - using native_value_type = std::pair; ///< The native value type. + using native_value_type = std::tuple; ///< The native value type. /** * @brief Converts a `proto::PluginResponse` message to a native value type. @@ -60,7 +65,7 @@ struct plugin_response */ native_value_type operator()(const value_type& message) const { - return std::make_pair(message.version(), message.plugin_hash()); + return { message.slot_id(), message.plugin_name(), message.slot_version(), message.plugin_version() }; } }; @@ -70,10 +75,12 @@ struct plugin_response * The `simplify_request` struct provides a conversion function that converts native data for * simplification (polygons and simplification parameters) to a `proto::SimplifyRequest` message. */ +template struct simplify_request { - using value_type = proto::SimplifyRequest; ///< The protobuf message type. + using value_type = proto::SimplifyRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. + const std::string slot_version_range{ SlotVersionRng.value }; /** * @brief Converts native data for simplification to a `proto::SimplifyRequest` message. @@ -87,10 +94,7 @@ struct simplify_request value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const { value_type message{}; - message.set_max_resolution(max_resolution); - message.set_max_deviation(max_resolution); - message.set_max_area_deviation(max_resolution); - + message.set_slot_version_range(slot_version_range); if (polygons.empty()) { return message; @@ -108,7 +112,7 @@ struct simplify_request } auto* msg_holes = msg_polygon->mutable_holes(); - for (const auto& polygon : polygons.paths | ranges::views::drop(1)) + for (const auto& polygon : polygons.paths | ranges::views::drop(1)) { auto* msg_hole = msg_holes->Add(); for (const auto& point : polygon) @@ -118,6 +122,10 @@ struct simplify_request msg_path->set_y(point.Y); } } + + message.set_max_resolution(max_resolution); + message.set_max_deviation(max_resolution); + message.set_max_area_deviation(max_resolution); return message; } }; @@ -171,10 +179,12 @@ struct simplify_response * The `postprocess_request` struct provides a conversion function that converts a native G-code string * to a `proto::PostprocessRequest` message. */ +template struct postprocess_request { using value_type = proto::PostprocessRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. + const std::string slot_version_range{ SlotVersionRng.value }; /** * @brief Converts a native G-code string to a `proto::PostprocessRequest` message. @@ -185,6 +195,7 @@ struct postprocess_request value_type operator()(const native_value_type& gcode) const { value_type message{}; + message.set_slot_version_range(slot_version_range); message.set_gcode_word(gcode); return message; } diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 588cfecfa5..a46e2cf958 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -32,15 +32,17 @@ namespace cura::plugins * @tparam Request The gRPC convertible request type. * @tparam Response The gRPC convertible response type. */ -template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response> +template class PluginProxy { public: // type aliases for easy use using value_type = typename Response::native_value_type; - using request_plugin_t = typename plugin_request::value_type; - using response_plugin_t = typename plugin_response::value_type; + using validator_t = Validator; + + using request_plugin_t = typename proto::PluginRequest; + using response_plugin_t = typename proto::PluginResponse; using request_process_t = typename Request::value_type; using response_process_t = typename Response::value_type; @@ -48,20 +50,17 @@ class PluginProxy using request_converter_t = Request; using response_converter_t = Response; - using validator_t = Validator; - using process_stub_t = Stub; + using stub_t = Stub; static inline constexpr plugins::SlotID slot_id{ Slot }; private: - validator_t valid_; ///< The validator object for plugin validation. - request_converter_t request_converter_; ///< The request converter object. + validator_t valid_; ///< The validator object for plugin validation. + request_converter_t request_converter_; ///< The request converter object. response_converter_t response_converter_; ///< The response converter object. - grpc::Status status_; ///< The gRPC status object. - - proto::Plugin::Stub plugin_stub_; ///< The gRPC stub for plugin communication. - process_stub_t process_stub_; ///< The gRPC stub for process communication. + grpc::Status status_; ///< The gRPC status object. + stub_t stub_; ///< The gRPC stub for communication. public: @@ -76,7 +75,7 @@ class PluginProxy * * @throws std::runtime_error if the plugin fails validation or communication errors occur. */ - PluginProxy(std::shared_ptr channel) : plugin_stub_(channel), process_stub_(channel) + PluginProxy(std::shared_ptr channel) : stub_(channel) { agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? @@ -84,17 +83,17 @@ class PluginProxy grpc_context, [&]() -> boost::asio::awaitable { - using RPC = agrpc::RPC<&proto::Plugin::Stub::PrepareAsyncIdentify>; + using RPC = agrpc::RPC<&stub_t::PrepareAsyncIdentify>; grpc::ClientContext client_context{}; - plugin_request plugin_request_conv{}; + plugin_request plugin_request_conv{}; request_plugin_t request{ plugin_request_conv(slot_id) }; response_plugin_t response{}; - status_ = co_await RPC::request(grpc_context, plugin_stub_, client_context, request, response, boost::asio::use_awaitable); + status_ = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); plugin_response plugin_response_conv{}; - auto [version, _] = plugin_response_conv(response); + const auto& [slot_id, plugin_name, slot_version, plugin_version] = plugin_response_conv(response); spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); - valid_ = Validator{ version }; - spdlog::info("Plugin: {} validated: {}", slot_id, static_cast(valid_)); + valid_ = Validator{ slot_version }; + spdlog::info("Slot: '{}' with plugin: '{}' version: '{}' is validated: {}", slot_id, plugin_name, plugin_version, static_cast(valid_)); }, boost::asio::detached); grpc_context.run(); @@ -136,11 +135,11 @@ class PluginProxy { grpc::ClientContext client_context{}; request_process_t request{ request_converter_(std::forward(args)...) }; -// spdlog::debug("Request: {}", request.DebugString()); + // spdlog::debug("Request: {}", request.DebugString()); response_process_t response{}; - status_ = co_await Prepare::request(grpc_context, process_stub_, client_context, request, response, boost::asio::use_awaitable); + status_ = co_await Prepare::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); ret_value = response_converter_(response); -// spdlog::debug("Response: {}", response.DebugString()); + // spdlog::debug("Response: {}", response.DebugString()); }, boost::asio::detached); grpc_context.run(); diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 018af6292d..65f70fd291 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -34,11 +34,11 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template Validator, class Stub, class Prepare, grpc_convertable Request, grpc_convertable Response, class Default> +template class Validator, class Stub, class Prepare, template class Request, class Response, class Default> class SlotProxy { Default default_process{}; - std::optional> plugin_{ std::nullopt }; + std::optional, Stub, Prepare, Request, Response>> plugin_{ std::nullopt }; public: static inline constexpr plugins::SlotID slot_id{ Slot }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 15163cd098..8efdfa4fe2 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -48,7 +48,8 @@ struct simplify_default */ template using simplify_slot = SlotProxy, + "<=0.0.1", + Validator, proto::Simplify::Stub, agrpc::RPC<&proto::Simplify::Stub::PrepareAsyncSimplify>, simplify_request, @@ -64,7 +65,8 @@ using simplify_slot = SlotProxy using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", "qwerty-azerty-temp-hash">, + ">=1.0.0 <2.0.0 || >3.2.1", + Validator, proto::Postprocess::Stub, agrpc::RPC<&proto::Postprocess::Stub::PrepareAsyncPostprocess>, postprocess_request, diff --git a/include/plugins/validator.h b/include/plugins/validator.h index 88c9fefcfb..6a2eb42b4b 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -20,12 +20,11 @@ namespace cura::plugins * @tparam VersionRange The version range specified as a character range literal. * @tparam PluginHash The plugin hash specified as a character range literal. */ -template +template class Validator { semver::range::detail::range semver_range_{ VersionRange.value }; ///< The semver range object. semver::version version_{ "1.0.0" }; ///< The version to validate. - std::string_view plugin_hash_{}; ///< The plugin hash to validate. TODO: implement and use bool include_prerelease_{ false }; ///< Flag indicating whether to include prerelease versions. bool valid_{ false }; ///< Flag indicating the validity of the version. From 3ac6a0dade5433606ed7050fc69eacf8cb2cef46 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 21 May 2023 18:48:29 +0200 Subject: [PATCH 064/470] Added ValidatorException [CURA-10475] --- include/plugins/exception.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/plugins/exception.h diff --git a/include/plugins/exception.h b/include/plugins/exception.h new file mode 100644 index 0000000000..4aa601298e --- /dev/null +++ b/include/plugins/exception.h @@ -0,0 +1,36 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef UTILS_CONCEPTS_GRAPH_H +#define UTILS_CONCEPTS_GRAPH_H + +#include + +#include +#include +#include + +#include "plugins/types.h" + +namespace cura::plugins::exceptions +{ + +class ValidatorException : public std::exception +{ + std::string msg_; + +public: + ValidatorException(auto validator, std::string plugin_name, const std::string& plugin_version, const std::string& plugin_target) noexcept + : msg_(fmt::format("Plugin {} '{}' at {} failed validation: {}", plugin_name, plugin_version, plugin_target, validator.what())) + { + } + + virtual const char* what() const noexcept override + { + return msg_.c_str(); + } +}; + +} // namespace cura::plugins::exceptions + +#endif // UTILS_CONCEPTS_GRAPH_H \ No newline at end of file From 476d81b964bb53fdbadd3a5d4f77cdf99e68b27f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 21 May 2023 18:52:18 +0200 Subject: [PATCH 065/470] Fix variant storage in array, using typelist This commit updates the include/plugins/slots.h file, making several changes and improvements. Added #include to include the necessary header. Removed the unnecessary utils/Simplify.h inclusion, with a comment to remove it once the simplify slot has been removed. Added utils/IntPoint.h inclusion for future use. Refactored the default_process struct's operator() for better code readability. Updated the simplify_default struct's definition. Refactored the simplify_slot and postprocess_slot aliases for better readability. Added the Typelist and Registry template classes for managing plugin slots. Added the SingletonRegistry template struct for ensuring a singleton instance of the registry. Updated the simplify_t and postprocess_t aliases to use the new registry classes. These changes improve the code structure, organization, and maintainability of the plugin slot management system in the Cura software." [CURA-10475] --- include/plugins/slots.h | 143 +++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 8efdfa4fe2..c7fa093333 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -4,6 +4,7 @@ #ifndef PLUGINS_SLOTS_H #define PLUGINS_SLOTS_H +#include #include #include #include @@ -14,8 +15,9 @@ #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" -#include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed +#include "utils/IntPoint.h" #include "utils/NoCopy.h" +#include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed #include "plugin.grpc.pb.h" #include "postprocess.grpc.pb.h" @@ -27,7 +29,10 @@ namespace details { struct default_process { - constexpr auto operator()(auto&& arg, auto&&...){ return std::forward(arg); }; + constexpr auto operator()(auto&& arg, auto&&...) + { + return std::forward(arg); + }; }; struct simplify_default @@ -47,14 +52,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using simplify_slot = SlotProxy, - simplify_request, - simplify_response, - Default>; +using simplify_slot = SlotProxy, simplify_request, simplify_response, Default>; /** * @brief Alias for the Postprocess slot. @@ -64,80 +62,93 @@ using simplify_slot = SlotProxy -using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", - Validator, - proto::Postprocess::Stub, - agrpc::RPC<&proto::Postprocess::Stub::PrepareAsyncPostprocess>, - postprocess_request, - postprocess_response, - Default>; +using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", Validator, proto::Postprocess::Stub, agrpc::RPC<&proto::Postprocess::Stub::PrepareAsyncPostprocess>, postprocess_request, postprocess_response, Default>; -} // namespace details +template +struct Typelist +{ +}; -/** - * @brief Class for managing plugin slots. - * - * The `Slots` class provides functionality to manage plugin slots. It allows registering and retrieving plugins - * for specific slots. - * - * @tparams SlotTypes The different slot types. - */ -template -class Slots +template class Unit> +class Registry; + +template class Unit> +class Registry, Unit> { - using slots_t = std::variant; ///< The variant representing available slots. - std::unordered_map slots_{}; ///< The map storing registered slots. +}; - constexpr Slots() noexcept = default; +template class Unit> +class Registry, Unit> : public Registry, Unit> +{ public: - Slots(const Slots&) = delete; - Slots(Slots&&) = delete; - - /** - * @brief Returns the instance of the Slots class. - * - * @return The instance of the Slots class. - */ - static Slots& instance() noexcept + using ValueType = T; + using Base = Registry, Unit>; + + template + Tp& get() { - static Slots instance{}; - return instance; + return get_type().value; } - /** - * @brief Registers a plugin for the specified slot. - * - * @param plugin The plugin to register. - */ - constexpr void set(auto&& plugin) + template + auto call(auto&&... args) { - using plugin_t = decltype(plugin); -#ifdef PLUGINS - slots_.emplace(plugin.slot_id, std::forward(plugin)); -#else - slots_.emplace(plugin.slot_id, std::forward(plugin_t{})); // Allways create a default (not connected) plugin -#endif + auto holder = get_type(); + return std::invoke(holder.value, std::forward(args)...); } - /** - * @brief Retrieves the plugin for the specified slot. - * - * @tparam SlotID The ID of the slot. - * @return The plugin for the specified slot. - */ - template - constexpr auto get() const +private: + template + Unit& get_type() { - return std::get(slots_.at(SlotID)); + return get_helper(std::is_same{}); } + + template + Unit& get_helper(std::true_type) + { + return value_; + } + + template + Unit& get_helper(std::false_type) + { + return Base::template get_type(); + } + + Unit value_; }; +template class Unit> +class SingletonRegistry +{ +public: + static Registry& instance() + { + static Registry instance; + return instance; + } + +private: + SingletonRegistry() + { + } +}; + +template +struct Holder +{ + T value; + // agrpc::GrpcContext context; +}; + +} // namespace details + using simplify_t = details::simplify_slot; using postprocess_t = details::postprocess_slot<>; -// The Template arguments should be ordered in the same ordering as the SlotID enum -using slot_registry = plugins::Slots; +using SlotTypes = details::Typelist; +using slot_registry = details::SingletonRegistry; } // namespace cura::plugins From aceef5066f86b3ebd5dcc22e022602df5097eb65 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 21 May 2023 18:53:23 +0200 Subject: [PATCH 066/470] Update the validator This commit modifies the include/plugins/validator.h file, introducing improvements and enhancements to the validator class used in plugin validation. Added the header for improved formatting capabilities. Rearranged the header includes for better organization. Modified the Validator class constructor to handle invalid formatted versions gracefully, providing an informative error message. Updated the valid_version() function to provide a more detailed error message when the version is not within the required range. Added a what() member function to retrieve the error message associated with an invalid version. Improved code readability and added appropriate comments. [CURA-10475] --- include/plugins/validator.h | 51 ++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/include/plugins/validator.h b/include/plugins/validator.h index 6a2eb42b4b..d6e791fcfa 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -4,10 +4,11 @@ #ifndef PLUGINS_VALIDATOR_H #define PLUGINS_VALIDATOR_H -#include "plugins/types.h" - +#include #include +#include "plugins/types.h" + namespace cura::plugins { @@ -25,8 +26,9 @@ class Validator { semver::range::detail::range semver_range_{ VersionRange.value }; ///< The semver range object. semver::version version_{ "1.0.0" }; ///< The version to validate. - bool include_prerelease_{ false }; ///< Flag indicating whether to include prerelease versions. + bool include_prerelease_{ true }; ///< Flag indicating whether to include prerelease versions. bool valid_{ false }; ///< Flag indicating the validity of the version. + std::string what_{}; public: /** @@ -39,7 +41,20 @@ class Validator * * @param version The version to validate. */ - constexpr explicit Validator(std::string_view version) : version_{ version }, valid_{ valid_version() } {}; + constexpr explicit Validator(std::string_view version) noexcept + { + auto semver_version = semver::from_string_noexcept(version); + if (semver_version.has_value()) + { + version_ = semver_version.value(); + valid_ = valid_version(); + } + else + { + valid_ = false; + what_ = fmt::format("Received invalid formatted version {} from plugin, expected version according to semver.", version); + } + }; /** * @brief Conversion operator to bool. @@ -51,30 +66,26 @@ class Validator return valid_; } - /** - * @brief Checks if the version is valid according to the specified version range. - * - * @return True if the version is valid, false otherwise. - */ - [[nodiscard]] constexpr bool valid_version() const + constexpr std::string_view what() const noexcept { - return semver_range_.satisfies(version_, include_prerelease_); + return what_; } + /** - * @brief Returns the version string. + * @brief Checks if the version is valid according to the specified version range. * - * @return The version string. + * @return True if the version is valid, false otherwise. */ - std::string getVersion() const + [[nodiscard]] constexpr bool valid_version() noexcept { - return version_.to_string(); + auto valid_version{ semver_range_.satisfies(version_, include_prerelease_) }; + if (! valid_version) + { + what_ = fmt::format("CuraEngine requires a 'slot version' within the range of '{}', while the plugin reports to have version: '{}'", VersionRange.value, version_.to_string()); + } + return valid_version; } - - /** - * @brief The version range specified as a string view. - */ - static inline constexpr std::string_view version_range{ VersionRange.value }; }; } // namespace cura::plugins From a1842e78551be3ea3d48cb118c25ace8653855d1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 21 May 2023 18:55:22 +0200 Subject: [PATCH 067/470] Update Slot/Plugin proxies to work with new exceptions This commit updates the pluginproxy.h and slotproxy.h header files with the following changes: In pluginproxy.h: Added necessary #include statements and dependencies. Introduced member variables to store plugin information. Modified the constructor to include plugin initialization and validation logic. Modified the operator() function to include plugin execution and error handling. In slotproxy.h: Added a required #include statement. Modified the constructor and operator() function to handle plugin availability and error handling. These changes enhance the functionality and error handling of the proxy classes for plugins. [CURA-10475] --- include/plugins/pluginproxy.h | 137 ++++++++++++++++++++-------------- include/plugins/slotproxy.h | 21 +++++- 2 files changed, 100 insertions(+), 58 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index a46e2cf958..57657f27cc 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -4,16 +4,18 @@ #ifndef PLUGINS_PLUGINPROXY_H #define PLUGINS_PLUGINPROXY_H -#include - #include #include #include #include #include +#include +#include #include #include +#include "plugins/exception.h" + #include "plugin.grpc.pb.h" namespace cura::plugins @@ -55,13 +57,16 @@ class PluginProxy static inline constexpr plugins::SlotID slot_id{ Slot }; private: - validator_t valid_; ///< The validator object for plugin validation. - request_converter_t request_converter_; ///< The request converter object. - response_converter_t response_converter_; ///< The response converter object. + validator_t valid_{}; ///< The validator object for plugin validation. + request_converter_t request_converter_{}; ///< The request converter object. + response_converter_t response_converter_{}; ///< The response converter object. grpc::Status status_; ///< The gRPC status object. stub_t stub_; ///< The gRPC stub for communication. - + std::string plugin_name_{}; ///< The name of the plugin. + std::string plugin_version_{}; ///< The version of the plugin. + std::string plugin_peer_{}; ///< The peer of the plugin. + bool plugin_ready_{ false }; ///< Whether the plugin is ready for communication. public: /** @@ -75,40 +80,22 @@ class PluginProxy * * @throws std::runtime_error if the plugin fails validation or communication errors occur. */ + constexpr PluginProxy() = default; + PluginProxy(std::shared_ptr channel) : stub_(channel) { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - boost::asio::co_spawn( - grpc_context, - [&]() -> boost::asio::awaitable - { - using RPC = agrpc::RPC<&stub_t::PrepareAsyncIdentify>; - grpc::ClientContext client_context{}; - plugin_request plugin_request_conv{}; - request_plugin_t request{ plugin_request_conv(slot_id) }; - response_plugin_t response{}; - status_ = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); - plugin_response plugin_response_conv{}; - const auto& [slot_id, plugin_name, slot_version, plugin_version] = plugin_response_conv(response); - spdlog::debug("Received response from plugin '{}': {}", slot_id, response.DebugString()); - valid_ = Validator{ slot_version }; - spdlog::info("Slot: '{}' with plugin: '{}' version: '{}' is validated: {}", slot_id, plugin_name, plugin_version, static_cast(valid_)); - }, - boost::asio::detached); + // Give the plugin some time to start up and initiate handshake + agrpc::GrpcContext grpc_context; + boost::asio::co_spawn(grpc_context, wait_for_plugin_ready(grpc_context, channel), boost::asio::detached); grpc_context.run(); - - if (! valid_) - { - throw std::runtime_error(fmt::format("Could not validate plugin '{}'", slot_id)); - } - - if (! status_.ok()) - { - throw std::runtime_error(fmt::format("Communication with plugin '{}' {}", slot_id, status_.error_message())); - } } + constexpr PluginProxy(const PluginProxy&) = default; + constexpr PluginProxy(PluginProxy&&) = default; + constexpr PluginProxy& operator=(const PluginProxy&) = default; + constexpr PluginProxy& operator=(PluginProxy&&) = default; + ~PluginProxy() = default; + /** * @brief Executes the plugin operation. * @@ -124,32 +111,72 @@ class PluginProxy */ value_type operator()(auto&&... args) { + agrpc::GrpcContext grpc_context; value_type ret_value{}; - if (valid_) + boost::asio::co_spawn( + grpc_context, + [&]() -> boost::asio::awaitable + { + const auto deadline = std::chrono::system_clock::now() + std::chrono::milliseconds(10); // TODO use deadline + grpc::ClientContext client_context{}; + request_process_t request{ request_converter_(std::forward(args)...) }; + response_process_t response{}; + status_ = co_await Prepare::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = response_converter_(response); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status_.ok()) { - agrpc::GrpcContext grpc_context; // TODO: figure out how the reuse the grpc_context, it is recommended to use 1 per thread. Maybe move this to the lot registry?? - - boost::asio::co_spawn( - grpc_context, - [&]() -> boost::asio::awaitable - { - grpc::ClientContext client_context{}; - request_process_t request{ request_converter_(std::forward(args)...) }; - // spdlog::debug("Request: {}", request.DebugString()); - response_process_t response{}; - status_ = co_await Prepare::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = response_converter_(response); - // spdlog::debug("Response: {}", response.DebugString()); - }, - boost::asio::detached); - grpc_context.run(); + throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_id, plugin_name_, plugin_version_, plugin_name_, status_.error_message())); } + return ret_value; + } - if (! status_.ok()) +private: + boost::asio::awaitable wait_for_plugin_ready(agrpc::GrpcContext& grpc_context, std::shared_ptr channel, const std::chrono::seconds& timeout = std::chrono::seconds(5)) + { + const auto deadline = std::chrono::system_clock::now() + timeout; + + const auto state = channel->GetState(true); + bool has_state_changed = co_await agrpc::notify_on_state_change(grpc_context, *channel, state, deadline); + if (has_state_changed) + { + auto plugin_connection_state = channel->GetState(true); + if (plugin_connection_state != grpc_connectivity_state::GRPC_CHANNEL_READY && plugin_connection_state != grpc_connectivity_state::GRPC_CHANNEL_CONNECTING) + { + throw std::runtime_error(fmt::format("Plugin for slot {} is not ready", slot_id)); + } + co_await handshake(grpc_context, timeout); + if (! valid_) + { + throw exceptions::ValidatorException(valid_, plugin_name_, plugin_version_, plugin_peer_); + } + plugin_ready_ = true; + } + } + + boost::asio::awaitable handshake(agrpc::GrpcContext& grpc_context, const std::chrono::seconds& timeout = std::chrono::seconds(5)) + { + const auto deadline = std::chrono::system_clock::now() + timeout; // TODO use deadline + using RPC = agrpc::RPC<&stub_t::PrepareAsyncIdentify>; + grpc::ClientContext client_context{}; + plugin_request plugin_request_conv{}; + request_plugin_t request{ plugin_request_conv(slot_id) }; + response_plugin_t response{}; + auto status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); + if (! status.ok()) { - throw std::runtime_error(fmt::format("Communication with plugin '{}' failed, due: {}", slot_id, status_.error_message())); + throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_id, plugin_name_, plugin_version_, plugin_name_, status_.error_message())); } - return ret_value; // FIXME: handle plugin not connected + spdlog::debug("Plugin responded with: {}", response.DebugString()); + plugin_response plugin_response_conv{}; + const auto& [rsp_slot_id, rsp_plugin_name, rsp_slot_version, rsp_plugin_version] = plugin_response_conv(response); + plugin_name_ = rsp_plugin_name; + plugin_version_ = rsp_plugin_version; + plugin_peer_ = client_context.peer(); + valid_ = Validator{ rsp_slot_version }; } }; } // namespace cura::plugins diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 65f70fd291..cac16792cb 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,6 +4,7 @@ #ifndef PLUGINS_SLOTPROXY_H #define PLUGINS_SLOTPROXY_H +#include #include #include #include @@ -48,7 +49,7 @@ class SlotProxy * * Constructs a SlotProxy object without initializing the plugin. */ - constexpr SlotProxy() noexcept = default; + SlotProxy() noexcept = default; /** * @brief Constructs a SlotProxy object with a plugin. @@ -59,6 +60,12 @@ class SlotProxy */ SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; + constexpr SlotProxy(const SlotProxy&) noexcept = default; + constexpr SlotProxy(SlotProxy&&) noexcept = default; + constexpr SlotProxy& operator=(const SlotProxy&) noexcept = default; + constexpr SlotProxy& operator=(SlotProxy&&) noexcept = default; + ~SlotProxy() = default; + /** * @brief Executes the plugin operation. * @@ -70,11 +77,19 @@ class SlotProxy * @param args The arguments for the plugin request. * @return The result of the plugin request or the default behavior. */ - auto operator()(auto&&... args) + auto operator()(auto&&... args) -> std::invoke_result_t { if (plugin_.has_value()) { - return std::invoke(plugin_.value(), std::forward(args)...); + try + { + return std::invoke(plugin_.value(), std::forward(args)...); + } + catch (const std::exception& e) + { + spdlog::error("Plugin error: {}", e.what()); + exit(1); + } } return std::invoke(default_process, std::forward(args)...); } From a1bc71315f9ff88d0602dc24f52202bbe2e1f95c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 03:25:54 +0200 Subject: [PATCH 068/470] Use invoke to forward call Sill need to figure out how to connect [CURA-10475] --- include/plugins/slots.h | 18 ++++++++---------- src/communication/ArcusCommunication.cpp | 19 +++---------------- src/slicer.cpp | 11 +++++++++-- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index c7fa093333..45a33802ae 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -6,24 +6,21 @@ #include #include -#include -#include - -#include #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" #include "utils/IntPoint.h" -#include "utils/NoCopy.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed #include "plugin.grpc.pb.h" #include "postprocess.grpc.pb.h" #include "simplify.grpc.pb.h" -namespace cura::plugins +namespace cura +{ +namespace plugins { namespace details { @@ -91,10 +88,10 @@ class Registry, Unit> : public Registry } template - auto call(auto&&... args) + auto invoke(auto&&... args) { auto holder = get_type(); - return std::invoke(holder.value, std::forward(args)...); + return std::invoke(holder.proxy, std::forward(args)...); } private: @@ -138,7 +135,7 @@ class SingletonRegistry template struct Holder { - T value; + T proxy; // agrpc::GrpcContext context; }; @@ -148,7 +145,8 @@ using simplify_t = details::simplify_slot; using postprocess_t = details::postprocess_slot<>; using SlotTypes = details::Typelist; -using slot_registry = details::SingletonRegistry; +} // namespace plugins +using slots = plugins::details::SingletonRegistry; } // namespace cura::plugins diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index bc30f98d16..29857b4d72 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -7,8 +7,8 @@ #include //To sleep while waiting for the connection. #include //To map settings to their extruder numbers for limit_to_extruder. -#include #include +#include #include #include "Application.h" //To get and set the current slice command. @@ -517,23 +517,10 @@ void ArcusCommunication::sliceNext() switch (plugin.id()) { case cura::proto::SlotID::SIMPLIFY: - plugins::slot_registry::instance().set(plugins::simplify_t{ create_channel(plugin.address(), plugin.port()) }); - break; - case cura::proto::SlotID::POSTPROCESS: - plugins::slot_registry::instance().set(plugins::postprocess_t{ create_channel(plugin.address(), plugin.port()) }); - break; - default: break; - } - } - else - { - switch (plugin.id()) - { - case cura::proto::SlotID::SIMPLIFY: - plugins::slot_registry::instance().set(plugins::simplify_t{ }); + //slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); break; case cura::proto::SlotID::POSTPROCESS: - plugins::slot_registry::instance().set(plugins::postprocess_t{ }); + //slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); break; default: break; } diff --git a/src/slicer.cpp b/src/slicer.cpp index 4ae513a162..c82c3e82a5 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -774,8 +774,15 @@ void SlicerLayer::makePolygons(const Mesh* mesh) // Finally optimize all the polygons. Every point removed saves time in the long run. // polygons = Simplify(mesh->settings).polygon(polygons); - auto simplify = plugins::slot_registry::instance().get(); - polygons = simplify(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), mesh->settings.get("meshfix_maximum_extrusion_area_deviation")); + // TODO: Clean up + auto x = slots::instance().invoke(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); +// auto y = x(); +// auto z = plugins::slot_registry::instance().call(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); + + + //(polygons, mesh->settings.get("meshfix_maxconnectimum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), mesh->settings.get("meshfix_maximum_extrusion_area_deviation")); +// auto simplify = plugins::slot_registry::instance().get(); +// polygons = simplify(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), mesh->settings.get("meshfix_maximum_extrusion_area_deviation")); polygons.removeDegenerateVerts(); // remove verts connected to overlapping line segments From 2160158541741cc14a017f45e917e6b9cb7830cd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 10:00:35 +0200 Subject: [PATCH 069/470] Fixed the connect functionality In the file include/plugins/pluginproxy.h: Added the ranges::semiregular_box member variable stub_ to the PluginProxy class. Removed the plugin_ready_ member variable. In the file src/communication/ArcusCommunication.cpp: Uncommented the lines that connect the simplify and postprocess plugins. In the file include/plugins/slotproxy.h: Replaced the std::optional> member variable plugin_ with value_type. Updated the constructors and assignment operators accordingly. In the file src/slicer.cpp: Removed the TODO comment and unnecessary code related to invoking the simplify_slot plugin. In the file include/plugins/slots.h: Updated the version requirements in the simplify_slot and postprocess_slot aliases. In the SingletonRegistry class: Added a connect member function to connect a plugin to a slot. [CURA-10475] --- include/plugins/pluginproxy.h | 38 +++++++++++++++++++----- include/plugins/slotproxy.h | 19 ++---------- include/plugins/slots.h | 32 ++++++++++---------- src/communication/ArcusCommunication.cpp | 4 +-- src/slicer.cpp | 11 +------ 5 files changed, 54 insertions(+), 50 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 57657f27cc..18601b9d47 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -62,11 +63,10 @@ class PluginProxy response_converter_t response_converter_{}; ///< The response converter object. grpc::Status status_; ///< The gRPC status object. - stub_t stub_; ///< The gRPC stub for communication. + ranges::semiregular_box stub_; ///< The gRPC stub for communication. std::string plugin_name_{}; ///< The name of the plugin. std::string plugin_version_{}; ///< The version of the plugin. std::string plugin_peer_{}; ///< The peer of the plugin. - bool plugin_ready_{ false }; ///< Whether the plugin is ready for communication. public: /** @@ -82,7 +82,7 @@ class PluginProxy */ constexpr PluginProxy() = default; - PluginProxy(std::shared_ptr channel) : stub_(channel) + explicit PluginProxy(std::shared_ptr channel) : stub_(channel) { // Give the plugin some time to start up and initiate handshake agrpc::GrpcContext grpc_context; @@ -91,9 +91,34 @@ class PluginProxy } constexpr PluginProxy(const PluginProxy&) = default; - constexpr PluginProxy(PluginProxy&&) = default; - constexpr PluginProxy& operator=(const PluginProxy&) = default; - constexpr PluginProxy& operator=(PluginProxy&&) = default; + constexpr PluginProxy(PluginProxy&&) noexcept = default; + constexpr PluginProxy& operator=(const PluginProxy& other) + { + if (this != &other) + { + valid_ = other.valid_; + status_ = other.status_; + stub_ = other.stub_; + plugin_name_ = other.plugin_name_; + plugin_version_ = other.plugin_version_; + plugin_peer_ = other.plugin_peer_; + } + return *this; + } + + constexpr PluginProxy& operator=(PluginProxy&& other) + { + if (this != &other) + { + valid_ = std::move(other.valid_); + status_ = std::move(other.status_); + stub_ = std::move(other.stub_); // FIXME: the stub should be moved + plugin_name_ = std::move(other.plugin_name_); + plugin_version_ = std::move(other.plugin_version_); + plugin_peer_ = std::move(other.plugin_peer_); + } + return *this; + } ~PluginProxy() = default; /** @@ -153,7 +178,6 @@ class PluginProxy { throw exceptions::ValidatorException(valid_, plugin_name_, plugin_version_, plugin_peer_); } - plugin_ready_ = true; } } diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index cac16792cb..58f6b5766e 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -39,7 +39,8 @@ template, Stub, Prepare, Request, Response>> plugin_{ std::nullopt }; + using value_type = PluginProxy, Stub, Prepare, Request, Response>; + std::optional plugin_{ std::nullopt }; public: static inline constexpr plugins::SlotID slot_id{ Slot }; @@ -60,12 +61,6 @@ class SlotProxy */ SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; - constexpr SlotProxy(const SlotProxy&) noexcept = default; - constexpr SlotProxy(SlotProxy&&) noexcept = default; - constexpr SlotProxy& operator=(const SlotProxy&) noexcept = default; - constexpr SlotProxy& operator=(SlotProxy&&) noexcept = default; - ~SlotProxy() = default; - /** * @brief Executes the plugin operation. * @@ -81,15 +76,7 @@ class SlotProxy { if (plugin_.has_value()) { - try - { - return std::invoke(plugin_.value(), std::forward(args)...); - } - catch (const std::exception& e) - { - spdlog::error("Plugin error: {}", e.what()); - exit(1); - } + return std::invoke(plugin_.value(), std::forward(args)...); } return std::invoke(default_process, std::forward(args)...); } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 45a33802ae..6abd20935a 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -49,7 +49,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using simplify_slot = SlotProxy, simplify_request, simplify_response, Default>; +using simplify_slot = SlotProxy, simplify_request, simplify_response, Default>; /** * @brief Alias for the Postprocess slot. @@ -59,7 +59,7 @@ using simplify_slot = SlotProxy -using postprocess_slot = SlotProxy=1.0.0 <2.0.0 || >3.2.1", Validator, proto::Postprocess::Stub, agrpc::RPC<&proto::Postprocess::Stub::PrepareAsyncPostprocess>, postprocess_request, postprocess_response, Default>; +using postprocess_slot = SlotProxy, postprocess_request, postprocess_response, Default>; template struct Typelist @@ -82,33 +82,38 @@ class Registry, Unit> : public Registry using Base = Registry, Unit>; template - Tp& get() + constexpr Tp& get() { - return get_type().value; + return get_type().proxy; } template - auto invoke(auto&&... args) + constexpr auto invoke(auto&&... args) { - auto holder = get_type(); - return std::invoke(holder.proxy, std::forward(args)...); + return std::invoke(get(), std::forward(args)...); + } + + template + void connect(auto&& plugin) + { + get_type().proxy = Tp { std::forward( std::move(plugin) ) }; } private: template - Unit& get_type() + constexpr Unit& get_type() { return get_helper(std::is_same{}); } template - Unit& get_helper(std::true_type) + constexpr Unit& get_helper(std::true_type) { return value_; } template - Unit& get_helper(std::false_type) + constexpr Unit& get_helper(std::false_type) { return Base::template get_type(); } @@ -127,16 +132,13 @@ class SingletonRegistry } private: - SingletonRegistry() - { - } + constexpr SingletonRegistry() = default; }; template struct Holder { T proxy; - // agrpc::GrpcContext context; }; } // namespace details @@ -148,6 +150,6 @@ using SlotTypes = details::Typelist; } // namespace plugins using slots = plugins::details::SingletonRegistry; -} // namespace cura::plugins +} // namespace cura #endif // PLUGINS_SLOTS_H diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 29857b4d72..cee329dd9f 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -517,10 +517,10 @@ void ArcusCommunication::sliceNext() switch (plugin.id()) { case cura::proto::SlotID::SIMPLIFY: - //slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); + slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); break; case cura::proto::SlotID::POSTPROCESS: - //slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); + slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); break; default: break; } diff --git a/src/slicer.cpp b/src/slicer.cpp index c82c3e82a5..de11c5f4dd 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -774,16 +774,7 @@ void SlicerLayer::makePolygons(const Mesh* mesh) // Finally optimize all the polygons. Every point removed saves time in the long run. // polygons = Simplify(mesh->settings).polygon(polygons); - // TODO: Clean up - auto x = slots::instance().invoke(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); -// auto y = x(); -// auto z = plugins::slot_registry::instance().call(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); - - - //(polygons, mesh->settings.get("meshfix_maxconnectimum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), mesh->settings.get("meshfix_maximum_extrusion_area_deviation")); -// auto simplify = plugins::slot_registry::instance().get(); -// polygons = simplify(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), mesh->settings.get("meshfix_maximum_extrusion_area_deviation")); - + polygons = slots::instance().invoke(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); polygons.removeDegenerateVerts(); // remove verts connected to overlapping line segments // Clean up polylines for Surface Mode printing From 37695c3436e72e521816e7f8062fce5dd09c605f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 10:28:11 +0200 Subject: [PATCH 070/470] Made Base friend for CRTP of slots [CURA-10475] --- include/plugins/slots.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 6abd20935a..e51325f74a 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -80,6 +80,7 @@ class Registry, Unit> : public Registry public: using ValueType = T; using Base = Registry, Unit>; + friend Base; template constexpr Tp& get() @@ -99,7 +100,7 @@ class Registry, Unit> : public Registry get_type().proxy = Tp { std::forward( std::move(plugin) ) }; } -private: +protected: template constexpr Unit& get_type() { From 7f1f8299cbbf752985595e60572af53ff412b5e9 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 10:47:42 +0200 Subject: [PATCH 071/470] Setting the plugin is no longer needed. Since this is done when the registry instance [CURA-10475] --- tests/integration/SlicePhaseTest.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/integration/SlicePhaseTest.cpp b/tests/integration/SlicePhaseTest.cpp index 8a9b4cd9c6..23913d95f9 100644 --- a/tests/integration/SlicePhaseTest.cpp +++ b/tests/integration/SlicePhaseTest.cpp @@ -8,7 +8,6 @@ #include "utils/FMatrix4x3.h" // To load STL files. #include "utils/polygon.h" // Creating polygons to compare to sliced layers. #include "utils/polygonUtils.h" // Comparing similarity of polygons. -#include "plugins/slots.h" #include #include @@ -27,8 +26,6 @@ class SlicePhaseTest : public testing::Test { // Start the thread pool Application::getInstance().startThreadPool(); - plugins::slot_registry::instance().set(plugins::simplify_t{}); - plugins::slot_registry::instance().set(plugins::postprocess_t{}); // Set up a scene so that we may request settings. Application::getInstance().current_slice = new Slice(1); From 8719e64df4f780d00bfa8a8917e5877690e9f712 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 10:50:01 +0200 Subject: [PATCH 072/470] Fixed simplify benchmarks It now uses the new logic [CURA-10475] --- benchmark/simplify_benchmark.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 71cb18ee8d..9a5d715dda 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -77,19 +77,18 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St try { - plugins::slot_registry::instance().set(plugins::simplify_t{ grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())}); + slots::instance().connect( grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials()))); } catch (std::runtime_error e) { st.SkipWithError(e.what()); } - auto simplify = plugins::slot_registry::instance().get(); for (auto _ : st) { Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } From 5f4e7833f3cd7cf6641977c4a019e3ccf340a0b7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 10:50:01 +0200 Subject: [PATCH 073/470] Fixed simplify benchmarks It now uses the new logic [CURA-10475] --- benchmark/simplify_benchmark.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 9a5d715dda..4d9862e0ce 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -56,14 +56,12 @@ BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_local); BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State& st) { - plugins::slot_registry::instance().set(plugins::simplify_t{}); - auto simplify = plugins::slot_registry::instance().get(); for (auto _ : st) { Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = simplify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } @@ -77,7 +75,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St try { - slots::instance().connect( grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials()))); + slots::instance().connect( grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())); } catch (std::runtime_error e) { From 4ba0d8f7faee24f382c81d619f9d8c78d688092b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 13:59:57 +0200 Subject: [PATCH 074/470] Fix types to work with updated proto types Handshake doesn't work yet. We are gonna use metadata for this [CURA-10475] --- CMakeLists.txt | 7 +-- conanfile.py | 2 +- include/plugins/converters.h | 114 +++++++++++++++++----------------- include/plugins/pluginproxy.h | 49 +++++++-------- include/plugins/slots.h | 5 +- include/plugins/types.h | 4 +- 6 files changed, 86 insertions(+), 95 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb3cd65770..32782b2e94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,18 +14,15 @@ option(ENABLE_PLUGINS "Build with all warnings" ON) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) #set(GRPC_PROTOS "List of all gRPC definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") -message(STATUS ${GRPC_PROTOS}) # Generate the plugin types find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) -asio_grpc_protobuf_generate( - GENERATE_GRPC GENERATE_MOCK_CODE +asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" - PROTOS "${GRPC_PROTOS}" -) + GENERATE_GRPC GENERATE_MOCK_CODE GENERATE_DESCRIPTORS) if (ENABLE_ARCUS) message(STATUS "Building with Arcus") diff --git a/conanfile.py b/conanfile.py index a335e21923..90aab8ad90 100644 --- a/conanfile.py +++ b/conanfile.py @@ -114,7 +114,7 @@ def generate(self): tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info - tc.variables["GRPC_PROTOS"] = ";".join([str(p) for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) + tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) tc.generate() diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 8aca64fe87..2874dd718b 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -13,61 +13,63 @@ #include "plugins/types.h" #include "postprocess.grpc.pb.h" +#include "postprocess.pb.h" #include "simplify.grpc.pb.h" +#include "simplify.pb.h" namespace cura::plugins { - -/** - * @brief A converter struct for plugin requests. - * - * The `plugin_request` struct provides a conversion function that converts a native slot ID - * to a `proto::PluginRequest` message. - */ -template -struct plugin_request -{ - using value_type = proto::PluginRequest; ///< The protobuf message type. - using native_value_type = cura::plugins::SlotID; ///< The native value type. - const std::string slot_version_range{ SlotVersionRng.value }; - - /** - * @brief Converts a native slot ID to a `proto::PluginRequest` message. - * - * @param slot_id The native slot ID. - * @return The converted `proto::PluginRequest` message. - */ - value_type operator()(const native_value_type& slot_id) const - { - value_type message{}; - message.set_slot_version_range(slot_version_range); - message.set_slot_id(slot_id); - return message; - } -}; - -/** - * @brief A converter struct for plugin responses. - * - * The `plugin_response` struct provides a conversion function that converts a `proto::PluginResponse` - * message to a native value type. - */ -struct plugin_response -{ - using value_type = proto::PluginResponse; ///< The protobuf message type. - using native_value_type = std::tuple; ///< The native value type. - - /** - * @brief Converts a `proto::PluginResponse` message to a native value type. - * - * @param message The `proto::PluginResponse` message. - * @return The converted native value. - */ - native_value_type operator()(const value_type& message) const - { - return { message.slot_id(), message.plugin_name(), message.slot_version(), message.plugin_version() }; - } -}; +// +///** +// * @brief A converter struct for plugin requests. +// * +// * The `plugin_request` struct provides a conversion function that converts a native slot ID +// * to a `proto::PluginRequest` message. +// */ +//template +//struct plugin_request +//{ +// using value_type = proto::PluginRequest; ///< The protobuf message type. +// using native_value_type = cura::plugins::SlotID; ///< The native value type. +// const std::string slot_version_range{ SlotVersionRng.value }; +// +// /** +// * @brief Converts a native slot ID to a `proto::PluginRequest` message. +// * +// * @param slot_id The native slot ID. +// * @return The converted `proto::PluginRequest` message. +// */ +// value_type operator()(const native_value_type& slot_id) const +// { +// value_type message{}; +// message.set_slot_version_range(slot_version_range); +// message.set_slot_id(slot_id); +// return message; +// } +//}; +// +///** +// * @brief A converter struct for plugin responses. +// * +// * The `plugin_response` struct provides a conversion function that converts a `proto::PluginResponse` +// * message to a native value type. +// */ +//struct plugin_response +//{ +// using value_type = proto::PluginResponse; ///< The protobuf message type. +// using native_value_type = std::tuple; ///< The native value type. +// +// /** +// * @brief Converts a `proto::PluginResponse` message to a native value type. +// * +// * @param message The `proto::PluginResponse` message. +// * @return The converted native value. +// */ +// native_value_type operator()(const value_type& message) const +// { +// return { message.slot_id(), message.plugin_name(), message.slot_version(), message.plugin_version() }; +// } +//}; /** * @brief A converter struct for simplify requests. @@ -78,7 +80,7 @@ struct plugin_response template struct simplify_request { - using value_type = proto::SimplifyRequest; ///< The protobuf message type. + using value_type = plugins::v1::SimplifyServiceModifyRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. const std::string slot_version_range{ SlotVersionRng.value }; @@ -94,7 +96,6 @@ struct simplify_request value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const { value_type message{}; - message.set_slot_version_range(slot_version_range); if (polygons.empty()) { return message; @@ -138,7 +139,7 @@ struct simplify_request */ struct simplify_response { - using value_type = proto::SimplifyResponse; ///< The protobuf message type. + using value_type = plugins::v1::SimplifyServiceModifyResponse; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -182,7 +183,7 @@ struct simplify_response template struct postprocess_request { - using value_type = proto::PostprocessRequest; ///< The protobuf message type. + using value_type = plugins::v1::PostprocessServiceModifyRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. const std::string slot_version_range{ SlotVersionRng.value }; @@ -195,7 +196,6 @@ struct postprocess_request value_type operator()(const native_value_type& gcode) const { value_type message{}; - message.set_slot_version_range(slot_version_range); message.set_gcode_word(gcode); return message; } @@ -203,7 +203,7 @@ struct postprocess_request struct postprocess_response { - using value_type = proto::PostprocessResponse; + using value_type = plugins::v1::PostprocessServiceModifyResponse; using native_value_type = std::string; native_value_type operator()(const value_type& message) const diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 18601b9d47..0d67a85a47 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -17,8 +17,6 @@ #include "plugins/exception.h" -#include "plugin.grpc.pb.h" - namespace cura::plugins { @@ -44,9 +42,6 @@ class PluginProxy using validator_t = Validator; - using request_plugin_t = typename proto::PluginRequest; - using response_plugin_t = typename proto::PluginResponse; - using request_process_t = typename Request::value_type; using response_process_t = typename Response::value_type; @@ -173,7 +168,7 @@ class PluginProxy { throw std::runtime_error(fmt::format("Plugin for slot {} is not ready", slot_id)); } - co_await handshake(grpc_context, timeout); + //co_await handshake(grpc_context, timeout); if (! valid_) { throw exceptions::ValidatorException(valid_, plugin_name_, plugin_version_, plugin_peer_); @@ -181,27 +176,27 @@ class PluginProxy } } - boost::asio::awaitable handshake(agrpc::GrpcContext& grpc_context, const std::chrono::seconds& timeout = std::chrono::seconds(5)) - { - const auto deadline = std::chrono::system_clock::now() + timeout; // TODO use deadline - using RPC = agrpc::RPC<&stub_t::PrepareAsyncIdentify>; - grpc::ClientContext client_context{}; - plugin_request plugin_request_conv{}; - request_plugin_t request{ plugin_request_conv(slot_id) }; - response_plugin_t response{}; - auto status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); - if (! status.ok()) - { - throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_id, plugin_name_, plugin_version_, plugin_name_, status_.error_message())); - } - spdlog::debug("Plugin responded with: {}", response.DebugString()); - plugin_response plugin_response_conv{}; - const auto& [rsp_slot_id, rsp_plugin_name, rsp_slot_version, rsp_plugin_version] = plugin_response_conv(response); - plugin_name_ = rsp_plugin_name; - plugin_version_ = rsp_plugin_version; - plugin_peer_ = client_context.peer(); - valid_ = Validator{ rsp_slot_version }; - } +// boost::asio::awaitable handshake(agrpc::GrpcContext& grpc_context, const std::chrono::seconds& timeout = std::chrono::seconds(5)) +// { +// const auto deadline = std::chrono::system_clock::now() + timeout; // TODO use deadline +// using RPC = agrpc::RPC<&stub_t::PrepareAsyncIdentify>; +// grpc::ClientContext client_context{}; +// plugin_request plugin_request_conv{}; +// request_plugin_t request{ plugin_request_conv(slot_id) }; +// response_plugin_t response{}; +// auto status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); +// if (! status.ok()) +// { +// throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_id, plugin_name_, plugin_version_, plugin_name_, status_.error_message())); +// } +// spdlog::debug("Plugin responded with: {}", response.DebugString()); +// plugin_response plugin_response_conv{}; +// const auto& [rsp_slot_id, rsp_plugin_name, rsp_slot_version, rsp_plugin_version] = plugin_response_conv(response); +// plugin_name_ = rsp_plugin_name; +// plugin_version_ = rsp_plugin_version; +// plugin_peer_ = client_context.peer(); +// valid_ = Validator{ rsp_slot_version }; +// } }; } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index e51325f74a..2b63c2825f 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -14,7 +14,6 @@ #include "utils/IntPoint.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed -#include "plugin.grpc.pb.h" #include "postprocess.grpc.pb.h" #include "simplify.grpc.pb.h" @@ -49,7 +48,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using simplify_slot = SlotProxy, simplify_request, simplify_response, Default>; +using simplify_slot = SlotProxy, simplify_request, simplify_response, Default>; /** * @brief Alias for the Postprocess slot. @@ -59,7 +58,7 @@ using simplify_slot = SlotProxy -using postprocess_slot = SlotProxy, postprocess_request, postprocess_response, Default>; +using postprocess_slot = SlotProxy, postprocess_request, postprocess_response, Default>; template struct Typelist diff --git a/include/plugins/types.h b/include/plugins/types.h index 050a032d6e..af629b262b 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -13,11 +13,11 @@ #include "utils/concepts/generic.h" #include "utils/polygon.h" -#include "plugin.grpc.pb.h" +#include "slot_id.pb.h" namespace cura::plugins { -using SlotID = proto::SlotID; +using SlotID = plugins::v1::SlotID; namespace details { From 8315a03b12bd8fe9ae7381ef97b36507886e5e31 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 22 May 2023 14:57:02 +0200 Subject: [PATCH 075/470] Don't generate descriptors We don't use them [CURA-10475] --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 32782b2e94..8964268165 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ find_package(asio-grpc REQUIRED) asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" - GENERATE_GRPC GENERATE_MOCK_CODE GENERATE_DESCRIPTORS) + GENERATE_GRPC GENERATE_MOCK_CODE) if (ENABLE_ARCUS) message(STATUS "Building with Arcus") From c273526f140f306f9837db4ac69d68bf6acaf423 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 10:54:03 +0200 Subject: [PATCH 076/470] Refactored plugins and slots This commit refactors the PluginProxy class and converters.h in the include/plugins directory. It introduces validation for plugin requests and responses and handles communication failures. The changes include: Refactored PluginProxy class: The PluginProxy class has been modified to use template parameters for RPC_ID, SlotVersionRng, Stub, ValidatorTp, RequestTp, and ResponseTp. It also uses aliases for easy use of types. Updated request and response converters: The request and response converters have been updated to use the new types. Added validation and communication failure handling: The PluginProxy class now performs validation on plugin requests and responses. It also handles communication failures and throws appropriate exceptions. These changes improve the functionality and reliability of the PluginProxy class and ensure proper validation and error handling during communication with plugins. [CURA-10475] --- include/plugins/converters.h | 68 +-------- include/plugins/metadata.h | 28 ++++ include/plugins/pluginproxy.h | 175 ++++++++++++----------- include/plugins/slotproxy.h | 6 +- include/plugins/slots.h | 12 +- src/communication/ArcusCommunication.cpp | 4 +- src/slicer.cpp | 2 +- 7 files changed, 131 insertions(+), 164 deletions(-) create mode 100644 include/plugins/metadata.h diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 2874dd718b..dc7c77d48d 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -19,70 +19,11 @@ namespace cura::plugins { -// -///** -// * @brief A converter struct for plugin requests. -// * -// * The `plugin_request` struct provides a conversion function that converts a native slot ID -// * to a `proto::PluginRequest` message. -// */ -//template -//struct plugin_request -//{ -// using value_type = proto::PluginRequest; ///< The protobuf message type. -// using native_value_type = cura::plugins::SlotID; ///< The native value type. -// const std::string slot_version_range{ SlotVersionRng.value }; -// -// /** -// * @brief Converts a native slot ID to a `proto::PluginRequest` message. -// * -// * @param slot_id The native slot ID. -// * @return The converted `proto::PluginRequest` message. -// */ -// value_type operator()(const native_value_type& slot_id) const -// { -// value_type message{}; -// message.set_slot_version_range(slot_version_range); -// message.set_slot_id(slot_id); -// return message; -// } -//}; -// -///** -// * @brief A converter struct for plugin responses. -// * -// * The `plugin_response` struct provides a conversion function that converts a `proto::PluginResponse` -// * message to a native value type. -// */ -//struct plugin_response -//{ -// using value_type = proto::PluginResponse; ///< The protobuf message type. -// using native_value_type = std::tuple; ///< The native value type. -// -// /** -// * @brief Converts a `proto::PluginResponse` message to a native value type. -// * -// * @param message The `proto::PluginResponse` message. -// * @return The converted native value. -// */ -// native_value_type operator()(const value_type& message) const -// { -// return { message.slot_id(), message.plugin_name(), message.slot_version(), message.plugin_version() }; -// } -//}; -/** - * @brief A converter struct for simplify requests. - * - * The `simplify_request` struct provides a conversion function that converts native data for - * simplification (polygons and simplification parameters) to a `proto::SimplifyRequest` message. - */ -template struct simplify_request { using value_type = plugins::v1::SimplifyServiceModifyRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. - const std::string slot_version_range{ SlotVersionRng.value }; /** * @brief Converts native data for simplification to a `proto::SimplifyRequest` message. @@ -174,18 +115,11 @@ struct simplify_response } }; -/** - * @brief A converter struct for postprocess requests. - * - * The `postprocess_request` struct provides a conversion function that converts a native G-code string - * to a `proto::PostprocessRequest` message. - */ -template + struct postprocess_request { using value_type = plugins::v1::PostprocessServiceModifyRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. - const std::string slot_version_range{ SlotVersionRng.value }; /** * @brief Converts a native G-code string to a `proto::PostprocessRequest` message. diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h new file mode 100644 index 0000000000..7f9ee17342 --- /dev/null +++ b/include/plugins/metadata.h @@ -0,0 +1,28 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef CURAENGINE_INCLUDE_PLUGINS_METADATA_H +#define CURAENGINE_INCLUDE_PLUGINS_METADATA_H + +#include + +namespace cura::plugins +{ +struct plugin_metadata +{ + std::string name; + std::string version; + std::string peer; + + std::string slot_version; +}; + +struct slot_metadata +{ + std::string_view rpc_id; + std::string_view version_range; +}; + +} // namespace cura::plugins + +#endif // CURAENGINE_INCLUDE_PLUGINS_METADATA_H diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 0d67a85a47..dc80259453 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -6,16 +6,27 @@ #include #include +#include #include #include #include +#include #include -#include +#include +#include +#include #include #include +#include +#include #include +#include #include "plugins/exception.h" +#include "plugins/metadata.h" + +#include "slot_id.pb.h" +#include "utils/concepts/generic.h" namespace cura::plugins { @@ -33,35 +44,32 @@ namespace cura::plugins * @tparam Request The gRPC convertible request type. * @tparam Response The gRPC convertible response type. */ -template +template class PluginProxy { public: // type aliases for easy use - using value_type = typename Response::native_value_type; - - using validator_t = Validator; + using value_type = typename ResponseTp::native_value_type; + using validator_type = ValidatorTp; - using request_process_t = typename Request::value_type; - using response_process_t = typename Response::value_type; + using req_msg_type = typename RequestTp::value_type; + using rsp_msg_type = typename ResponseTp::value_type; - using request_converter_t = Request; - using response_converter_t = Response; + using req_converter_type = RequestTp; + using rsp_converter_type = ResponseTp; using stub_t = Stub; - - static inline constexpr plugins::SlotID slot_id{ Slot }; +// using stub_t = grpc::GenericStub; private: - validator_t valid_{}; ///< The validator object for plugin validation. - request_converter_t request_converter_{}; ///< The request converter object. - response_converter_t response_converter_{}; ///< The response converter object. + validator_type valid_{}; ///< The validator object for plugin validation. + req_converter_type req_{}; ///< The request converter object. + rsp_converter_type rsp_{}; ///< The response converter object. - grpc::Status status_; ///< The gRPC status object. ranges::semiregular_box stub_; ///< The gRPC stub for communication. - std::string plugin_name_{}; ///< The name of the plugin. - std::string plugin_version_{}; ///< The version of the plugin. - std::string plugin_peer_{}; ///< The peer of the plugin. + + constexpr static slot_metadata slot_info_{ .rpc_id = RPC_ID.value, .version_range = SlotVersionRng.value }; + std::optional plugin_info_{ std::nullopt }; ///< The plugin info object. public: /** @@ -76,46 +84,33 @@ class PluginProxy * @throws std::runtime_error if the plugin fails validation or communication errors occur. */ constexpr PluginProxy() = default; - - explicit PluginProxy(std::shared_ptr channel) : stub_(channel) - { - // Give the plugin some time to start up and initiate handshake - agrpc::GrpcContext grpc_context; - boost::asio::co_spawn(grpc_context, wait_for_plugin_ready(grpc_context, channel), boost::asio::detached); - grpc_context.run(); - } - + explicit PluginProxy(std::shared_ptr channel) : stub_(channel){}; constexpr PluginProxy(const PluginProxy&) = default; - constexpr PluginProxy(PluginProxy&&) noexcept = default; + constexpr PluginProxy(PluginProxy&&) noexcept = default; constexpr PluginProxy& operator=(const PluginProxy& other) { if (this != &other) { valid_ = other.valid_; - status_ = other.status_; stub_ = other.stub_; - plugin_name_ = other.plugin_name_; - plugin_version_ = other.plugin_version_; - plugin_peer_ = other.plugin_peer_; + plugin_info_ = other.plugin_info_; } return *this; } - constexpr PluginProxy& operator=(PluginProxy&& other) { if (this != &other) { valid_ = std::move(other.valid_); - status_ = std::move(other.status_); - stub_ = std::move(other.stub_); // FIXME: the stub should be moved - plugin_name_ = std::move(other.plugin_name_); - plugin_version_ = std::move(other.plugin_version_); - plugin_peer_ = std::move(other.plugin_peer_); + stub_ = std::move(other.stub_); + plugin_info_ = std::move(other.plugin_info_); } return *this; } ~PluginProxy() = default; +#pragma clang diagnostic push +#pragma ide diagnostic ignored "cppcoreguidelines-avoid-capture-default-when-capturing-this" /** * @brief Executes the plugin operation. * @@ -133,70 +128,82 @@ class PluginProxy { agrpc::GrpcContext grpc_context; value_type ret_value{}; + grpc::Status status; + boost::asio::co_spawn( grpc_context, [&]() -> boost::asio::awaitable { - const auto deadline = std::chrono::system_clock::now() + std::chrono::milliseconds(10); // TODO use deadline + using RPC = agrpc::RPC<&stub_t::PrepareAsyncModify>; grpc::ClientContext client_context{}; - request_process_t request{ request_converter_(std::forward(args)...) }; - response_process_t response{}; - status_ = co_await Prepare::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = response_converter_(response); + + // Set time-out + client_context.set_deadline(std::chrono::system_clock::now() + std::chrono::milliseconds(500)); // TODO: don't use magic number and make it realistic + + // Metadata + client_context.AddMetadata("cura-slot-service-name", slot_info_.rpc_id.data()); + client_context.AddMetadata("cura-slot-version-range", slot_info_.version_range.data()); + + // Construct request + auto request{ req_(std::forward(args)...) }; + + // Make unary request + rsp_msg_type response; + status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = rsp_(response); + + if (! plugin_info_.has_value()) + { + const auto& metadata_rsp = client_context.GetServerInitialMetadata(); + plugin_info_ = plugin_metadata{ + .name = metadata_rsp.find("cura-plugin-name")->second.data(), + .version = metadata_rsp.find("cura-plugin-version")->second.data(), + .peer = client_context.peer(), + .slot_version = metadata_rsp.find("cura-slot-version")->second.data(), + }; + valid_ = validator_type{ plugin_info_->slot_version }; + } }, boost::asio::detached); grpc_context.run(); - if (! status_.ok()) + if (! status.ok()) // TODO: handle different kind of status codes { - throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_id, plugin_name_, plugin_version_, plugin_name_, status_.error_message())); + if (plugin_info_.has_value()) + { + throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_info_.rpc_id, plugin_info_->name, plugin_info_->version, plugin_info_->peer, status.error_message())); + } + throw std::runtime_error(fmt::format("Slot {} had a communication failure: {}", slot_info_.rpc_id, status.error_message())); } - return ret_value; - } - -private: - boost::asio::awaitable wait_for_plugin_ready(agrpc::GrpcContext& grpc_context, std::shared_ptr channel, const std::chrono::seconds& timeout = std::chrono::seconds(5)) - { - const auto deadline = std::chrono::system_clock::now() + timeout; - const auto state = channel->GetState(true); - bool has_state_changed = co_await agrpc::notify_on_state_change(grpc_context, *channel, state, deadline); - if (has_state_changed) + if (! valid_ ) { - auto plugin_connection_state = channel->GetState(true); - if (plugin_connection_state != grpc_connectivity_state::GRPC_CHANNEL_READY && plugin_connection_state != grpc_connectivity_state::GRPC_CHANNEL_CONNECTING) - { - throw std::runtime_error(fmt::format("Plugin for slot {} is not ready", slot_id)); - } - //co_await handshake(grpc_context, timeout); - if (! valid_) + if (plugin_info_.has_value()) { - throw exceptions::ValidatorException(valid_, plugin_name_, plugin_version_, plugin_peer_); + throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} failed validation: {}", slot_info_.rpc_id, plugin_info_->name, plugin_info_->version, plugin_info_->peer, valid_.what())); } + throw std::runtime_error(fmt::format("Slot {} failed validation: {}", slot_info_.rpc_id, valid_.what())); } + + return ret_value; // TODO: check if ret_value is always filled or if we need a solution like: https://stackoverflow.com/questions/67908591/how-to-convert-boostasioawaitable-to-stdfuture } +#pragma clang diagnostic pop -// boost::asio::awaitable handshake(agrpc::GrpcContext& grpc_context, const std::chrono::seconds& timeout = std::chrono::seconds(5)) -// { -// const auto deadline = std::chrono::system_clock::now() + timeout; // TODO use deadline -// using RPC = agrpc::RPC<&stub_t::PrepareAsyncIdentify>; -// grpc::ClientContext client_context{}; -// plugin_request plugin_request_conv{}; -// request_plugin_t request{ plugin_request_conv(slot_id) }; -// response_plugin_t response{}; -// auto status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); -// if (! status.ok()) -// { -// throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_id, plugin_name_, plugin_version_, plugin_name_, status_.error_message())); -// } -// spdlog::debug("Plugin responded with: {}", response.DebugString()); -// plugin_response plugin_response_conv{}; -// const auto& [rsp_slot_id, rsp_plugin_name, rsp_slot_version, rsp_plugin_version] = plugin_response_conv(response); -// plugin_name_ = rsp_plugin_name; -// plugin_version_ = rsp_plugin_version; -// plugin_peer_ = client_context.peer(); -// valid_ = Validator{ rsp_slot_version }; -// } +private: + template + auto serialize(const Message& message) + { + grpc::ByteBuffer buffer; + bool own_buffer; + grpc::GenericSerialize(message, &buffer, &own_buffer); + return buffer; + } + + template + bool deserialize(grpc::ByteBuffer& buffer, Message& message) + { + return grpc::GenericDeserialize(&buffer, &message).ok(); + } }; } // namespace cura::plugins diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 58f6b5766e..ed04db9bf6 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -35,16 +35,14 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template class Validator, class Stub, class Prepare, template class Request, class Response, class Default> +template class ValidatorTp, class RequestTp, class ResponseTp, class Default> class SlotProxy { Default default_process{}; - using value_type = PluginProxy, Stub, Prepare, Request, Response>; + using value_type = PluginProxy, RequestTp, ResponseTp>; std::optional plugin_{ std::nullopt }; public: - static inline constexpr plugins::SlotID slot_id{ Slot }; - /** * @brief Default constructor. * diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 2b63c2825f..6373190302 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -48,7 +48,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using simplify_slot = SlotProxy, simplify_request, simplify_response, Default>; +using slot_simplify_ = SlotProxy<"SimplifyService", "<=1.0.0", plugins::v1::SimplifyService::Stub, Validator, simplify_request, simplify_response, Default>; /** * @brief Alias for the Postprocess slot. @@ -58,7 +58,7 @@ using simplify_slot = SlotProxy -using postprocess_slot = SlotProxy, postprocess_request, postprocess_response, Default>; +using slot_postprocess_ = SlotProxy<"PostprocessService", "<=1.0.0", plugins::v1::PostprocessService::Stub, Validator, postprocess_request, postprocess_response, Default>; template struct Typelist @@ -96,7 +96,7 @@ class Registry, Unit> : public Registry template void connect(auto&& plugin) { - get_type().proxy = Tp { std::forward( std::move(plugin) ) }; + get_type().proxy = Tp{ std::forward(std::move(plugin)) }; } protected: @@ -143,10 +143,10 @@ struct Holder } // namespace details -using simplify_t = details::simplify_slot; -using postprocess_t = details::postprocess_slot<>; +using slot_simplify = details::slot_simplify_; +using slot_postprocess = details::slot_postprocess_<>; -using SlotTypes = details::Typelist; +using SlotTypes = details::Typelist; } // namespace plugins using slots = plugins::details::SingletonRegistry; diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index cee329dd9f..e975df92dd 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -517,10 +517,10 @@ void ArcusCommunication::sliceNext() switch (plugin.id()) { case cura::proto::SlotID::SIMPLIFY: - slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); + slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); break; case cura::proto::SlotID::POSTPROCESS: - slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); + slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); break; default: break; } diff --git a/src/slicer.cpp b/src/slicer.cpp index de11c5f4dd..582182da9c 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -774,7 +774,7 @@ void SlicerLayer::makePolygons(const Mesh* mesh) // Finally optimize all the polygons. Every point removed saves time in the long run. // polygons = Simplify(mesh->settings).polygon(polygons); - polygons = slots::instance().invoke(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); + polygons = slots::instance().invoke(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); polygons.removeDegenerateVerts(); // remove verts connected to overlapping line segments // Clean up polylines for Surface Mode printing From 744087431b08e8f950464fb9a6e42caecc9df056 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 11:38:00 +0200 Subject: [PATCH 077/470] removed trailing return type deduction MSVC crashed on this Contributes to CURA-10475 --- include/plugins/slotproxy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index ed04db9bf6..cdc2e75865 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -70,7 +70,7 @@ class SlotProxy * @param args The arguments for the plugin request. * @return The result of the plugin request or the default behavior. */ - auto operator()(auto&&... args) -> std::invoke_result_t + auto operator()(auto&&... args) { if (plugin_.has_value()) { From 878dcf14b3d3daf15b3bc24d058ad0ac461a5dbf Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 11:40:24 +0200 Subject: [PATCH 078/470] removed redundant code Contributes to CURA-10475 --- include/plugins/pluginproxy.h | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index dc80259453..77c7e8aaa3 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -59,7 +58,6 @@ class PluginProxy using rsp_converter_type = ResponseTp; using stub_t = Stub; -// using stub_t = grpc::GenericStub; private: validator_type valid_{}; ///< The validator object for plugin validation. @@ -109,8 +107,6 @@ class PluginProxy } ~PluginProxy() = default; -#pragma clang diagnostic push -#pragma ide diagnostic ignored "cppcoreguidelines-avoid-capture-default-when-capturing-this" /** * @brief Executes the plugin operation. * @@ -187,23 +183,6 @@ class PluginProxy return ret_value; // TODO: check if ret_value is always filled or if we need a solution like: https://stackoverflow.com/questions/67908591/how-to-convert-boostasioawaitable-to-stdfuture } -#pragma clang diagnostic pop - -private: - template - auto serialize(const Message& message) - { - grpc::ByteBuffer buffer; - bool own_buffer; - grpc::GenericSerialize(message, &buffer, &own_buffer); - return buffer; - } - - template - bool deserialize(grpc::ByteBuffer& buffer, Message& message) - { - return grpc::GenericDeserialize(&buffer, &message).ok(); - } }; } // namespace cura::plugins From 779d15e48f17e22df2eacb5b08d74acd0bbd8bb7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 11:50:36 +0200 Subject: [PATCH 079/470] Fixed needing to linking to boost context lib Wasn't needed Contributes to CURA-10475 --- include/plugins/pluginproxy.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 77c7e8aaa3..be4adde78c 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -6,17 +6,12 @@ #include #include -#include #include #include #include -#include #include -#include -#include #include #include -#include #include #include #include From b4eff117454905e536f4ab7b626aab23f6d19fdb Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 12:10:10 +0200 Subject: [PATCH 080/470] Use SlotID Contributes to CURA-10475 --- include/plugins/exception.h | 7 +++++-- include/plugins/metadata.h | 2 +- include/plugins/pluginproxy.h | 14 +++++++------- include/plugins/slotproxy.h | 4 ++-- include/plugins/slots.h | 5 +++-- include/plugins/types.h | 4 ++-- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/include/plugins/exception.h b/include/plugins/exception.h index 4aa601298e..0cc74fb579 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -10,6 +10,7 @@ #include #include +#include "plugins/metadata.h" #include "plugins/types.h" namespace cura::plugins::exceptions @@ -20,8 +21,10 @@ class ValidatorException : public std::exception std::string msg_; public: - ValidatorException(auto validator, std::string plugin_name, const std::string& plugin_version, const std::string& plugin_target) noexcept - : msg_(fmt::format("Plugin {} '{}' at {} failed validation: {}", plugin_name, plugin_version, plugin_target, validator.what())) + ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept : msg_(fmt::format("Failed to validation plugin on Slot '{}': {}", slot_info.slot_id, validator.what())){}; + + ValidatorException(const auto& validator, const slot_metadata& slot_info, const plugin_metadata& plugin_info) noexcept + : msg_(fmt::format("Failed to validate plugin {} '{}' at {} for slot '{}': {}", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, validator.what())) { } diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 7f9ee17342..bd6ca9bde4 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -19,7 +19,7 @@ struct plugin_metadata struct slot_metadata { - std::string_view rpc_id; + plugins::v1::SlotID slot_id; std::string_view version_range; }; diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index be4adde78c..4ddf6453f8 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -38,7 +38,7 @@ namespace cura::plugins * @tparam Request The gRPC convertible request type. * @tparam Response The gRPC convertible response type. */ -template +template class PluginProxy { public: @@ -61,7 +61,7 @@ class PluginProxy ranges::semiregular_box stub_; ///< The gRPC stub for communication. - constexpr static slot_metadata slot_info_{ .rpc_id = RPC_ID.value, .version_range = SlotVersionRng.value }; + constexpr static slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value }; std::optional plugin_info_{ std::nullopt }; ///< The plugin info object. public: @@ -132,7 +132,7 @@ class PluginProxy client_context.set_deadline(std::chrono::system_clock::now() + std::chrono::milliseconds(500)); // TODO: don't use magic number and make it realistic // Metadata - client_context.AddMetadata("cura-slot-service-name", slot_info_.rpc_id.data()); + client_context.AddMetadata("cura-slot-service-name", fmt::format("{}", slot_info_.slot_id)); client_context.AddMetadata("cura-slot-version-range", slot_info_.version_range.data()); // Construct request @@ -162,18 +162,18 @@ class PluginProxy { if (plugin_info_.has_value()) { - throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_info_.rpc_id, plugin_info_->name, plugin_info_->version, plugin_info_->peer, status.error_message())); + throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_info_.slot_id, plugin_info_->name, plugin_info_->version, plugin_info_->peer, status.error_message())); } - throw std::runtime_error(fmt::format("Slot {} had a communication failure: {}", slot_info_.rpc_id, status.error_message())); + throw std::runtime_error(fmt::format("Slot {} had a communication failure: {}", slot_info_.slot_id, status.error_message())); } if (! valid_ ) { if (plugin_info_.has_value()) { - throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} failed validation: {}", slot_info_.rpc_id, plugin_info_->name, plugin_info_->version, plugin_info_->peer, valid_.what())); + throw exceptions::ValidatorException(valid_, slot_info_, plugin_info_.value()); } - throw std::runtime_error(fmt::format("Slot {} failed validation: {}", slot_info_.rpc_id, valid_.what())); + throw exceptions::ValidatorException(valid_, slot_info_); } return ret_value; // TODO: check if ret_value is always filled or if we need a solution like: https://stackoverflow.com/questions/67908591/how-to-convert-boostasioawaitable-to-stdfuture diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index cdc2e75865..9bf2c85693 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -35,11 +35,11 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template class ValidatorTp, class RequestTp, class ResponseTp, class Default> +template class ValidatorTp, class RequestTp, class ResponseTp, class Default> class SlotProxy { Default default_process{}; - using value_type = PluginProxy, RequestTp, ResponseTp>; + using value_type = PluginProxy, RequestTp, ResponseTp>; std::optional plugin_{ std::nullopt }; public: diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 6373190302..656d0841a6 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -16,6 +16,7 @@ #include "postprocess.grpc.pb.h" #include "simplify.grpc.pb.h" +#include "slot_id.pb.h" namespace cura { @@ -48,7 +49,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy<"SimplifyService", "<=1.0.0", plugins::v1::SimplifyService::Stub, Validator, simplify_request, simplify_response, Default>; +using slot_simplify_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -58,7 +59,7 @@ using slot_simplify_ = SlotProxy<"SimplifyService", "<=1.0.0", plugins::v1::Simp * @tparam Default The default behavior when no plugin is registered. */ template -using slot_postprocess_ = SlotProxy<"PostprocessService", "<=1.0.0", plugins::v1::PostprocessService::Stub, Validator, postprocess_request, postprocess_response, Default>; +using slot_postprocess_ = SlotProxy; template struct Typelist diff --git a/include/plugins/types.h b/include/plugins/types.h index af629b262b..23546f89d0 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -50,10 +50,10 @@ struct fmt::formatter switch (slot_id) { case cura::plugins::SlotID::SIMPLIFY: - slot_name = "Simplify"; + slot_name = "SimplifyService"; break; case cura::plugins::SlotID::POSTPROCESS: - slot_name = "Postprocess"; + slot_name = "PostprocessService"; break; default: slot_name = "Unknown"; From 7216246d547b3bad4e1fb40e1a0544341eb0cde5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 13:07:43 +0200 Subject: [PATCH 081/470] Set plugin_metadata from client_context Throws or warns when metadata is missing [CURA-10475] --- include/plugins/metadata.h | 44 +++++++++++++++++++++++++++++++---- include/plugins/pluginproxy.h | 8 +------ include/plugins/types.h | 24 +++++++++++++++---- 3 files changed, 61 insertions(+), 15 deletions(-) diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index bd6ca9bde4..41d83290ed 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -4,17 +4,53 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_METADATA_H #define CURAENGINE_INCLUDE_PLUGINS_METADATA_H +#include #include +#include +#include + +#include "plugins/types.h" + namespace cura::plugins { struct plugin_metadata { - std::string name; - std::string version; - std::string peer; + std::string_view name; + std::string_view version; + std::string_view peer; + std::string_view slot_version; - std::string slot_version; + explicit plugin_metadata(const grpc::ClientContext& client_context) + { + const auto& metadata = client_context.GetServerInitialMetadata(); + if (auto it = metadata.find("cura-slot-version"); it != metadata.end()) + { + slot_version = std::string{ it->second.data(), it->second.size() }; + } + else + { + spdlog::error("'cura-slot-version' RPC metadata not set"); + throw std::runtime_error("'cura-slot-version' RPC metadata not set"); + } + if (auto it = metadata.find("cura-plugin-name"); it != metadata.end()) + { + name = std::string{ it->second.data(), it->second.size() }; + } + else + { + spdlog::warn("'cura-plugin-name' RPC metadata not set"); + } + if (auto it = metadata.find("cura-plugin-version"); it != metadata.end()) + { + version = std::string{ it->second.data(), it->second.size() }; + } + else + { + spdlog::warn("'cura-plugin-version' RPC metadata not set"); + } + peer = client_context.peer(); + } }; struct slot_metadata diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 4ddf6453f8..70f4d0da26 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -145,13 +145,7 @@ class PluginProxy if (! plugin_info_.has_value()) { - const auto& metadata_rsp = client_context.GetServerInitialMetadata(); - plugin_info_ = plugin_metadata{ - .name = metadata_rsp.find("cura-plugin-name")->second.data(), - .version = metadata_rsp.find("cura-plugin-version")->second.data(), - .peer = client_context.peer(), - .slot_version = metadata_rsp.find("cura-slot-version")->second.data(), - }; + plugin_info_ = plugin_metadata{ client_context }; valid_ = validator_type{ plugin_info_->slot_version }; } }, diff --git a/include/plugins/types.h b/include/plugins/types.h index 23546f89d0..b4820dcfb0 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -8,6 +8,7 @@ #include #include +#include #include "utils/IntPoint.h" #include "utils/concepts/generic.h" @@ -37,11 +38,12 @@ struct CharRangeLiteral } // namespace cura::plugins +namespace fmt +{ // Custom formatter for humanreadable slot_id's template<> -struct fmt::formatter +struct formatter { - // The formatting function template auto format(cura::plugins::SlotID slot_id, FormatContext& ctx) { @@ -63,13 +65,27 @@ struct fmt::formatter return fmt::format_to(ctx.out(), "{}", slot_name); } - // The parsing function template auto parse(ParseContext& ctx) { - // Not implemented for simplicity in this example return ctx.begin(); } }; +template<> +struct formatter +{ + constexpr auto parse(format_parse_context& ctx) + { + return ctx.end(); + } + + template + auto format(const grpc::string_ref& str, FormatContext& ctx) + { + return format_to(ctx.out(), "{}", std::string_view{ str.data(), str.size() }); + } +}; + +} // namespace fmt #endif // PLUGINS_TYPES_H From c0b54ba12f4cadf2c86c398c593c38cc8f51263f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 13:34:15 +0200 Subject: [PATCH 082/470] Refactor Validator class and update its usage in pluginproxy.h and slotproxy.h - Remove unused code and comments in validator.h - Update Validator class constructor to take slot_info and plugin_info as arguments - Update usage of Validator class in pluginproxy.h and slotproxy.h - Update ValidatorException messages in exception.h [CURA-10475] --- include/plugins/exception.h | 4 +-- include/plugins/pluginproxy.h | 4 +-- include/plugins/slotproxy.h | 4 +-- include/plugins/validator.h | 50 +++++------------------------------ 4 files changed, 12 insertions(+), 50 deletions(-) diff --git a/include/plugins/exception.h b/include/plugins/exception.h index 0cc74fb579..d3d50af969 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -21,10 +21,10 @@ class ValidatorException : public std::exception std::string msg_; public: - ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept : msg_(fmt::format("Failed to validation plugin on Slot '{}': {}", slot_info.slot_id, validator.what())){}; + ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept : msg_(fmt::format("Failed to validation plugin on Slot '{}'", slot_info.slot_id)){}; ValidatorException(const auto& validator, const slot_metadata& slot_info, const plugin_metadata& plugin_info) noexcept - : msg_(fmt::format("Failed to validate plugin {} '{}' at {} for slot '{}': {}", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, validator.what())) + : msg_(fmt::format("Failed to validate plugin {} '{}' at {} for slot '{}'", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id)) { } diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 70f4d0da26..20dccd582e 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -123,7 +123,7 @@ class PluginProxy boost::asio::co_spawn( grpc_context, - [&]() -> boost::asio::awaitable + [this, &status, &grpc_context, &ret_value, &args...]() -> boost::asio::awaitable { using RPC = agrpc::RPC<&stub_t::PrepareAsyncModify>; grpc::ClientContext client_context{}; @@ -146,7 +146,7 @@ class PluginProxy if (! plugin_info_.has_value()) { plugin_info_ = plugin_metadata{ client_context }; - valid_ = validator_type{ plugin_info_->slot_version }; + valid_ = validator_type{ slot_info_, plugin_info_.value() }; } }, boost::asio::detached); diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 9bf2c85693..3360cf4887 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -35,11 +35,11 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template class ValidatorTp, class RequestTp, class ResponseTp, class Default> +template class SlotProxy { Default default_process{}; - using value_type = PluginProxy, RequestTp, ResponseTp>; + using value_type = PluginProxy; std::optional plugin_{ std::nullopt }; public: diff --git a/include/plugins/validator.h b/include/plugins/validator.h index d6e791fcfa..08956cd23e 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -7,28 +7,16 @@ #include #include +#include "plugins/metadata.h" #include "plugins/types.h" namespace cura::plugins { -/** - * @brief A class for validating plugin versions and hashes. - * - * The `Validator` class provides functionality to validate plugin versions and hashes against - * specified version ranges and plugin hashes. - * - * @tparam VersionRange The version range specified as a character range literal. - * @tparam PluginHash The plugin hash specified as a character range literal. - */ -template class Validator { - semver::range::detail::range semver_range_{ VersionRange.value }; ///< The semver range object. - semver::version version_{ "1.0.0" }; ///< The version to validate. bool include_prerelease_{ true }; ///< Flag indicating whether to include prerelease versions. bool valid_{ false }; ///< Flag indicating the validity of the version. - std::string what_{}; public: /** @@ -41,18 +29,13 @@ class Validator * * @param version The version to validate. */ - constexpr explicit Validator(std::string_view version) noexcept + Validator(const slot_metadata& slot_info, const plugin_metadata& plugin_info) { - auto semver_version = semver::from_string_noexcept(version); - if (semver_version.has_value()) + auto slot_range = semver::range::detail::range(slot_info.version_range); + auto slot_version = semver::from_string(plugin_info.slot_version); + if (slot_range.satisfies(slot_version, include_prerelease_)) { - version_ = semver_version.value(); - valid_ = valid_version(); - } - else - { - valid_ = false; - what_ = fmt::format("Received invalid formatted version {} from plugin, expected version according to semver.", version); + valid_ = true; } }; @@ -65,27 +48,6 @@ class Validator { return valid_; } - - constexpr std::string_view what() const noexcept - { - return what_; - } - - - /** - * @brief Checks if the version is valid according to the specified version range. - * - * @return True if the version is valid, false otherwise. - */ - [[nodiscard]] constexpr bool valid_version() noexcept - { - auto valid_version{ semver_range_.satisfies(version_, include_prerelease_) }; - if (! valid_version) - { - what_ = fmt::format("CuraEngine requires a 'slot version' within the range of '{}', while the plugin reports to have version: '{}'", VersionRange.value, version_.to_string()); - } - return valid_version; - } }; } // namespace cura::plugins From 6c574caf9a88bd98720ae567d89c07f8c6df22cc Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 14:17:47 +0200 Subject: [PATCH 083/470] Add RemoteException for propagation of error's that occur in the plugin service [CURA-10475] --- include/plugins/exception.h | 19 +++++++++++++++++++ include/plugins/pluginproxy.h | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/include/plugins/exception.h b/include/plugins/exception.h index d3d50af969..d9147d14af 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -8,6 +8,7 @@ #include #include +#include #include #include "plugins/metadata.h" @@ -34,6 +35,24 @@ class ValidatorException : public std::exception } }; +class RemoteException : public std::exception +{ + std::string msg_; + +public: + RemoteException(const slot_metadata& slot_info, std::string_view error_msg) noexcept : msg_(fmt::format("Remote exception on Slot '{}': {}", slot_info.slot_id, error_msg)){}; + + RemoteException(const slot_metadata& slot_info, const plugin_metadata& plugin_info, std::string_view error_msg) noexcept + : msg_(fmt::format("Remote exception for plugin {} '{}' at {} for slot '{}': {}", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, error_msg)) + { + } + + virtual const char* what() const noexcept override + { + return msg_.c_str(); + } +}; + } // namespace cura::plugins::exceptions #endif // UTILS_CONCEPTS_GRAPH_H \ No newline at end of file diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 20dccd582e..78bbabc227 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -156,9 +156,9 @@ class PluginProxy { if (plugin_info_.has_value()) { - throw std::runtime_error(fmt::format("Slot {} with plugin {} '{}' at {} had a communication failure: {}", slot_info_.slot_id, plugin_info_->name, plugin_info_->version, plugin_info_->peer, status.error_message())); + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); } - throw std::runtime_error(fmt::format("Slot {} had a communication failure: {}", slot_info_.slot_id, status.error_message())); + throw exceptions::RemoteException(slot_info_, status.error_message()); } if (! valid_ ) From 11ea610d8cff06db9dd8f5e47ad884ed5827e820 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 14:20:08 +0200 Subject: [PATCH 084/470] Remove big 6 No longer needed [CURA-10475] --- include/plugins/pluginproxy.h | 23 ----------------------- include/plugins/slotproxy.h | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 78bbabc227..f6163a0ac2 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -78,29 +78,6 @@ class PluginProxy */ constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) : stub_(channel){}; - constexpr PluginProxy(const PluginProxy&) = default; - constexpr PluginProxy(PluginProxy&&) noexcept = default; - constexpr PluginProxy& operator=(const PluginProxy& other) - { - if (this != &other) - { - valid_ = other.valid_; - stub_ = other.stub_; - plugin_info_ = other.plugin_info_; - } - return *this; - } - constexpr PluginProxy& operator=(PluginProxy&& other) - { - if (this != &other) - { - valid_ = std::move(other.valid_); - stub_ = std::move(other.stub_); - plugin_info_ = std::move(other.plugin_info_); - } - return *this; - } - ~PluginProxy() = default; /** * @brief Executes the plugin operation. diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 3360cf4887..66e5db5d9d 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -57,7 +57,7 @@ class SlotProxy * * @param channel A shared pointer to the gRPC channel for communication with the plugin. */ - SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; + explicit SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; /** * @brief Executes the plugin operation. From 96f8f62a9cc89f22d57bc830ee27d8699242f3fb Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 14:37:53 +0200 Subject: [PATCH 085/470] Build with new proto hierachy [CURA-10475] --- CMakeLists.txt | 2 +- conanfile.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8964268165..87dce7685f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) -asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" +asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" IMPORT_DIRS ${GRPC_IMPORT_DIRS} OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" GENERATE_GRPC GENERATE_MOCK_CODE) diff --git a/conanfile.py b/conanfile.py index 90aab8ad90..43126b1581 100644 --- a/conanfile.py +++ b/conanfile.py @@ -114,7 +114,8 @@ def generate(self): tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info - tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).glob("*.proto")]) + tc.variables["GRPC_IMPORT_DIRS"] = cpp_info.resdirs[0] + tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).rglob("*.proto")]) tc.generate() From 4362291188d765fbdb620edbfc15cf1865c54641 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 14:53:54 +0200 Subject: [PATCH 086/470] Use curaengine_grpc_definitions from main [CURA-10475] --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 43126b1581..53a9318c95 100644 --- a/conanfile.py +++ b/conanfile.py @@ -100,7 +100,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/arcus_replacement") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") def generate(self): deps = CMakeDeps(self) From 09affeaea43ad5a68a658fd1dd700bdc11fb5752 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 15:11:10 +0200 Subject: [PATCH 087/470] Fixed new proto hierarchy [CURA-10475] --- include/plugins/converters.h | 16 ++++++++-------- include/plugins/pluginproxy.h | 2 +- include/plugins/slots.h | 10 +++++----- include/plugins/types.h | 4 +--- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index dc7c77d48d..58e5276ac9 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -12,17 +12,17 @@ #include "plugins/types.h" -#include "postprocess.grpc.pb.h" -#include "postprocess.pb.h" -#include "simplify.grpc.pb.h" -#include "simplify.pb.h" +#include "cura/plugins/slots/postprocess/v1/postprocess.grpc.pb.h" +#include "cura/plugins/slots/postprocess/v1/postprocess.pb.h" +#include "cura/plugins/slots/simplify/v1/simplify.grpc.pb.h" +#include "cura/plugins/slots/simplify/v1/simplify.pb.h" namespace cura::plugins { struct simplify_request { - using value_type = plugins::v1::SimplifyServiceModifyRequest; ///< The protobuf message type. + using value_type = slots::simplify::v1::SimplifyServiceModifyRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -80,7 +80,7 @@ struct simplify_request */ struct simplify_response { - using value_type = plugins::v1::SimplifyServiceModifyResponse; ///< The protobuf message type. + using value_type = slots::simplify::v1::SimplifyServiceModifyResponse; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -118,7 +118,7 @@ struct simplify_response struct postprocess_request { - using value_type = plugins::v1::PostprocessServiceModifyRequest; ///< The protobuf message type. + using value_type = slots::postprocess::v1::PostprocessServiceModifyRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. /** @@ -137,7 +137,7 @@ struct postprocess_request struct postprocess_response { - using value_type = plugins::v1::PostprocessServiceModifyResponse; + using value_type = slots::postprocess::v1::PostprocessServiceModifyResponse; using native_value_type = std::string; native_value_type operator()(const value_type& message) const diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index f6163a0ac2..ef2f8529e2 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,7 +19,7 @@ #include "plugins/exception.h" #include "plugins/metadata.h" -#include "slot_id.pb.h" +#include "cura/plugins/v1/slot_id.pb.h" #include "utils/concepts/generic.h" namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 656d0841a6..afa93d9507 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -14,9 +14,9 @@ #include "utils/IntPoint.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed -#include "postprocess.grpc.pb.h" -#include "simplify.grpc.pb.h" -#include "slot_id.pb.h" +#include "cura/plugins/slots/postprocess/v1/postprocess.grpc.pb.h" +#include "cura/plugins/slots/simplify/v1/simplify.grpc.pb.h" +#include "cura/plugins/v1/slot_id.pb.h" namespace cura { @@ -49,7 +49,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy; +using slot_simplify_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -59,7 +59,7 @@ using slot_simplify_ = SlotProxy -using slot_postprocess_ = SlotProxy; +using slot_postprocess_ = SlotProxy; template struct Typelist diff --git a/include/plugins/types.h b/include/plugins/types.h index b4820dcfb0..ff63a23183 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -14,12 +14,10 @@ #include "utils/concepts/generic.h" #include "utils/polygon.h" -#include "slot_id.pb.h" +#include "cura/plugins/v1/slot_id.pb.h" namespace cura::plugins { -using SlotID = plugins::v1::SlotID; - namespace details { template From 8e9fd81a10f30e04c7f349b09eb2ad8cfa02a96f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 15:20:42 +0200 Subject: [PATCH 088/470] Use correct namespace for SlotID [CURA-10475] --- include/plugins/types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/plugins/types.h b/include/plugins/types.h index ff63a23183..8c87f35358 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -40,19 +40,19 @@ namespace fmt { // Custom formatter for humanreadable slot_id's template<> -struct formatter +struct formatter { template - auto format(cura::plugins::SlotID slot_id, FormatContext& ctx) + auto format(cura::plugins::v1::SlotID slot_id, FormatContext& ctx) { std::string slot_name; switch (slot_id) { - case cura::plugins::SlotID::SIMPLIFY: + case cura::plugins::v1::SlotID::SIMPLIFY: slot_name = "SimplifyService"; break; - case cura::plugins::SlotID::POSTPROCESS: + case cura::plugins::v1::SlotID::POSTPROCESS: slot_name = "PostprocessService"; break; default: From a25efd123365e6f3a206c0a119f1f713be3b1ad5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 15:24:15 +0200 Subject: [PATCH 089/470] Revert "Remove big 6" This reverts commit 11ea610d8cff06db9dd8f5e47ad884ed5827e820. --- include/plugins/pluginproxy.h | 23 +++++++++++++++++++++++ include/plugins/slotproxy.h | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index ef2f8529e2..b3226aa3ab 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -78,6 +78,29 @@ class PluginProxy */ constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) : stub_(channel){}; + constexpr PluginProxy(const PluginProxy&) = default; + constexpr PluginProxy(PluginProxy&&) noexcept = default; + constexpr PluginProxy& operator=(const PluginProxy& other) + { + if (this != &other) + { + valid_ = other.valid_; + stub_ = other.stub_; + plugin_info_ = other.plugin_info_; + } + return *this; + } + constexpr PluginProxy& operator=(PluginProxy&& other) + { + if (this != &other) + { + valid_ = std::move(other.valid_); + stub_ = std::move(other.stub_); + plugin_info_ = std::move(other.plugin_info_); + } + return *this; + } + ~PluginProxy() = default; /** * @brief Executes the plugin operation. diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 66e5db5d9d..3360cf4887 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -57,7 +57,7 @@ class SlotProxy * * @param channel A shared pointer to the gRPC channel for communication with the plugin. */ - explicit SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; + SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; /** * @brief Executes the plugin operation. From 4ca9d6da5b21646c8a5a933ee40efe9fc282acaa Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 23 May 2023 16:01:24 +0200 Subject: [PATCH 090/470] Move 'secure-optional' create channel to own file and fix merge. part of CURA-10475 --- include/plugins/channel.h | 40 +++++++++++++ src/Application.cpp | 71 ------------------------ src/communication/ArcusCommunication.cpp | 6 +- 3 files changed, 43 insertions(+), 74 deletions(-) create mode 100644 include/plugins/channel.h diff --git a/include/plugins/channel.h b/include/plugins/channel.h new file mode 100644 index 0000000000..e580ef49bf --- /dev/null +++ b/include/plugins/channel.h @@ -0,0 +1,40 @@ +#ifndef CHANNEL_H +#define CHANNEL_H + +#define REMOTE_PLUGIN_BUILD +// ^^ TODO: remove later & move to build-system + +#include "plugins/slots.h" + +#ifdef REMOTE_PLUGIN_BUILD +#include "../secrets/plugins.crt.h" +#include "../secrets/plugins.key.h" +#endif + +namespace cura::plugins +{ + struct ChannelSetupConfiguration + { + public: + std::string host; + uint64_t port; + uint64_t shibolet = 0UL; //TODO: Either get from startup (plugin would receive this as well) or remove completely. + }; + + auto createChannel(const ChannelSetupConfiguration& plugins_config = {"localhost", 50010UL}) + { +#ifdef REMOTE_PLUGIN_BUILD + auto creds_config = grpc::SslCredentialsOptions(); + creds_config.pem_root_certs = secrets::certificate; + creds_config.pem_cert_chain = secrets::certificate; + creds_config.pem_private_key = secrets::private_key; + auto channel_creds = grpc::SslCredentials(creds_config); +#else // not REMOTE_PLUGIN_BUILD + auto channel_creds = grpc::InsecureChannelCredentials(); +#endif + return grpc::CreateChannel(fmt::format("{}:{}", plugins_config.host, plugins_config.port), channel_creds); + } + +} // namespace cura::plugins + +#endif // CHANNEL_H diff --git a/src/Application.cpp b/src/Application.cpp index c8d6c2f3b6..15454631d8 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -3,9 +3,6 @@ #include "Application.h" -// TODO: Make this (enterprise) happen from build-system. -#define ENTERPRISE_BUILD 1 - #include #include #include @@ -28,24 +25,9 @@ #include "plugins/slots.h" -#ifdef ENTERPRISE_BUILD -#include "../secrets/plugins.crt.h" -#include "../secrets/plugins.key.h" -#endif - namespace cura { -//TODO: Get these from the command-line and/or frontend. -struct PluginSetupConfiguration -{ -public: - std::string host = "localhost"; - uint64_t port = 50010UL; - - uint64_t shibolet = 56785678UL; // Assume both us and the plugin have been given this on start-up, in a scenario that needs more security. -} PLUGIN_CONFIG; - Application::Application() { auto dup_sink = std::make_shared(std::chrono::seconds{ 10 }); @@ -206,8 +188,6 @@ void Application::run(const size_t argc, char** argv) exit(1); } - registerPlugins(PLUGIN_CONFIG); - #ifdef ARCUS if (stringcasecompare(argv[1], "connect") == 0) { @@ -269,55 +249,4 @@ void Application::startThreadPool(int nworkers) thread_pool = new ThreadPool(nthreads); } -// TODO: Where to put this in the structure, does this belong to 'Application'? -auto createChannel(const PluginSetupConfiguration& plugins_config) -{ -#ifdef ENTERPRISE_BUILD - auto creds_config = grpc::SslCredentialsOptions(); - creds_config.pem_root_certs = secrets::certificate; - creds_config.pem_cert_chain = secrets::certificate; - creds_config.pem_private_key = secrets::private_key; - auto channel_creds = grpc::SslCredentials(creds_config); -#else // NOT ENTERPRISE_BUILD - // TODO: Do we want security to be on always? - auto channel_creds = grpc::InsecureChannelCredentials(); -#endif - return grpc::CreateChannel(fmt::format("{}:{}", plugins_config.host, plugins_config.port), channel_creds); -} - -void Application::registerPlugins(const PluginSetupConfiguration& plugins_config) -{ - // TODO: remove this - - constexpr auto simplify_default = [](const Polygons& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) - { - const Simplify simplify{ max_resolution, max_deviation, max_area_deviation }; - return simplify.polygon(polygons); - }; - using simplify_t = plugins::simplify_slot; - - constexpr auto postprocess_default = [](std::string word){ return word; }; - using postprocess_t = plugins::postprocess_slot; - - using slot_registry = plugins::Slots; - - if (true) // determine wat to register depending if front-end starts a plugin - { - slot_registry::instance().set(simplify_t{createChannel(plugins_config)}); - } - else - { - slot_registry::instance().set(simplify_t{}); - } - slot_registry::instance().set(postprocess_t{}); - - auto simplify_plugin = slot_registry::instance().get(); - Polygons poly{}; - Polygon p{}; - p.poly = {{0,1}, {2,3}, {4,5}}; - poly.add(p); - auto x = simplify_plugin(poly, 100, 200, 300); - spdlog::info("simplified poly received"); -} - } // namespace cura diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index e975df92dd..ccf8da5ed2 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -24,6 +24,7 @@ #include "settings/types/Velocity.h" //To send to layer view how fast stuff is printing. #include "utils/polygon.h" +#include "plugins/channel.h" #include "plugins/slots.h" namespace cura @@ -509,7 +510,6 @@ void ArcusCommunication::sliceNext() spdlog::debug("Received a Slice message."); // TODO: Use typemap - constexpr auto create_channel = [&](auto&&... args){ return grpc::CreateChannel(fmt::format("{}:{}", std::forward(args)...), grpc::InsecureChannelCredentials()); }; for (const auto& plugin : slice_message->engine_plugins()) { if (plugin.has_address() && plugin.has_port()) @@ -517,10 +517,10 @@ void ArcusCommunication::sliceNext() switch (plugin.id()) { case cura::proto::SlotID::SIMPLIFY: - slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); + slots::instance().connect(plugins::createChannel({ plugin.address(), plugin.port() })); break; case cura::proto::SlotID::POSTPROCESS: - slots::instance().connect( create_channel(plugin.address(), plugin.port()) ); + slots::instance().connect(plugins::createChannel({ plugin.address(), plugin.port() })); break; default: break; } From 11eb6d831d573d81b5255cdb47a3d25c581e52c8 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 16:40:19 +0200 Subject: [PATCH 091/470] Fixed the slot validation [CURA-10475] --- include/plugins/exception.h | 4 ++-- include/plugins/metadata.h | 8 ++++---- include/plugins/pluginproxy.h | 6 +++++- include/plugins/validator.h | 6 ++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/plugins/exception.h b/include/plugins/exception.h index d9147d14af..9ef2fdcf07 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -25,7 +25,7 @@ class ValidatorException : public std::exception ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept : msg_(fmt::format("Failed to validation plugin on Slot '{}'", slot_info.slot_id)){}; ValidatorException(const auto& validator, const slot_metadata& slot_info, const plugin_metadata& plugin_info) noexcept - : msg_(fmt::format("Failed to validate plugin {} '{}' at {} for slot '{}'", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id)) + : msg_(fmt::format("Failed to validate plugin '{}-{}' running at [{}] for slot '{}', slot range '{}' incompatible with plugin slot version '{}'", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, slot_info.version_range, plugin_info.slot_version)) { } @@ -43,7 +43,7 @@ class RemoteException : public std::exception RemoteException(const slot_metadata& slot_info, std::string_view error_msg) noexcept : msg_(fmt::format("Remote exception on Slot '{}': {}", slot_info.slot_id, error_msg)){}; RemoteException(const slot_metadata& slot_info, const plugin_metadata& plugin_info, std::string_view error_msg) noexcept - : msg_(fmt::format("Remote exception for plugin {} '{}' at {} for slot '{}': {}", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, error_msg)) + : msg_(fmt::format("Remote exception for plugin '{}-{}' running at [{}] for slot '{}': {}", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, error_msg)) { } diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 41d83290ed..b49c17beb5 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -16,10 +16,10 @@ namespace cura::plugins { struct plugin_metadata { - std::string_view name; - std::string_view version; - std::string_view peer; - std::string_view slot_version; + std::string name; // cura-plugin-name (optional) + std::string version; // cura-plugin-version (optional) + std::string peer; + std::string slot_version; // cura-slot-version (required) explicit plugin_metadata(const grpc::ClientContext& client_context) { diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index b3226aa3ab..dd05ddde28 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -147,6 +147,10 @@ class PluginProxy { plugin_info_ = plugin_metadata{ client_context }; valid_ = validator_type{ slot_info_, plugin_info_.value() }; + if (valid_) + { + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->name, plugin_info_->version, plugin_info_->peer, slot_info_.slot_id); + } } }, boost::asio::detached); @@ -170,7 +174,7 @@ class PluginProxy throw exceptions::ValidatorException(valid_, slot_info_); } - return ret_value; // TODO: check if ret_value is always filled or if we need a solution like: https://stackoverflow.com/questions/67908591/how-to-convert-boostasioawaitable-to-stdfuture + return ret_value; } }; } // namespace cura::plugins diff --git a/include/plugins/validator.h b/include/plugins/validator.h index 08956cd23e..fb61db1cf8 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -6,6 +6,7 @@ #include #include +#include #include "plugins/metadata.h" #include "plugins/types.h" @@ -33,10 +34,7 @@ class Validator { auto slot_range = semver::range::detail::range(slot_info.version_range); auto slot_version = semver::from_string(plugin_info.slot_version); - if (slot_range.satisfies(slot_version, include_prerelease_)) - { - valid_ = true; - } + valid_ = slot_range.satisfies(slot_version, include_prerelease_); }; /** From 24c6b0cdf6807c01c9d077394b6fc8b15094991e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 17:02:12 +0200 Subject: [PATCH 092/470] Use v0 namespace [CURA-10475] --- include/plugins/converters.h | 8 ++++---- include/plugins/metadata.h | 2 +- include/plugins/pluginproxy.h | 2 +- include/plugins/slotproxy.h | 2 +- include/plugins/slots.h | 4 ++-- include/plugins/types.h | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 58e5276ac9..03bcbcd69b 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -22,7 +22,7 @@ namespace cura::plugins struct simplify_request { - using value_type = slots::simplify::v1::SimplifyServiceModifyRequest; ///< The protobuf message type. + using value_type = slots::simplify::v0::SimplifyServiceModifyRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -80,7 +80,7 @@ struct simplify_request */ struct simplify_response { - using value_type = slots::simplify::v1::SimplifyServiceModifyResponse; ///< The protobuf message type. + using value_type = slots::simplify::v0::SimplifyServiceModifyResponse; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -118,7 +118,7 @@ struct simplify_response struct postprocess_request { - using value_type = slots::postprocess::v1::PostprocessServiceModifyRequest; ///< The protobuf message type. + using value_type = slots::postprocess::v0::PostprocessServiceModifyRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. /** @@ -137,7 +137,7 @@ struct postprocess_request struct postprocess_response { - using value_type = slots::postprocess::v1::PostprocessServiceModifyResponse; + using value_type = slots::postprocess::v0::PostprocessServiceModifyResponse; using native_value_type = std::string; native_value_type operator()(const value_type& message) const diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index b49c17beb5..db17d9a201 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -55,7 +55,7 @@ struct plugin_metadata struct slot_metadata { - plugins::v1::SlotID slot_id; + plugins::v0::SlotID slot_id; std::string_view version_range; }; diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index dd05ddde28..7446f71119 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -38,7 +38,7 @@ namespace cura::plugins * @tparam Request The gRPC convertible request type. * @tparam Response The gRPC convertible response type. */ -template +template class PluginProxy { public: diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 3360cf4887..d3ac43136d 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -35,7 +35,7 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template +template class SlotProxy { Default default_process{}; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index afa93d9507..05fb775533 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -49,7 +49,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy; +using slot_simplify_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -59,7 +59,7 @@ using slot_simplify_ = SlotProxy -using slot_postprocess_ = SlotProxy; +using slot_postprocess_ = SlotProxy; template struct Typelist diff --git a/include/plugins/types.h b/include/plugins/types.h index 8c87f35358..f3b19e3a7b 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -40,19 +40,19 @@ namespace fmt { // Custom formatter for humanreadable slot_id's template<> -struct formatter +struct formatter { template - auto format(cura::plugins::v1::SlotID slot_id, FormatContext& ctx) + auto format(cura::plugins::v0::SlotID slot_id, FormatContext& ctx) { std::string slot_name; switch (slot_id) { - case cura::plugins::v1::SlotID::SIMPLIFY: + case cura::plugins::v0::SlotID::SIMPLIFY: slot_name = "SimplifyService"; break; - case cura::plugins::v1::SlotID::POSTPROCESS: + case cura::plugins::v0::SlotID::POSTPROCESS: slot_name = "PostprocessService"; break; default: From 84636f30c9f15f36d05613845fd0dfd4d53d3e00 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 23 May 2023 17:04:18 +0200 Subject: [PATCH 093/470] Use v0 includes [CURA-10475] --- include/plugins/converters.h | 8 ++++---- include/plugins/pluginproxy.h | 2 +- include/plugins/slots.h | 6 +++--- include/plugins/types.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 03bcbcd69b..0282605634 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -12,10 +12,10 @@ #include "plugins/types.h" -#include "cura/plugins/slots/postprocess/v1/postprocess.grpc.pb.h" -#include "cura/plugins/slots/postprocess/v1/postprocess.pb.h" -#include "cura/plugins/slots/simplify/v1/simplify.grpc.pb.h" -#include "cura/plugins/slots/simplify/v1/simplify.pb.h" +#include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" +#include "cura/plugins/slots/postprocess/v0/postprocess.pb.h" +#include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" +#include "cura/plugins/slots/simplify/v0/simplify.pb.h" namespace cura::plugins { diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 7446f71119..13daba6f0d 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,7 +19,7 @@ #include "plugins/exception.h" #include "plugins/metadata.h" -#include "cura/plugins/v1/slot_id.pb.h" +#include "cura/plugins/v0/slot_id.pb.h" #include "utils/concepts/generic.h" namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 05fb775533..ed29493824 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -14,9 +14,9 @@ #include "utils/IntPoint.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed -#include "cura/plugins/slots/postprocess/v1/postprocess.grpc.pb.h" -#include "cura/plugins/slots/simplify/v1/simplify.grpc.pb.h" -#include "cura/plugins/v1/slot_id.pb.h" +#include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" +#include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" +#include "cura/plugins/v0/slot_id.pb.h" namespace cura { diff --git a/include/plugins/types.h b/include/plugins/types.h index f3b19e3a7b..043a042c32 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -14,7 +14,7 @@ #include "utils/concepts/generic.h" #include "utils/polygon.h" -#include "cura/plugins/v1/slot_id.pb.h" +#include "cura/plugins/v0/slot_id.pb.h" namespace cura::plugins { From cee07b335852743452d5ad6f9fdbe1154ea546b1 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 23 May 2023 17:23:08 +0200 Subject: [PATCH 094/470] [Plugins] Make proper (optionally secure) client-channel. part of CURA-10475 --- include/plugins/channel.h | 46 +++++++++++++++++++++++------------ resources/certificate.pem.h | 48 +++++++++++++++++++++++++++++++++++++ resources/public_key.pem.h | 26 ++++++++++++++++++++ 3 files changed, 105 insertions(+), 15 deletions(-) create mode 100644 resources/certificate.pem.h create mode 100644 resources/public_key.pem.h diff --git a/include/plugins/channel.h b/include/plugins/channel.h index e580ef49bf..05fb9c10a2 100644 --- a/include/plugins/channel.h +++ b/include/plugins/channel.h @@ -1,18 +1,23 @@ #ifndef CHANNEL_H #define CHANNEL_H -#define REMOTE_PLUGIN_BUILD -// ^^ TODO: remove later & move to build-system +#include +#include +#include "../resources/certificate.pem.h" #include "plugins/slots.h" -#ifdef REMOTE_PLUGIN_BUILD -#include "../secrets/plugins.crt.h" -#include "../secrets/plugins.key.h" +#ifndef BUILD_ALLOW_REMOTE_PLUGINS +#define BUILD_ALLOW_REMOTE_PLUGINS true #endif namespace cura::plugins { + namespace details + { + constexpr bool ALLOW_REMOTE_PLUGINS = (BUILD_ALLOW_REMOTE_PLUGINS); + } // namespace details + struct ChannelSetupConfiguration { public: @@ -23,16 +28,27 @@ namespace cura::plugins auto createChannel(const ChannelSetupConfiguration& plugins_config = {"localhost", 50010UL}) { -#ifdef REMOTE_PLUGIN_BUILD - auto creds_config = grpc::SslCredentialsOptions(); - creds_config.pem_root_certs = secrets::certificate; - creds_config.pem_cert_chain = secrets::certificate; - creds_config.pem_private_key = secrets::private_key; - auto channel_creds = grpc::SslCredentials(creds_config); -#else // not REMOTE_PLUGIN_BUILD - auto channel_creds = grpc::InsecureChannelCredentials(); -#endif - return grpc::CreateChannel(fmt::format("{}:{}", plugins_config.host, plugins_config.port), channel_creds); + constexpr auto create_credentials = + [](const ChannelSetupConfiguration& plugins_config) + { + if (plugins_config.host == "localhost" || plugins_config.host == "127.0.0.1") + { + spdlog::info("Create local channel on port {}.", plugins_config.port); + return grpc::InsecureChannelCredentials(); + } + else if (details::ALLOW_REMOTE_PLUGINS) + { + spdlog::info("Create local channel on port {}.", plugins_config.port); + auto creds_config = grpc::SslCredentialsOptions(); + creds_config.pem_root_certs = resources::certificate; + return grpc::SslCredentials(creds_config); + } + // Create empty credentials, so it'll make a dummy channel where all operations fail. + // This is consitent with creating a channel with the wrong credentials as it where. + spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", plugins_config.host, plugins_config.port); + return std::shared_ptr(); + }; + return grpc::CreateChannel(fmt::format("{}:{}", plugins_config.host, plugins_config.port), create_credentials(plugins_config)); } } // namespace cura::plugins diff --git a/resources/certificate.pem.h b/resources/certificate.pem.h new file mode 100644 index 0000000000..2ccb343cd8 --- /dev/null +++ b/resources/certificate.pem.h @@ -0,0 +1,48 @@ +#ifndef CERTIFICATE_H +#define CERTIFICATE_H + +#include + +namespace resources +{ + constexpr std::string_view certificate = +R"#(-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIUd6fjXFbNBMZOxfBnv4FOokHlOC4wDQYJKoZIhvcNAQEL +BQAwgYYxCzAJBgNVBAYTAk5MMRMwEQYDVQQIDApHZWxkZXJsYW5kMRUwEwYDVQQH +DAxHZWxkZXJtYWxzZW4xEjAQBgNVBAoMCVVsdGlNYWtlcjEbMBkGA1UECwwSQ29t +bXVuaXR5IFNvZnR3YXJlMRowGAYDVQQDDBFQbHVnaW5zIFZhbGlkYXRvcjAgFw0y +MzA1MTcxMzQ3NTFaGA8yMTEzMDIwMTEzNDc1MVowgYYxCzAJBgNVBAYTAk5MMRMw +EQYDVQQIDApHZWxkZXJsYW5kMRUwEwYDVQQHDAxHZWxkZXJtYWxzZW4xEjAQBgNV +BAoMCVVsdGlNYWtlcjEbMBkGA1UECwwSQ29tbXVuaXR5IFNvZnR3YXJlMRowGAYD +VQQDDBFQbHVnaW5zIFZhbGlkYXRvcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC +AgoCggIBALNcLyGzwSpkGzsiM9pT821AdXJqCM7CBwsy9E9Tpf/D+iBdwQsukIBc +HrkHf9g+q9BYDIKu0/eqeE7coQg0HAJ/CxowWAAo5MCYJHqDGp73IHUVxvGetVVr +y6r13QEpj/Mzvz4nnyZMlwdXjWLyz/AtDRfT0i+TbyqK3BYBTs0YW3/fG4g4Dd+v +8OsQOjfDDTv5iQSaNQuiSfCbQA8bL1aXqijFcE2imRnLFQ3IxrcLVkkXEA4xAps5 +34aVKVBXFAS7UII0MmTvhmHSZ6Vl21fAhmGwJGPrQSlSQ8JhVuIs4q7Tfp1SHeoH ++lmid9X92iWlrM/gDZLiKMk8VHlt9Y1kaYPUUKq1mNoHGJ8Ix4J8umCVCaIezYY5 +QqmCLKniP4VuCGoYaXuiWf/EOa+YGMGYaKB9yJLsQpuoulWVTrKyriv5YW68CT0u +jokCDmf33rQc4axxnu0ot+Up6nmV7XcGApLQWxJfbx9hhFOYfipWzgtX1FlXbx62 +5gG8WWw0NjCKpTN39Qq7y8bJIJoCMXlKrZuZ5yDIJsgTsVYX3RLOw+CuOiagjN0f +9btL4X7uO0b34vFjckd1GDrDgNtWjEJiFBQqM82e3BzwEcG1Gkh6LqaFzJpqo8Ql +tAwr+0uWTN5jCe5+COiSKf3r7YBhCdfsPe2U95+g6GGq2+J3IPlbAgMBAAGjUzBR +MB0GA1UdDgQWBBTTEqyXIy/N6+MkniTCLk3bRMIcTzAfBgNVHSMEGDAWgBTTEqyX +Iy/N6+MkniTCLk3bRMIcTzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUA +A4ICAQAM8YYARPRmAYVJTrDL1D7I8w7vRHkRak57Y3CpvgcCQLZSjsc94FVeUUbd +zE7vLM/Fh59hu4PJQfrBfCpoixRqZ5Wqmh0R/Ws0mxaqBnkRcKR/Su76iFGiEAQ1 +tzHjGTUw+Qg8/rR9QoJjhwjrjofBYifAyNikvJ0AeHkAWLdT4BFJjZydi2zGoeZw +Er5uROlGntso2BEoW7sGsFVXjCN8R+oezihowjqluRbQ6yuKj6Bpb6AMZVAj7bx0 +SnoE1Nqo6b0qyAd8HldJK5NinXdwbOzhSs1JtISLB/5r9ZJYmgBIEqom03/lJ49s +Y2ceQP+xK0UApsHifDlOo8/3NoUiaZnCfGF+feEE7b6+hDQ7PdoY6wve3sUrpjKf +C2qmE5LEOR0fHxCgj8KiRm+AapomJdGHjlbaaf2q+9cnG7WV6K/OFz+f38MVS9Cz +XbOyLHSJGZNMjdLy722DT8saVrR85nStG4KrnlDDsr0kLp31QpObHWgw6NU4pU5n +/ZIUW53dq0QUy3sTpehM3U1EfxWLkqP5EwID5Vny27VEqrHohlXjjWOf/G0Q64MS +ZtGCFwzJwPHmTaVZnLO8zc0tbnzJjxkJbrEnhaQvHdz0BBHEFvZafUFCGJahMPJV +c3dQRszg9OTAyUwNKQEAuZ9II/cCpLyE+GbnqRdkErHgO7kiKQ== +-----END CERTIFICATE----- +)#"; + +} // namespace resources + +#endif //CERTIFICATE_H + diff --git a/resources/public_key.pem.h b/resources/public_key.pem.h new file mode 100644 index 0000000000..24f1676478 --- /dev/null +++ b/resources/public_key.pem.h @@ -0,0 +1,26 @@ +#ifndef PUBLIC_KEY_H +#define PUBLIC_KEY_H + +#include + +namespace resources +{ + constexpr std::string_view public_key = +R"#(-----BEGIN RSA PUBLIC KEY----- +MIICCgKCAgEAs1wvIbPBKmQbOyIz2lPzbUB1cmoIzsIHCzL0T1Ol/8P6IF3BCy6Q +gFweuQd/2D6r0FgMgq7T96p4TtyhCDQcAn8LGjBYACjkwJgkeoManvcgdRXG8Z61 +VWvLqvXdASmP8zO/PiefJkyXB1eNYvLP8C0NF9PSL5NvKorcFgFOzRhbf98biDgN +36/w6xA6N8MNO/mJBJo1C6JJ8JtADxsvVpeqKMVwTaKZGcsVDcjGtwtWSRcQDjEC +mznfhpUpUFcUBLtQgjQyZO+GYdJnpWXbV8CGYbAkY+tBKVJDwmFW4izirtN+nVId +6gf6WaJ31f3aJaWsz+ANkuIoyTxUeW31jWRpg9RQqrWY2gcYnwjHgny6YJUJoh7N +hjlCqYIsqeI/hW4Iahhpe6JZ/8Q5r5gYwZhooH3IkuxCm6i6VZVOsrKuK/lhbrwJ +PS6OiQIOZ/fetBzhrHGe7Si35SnqeZXtdwYCktBbEl9vH2GEU5h+KlbOC1fUWVdv +HrbmAbxZbDQ2MIqlM3f1CrvLxskgmgIxeUqtm5nnIMgmyBOxVhfdEs7D4K46JqCM +3R/1u0vhfu47Rvfi8WNyR3UYOsOA21aMQmIUFCozzZ7cHPARwbUaSHoupoXMmmqj +xCW0DCv7S5ZM3mMJ7n4I6JIp/evtgGEJ1+w97ZT3n6DoYarb4ncg+VsCAwEAAQ== +-----END RSA PUBLIC KEY----- +)#"; + +} // namespace resources + +#endif //PUBLIC_KEY_H From a5f986410db9b062ada8458a2767a71891e9c172 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 23 May 2023 17:31:15 +0200 Subject: [PATCH 095/470] Fix build on Windows again. done as part of CURA-10475 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 53a9318c95..affbee0b6c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -114,7 +114,7 @@ def generate(self): tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info - tc.variables["GRPC_IMPORT_DIRS"] = cpp_info.resdirs[0] + tc.variables["GRPC_IMPORT_DIRS"] = cpp_info.resdirs[0].replace("\\", "/") tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).rglob("*.proto")]) tc.generate() From b401f314df8218a101ba911734e1b70f41b6326d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 23 May 2023 18:22:14 +0200 Subject: [PATCH 096/470] Split channel-code into header and source. Also move to utils. And fix benchmark code. part of CURA-10475 --- CMakeLists.txt | 1 + benchmark/simplify_benchmark.h | 11 +++-- include/plugins/channel.h | 56 ------------------------ include/utils/channel.h | 26 +++++++++++ src/communication/ArcusCommunication.cpp | 7 ++- src/utils/channel.cpp | 40 +++++++++++++++++ 6 files changed, 77 insertions(+), 64 deletions(-) delete mode 100644 include/plugins/channel.h create mode 100644 include/utils/channel.h create mode 100644 src/utils/channel.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 86528004b1..a0ac0bd8d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,7 @@ set(engine_SRCS # Except main.cpp. src/utils/AABB.cpp src/utils/AABB3D.cpp + src/utils/channel.cpp src/utils/Date.cpp src/utils/ExtrusionJunction.cpp src/utils/ExtrusionLine.cpp diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 4d9862e0ce..b5e6d79b0c 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -11,7 +11,10 @@ #include #include "../tests/ReadTestPolygons.h" + +#include "utils/channel.h" #include "utils/Simplify.h" + #include "plugins/slots.h" namespace cura @@ -61,7 +64,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } @@ -71,11 +74,11 @@ BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_noplugin); BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::State& st) { auto host = "localhost"; - auto port = 33700; + auto port = 33700UL; try { - slots::instance().connect( grpc::CreateChannel(fmt::format("{}:{}", host, port), grpc::InsecureChannelCredentials())); + slots::instance().connect(utils::createChannel({host, port})); } catch (std::runtime_error e) { @@ -86,7 +89,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } diff --git a/include/plugins/channel.h b/include/plugins/channel.h deleted file mode 100644 index 05fb9c10a2..0000000000 --- a/include/plugins/channel.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef CHANNEL_H -#define CHANNEL_H - -#include -#include - -#include "../resources/certificate.pem.h" -#include "plugins/slots.h" - -#ifndef BUILD_ALLOW_REMOTE_PLUGINS -#define BUILD_ALLOW_REMOTE_PLUGINS true -#endif - -namespace cura::plugins -{ - namespace details - { - constexpr bool ALLOW_REMOTE_PLUGINS = (BUILD_ALLOW_REMOTE_PLUGINS); - } // namespace details - - struct ChannelSetupConfiguration - { - public: - std::string host; - uint64_t port; - uint64_t shibolet = 0UL; //TODO: Either get from startup (plugin would receive this as well) or remove completely. - }; - - auto createChannel(const ChannelSetupConfiguration& plugins_config = {"localhost", 50010UL}) - { - constexpr auto create_credentials = - [](const ChannelSetupConfiguration& plugins_config) - { - if (plugins_config.host == "localhost" || plugins_config.host == "127.0.0.1") - { - spdlog::info("Create local channel on port {}.", plugins_config.port); - return grpc::InsecureChannelCredentials(); - } - else if (details::ALLOW_REMOTE_PLUGINS) - { - spdlog::info("Create local channel on port {}.", plugins_config.port); - auto creds_config = grpc::SslCredentialsOptions(); - creds_config.pem_root_certs = resources::certificate; - return grpc::SslCredentials(creds_config); - } - // Create empty credentials, so it'll make a dummy channel where all operations fail. - // This is consitent with creating a channel with the wrong credentials as it where. - spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", plugins_config.host, plugins_config.port); - return std::shared_ptr(); - }; - return grpc::CreateChannel(fmt::format("{}:{}", plugins_config.host, plugins_config.port), create_credentials(plugins_config)); - } - -} // namespace cura::plugins - -#endif // CHANNEL_H diff --git a/include/utils/channel.h b/include/utils/channel.h new file mode 100644 index 0000000000..ec3e9e7e01 --- /dev/null +++ b/include/utils/channel.h @@ -0,0 +1,26 @@ +#ifndef CHANNEL_H +#define CHANNEL_H + +#include +#include +#include + +#ifndef BUILD_ALLOW_REMOTE_CHANNELS +#define BUILD_ALLOW_REMOTE_CHANNELS true +#endif + +namespace cura::utils +{ + struct ChannelSetupConfiguration + { + public: + std::string host; + uint64_t port; + uint64_t shibolet = 0UL; //TODO: Either get from startup (server would receive this as well) or remove completely. + }; + + std::shared_ptr createChannel(const ChannelSetupConfiguration& config = { "localhost", 50010UL }); + +} // namespace cura::utils + +#endif // CHANNEL_H diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index ccf8da5ed2..8b4d9cf9f4 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -8,7 +8,6 @@ #include //To map settings to their extruder numbers for limit_to_extruder. #include -#include #include #include "Application.h" //To get and set the current slice command. @@ -22,9 +21,9 @@ #include "communication/SliceDataStruct.h" //To store sliced layer data. #include "settings/types/LayerIndex.h" //To point to layers. #include "settings/types/Velocity.h" //To send to layer view how fast stuff is printing. +#include "utils/channel.h" #include "utils/polygon.h" -#include "plugins/channel.h" #include "plugins/slots.h" namespace cura @@ -517,10 +516,10 @@ void ArcusCommunication::sliceNext() switch (plugin.id()) { case cura::proto::SlotID::SIMPLIFY: - slots::instance().connect(plugins::createChannel({ plugin.address(), plugin.port() })); + slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); break; case cura::proto::SlotID::POSTPROCESS: - slots::instance().connect(plugins::createChannel({ plugin.address(), plugin.port() })); + slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); break; default: break; } diff --git a/src/utils/channel.cpp b/src/utils/channel.cpp new file mode 100644 index 0000000000..c1672cbe7e --- /dev/null +++ b/src/utils/channel.cpp @@ -0,0 +1,40 @@ +#include "utils/channel.h" + +#include +#include + +#include "../resources/certificate.pem.h" + +namespace cura::utils +{ + namespace details + { + constexpr bool ALLOW_REMOTE_CHANNELS = (BUILD_ALLOW_REMOTE_CHANNELS); + } // namespace details + + std::shared_ptr createChannel(const ChannelSetupConfiguration& config) + { + constexpr auto create_credentials = + [](const ChannelSetupConfiguration& config) + { + if (config.host == "localhost" || config.host == "127.0.0.1") + { + spdlog::info("Create local channel on port {}.", config.port); + return grpc::InsecureChannelCredentials(); + } + else if (details::ALLOW_REMOTE_CHANNELS) + { + spdlog::info("Create local channel on port {}.", config.port); + auto creds_config = grpc::SslCredentialsOptions(); + creds_config.pem_root_certs = resources::certificate; + return grpc::SslCredentials(creds_config); + } + // Create empty credentials, so it'll make a dummy channel where all operations fail. + // This is consitent with creating a channel with the wrong credentials as it where. + spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", config.host, config.port); + return std::shared_ptr(); + }; + return grpc::CreateChannel(fmt::format("{}:{}", config.host, config.port), create_credentials(config)); + } + +} // namespace cura::utils From 37c1d22a8a69cdd83959b9aa992dea5b5125c55d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 24 May 2023 14:26:31 +0200 Subject: [PATCH 097/470] Fixed some compilation errors on the runner [CURA-10475] --- CMakeLists.txt | 2 ++ include/utils/concepts/generic.h | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87dce7685f..103948d55c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,6 +191,7 @@ find_package(fmt REQUIRED) find_package(range-v3 REQUIRED) find_package(scripta REQUIRED) find_package(neargye-semver REQUIRED) +find_package(gRPC REQUIRED) if (ENABLE_TESTING) find_package(GTest REQUIRED) @@ -208,6 +209,7 @@ target_link_libraries(_CuraEngine scripta::scripta neargye-semver::neargye-semver asio-grpc::asio-grpc + grpc::grpc protobuf::libprotobuf $<$:GTest::gtest>) diff --git a/include/utils/concepts/generic.h b/include/utils/concepts/generic.h index 72c4f70dba..d0c37bab5d 100644 --- a/include/utils/concepts/generic.h +++ b/include/utils/concepts/generic.h @@ -8,21 +8,22 @@ #include #include +#include namespace cura { template concept hashable = requires(T value) { - { std::hash{}(value) } -> std::convertible_to; + { std::hash{}(value) } -> ranges::convertible_to; }; template concept grpc_convertable = requires(T value) { - requires std::semiregular; - requires std::semiregular; - requires std::semiregular; + requires ranges::semiregular; + requires ranges::semiregular; + requires ranges::semiregular; }; } // namespace cura From b36f2a1a568d8e9f17557b252a491f43c661c83d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 26 May 2023 09:30:11 +0200 Subject: [PATCH 098/470] Reenable ENABLE_PLUGINS [CURA-10475] --- CMakeLists.txt | 16 ++++++++++++---- conanfile.py | 12 +++++++++++- include/utils/channel.h | 7 +++++-- src/communication/ArcusCommunication.cpp | 3 ++- src/utils/channel.cpp | 9 ++++++--- 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9bb840861..0db4918803 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,15 +10,22 @@ AssureOutOfSourceBuilds() option(ENABLE_ARCUS "Enable support for ARCUS" ON) option(ENABLE_TESTING "Build with unit tests" OFF) option(EXTENSIVE_WARNINGS "Build with all warnings" ON) -option(ENABLE_PLUGINS "Build with all warnings" ON) +option(ENABLE_PLUGINS "Build with plugins" ON) +option(ENABLE_REMOTE_PLUGINS "Build with all warnings" OFF) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) -#set(GRPC_PROTOS "List of all gRPC definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") +#set(GRPC_PROTOS "List of all protobuf definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") +#set(GRPC_IMPORT_DIRS "List of all protobuf dirs definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") # Generate the plugin types find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) -find_package(grpc REQUIRED) +find_package(gRPC REQUIRED) + +MESSAGE(STATUS "Compiling with plugins support: ${ENABLE_PLUGINS}") +if (${ENABLE_PLUGINS}) + MESSAGE(STATUS "Plugin secure remotes allowed: ${ENABLE_REMOTE_PLUGINS}") +endif () asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" IMPORT_DIRS ${GRPC_IMPORT_DIRS} OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" @@ -161,7 +168,8 @@ target_include_directories(_CuraEngine target_compile_definitions(_CuraEngine PUBLIC $<$:ARCUS> - $<$:PLUGINS> + $<$:ENABLE_PLUGINS> + $<$,$>:ENABLE_REMOTE_PLUGINS> CURA_ENGINE_VERSION=\"${CURA_ENGINE_VERSION}\" $<$:BUILD_TESTS> PRIVATE diff --git a/conanfile.py b/conanfile.py index affbee0b6c..46b5ed2a6f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -30,6 +30,7 @@ class CuraEngineConan(ConanFile): "enable_benchmarks": [True, False], "enable_extensive_warnings": [True, False], "enable_plugins": [True, False], + "enable_remote_plugins": [True, False], } default_options = { "enable_arcus": True, @@ -37,6 +38,7 @@ class CuraEngineConan(ConanFile): "enable_benchmarks": False, "enable_extensive_warnings": False, "enable_plugins": True, + "enable_remote_plugins": False, } def set_version(self): @@ -54,6 +56,10 @@ def export_sources(self): copy(self, "*", path.join(self.recipe_folder, "benchmark"), path.join(self.export_sources_folder, "benchmark")) copy(self, "*", path.join(self.recipe_folder, "tests"), path.join(self.export_sources_folder, "tests")) + def config_options(self): + if not self.options.enable_plugins: + del self.options.enable_remote_plugins + def configure(self): self.options["boost"].header_only = True self.options["clipper"].shared = True @@ -112,7 +118,11 @@ def generate(self): tc.variables["ENABLE_TESTING"] = self.options.enable_testing tc.variables["ENABLE_BENCHMARKS"] = self.options.enable_benchmarks tc.variables["EXTENSIVE_WARNINGS"] = self.options.enable_extensive_warnings - tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins + if self.options.enable_plugins: + tc.variables["ENABLE_PLUGINS"] = True + tc.variables["ENABLE_REMOTE_PLUGINS"] = self.options.enable_remote_plugins + else: + tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info tc.variables["GRPC_IMPORT_DIRS"] = cpp_info.resdirs[0].replace("\\", "/") tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).rglob("*.proto")]) diff --git a/include/utils/channel.h b/include/utils/channel.h index ec3e9e7e01..30dbb5dff2 100644 --- a/include/utils/channel.h +++ b/include/utils/channel.h @@ -1,3 +1,6 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + #ifndef CHANNEL_H #define CHANNEL_H @@ -5,8 +8,8 @@ #include #include -#ifndef BUILD_ALLOW_REMOTE_CHANNELS -#define BUILD_ALLOW_REMOTE_CHANNELS true +#ifndef ENABLE_REMOTE_PLUGINS +#define ENABLE_REMOTE_PLUGINS false #endif namespace cura::utils diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 8b4d9cf9f4..14fd6cbaf2 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -508,7 +508,7 @@ void ArcusCommunication::sliceNext() } spdlog::debug("Received a Slice message."); - // TODO: Use typemap +#ifdef ENABLE_PLUGINS for (const auto& plugin : slice_message->engine_plugins()) { if (plugin.has_address() && plugin.has_port()) @@ -525,6 +525,7 @@ void ArcusCommunication::sliceNext() } } } +#endif // ENABLE_PLUGINS Slice slice(slice_message->object_lists().size()); Application::getInstance().current_slice = &slice; diff --git a/src/utils/channel.cpp b/src/utils/channel.cpp index c1672cbe7e..1cbcf017b1 100644 --- a/src/utils/channel.cpp +++ b/src/utils/channel.cpp @@ -1,3 +1,6 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + #include "utils/channel.h" #include @@ -9,7 +12,7 @@ namespace cura::utils { namespace details { - constexpr bool ALLOW_REMOTE_CHANNELS = (BUILD_ALLOW_REMOTE_CHANNELS); + inline constexpr static bool ALLOW_REMOTE_CHANNELS = ENABLE_REMOTE_PLUGINS; } // namespace details std::shared_ptr createChannel(const ChannelSetupConfiguration& config) @@ -22,7 +25,7 @@ namespace cura::utils spdlog::info("Create local channel on port {}.", config.port); return grpc::InsecureChannelCredentials(); } - else if (details::ALLOW_REMOTE_CHANNELS) + if (details::ALLOW_REMOTE_CHANNELS) { spdlog::info("Create local channel on port {}.", config.port); auto creds_config = grpc::SslCredentialsOptions(); @@ -30,7 +33,7 @@ namespace cura::utils return grpc::SslCredentials(creds_config); } // Create empty credentials, so it'll make a dummy channel where all operations fail. - // This is consitent with creating a channel with the wrong credentials as it where. + // This is consistent with creating a channel with the wrong credentials as it where. spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", config.host, config.port); return std::shared_ptr(); }; From 66078d9d487719d2655e674dce61371a7757684c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 5 Jul 2023 08:54:46 +0200 Subject: [PATCH 099/470] Move generic.h to types folder and add grpc_convertable concept The file generic.h was moved from the utils/concepts directory to the utils/types directory to better reflect the contents of the file, now including a new concept for grpc_convertable. This new concept checks if a type T is a semiregular type that can convert to grpc. This enhances the code's clarity and can improve the development of grpc-utilizing functionalities. Contributes to CURA-10475 --- include/plugins/pluginproxy.h | 4 ++-- include/plugins/types.h | 2 +- include/utils/concepts/generic.h | 0 include/utils/types/generic.h | 11 +++++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) delete mode 100644 include/utils/concepts/generic.h diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 13daba6f0d..bb549d7be7 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -20,7 +20,7 @@ #include "plugins/metadata.h" #include "cura/plugins/v0/slot_id.pb.h" -#include "utils/concepts/generic.h" +#include "utils/types/generic.h" namespace cura::plugins { @@ -38,7 +38,7 @@ namespace cura::plugins * @tparam Request The gRPC convertible request type. * @tparam Response The gRPC convertible response type. */ -template +template class PluginProxy { public: diff --git a/include/plugins/types.h b/include/plugins/types.h index 043a042c32..1ddd93c371 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -11,7 +11,7 @@ #include #include "utils/IntPoint.h" -#include "utils/concepts/generic.h" +#include "utils/types/generic.h" #include "utils/polygon.h" #include "cura/plugins/v0/slot_id.pb.h" diff --git a/include/utils/concepts/generic.h b/include/utils/concepts/generic.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/utils/types/generic.h b/include/utils/types/generic.h index b6a3c49b3e..402eeba9c2 100644 --- a/include/utils/types/generic.h +++ b/include/utils/types/generic.h @@ -8,6 +8,9 @@ #include #include +#include +#include + namespace cura::utils { template @@ -16,6 +19,14 @@ concept hashable = requires(T value) { std::hash{}(value) } -> concepts::convertible_to; }; +template +concept grpc_convertable = requires(T value) +{ + requires ranges::semiregular; + requires ranges::semiregular; + requires ranges::semiregular; +}; + #ifdef OLDER_APPLE_CLANG // std::integral and std::floating_point are not implemented in older Apple Clang versions < 13 From 7b1e854793071d1afa1dd5d79197ef85b06bcec2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 5 Jul 2023 09:17:20 +0200 Subject: [PATCH 100/470] Shift UUID generation from FffGcodeWriter to Application The changes are intended to centralize UUID generation inside the Application class rather than in each instance of the FffGcodeWriter class. This approach allows plugins to hook up with multiple instances and still differentiate where the data comes from. This is done by introducing instance_uuid data member in the Application class which generates and stores UUID. This UUID is then used in FffGcodeWriter constructor. This change also removes the dependency on boost/uuid in FffGcodeWriter. Contributes to CURA-10715 --- include/Application.h | 9 +++++++-- src/Application.cpp | 6 ++++-- src/FffGcodeWriter.cpp | 4 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/Application.h b/include/Application.h index 13dbdc150c..1b427864f5 100644 --- a/include/Application.h +++ b/include/Application.h @@ -4,9 +4,12 @@ #ifndef APPLICATION_H #define APPLICATION_H -#include "utils/NoCopy.h" -#include //For size_t. +#include #include +#include + +#include "utils/NoCopy.h" + namespace cura { @@ -89,6 +92,8 @@ class Application : NoCopy */ void startThreadPool(int nworkers=0); + std::string_view instance_uuid; + protected: #ifdef ARCUS /*! diff --git a/src/Application.cpp b/src/Application.cpp index 15454631d8..a31577ff70 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -7,6 +7,8 @@ #include #include +#include //For generating a UUID. +#include //For generating a UUID. #include #include #include @@ -28,7 +30,7 @@ namespace cura { -Application::Application() +Application::Application() : instance_uuid(boost::uuids::to_string(boost::uuids::random_generator()())) { auto dup_sink = std::make_shared(std::chrono::seconds{ 10 }); auto base_sink = std::make_shared(); @@ -39,7 +41,7 @@ Application::Application() if (auto spdlog_val = spdlog::details::os::getenv("CURAENGINE_LOG_LEVEL"); ! spdlog_val.empty()) { spdlog::cfg::helpers::load_levels(spdlog_val); - } + }; } Application::~Application() diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 1ae71f4c0f..708c84f9c1 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -7,8 +7,6 @@ #include #include -#include //For generating a UUID. -#include //For generating a UUID. #include #include @@ -34,7 +32,7 @@ namespace cura { -FffGcodeWriter::FffGcodeWriter() : max_object_height(0), layer_plan_buffer(gcode), slice_uuid(boost::uuids::to_string(boost::uuids::random_generator()())) +FffGcodeWriter::FffGcodeWriter() : max_object_height(0), layer_plan_buffer(gcode), slice_uuid(Application::getInstance().instance_uuid) { for (unsigned int extruder_nr = 0; extruder_nr < MAX_EXTRUDERS; extruder_nr++) { // initialize all as max layer_nr, so that they get updated to the lowest layer on which they are used. From 67c61c3c0cd32f9447acf77aa536288cf2b9a36c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 5 Jul 2023 11:50:24 +0200 Subject: [PATCH 101/470] Add `engine_uuid` and `thread_uuid` to metadata Changed `instance_uuid` from `std::string_view` to `std::string` in `Application.h` and added `engine_uuid` to `metadata.h`. Also included `` and `Application.h` in `pluginproxy.h` to generate `engine_uuid` and `thread_id` for every thread and added these keys to metadata for the RPC's such that plugins can keep the books where data came from. Contribute to CURA-10715 --- include/Application.h | 2 +- include/plugins/metadata.h | 1 + include/plugins/pluginproxy.h | 10 ++++++++-- include/utils/format/thread_id.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 include/utils/format/thread_id.h diff --git a/include/Application.h b/include/Application.h index 1b427864f5..9bcf4fdb28 100644 --- a/include/Application.h +++ b/include/Application.h @@ -92,7 +92,7 @@ class Application : NoCopy */ void startThreadPool(int nworkers=0); - std::string_view instance_uuid; + std::string instance_uuid; protected: #ifdef ARCUS diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index db17d9a201..461fe9ea53 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -57,6 +57,7 @@ struct slot_metadata { plugins::v0::SlotID slot_id; std::string_view version_range; + std::string_view engine_uuid; }; } // namespace cura::plugins diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index bb549d7be7..2e94d73e28 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -4,6 +4,8 @@ #ifndef PLUGINS_PLUGINPROXY_H #define PLUGINS_PLUGINPROXY_H +#include + #include #include #include @@ -16,11 +18,13 @@ #include #include +#include "Application.h" +#include "utils/format/thread_id.h" #include "plugins/exception.h" #include "plugins/metadata.h" +#include "utils/types/generic.h" #include "cura/plugins/v0/slot_id.pb.h" -#include "utils/types/generic.h" namespace cura::plugins { @@ -61,7 +65,7 @@ class PluginProxy ranges::semiregular_box stub_; ///< The gRPC stub for communication. - constexpr static slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value }; + slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; std::optional plugin_info_{ std::nullopt }; ///< The plugin info object. public: @@ -134,6 +138,8 @@ class PluginProxy // Metadata client_context.AddMetadata("cura-slot-service-name", fmt::format("{}", slot_info_.slot_id)); client_context.AddMetadata("cura-slot-version-range", slot_info_.version_range.data()); + client_context.AddMetadata("cura-engine-uuid", slot_info_.engine_uuid.data()); + client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); // Construct request auto request{ req_(std::forward(args)...) }; diff --git a/include/utils/format/thread_id.h b/include/utils/format/thread_id.h new file mode 100644 index 0000000000..48bf1158b1 --- /dev/null +++ b/include/utils/format/thread_id.h @@ -0,0 +1,28 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef UTILS_FORMAT_THREAD_ID_H +#define UTILS_FORMAT_THREAD_ID_H + +#include +#include +#include + +#include + +namespace fmt +{ +template<> +struct formatter : formatter +{ + template + auto format(std::thread::id thread_id, FormatContext& ctx) + { + std::ostringstream oss; + oss << thread_id; + return formatter::format(oss.str(), ctx); + } +}; + +} // namespace fmt +#endif // UTILS_FORMAT_THREAD_ID_H From a7a8f41f3facd54bbe02fce47d97d3609f7424c3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 5 Jul 2023 15:00:17 +0200 Subject: [PATCH 102/470] Update dependency version in conanfile Updated the 'curaengine_grpc_definitions' version to use the latest from 'ultimaker/cura_10714' instead of 'ultimaker/testing' in conanfile.py. This change ensures our project is using the grpc definitions with the handshake RPCs added to the services Contribute to CURA-10714 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index f65b912c6c..ec64e0c14b 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10714") def generate(self): deps = CMakeDeps(self) From 0f0e9f07a943ed2c27c088836e2b950e54d39a6f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 5 Jul 2023 15:01:35 +0200 Subject: [PATCH 103/470] Add new rule to .clang-tidy configuration This commit includes the addition of 'cppcoreguidelines-avoid-capturing-lambda-coroutines' rule to the .clang-tidy configuration file. This rule has been added to supress the warnings in the co_await routines Contribute to CURA-10714 --- .clang-tidy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 77b35faafa..61be54b772 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -10,7 +10,8 @@ Checks: > -altera-struct-pack-align, -android-*, -misc-non-private-member-variables-in-classes, - -fuchsia-overloaded-operator + -fuchsia-overloaded-operator, + -cppcoreguidelines-avoid-capturing-lambda-coroutines WarningsAsErrors: '-*' HeaderFilterRegex: '' FormatStyle: none From 694ee17852df4c51cc577fb35cffe0ff58456561 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 6 Jul 2023 14:27:34 +0200 Subject: [PATCH 104/470] Update gRPC method naming and dependency inclusion This commit updates the gRPC method naming in Slots and Converters files from 'Modify' to 'Call' based on recent API changes. In the PluginProxy file, a function to prepare the gRPC client context has been extracted for reducing code repetition and improving readability. Contributes to CURA-10714 --- include/plugins/converters.h | 8 ++++---- include/plugins/pluginproxy.h | 29 ++++++++++++++++------------- include/plugins/slots.h | 4 ++-- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 0282605634..7339daa2e2 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -22,7 +22,7 @@ namespace cura::plugins struct simplify_request { - using value_type = slots::simplify::v0::SimplifyServiceModifyRequest; ///< The protobuf message type. + using value_type = slots::simplify::v0::CallRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -80,7 +80,7 @@ struct simplify_request */ struct simplify_response { - using value_type = slots::simplify::v0::SimplifyServiceModifyResponse; ///< The protobuf message type. + using value_type = slots::simplify::v0::CallResponse; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -118,7 +118,7 @@ struct simplify_response struct postprocess_request { - using value_type = slots::postprocess::v0::PostprocessServiceModifyRequest; ///< The protobuf message type. + using value_type = slots::postprocess::v0::CallRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. /** @@ -137,7 +137,7 @@ struct postprocess_request struct postprocess_response { - using value_type = slots::postprocess::v0::PostprocessServiceModifyResponse; + using value_type = slots::postprocess::v0::CallResponse; using native_value_type = std::string; native_value_type operator()(const value_type& message) const diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 2e94d73e28..cd79b89046 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,9 +19,9 @@ #include #include "Application.h" -#include "utils/format/thread_id.h" #include "plugins/exception.h" #include "plugins/metadata.h" +#include "utils/format/thread_id.h" #include "utils/types/generic.h" #include "cura/plugins/v0/slot_id.pb.h" @@ -129,17 +129,9 @@ class PluginProxy grpc_context, [this, &status, &grpc_context, &ret_value, &args...]() -> boost::asio::awaitable { - using RPC = agrpc::RPC<&stub_t::PrepareAsyncModify>; + using RPC = agrpc::RPC<&stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; - - // Set time-out - client_context.set_deadline(std::chrono::system_clock::now() + std::chrono::milliseconds(500)); // TODO: don't use magic number and make it realistic - - // Metadata - client_context.AddMetadata("cura-slot-service-name", fmt::format("{}", slot_info_.slot_id)); - client_context.AddMetadata("cura-slot-version-range", slot_info_.version_range.data()); - client_context.AddMetadata("cura-engine-uuid", slot_info_.engine_uuid.data()); - client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); + prep_client_context(client_context); // Construct request auto request{ req_(std::forward(args)...) }; @@ -162,7 +154,7 @@ class PluginProxy boost::asio::detached); grpc_context.run(); - if (! status.ok()) // TODO: handle different kind of status codes + if (! status.ok()) // TODO: handle different kind of status codes { if (plugin_info_.has_value()) { @@ -171,7 +163,7 @@ class PluginProxy throw exceptions::RemoteException(slot_info_, status.error_message()); } - if (! valid_ ) + if (! valid_) { if (plugin_info_.has_value()) { @@ -182,6 +174,17 @@ class PluginProxy return ret_value; } + + void prep_client_context(grpc::ClientContext& client_context, std::chrono::milliseconds timeout = std::chrono::milliseconds(500)) + { + // Set time-out + client_context.set_deadline(std::chrono::system_clock::now() + timeout); + + // Metadata + client_context.AddMetadata("cura-engine-uuid", slot_info_.engine_uuid.data()); + client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); + } + }; } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index ed29493824..7ff29b8a04 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -49,7 +49,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy; +using slot_simplify_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -59,7 +59,7 @@ using slot_simplify_ = SlotProxy -using slot_postprocess_ = SlotProxy; +using slot_postprocess_ = SlotProxy; template struct Typelist From c5c063eb1062838e4442d68535894e3d5b9d1d27 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 9 Jul 2023 16:38:20 +0200 Subject: [PATCH 105/470] Handshake RPC during plugin creation Implement Handshake RPC during plugin creation A handshake mechanism has been added during plugin creation, ensuring the necessary compatibility and functionality verification before initializing the plugin. This change refactored the PluginProxy class to establish the handshake during the plugin construction and validate it. Adjustments to plugin_metadata structure and exception handling were also necessary. The handshake message conversion logic has been added with simplify_request and handshake_response structures. This action was necessary to ensure the appropriate plugin version is used, improving system reliability and stability. Contributes to CURA-10714 --- include/plugins/converters.h | 47 +++++++++++++++++++++ include/plugins/exception.h | 4 +- include/plugins/metadata.h | 42 ++++--------------- include/plugins/pluginproxy.h | 78 +++++++++++++++++++++++++---------- 4 files changed, 112 insertions(+), 59 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 7339daa2e2..e814c36c27 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -10,8 +10,11 @@ #include #include +#include "plugins/metadata.h" #include "plugins/types.h" +#include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" +#include "cura/plugins/slots/handshake/v0/handshake.pb.h" #include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/postprocess.pb.h" #include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" @@ -20,6 +23,50 @@ namespace cura::plugins { +struct handshake_request +{ + using value_type = slots::handshake::v0::CallRequest; ///< The protobuf message type. + using native_value_type = slot_metadata; ///< The native value type. + + /** + * @brief Converts native data for handshake to a `proto::HandshakeRequest` message. + * + * @param service_name The name of the service. + * @param version_range The version range of the service. + * @return The converted `proto::HandshakeRequest` message. + */ + + value_type operator()(const native_value_type& slot_info) const + { + value_type message{}; + message.set_slot_id(slot_info.slot_id); + message.set_version_range(slot_info.version_range.data()); + return message; + } +}; + +struct handshake_response +{ + using value_type = slots::handshake::v0::CallResponse; ///< The protobuf message type. + using native_value_type = plugin_metadata; ///< The native value type. + + /** + * @brief Converts a `proto::HandshakeResponse` message to native data. + * + * @param message The `proto::HandshakeResponse` message. + * @return The native data. + */ + native_value_type operator()(const value_type& message, std::string_view peer) const + { + return { .slot_version = message.slot_version(), + .plugin_name = message.plugin_name(), + .plugin_version = message.plugin_version(), + .peer = peer, + .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; + } +}; + + struct simplify_request { using value_type = slots::simplify::v0::CallRequest; ///< The protobuf message type. diff --git a/include/plugins/exception.h b/include/plugins/exception.h index 9ef2fdcf07..a5328a3357 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -25,7 +25,7 @@ class ValidatorException : public std::exception ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept : msg_(fmt::format("Failed to validation plugin on Slot '{}'", slot_info.slot_id)){}; ValidatorException(const auto& validator, const slot_metadata& slot_info, const plugin_metadata& plugin_info) noexcept - : msg_(fmt::format("Failed to validate plugin '{}-{}' running at [{}] for slot '{}', slot range '{}' incompatible with plugin slot version '{}'", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, slot_info.version_range, plugin_info.slot_version)) + : msg_(fmt::format("Failed to validate plugin '{}-{}' running at [{}] for slot '{}', slot range '{}' incompatible with plugin slot version '{}'", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info.slot_id, slot_info.version_range, plugin_info.slot_version)) { } @@ -43,7 +43,7 @@ class RemoteException : public std::exception RemoteException(const slot_metadata& slot_info, std::string_view error_msg) noexcept : msg_(fmt::format("Remote exception on Slot '{}': {}", slot_info.slot_id, error_msg)){}; RemoteException(const slot_metadata& slot_info, const plugin_metadata& plugin_info, std::string_view error_msg) noexcept - : msg_(fmt::format("Remote exception for plugin '{}-{}' running at [{}] for slot '{}': {}", plugin_info.name, plugin_info.version, plugin_info.peer, slot_info.slot_id, error_msg)) + : msg_(fmt::format("Remote exception for plugin '{}-{}' running at [{}] for slot '{}': {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info.slot_id, error_msg)) { } diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 461fe9ea53..511ca734fd 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -4,6 +4,7 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_METADATA_H #define CURAENGINE_INCLUDE_PLUGINS_METADATA_H +#include #include #include @@ -14,43 +15,14 @@ namespace cura::plugins { + struct plugin_metadata { - std::string name; // cura-plugin-name (optional) - std::string version; // cura-plugin-version (optional) - std::string peer; - std::string slot_version; // cura-slot-version (required) - - explicit plugin_metadata(const grpc::ClientContext& client_context) - { - const auto& metadata = client_context.GetServerInitialMetadata(); - if (auto it = metadata.find("cura-slot-version"); it != metadata.end()) - { - slot_version = std::string{ it->second.data(), it->second.size() }; - } - else - { - spdlog::error("'cura-slot-version' RPC metadata not set"); - throw std::runtime_error("'cura-slot-version' RPC metadata not set"); - } - if (auto it = metadata.find("cura-plugin-name"); it != metadata.end()) - { - name = std::string{ it->second.data(), it->second.size() }; - } - else - { - spdlog::warn("'cura-plugin-name' RPC metadata not set"); - } - if (auto it = metadata.find("cura-plugin-version"); it != metadata.end()) - { - version = std::string{ it->second.data(), it->second.size() }; - } - else - { - spdlog::warn("'cura-plugin-version' RPC metadata not set"); - } - peer = client_context.peer(); - } + std::string_view slot_version; + std::string_view plugin_name; + std::string_view plugin_version; + std::string_view peer; + std::set broadcast_subscriptions; }; struct slot_metadata diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index cd79b89046..b064adb3b0 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -24,6 +24,7 @@ #include "utils/format/thread_id.h" #include "utils/types/generic.h" +#include "cura/plugins/slots/handshake/v0/handshake.pb.h" #include "cura/plugins/v0/slot_id.pb.h" namespace cura::plugins @@ -81,7 +82,59 @@ class PluginProxy * @throws std::runtime_error if the plugin fails validation or communication errors occur. */ constexpr PluginProxy() = default; - explicit PluginProxy(std::shared_ptr channel) : stub_(channel){}; + + explicit PluginProxy(std::shared_ptr channel) : stub_(channel) + { + // Connect to the plugin and exchange a handshake + agrpc::GrpcContext grpc_context; + grpc::Status status; + slots::handshake::v0::HandshakeService::Stub handshake_stub(channel); + + boost::asio::co_spawn( + grpc_context, + [this, &status, &grpc_context, &handshake_stub]() -> boost::asio::awaitable + { + using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context); + + // Construct request + handshake_request handshake_req; + handshake_request::value_type request{ handshake_req(slot_info_) }; + + // Make unary request + handshake_response::value_type response; + status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); + handshake_response handshake_rsp; + plugin_info_ = handshake_rsp(response, client_context.peer()); + valid_ = validator_type{ slot_info_, plugin_info_.value() }; + if (valid_) + { + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); + } + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_.has_value()) + { + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + } + throw exceptions::RemoteException(slot_info_, status.error_message()); + } + + if (! valid_) + { + if (plugin_info_.has_value()) + { + throw exceptions::ValidatorException(valid_, slot_info_, plugin_info_.value()); + } + throw exceptions::ValidatorException(valid_, slot_info_); + } + }; + constexpr PluginProxy(const PluginProxy&) = default; constexpr PluginProxy(PluginProxy&&) noexcept = default; constexpr PluginProxy& operator=(const PluginProxy& other) @@ -91,6 +144,7 @@ class PluginProxy valid_ = other.valid_; stub_ = other.stub_; plugin_info_ = other.plugin_info_; + slot_info_ = other.slot_info_; } return *this; } @@ -101,6 +155,7 @@ class PluginProxy valid_ = std::move(other.valid_); stub_ = std::move(other.stub_); plugin_info_ = std::move(other.plugin_info_); + slot_info_ = std::move(other.slot_info_); } return *this; } @@ -140,16 +195,6 @@ class PluginProxy rsp_msg_type response; status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); ret_value = rsp_(response); - - if (! plugin_info_.has_value()) - { - plugin_info_ = plugin_metadata{ client_context }; - valid_ = validator_type{ slot_info_, plugin_info_.value() }; - if (valid_) - { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->name, plugin_info_->version, plugin_info_->peer, slot_info_.slot_id); - } - } }, boost::asio::detached); grpc_context.run(); @@ -162,16 +207,6 @@ class PluginProxy } throw exceptions::RemoteException(slot_info_, status.error_message()); } - - if (! valid_) - { - if (plugin_info_.has_value()) - { - throw exceptions::ValidatorException(valid_, slot_info_, plugin_info_.value()); - } - throw exceptions::ValidatorException(valid_, slot_info_); - } - return ret_value; } @@ -184,7 +219,6 @@ class PluginProxy client_context.AddMetadata("cura-engine-uuid", slot_info_.engine_uuid.data()); client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); } - }; } // namespace cura::plugins From 7ad7d9f6fa9aa1eb574ce7e98d18b9557d9c75fe Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 9 Jul 2023 16:47:49 +0200 Subject: [PATCH 106/470] Refactored co_spawn lambda in pluginproxy.h Refactored the lambda function present in co_spawn calls located in methods of pluginproxy.h. This change intends to increase readability and maintenance. The lambda implementation was moved into private member functions 'handshakeCall' and 'modifyCall'. This enhances code organization allowing for easy modification and reuse in the future. Contribute to CURA-10714 --- include/plugins/pluginproxy.h | 81 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index b064adb3b0..1128f8202d 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -91,29 +91,7 @@ class PluginProxy slots::handshake::v0::HandshakeService::Stub handshake_stub(channel); boost::asio::co_spawn( - grpc_context, - [this, &status, &grpc_context, &handshake_stub]() -> boost::asio::awaitable - { - using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context); - - // Construct request - handshake_request handshake_req; - handshake_request::value_type request{ handshake_req(slot_info_) }; - - // Make unary request - handshake_response::value_type response; - status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); - handshake_response handshake_rsp; - plugin_info_ = handshake_rsp(response, client_context.peer()); - valid_ = validator_type{ slot_info_, plugin_info_.value() }; - if (valid_) - { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); - } - }, - boost::asio::detached); + grpc_context, [this, &grpc_context, &status, &handshake_stub]() { return this->handshakeCall(grpc_context, status, handshake_stub); }, boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes @@ -181,22 +159,7 @@ class PluginProxy grpc::Status status; boost::asio::co_spawn( - grpc_context, - [this, &status, &grpc_context, &ret_value, &args...]() -> boost::asio::awaitable - { - using RPC = agrpc::RPC<&stub_t::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context); - - // Construct request - auto request{ req_(std::forward(args)...) }; - - // Make unary request - rsp_msg_type response; - status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = rsp_(response); - }, - boost::asio::detached); + grpc_context, [this, &grpc_context, &status, &ret_value, &args...]() { return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); }, boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes @@ -210,6 +173,46 @@ class PluginProxy return ret_value; } +private: + boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, slots::handshake::v0::HandshakeService::Stub& handshake_stub) + { + using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context); + + // Construct request + handshake_request handshake_req; + handshake_request::value_type request{ handshake_req(slot_info_) }; + + // Make unary request + handshake_response::value_type response; + status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); + handshake_response handshake_rsp; + plugin_info_ = handshake_rsp(response, client_context.peer()); + valid_ = validator_type{ slot_info_, plugin_info_.value() }; + if (valid_) + { + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); + } + co_return; + } + + boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) + { + using RPC = agrpc::RPC<&stub_t::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context); + + // Construct request + auto request{ req_(std::forward(args)...) }; + + // Make unary request + rsp_msg_type response; + status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = rsp_(response); + co_return; + } + void prep_client_context(grpc::ClientContext& client_context, std::chrono::milliseconds timeout = std::chrono::milliseconds(500)) { // Set time-out From cd7152b523821ada713a857ec60ede174668e894 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 9 Jul 2023 16:49:55 +0200 Subject: [PATCH 107/470] Moved private members in pluginproxy.h This refactoring aims to make the public API more clear and understandable by moving private members to the bottom of the file. With this change, it will be easier for the developers to identify and understand the public methods and attributes of the class at a first glance, improving the maintainability and readability of the code. Contributes to CURA-10714 --- include/plugins/pluginproxy.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 1128f8202d..8d8310dafb 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -59,17 +59,6 @@ class PluginProxy using stub_t = Stub; -private: - validator_type valid_{}; ///< The validator object for plugin validation. - req_converter_type req_{}; ///< The request converter object. - rsp_converter_type rsp_{}; ///< The response converter object. - - ranges::semiregular_box stub_; ///< The gRPC stub for communication. - - slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; - std::optional plugin_info_{ std::nullopt }; ///< The plugin info object. - -public: /** * @brief Constructs a PluginProxy object. * @@ -174,6 +163,15 @@ class PluginProxy } private: + validator_type valid_{}; ///< The validator object for plugin validation. + req_converter_type req_{}; ///< The request converter object. + rsp_converter_type rsp_{}; ///< The response converter object. + + ranges::semiregular_box stub_; ///< The gRPC stub for communication. + + slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; + std::optional plugin_info_{ std::nullopt }; ///< The plugin info object. + boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, slots::handshake::v0::HandshakeService::Stub& handshake_stub) { using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; From fc5d7f0def592dd1a9a87f20cfd39386d2fe93e2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 9 Jul 2023 16:56:19 +0200 Subject: [PATCH 108/470] Add documentation CURA-10714 --- include/plugins/pluginproxy.h | 60 +++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 8d8310dafb..f1702bc3d6 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -31,17 +31,17 @@ namespace cura::plugins { /** - * @brief A class template representing a proxy for a plugin. + * @brief A plugin proxy class template. * - * The PluginProxy class template facilitates communication with plugins by providing - * an interface for sending requests and receiving responses. It uses gRPC for communication. + * Template arguments are: + * SlotID - plugin slot ID + * SlotVersionRng - plugin version range + * Stub - process stub type + * ValidatorTp - validator type + * RequestTp - gRPC convertible request type, + * ResponseTp - gRPC convertible response type. * - * @tparam Slot The plugin slot ID. - * @tparam Validator The type used for validating the plugin. - * @tparam Stub The process stub type. - * @tparam Prepare The prepare type. - * @tparam Request The gRPC convertible request type. - * @tparam Response The gRPC convertible response type. + * Class provides methods for validating the plugin, making requests and processing responses. */ template class PluginProxy @@ -129,15 +129,14 @@ class PluginProxy ~PluginProxy() = default; /** - * @brief Executes the plugin operation. + * @brief Executes to plugin Modify operation. * - * This operator allows the PluginProxy object to be invoked as a callable, which sends - * a request to the plugin and waits for the response. The response is converted using - * the response_converter_ object, and the converted value is returned. + * As part of this operation, a request is sent to the plugin + * and the returned response is processed. * - * @tparam Args The argument types for the plugin request. - * @param args The arguments for the plugin request. - * @return The converted response value. + * @tparam Args - argument types for the plugin request + * @param args - arguments for the plugin request + * @return The converted response value from plugin. * * @throws std::runtime_error if communication with the plugin fails. */ @@ -164,14 +163,25 @@ class PluginProxy private: validator_type valid_{}; ///< The validator object for plugin validation. - req_converter_type req_{}; ///< The request converter object. - rsp_converter_type rsp_{}; ///< The response converter object. + req_converter_type req_{}; ///< The Modify request converter object. + rsp_converter_type rsp_{}; ///< The Modify response converter object. - ranges::semiregular_box stub_; ///< The gRPC stub for communication. + ranges::semiregular_box stub_; ///< The gRPC Modify stub for communication. - slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; - std::optional plugin_info_{ std::nullopt }; ///< The plugin info object. + slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. + std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake + /** + * @brief Executes the modifyCall operation with the plugin. + * + * Sends a request to the plugin and saves the response. + * + * @param grpc_context - The gRPC context to use for the call + * @param status - Status of the gRPC call which gets updated in this method + * @param ret_value - Reference to the value in which response to be stored + * @param args - Request arguments + * @return A boost::asio::awaitable indicating completion of the operation + */ boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, slots::handshake::v0::HandshakeService::Stub& handshake_stub) { using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; @@ -211,6 +221,14 @@ class PluginProxy co_return; } + /** + * @brief Prepares client_context for the remote call. + * + * Sets timeout for the call and adds metadata to context. + * + * @param client_context - Client context to prepare + * @param timeout - Call timeout duration (optional, default = 500ms) + */ void prep_client_context(grpc::ClientContext& client_context, std::chrono::milliseconds timeout = std::chrono::milliseconds(500)) { // Set time-out From 078fa6189a283b9fa93c8b76ad4e9207dff03b7d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 9 Jul 2023 16:56:49 +0200 Subject: [PATCH 109/470] Add documentation CURA-10714 --- include/plugins/pluginproxy.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index f1702bc3d6..fdc530d568 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -205,6 +205,17 @@ class PluginProxy co_return; } + /** + * @brief Executes the modifyCall operation with the plugin. + * + * Sends a request to the plugin and saves the response. + * + * @param grpc_context - The gRPC context to use for the call + * @param status - Status of the gRPC call which gets updated in this method + * @param ret_value - Reference to the value in which response to be stored + * @param args - Request arguments + * @return A boost::asio::awaitable indicating completion of the operation + */ boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) { using RPC = agrpc::RPC<&stub_t::PrepareAsyncCall>; From e88b49327d5122aca276c275e547e3e274051e09 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 07:56:20 +0200 Subject: [PATCH 110/470] Use 10618 branch of gRPC defs Contributes to CURA-10618 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index ec64e0c14b..4c59b90b9a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -92,7 +92,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/cura_10475") # TODO: point to `testing` once the CURA-10475 from libArcus is main + self.requires("arcus/(latest)@ultimaker/cura_10618") # TODO: point to `testing` once the CURA-10475 from libArcus is main self.requires("clipper/6.4.2") self.requires("boost/1.81.0") self.requires("rapidjson/1.1.0") From a157b07911ceeb047afed538db1a2cec1e09adc1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 07:58:45 +0200 Subject: [PATCH 111/470] Revert "Use 10618 branch of gRPC defs" This reverts commit e88b49327d5122aca276c275e547e3e274051e09. --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 4c59b90b9a..ec64e0c14b 100644 --- a/conanfile.py +++ b/conanfile.py @@ -92,7 +92,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/cura_10618") # TODO: point to `testing` once the CURA-10475 from libArcus is main + self.requires("arcus/(latest)@ultimaker/cura_10475") # TODO: point to `testing` once the CURA-10475 from libArcus is main self.requires("clipper/6.4.2") self.requires("boost/1.81.0") self.requires("rapidjson/1.1.0") From abc0da8790072637ec25d690578ee4b4d006ea2d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 07:59:21 +0200 Subject: [PATCH 112/470] Use 10618 for gRPC defs CURA-10618 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index ec64e0c14b..230913ef9e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10714") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10618") def generate(self): deps = CMakeDeps(self) From dd1ef6c1e1e2ce246b6919e11d745f6a62f3ecfc Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 08:35:15 +0200 Subject: [PATCH 113/470] Renamed stub to modify_stub To better differentiate between types of plugin operations CURA-10618 --- include/plugins/pluginproxy.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index fdc530d568..e5dff24d60 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -57,7 +57,7 @@ class PluginProxy using req_converter_type = RequestTp; using rsp_converter_type = ResponseTp; - using stub_t = Stub; + using modify_stub_t = Stub; /** * @brief Constructs a PluginProxy object. @@ -72,7 +72,7 @@ class PluginProxy */ constexpr PluginProxy() = default; - explicit PluginProxy(std::shared_ptr channel) : stub_(channel) + explicit PluginProxy(std::shared_ptr channel) : modify_stub_(channel) { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -109,7 +109,7 @@ class PluginProxy if (this != &other) { valid_ = other.valid_; - stub_ = other.stub_; + modify_stub_ = other.modify_stub_; plugin_info_ = other.plugin_info_; slot_info_ = other.slot_info_; } @@ -120,7 +120,7 @@ class PluginProxy if (this != &other) { valid_ = std::move(other.valid_); - stub_ = std::move(other.stub_); + modify_stub_ = std::move(other.modify_stub_); plugin_info_ = std::move(other.plugin_info_); slot_info_ = std::move(other.slot_info_); } @@ -166,7 +166,7 @@ class PluginProxy req_converter_type req_{}; ///< The Modify request converter object. rsp_converter_type rsp_{}; ///< The Modify response converter object. - ranges::semiregular_box stub_; ///< The gRPC Modify stub for communication. + ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake @@ -218,7 +218,7 @@ class PluginProxy */ boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) { - using RPC = agrpc::RPC<&stub_t::PrepareAsyncCall>; + using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; prep_client_context(client_context); @@ -227,7 +227,7 @@ class PluginProxy // Make unary request rsp_msg_type response; - status = co_await RPC::request(grpc_context, stub_, client_context, request, response, boost::asio::use_awaitable); + status = co_await RPC::request(grpc_context, modify_stub_, client_context, request, response, boost::asio::use_awaitable); ret_value = rsp_(response); co_return; } From 73466b9cc0927d1624598ecdfefeae9ed15ec495 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 08:39:03 +0200 Subject: [PATCH 114/470] Add Broadcast stub Needed to handle the different broadcast RPC's Contributes to CURA-10618 --- include/plugins/pluginproxy.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index e5dff24d60..ab62a19709 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -24,6 +24,9 @@ #include "utils/format/thread_id.h" #include "utils/types/generic.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" +#include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.pb.h" #include "cura/plugins/v0/slot_id.pb.h" @@ -58,6 +61,7 @@ class PluginProxy using rsp_converter_type = ResponseTp; using modify_stub_t = Stub; + using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; /** * @brief Constructs a PluginProxy object. @@ -72,7 +76,7 @@ class PluginProxy */ constexpr PluginProxy() = default; - explicit PluginProxy(std::shared_ptr channel) : modify_stub_(channel) + explicit PluginProxy(std::shared_ptr channel) : modify_stub_(channel), broadcast_stub_(channel) { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -110,6 +114,7 @@ class PluginProxy { valid_ = other.valid_; modify_stub_ = other.modify_stub_; + broadcast_stub_ = other.broadcast_stub_; plugin_info_ = other.plugin_info_; slot_info_ = other.slot_info_; } @@ -121,6 +126,7 @@ class PluginProxy { valid_ = std::move(other.valid_); modify_stub_ = std::move(other.modify_stub_); + broadcast_stub_ = std::move(other.broadcast_stub_); plugin_info_ = std::move(other.plugin_info_); slot_info_ = std::move(other.slot_info_); } @@ -167,6 +173,7 @@ class PluginProxy rsp_converter_type rsp_{}; ///< The Modify response converter object. ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. + ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake From 340ed08fd5e8b4cd6f570226cfa82931e7902a31 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 08:53:37 +0200 Subject: [PATCH 115/470] Add converters for the BroadcastService - The Generic Empty converter - SettingsBroadcast from the Cura Slice message CURA-10618 --- include/plugins/converters.h | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index e814c36c27..29d961ee4c 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -7,12 +7,15 @@ #include #include +#include #include #include #include "plugins/metadata.h" #include "plugins/types.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.pb.h" #include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" @@ -20,9 +23,79 @@ #include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/simplify.pb.h" +#include "Cura.pb.h" + namespace cura::plugins { + +struct empty +{ + using value_type = google::protobuf::Empty; ///< The protobuf message type. + using native_value_type = std::nullptr_t; ///< The native value type. + + value_type operator()() const + { + return {}; + } + + constexpr native_value_type operator()(const value_type&) const + { + return nullptr; + } +}; + +struct broadcast_settings_request +{ + using value_type = slots::broadcast::v0::BroadcastServiceSettingsRequest; ///< The protobuf message type. + using native_value_type = cura::proto::Slice; ///< The native value type. + + /** + * @brief Converts native data for broadcasting to a `proto::BroadcastServiceSettingsRequest` message. + * + * @param key The key of the setting to be broadcasted. + * @param value The value of the setting to be broadcasted. + * @return The converted `proto::BroadcastServiceSettingsRequest` message. + */ + value_type operator()(const native_value_type& slice_message) const + { + value_type message{}; + auto* global_settings = message.mutable_global_settings()->mutable_settings(); + for (const auto& setting : slice_message.global_settings().settings()) + { + global_settings->emplace(setting.name(), setting.value()); + } + + auto* extruders_settings = message.mutable_extruder_settings(); + for (const auto& extruder : slice_message.extruders()) + { + auto* settings = extruders_settings->Add()->mutable_settings(); + for (const auto& setting : extruder.settings().settings()) + { + settings->emplace(setting.name(), setting.value()); + } + } + + auto* object_settings = message.mutable_object_settings(); + for (const auto& object : slice_message.object_lists()) + { + auto* settings = object_settings->Add()->mutable_settings(); + for (const auto& setting : object.settings()) + { + settings->emplace(setting.name(), setting.value()); + } + } + + auto* limit_to_extruder = message.mutable_limit_to_extruder(); + for (const auto& setting_extruder : slice_message.limit_to_extruder()) + { + limit_to_extruder->emplace(setting_extruder.name(), setting_extruder.extruder()); + } + return message; + } +}; + + struct handshake_request { using value_type = slots::handshake::v0::CallRequest; ///< The protobuf message type. From 2e8157fc1e85bbd2a2da6c2b55e8deb128b34d36 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 08:56:57 +0200 Subject: [PATCH 116/470] Add the plumbing for the Broadcast functionality This commit introduces the broadcasting capability within plugins. The `broadcast` method was added in slots.h, slotproxy.h and pluginproxy.h files. This enables broadcasting of a message across multiple channels, improving the communication aspects within the plugins. Along with this, some changes in the imports were made allowing a better organization of used modules. Contributes to CURA-10618 --- include/plugins/pluginproxy.h | 10 ++++++++-- include/plugins/slotproxy.h | 12 +++++++++++- include/plugins/slots.h | 7 +++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index ab62a19709..5988fe6ab2 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -4,6 +4,8 @@ #ifndef PLUGINS_PLUGINPROXY_H #define PLUGINS_PLUGINPROXY_H +#include +#include #include #include @@ -12,16 +14,15 @@ #include #include #include -#include #include #include #include -#include #include "Application.h" #include "plugins/exception.h" #include "plugins/metadata.h" #include "utils/format/thread_id.h" +#include "utils/types/char_range_literal.h" #include "utils/types/generic.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" @@ -167,6 +168,11 @@ class PluginProxy return ret_value; } + template + void broadcast(auto&&... args) + { + } + private: validator_type valid_{}; ///< The validator object for plugin validation. req_converter_type req_{}; ///< The Modify request converter object. diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index d3ac43136d..300b536ea1 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,14 +4,15 @@ #ifndef PLUGINS_SLOTPROXY_H #define PLUGINS_SLOTPROXY_H -#include #include #include #include #include +#include #include +#include "utils/types/char_range_literal.h" #include "plugins/converters.h" #include "plugins/pluginproxy.h" #include "plugins/types.h" @@ -78,6 +79,15 @@ class SlotProxy } return std::invoke(default_process, std::forward(args)...); } + + template + void broadcast(auto&&...args) + { + if (plugin_.has_value()) + { + plugin_.value().template broadcast(std::forward(args)...); + } + } }; } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 7ff29b8a04..d83e821251 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -100,6 +100,13 @@ class Registry, Unit> : public Registry get_type().proxy = Tp{ std::forward(std::move(plugin)) }; } + template + void broadcast(auto&&... args) + { + value_.proxy.template broadcast(std::forward(args)...); + Base::value_.proxy.template broadcast(std::forward(args)...); + } + protected: template constexpr Unit& get_type() From ca54d6ac1727a21fbf9cdc67faada799a2436051 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 10:51:03 +0200 Subject: [PATCH 117/470] Add Broadcasting logic A broadcast can now be made for a specific RPC. Overloading of the different Broadcast RPCs is done in the Broadcast header. Where a `broadcast_message_factory` and `broadcast_factory` need to be created for each RPC. Contribute to CURA-10618 --- include/plugins/broadcasts.h | 29 +++++++++++++++++++++++++++++ include/plugins/pluginproxy.h | 33 +++++++++++++++++++++++++++++++++ include/plugins/slotproxy.h | 2 +- include/plugins/slots.h | 1 + include/plugins/types.h | 1 - include/utils/types/generic.h | 24 ++++++++++++++++++++---- 6 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 include/plugins/broadcasts.h diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h new file mode 100644 index 0000000000..a4de7567c4 --- /dev/null +++ b/include/plugins/broadcasts.h @@ -0,0 +1,29 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PLUGINS_BROADCAST_H +#define PLUGINS_BROADCAST_H + +#include "plugins/converters.h" +#include "utils/types/char_range_literal.h" +#include "utils/types/generic.h" + +namespace cura::plugins::details +{ + +template +requires utils::is_broadcast_channel_v constexpr auto broadcast_message_factory(auto&&... args) +{ + return broadcast_settings_request{}(std::forward(args)...); +}; + + +template +requires utils::is_broadcast_channel_v constexpr auto broadcast_factory() +{ + return agrpc::RPC<&Stub::PrepareAsyncBroadcastSettings>{}; +} + +} // namespace cura::plugins::details + +#endif // PLUGINS_BROADCAST_H \ No newline at end of file diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 5988fe6ab2..248be725ed 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -19,6 +19,7 @@ #include #include "Application.h" +#include "plugins/broadcasts.h" #include "plugins/exception.h" #include "plugins/metadata.h" #include "utils/format/thread_id.h" @@ -171,6 +172,25 @@ class PluginProxy template void broadcast(auto&&... args) { + if (! plugin_info_->broadcast_subscriptions.contains(BroadcastChannel.value)) + { + return; + } + agrpc::GrpcContext grpc_context; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, [this, &grpc_context, &status, &args...]() { return this->broadcastCall(grpc_context, status, std::forward(args)...); }, boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_.has_value()) + { + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + } + throw exceptions::RemoteException(slot_info_, status.error_message()); + } } private: @@ -245,6 +265,19 @@ class PluginProxy co_return; } + template + boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) + { + grpc::ClientContext client_context{}; + prep_client_context(client_context); + + auto broadcaster { details::broadcast_factory() }; + auto request = details::broadcast_message_factory(std::forward(args)...); + auto response = google::protobuf::Empty{}; + status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); + co_return; + } + /** * @brief Prepares client_context for the remote call. * diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 300b536ea1..720922857b 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -12,11 +12,11 @@ #include #include -#include "utils/types/char_range_literal.h" #include "plugins/converters.h" #include "plugins/pluginproxy.h" #include "plugins/types.h" #include "plugins/validator.h" +#include "utils/types/char_range_literal.h" namespace cura::plugins { diff --git a/include/plugins/slots.h b/include/plugins/slots.h index d83e821251..13f259fa2a 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -13,6 +13,7 @@ #include "plugins/validator.h" #include "utils/IntPoint.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed +#include "utils/types/char_range_literal.h" #include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" diff --git a/include/plugins/types.h b/include/plugins/types.h index 1ddd93c371..c922de4c67 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -11,7 +11,6 @@ #include #include "utils/IntPoint.h" -#include "utils/types/generic.h" #include "utils/polygon.h" #include "cura/plugins/v0/slot_id.pb.h" diff --git a/include/utils/types/generic.h b/include/utils/types/generic.h index 402eeba9c2..59512a43c8 100644 --- a/include/utils/types/generic.h +++ b/include/utils/types/generic.h @@ -11,6 +11,8 @@ #include #include +#include "utils/types/char_range_literal.h" + namespace cura::utils { template @@ -27,6 +29,23 @@ concept grpc_convertable = requires(T value) requires ranges::semiregular; }; +template +class is_broadcast_channel +{ + inline static constexpr bool value_() noexcept + { + constexpr std::string_view t1{ T1.value }; + constexpr std::string_view t2{ T2.value }; + return t1 == t2; + } + +public: + inline static constexpr bool value = value_(); +}; + +template +inline constexpr bool is_broadcast_channel_v = is_broadcast_channel::value; + #ifdef OLDER_APPLE_CLANG // std::integral and std::floating_point are not implemented in older Apple Clang versions < 13 @@ -51,10 +70,7 @@ concept integral = std::is_same_v; template -concept floating_point = - std::is_same_v || - std::is_same_v || - std::is_same_v; +concept floating_point = std::is_same_v || std::is_same_v || std::is_same_v; #else template concept integral = std::integral; From 1f6446331746086cc260d5b2fec73b0523a55230 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 10:52:21 +0200 Subject: [PATCH 118/470] Create the `BroadcastSettings` slot CURA-10618 --- src/communication/ArcusCommunication.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 14fd6cbaf2..467ad53c99 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -532,6 +532,9 @@ void ArcusCommunication::sliceNext() private_data->readGlobalSettingsMessage(slice_message->global_settings()); private_data->readExtruderSettingsMessage(slice_message->extruders()); + + // Broadcast the settings to the plugins + slots::instance().broadcast<"BroadcastSettings">(*slice_message); const size_t extruder_count = slice.scene.extruders.size(); // For each setting, register what extruder it should be obtained from (if this is limited to an extruder). From 1d6319ce3dd620ba8e6eec935bd7fec52b0e1261 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 11:26:36 +0200 Subject: [PATCH 119/470] Log plugin subscriptions CURA-10618 --- include/plugins/pluginproxy.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 248be725ed..b3392eaf28 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -234,6 +235,10 @@ class PluginProxy if (valid_) { spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); + if (! plugin_info_->broadcast_subscriptions.empty()) + { + spdlog::info("Subscriping plugin '{}' to the following broadcasts {}", plugin_info_->plugin_name, plugin_info_->broadcast_subscriptions); + } } co_return; } From a410277d05c90aabbf7255f6ae0d15619cf7da46 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 10 Jul 2023 11:53:47 +0200 Subject: [PATCH 120/470] Fixed typo CURA-10618 --- include/plugins/pluginproxy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index b3392eaf28..324346b91a 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -237,7 +237,7 @@ class PluginProxy spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); if (! plugin_info_->broadcast_subscriptions.empty()) { - spdlog::info("Subscriping plugin '{}' to the following broadcasts {}", plugin_info_->plugin_name, plugin_info_->broadcast_subscriptions); + spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info_->plugin_name, plugin_info_->broadcast_subscriptions); } } co_return; From 4ca48a5dbf623ed10ff898ec1d8a6822583e19e7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 11 Jul 2023 08:05:30 +0200 Subject: [PATCH 121/470] Better error handling on miscommunications In the previous implementation, there were potential issues in handling errors especially when an external service miscommunicated with the plugin. This update includes the plugin_info in the handshakeCall function to address this flaw. Now, in case the service fails to respond properly, the system will provide meaningful error messages and help the user understand the source of the problem. Contribute to CURA-10625 --- include/plugins/pluginproxy.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 324346b91a..eb2765001e 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -85,20 +85,20 @@ class PluginProxy agrpc::GrpcContext grpc_context; grpc::Status status; slots::handshake::v0::HandshakeService::Stub handshake_stub(channel); + plugin_metadata plugin_info; boost::asio::co_spawn( - grpc_context, [this, &grpc_context, &status, &handshake_stub]() { return this->handshakeCall(grpc_context, status, handshake_stub); }, boost::asio::detached); + grpc_context, [this, &grpc_context, &status, &plugin_info, &handshake_stub]() { return this->handshakeCall(grpc_context, status, plugin_info, handshake_stub); }, boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes { - if (plugin_info_.has_value()) - { - throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); - } throw exceptions::RemoteException(slot_info_, status.error_message()); } - + if (! plugin_info.plugin_name.empty() && !plugin_info.slot_version.empty()) + { + plugin_info_ = plugin_info; + } if (! valid_) { if (plugin_info_.has_value()) @@ -216,7 +216,7 @@ class PluginProxy * @param args - Request arguments * @return A boost::asio::awaitable indicating completion of the operation */ - boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, slots::handshake::v0::HandshakeService::Stub& handshake_stub) + boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, plugin_metadata plugin_info, slots::handshake::v0::HandshakeService::Stub& handshake_stub) { using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; grpc::ClientContext client_context{}; @@ -230,14 +230,14 @@ class PluginProxy handshake_response::value_type response; status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); handshake_response handshake_rsp; - plugin_info_ = handshake_rsp(response, client_context.peer()); + plugin_info = handshake_rsp(response, client_context.peer()); valid_ = validator_type{ slot_info_, plugin_info_.value() }; if (valid_) { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); - if (! plugin_info_->broadcast_subscriptions.empty()) + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); + if (! plugin_info.broadcast_subscriptions.empty()) { - spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info_->plugin_name, plugin_info_->broadcast_subscriptions); + spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); } } co_return; From d4e0df11caf657894dc738a14080ac07214da05e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 12 Jul 2023 18:45:56 +0200 Subject: [PATCH 122/470] Sync SlotID Enum in the future we should really dump Arcus CURA-10618 and CURA-10475 --- Cura.proto | 7 +++++-- src/communication/ArcusCommunication.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Cura.proto b/Cura.proto index 5c82d7c112..b97e7f0f24 100644 --- a/Cura.proto +++ b/Cura.proto @@ -9,8 +9,11 @@ message ObjectList } enum SlotID { - SIMPLIFY = 0; - POSTPROCESS = 1; + BROADCAST_SETTINGS = 0; + SIMPLIFY_MODIFY = 100; + POSTPROCESS_MODIFY = 101; + INFILL_MODIFY = 102; + INFILL_GENERATE = 200; } message EnginePlugin diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 467ad53c99..4cc8dcdff6 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -515,13 +515,15 @@ void ArcusCommunication::sliceNext() { switch (plugin.id()) { - case cura::proto::SlotID::SIMPLIFY: + case cura::proto::SlotID::SIMPLIFY_MODIFY: slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); break; - case cura::proto::SlotID::POSTPROCESS: + case cura::proto::SlotID::POSTPROCESS_MODIFY: slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); break; - default: break; + default: + spdlog::error("Not yet implemented: {}", plugin.id()); + break; } } } From 6cda2e50e39d7978b413793f32ba4691a9a2348f Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 14 Jul 2023 19:38:22 +0200 Subject: [PATCH 123/470] Plugin-system: Complete renames/moves (details->utils,x_MODIFY) 'Got it working on Windows' -- except that it wouldn't have worked on other systems probably if a complete recompile was done ;-) part of epic CURA-10560 (originally done for CURA-10715, but in one of the CURA-10618 branches -- look it all made sense at the time, ok?) --- include/plugins/pluginproxy.h | 10 +++++----- include/plugins/slotproxy.h | 4 ++-- include/plugins/slots.h | 6 +++--- include/plugins/types.h | 24 ++---------------------- include/utils/types/char_range_literal.h | 2 +- include/utils/types/generic.h | 2 +- 6 files changed, 14 insertions(+), 34 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 324346b91a..244b1667b3 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -49,7 +49,7 @@ namespace cura::plugins * * Class provides methods for validating the plugin, making requests and processing responses. */ -template +template class PluginProxy { public: @@ -170,7 +170,7 @@ class PluginProxy return ret_value; } - template + template void broadcast(auto&&... args) { if (! plugin_info_->broadcast_subscriptions.contains(BroadcastChannel.value)) @@ -270,14 +270,14 @@ class PluginProxy co_return; } - template + template boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) { grpc::ClientContext client_context{}; prep_client_context(client_context); - auto broadcaster { details::broadcast_factory() }; - auto request = details::broadcast_message_factory(std::forward(args)...); + auto broadcaster { details::broadcast_factory() }; + auto request = details::broadcast_message_factory(std::forward(args)...); auto response = google::protobuf::Empty{}; status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); co_return; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 720922857b..37307a9ce1 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -36,7 +36,7 @@ namespace cura::plugins * @tparam Response The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template +template class SlotProxy { Default default_process{}; @@ -80,7 +80,7 @@ class SlotProxy return std::invoke(default_process, std::forward(args)...); } - template + template void broadcast(auto&&...args) { if (plugin_.has_value()) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 13f259fa2a..50743df859 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -50,7 +50,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy; +using slot_simplify_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -60,7 +60,7 @@ using slot_simplify_ = SlotProxy -using slot_postprocess_ = SlotProxy; +using slot_postprocess_ = SlotProxy; template struct Typelist @@ -101,7 +101,7 @@ class Registry, Unit> : public Registry get_type().proxy = Tp{ std::forward(std::move(plugin)) }; } - template + template void broadcast(auto&&... args) { value_.proxy.template broadcast(std::forward(args)...); diff --git a/include/plugins/types.h b/include/plugins/types.h index c922de4c67..b24dc4f0b1 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -15,26 +15,6 @@ #include "cura/plugins/v0/slot_id.pb.h" -namespace cura::plugins -{ -namespace details -{ -template -struct CharRangeLiteral -{ - constexpr CharRangeLiteral(const char (&str)[N]) - { - std::copy_n(str, N, value); - } - - char value[N]; -}; - -} // namespace details - -} // namespace cura::plugins - - namespace fmt { // Custom formatter for humanreadable slot_id's @@ -48,10 +28,10 @@ struct formatter switch (slot_id) { - case cura::plugins::v0::SlotID::SIMPLIFY: + case cura::plugins::v0::SlotID::SIMPLIFY_MODIFY: slot_name = "SimplifyService"; break; - case cura::plugins::v0::SlotID::POSTPROCESS: + case cura::plugins::v0::SlotID::POSTPROCESS_MODIFY: slot_name = "PostprocessService"; break; default: diff --git a/include/utils/types/char_range_literal.h b/include/utils/types/char_range_literal.h index 3d6e34c2e4..44a1d0b599 100644 --- a/include/utils/types/char_range_literal.h +++ b/include/utils/types/char_range_literal.h @@ -12,7 +12,7 @@ namespace cura::utils template struct CharRangeLiteral { - constexpr CharRangeLiteral(const char (&str)[N]) + constexpr CharRangeLiteral(const char (&str)[N]) noexcept { std::copy_n(str, N, value); } diff --git a/include/utils/types/generic.h b/include/utils/types/generic.h index 59512a43c8..3eda238ff6 100644 --- a/include/utils/types/generic.h +++ b/include/utils/types/generic.h @@ -36,7 +36,7 @@ class is_broadcast_channel { constexpr std::string_view t1{ T1.value }; constexpr std::string_view t2{ T2.value }; - return t1 == t2; + return t1.compare(t2) == 0; } public: From c27f880114ade6d04a67c77135d74532819d3366 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 17 Jul 2023 13:00:04 +0200 Subject: [PATCH 124/470] Force wait on handshake result If this isn't performed in the context of the initializer. The plugin will not be validated and the Broadcast won't be subscribed to before it actual usage. Contributes to CURA-10625 and CURA-10618 --- include/plugins/pluginproxy.h | 78 +++++++++++++---------------------- 1 file changed, 29 insertions(+), 49 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 93dca71242..fab675a106 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -88,25 +88,43 @@ class PluginProxy plugin_metadata plugin_info; boost::asio::co_spawn( - grpc_context, [this, &grpc_context, &status, &plugin_info, &handshake_stub]() { return this->handshakeCall(grpc_context, status, plugin_info, handshake_stub); }, boost::asio::detached); + grpc_context, + [this, &grpc_context, &status, &plugin_info, &handshake_stub]() -> boost::asio::awaitable + { + using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context); + + // Construct request + handshake_request handshake_req; + handshake_request::value_type request{ handshake_req(slot_info_) }; + + // Make unary request + handshake_response::value_type response; + status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); + handshake_response handshake_rsp; + plugin_info = handshake_rsp(response, client_context.peer()); + valid_ = validator_type{ slot_info_, plugin_info_.value() }; + if (valid_) + { + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); + if (! plugin_info.broadcast_subscriptions.empty()) + { + spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); + } + } + }, + boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes { throw exceptions::RemoteException(slot_info_, status.error_message()); } - if (! plugin_info.plugin_name.empty() && !plugin_info.slot_version.empty()) + if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) { plugin_info_ = plugin_info; } - if (! valid_) - { - if (plugin_info_.has_value()) - { - throw exceptions::ValidatorException(valid_, slot_info_, plugin_info_.value()); - } - throw exceptions::ValidatorException(valid_, slot_info_); - } }; constexpr PluginProxy(const PluginProxy&) = default; @@ -205,44 +223,6 @@ class PluginProxy slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake - /** - * @brief Executes the modifyCall operation with the plugin. - * - * Sends a request to the plugin and saves the response. - * - * @param grpc_context - The gRPC context to use for the call - * @param status - Status of the gRPC call which gets updated in this method - * @param ret_value - Reference to the value in which response to be stored - * @param args - Request arguments - * @return A boost::asio::awaitable indicating completion of the operation - */ - boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, plugin_metadata plugin_info, slots::handshake::v0::HandshakeService::Stub& handshake_stub) - { - using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context); - - // Construct request - handshake_request handshake_req; - handshake_request::value_type request{ handshake_req(slot_info_) }; - - // Make unary request - handshake_response::value_type response; - status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); - handshake_response handshake_rsp; - plugin_info = handshake_rsp(response, client_context.peer()); - valid_ = validator_type{ slot_info_, plugin_info_.value() }; - if (valid_) - { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); - if (! plugin_info.broadcast_subscriptions.empty()) - { - spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); - } - } - co_return; - } - /** * @brief Executes the modifyCall operation with the plugin. * @@ -276,7 +256,7 @@ class PluginProxy grpc::ClientContext client_context{}; prep_client_context(client_context); - auto broadcaster { details::broadcast_factory() }; + auto broadcaster{ details::broadcast_factory() }; auto request = details::broadcast_message_factory(std::forward(args)...); auto response = google::protobuf::Empty{}; status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); From 6fd8b30fdcad5235617acb5c2acd17e3c21ce712 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 17 Jul 2023 13:00:28 +0200 Subject: [PATCH 125/470] Add the GCode postprocess modify slot CURA-10625 --- src/communication/ArcusCommunication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 4cc8dcdff6..c99142c703 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -339,7 +339,7 @@ void ArcusCommunication::beginGCode() void ArcusCommunication::flushGCode() { - const std::string& message_str = private_data->gcode_output_stream.str(); + const std::string& message_str = slots::instance().invoke(private_data->gcode_output_stream.str()); if (message_str.size() == 0) { return; From 0ac5bcab123a2f0a04a66c20299f67d8a6cc3f1a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 17 Jul 2023 13:00:04 +0200 Subject: [PATCH 126/470] Force wait on handshake result If this isn't performed in the context of the initializer. The plugin will not be validated and the Broadcast won't be subscribed to before it actual usage. Contributes to CURA-10625 and CURA-10618 --- include/plugins/pluginproxy.h | 78 ++++++++++++++--------------------- 1 file changed, 31 insertions(+), 47 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 244b1667b3..308d759e77 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -85,9 +85,36 @@ class PluginProxy agrpc::GrpcContext grpc_context; grpc::Status status; slots::handshake::v0::HandshakeService::Stub handshake_stub(channel); + plugin_metadata plugin_info; boost::asio::co_spawn( - grpc_context, [this, &grpc_context, &status, &handshake_stub]() { return this->handshakeCall(grpc_context, status, handshake_stub); }, boost::asio::detached); + grpc_context, + [this, &grpc_context, &status, &plugin_info, &handshake_stub]() -> boost::asio::awaitable + { + using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context); + + // Construct request + handshake_request handshake_req; + handshake_request::value_type request{ handshake_req(slot_info_) }; + + // Make unary request + handshake_response::value_type response; + status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); + handshake_response handshake_rsp; + plugin_info = handshake_rsp(response, client_context.peer()); + valid_ = validator_type{ slot_info_, plugin_info_.value() }; + if (valid_) + { + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); + if (! plugin_info.broadcast_subscriptions.empty()) + { + spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); + } + } + }, + boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes @@ -98,14 +125,9 @@ class PluginProxy } throw exceptions::RemoteException(slot_info_, status.error_message()); } - - if (! valid_) + if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) { - if (plugin_info_.has_value()) - { - throw exceptions::ValidatorException(valid_, slot_info_, plugin_info_.value()); - } - throw exceptions::ValidatorException(valid_, slot_info_); + plugin_info_ = plugin_info; } }; @@ -205,44 +227,6 @@ class PluginProxy slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake - /** - * @brief Executes the modifyCall operation with the plugin. - * - * Sends a request to the plugin and saves the response. - * - * @param grpc_context - The gRPC context to use for the call - * @param status - Status of the gRPC call which gets updated in this method - * @param ret_value - Reference to the value in which response to be stored - * @param args - Request arguments - * @return A boost::asio::awaitable indicating completion of the operation - */ - boost::asio::awaitable handshakeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, slots::handshake::v0::HandshakeService::Stub& handshake_stub) - { - using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context); - - // Construct request - handshake_request handshake_req; - handshake_request::value_type request{ handshake_req(slot_info_) }; - - // Make unary request - handshake_response::value_type response; - status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); - handshake_response handshake_rsp; - plugin_info_ = handshake_rsp(response, client_context.peer()); - valid_ = validator_type{ slot_info_, plugin_info_.value() }; - if (valid_) - { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info_->plugin_name, plugin_info_->plugin_version, plugin_info_->peer, slot_info_.slot_id); - if (! plugin_info_->broadcast_subscriptions.empty()) - { - spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info_->plugin_name, plugin_info_->broadcast_subscriptions); - } - } - co_return; - } - /** * @brief Executes the modifyCall operation with the plugin. * @@ -276,7 +260,7 @@ class PluginProxy grpc::ClientContext client_context{}; prep_client_context(client_context); - auto broadcaster { details::broadcast_factory() }; + auto broadcaster{ details::broadcast_factory() }; auto request = details::broadcast_message_factory(std::forward(args)...); auto response = google::protobuf::Empty{}; status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); From 2d2eb3e134b7922db20f833805a51ddc81686a06 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 17 Jul 2023 14:41:59 +0200 Subject: [PATCH 127/470] Make metadata plugin owning strings CURA-10625 --- include/plugins/converters.h | 4 ++-- include/plugins/metadata.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 29d961ee4c..932bf17085 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -134,8 +134,8 @@ struct handshake_response return { .slot_version = message.slot_version(), .plugin_name = message.plugin_name(), .plugin_version = message.plugin_version(), - .peer = peer, - .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; + .peer = std::string{ peer }, + .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; } }; diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 511ca734fd..6035f8617d 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -18,11 +18,11 @@ namespace cura::plugins struct plugin_metadata { - std::string_view slot_version; - std::string_view plugin_name; - std::string_view plugin_version; - std::string_view peer; - std::set broadcast_subscriptions; + std::string slot_version; + std::string plugin_name; + std::string plugin_version; + std::string peer; + std::set broadcast_subscriptions; }; struct slot_metadata From 94418fc9582aee26c8a17064126dbe1c7182b2cd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 17 Jul 2023 14:41:59 +0200 Subject: [PATCH 128/470] Make metadata plugin owning strings CURA-10625 --- include/plugins/converters.h | 4 ++-- include/plugins/metadata.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 29d961ee4c..932bf17085 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -134,8 +134,8 @@ struct handshake_response return { .slot_version = message.slot_version(), .plugin_name = message.plugin_name(), .plugin_version = message.plugin_version(), - .peer = peer, - .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; + .peer = std::string{ peer }, + .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; } }; diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 511ca734fd..6035f8617d 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -18,11 +18,11 @@ namespace cura::plugins struct plugin_metadata { - std::string_view slot_version; - std::string_view plugin_name; - std::string_view plugin_version; - std::string_view peer; - std::set broadcast_subscriptions; + std::string slot_version; + std::string plugin_name; + std::string plugin_version; + std::string peer; + std::set broadcast_subscriptions; }; struct slot_metadata From 2ed2165306e65a835de7fbfdcdcbaea0203a94fc Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 17 Jul 2023 17:10:59 +0200 Subject: [PATCH 129/470] Use testing grpc definitions CURA-10475 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 230913ef9e..69cda0348e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10618") + self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") def generate(self): deps = CMakeDeps(self) From 8f9bbedbe72066e3f691ed59e62b390fe2cba3ff Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 18 Jul 2023 12:56:20 +0200 Subject: [PATCH 130/470] package resources headers --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 69cda0348e..34e075acd6 100644 --- a/conanfile.py +++ b/conanfile.py @@ -149,7 +149,7 @@ def generate(self): def layout(self): cmake_layout(self) - + self.cpp.source.includedirs = ["include", "resources"] self.cpp.build.includedirs = ["."] # To package the generated headers self.cpp.package.libs = ["_CuraEngine"] From 1ce6199f38c1934e368f0f7f018749b377d7a55e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 18 Jul 2023 13:33:27 +0200 Subject: [PATCH 131/470] Include resource headers in Conan package This should in the future be a key shipped with the front-end Contributes to CURA-10806 --- conanfile.py | 1 - .../utils/resources}/certificate.pem.h | 6 +++-- resources/public_key.pem.h | 26 ------------------- src/utils/channel.cpp | 2 +- 4 files changed, 5 insertions(+), 30 deletions(-) rename {resources => include/utils/resources}/certificate.pem.h (93%) delete mode 100644 resources/public_key.pem.h diff --git a/conanfile.py b/conanfile.py index 34e075acd6..db6341e9d0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -149,7 +149,6 @@ def generate(self): def layout(self): cmake_layout(self) - self.cpp.source.includedirs = ["include", "resources"] self.cpp.build.includedirs = ["."] # To package the generated headers self.cpp.package.libs = ["_CuraEngine"] diff --git a/resources/certificate.pem.h b/include/utils/resources/certificate.pem.h similarity index 93% rename from resources/certificate.pem.h rename to include/utils/resources/certificate.pem.h index 2ccb343cd8..93a1bf49c1 100644 --- a/resources/certificate.pem.h +++ b/include/utils/resources/certificate.pem.h @@ -1,9 +1,11 @@ #ifndef CERTIFICATE_H #define CERTIFICATE_H +// FIXME: Move out of the source code even though this is the public key + #include -namespace resources +namespace cura::utils::resources { constexpr std::string_view certificate = R"#(-----BEGIN CERTIFICATE----- @@ -42,7 +44,7 @@ c3dQRszg9OTAyUwNKQEAuZ9II/cCpLyE+GbnqRdkErHgO7kiKQ== -----END CERTIFICATE----- )#"; -} // namespace resources +} // namespace cura::utils::resources #endif //CERTIFICATE_H diff --git a/resources/public_key.pem.h b/resources/public_key.pem.h deleted file mode 100644 index 24f1676478..0000000000 --- a/resources/public_key.pem.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef PUBLIC_KEY_H -#define PUBLIC_KEY_H - -#include - -namespace resources -{ - constexpr std::string_view public_key = -R"#(-----BEGIN RSA PUBLIC KEY----- -MIICCgKCAgEAs1wvIbPBKmQbOyIz2lPzbUB1cmoIzsIHCzL0T1Ol/8P6IF3BCy6Q -gFweuQd/2D6r0FgMgq7T96p4TtyhCDQcAn8LGjBYACjkwJgkeoManvcgdRXG8Z61 -VWvLqvXdASmP8zO/PiefJkyXB1eNYvLP8C0NF9PSL5NvKorcFgFOzRhbf98biDgN -36/w6xA6N8MNO/mJBJo1C6JJ8JtADxsvVpeqKMVwTaKZGcsVDcjGtwtWSRcQDjEC -mznfhpUpUFcUBLtQgjQyZO+GYdJnpWXbV8CGYbAkY+tBKVJDwmFW4izirtN+nVId -6gf6WaJ31f3aJaWsz+ANkuIoyTxUeW31jWRpg9RQqrWY2gcYnwjHgny6YJUJoh7N -hjlCqYIsqeI/hW4Iahhpe6JZ/8Q5r5gYwZhooH3IkuxCm6i6VZVOsrKuK/lhbrwJ -PS6OiQIOZ/fetBzhrHGe7Si35SnqeZXtdwYCktBbEl9vH2GEU5h+KlbOC1fUWVdv -HrbmAbxZbDQ2MIqlM3f1CrvLxskgmgIxeUqtm5nnIMgmyBOxVhfdEs7D4K46JqCM -3R/1u0vhfu47Rvfi8WNyR3UYOsOA21aMQmIUFCozzZ7cHPARwbUaSHoupoXMmmqj -xCW0DCv7S5ZM3mMJ7n4I6JIp/evtgGEJ1+w97ZT3n6DoYarb4ncg+VsCAwEAAQ== ------END RSA PUBLIC KEY----- -)#"; - -} // namespace resources - -#endif //PUBLIC_KEY_H diff --git a/src/utils/channel.cpp b/src/utils/channel.cpp index 1cbcf017b1..cc04e25834 100644 --- a/src/utils/channel.cpp +++ b/src/utils/channel.cpp @@ -6,7 +6,7 @@ #include #include -#include "../resources/certificate.pem.h" +#include "utils/resources/certificate.pem.h" namespace cura::utils { From f0c132d0296e2c50889d9fe032f35b9d73155088 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 19 Jul 2023 11:26:50 +0200 Subject: [PATCH 132/470] Postprocess the header The header is generated last during slicing. Keep in mind that Cura also adds the footer with the comments `;SETTINGS_` this isn't something that the engine handles CURA-10625 --- src/communication/ArcusCommunication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index c99142c703..a074dce00d 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -372,7 +372,7 @@ void ArcusCommunication::sendCurrentPosition(const Point& position) void ArcusCommunication::sendGCodePrefix(const std::string& prefix) const { std::shared_ptr message = std::make_shared(); - message->set_data(prefix); + message->set_data(slots::instance().invoke(prefix)); private_data->socket->sendMessage(message); } From 7d305adfcce4e685ca70d7704c11f7f8cb00a059 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Thu, 20 Jul 2023 07:58:34 +0000 Subject: [PATCH 133/470] Applied clang-format. --- include/Application.h | 14 +- include/plugins/broadcasts.h | 6 +- include/plugins/converters.h | 20 +- include/plugins/exception.h | 31 +- include/plugins/metadata.h | 7 +- include/plugins/pluginproxy.h | 61 +- include/plugins/slotproxy.h | 20 +- include/plugins/slots.h | 14 +- include/plugins/types.h | 13 +- include/plugins/validator.h | 7 +- include/utils/channel.h | 16 +- include/utils/format/thread_id.h | 4 +- include/utils/gettime.h | 47 +- include/utils/resources/certificate.pem.h | 7 +- include/utils/types/generic.h | 10 +- src/Application.cpp | 43 +- src/FffGcodeWriter.cpp | 1246 +++++++++++++-------- src/InsetOrderOptimizer.cpp | 129 ++- src/SkeletalTrapezoidation.cpp | 409 +++++-- src/communication/ArcusCommunication.cpp | 34 +- src/slicer.cpp | 340 +++--- src/utils/channel.cpp | 57 +- 22 files changed, 1569 insertions(+), 966 deletions(-) diff --git a/include/Application.h b/include/Application.h index 9bcf4fdb28..4a3f793daf 100644 --- a/include/Application.h +++ b/include/Application.h @@ -4,12 +4,12 @@ #ifndef APPLICATION_H #define APPLICATION_H -#include +#include "utils/NoCopy.h" + #include +#include #include -#include "utils/NoCopy.h" - namespace cura { @@ -90,7 +90,7 @@ class Application : NoCopy * * \param nworkers The number of workers (including the main thread) that are ran. */ - void startThreadPool(int nworkers=0); + void startThreadPool(int nworkers = 0); std::string instance_uuid; @@ -102,7 +102,7 @@ class Application : NoCopy * \param argv The arguments provided to the application. */ void connect(); -#endif //ARCUS +#endif // ARCUS /*! * \brief Print the header and license to the stderr channel. @@ -145,6 +145,6 @@ class Application : NoCopy void registerPlugins(const PluginSetupConfiguration& plugins_config); }; -} //Cura namespace. +} // namespace cura -#endif //APPLICATION_H \ No newline at end of file +#endif // APPLICATION_H \ No newline at end of file diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h index a4de7567c4..256edc7d37 100644 --- a/include/plugins/broadcasts.h +++ b/include/plugins/broadcasts.h @@ -12,14 +12,16 @@ namespace cura::plugins::details { template -requires utils::is_broadcast_channel_v constexpr auto broadcast_message_factory(auto&&... args) +requires utils::is_broadcast_channel_v +constexpr auto broadcast_message_factory(auto&&... args) { return broadcast_settings_request{}(std::forward(args)...); }; template -requires utils::is_broadcast_channel_v constexpr auto broadcast_factory() +requires utils::is_broadcast_channel_v +constexpr auto broadcast_factory() { return agrpc::RPC<&Stub::PrepareAsyncBroadcastSettings>{}; } diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 932bf17085..5260d33731 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -4,16 +4,7 @@ #ifndef PLUGINS_CONVERTERS_H #define PLUGINS_CONVERTERS_H -#include -#include - -#include -#include -#include - -#include "plugins/metadata.h" -#include "plugins/types.h" - +#include "Cura.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" @@ -22,8 +13,15 @@ #include "cura/plugins/slots/postprocess/v0/postprocess.pb.h" #include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/simplify.pb.h" +#include "plugins/metadata.h" +#include "plugins/types.h" -#include "Cura.pb.h" +#include +#include + +#include +#include +#include namespace cura::plugins { diff --git a/include/plugins/exception.h b/include/plugins/exception.h index a5328a3357..93f05638eb 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -4,16 +4,16 @@ #ifndef UTILS_CONCEPTS_GRAPH_H #define UTILS_CONCEPTS_GRAPH_H -#include +#include "plugins/metadata.h" +#include "plugins/types.h" #include + +#include #include #include #include -#include "plugins/metadata.h" -#include "plugins/types.h" - namespace cura::plugins::exceptions { @@ -22,10 +22,18 @@ class ValidatorException : public std::exception std::string msg_; public: - ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept : msg_(fmt::format("Failed to validation plugin on Slot '{}'", slot_info.slot_id)){}; + ValidatorException(const auto& validator, const slot_metadata& slot_info) noexcept + : msg_(fmt::format("Failed to validation plugin on Slot '{}'", slot_info.slot_id)){}; ValidatorException(const auto& validator, const slot_metadata& slot_info, const plugin_metadata& plugin_info) noexcept - : msg_(fmt::format("Failed to validate plugin '{}-{}' running at [{}] for slot '{}', slot range '{}' incompatible with plugin slot version '{}'", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info.slot_id, slot_info.version_range, plugin_info.slot_version)) + : msg_(fmt::format( + "Failed to validate plugin '{}-{}' running at [{}] for slot '{}', slot range '{}' incompatible with plugin slot version '{}'", + plugin_info.plugin_name, + plugin_info.plugin_version, + plugin_info.peer, + slot_info.slot_id, + slot_info.version_range, + plugin_info.slot_version)) { } @@ -40,10 +48,17 @@ class RemoteException : public std::exception std::string msg_; public: - RemoteException(const slot_metadata& slot_info, std::string_view error_msg) noexcept : msg_(fmt::format("Remote exception on Slot '{}': {}", slot_info.slot_id, error_msg)){}; + RemoteException(const slot_metadata& slot_info, std::string_view error_msg) noexcept + : msg_(fmt::format("Remote exception on Slot '{}': {}", slot_info.slot_id, error_msg)){}; RemoteException(const slot_metadata& slot_info, const plugin_metadata& plugin_info, std::string_view error_msg) noexcept - : msg_(fmt::format("Remote exception for plugin '{}-{}' running at [{}] for slot '{}': {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info.slot_id, error_msg)) + : msg_(fmt::format( + "Remote exception for plugin '{}-{}' running at [{}] for slot '{}': {}", + plugin_info.plugin_name, + plugin_info.plugin_version, + plugin_info.peer, + slot_info.slot_id, + error_msg)) { } diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 6035f8617d..7f8b11062a 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -4,15 +4,14 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_METADATA_H #define CURAENGINE_INCLUDE_PLUGINS_METADATA_H +#include "plugins/types.h" + #include +#include #include #include - -#include #include -#include "plugins/types.h" - namespace cura::plugins { diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index fab675a106..b70e5482a9 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -4,22 +4,12 @@ #ifndef PLUGINS_PLUGINPROXY_H #define PLUGINS_PLUGINPROXY_H -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "Application.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" +#include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" +#include "cura/plugins/slots/handshake/v0/handshake.pb.h" +#include "cura/plugins/v0/slot_id.pb.h" #include "plugins/broadcasts.h" #include "plugins/exception.h" #include "plugins/metadata.h" @@ -27,11 +17,20 @@ #include "utils/types/char_range_literal.h" #include "utils/types/generic.h" -#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" -#include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" -#include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" -#include "cura/plugins/slots/handshake/v0/handshake.pb.h" -#include "cura/plugins/v0/slot_id.pb.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace cura::plugins { @@ -79,7 +78,9 @@ class PluginProxy */ constexpr PluginProxy() = default; - explicit PluginProxy(std::shared_ptr channel) : modify_stub_(channel), broadcast_stub_(channel) + explicit PluginProxy(std::shared_ptr channel) + : modify_stub_(channel) + , broadcast_stub_(channel) { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -174,7 +175,12 @@ class PluginProxy grpc::Status status; boost::asio::co_spawn( - grpc_context, [this, &grpc_context, &status, &ret_value, &args...]() { return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); }, boost::asio::detached); + grpc_context, + [this, &grpc_context, &status, &ret_value, &args...]() + { + return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); + }, + boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes @@ -199,7 +205,12 @@ class PluginProxy grpc::Status status; boost::asio::co_spawn( - grpc_context, [this, &grpc_context, &status, &args...]() { return this->broadcastCall(grpc_context, status, std::forward(args)...); }, boost::asio::detached); + grpc_context, + [this, &grpc_context, &status, &args...]() + { + return this->broadcastCall(grpc_context, status, std::forward(args)...); + }, + boost::asio::detached); grpc_context.run(); if (! status.ok()) // TODO: handle different kind of status codes @@ -220,7 +231,9 @@ class PluginProxy ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. - slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. + slot_metadata slot_info_{ .slot_id = SlotID, + .version_range = SlotVersionRng.value, + .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake /** diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 37307a9ce1..c674ef48f6 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -4,20 +4,19 @@ #ifndef PLUGINS_SLOTPROXY_H #define PLUGINS_SLOTPROXY_H -#include -#include -#include -#include - -#include -#include - #include "plugins/converters.h" #include "plugins/pluginproxy.h" #include "plugins/types.h" #include "plugins/validator.h" #include "utils/types/char_range_literal.h" +#include +#include +#include +#include +#include +#include + namespace cura::plugins { @@ -58,7 +57,8 @@ class SlotProxy * * @param channel A shared pointer to the gRPC channel for communication with the plugin. */ - SlotProxy(std::shared_ptr channel) : plugin_{ std::move(channel) } {}; + SlotProxy(std::shared_ptr channel) + : plugin_{ std::move(channel) } {}; /** * @brief Executes the plugin operation. @@ -81,7 +81,7 @@ class SlotProxy } template - void broadcast(auto&&...args) + void broadcast(auto&&... args) { if (plugin_.has_value()) { diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 50743df859..0117ccc7c0 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -4,9 +4,9 @@ #ifndef PLUGINS_SLOTS_H #define PLUGINS_SLOTS_H -#include -#include - +#include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" +#include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" +#include "cura/plugins/v0/slot_id.pb.h" #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" @@ -15,9 +15,8 @@ #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed #include "utils/types/char_range_literal.h" -#include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" -#include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" -#include "cura/plugins/v0/slot_id.pb.h" +#include +#include namespace cura { @@ -60,7 +59,8 @@ using slot_simplify_ = SlotProxy -using slot_postprocess_ = SlotProxy; +using slot_postprocess_ + = SlotProxy; template struct Typelist diff --git a/include/plugins/types.h b/include/plugins/types.h index b24dc4f0b1..e46c2562b8 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -4,16 +4,15 @@ #ifndef PLUGINS_TYPES_H #define PLUGINS_TYPES_H -#include -#include - -#include -#include - +#include "cura/plugins/v0/slot_id.pb.h" #include "utils/IntPoint.h" #include "utils/polygon.h" -#include "cura/plugins/v0/slot_id.pb.h" +#include + +#include +#include +#include namespace fmt { diff --git a/include/plugins/validator.h b/include/plugins/validator.h index fb61db1cf8..0d18c074a3 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -4,12 +4,13 @@ #ifndef PLUGINS_VALIDATOR_H #define PLUGINS_VALIDATOR_H +#include "plugins/metadata.h" +#include "plugins/types.h" + #include -#include #include -#include "plugins/metadata.h" -#include "plugins/types.h" +#include namespace cura::plugins { diff --git a/include/utils/channel.h b/include/utils/channel.h index 30dbb5dff2..4ff915ffe7 100644 --- a/include/utils/channel.h +++ b/include/utils/channel.h @@ -14,15 +14,15 @@ namespace cura::utils { - struct ChannelSetupConfiguration - { - public: - std::string host; - uint64_t port; - uint64_t shibolet = 0UL; //TODO: Either get from startup (server would receive this as well) or remove completely. - }; +struct ChannelSetupConfiguration +{ +public: + std::string host; + uint64_t port; + uint64_t shibolet = 0UL; // TODO: Either get from startup (server would receive this as well) or remove completely. +}; - std::shared_ptr createChannel(const ChannelSetupConfiguration& config = { "localhost", 50010UL }); +std::shared_ptr createChannel(const ChannelSetupConfiguration& config = { "localhost", 50010UL }); } // namespace cura::utils diff --git a/include/utils/format/thread_id.h b/include/utils/format/thread_id.h index 48bf1158b1..0806144200 100644 --- a/include/utils/format/thread_id.h +++ b/include/utils/format/thread_id.h @@ -4,12 +4,12 @@ #ifndef UTILS_FORMAT_THREAD_ID_H #define UTILS_FORMAT_THREAD_ID_H +#include + #include #include #include -#include - namespace fmt { template<> diff --git a/include/utils/gettime.h b/include/utils/gettime.h index 52bc73556a..319f5d750c 100644 --- a/include/utils/gettime.h +++ b/include/utils/gettime.h @@ -1,20 +1,20 @@ -//Copyright (c) 2020 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2020 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef GETTIME_H #define GETTIME_H #ifdef _WIN32 - #define WIN32_LEAN_AND_MEAN 1 - #include +#define WIN32_LEAN_AND_MEAN 1 +#include #else - #ifdef USE_CPU_TIME - #include +#ifdef USE_CPU_TIME +#include #endif -#include -#include #include +#include +#include #endif namespace cura @@ -24,23 +24,23 @@ static inline double getTime() #ifdef _WIN32 return double(GetTickCount()) / 1000.0; #else // not __WIN32 - #if USE_CPU_TIME // Use cpu usage time if available, otherwise wall clock time +#if USE_CPU_TIME // Use cpu usage time if available, otherwise wall clock time struct rusage usage; - #ifdef DEBUG - int ret = getrusage(RUSAGE_SELF, &usage); - assert(ret == 0); - ((void)ret); - #else - getrusage(RUSAGE_SELF, &usage); - #endif - double user_time = double(usage.ru_utime.tv_sec) + double(usage.ru_utime.tv_usec) / 1000000.0; - double sys_time = double(usage.ru_stime.tv_sec) + double(usage.ru_stime.tv_usec) / 1000000.0; +#ifdef DEBUG + int ret = getrusage(RUSAGE_SELF, &usage); + assert(ret == 0); + ((void)ret); +#else + getrusage(RUSAGE_SELF, &usage); +#endif + double user_time = double(usage.ru_utime.tv_sec) + double(usage.ru_utime.tv_usec) / 1000000.0; + double sys_time = double(usage.ru_stime.tv_sec) + double(usage.ru_stime.tv_usec) / 1000000.0; return user_time + sys_time; - #else // not USE_CPU_TIME +#else // not USE_CPU_TIME struct timeval tv; gettimeofday(&tv, nullptr); return double(tv.tv_sec) + double(tv.tv_usec) / 1000000.0; - #endif // USE_CPU_TIME +#endif // USE_CPU_TIME #endif // __WIN32 } @@ -48,11 +48,12 @@ class TimeKeeper { private: double startTime; + public: TimeKeeper(); - + double restart(); }; -}//namespace cura -#endif//GETTIME_H +} // namespace cura +#endif // GETTIME_H diff --git a/include/utils/resources/certificate.pem.h b/include/utils/resources/certificate.pem.h index 93a1bf49c1..534492366c 100644 --- a/include/utils/resources/certificate.pem.h +++ b/include/utils/resources/certificate.pem.h @@ -7,8 +7,8 @@ namespace cura::utils::resources { - constexpr std::string_view certificate = -R"#(-----BEGIN CERTIFICATE----- +constexpr std::string_view certificate = + R"#(-----BEGIN CERTIFICATE----- MIIF8TCCA9mgAwIBAgIUd6fjXFbNBMZOxfBnv4FOokHlOC4wDQYJKoZIhvcNAQEL BQAwgYYxCzAJBgNVBAYTAk5MMRMwEQYDVQQIDApHZWxkZXJsYW5kMRUwEwYDVQQH DAxHZWxkZXJtYWxzZW4xEjAQBgNVBAoMCVVsdGlNYWtlcjEbMBkGA1UECwwSQ29t @@ -46,5 +46,4 @@ c3dQRszg9OTAyUwNKQEAuZ9II/cCpLyE+GbnqRdkErHgO7kiKQ== } // namespace cura::utils::resources -#endif //CERTIFICATE_H - +#endif // CERTIFICATE_H diff --git a/include/utils/types/generic.h b/include/utils/types/generic.h index 7f04d154cf..73e176d996 100644 --- a/include/utils/types/generic.h +++ b/include/utils/types/generic.h @@ -4,14 +4,14 @@ #ifndef CURAENGINE_GENERIC_H #define CURAENGINE_GENERIC_H -#include -#include -#include +#include "utils/types/char_range_literal.h" -#include #include -#include "utils/types/char_range_literal.h" +#include +#include +#include +#include namespace cura::utils { diff --git a/src/Application.cpp b/src/Application.cpp index a31577ff70..acd28f0007 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -3,40 +3,41 @@ #include "Application.h" -#include -#include -#include - -#include //For generating a UUID. -#include //For generating a UUID. -#include -#include -#include -#include -#include -#include -#include -#include - #include "FffProcessor.h" #include "communication/ArcusCommunication.h" //To connect via Arcus to the front-end. #include "communication/CommandLine.h" //To use the command line to slice stuff. +#include "plugins/slots.h" #include "progress/Progress.h" #include "utils/ThreadPool.h" #include "utils/string.h" //For stringcasecompare. -#include "plugins/slots.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include //For generating a UUID. +#include //For generating a UUID. +#include +#include +#include namespace cura { -Application::Application() : instance_uuid(boost::uuids::to_string(boost::uuids::random_generator()())) +Application::Application() + : instance_uuid(boost::uuids::to_string(boost::uuids::random_generator()())) { auto dup_sink = std::make_shared(std::chrono::seconds{ 10 }); auto base_sink = std::make_shared(); dup_sink->add_sink(base_sink); - spdlog::default_logger()->sinks() = std::vector>{ dup_sink }; // replace default_logger sinks with the duplicating filtering sink to avoid spamming + spdlog::default_logger()->sinks() + = std::vector>{ dup_sink }; // replace default_logger sinks with the duplicating filtering sink to avoid spamming if (auto spdlog_val = spdlog::details::os::getenv("CURAENGINE_LOG_LEVEL"); ! spdlog_val.empty()) { @@ -139,9 +140,11 @@ void Application::printHelp() const fmt::print(" -o \n\tSpecify a file to which to write the generated gcode.\n"); fmt::print("\n"); fmt::print("The settings are appended to the last supplied object:\n"); - fmt::print("CuraEngine slice [general settings] \n\t-g [current group settings] \n\t-e0 [extruder train 0 settings] \n\t-l obj_inheriting_from_last_extruder_train.stl [object settings] \n\t--next [next group settings]\n\t... etc.\n"); + fmt::print("CuraEngine slice [general settings] \n\t-g [current group settings] \n\t-e0 [extruder train 0 settings] \n\t-l obj_inheriting_from_last_extruder_train.stl [object " + "settings] \n\t--next [next group settings]\n\t... etc.\n"); fmt::print("\n"); - fmt::print("In order to load machine definitions from custom locations, you need to create the environment variable CURA_ENGINE_SEARCH_PATH, which should contain all search paths delimited by a (semi-)colon.\n"); + fmt::print("In order to load machine definitions from custom locations, you need to create the environment variable CURA_ENGINE_SEARCH_PATH, which should contain all search " + "paths delimited by a (semi-)colon.\n"); fmt::print("\n"); } diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 708c84f9c1..9586059a53 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1,18 +1,10 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include -#include // numeric_limits -#include -#include -#include - -#include -#include +#include "FffGcodeWriter.h" #include "Application.h" #include "ExtruderTrain.h" -#include "FffGcodeWriter.h" #include "FffProcessor.h" #include "InsetOrderOptimizer.h" #include "LayerPlan.h" @@ -29,10 +21,22 @@ #include "utils/math.h" #include "utils/orderOptimizer.h" +#include +#include + +#include +#include // numeric_limits +#include +#include +#include + namespace cura { -FffGcodeWriter::FffGcodeWriter() : max_object_height(0), layer_plan_buffer(gcode), slice_uuid(Application::getInstance().instance_uuid) +FffGcodeWriter::FffGcodeWriter() + : max_object_height(0) + , layer_plan_buffer(gcode) + , slice_uuid(Application::getInstance().instance_uuid) { for (unsigned int extruder_nr = 0; extruder_nr < MAX_EXTRUDERS; extruder_nr++) { // initialize all as max layer_nr, so that they get updated to the lowest layer on which they are used. @@ -89,7 +93,7 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep { auto should_prime_extruder = gcode.initializeExtruderTrains(storage, start_extruder_nr); - if (!should_prime_extruder) + if (! should_prime_extruder) { // set to most negative number so that layer processing never primes this extruder anymore. extruder_prime_layer_nr[start_extruder_nr] = std::numeric_limits::min(); @@ -157,7 +161,10 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep run_multiple_producers_ordered_consumer( process_layer_starting_layer_nr, total_layers, - [&storage, total_layers, this](int layer_nr) { return &processLayer(storage, layer_nr, total_layers); }, + [&storage, total_layers, this](int layer_nr) + { + return &processLayer(storage, layer_nr, total_layers); + }, [this, total_layers](LayerPlan* gcode_layer) { Progress::messageProgress(Progress::Stage::EXPORT, std::max(0, gcode_layer->getLayerNr()) + 1, total_layers); @@ -326,7 +333,8 @@ static void retractionAndWipeConfigFromSettings(const Settings& settings, Retrac switch_retraction_config.primeSpeed = settings.get("switch_extruder_prime_speed"); switch_retraction_config.zHop = settings.get("retraction_hop_after_extruder_switch_height"); switch_retraction_config.retraction_min_travel_distance = 0; // No limitation on travel distance for an extruder switch retract. - switch_retraction_config.retraction_extrusion_window = 99999.9; // So that extruder switch retractions won't affect the retraction buffer (extruded_volume_at_previous_n_retractions). + switch_retraction_config.retraction_extrusion_window + = 99999.9; // So that extruder switch retractions won't affect the retraction buffer (extruded_volume_at_previous_n_retractions). switch_retraction_config.retraction_count_max = 9999999; // Extruder switch retraction is never limited. WipeScriptConfig& wipe_config = config->wipe_config; @@ -362,7 +370,7 @@ void FffGcodeWriter::setConfigRetractionAndWipe(SliceDataStorage& storage) ExtruderTrain& train = scene.extruders[extruder_index]; retractionAndWipeConfigFromSettings(train.settings, &storage.retraction_wipe_config_per_extruder[extruder_index]); } - for(SliceMeshStorage& mesh: storage.meshes) + for (SliceMeshStorage& mesh : storage.meshes) { retractionAndWipeConfigFromSettings(mesh.settings, &mesh.retraction_wipe_config); } @@ -373,24 +381,21 @@ size_t FffGcodeWriter::getStartExtruder(const SliceDataStorage& storage) const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; const EPlatformAdhesion adhesion_type = mesh_group_settings.get("adhesion_type"); const int skirt_brim_extruder_nr = mesh_group_settings.get("skirt_brim_extruder_nr"); - const ExtruderTrain* skirt_brim_extruder = (skirt_brim_extruder_nr < 0)? nullptr : &mesh_group_settings.get("skirt_brim_extruder_nr"); + const ExtruderTrain* skirt_brim_extruder = (skirt_brim_extruder_nr < 0) ? nullptr : &mesh_group_settings.get("skirt_brim_extruder_nr"); size_t start_extruder_nr; - if (adhesion_type == EPlatformAdhesion::SKIRT - && skirt_brim_extruder + if (adhesion_type == EPlatformAdhesion::SKIRT && skirt_brim_extruder && (skirt_brim_extruder->settings.get("skirt_line_count") > 0 || skirt_brim_extruder->settings.get("skirt_brim_minimal_length") > 0)) { start_extruder_nr = skirt_brim_extruder->extruder_nr; } - else if ((adhesion_type == EPlatformAdhesion::BRIM || mesh_group_settings.get("prime_tower_brim_enable")) - && skirt_brim_extruder + else if ( + (adhesion_type == EPlatformAdhesion::BRIM || mesh_group_settings.get("prime_tower_brim_enable")) && skirt_brim_extruder && (skirt_brim_extruder->settings.get("brim_line_count") > 0 || skirt_brim_extruder->settings.get("skirt_brim_minimal_length") > 0)) { start_extruder_nr = skirt_brim_extruder->extruder_nr; } - else if (adhesion_type == EPlatformAdhesion::RAFT - && skirt_brim_extruder - ) + else if (adhesion_type == EPlatformAdhesion::RAFT && skirt_brim_extruder) { start_extruder_nr = mesh_group_settings.get("raft_base_extruder_nr").extruder_nr; } @@ -482,7 +487,8 @@ void FffGcodeWriter::setSupportAngles(SliceDataStorage& storage) storage.support.support_infill_angles_layer_0.push_back(0); } - auto getInterfaceAngles = [&storage](const ExtruderTrain& extruder, const std::string& interface_angles_setting, const EFillMethod pattern, const std::string& interface_height_setting) + auto getInterfaceAngles + = [&storage](const ExtruderTrain& extruder, const std::string& interface_angles_setting, const EFillMethod pattern, const std::string& interface_height_setting) { std::vector angles = extruder.settings.get>(interface_angles_setting); if (angles.empty()) @@ -499,7 +505,8 @@ void FffGcodeWriter::setSupportAngles(SliceDataStorage& storage) { for (const SliceMeshStorage& mesh : storage.meshes) { - if (mesh.settings.get(interface_height_setting) >= 2 * Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height")) + if (mesh.settings.get(interface_height_setting) + >= 2 * Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height")) { // Some roofs are quite thick. // Alternate between the two kinds of diagonal: / and \ . @@ -517,10 +524,12 @@ void FffGcodeWriter::setSupportAngles(SliceDataStorage& storage) }; const ExtruderTrain& roof_extruder = mesh_group_settings.get("support_roof_extruder_nr"); - storage.support.support_roof_angles = getInterfaceAngles(roof_extruder, "support_roof_angles", roof_extruder.settings.get("support_roof_pattern"), "support_roof_height"); + storage.support.support_roof_angles + = getInterfaceAngles(roof_extruder, "support_roof_angles", roof_extruder.settings.get("support_roof_pattern"), "support_roof_height"); const ExtruderTrain& bottom_extruder = mesh_group_settings.get("support_bottom_extruder_nr"); - storage.support.support_bottom_angles = getInterfaceAngles(bottom_extruder, "support_bottom_angles", bottom_extruder.settings.get("support_bottom_pattern"), "support_bottom_height"); + storage.support.support_bottom_angles + = getInterfaceAngles(bottom_extruder, "support_bottom_angles", bottom_extruder.settings.get("support_bottom_pattern"), "support_bottom_height"); } void FffGcodeWriter::processNextMeshGroupCode(const SliceDataStorage& storage) @@ -568,7 +577,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) z += layer_height; const coord_t comb_offset = base_settings.get("raft_base_line_spacing"); - std::vector fan_speed_layer_time_settings_per_extruder_raft_base = fan_speed_layer_time_settings_per_extruder; // copy so that we change only the local copy + std::vector fan_speed_layer_time_settings_per_extruder_raft_base + = fan_speed_layer_time_settings_per_extruder; // copy so that we change only the local copy for (FanSpeedLayerTimeSettings& fan_speed_layer_time_settings : fan_speed_layer_time_settings_per_extruder_raft_base) { double regular_fan_speed = base_settings.get("raft_base_fan_speed") * 100.0; @@ -578,7 +588,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const coord_t line_width = base_settings.get("raft_base_line_width"); const coord_t avoid_distance = base_settings.get("travel_avoid_distance"); - LayerPlan& gcode_layer = *new LayerPlan(storage, layer_nr, z, layer_height, base_extruder_nr, fan_speed_layer_time_settings_per_extruder_raft_base, comb_offset, line_width, avoid_distance); + LayerPlan& gcode_layer + = *new LayerPlan(storage, layer_nr, z, layer_height, base_extruder_nr, fan_speed_layer_time_settings_per_extruder_raft_base, comb_offset, line_width, avoid_distance); gcode_layer.setIsInside(true); gcode_layer.setExtruder(base_extruder_nr); @@ -614,29 +625,30 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) for (const Polygons& raft_outline_path : raft_outline_paths) { - Infill infill_comp(EFillMethod::LINES, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - gcode_layer.configs_storage.raft_base_config.getLineWidth(), - line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); + Infill infill_comp( + EFillMethod::LINES, + zig_zaggify_infill, + connect_polygons, + raft_outline_path, + gcode_layer.configs_storage.raft_base_config.getLineWidth(), + line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); std::vector raft_paths; infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); if (! raft_paths.empty()) @@ -644,7 +656,22 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); InsetOrderOptimizer wall_orderer( - *this, storage, gcode_layer, base_settings, base_extruder_nr, config, config, config, config, retract_before_outer_wall, wipe_dist, wipe_dist, base_extruder_nr, base_extruder_nr, z_seam_config, raft_paths); + *this, + storage, + gcode_layer, + base_settings, + base_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + base_extruder_nr, + base_extruder_nr, + z_seam_config, + raft_paths); wall_orderer.addToLayer(); } gcode_layer.addLinesByOptimizer(raftLines, gcode_layer.configs_storage.raft_base_config, SpaceFillType::Lines); @@ -670,7 +697,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const LayerIndex layer_nr = initial_raft_layer_nr + raft_interface_layer; z += interface_layer_height; - std::vector fan_speed_layer_time_settings_per_extruder_raft_interface = fan_speed_layer_time_settings_per_extruder; // copy so that we change only the local copy + std::vector fan_speed_layer_time_settings_per_extruder_raft_interface + = fan_speed_layer_time_settings_per_extruder; // copy so that we change only the local copy for (FanSpeedLayerTimeSettings& fan_speed_layer_time_settings : fan_speed_layer_time_settings_per_extruder_raft_interface) { const double regular_fan_speed = interface_fan_speed * 100.0; @@ -679,7 +707,16 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) } const coord_t comb_offset = interface_line_spacing; - LayerPlan& gcode_layer = *new LayerPlan(storage, layer_nr, z, interface_layer_height, current_extruder_nr, fan_speed_layer_time_settings_per_extruder_raft_interface, comb_offset, interface_line_width, interface_avoid_distance); + LayerPlan& gcode_layer = *new LayerPlan( + storage, + layer_nr, + z, + interface_layer_height, + current_extruder_nr, + fan_speed_layer_time_settings_per_extruder_raft_interface, + comb_offset, + interface_line_width, + interface_avoid_distance); gcode_layer.setIsInside(true); current_extruder_nr = interface_extruder_nr; @@ -687,7 +724,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) Application::getInstance().communication->sendLayerComplete(layer_nr, z, interface_layer_height); std::vector raft_outline_paths; - const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. + const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() + / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. if (storage.primeRaftOutline.area() > 0) { raft_outline_paths.emplace_back(storage.primeRaftOutline.offset(-small_offset)); @@ -713,29 +751,30 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) for (const Polygons& raft_outline_path : raft_outline_paths) { - Infill infill_comp(EFillMethod::ZIG_ZAG, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - infill_outline_width, - interface_line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - interface_max_resolution, - interface_max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); + Infill infill_comp( + EFillMethod::ZIG_ZAG, + zig_zaggify_infill, + connect_polygons, + raft_outline_path, + infill_outline_width, + interface_line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + interface_max_resolution, + interface_max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); std::vector raft_paths; // Should remain empty, since we have no walls. infill_comp.generate(raft_paths, raft_polygons, raft_lines, interface_settings, layer_nr, SectionType::ADHESION); gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_interface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); @@ -761,7 +800,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const LayerIndex layer_nr = initial_raft_layer_nr + 1 + num_interface_layers + raft_surface_layer - 1; // +1: 1 base layer z += surface_layer_height; - std::vector fan_speed_layer_time_settings_per_extruder_raft_surface = fan_speed_layer_time_settings_per_extruder; // copy so that we change only the local copy + std::vector fan_speed_layer_time_settings_per_extruder_raft_surface + = fan_speed_layer_time_settings_per_extruder; // copy so that we change only the local copy for (FanSpeedLayerTimeSettings& fan_speed_layer_time_settings : fan_speed_layer_time_settings_per_extruder_raft_surface) { const double regular_fan_speed = surface_fan_speed * 100.0; @@ -770,7 +810,16 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) } const coord_t comb_offset = surface_line_spacing; - LayerPlan& gcode_layer = *new LayerPlan(storage, layer_nr, z, surface_layer_height, current_extruder_nr, fan_speed_layer_time_settings_per_extruder_raft_surface, comb_offset, surface_line_width, surface_avoid_distance); + LayerPlan& gcode_layer = *new LayerPlan( + storage, + layer_nr, + z, + surface_layer_height, + current_extruder_nr, + fan_speed_layer_time_settings_per_extruder_raft_surface, + comb_offset, + surface_line_width, + surface_avoid_distance); gcode_layer.setIsInside(true); // make sure that we are using the correct extruder to print raft @@ -779,7 +828,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) Application::getInstance().communication->sendLayerComplete(layer_nr, z, surface_layer_height); std::vector raft_outline_paths; - const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. + const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() + / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. if (storage.primeRaftOutline.area() > 0) { raft_outline_paths.emplace_back(storage.primeRaftOutline.offset(-small_offset)); @@ -789,7 +839,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. const coord_t infill_outline_width = gcode_layer.configs_storage.raft_interface_config.getLineWidth(); Polygons raft_lines; - AngleDegrees fill_angle = (num_surface_layers - raft_surface_layer) % 2 ? 45 : 135; // Alternate between -45 and +45 degrees, ending up 90 degrees rotated from the default skin angle. + AngleDegrees fill_angle + = (num_surface_layers - raft_surface_layer) % 2 ? 45 : 135; // Alternate between -45 and +45 degrees, ending up 90 degrees rotated from the default skin angle. constexpr bool zig_zaggify_infill = true; constexpr size_t wall_line_count = 0; @@ -805,29 +856,30 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) for (const Polygons& raft_outline_path : raft_outline_paths) { - Infill infill_comp(EFillMethod::ZIG_ZAG, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - infill_outline_width, - surface_line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - surface_max_resolution, - surface_max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); + Infill infill_comp( + EFillMethod::ZIG_ZAG, + zig_zaggify_infill, + connect_polygons, + raft_outline_path, + infill_outline_width, + surface_line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + surface_max_resolution, + surface_max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); std::vector raft_paths; // Should remain empty, since we have no walls. infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); @@ -863,8 +915,8 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn // find printZ of first actual printed mesh for (const SliceMeshStorage& mesh : storage.meshes) { - if (layer_nr >= static_cast(mesh.layers.size()) || mesh.settings.get("support_mesh") || mesh.settings.get("anti_overhang_mesh") || mesh.settings.get("cutting_mesh") - || mesh.settings.get("infill_mesh")) + if (layer_nr >= static_cast(mesh.layers.size()) || mesh.settings.get("support_mesh") || mesh.settings.get("anti_overhang_mesh") + || mesh.settings.get("cutting_mesh") || mesh.settings.get("infill_mesh")) { continue; } @@ -909,11 +961,22 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn } const coord_t comb_offset_from_outlines = max_inner_wall_width * 2; - assert(static_cast(extruder_order_per_layer_negative_layers.size()) + layer_nr >= 0 && "Layer numbers shouldn't get more negative than there are raft/filler layers"); - const std::vector& extruder_order = (layer_nr < 0) ? extruder_order_per_layer_negative_layers[extruder_order_per_layer_negative_layers.size() + layer_nr] : extruder_order_per_layer[layer_nr]; + assert( + static_cast(extruder_order_per_layer_negative_layers.size()) + layer_nr >= 0 && "Layer numbers shouldn't get more negative than there are raft/filler layers"); + const std::vector& extruder_order + = (layer_nr < 0) ? extruder_order_per_layer_negative_layers[extruder_order_per_layer_negative_layers.size() + layer_nr] : extruder_order_per_layer[layer_nr]; const coord_t first_outer_wall_line_width = scene.extruders[extruder_order.front()].settings.get("wall_line_width_0"); - LayerPlan& gcode_layer = *new LayerPlan(storage, layer_nr, z, layer_thickness, extruder_order.front(), fan_speed_layer_time_settings_per_extruder, comb_offset_from_outlines, first_outer_wall_line_width, avoid_distance); + LayerPlan& gcode_layer = *new LayerPlan( + storage, + layer_nr, + z, + layer_thickness, + extruder_order.front(), + fan_speed_layer_time_settings_per_extruder, + comb_offset_from_outlines, + first_outer_wall_line_width, + avoid_distance); if (include_helper_parts) { @@ -931,7 +994,8 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn const size_t support_roof_extruder_nr = mesh_group_settings.get("support_roof_extruder_nr").extruder_nr; const size_t support_bottom_extruder_nr = mesh_group_settings.get("support_bottom_extruder_nr").extruder_nr; - const size_t support_infill_extruder_nr = (layer_nr <= 0) ? mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr : mesh_group_settings.get("support_infill_extruder_nr").extruder_nr; + const size_t support_infill_extruder_nr = (layer_nr <= 0) ? mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr + : mesh_group_settings.get("support_infill_extruder_nr").extruder_nr; for (const size_t& extruder_nr : extruder_order) { @@ -959,7 +1023,8 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; const PathConfigStorage::MeshPathConfigs& mesh_config = gcode_layer.configs_storage.mesh_configs[mesh_idx]; if (mesh.settings.get("magic_mesh_surface_mode") == ESurfaceMode::SURFACE - && extruder_nr == mesh.settings.get("wall_0_extruder_nr").extruder_nr // mesh surface mode should always only be printed with the outer wall extruder! + && extruder_nr + == mesh.settings.get("wall_0_extruder_nr").extruder_nr // mesh surface mode should always only be printed with the outer wall extruder! ) { addMeshLayerToGCode_meshSurfaceMode(storage, mesh, mesh_config, gcode_layer); @@ -1005,7 +1070,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan const int skirt_height = train.settings.get("skirt_height"); const bool is_skirt = train.settings.get("adhesion_type") == EPlatformAdhesion::SKIRT; // only create a multilayer SkirtBrim for a skirt for the height of skirt_height - if (layer_nr != 0 && (layer_nr >= skirt_height || !is_skirt)) + if (layer_nr != 0 && (layer_nr >= skirt_height || ! is_skirt)) { return; } @@ -1014,7 +1079,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan return; } gcode_layer.setSkirtBrimIsPlanned(extruder_nr); - + const auto& original_skirt_brim = storage.skirt_brim[extruder_nr]; if (original_skirt_brim.size() == 0) { @@ -1040,7 +1105,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan const size_t inset_idx; ConstPolygonPointer poly; }; - + size_t total_line_count = 0; for (const SkirtBrimLine& line : storage.skirt_brim[extruder_nr]) { @@ -1048,7 +1113,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan total_line_count += line.open_polylines.size(); } Polygons all_brim_lines; - + // Add the support brim before the below algorithm which takes order requirements into account // For support brim we don't care about the order, because support doesn't need to be accurate. const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; @@ -1059,7 +1124,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan support_brim_lines.toPolylines(); all_brim_lines = support_brim_lines; } - + all_brim_lines.reserve(total_line_count); const coord_t line_w = train.settings.get("skirt_brim_line_width") * train.settings.get("initial_layer_line_width_factor"); @@ -1089,7 +1154,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan ConstPolygonPointer pp(all_brim_lines.back()); for (Point p : line) { - grid.insert(p, BrimLineReference{inset_idx, pp}); + grid.insert(p, BrimLineReference{ inset_idx, pp }); } } } @@ -1143,7 +1208,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan } } assert(all_brim_lines.size() == total_line_count); // Otherwise pointers would have gotten invalidated - + const bool enable_travel_optimization = true; // Use the combing outline while deciding in which order to print the lines. Can't hurt for only one layer. const coord_t wipe_dist = 0u; const Ratio flow_ratio = 1.0; @@ -1154,8 +1219,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan Polygons inner_brim_line; inner_brim_line.add(all_brim_lines[0]); - gcode_layer.addLinesByOptimizer - ( + gcode_layer.addLinesByOptimizer( layer_nr == 0 ? all_brim_lines : inner_brim_line, gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], SpaceFillType::PolyLines, @@ -1165,8 +1229,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan start_close_to, fan_speed, reverse_print_direction, - order_requirements - ); + order_requirements); } void FffGcodeWriter::processOozeShield(const SliceDataStorage& storage, LayerPlan& gcode_layer) const @@ -1325,7 +1388,11 @@ std::vector FffGcodeWriter::calculateMeshOrder(const SliceDataStorage& s return ret; } -void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const +void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const PathConfigStorage::MeshPathConfigs& mesh_config, + LayerPlan& gcode_layer) const { if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer) { @@ -1348,7 +1415,11 @@ void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& polygons = Simplify(mesh.settings).polygon(polygons); - ZSeamConfig z_seam_config(mesh.settings.get("z_seam_type"), mesh.getZSeamHint(), mesh.settings.get("z_seam_corner"), mesh.settings.get("wall_line_width_0") * 2); + ZSeamConfig z_seam_config( + mesh.settings.get("z_seam_type"), + mesh.getZSeamHint(), + mesh.settings.get("z_seam_corner"), + mesh.settings.get("wall_line_width_0") * 2); const bool spiralize = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("magic_spiralize"); gcode_layer.addPolygonsByOptimizer(polygons, mesh_config.inset0_config, z_seam_config, mesh.settings.get("wall_0_wipe_dist"), spiralize); @@ -1362,7 +1433,12 @@ void FffGcodeWriter::addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, c gcode_layer.addLinesByOptimizer(layer->openPolyLines, mesh_config.inset0_config, SpaceFillType::PolyLines); } -void FffGcodeWriter::addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const +void FffGcodeWriter::addMeshLayerToGCode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + LayerPlan& gcode_layer) const { if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer) { @@ -1386,7 +1462,11 @@ void FffGcodeWriter::addMeshLayerToGCode(const SliceDataStorage& storage, const ZSeamConfig z_seam_config; if (mesh.isPrinted()) //"normal" meshes with walls, skin, infill, etc. get the traditional part ordering based on the z-seam settings. { - z_seam_config = ZSeamConfig(mesh.settings.get("z_seam_type"), mesh.getZSeamHint(), mesh.settings.get("z_seam_corner"), mesh.settings.get("wall_line_width_0") * 2); + z_seam_config = ZSeamConfig( + mesh.settings.get("z_seam_type"), + mesh.getZSeamHint(), + mesh.settings.get("z_seam_corner"), + mesh.settings.get("wall_line_width_0") * 2); } PathOrderOptimizer part_order_optimizer(gcode_layer.getLastPlannedPositionOrStartingPosition(), z_seam_config); for (const SliceLayerPart& part : layer.parts) @@ -1411,8 +1491,13 @@ void FffGcodeWriter::addMeshLayerToGCode(const SliceDataStorage& storage, const gcode_layer.setMesh(nullptr); } -void FffGcodeWriter::addMeshPartToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part, LayerPlan& gcode_layer) - const +void FffGcodeWriter::addMeshPartToGCode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part, + LayerPlan& gcode_layer) const { const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; @@ -1433,7 +1518,8 @@ void FffGcodeWriter::addMeshPartToGCode(const SliceDataStorage& storage, const S added_something = added_something | processSkin(storage, gcode_layer, mesh, extruder_nr, mesh_config, part); // After a layer part, make sure the nozzle is inside the comb boundary, so we do not retract on the perimeter. - if (added_something && (! mesh_group_settings.get("magic_spiralize") || gcode_layer.getLayerNr() < static_cast(mesh.settings.get("initial_bottom_layers")))) + if (added_something + && (! mesh_group_settings.get("magic_spiralize") || gcode_layer.getLayerNr() < static_cast(mesh.settings.get("initial_bottom_layers")))) { coord_t innermost_wall_line_width = mesh.settings.get((mesh.settings.get("wall_line_count") > 1) ? "wall_line_width_x" : "wall_line_width_0"); if (gcode_layer.getLayerNr() == 0) @@ -1446,7 +1532,13 @@ void FffGcodeWriter::addMeshPartToGCode(const SliceDataStorage& storage, const S gcode_layer.setIsInside(false); } -bool FffGcodeWriter::processInfill(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const +bool FffGcodeWriter::processInfill( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const { if (extruder_nr != mesh.settings.get("infill_extruder_nr").extruder_nr) { @@ -1457,8 +1549,13 @@ bool FffGcodeWriter::processInfill(const SliceDataStorage& storage, LayerPlan& g return added_something; } -bool FffGcodeWriter::processMultiLayerInfill(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) - const +bool FffGcodeWriter::processMultiLayerInfill( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const { if (extruder_nr != mesh.settings.get("infill_extruder_nr").extruder_nr) { @@ -1474,7 +1571,8 @@ bool FffGcodeWriter::processMultiLayerInfill(const SliceDataStorage& storage, La AngleDegrees infill_angle = 45; // Original default. This will get updated to an element from mesh->infill_angles. if (! mesh.infill_angles.empty()) { - const size_t combined_infill_layers = std::max(uint64_t(1), round_divide(mesh.settings.get("infill_sparse_thickness"), std::max(mesh.settings.get("layer_height"), coord_t(1)))); + const size_t combined_infill_layers + = std::max(uint64_t(1), round_divide(mesh.settings.get("infill_sparse_thickness"), std::max(mesh.settings.get("layer_height"), coord_t(1)))); infill_angle = mesh.infill_angles.at((gcode_layer.getLayerNr() / combined_infill_layers) % mesh.infill_angles.size()); } const Point3 mesh_middle = mesh.bounding_box.getMiddle(); @@ -1517,30 +1615,40 @@ bool FffGcodeWriter::processMultiLayerInfill(const SliceDataStorage& storage, La { lightning_layer = &mesh.lightning_generator->getTreesForLayer(gcode_layer.getLayerNr()); } - Infill infill_comp(infill_pattern, - zig_zaggify_infill, - connect_polygons, - part.infill_area_per_combine_per_density[density_idx][combine_idx], - infill_line_width, - infill_line_distance_here, - infill_overlap, - infill_multiplier, - infill_angle, - gcode_layer.z, - infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - mesh.settings.get("cross_infill_pocket_size")); - infill_comp.generate(infill_paths, infill_polygons, infill_lines, mesh.settings, gcode_layer.getLayerNr(), SectionType::INFILL, mesh.cross_fill_provider, lightning_layer, &mesh); + Infill infill_comp( + infill_pattern, + zig_zaggify_infill, + connect_polygons, + part.infill_area_per_combine_per_density[density_idx][combine_idx], + infill_line_width, + infill_line_distance_here, + infill_overlap, + infill_multiplier, + infill_angle, + gcode_layer.z, + infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + mesh.settings.get("cross_infill_pocket_size")); + infill_comp.generate( + infill_paths, + infill_polygons, + infill_lines, + mesh.settings, + gcode_layer.getLayerNr(), + SectionType::INFILL, + mesh.cross_fill_provider, + lightning_layer, + &mesh); } if (! infill_lines.empty() || ! infill_polygons.empty()) { @@ -1564,25 +1672,27 @@ bool FffGcodeWriter::processMultiLayerInfill(const SliceDataStorage& storage, La } const bool enable_travel_optimization = mesh.settings.get("infill_enable_travel_optimization"); - gcode_layer.addLinesByOptimizer(infill_lines, - mesh_config.infill_config[combine_idx], - zig_zaggify_infill ? SpaceFillType::PolyLines : SpaceFillType::Lines, - enable_travel_optimization, - /*wipe_dist = */ 0, - /* flow = */ 1.0, - near_start_location); + gcode_layer.addLinesByOptimizer( + infill_lines, + mesh_config.infill_config[combine_idx], + zig_zaggify_infill ? SpaceFillType::PolyLines : SpaceFillType::Lines, + enable_travel_optimization, + /*wipe_dist = */ 0, + /* flow = */ 1.0, + near_start_location); } } } return added_something; } -bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, - LayerPlan& gcode_layer, - const SliceMeshStorage& mesh, - const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, - const SliceLayerPart& part) const +bool FffGcodeWriter::processSingleLayerInfill( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const { if (extruder_nr != mesh.settings.get("infill_extruder_nr").extruder_nr) { @@ -1613,7 +1723,8 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, AngleDegrees infill_angle = 45; // Original default. This will get updated to an element from mesh->infill_angles. if (! mesh.infill_angles.empty()) { - const size_t combined_infill_layers = std::max(uint64_t(1), round_divide(mesh.settings.get("infill_sparse_thickness"), std::max(mesh.settings.get("layer_height"), coord_t(1)))); + const size_t combined_infill_layers + = std::max(uint64_t(1), round_divide(mesh.settings.get("infill_sparse_thickness"), std::max(mesh.settings.get("layer_height"), coord_t(1)))); infill_angle = mesh.infill_angles.at((static_cast(gcode_layer.getLayerNr()) / combined_infill_layers) % mesh.infill_angles.size()); } const Point3 mesh_middle = mesh.bounding_box.getMiddle(); @@ -1710,30 +1821,40 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, const coord_t small_area_width = mesh.settings.get("min_even_wall_line_width") * 2; // Maximum width of a region that can still be filled with one wall. wall_tool_paths.emplace_back(std::vector()); const coord_t overlap = infill_overlap - (density_idx == last_idx ? 0 : wall_line_count * infill_line_width); - Infill infill_comp(pattern, - zig_zaggify_infill, - connect_polygons, - infill_below_skin, - infill_line_width, - infill_line_distance_here, - overlap, - infill_multiplier, - infill_angle, - gcode_layer.z, - infill_shift, - max_resolution, - max_deviation, - skin_below_wall_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - infill_comp.generate(wall_tool_paths.back(), infill_polygons, infill_lines, mesh.settings, gcode_layer.getLayerNr(), SectionType::INFILL, mesh.cross_fill_provider, lightning_layer, &mesh); + Infill infill_comp( + pattern, + zig_zaggify_infill, + connect_polygons, + infill_below_skin, + infill_line_width, + infill_line_distance_here, + overlap, + infill_multiplier, + infill_angle, + gcode_layer.z, + infill_shift, + max_resolution, + max_deviation, + skin_below_wall_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + infill_comp.generate( + wall_tool_paths.back(), + infill_polygons, + infill_lines, + mesh.settings, + gcode_layer.getLayerNr(), + SectionType::INFILL, + mesh.cross_fill_provider, + lightning_layer, + &mesh); if (density_idx < last_idx) { const coord_t cut_offset = get_cut_offset(zig_zaggify_infill, infill_line_width, min_skin_below_wall_count); @@ -1765,30 +1886,40 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, constexpr coord_t overlap = 0; // overlap is already applied for the sparsest density in the generateGradualInfill wall_tool_paths.emplace_back(); - Infill infill_comp(pattern, - zig_zaggify_infill, - connect_polygons, - in_outline, - infill_line_width, - infill_line_distance_here, - overlap, - infill_multiplier, - infill_angle, - gcode_layer.z, - infill_shift, - max_resolution, - max_deviation, - wall_line_count_here, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - infill_comp.generate(wall_tool_paths.back(), infill_polygons, infill_lines, mesh.settings, gcode_layer.getLayerNr(), SectionType::INFILL, mesh.cross_fill_provider, lightning_layer, &mesh); + Infill infill_comp( + pattern, + zig_zaggify_infill, + connect_polygons, + in_outline, + infill_line_width, + infill_line_distance_here, + overlap, + infill_multiplier, + infill_angle, + gcode_layer.z, + infill_shift, + max_resolution, + max_deviation, + wall_line_count_here, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + infill_comp.generate( + wall_tool_paths.back(), + infill_polygons, + infill_lines, + mesh.settings, + gcode_layer.getLayerNr(), + SectionType::INFILL, + mesh.cross_fill_provider, + lightning_layer, + &mesh); if (density_idx < last_idx) { const coord_t cut_offset = get_cut_offset(zig_zaggify_infill, infill_line_width, wall_line_count); @@ -1800,8 +1931,21 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, } wall_tool_paths.emplace_back(part.infill_wall_toolpaths); // The extra infill walls were generated separately. Add these too. - const bool walls_generated = - std::any_of(wall_tool_paths.cbegin(), wall_tool_paths.cend(), [](const std::vector& tp) { return ! (tp.empty() || std::all_of(tp.begin(), tp.end(), [](const VariableWidthLines& vwl) { return vwl.empty(); })); }); + const bool walls_generated = std::any_of( + wall_tool_paths.cbegin(), + wall_tool_paths.cend(), + [](const std::vector& tp) + { + return ! ( + tp.empty() + || std::all_of( + tp.begin(), + tp.end(), + [](const VariableWidthLines& vwl) + { + return vwl.empty(); + })); + }); if (! infill_lines.empty() || ! infill_polygons.empty() || walls_generated) { added_something = true; @@ -1822,7 +1966,8 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, else // So walls_generated must be true. { std::vector* start_paths = &wall_tool_paths[rand() % wall_tool_paths.size()]; - while (start_paths->empty() || (*start_paths)[0].empty()) // We know for sure (because walls_generated) that one of them is not empty. So randomise until we hit it. Should almost always be very quick. + while (start_paths->empty() || (*start_paths)[0].empty()) // We know for sure (because walls_generated) that one of them is not empty. So randomise until we hit it. + // Should almost always be very quick. { start_paths = &wall_tool_paths[rand() % wall_tool_paths.size()]; } @@ -1835,23 +1980,28 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, { constexpr bool retract_before_outer_wall = false; constexpr coord_t wipe_dist = 0; - const ZSeamConfig z_seam_config(mesh.settings.get("z_seam_type"), mesh.getZSeamHint(), mesh.settings.get("z_seam_corner"), mesh_config.infill_config[0].getLineWidth() * 2); - InsetOrderOptimizer wall_orderer(*this, - storage, - gcode_layer, - mesh.settings, - extruder_nr, - mesh_config.infill_config[0], - mesh_config.infill_config[0], - mesh_config.infill_config[0], - mesh_config.infill_config[0], - retract_before_outer_wall, - wipe_dist, - wipe_dist, - extruder_nr, - extruder_nr, - z_seam_config, - tool_paths); + const ZSeamConfig z_seam_config( + mesh.settings.get("z_seam_type"), + mesh.getZSeamHint(), + mesh.settings.get("z_seam_corner"), + mesh_config.infill_config[0].getLineWidth() * 2); + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + mesh.settings, + extruder_nr, + mesh_config.infill_config[0], + mesh_config.infill_config[0], + mesh_config.infill_config[0], + mesh_config.infill_config[0], + retract_before_outer_wall, + wipe_dist, + wipe_dist, + extruder_nr, + extruder_nr, + z_seam_config, + tool_paths); added_something |= wall_orderer.addToLayer(); } } @@ -1863,21 +2013,40 @@ bool FffGcodeWriter::processSingleLayerInfill(const SliceDataStorage& storage, gcode_layer.addPolygonsByOptimizer(infill_polygons, mesh_config.infill_config[0], ZSeamConfig(), 0, false, 1.0_r, false, false, near_start_location); } const bool enable_travel_optimization = mesh.settings.get("infill_enable_travel_optimization"); - if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::CUBIC || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC - || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::LIGHTNING) + if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::CUBIC + || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::LIGHTNING) { - gcode_layer.addLinesByOptimizer(infill_lines, mesh_config.infill_config[0], SpaceFillType::Lines, enable_travel_optimization, mesh.settings.get("infill_wipe_dist"), /*float_ratio = */ 1.0, near_start_location); + gcode_layer.addLinesByOptimizer( + infill_lines, + mesh_config.infill_config[0], + SpaceFillType::Lines, + enable_travel_optimization, + mesh.settings.get("infill_wipe_dist"), + /*float_ratio = */ 1.0, + near_start_location); } else { gcode_layer.addLinesByOptimizer( - infill_lines, mesh_config.infill_config[0], (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines, enable_travel_optimization, /* wipe_dist = */ 0, /*float_ratio = */ 1.0, near_start_location); + infill_lines, + mesh_config.infill_config[0], + (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines, + enable_travel_optimization, + /* wipe_dist = */ 0, + /*float_ratio = */ 1.0, + near_start_location); } } return added_something; } -bool FffGcodeWriter::partitionInfillBySkinAbove(Polygons& infill_below_skin, Polygons& infill_not_below_skin, const LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const SliceLayerPart& part, coord_t infill_line_width) +bool FffGcodeWriter::partitionInfillBySkinAbove( + Polygons& infill_below_skin, + Polygons& infill_not_below_skin, + const LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const SliceLayerPart& part, + coord_t infill_line_width) { constexpr coord_t tiny_infill_offset = 20; const auto skin_edge_support_layers = mesh.settings.get("skin_edge_support_layers"); @@ -1962,7 +2131,8 @@ bool FffGcodeWriter::partitionInfillBySkinAbove(Polygons& infill_below_skin, Pol } } - // the shrink/expand here is to remove regions of infill below skin that are narrower than the width of the infill walls otherwise the infill walls could merge and form a bump + // the shrink/expand here is to remove regions of infill below skin that are narrower than the width of the infill walls otherwise the infill walls could merge and form a + // bump infill_below_skin = skin_above_combined.intersection(part.infill_area_per_combine_per_density.back().front()).offset(-infill_line_width).offset(infill_line_width); constexpr bool remove_small_holes_from_infill_below_skin = true; @@ -1982,7 +2152,12 @@ bool FffGcodeWriter::partitionInfillBySkinAbove(Polygons& infill_below_skin, Pol return ! infill_below_skin_overlap.empty() && ! infill_not_below_skin.empty(); } -void FffGcodeWriter::processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) const +void FffGcodeWriter::processSpiralizedWall( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part, + const SliceMeshStorage& mesh) const { if (part.spiral_wall.empty()) { @@ -2008,11 +2183,18 @@ void FffGcodeWriter::processSpiralizedWall(const SliceDataStorage& storage, Laye // output a wall slice that is interpolated between the last and current walls for (const ConstPolygonRef& wall_outline : part.spiral_wall) { - gcode_layer.spiralizeWallSlice(mesh_config.inset0_config, wall_outline, ConstPolygonRef(*last_wall_outline), seam_vertex_idx, last_seam_vertex_idx, is_top_layer, is_bottom_layer); + gcode_layer + .spiralizeWallSlice(mesh_config.inset0_config, wall_outline, ConstPolygonRef(*last_wall_outline), seam_vertex_idx, last_seam_vertex_idx, is_top_layer, is_bottom_layer); } } -bool FffGcodeWriter::processInsets(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const +bool FffGcodeWriter::processInsets( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const { bool added_something = false; if (extruder_nr != mesh.settings.get("wall_0_extruder_nr").extruder_nr && extruder_nr != mesh.settings.get("wall_x_extruder_nr").extruder_nr) @@ -2029,7 +2211,8 @@ bool FffGcodeWriter::processInsets(const SliceDataStorage& storage, LayerPlan& g { const size_t initial_bottom_layers = mesh.settings.get("initial_bottom_layers"); const int layer_nr = gcode_layer.getLayerNr(); - if ((layer_nr < static_cast(initial_bottom_layers) && part.wall_toolpaths.empty()) // The bottom layers in spiralize mode are generated using the variable width paths + if ((layer_nr < static_cast(initial_bottom_layers) + && part.wall_toolpaths.empty()) // The bottom layers in spiralize mode are generated using the variable width paths || (layer_nr >= static_cast(initial_bottom_layers) && part.spiral_wall.empty())) // The rest of the layers in spiralize mode are using the spiral wall { // nothing to do @@ -2039,7 +2222,8 @@ bool FffGcodeWriter::processInsets(const SliceDataStorage& storage, LayerPlan& g { spiralize = true; } - if (spiralize && gcode_layer.getLayerNr() == static_cast(initial_bottom_layers) && extruder_nr == mesh.settings.get("wall_0_extruder_nr").extruder_nr) + if (spiralize && gcode_layer.getLayerNr() == static_cast(initial_bottom_layers) + && extruder_nr == mesh.settings.get("wall_0_extruder_nr").extruder_nr) { // on the last normal layer first make the outer wall normally and then start a second outer wall from the same hight, but gradually moving upward added_something = true; gcode_layer.setIsInside(true); // going to print stuff inside print object @@ -2189,23 +2373,28 @@ bool FffGcodeWriter::processInsets(const SliceDataStorage& storage, LayerPlan& g { // Main case: Optimize the insets with the InsetOrderOptimizer. const coord_t wall_x_wipe_dist = 0; - const ZSeamConfig z_seam_config(mesh.settings.get("z_seam_type"), mesh.getZSeamHint(), mesh.settings.get("z_seam_corner"), mesh.settings.get("wall_line_width_0") * 2); - InsetOrderOptimizer wall_orderer(*this, - storage, - gcode_layer, - mesh.settings, - extruder_nr, - mesh_config.inset0_config, - mesh_config.insetX_config, - mesh_config.bridge_inset0_config, - mesh_config.bridge_insetX_config, - mesh.settings.get("travel_retract_before_outer_wall"), - mesh.settings.get("wall_0_wipe_dist"), - wall_x_wipe_dist, - mesh.settings.get("wall_0_extruder_nr").extruder_nr, - mesh.settings.get("wall_x_extruder_nr").extruder_nr, - z_seam_config, - part.wall_toolpaths); + const ZSeamConfig z_seam_config( + mesh.settings.get("z_seam_type"), + mesh.getZSeamHint(), + mesh.settings.get("z_seam_corner"), + mesh.settings.get("wall_line_width_0") * 2); + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + mesh.settings, + extruder_nr, + mesh_config.inset0_config, + mesh_config.insetX_config, + mesh_config.bridge_inset0_config, + mesh_config.bridge_insetX_config, + mesh.settings.get("travel_retract_before_outer_wall"), + mesh.settings.get("wall_0_wipe_dist"), + wall_x_wipe_dist, + mesh.settings.get("wall_0_extruder_nr").extruder_nr, + mesh.settings.get("wall_x_extruder_nr").extruder_nr, + z_seam_config, + part.wall_toolpaths); added_something |= wall_orderer.addToLayer(); } return added_something; @@ -2244,7 +2433,13 @@ std::optional FffGcodeWriter::getSeamAvoidingLocation(const Polygons& fil } } -bool FffGcodeWriter::processSkin(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const +bool FffGcodeWriter::processSkin( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const { const size_t top_bottom_extruder_nr = mesh.settings.get("top_bottom_extruder_nr").extruder_nr; const size_t roofing_extruder_nr = mesh.settings.get("roofing_extruder_nr").extruder_nr; @@ -2273,7 +2468,13 @@ bool FffGcodeWriter::processSkin(const SliceDataStorage& storage, LayerPlan& gco return added_something; } -bool FffGcodeWriter::processSkinPart(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part) const +bool FffGcodeWriter::processSkinPart( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SkinPart& skin_part) const { bool added_something = false; @@ -2286,13 +2487,14 @@ bool FffGcodeWriter::processSkinPart(const SliceDataStorage& storage, LayerPlan& return added_something; } -void FffGcodeWriter::processRoofing(const SliceDataStorage& storage, - LayerPlan& gcode_layer, - const SliceMeshStorage& mesh, - const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, - const SkinPart& skin_part, - bool& added_something) const +void FffGcodeWriter::processRoofing( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SkinPart& skin_part, + bool& added_something) const { const size_t roofing_extruder_nr = mesh.settings.get("roofing_extruder_nr").extruder_nr; if (extruder_nr != roofing_extruder_nr) @@ -2310,16 +2512,30 @@ void FffGcodeWriter::processRoofing(const SliceDataStorage& storage, const Ratio skin_density = 1.0; const coord_t skin_overlap = 0; // skinfill already expanded over the roofing areas; don't overlap with perimeters const bool monotonic = mesh.settings.get("roofing_monotonic"); - processSkinPrintFeature(storage, gcode_layer, mesh, mesh_config, extruder_nr, skin_part.roofing_fill, mesh_config.roofing_config, pattern, roofing_angle, skin_overlap, skin_density, monotonic, added_something); + processSkinPrintFeature( + storage, + gcode_layer, + mesh, + mesh_config, + extruder_nr, + skin_part.roofing_fill, + mesh_config.roofing_config, + pattern, + roofing_angle, + skin_overlap, + skin_density, + monotonic, + added_something); } -void FffGcodeWriter::processTopBottom(const SliceDataStorage& storage, - LayerPlan& gcode_layer, - const SliceMeshStorage& mesh, - const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, - const SkinPart& skin_part, - bool& added_something) const +void FffGcodeWriter::processTopBottom( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SkinPart& skin_part, + bool& added_something) const { if (skin_part.skin_fill.empty()) { @@ -2345,7 +2561,7 @@ void FffGcodeWriter::processTopBottom(const SliceDataStorage& storage, // generate skin_polygons and skin_lines const GCodePathConfig* skin_config = &mesh_config.skin_config; Ratio skin_density = 1.0; - const coord_t skin_overlap = 0; // Skin overlap offset is applied in skin.cpp more overlap might be beneficial for curved bridges, but makes it worse in general. + const coord_t skin_overlap = 0; // Skin overlap offset is applied in skin.cpp more overlap might be beneficial for curved bridges, but makes it worse in general. const bool bridge_settings_enabled = mesh.settings.get("bridge_settings_enabled"); const bool bridge_enable_more_layers = bridge_settings_enabled && mesh.settings.get("bridge_enable_more_layers"); const Ratio support_threshold = bridge_settings_enabled ? mesh.settings.get("bridge_skin_support_threshold") : 0.0_r; @@ -2477,23 +2693,38 @@ void FffGcodeWriter::processTopBottom(const SliceDataStorage& storage, } } const bool monotonic = mesh.settings.get("skin_monotonic"); - processSkinPrintFeature(storage, gcode_layer, mesh, mesh_config, extruder_nr, skin_part.skin_fill, *skin_config, pattern, skin_angle, skin_overlap, skin_density, monotonic, added_something, fan_speed); + processSkinPrintFeature( + storage, + gcode_layer, + mesh, + mesh_config, + extruder_nr, + skin_part.skin_fill, + *skin_config, + pattern, + skin_angle, + skin_overlap, + skin_density, + monotonic, + added_something, + fan_speed); } -void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, - LayerPlan& gcode_layer, - const SliceMeshStorage& mesh, - const PathConfigStorage::MeshPathConfigs& mesh_config, - const size_t extruder_nr, - const Polygons& area, - const GCodePathConfig& config, - EFillMethod pattern, - const AngleDegrees skin_angle, - const coord_t skin_overlap, - const Ratio skin_density, - const bool monotonic, - bool& added_something, - double fan_speed) const +void FffGcodeWriter::processSkinPrintFeature( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const size_t extruder_nr, + const Polygons& area, + const GCodePathConfig& config, + EFillMethod pattern, + const AngleDegrees skin_angle, + const coord_t skin_overlap, + const Ratio skin_density, + const bool monotonic, + bool& added_something, + double fan_speed) const { Polygons skin_polygons; Polygons skin_lines; @@ -2516,29 +2747,30 @@ void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, constexpr int zag_skip_count = 0; constexpr coord_t pocket_size = 0; - Infill infill_comp(pattern, - zig_zaggify_infill, - connect_polygons, - area, - config.getLineWidth(), - config.getLineWidth() / skin_density, - skin_overlap, - infill_multiplier, - skin_angle, - gcode_layer.z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_line_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); + Infill infill_comp( + pattern, + zig_zaggify_infill, + connect_polygons, + area, + config.getLineWidth(), + config.getLineWidth() / skin_density, + skin_overlap, + infill_multiplier, + skin_angle, + gcode_layer.z, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_line_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); infill_comp.generate(skin_paths, skin_polygons, skin_lines, mesh.settings, gcode_layer.getLayerNr(), SectionType::SKIN); // add paths @@ -2554,23 +2786,28 @@ void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, { constexpr bool retract_before_outer_wall = false; constexpr coord_t wipe_dist = 0; - const ZSeamConfig z_seam_config(mesh.settings.get("z_seam_type"), mesh.getZSeamHint(), mesh.settings.get("z_seam_corner"), config.getLineWidth() * 2); - InsetOrderOptimizer wall_orderer(*this, - storage, - gcode_layer, - mesh.settings, - extruder_nr, - mesh_config.skin_config, - mesh_config.skin_config, - mesh_config.skin_config, - mesh_config.skin_config, - retract_before_outer_wall, - wipe_dist, - wipe_dist, - skin_extruder_nr, - skin_extruder_nr, - z_seam_config, - skin_paths); + const ZSeamConfig z_seam_config( + mesh.settings.get("z_seam_type"), + mesh.getZSeamHint(), + mesh.settings.get("z_seam_corner"), + config.getLineWidth() * 2); + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + mesh.settings, + extruder_nr, + mesh_config.skin_config, + mesh_config.skin_config, + mesh_config.skin_config, + mesh_config.skin_config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + skin_extruder_nr, + skin_extruder_nr, + z_seam_config, + skin_paths); added_something |= wall_orderer.addToLayer(); } } @@ -2587,11 +2824,23 @@ void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, const AngleRadians monotonic_direction = AngleRadians(skin_angle); constexpr Ratio flow = 1.0_r; - const coord_t max_adjacent_distance = config.getLineWidth() * 1.1; // Lines are considered adjacent if they are 1 line width apart, with 10% extra play. The monotonic order is enforced if they are adjacent. - if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::CUBIC || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC - || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::LIGHTNING) + const coord_t max_adjacent_distance + = config.getLineWidth() + * 1.1; // Lines are considered adjacent if they are 1 line width apart, with 10% extra play. The monotonic order is enforced if they are adjacent. + if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::CUBIC + || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::LIGHTNING) { - gcode_layer.addLinesMonotonic(area, skin_lines, config, SpaceFillType::Lines, monotonic_direction, max_adjacent_distance, exclude_distance, mesh.settings.get("infill_wipe_dist"), flow, fan_speed); + gcode_layer.addLinesMonotonic( + area, + skin_lines, + config, + SpaceFillType::Lines, + monotonic_direction, + max_adjacent_distance, + exclude_distance, + mesh.settings.get("infill_wipe_dist"), + flow, + fan_speed); } else { @@ -2603,7 +2852,8 @@ void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, else { std::optional near_start_location; - const EFillMethod pattern = (gcode_layer.getLayerNr() == 0) ? mesh.settings.get("top_bottom_pattern_0") : mesh.settings.get("top_bottom_pattern"); + const EFillMethod pattern + = (gcode_layer.getLayerNr() == 0) ? mesh.settings.get("top_bottom_pattern_0") : mesh.settings.get("top_bottom_pattern"); if (pattern == EFillMethod::LINES || pattern == EFillMethod::ZIG_ZAG) { // update near_start_location to a location which tries to avoid seams in skin near_start_location = getSeamAvoidingLocation(area, skin_angle, gcode_layer.getLastPlannedPositionOrStartingPosition()); @@ -2611,10 +2861,18 @@ void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, constexpr bool enable_travel_optimization = false; constexpr float flow = 1.0; - if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::CUBIC || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC - || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::LIGHTNING) + if (pattern == EFillMethod::GRID || pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::CUBIC + || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::LIGHTNING) { - gcode_layer.addLinesByOptimizer(skin_lines, config, SpaceFillType::Lines, enable_travel_optimization, mesh.settings.get("infill_wipe_dist"), flow, near_start_location, fan_speed); + gcode_layer.addLinesByOptimizer( + skin_lines, + config, + SpaceFillType::Lines, + enable_travel_optimization, + mesh.settings.get("infill_wipe_dist"), + flow, + near_start_location, + fan_speed); } else { @@ -2626,7 +2884,12 @@ void FffGcodeWriter::processSkinPrintFeature(const SliceDataStorage& storage, } } -bool FffGcodeWriter::processIroning(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const SliceLayer& layer, const GCodePathConfig& line_config, LayerPlan& gcode_layer) const +bool FffGcodeWriter::processIroning( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const SliceLayer& layer, + const GCodePathConfig& line_config, + LayerPlan& gcode_layer) const { bool added_something = false; const bool ironing_enabled = mesh.settings.get("ironing_enabled"); @@ -2655,8 +2918,8 @@ bool FffGcodeWriter::addSupportToGCode(const SliceDataStorage& storage, LayerPla const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; const size_t support_roof_extruder_nr = mesh_group_settings.get("support_roof_extruder_nr").extruder_nr; const size_t support_bottom_extruder_nr = mesh_group_settings.get("support_bottom_extruder_nr").extruder_nr; - size_t support_infill_extruder_nr = - (gcode_layer.getLayerNr() <= 0) ? mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr : mesh_group_settings.get("support_infill_extruder_nr").extruder_nr; + size_t support_infill_extruder_nr = (gcode_layer.getLayerNr() <= 0) ? mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr + : mesh_group_settings.get("support_infill_extruder_nr").extruder_nr; const SupportLayer& support_layer = storage.support.supportLayers[std::max(0, gcode_layer.getLayerNr())]; if (support_layer.support_bottom.empty() && support_layer.support_roof.empty() && support_layer.support_infill_parts.empty()) @@ -2691,7 +2954,8 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer } const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - const size_t extruder_nr = (gcode_layer.getLayerNr() <= 0) ? mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr : mesh_group_settings.get("support_infill_extruder_nr").extruder_nr; + const size_t extruder_nr = (gcode_layer.getLayerNr() <= 0) ? mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr + : mesh_group_settings.get("support_infill_extruder_nr").extruder_nr; const ExtruderTrain& infill_extruder = Application::getInstance().current_slice->scene.extruders[extruder_nr]; coord_t default_support_line_distance = infill_extruder.settings.get("support_line_distance"); @@ -2779,7 +3043,22 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer constexpr coord_t wipe_dist = 0; const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); InsetOrderOptimizer wall_orderer( - *this, storage, gcode_layer, infill_extruder.settings, extruder_nr, config, config, config, config, retract_before_outer_wall, wipe_dist, wipe_dist, extruder_nr, extruder_nr, z_seam_config, wall_toolpaths); + *this, + storage, + gcode_layer, + infill_extruder.settings, + extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + extruder_nr, + extruder_nr, + z_seam_config, + wall_toolpaths); added_something |= wall_orderer.addToLayer(); } @@ -2804,7 +3083,10 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer } const unsigned int density_factor = 2 << density_idx; // == pow(2, density_idx + 1) - int support_line_distance_here = (part.custom_line_distance > 0 ? part.custom_line_distance : default_support_line_distance * density_factor); // the highest density infill combines with the next to create a grid with density_factor 1 + int support_line_distance_here + = (part.custom_line_distance > 0 + ? part.custom_line_distance + : default_support_line_distance * density_factor); // the highest density infill combines with the next to create a grid with density_factor 1 const int support_shift = support_line_distance_here / 2; if (part.custom_line_distance == 0 && (density_idx == max_density_idx || support_pattern == EFillMethod::CROSS || support_pattern == EFillMethod::CROSS_3D)) { @@ -2813,33 +3095,42 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer const Polygons& area = part.infill_area_per_combine_per_density[density_idx][combine_idx]; constexpr size_t wall_count = 0; // Walls are generated somewhere else, so their layers aren't vertically combined. - const coord_t small_area_width = mesh_group_settings.get("min_even_wall_line_width") * 2; // Maximum width of a region that can still be filled with one wall. + const coord_t small_area_width + = mesh_group_settings.get("min_even_wall_line_width") * 2; // Maximum width of a region that can still be filled with one wall. constexpr bool skip_stitching = false; const bool fill_gaps = density_idx == 0; // Only fill gaps for one of the densities. - Infill infill_comp(support_pattern, - zig_zaggify_infill, - connect_polygons, - area, - support_line_width, - support_line_distance_here, - current_support_infill_overlap - (density_idx == max_density_idx ? 0 : wall_line_count * support_line_width), - infill_multiplier, - support_infill_angle, - gcode_layer.z, - support_shift, - max_resolution, - max_deviation, - wall_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - support_connect_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - infill_comp.generate(wall_toolpaths_here, support_polygons, support_lines, infill_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT, storage.support.cross_fill_provider); + Infill infill_comp( + support_pattern, + zig_zaggify_infill, + connect_polygons, + area, + support_line_width, + support_line_distance_here, + current_support_infill_overlap - (density_idx == max_density_idx ? 0 : wall_line_count * support_line_width), + infill_multiplier, + support_infill_angle, + gcode_layer.z, + support_shift, + max_resolution, + max_deviation, + wall_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + support_connect_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + infill_comp.generate( + wall_toolpaths_here, + support_polygons, + support_lines, + infill_extruder.settings, + gcode_layer.getLayerNr(), + SectionType::SUPPORT, + storage.support.cross_fill_provider); } if (need_travel_to_end_of_last_spiral && infill_extruder.settings.get("magic_spiralize")) @@ -2881,7 +3172,15 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer const std::optional start_near_location = std::optional(); gcode_layer.addPolygonsByOptimizer( - support_polygons, gcode_layer.configs_storage.support_infill_config[combine_idx], z_seam_config, wall_0_wipe_dist, spiralize, flow_ratio, always_retract, alternate_layer_print_direction, start_near_location); + support_polygons, + gcode_layer.configs_storage.support_infill_config[combine_idx], + z_seam_config, + wall_0_wipe_dist, + spiralize, + flow_ratio, + always_retract, + alternate_layer_print_direction, + start_near_location); added_something = true; } @@ -2893,15 +3192,16 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer const std::optional near_start_location = std::optional(); constexpr double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT; - gcode_layer.addLinesByOptimizer(support_lines, - gcode_layer.configs_storage.support_infill_config[combine_idx], - (support_pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines, - enable_travel_optimization, - wipe_dist, - flow_ratio, - near_start_location, - fan_speed, - alternate_layer_print_direction); + gcode_layer.addLinesByOptimizer( + support_lines, + gcode_layer.configs_storage.support_infill_config[combine_idx], + (support_pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + near_start_location, + fan_speed, + alternate_layer_print_direction); added_something = true; } @@ -2914,9 +3214,28 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer constexpr bool retract_before_outer_wall = false; constexpr coord_t wipe_dist = 0; constexpr coord_t simplify_curvature = 0; - const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, simplify_curvature); + const ZSeamConfig z_seam_config( + EZSeamType::SHORTEST, + gcode_layer.getLastPlannedPositionOrStartingPosition(), + EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, + simplify_curvature); InsetOrderOptimizer wall_orderer( - *this, storage, gcode_layer, infill_extruder.settings, extruder_nr, config, config, config, config, retract_before_outer_wall, wipe_dist, wipe_dist, extruder_nr, extruder_nr, z_seam_config, wall_toolpaths_here); + *this, + storage, + gcode_layer, + infill_extruder.settings, + extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + extruder_nr, + extruder_nr, + z_seam_config, + wall_toolpaths_here); added_something |= wall_orderer.addToLayer(); } } @@ -2981,29 +3300,30 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay infill_outline = wall.offset(-support_roof_line_width / 2); } - Infill roof_computation(pattern, - zig_zaggify_infill, - connect_polygons, - infill_outline, - gcode_layer.configs_storage.support_roof_config.getLineWidth(), - support_roof_line_distance, - support_roof_overlap, - infill_multiplier, - fill_angle, - gcode_layer.z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); + Infill roof_computation( + pattern, + zig_zaggify_infill, + connect_polygons, + infill_outline, + gcode_layer.configs_storage.support_roof_config.getLineWidth(), + support_roof_line_distance, + support_roof_overlap, + infill_multiplier, + fill_angle, + gcode_layer.z, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); Polygons roof_polygons; std::vector roof_paths; Polygons roof_lines; @@ -3031,10 +3351,28 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); InsetOrderOptimizer wall_orderer( - *this, storage, gcode_layer, roof_extruder.settings, roof_extruder_nr, config, config, config, config, retract_before_outer_wall, wipe_dist, wipe_dist, roof_extruder_nr, roof_extruder_nr, z_seam_config, roof_paths); + *this, + storage, + gcode_layer, + roof_extruder.settings, + roof_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + roof_extruder_nr, + roof_extruder_nr, + z_seam_config, + roof_paths); wall_orderer.addToLayer(); } - gcode_layer.addLinesByOptimizer(roof_lines, gcode_layer.configs_storage.support_roof_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); + gcode_layer.addLinesByOptimizer( + roof_lines, + gcode_layer.configs_storage.support_roof_config, + (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); return true; } @@ -3078,30 +3416,32 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L const coord_t max_resolution = bottom_extruder.settings.get("meshfix_maximum_resolution"); const coord_t max_deviation = bottom_extruder.settings.get("meshfix_maximum_deviation"); - const coord_t support_bottom_line_distance = bottom_extruder.settings.get("support_bottom_line_distance"); // note: no need to apply initial line width factor; support bottoms cannot exist on the first layer - Infill bottom_computation(pattern, - zig_zaggify_infill, - connect_polygons, - support_layer.support_bottom, - gcode_layer.configs_storage.support_bottom_config.getLineWidth(), - support_bottom_line_distance, - support_bottom_overlap, - infill_multiplier, - fill_angle, - gcode_layer.z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); + const coord_t support_bottom_line_distance = bottom_extruder.settings.get( + "support_bottom_line_distance"); // note: no need to apply initial line width factor; support bottoms cannot exist on the first layer + Infill bottom_computation( + pattern, + zig_zaggify_infill, + connect_polygons, + support_layer.support_bottom, + gcode_layer.configs_storage.support_bottom_config.getLineWidth(), + support_bottom_line_distance, + support_bottom_overlap, + infill_multiplier, + fill_angle, + gcode_layer.z, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); Polygons bottom_polygons; std::vector bottom_paths; Polygons bottom_lines; @@ -3125,10 +3465,28 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); InsetOrderOptimizer wall_orderer( - *this, storage, gcode_layer, bottom_extruder.settings, bottom_extruder_nr, config, config, config, config, retract_before_outer_wall, wipe_dist, wipe_dist, bottom_extruder_nr, bottom_extruder_nr, z_seam_config, bottom_paths); + *this, + storage, + gcode_layer, + bottom_extruder.settings, + bottom_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + bottom_extruder_nr, + bottom_extruder_nr, + z_seam_config, + bottom_paths); wall_orderer.addToLayer(); } - gcode_layer.addLinesByOptimizer(bottom_lines, gcode_layer.configs_storage.support_bottom_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); + gcode_layer.addLinesByOptimizer( + bottom_lines, + gcode_layer.configs_storage.support_bottom_config, + (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); return true; } @@ -3235,7 +3593,7 @@ void FffGcodeWriter::finalize() // set extrusion mode back to "normal" gcode.resetExtrusionMode(); - for (size_t e = 0; e < Application::getInstance().current_slice->scene.extruders.size(); e ++) + for (size_t e = 0; e < Application::getInstance().current_slice->scene.extruders.size(); e++) { gcode.writeTemperatureCommand(e, 0, false); } diff --git a/src/InsetOrderOptimizer.cpp b/src/InsetOrderOptimizer.cpp index e080f43989..46f8c97e44 100644 --- a/src/InsetOrderOptimizer.cpp +++ b/src/InsetOrderOptimizer.cpp @@ -1,16 +1,13 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include "InsetOrderOptimizer.h" + #include "ExtruderTrain.h" #include "FffGcodeWriter.h" -#include "InsetOrderOptimizer.h" #include "LayerPlan.h" #include "utils/views/convert.h" #include "utils/views/dfs.h" -#include - -#include -#include #include #include @@ -26,6 +23,10 @@ #include #include #include +#include + +#include +#include namespace rg = ranges; namespace rv = ranges::views; @@ -33,22 +34,23 @@ namespace rv = ranges::views; namespace cura { -InsetOrderOptimizer::InsetOrderOptimizer(const FffGcodeWriter& gcode_writer, - const SliceDataStorage& storage, - LayerPlan& gcode_layer, - const Settings& settings, - const int extruder_nr, - const GCodePathConfig& inset_0_non_bridge_config, - const GCodePathConfig& inset_X_non_bridge_config, - const GCodePathConfig& inset_0_bridge_config, - const GCodePathConfig& inset_X_bridge_config, - const bool retract_before_outer_wall, - const coord_t wall_0_wipe_dist, - const coord_t wall_x_wipe_dist, - const size_t wall_0_extruder_nr, - const size_t wall_x_extruder_nr, - const ZSeamConfig& z_seam_config, - const std::vector& paths) +InsetOrderOptimizer::InsetOrderOptimizer( + const FffGcodeWriter& gcode_writer, + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const Settings& settings, + const int extruder_nr, + const GCodePathConfig& inset_0_non_bridge_config, + const GCodePathConfig& inset_X_non_bridge_config, + const GCodePathConfig& inset_0_bridge_config, + const GCodePathConfig& inset_X_bridge_config, + const bool retract_before_outer_wall, + const coord_t wall_0_wipe_dist, + const coord_t wall_x_wipe_dist, + const size_t wall_0_extruder_nr, + const size_t wall_x_extruder_nr, + const ZSeamConfig& z_seam_config, + const std::vector& paths) : gcode_writer(gcode_writer) , storage(storage) , gcode_layer(gcode_layer) @@ -94,7 +96,8 @@ bool InsetOrderOptimizer::addToLayer() constexpr bool group_outer_walls = true; // When we alternate walls, also alternate the direction at which the first wall starts in. // On even layers we start with normal direction, on odd layers with inverted direction. - PathOrderOptimizer order_optimizer(gcode_layer.getLastPlannedPositionOrStartingPosition(), z_seam_config, detect_loops, combing_boundary, reverse, order, group_outer_walls); + PathOrderOptimizer + order_optimizer(gcode_layer.getLastPlannedPositionOrStartingPosition(), z_seam_config, detect_loops, combing_boundary, reverse, order, group_outer_walls); for (const auto& line : walls_to_be_added) { @@ -157,7 +160,7 @@ InsetOrderOptimizer::value_type InsetOrderOptimizer::getRegionOrder(const auto& { const auto poly = std::get<1>(locator); const auto line = std::get<0>(locator); - return LineLoc { + return LineLoc{ .line = line, .poly = poly, .area = line->is_closed ? poly.area() : 0.0, @@ -166,7 +169,13 @@ InsetOrderOptimizer::value_type InsetOrderOptimizer::getRegionOrder(const auto& | rg::to_vector; // Sort polygons by increasing area, we are building the graph from the leaves (smallest area) upwards. - rg::sort( locator_view, [](const auto& lhs, const auto& rhs) { return std::abs(lhs) < std::abs(rhs); }, &LineLoc::area); + rg::sort( + locator_view, + [](const auto& lhs, const auto& rhs) + { + return std::abs(lhs) < std::abs(rhs); + }, + &LineLoc::area); // Create a bi-direction directed acyclic graph (Tree). Where polygon B is a child of A if B is inside A. The root of the graph is // the polygon that contains all other polygons. The leaves are polygons that contain no polygons. @@ -209,20 +218,19 @@ InsetOrderOptimizer::value_type InsetOrderOptimizer::getRegionOrder(const auto& // - mark all reachable nodes with their depth from the root // - find hole roots, these are the innermost polygons enclosing a hole { - const std::function initialize_nodes = - [graph, root, &hole_roots, &min_node, &min_depth] - (const auto current_node, const auto depth) - { - min_node[current_node] = root; - min_depth[current_node] = depth; + const std::function initialize_nodes + = [graph, root, &hole_roots, &min_node, &min_depth](const auto current_node, const auto depth) + { + min_node[current_node] = root; + min_depth[current_node] = depth; - // find hole roots (defined by a positive area in clipper1), these are leaves of the tree structure - // as odd walls are also leaves we filter them out by adding a non-zero area check - if (current_node != root && graph.count(current_node) == 1 && current_node->line->is_closed && current_node->area > 0) - { - hole_roots.push_back(current_node); - } - }; + // find hole roots (defined by a positive area in clipper1), these are leaves of the tree structure + // as odd walls are also leaves we filter them out by adding a non-zero area check + if (current_node != root && graph.count(current_node) == 1 && current_node->line->is_closed && current_node->area > 0) + { + hole_roots.push_back(current_node); + } + }; actions::dfs_depth_state(root, graph, initialize_nodes); }; @@ -233,16 +241,14 @@ InsetOrderOptimizer::value_type InsetOrderOptimizer::getRegionOrder(const auto& { for (auto& hole_root : hole_roots) { - const std::function update_nodes = - [hole_root, &min_depth, &min_node] - (const auto& current_node, auto depth) + const std::function update_nodes = [hole_root, &min_depth, &min_node](const auto& current_node, auto depth) + { + if (depth < min_depth[current_node]) { - if (depth < min_depth[current_node]) - { - min_depth[current_node] = depth; - min_node[current_node] = hole_root; - } - }; + min_depth[current_node] = depth; + min_node[current_node] = hole_root; + } + }; actions::dfs_depth_state(hole_root, graph, update_nodes); } @@ -252,22 +258,21 @@ InsetOrderOptimizer::value_type InsetOrderOptimizer::getRegionOrder(const auto& // the depth is closest to root $r$ { const LineLoc* root_ = root; - const std::function set_order_constraints = - [&order, &min_node, &root_, graph, outer_to_inner] - (const auto& current_node, const auto& parent_node) + const std::function set_order_constraints + = [&order, &min_node, &root_, graph, outer_to_inner](const auto& current_node, const auto& parent_node) + { + if (min_node[current_node] == root_ && parent_node != nullptr) { - if (min_node[current_node] == root_ && parent_node != nullptr) - { - if (outer_to_inner) - { - order.insert(std::make_pair(parent_node->line, current_node->line)); - } - else - { - order.insert(std::make_pair(current_node->line, parent_node->line)); - } - } - }; + if (outer_to_inner) + { + order.insert(std::make_pair(parent_node->line, current_node->line)); + } + else + { + order.insert(std::make_pair(current_node->line, parent_node->line)); + } + } + }; actions::dfs_parent_state(root, graph, set_order_constraints); @@ -354,7 +359,7 @@ std::vector InsetOrderOptimizer::getWallsToBeAdded(const bool rev { if (paths.empty()) { - return { }; + return {}; } rg::any_view view; if (reverse) diff --git a/src/SkeletalTrapezoidation.cpp b/src/SkeletalTrapezoidation.cpp index 5c411a4f2d..9d2431bdbe 100644 --- a/src/SkeletalTrapezoidation.cpp +++ b/src/SkeletalTrapezoidation.cpp @@ -3,22 +3,24 @@ #include "SkeletalTrapezoidation.h" -#include -#include -#include -#include -#include - -#include -#include - #include "BoostInterface.hpp" #include "settings/types/Ratio.h" #include "utils/VoronoiUtils.h" #include "utils/linearAlg2D.h" #include "utils/macros.h" -#define SKELETAL_TRAPEZOIDATION_BEAD_SEARCH_MAX 1000 // A limit to how long it'll keep searching for adjacent beads. Increasing will re-use beadings more often (saving performance), but search longer for beading (costing performance). +#include +#include + +#include +#include +#include +#include +#include + +#define SKELETAL_TRAPEZOIDATION_BEAD_SEARCH_MAX \ + 1000 // A limit to how long it'll keep searching for adjacent beads. Increasing will re-use beadings more often (saving performance), but search longer for beading (costing + // performance). namespace cura { @@ -39,7 +41,15 @@ SkeletalTrapezoidation::node_t& SkeletalTrapezoidation::makeNode(vd_t::vertex_ty } } -void SkeletalTrapezoidation::transferEdge(Point from, Point to, vd_t::edge_type& vd_edge, edge_t*& prev_edge, Point& start_source_point, Point& end_source_point, const std::vector& points, const std::vector& segments) +void SkeletalTrapezoidation::transferEdge( + Point from, + Point to, + vd_t::edge_type& vd_edge, + edge_t*& prev_edge, + Point& start_source_point, + Point& end_source_point, + const std::vector& points, + const std::vector& segments) { auto he_edge_it = vd_edge_to_he_edge.find(vd_edge.twin()); if (he_edge_it != vd_edge_to_he_edge.end()) @@ -107,7 +117,8 @@ void SkeletalTrapezoidation::transferEdge(Point from, Point to, vd_t::edge_type& { spdlog::warn("Previous edge doesn't go anywhere."); } - node_t* v0 = (prev_edge) ? prev_edge->to : &makeNode(*vd_edge.vertex0(), from); // TODO: investigate whether boost:voronoi can produce multiple verts and violates consistency + node_t* v0 + = (prev_edge) ? prev_edge->to : &makeNode(*vd_edge.vertex0(), from); // TODO: investigate whether boost:voronoi can produce multiple verts and violates consistency Point p0 = discretized.front(); for (size_t p1_idx = 1; p1_idx < discretized.size(); p1_idx++) { @@ -254,13 +265,14 @@ std::vector SkeletalTrapezoidation::discretize(const vd_t::edge_type& vd_ } -bool SkeletalTrapezoidation::computePointCellRange(vd_t::cell_type& cell, - Point& start_source_point, - Point& end_source_point, - vd_t::edge_type*& starting_vd_edge, - vd_t::edge_type*& ending_vd_edge, - const std::vector& points, - const std::vector& segments) +bool SkeletalTrapezoidation::computePointCellRange( + vd_t::cell_type& cell, + Point& start_source_point, + Point& end_source_point, + vd_t::edge_type*& starting_vd_edge, + vd_t::edge_type*& ending_vd_edge, + const std::vector& points, + const std::vector& segments) { if (cell.incident_edge()->is_infinite()) { @@ -298,7 +310,9 @@ bool SkeletalTrapezoidation::computePointCellRange(vd_t::cell_type& cell, } else { - assert((VoronoiUtils::p(vd_edge->vertex0()) == source_point || ! vd_edge->is_secondary()) && "point cells must end in the point! They cannot cross the point with an edge, because collinear edges are not allowed in the input."); + assert( + (VoronoiUtils::p(vd_edge->vertex0()) == source_point || ! vd_edge->is_secondary()) + && "point cells must end in the point! They cannot cross the point with an edge, because collinear edges are not allowed in the input."); } } while (vd_edge = vd_edge->next(), vd_edge != cell.incident_edge()); assert(starting_vd_edge && ending_vd_edge); @@ -306,13 +320,14 @@ bool SkeletalTrapezoidation::computePointCellRange(vd_t::cell_type& cell, return true; } -void SkeletalTrapezoidation::computeSegmentCellRange(vd_t::cell_type& cell, - Point& start_source_point, - Point& end_source_point, - vd_t::edge_type*& starting_vd_edge, - vd_t::edge_type*& ending_vd_edge, - const std::vector& points, - const std::vector& segments) +void SkeletalTrapezoidation::computeSegmentCellRange( + vd_t::cell_type& cell, + Point& start_source_point, + Point& end_source_point, + vd_t::edge_type*& starting_vd_edge, + vd_t::edge_type*& ending_vd_edge, + const std::vector& points, + const std::vector& segments) { const Segment& source_segment = VoronoiUtils::getSourceSegment(cell, points, segments); Point from = source_segment.from(); @@ -357,15 +372,16 @@ void SkeletalTrapezoidation::computeSegmentCellRange(vd_t::cell_type& cell, end_source_point = source_segment.from(); } -SkeletalTrapezoidation::SkeletalTrapezoidation(const Polygons& polys, - const BeadingStrategy& beading_strategy, - AngleRadians transitioning_angle, - coord_t discretization_step_size, - coord_t transition_filter_dist, - coord_t allowed_filter_deviation, - coord_t beading_propagation_transition_dist, - int layer_idx, - SectionType section_type) +SkeletalTrapezoidation::SkeletalTrapezoidation( + const Polygons& polys, + const BeadingStrategy& beading_strategy, + AngleRadians transitioning_angle, + coord_t discretization_step_size, + coord_t transition_filter_dist, + coord_t allowed_filter_deviation, + coord_t beading_propagation_transition_dist, + int layer_idx, + SectionType section_type) : transitioning_angle(transitioning_angle) , discretization_step_size(discretization_step_size) , transition_filter_dist(transition_filter_dist) @@ -432,7 +448,15 @@ void SkeletalTrapezoidation::constructFromPolygons(const Polygons& polys) // Copy start to end edge to graph edge_t* prev_edge = nullptr; - transferEdge(start_source_point, VoronoiUtils::p(starting_vonoroi_edge->vertex1()), *starting_vonoroi_edge, prev_edge, start_source_point, end_source_point, points, segments); + transferEdge( + start_source_point, + VoronoiUtils::p(starting_vonoroi_edge->vertex1()), + *starting_vonoroi_edge, + prev_edge, + start_source_point, + end_source_point, + points, + segments); node_t* starting_node = vd_node_to_he_node[starting_vonoroi_edge->vertex0()]; starting_node->data.distance_to_boundary = 0; @@ -516,44 +540,164 @@ void SkeletalTrapezoidation::generateToolpaths(std::vector& } updateBeadCount(); - scripta::log("st_graph_0", graph, section_type, layer_idx, - scripta::CellVDI{"is_central", [](const auto& edge){ return static_cast(edge.data.is_central); } }, - scripta::CellVDI{"type", [](const auto& edge){ return static_cast(edge.data.type); } }, - scripta::PointVDI{"distance_to_boundary", [](const auto& node){ return node->data.distance_to_boundary; } }, - scripta::PointVDI{"bead_count", [](const auto& node){ return node->data.bead_count; } }, - scripta::PointVDI{"transition_ratio", [](const auto& node){ return node->data.transition_ratio; } }); + scripta::log( + "st_graph_0", + graph, + section_type, + layer_idx, + scripta::CellVDI{ "is_central", + [](const auto& edge) + { + return static_cast(edge.data.is_central); + } }, + scripta::CellVDI{ "type", + [](const auto& edge) + { + return static_cast(edge.data.type); + } }, + scripta::PointVDI{ "distance_to_boundary", + [](const auto& node) + { + return node->data.distance_to_boundary; + } }, + scripta::PointVDI{ "bead_count", + [](const auto& node) + { + return node->data.bead_count; + } }, + scripta::PointVDI{ "transition_ratio", + [](const auto& node) + { + return node->data.transition_ratio; + } }); filterNoncentralRegions(); - scripta::log("st_graph_1", graph, section_type, layer_idx, - scripta::CellVDI{"is_central", [](const auto& edge){ return static_cast(edge.data.is_central); } }, - scripta::CellVDI{"type", [](const auto& edge){ return static_cast(edge.data.type); } }, - scripta::PointVDI{"distance_to_boundary", [](const auto& node){ return node->data.distance_to_boundary; } }, - scripta::PointVDI{"bead_count", [](const auto& node){ return node->data.bead_count; } }, - scripta::PointVDI{"transition_ratio", [](const auto& node){ return node->data.transition_ratio; } }); + scripta::log( + "st_graph_1", + graph, + section_type, + layer_idx, + scripta::CellVDI{ "is_central", + [](const auto& edge) + { + return static_cast(edge.data.is_central); + } }, + scripta::CellVDI{ "type", + [](const auto& edge) + { + return static_cast(edge.data.type); + } }, + scripta::PointVDI{ "distance_to_boundary", + [](const auto& node) + { + return node->data.distance_to_boundary; + } }, + scripta::PointVDI{ "bead_count", + [](const auto& node) + { + return node->data.bead_count; + } }, + scripta::PointVDI{ "transition_ratio", + [](const auto& node) + { + return node->data.transition_ratio; + } }); generateTransitioningRibs(); - scripta::log("st_graph_2", graph, section_type, layer_idx, - scripta::CellVDI{"is_central", [](const auto& edge){ return static_cast(edge.data.is_central); } }, - scripta::CellVDI{"type", [](const auto& edge){ return static_cast(edge.data.type); } }, - scripta::PointVDI{"distance_to_boundary", [](const auto& node){ return node->data.distance_to_boundary; } }, - scripta::PointVDI{"bead_count", [](const auto& node){ return node->data.bead_count; } }, - scripta::PointVDI{"transition_ratio", [](const auto& node){ return node->data.transition_ratio; } }); + scripta::log( + "st_graph_2", + graph, + section_type, + layer_idx, + scripta::CellVDI{ "is_central", + [](const auto& edge) + { + return static_cast(edge.data.is_central); + } }, + scripta::CellVDI{ "type", + [](const auto& edge) + { + return static_cast(edge.data.type); + } }, + scripta::PointVDI{ "distance_to_boundary", + [](const auto& node) + { + return node->data.distance_to_boundary; + } }, + scripta::PointVDI{ "bead_count", + [](const auto& node) + { + return node->data.bead_count; + } }, + scripta::PointVDI{ "transition_ratio", + [](const auto& node) + { + return node->data.transition_ratio; + } }); generateExtraRibs(); - scripta::log("st_graph_3", graph, section_type, layer_idx, - scripta::CellVDI{"is_central", [](const auto& edge){ return static_cast(edge.data.is_central); } }, - scripta::CellVDI{"type", [](const auto& edge){ return static_cast(edge.data.type); } }, - scripta::PointVDI{"distance_to_boundary", [](const auto& node){ return node->data.distance_to_boundary; } }, - scripta::PointVDI{"bead_count", [](const auto& node){ return node->data.bead_count; } }, - scripta::PointVDI{"transition_ratio", [](const auto& node){ return node->data.transition_ratio; } }); + scripta::log( + "st_graph_3", + graph, + section_type, + layer_idx, + scripta::CellVDI{ "is_central", + [](const auto& edge) + { + return static_cast(edge.data.is_central); + } }, + scripta::CellVDI{ "type", + [](const auto& edge) + { + return static_cast(edge.data.type); + } }, + scripta::PointVDI{ "distance_to_boundary", + [](const auto& node) + { + return node->data.distance_to_boundary; + } }, + scripta::PointVDI{ "bead_count", + [](const auto& node) + { + return node->data.bead_count; + } }, + scripta::PointVDI{ "transition_ratio", + [](const auto& node) + { + return node->data.transition_ratio; + } }); generateSegments(); - scripta::log("st_graph_4", graph, section_type, layer_idx, - scripta::CellVDI{"is_central", [](const auto& edge){ return static_cast(edge.data.is_central); } }, - scripta::CellVDI{"type", [](const auto& edge){ return static_cast(edge.data.type); } }, - scripta::PointVDI{"distance_to_boundary", [](const auto& node){ return node->data.distance_to_boundary; } }, - scripta::PointVDI{"bead_count", [](const auto& node){ return node->data.bead_count; } }, - scripta::PointVDI{"transition_ratio", [](const auto& node){ return node->data.transition_ratio; } }); + scripta::log( + "st_graph_4", + graph, + section_type, + layer_idx, + scripta::CellVDI{ "is_central", + [](const auto& edge) + { + return static_cast(edge.data.is_central); + } }, + scripta::CellVDI{ "type", + [](const auto& edge) + { + return static_cast(edge.data.type); + } }, + scripta::PointVDI{ "distance_to_boundary", + [](const auto& node) + { + return node->data.distance_to_boundary; + } }, + scripta::PointVDI{ "bead_count", + [](const auto& node) + { + return node->data.bead_count; + } }, + scripta::PointVDI{ "transition_ratio", + [](const auto& node) + { + return node->data.transition_ratio; + } }); } void SkeletalTrapezoidation::updateIsCentral() @@ -920,7 +1064,8 @@ void SkeletalTrapezoidation::filterTransitionMids() } } -std::list SkeletalTrapezoidation::dissolveNearbyTransitions(edge_t* edge_to_start, TransitionMiddle& origin_transition, coord_t traveled_dist, coord_t max_dist, bool going_up) +std::list + SkeletalTrapezoidation::dissolveNearbyTransitions(edge_t* edge_to_start, TransitionMiddle& origin_transition, coord_t traveled_dist, coord_t max_dist, bool going_up) { std::list to_be_dissolved; if (traveled_dist > max_dist) @@ -947,7 +1092,9 @@ std::list SkeletalTrapezoidation::diss const coord_t radius_here = edge->from->data.distance_to_boundary; const bool dissolve_result_is_odd = bool(origin_transition.lower_bead_count % 2) == going_up; const coord_t width_deviation = std::abs(origin_radius - radius_here) * 2; // times by two because the deviation happens at both sides of the significant edge - const coord_t line_width_deviation = dissolve_result_is_odd ? width_deviation : width_deviation / 2; // assume the deviation will be split over either 1 or 2 lines, i.e. assume wall_distribution_count = 1 + const coord_t line_width_deviation = dissolve_result_is_odd + ? width_deviation + : width_deviation / 2; // assume the deviation will be split over either 1 or 2 lines, i.e. assume wall_distribution_count = 1 if (line_width_deviation > allowed_filter_deviation) { should_dissolve = false; @@ -974,7 +1121,8 @@ std::list SkeletalTrapezoidation::diss } if (should_dissolve && ! seen_transition_on_this_edge) { - std::list to_be_dissolved_here = dissolveNearbyTransitions(edge, origin_transition, traveled_dist + ab_size, max_dist, going_up); + std::list to_be_dissolved_here + = dissolveNearbyTransitions(edge, origin_transition, traveled_dist + ab_size, max_dist, going_up); if (to_be_dissolved_here.empty()) { // The region is too long to be dissolved in this direction, so it cannot be dissolved in any direction. to_be_dissolved.clear(); @@ -1100,14 +1248,15 @@ void SkeletalTrapezoidation::generateTransitionEnds(edge_t& edge, coord_t mid_po } } -bool SkeletalTrapezoidation::generateTransitionEnd(edge_t& edge, - coord_t start_pos, - coord_t end_pos, - coord_t transition_half_length, - Ratio start_rest, - Ratio end_rest, - coord_t lower_bead_count, - ptr_vector_t>& edge_transition_ends) +bool SkeletalTrapezoidation::generateTransitionEnd( + edge_t& edge, + coord_t start_pos, + coord_t end_pos, + coord_t transition_half_length, + Ratio start_rest, + Ratio end_rest, + coord_t lower_bead_count, + ptr_vector_t>& edge_transition_ends) { Point a = edge.from->p; Point b = edge.to->p; @@ -1299,7 +1448,11 @@ void SkeletalTrapezoidation::applyTransitions(ptr_vector_tp - edge.from->p, discretization_step_size) || edge.from->data.distance_to_boundary >= edge.to->data.distance_to_boundary) + if (! edge.data.isCentral() || shorterThen(edge.to->p - edge.from->p, discretization_step_size) + || edge.from->data.distance_to_boundary >= edge.to->data.distance_to_boundary) { continue; } @@ -1433,34 +1587,35 @@ void SkeletalTrapezoidation::generateSegments() } } - std::sort(upward_quad_mids.begin(), - upward_quad_mids.end(), - [this](edge_t* a, edge_t* b) - { - if (a->to->data.distance_to_boundary == b->to->data.distance_to_boundary) - { // PathOrdering between two 'upward' edges of the same distance is important when one of the edges is flat and connected to the other - if (a->from->data.distance_to_boundary == a->to->data.distance_to_boundary && b->from->data.distance_to_boundary == b->to->data.distance_to_boundary) - { - coord_t max = std::numeric_limits::max(); - coord_t a_dist_from_up = std::min(a->distToGoUp().value_or(max), a->twin->distToGoUp().value_or(max)) - vSize(a->to->p - a->from->p); - coord_t b_dist_from_up = std::min(b->distToGoUp().value_or(max), b->twin->distToGoUp().value_or(max)) - vSize(b->to->p - b->from->p); - return a_dist_from_up < b_dist_from_up; - } - else if (a->from->data.distance_to_boundary == a->to->data.distance_to_boundary) - { - return true; // Edge a might be 'above' edge b - } - else if (b->from->data.distance_to_boundary == b->to->data.distance_to_boundary) - { - return false; // Edge b might be 'above' edge a - } - else - { - // PathOrdering is not important - } - } - return a->to->data.distance_to_boundary > b->to->data.distance_to_boundary; - }); + std::sort( + upward_quad_mids.begin(), + upward_quad_mids.end(), + [this](edge_t* a, edge_t* b) + { + if (a->to->data.distance_to_boundary == b->to->data.distance_to_boundary) + { // PathOrdering between two 'upward' edges of the same distance is important when one of the edges is flat and connected to the other + if (a->from->data.distance_to_boundary == a->to->data.distance_to_boundary && b->from->data.distance_to_boundary == b->to->data.distance_to_boundary) + { + coord_t max = std::numeric_limits::max(); + coord_t a_dist_from_up = std::min(a->distToGoUp().value_or(max), a->twin->distToGoUp().value_or(max)) - vSize(a->to->p - a->from->p); + coord_t b_dist_from_up = std::min(b->distToGoUp().value_or(max), b->twin->distToGoUp().value_or(max)) - vSize(b->to->p - b->from->p); + return a_dist_from_up < b_dist_from_up; + } + else if (a->from->data.distance_to_boundary == a->to->data.distance_to_boundary) + { + return true; // Edge a might be 'above' edge b + } + else if (b->from->data.distance_to_boundary == b->to->data.distance_to_boundary) + { + return false; // Edge b might be 'above' edge a + } + else + { + // PathOrdering is not important + } + } + return a->to->data.distance_to_boundary > b->to->data.distance_to_boundary; + }); ptr_vector_t node_beadings; { // Store beading @@ -1550,8 +1705,10 @@ void SkeletalTrapezoidation::propagateBeadingsUpward(std::vector& upwar { // Only propagate to places where there is place continue; } - assert((upward_edge->from->data.distance_to_boundary != upward_edge->to->data.distance_to_boundary || shorterThen(upward_edge->to->p - upward_edge->from->p, central_filter_dist)) - && "zero difference R edges should always be central"); + assert( + (upward_edge->from->data.distance_to_boundary != upward_edge->to->data.distance_to_boundary + || shorterThen(upward_edge->to->p - upward_edge->from->p, central_filter_dist)) + && "zero difference R edges should always be central"); coord_t length = vSize(upward_edge->to->p - upward_edge->from->p); BeadingPropagation upper_beading = lower_beading; upper_beading.dist_to_bottom_source += length; @@ -1570,7 +1727,8 @@ void SkeletalTrapezoidation::propagateBeadingsDownward(std::vector& upw if (! upward_quad_mid->data.isCentral()) { // for equidistant edge: propagate from known beading to node with unknown beading - if (upward_quad_mid->from->data.distance_to_boundary == upward_quad_mid->to->data.distance_to_boundary && upward_quad_mid->from->data.hasBeading() && ! upward_quad_mid->to->data.hasBeading()) + if (upward_quad_mid->from->data.distance_to_boundary == upward_quad_mid->to->data.distance_to_boundary && upward_quad_mid->from->data.hasBeading() + && ! upward_quad_mid->to->data.hasBeading()) { propagateBeadingsDownward(upward_quad_mid->twin, node_beadings); } @@ -1666,7 +1824,8 @@ SkeletalTrapezoidation::Beading SkeletalTrapezoidation::interpolate(const Beadin // f*(l-r) + r = s // f*(l-r) = s - r // f = (s-r) / (l-r) - float new_ratio = static_cast(switching_radius - right.toolpath_locations[next_inset_idx]) / static_cast(left.toolpath_locations[next_inset_idx] - right.toolpath_locations[next_inset_idx]); + float new_ratio = static_cast(switching_radius - right.toolpath_locations[next_inset_idx]) + / static_cast(left.toolpath_locations[next_inset_idx] - right.toolpath_locations[next_inset_idx]); new_ratio = std::min(1.0, new_ratio + 0.1); return interpolate(left, new_ratio, right); } @@ -1814,12 +1973,17 @@ std::shared_ptr SkeletalTrapezo { edge_t* edge_to; coord_t dist; - DistEdge(edge_t* edge_to, coord_t dist) : edge_to(edge_to), dist(dist) + DistEdge(edge_t* edge_to, coord_t dist) + : edge_to(edge_to) + , dist(dist) { } }; - auto compare = [](const DistEdge& l, const DistEdge& r) -> bool { return l.dist > r.dist; }; + auto compare = [](const DistEdge& l, const DistEdge& r) -> bool + { + return l.dist > r.dist; + }; std::priority_queue, decltype(compare)> further_edges(compare); bool first = true; for (edge_t* outgoing = node->incident_edge; outgoing && (first || outgoing != node->incident_edge); outgoing = outgoing->twin->next) @@ -1864,19 +2028,21 @@ void SkeletalTrapezoidation::addToolpathSegment(const ExtrusionJunction& from, c generated_toolpaths.resize(inset_idx + 1); } assert((generated_toolpaths[inset_idx].empty() || ! generated_toolpaths[inset_idx].back().junctions.empty()) && "empty extrusion lines should never have been generated"); - if (generated_toolpaths[inset_idx].empty() || generated_toolpaths[inset_idx].back().is_odd != is_odd || generated_toolpaths[inset_idx].back().junctions.back().perimeter_index != inset_idx // inset_idx should always be consistent + if (generated_toolpaths[inset_idx].empty() || generated_toolpaths[inset_idx].back().is_odd != is_odd + || generated_toolpaths[inset_idx].back().junctions.back().perimeter_index != inset_idx // inset_idx should always be consistent ) { force_new_path = true; } - if (! force_new_path && shorterThen(generated_toolpaths[inset_idx].back().junctions.back().p - from.p, 10) && std::abs(generated_toolpaths[inset_idx].back().junctions.back().w - from.w) < 10 - && ! from_is_3way // force new path at 3way intersection + if (! force_new_path && shorterThen(generated_toolpaths[inset_idx].back().junctions.back().p - from.p, 10) + && std::abs(generated_toolpaths[inset_idx].back().junctions.back().w - from.w) < 10 && ! from_is_3way // force new path at 3way intersection ) { generated_toolpaths[inset_idx].back().junctions.push_back(to); } - else if (! force_new_path && shorterThen(generated_toolpaths[inset_idx].back().junctions.back().p - to.p, 10) && std::abs(generated_toolpaths[inset_idx].back().junctions.back().w - to.w) < 10 - && ! to_is_3way // force new path at 3way intersection + else if ( + ! force_new_path && shorterThen(generated_toolpaths[inset_idx].back().junctions.back().p - to.p, 10) + && std::abs(generated_toolpaths[inset_idx].back().junctions.back().w - to.w) < 10 && ! to_is_3way // force new path at 3way intersection ) { if (! is_odd) @@ -1973,7 +2139,10 @@ void SkeletalTrapezoidation::connectJunctions(ptr_vector_t& edge_ assert(std::abs(int(from_junctions.size()) - int(to_junctions.size())) <= 1); // at transitions one end has more beads if (std::abs(int(from_junctions.size()) - int(to_junctions.size())) > 1) { - spdlog::warn("Can't create a transition when connecting two perimeters where the number of beads differs too much! {} vs. {}", from_junctions.size(), to_junctions.size()); + spdlog::warn( + "Can't create a transition when connecting two perimeters where the number of beads differs too much! {} vs. {}", + from_junctions.size(), + to_junctions.size()); } size_t segment_count = std::min(from_junctions.size(), to_junctions.size()); diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index a074dce00d..c3ebf1b2ed 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -3,28 +3,28 @@ #ifdef ARCUS -#include //The socket to communicate to. -#include //To sleep while waiting for the connection. -#include //To map settings to their extruder numbers for limit_to_extruder. - -#include -#include +#include "communication/ArcusCommunication.h" #include "Application.h" //To get and set the current slice command. #include "ExtruderTrain.h" #include "FffProcessor.h" //To start a slice. #include "PrintFeature.h" #include "Slice.h" //To process slices. -#include "communication/ArcusCommunication.h" #include "communication/ArcusCommunicationPrivate.h" //Our PIMPL. #include "communication/Listener.h" //To listen to the Arcus socket. #include "communication/SliceDataStruct.h" //To store sliced layer data. +#include "plugins/slots.h" #include "settings/types/LayerIndex.h" //To point to layers. #include "settings/types/Velocity.h" //To send to layer view how fast stuff is printing. #include "utils/channel.h" #include "utils/polygon.h" -#include "plugins/slots.h" +#include //The socket to communicate to. +#include +#include + +#include //To sleep while waiting for the connection. +#include //To map settings to their extruder numbers for limit_to_extruder. namespace cura { @@ -51,7 +51,8 @@ class ArcusCommunication::PathCompiler std::vector line_widths; //!< Line widths for the line segments stored, the size of this vector is N. std::vector line_thicknesses; //!< Line thicknesses for the line segments stored, the size of this vector is N. std::vector line_velocities; //!< Line feedrates for the line segments stored, the size of this vector is N. - std::vector points; //!< The points used to define the line segments, the size of this vector is D*(N+1) as each line segment is defined from one point to the next. D is the dimensionality of the point. + std::vector points; //!< The points used to define the line segments, the size of this vector is D*(N+1) as each line segment is defined from one point to the next. D is + //!< the dimensionality of the point. Point last_point; @@ -285,7 +286,9 @@ class ArcusCommunication::PathCompiler } }; -ArcusCommunication::ArcusCommunication() : private_data(new Private), path_compiler(new PathCompiler(*private_data)) +ArcusCommunication::ArcusCommunication() + : private_data(new Private) + , path_compiler(new PathCompiler(*private_data)) { } @@ -339,7 +342,7 @@ void ArcusCommunication::beginGCode() void ArcusCommunication::flushGCode() { - const std::string& message_str = slots::instance().invoke(private_data->gcode_output_stream.str()); + const std::string& message_str = slots::instance().invoke(private_data->gcode_output_stream.str()); if (message_str.size() == 0) { return; @@ -372,7 +375,7 @@ void ArcusCommunication::sendCurrentPosition(const Point& position) void ArcusCommunication::sendGCodePrefix(const std::string& prefix) const { std::shared_ptr message = std::make_shared(); - message->set_data(slots::instance().invoke(prefix)); + message->set_data(slots::instance().invoke(prefix)); private_data->socket->sendMessage(message); } @@ -426,7 +429,12 @@ void ArcusCommunication::sendOptimizedLayerData() data.slice_data.clear(); } -void ArcusCommunication::sendPolygon(const PrintFeatureType& type, const ConstPolygonRef& polygon, const coord_t& line_width, const coord_t& line_thickness, const Velocity& velocity) +void ArcusCommunication::sendPolygon( + const PrintFeatureType& type, + const ConstPolygonRef& polygon, + const coord_t& line_width, + const coord_t& line_thickness, + const Velocity& velocity) { path_compiler->sendPolygon(type, polygon, line_width, line_thickness, velocity); } diff --git a/src/slicer.cpp b/src/slicer.cpp index 582182da9c..3e2089ed6f 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -1,26 +1,26 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include // remove_if -#include -#include - -#include -#include +#include "slicer.h" #include "Application.h" #include "Slice.h" +#include "plugins/slots.h" #include "settings/AdaptiveLayerHeights.h" #include "settings/EnumSettings.h" #include "settings/types/LayerIndex.h" -#include "slicer.h" #include "utils/Simplify.h" #include "utils/SparsePointGridInclusive.h" #include "utils/ThreadPool.h" #include "utils/gettime.h" #include "utils/section_type.h" -#include "plugins/slots.h" +#include +#include + +#include // remove_if +#include +#include namespace cura { @@ -409,7 +409,8 @@ void SlicerLayer::joinPolylines(PolygonRef& polyline_0, PolygonRef& polyline_1, polyline_1.clear(); } -SlicerLayer::TerminusTrackingMap::TerminusTrackingMap(Terminus::Index end_idx) : m_terminus_old_to_cur_map(end_idx) +SlicerLayer::TerminusTrackingMap::TerminusTrackingMap(Terminus::Index end_idx) + : m_terminus_old_to_cur_map(end_idx) { // Initialize map to everything points to itself since nothing has moved yet. for (size_t idx = 0U; idx != end_idx; ++idx) @@ -419,7 +420,12 @@ SlicerLayer::TerminusTrackingMap::TerminusTrackingMap(Terminus::Index end_idx) : m_terminus_cur_to_old_map = m_terminus_old_to_cur_map; } -void SlicerLayer::TerminusTrackingMap::updateMap(size_t num_terms, const Terminus* cur_terms, const Terminus* next_terms, size_t num_removed_terms, const Terminus* removed_cur_terms) +void SlicerLayer::TerminusTrackingMap::updateMap( + size_t num_terms, + const Terminus* cur_terms, + const Terminus* next_terms, + size_t num_removed_terms, + const Terminus* removed_cur_terms) { // save old locations std::vector old_terms(num_terms); @@ -738,10 +744,12 @@ void SlicerLayer::makePolygons(const Mesh* mesh) connectOpenPolylines(open_polylines); - // TODO: (?) for mesh surface mode: connect open polygons. Maybe the above algorithm can create two open polygons which are actually connected when the starting segment is in the middle between the two open polygons. + // TODO: (?) for mesh surface mode: connect open polygons. Maybe the above algorithm can create two open polygons which are actually connected when the starting segment is in + // the middle between the two open polygons. if (mesh->settings.get("magic_mesh_surface_mode") == ESurfaceMode::NORMAL) - { // don't stitch when using (any) mesh surface mode, i.e. also don't stitch when using mixed mesh surface and closed polygons, because then polylines which are supposed to be open will be closed + { // don't stitch when using (any) mesh surface mode, i.e. also don't stitch when using mixed mesh surface and closed polygons, because then polylines which are supposed to be + // open will be closed stitch(open_polylines); } @@ -769,22 +777,39 @@ void SlicerLayer::makePolygons(const Mesh* mesh) // Remove all the tiny polygons, or polygons that are not closed. As they do not contribute to the actual print. const coord_t snap_distance = std::max(mesh->settings.get("minimum_polygon_circumference"), static_cast(1)); - auto it = std::remove_if(polygons.begin(), polygons.end(), [snap_distance](PolygonRef poly) { return poly.shorterThan(snap_distance); }); + auto it = std::remove_if( + polygons.begin(), + polygons.end(), + [snap_distance](PolygonRef poly) + { + return poly.shorterThan(snap_distance); + }); polygons.erase(it, polygons.end()); // Finally optimize all the polygons. Every point removed saves time in the long run. -// polygons = Simplify(mesh->settings).polygon(polygons); - polygons = slots::instance().invoke(polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); + // polygons = Simplify(mesh->settings).polygon(polygons); + polygons = slots::instance().invoke( + polygons, + mesh->settings.get("meshfix_maximum_resolution"), + mesh->settings.get("meshfix_maximum_deviation"), + static_cast(mesh->settings.get("meshfix_maximum_extrusion_area_deviation"))); polygons.removeDegenerateVerts(); // remove verts connected to overlapping line segments // Clean up polylines for Surface Mode printing - it = std::remove_if(openPolylines.begin(), openPolylines.end(), [snap_distance](PolygonRef poly) { return poly.shorterThan(snap_distance); }); + it = std::remove_if( + openPolylines.begin(), + openPolylines.end(), + [snap_distance](PolygonRef poly) + { + return poly.shorterThan(snap_distance); + }); openPolylines.erase(it, openPolylines.end()); openPolylines.removeDegenerateVertsPolyline(); } -Slicer::Slicer(Mesh* i_mesh, const coord_t thickness, const size_t slice_layer_count, bool use_variable_layer_heights, std::vector* adaptive_layers) : mesh(i_mesh) +Slicer::Slicer(Mesh* i_mesh, const coord_t thickness, const size_t slice_layer_count, bool use_variable_layer_heights, std::vector* adaptive_layers) + : mesh(i_mesh) { const SlicingTolerance slicing_tolerance = mesh->settings.get("slicing_tolerance"); const coord_t initial_layer_thickness = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height_0"); @@ -809,137 +834,143 @@ Slicer::Slicer(Mesh* i_mesh, const coord_t thickness, const size_t slice_layer_c void Slicer::buildSegments(const Mesh& mesh, const std::vector>& zbbox, const SlicingTolerance& slicing_tolerance, std::vector& layers) { - cura::parallel_for(layers, - [&](auto layer_it) - { - SlicerLayer& layer = *layer_it; - const int32_t& z = layer.z; - layer.segments.reserve(100); - - // loop over all mesh faces - for (unsigned int mesh_idx = 0; mesh_idx < mesh.faces.size(); mesh_idx++) - { - if ((z < zbbox[mesh_idx].first) || (z > zbbox[mesh_idx].second)) - { - continue; - } - - // get all vertices per face - const MeshFace& face = mesh.faces[mesh_idx]; - const MeshVertex& v0 = mesh.vertices[face.vertex_index[0]]; - const MeshVertex& v1 = mesh.vertices[face.vertex_index[1]]; - const MeshVertex& v2 = mesh.vertices[face.vertex_index[2]]; - - // get all vertices represented as 3D point - Point3 p0 = v0.p; - Point3 p1 = v1.p; - Point3 p2 = v2.p; - - // Compensate for points exactly on the slice-boundary, except for 'inclusive', which already handles this correctly. - if (slicing_tolerance != SlicingTolerance::INCLUSIVE) - { - p0.z += static_cast(p0.z == z) * -static_cast(p0.z < 1); - p1.z += static_cast(p1.z == z) * -static_cast(p1.z < 1); - p2.z += static_cast(p2.z == z) * -static_cast(p2.z < 1); - } - - SlicerSegment s; - s.endVertex = nullptr; - int end_edge_idx = -1; - - /* - Now see if the triangle intersects the layer, and if so, where. - - Edge cases are important here: - - If all three vertices of the triangle are exactly on the layer, - don't count the triangle at all, because if the model is - watertight, there will be adjacent triangles on all 3 sides that - are not flat on the layer. - - If two of the vertices are exactly on the layer, only count the - triangle if the last vertex is going up. We can't count both - upwards and downwards triangles here, because if the model is - manifold there will always be an adjacent triangle that is going - the other way and you'd get double edges. You would also get one - layer too many if the total model height is an exact multiple of - the layer thickness. Between going up and going down, we need to - choose the triangles going up, because otherwise the first layer - of where the model starts will be empty and the model will float - in mid-air. We'd much rather let the last layer be empty in that - case. - - If only one of the vertices is exactly on the layer, the - intersection between the triangle and the plane would be a point. - We can't print points and with a manifold model there would be - line segments adjacent to the point on both sides anyway, so we - need to discard this 0-length line segment then. - - Vertices in ccw order if look from outside. - */ - - if (p0.z < z && p1.z > z && p2.z > z) // 1_______2 - { // \ / - s = project2D(p0, p2, p1, z); //------------- z - end_edge_idx = 0; // \ / - } // 0 - - else if (p0.z > z && p1.z <= z && p2.z <= z) // 0 - { // / \ . - s = project2D(p0, p1, p2, z); //------------- z - end_edge_idx = 2; // / \ . - if (p2.z == z) // 1_______2 - { - s.endVertex = &v2; - } - } - - else if (p1.z < z && p0.z > z && p2.z > z) // 0_______2 - { // \ / - s = project2D(p1, p0, p2, z); //------------- z - end_edge_idx = 1; // \ / - } // 1 - - else if (p1.z > z && p0.z <= z && p2.z <= z) // 1 - { // / \ . - s = project2D(p1, p2, p0, z); //------------- z - end_edge_idx = 0; // / \ . - if (p0.z == z) // 0_______2 - { - s.endVertex = &v0; - } - } - - else if (p2.z < z && p1.z > z && p0.z > z) // 0_______1 - { // \ / - s = project2D(p2, p1, p0, z); //------------- z - end_edge_idx = 2; // \ / - } // 2 - - else if (p2.z > z && p1.z <= z && p0.z <= z) // 2 - { // / \ . - s = project2D(p2, p0, p1, z); //------------- z - end_edge_idx = 1; // / \ . - if (p1.z == z) // 0_______1 - { - s.endVertex = &v1; - } - } - else - { - // Not all cases create a segment, because a point of a face could create just a dot, and two touching faces - // on the slice would create two segments - continue; - } - - // store the segments per layer - layer.face_idx_to_segment_idx.insert(std::make_pair(mesh_idx, layer.segments.size())); - s.faceIndex = mesh_idx; - s.endOtherFaceIdx = face.connected_face_index[end_edge_idx]; - s.addedToPolygon = false; - layer.segments.push_back(s); - } - }); + cura::parallel_for( + layers, + [&](auto layer_it) + { + SlicerLayer& layer = *layer_it; + const int32_t& z = layer.z; + layer.segments.reserve(100); + + // loop over all mesh faces + for (unsigned int mesh_idx = 0; mesh_idx < mesh.faces.size(); mesh_idx++) + { + if ((z < zbbox[mesh_idx].first) || (z > zbbox[mesh_idx].second)) + { + continue; + } + + // get all vertices per face + const MeshFace& face = mesh.faces[mesh_idx]; + const MeshVertex& v0 = mesh.vertices[face.vertex_index[0]]; + const MeshVertex& v1 = mesh.vertices[face.vertex_index[1]]; + const MeshVertex& v2 = mesh.vertices[face.vertex_index[2]]; + + // get all vertices represented as 3D point + Point3 p0 = v0.p; + Point3 p1 = v1.p; + Point3 p2 = v2.p; + + // Compensate for points exactly on the slice-boundary, except for 'inclusive', which already handles this correctly. + if (slicing_tolerance != SlicingTolerance::INCLUSIVE) + { + p0.z += static_cast(p0.z == z) * -static_cast(p0.z < 1); + p1.z += static_cast(p1.z == z) * -static_cast(p1.z < 1); + p2.z += static_cast(p2.z == z) * -static_cast(p2.z < 1); + } + + SlicerSegment s; + s.endVertex = nullptr; + int end_edge_idx = -1; + + /* + Now see if the triangle intersects the layer, and if so, where. + + Edge cases are important here: + - If all three vertices of the triangle are exactly on the layer, + don't count the triangle at all, because if the model is + watertight, there will be adjacent triangles on all 3 sides that + are not flat on the layer. + - If two of the vertices are exactly on the layer, only count the + triangle if the last vertex is going up. We can't count both + upwards and downwards triangles here, because if the model is + manifold there will always be an adjacent triangle that is going + the other way and you'd get double edges. You would also get one + layer too many if the total model height is an exact multiple of + the layer thickness. Between going up and going down, we need to + choose the triangles going up, because otherwise the first layer + of where the model starts will be empty and the model will float + in mid-air. We'd much rather let the last layer be empty in that + case. + - If only one of the vertices is exactly on the layer, the + intersection between the triangle and the plane would be a point. + We can't print points and with a manifold model there would be + line segments adjacent to the point on both sides anyway, so we + need to discard this 0-length line segment then. + - Vertices in ccw order if look from outside. + */ + + if (p0.z < z && p1.z > z && p2.z > z) // 1_______2 + { // \ / + s = project2D(p0, p2, p1, z); //------------- z + end_edge_idx = 0; // \ / + } // 0 + + else if (p0.z > z && p1.z <= z && p2.z <= z) // 0 + { // / \ . + s = project2D(p0, p1, p2, z); //------------- z + end_edge_idx = 2; // / \ . + if (p2.z == z) // 1_______2 + { + s.endVertex = &v2; + } + } + + else if (p1.z < z && p0.z > z && p2.z > z) // 0_______2 + { // \ / + s = project2D(p1, p0, p2, z); //------------- z + end_edge_idx = 1; // \ / + } // 1 + + else if (p1.z > z && p0.z <= z && p2.z <= z) // 1 + { // / \ . + s = project2D(p1, p2, p0, z); //------------- z + end_edge_idx = 0; // / \ . + if (p0.z == z) // 0_______2 + { + s.endVertex = &v0; + } + } + + else if (p2.z < z && p1.z > z && p0.z > z) // 0_______1 + { // \ / + s = project2D(p2, p1, p0, z); //------------- z + end_edge_idx = 2; // \ / + } // 2 + + else if (p2.z > z && p1.z <= z && p0.z <= z) // 2 + { // / \ . + s = project2D(p2, p0, p1, z); //------------- z + end_edge_idx = 1; // / \ . + if (p1.z == z) // 0_______1 + { + s.endVertex = &v1; + } + } + else + { + // Not all cases create a segment, because a point of a face could create just a dot, and two touching faces + // on the slice would create two segments + continue; + } + + // store the segments per layer + layer.face_idx_to_segment_idx.insert(std::make_pair(mesh_idx, layer.segments.size())); + s.faceIndex = mesh_idx; + s.endOtherFaceIdx = face.connected_face_index[end_edge_idx]; + s.addedToPolygon = false; + layer.segments.push_back(s); + } + }); } -std::vector - Slicer::buildLayersWithHeight(size_t slice_layer_count, SlicingTolerance slicing_tolerance, coord_t initial_layer_thickness, coord_t thickness, bool use_variable_layer_heights, const std::vector* adaptive_layers) +std::vector Slicer::buildLayersWithHeight( + size_t slice_layer_count, + SlicingTolerance slicing_tolerance, + coord_t initial_layer_thickness, + coord_t thickness, + bool use_variable_layer_heights, + const std::vector* adaptive_layers) { std::vector layers_res; @@ -976,7 +1007,12 @@ std::vector void Slicer::makePolygons(Mesh& mesh, SlicingTolerance slicing_tolerance, std::vector& layers) { - cura::parallel_for(layers, [&mesh](auto layer_it) { layer_it->makePolygons(&mesh); }); + cura::parallel_for( + layers, + [&mesh](auto layer_it) + { + layer_it->makePolygons(&mesh); + }); switch (slicing_tolerance) { @@ -1000,8 +1036,8 @@ void Slicer::makePolygons(Mesh& mesh, SlicingTolerance slicing_tolerance, std::v } size_t layer_apply_initial_xy_offset = 0; - if (layers.size() > 0 && layers[0].polygons.size() == 0 && ! mesh.settings.get("support_mesh") && ! mesh.settings.get("anti_overhang_mesh") && ! mesh.settings.get("cutting_mesh") - && ! mesh.settings.get("infill_mesh")) + if (layers.size() > 0 && layers[0].polygons.size() == 0 && ! mesh.settings.get("support_mesh") && ! mesh.settings.get("anti_overhang_mesh") + && ! mesh.settings.get("cutting_mesh") && ! mesh.settings.get("infill_mesh")) { layer_apply_initial_xy_offset = 1; } @@ -1014,8 +1050,7 @@ void Slicer::makePolygons(Mesh& mesh, SlicingTolerance slicing_tolerance, std::v const auto max_hole_area = std::numbers::pi / 4 * static_cast(hole_offset_max_diameter * hole_offset_max_diameter); - cura::parallel_for - ( + cura::parallel_for( 0, layers.size(), [&layers, layer_apply_initial_xy_offset, xy_offset, xy_offset_0, xy_offset_hole, hole_offset_max_diameter, max_hole_area](size_t layer_nr) @@ -1064,8 +1099,7 @@ void Slicer::makePolygons(Mesh& mesh, SlicingTolerance slicing_tolerance, std::v layers[layer_nr].polygons.add(outline.difference(holes.unionPolygons())); } } - } - ); + }); mesh.expandXY(xy_offset); } diff --git a/src/utils/channel.cpp b/src/utils/channel.cpp index cc04e25834..2dbe8fca23 100644 --- a/src/utils/channel.cpp +++ b/src/utils/channel.cpp @@ -3,41 +3,40 @@ #include "utils/channel.h" +#include "utils/resources/certificate.pem.h" + #include #include -#include "utils/resources/certificate.pem.h" - namespace cura::utils { - namespace details - { - inline constexpr static bool ALLOW_REMOTE_CHANNELS = ENABLE_REMOTE_PLUGINS; - } // namespace details +namespace details +{ +inline constexpr static bool ALLOW_REMOTE_CHANNELS = ENABLE_REMOTE_PLUGINS; +} // namespace details - std::shared_ptr createChannel(const ChannelSetupConfiguration& config) +std::shared_ptr createChannel(const ChannelSetupConfiguration& config) +{ + constexpr auto create_credentials = [](const ChannelSetupConfiguration& config) { - constexpr auto create_credentials = - [](const ChannelSetupConfiguration& config) - { - if (config.host == "localhost" || config.host == "127.0.0.1") - { - spdlog::info("Create local channel on port {}.", config.port); - return grpc::InsecureChannelCredentials(); - } - if (details::ALLOW_REMOTE_CHANNELS) - { - spdlog::info("Create local channel on port {}.", config.port); - auto creds_config = grpc::SslCredentialsOptions(); - creds_config.pem_root_certs = resources::certificate; - return grpc::SslCredentials(creds_config); - } - // Create empty credentials, so it'll make a dummy channel where all operations fail. - // This is consistent with creating a channel with the wrong credentials as it where. - spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", config.host, config.port); - return std::shared_ptr(); - }; - return grpc::CreateChannel(fmt::format("{}:{}", config.host, config.port), create_credentials(config)); - } + if (config.host == "localhost" || config.host == "127.0.0.1") + { + spdlog::info("Create local channel on port {}.", config.port); + return grpc::InsecureChannelCredentials(); + } + if (details::ALLOW_REMOTE_CHANNELS) + { + spdlog::info("Create local channel on port {}.", config.port); + auto creds_config = grpc::SslCredentialsOptions(); + creds_config.pem_root_certs = resources::certificate; + return grpc::SslCredentials(creds_config); + } + // Create empty credentials, so it'll make a dummy channel where all operations fail. + // This is consistent with creating a channel with the wrong credentials as it where. + spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", config.host, config.port); + return std::shared_ptr(); + }; + return grpc::CreateChannel(fmt::format("{}:{}", config.host, config.port), create_credentials(config)); +} } // namespace cura::utils From 08cdbc04c8ab3346489a2b2f7ecffa08cfd49099 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 20 Jul 2023 12:10:36 +0200 Subject: [PATCH 134/470] Add missing include CURA-10475 --- include/plugins/broadcasts.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h index 256edc7d37..341405fb4c 100644 --- a/include/plugins/broadcasts.h +++ b/include/plugins/broadcasts.h @@ -8,6 +8,8 @@ #include "utils/types/char_range_literal.h" #include "utils/types/generic.h" +#include + namespace cura::plugins::details { From 355bccbf46c7b3c4cb0aa629770b408ba6529fbd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 20 Jul 2023 12:54:08 +0200 Subject: [PATCH 135/470] Add boost and (a)grpc includes to prio 2 CURA-10475 --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 4196ee4bd5..5d90caa166 100644 --- a/.clang-format +++ b/.clang-format @@ -59,7 +59,7 @@ ForEachMacros: IncludeBlocks: Regroup IncludeCategories: - Priority: 2 - Regex: ^<(scripta|spdlog|range|fmt|Arcus)/ + Regex: ^<(scripta|spdlog|range|fmt|Arcus|agrpc|grpc|boost)/ - Priority: 3 Regex: ^(<|"(gtest|gmock|isl|json)/) - Priority: 1 From d3c032455c111499c2c140f00e6f1ccc4a5e35aa Mon Sep 17 00:00:00 2001 From: jellespijker Date: Fri, 21 Jul 2023 10:42:46 +0000 Subject: [PATCH 136/470] Applied clang-format. --- include/plugins/pluginproxy.h | 10 +++++----- include/plugins/slotproxy.h | 1 + src/Application.cpp | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index b70e5482a9..58fcb956ea 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -17,17 +17,17 @@ #include "utils/types/char_range_literal.h" #include "utils/types/generic.h" -#include -#include -#include -#include - #include #include #include #include #include #include +#include +#include +#include +#include + #include #include #include diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index c674ef48f6..2482e23dd9 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -11,6 +11,7 @@ #include "utils/types/char_range_literal.h" #include + #include #include #include diff --git a/src/Application.cpp b/src/Application.cpp index acd28f0007..0074940150 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -11,6 +11,8 @@ #include "utils/ThreadPool.h" #include "utils/string.h" //For stringcasecompare. +#include //For generating a UUID. +#include //For generating a UUID. #include #include #include @@ -20,8 +22,6 @@ #include #include -#include //For generating a UUID. -#include //For generating a UUID. #include #include #include From ea0cb69f6a3754f8a3b908ed4afef07266ee091c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 11:06:44 +0200 Subject: [PATCH 137/470] Update gRPC definitions Conform agreed upon naming scheme CURA-10805 --- Cura.proto | 6 +++++- conanfile.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cura.proto b/Cura.proto index b97e7f0f24..4942f9c5ce 100644 --- a/Cura.proto +++ b/Cura.proto @@ -8,8 +8,12 @@ message ObjectList repeated Setting settings = 2; // meshgroup settings (for one-at-a-time printing) } +// Resevered IDs: +// 0 ... 99: Broadcasts +// 100 ... 199: Modify +// 200 ... 299: Generate enum SlotID { - BROADCAST_SETTINGS = 0; + SETTINGS_BROADCAST = 0; SIMPLIFY_MODIFY = 100; POSTPROCESS_MODIFY = 101; INFILL_MODIFY = 102; diff --git a/conanfile.py b/conanfile.py index db6341e9d0..950187552b 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10805") # TODO: point to `testing` once the CURA-10805 is merged to CURA-10475 def generate(self): deps = CMakeDeps(self) From e058c19bb031bf6ab85bd3467790f2c6d14a601d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 11:13:10 +0200 Subject: [PATCH 138/470] Use SlotID to determine broadcast channel Move type_trait is_broadcast_channel out of generic types to broadcast.h, since this is very plugin specific and otherwise the slot_id.pb.h will gets pulled in in a lot of irrelevant locations. CURA-10805 --- include/plugins/broadcasts.h | 22 ++++++++++++++++------ include/utils/types/generic.h | 20 -------------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h index 341405fb4c..dd0ab746f8 100644 --- a/include/plugins/broadcasts.h +++ b/include/plugins/broadcasts.h @@ -4,25 +4,35 @@ #ifndef PLUGINS_BROADCAST_H #define PLUGINS_BROADCAST_H +#include "cura/plugins/v0/slot_id.pb.h" #include "plugins/converters.h" -#include "utils/types/char_range_literal.h" -#include "utils/types/generic.h" #include +#include + namespace cura::plugins::details { -template -requires utils::is_broadcast_channel_v +template +struct is_broadcast_channel +{ + inline static constexpr bool value{ T1 == T2 }; +}; + +template +inline constexpr bool is_broadcast_channel_v = is_broadcast_channel::value; + +template +requires is_broadcast_channel_v constexpr auto broadcast_message_factory(auto&&... args) { return broadcast_settings_request{}(std::forward(args)...); }; -template -requires utils::is_broadcast_channel_v +template +requires is_broadcast_channel_v constexpr auto broadcast_factory() { return agrpc::RPC<&Stub::PrepareAsyncBroadcastSettings>{}; diff --git a/include/utils/types/generic.h b/include/utils/types/generic.h index 73e176d996..22858a5fdb 100644 --- a/include/utils/types/generic.h +++ b/include/utils/types/generic.h @@ -4,13 +4,10 @@ #ifndef CURAENGINE_GENERIC_H #define CURAENGINE_GENERIC_H -#include "utils/types/char_range_literal.h" - #include #include #include -#include #include namespace cura::utils @@ -30,23 +27,6 @@ concept grpc_convertable = requires(T value) requires ranges::semiregular; }; -template -class is_broadcast_channel -{ - inline static constexpr bool value_() noexcept - { - constexpr std::string_view t1{ T1.value }; - constexpr std::string_view t2{ T2.value }; - return t1.compare(t2) == 0; - } - -public: - inline static constexpr bool value = value_(); -}; - -template -inline constexpr bool is_broadcast_channel_v = is_broadcast_channel::value; - #ifdef OLDER_APPLE_CLANG // std::integral and std::floating_point are not implemented in older Apple Clang versions < 13 From 36ad04336c65796ddf44e8ab388f377e5a9d9b00 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 11:14:58 +0200 Subject: [PATCH 139/470] Store broadcast subscriptions as slotid See also: https://github.com/Ultimaker/CuraEngine_grpc_defintions/commit/443d8c325a7a90a817f25815a077f64e2591ae67 CURA-10805 --- include/plugins/converters.h | 2 +- include/plugins/metadata.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 5260d33731..f7fd3d050f 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -133,7 +133,7 @@ struct handshake_response .plugin_name = message.plugin_name(), .plugin_version = message.plugin_version(), .peer = std::string{ peer }, - .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; + .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; } }; diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index 7f8b11062a..fadc807d77 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -4,6 +4,7 @@ #ifndef CURAENGINE_INCLUDE_PLUGINS_METADATA_H #define CURAENGINE_INCLUDE_PLUGINS_METADATA_H +#include "cura/plugins/v0/slot_id.pb.h" #include "plugins/types.h" #include @@ -21,7 +22,7 @@ struct plugin_metadata std::string plugin_name; std::string plugin_version; std::string peer; - std::set broadcast_subscriptions; + std::set broadcast_subscriptions; }; struct slot_metadata From 26fb899cf00f39a700fcb2188ec326c08c498629 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 11:54:37 +0200 Subject: [PATCH 140/470] Change plugin broadcast to use SlotID and add dedicated broadcast slot Broadcasting in plugins has been refactored to use `v0::SlotID` instead of `utils::CharRangeLiteral BroadcastChannel`. This provides better clarity and consistency across the system. A new dedicated broadcast slot, `slot_settings_broadcast`, has also been added for dedicated setting broadcasting purposes. This will allow for plugins with a pure virtual listing functionality. These broadcast slot(s) currently have a modify functionality which is never used. I will still need to change this later on, probably need to do that with some polymorphism adding functionality for Broadcast, Modify, Generate, for each slot. This is probably best done with a CRTP pattern Contributes to CURA-10805 --- include/plugins/pluginproxy.h | 12 ++++++------ include/plugins/slotproxy.h | 6 ++++-- include/plugins/slots.h | 15 +++++++++++---- src/communication/ArcusCommunication.cpp | 5 ++++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 58fcb956ea..20c8e6711c 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -194,10 +194,10 @@ class PluginProxy return ret_value; } - template + template void broadcast(auto&&... args) { - if (! plugin_info_->broadcast_subscriptions.contains(BroadcastChannel.value)) + if (! plugin_info_->broadcast_subscriptions.contains(S)) { return; } @@ -208,7 +208,7 @@ class PluginProxy grpc_context, [this, &grpc_context, &status, &args...]() { - return this->broadcastCall(grpc_context, status, std::forward(args)...); + return this->broadcastCall(grpc_context, status, std::forward(args)...); }, boost::asio::detached); grpc_context.run(); @@ -263,14 +263,14 @@ class PluginProxy co_return; } - template + template boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) { grpc::ClientContext client_context{}; prep_client_context(client_context); - auto broadcaster{ details::broadcast_factory() }; - auto request = details::broadcast_message_factory(std::forward(args)...); + auto broadcaster{ details::broadcast_factory() }; + auto request = details::broadcast_message_factory(std::forward(args)...); auto response = google::protobuf::Empty{}; status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); co_return; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 2482e23dd9..bfeb65d3b3 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -44,6 +44,8 @@ class SlotProxy std::optional plugin_{ std::nullopt }; public: + static constexpr plugins::v0::SlotID slot_id{ SlotID }; + /** * @brief Default constructor. * @@ -81,12 +83,12 @@ class SlotProxy return std::invoke(default_process, std::forward(args)...); } - template + template void broadcast(auto&&... args) { if (plugin_.has_value()) { - plugin_.value().template broadcast(std::forward(args)...); + plugin_.value().template broadcast(std::forward(args)...); } } }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 0117ccc7c0..7e7c707445 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -4,6 +4,7 @@ #ifndef PLUGINS_SLOTS_H #define PLUGINS_SLOTS_H +#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" @@ -62,6 +63,10 @@ template using slot_postprocess_ = SlotProxy; +template +using slot_settings_broadcast_ + = SlotProxy; + template struct Typelist { @@ -101,11 +106,11 @@ class Registry, Unit> : public Registry get_type().proxy = Tp{ std::forward(std::move(plugin)) }; } - template + template void broadcast(auto&&... args) { - value_.proxy.template broadcast(std::forward(args)...); - Base::value_.proxy.template broadcast(std::forward(args)...); + value_.proxy.template broadcast(std::forward(args)...); + // TODO: traverse the types and broadcast over each slot } protected: @@ -147,6 +152,7 @@ class SingletonRegistry template struct Holder { + using value_type = T; T proxy; }; @@ -154,8 +160,9 @@ struct Holder using slot_simplify = details::slot_simplify_; using slot_postprocess = details::slot_postprocess_<>; +using slot_settings_broadcast = details::slot_settings_broadcast_<>; -using SlotTypes = details::Typelist; +using SlotTypes = details::Typelist; } // namespace plugins using slots = plugins::details::SingletonRegistry; diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index c3ebf1b2ed..b912be239a 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -523,6 +523,9 @@ void ArcusCommunication::sliceNext() { switch (plugin.id()) { + case cura::proto::SlotID::SETTINGS_BROADCAST: + slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); + break; case cura::proto::SlotID::SIMPLIFY_MODIFY: slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); break; @@ -544,7 +547,7 @@ void ArcusCommunication::sliceNext() private_data->readExtruderSettingsMessage(slice_message->extruders()); // Broadcast the settings to the plugins - slots::instance().broadcast<"BroadcastSettings">(*slice_message); + slots::instance().broadcast(*slice_message); const size_t extruder_count = slice.scene.extruders.size(); // For each setting, register what extruder it should be obtained from (if this is limited to an extruder). From 2ef44a040dad2bb028ab93b9a832f4c62266ea59 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 12:01:55 +0200 Subject: [PATCH 141/470] Renamed operator() method to modify in plugin proxies The operator() method was unclear in its intentions and use when applied to processing plugin proxies. It's been renamed to 'modify', making it clear that it's purpose is to alter or modify the input parameters passed to the plugin. This affects all references to these proxies within the code, improving overall readability. Contribute to CURA-10805 --- benchmark/simplify_benchmark.h | 4 ++-- include/plugins/pluginproxy.h | 2 +- include/plugins/slotproxy.h | 4 ++-- include/plugins/slots.h | 4 ++-- src/communication/ArcusCommunication.cpp | 4 ++-- src/slicer.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index b5e6d79b0c..5c91874a97 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -64,7 +64,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } @@ -89,7 +89,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = slots::instance().invoke(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 20c8e6711c..25ac9ac433 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -168,7 +168,7 @@ class PluginProxy * * @throws std::runtime_error if communication with the plugin fails. */ - value_type operator()(auto&&... args) + value_type modify(auto&&... args) { agrpc::GrpcContext grpc_context; value_type ret_value{}; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index bfeb65d3b3..8d6f818009 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -74,11 +74,11 @@ class SlotProxy * @param args The arguments for the plugin request. * @return The result of the plugin request or the default behavior. */ - auto operator()(auto&&... args) + constexpr auto modify(auto&&... args) { if (plugin_.has_value()) { - return std::invoke(plugin_.value(), std::forward(args)...); + return plugin_.value().modify(std::forward(args)...); } return std::invoke(default_process, std::forward(args)...); } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 7e7c707445..1d30e69172 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -95,9 +95,9 @@ class Registry, Unit> : public Registry } template - constexpr auto invoke(auto&&... args) + constexpr auto modify(auto&&... args) { - return std::invoke(get(), std::forward(args)...); + return get().modify(std::forward(args)...); } template diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index b912be239a..c1ffa1410c 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -342,7 +342,7 @@ void ArcusCommunication::beginGCode() void ArcusCommunication::flushGCode() { - const std::string& message_str = slots::instance().invoke(private_data->gcode_output_stream.str()); + const std::string& message_str = slots::instance().modify(private_data->gcode_output_stream.str()); if (message_str.size() == 0) { return; @@ -375,7 +375,7 @@ void ArcusCommunication::sendCurrentPosition(const Point& position) void ArcusCommunication::sendGCodePrefix(const std::string& prefix) const { std::shared_ptr message = std::make_shared(); - message->set_data(slots::instance().invoke(prefix)); + message->set_data(slots::instance().modify(prefix)); private_data->socket->sendMessage(message); } diff --git a/src/slicer.cpp b/src/slicer.cpp index 3e2089ed6f..f02003e925 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -788,7 +788,7 @@ void SlicerLayer::makePolygons(const Mesh* mesh) // Finally optimize all the polygons. Every point removed saves time in the long run. // polygons = Simplify(mesh->settings).polygon(polygons); - polygons = slots::instance().invoke( + polygons = slots::instance().modify( polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), From ddd70d0d22df09913c94c9557b9ba591ad9dac5f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 23 Jul 2023 13:50:17 +0200 Subject: [PATCH 142/470] Add termination condition for traversing broadcast calls Added the 'broadcast' method to the 'Registry' class to enable broadcasting over each slot, addressing a previous TODO comment. This change allows the slot-based functionality to traverse various types and perform actions accordingly. Please note that this hides a non-virtual function from struct 'Registry, Unit>' Contribute to CURA-10805 --- include/plugins/slots.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 1d30e69172..5284f12df4 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -78,6 +78,9 @@ class Registry; template class Unit> class Registry, Unit> { +public: + template + void broadcast(auto&&... args) {} // Base case, do nothing }; template class Unit> @@ -86,6 +89,7 @@ class Registry, Unit> : public Registry public: using ValueType = T; using Base = Registry, Unit>; + using Base::broadcast; friend Base; template @@ -110,7 +114,7 @@ class Registry, Unit> : public Registry void broadcast(auto&&... args) { value_.proxy.template broadcast(std::forward(args)...); - // TODO: traverse the types and broadcast over each slot + Base::template broadcast(std::forward(args)...); } protected: From 7f5a2f0997b0dbc8f45d9c4c02c2b809eb7ff7d3 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Sun, 23 Jul 2023 11:50:51 +0000 Subject: [PATCH 143/470] Applied clang-format. --- include/plugins/slots.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 5284f12df4..80613cad1b 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -80,7 +80,9 @@ class Registry, Unit> { public: template - void broadcast(auto&&... args) {} // Base case, do nothing + void broadcast(auto&&... args) + { + } // Base case, do nothing }; template class Unit> From a2906ee0835fcc2ebf4b9b6f92e71201571c063d Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 25 Jul 2023 14:45:15 +0200 Subject: [PATCH 144/470] Add plugin value to infill pattern enum type CURA-10720 --- include/settings/EnumSettings.h | 1 + src/settings/Settings.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/settings/EnumSettings.h b/include/settings/EnumSettings.h index 42818beb5b..bb289c4e8a 100644 --- a/include/settings/EnumSettings.h +++ b/include/settings/EnumSettings.h @@ -27,6 +27,7 @@ enum class EFillMethod CROSS_3D, GYROID, LIGHTNING, + PLUGIN, NONE // NOTE: Should remain last! (May be used in testing to enumarate the enum.) }; diff --git a/src/settings/Settings.cpp b/src/settings/Settings.cpp index 56ddaa26ef..f2781cb5a3 100644 --- a/src/settings/Settings.cpp +++ b/src/settings/Settings.cpp @@ -443,6 +443,9 @@ EFillMethod Settings::get(const std::string& key) const { return EFillMethod::LIGHTNING; } + else if (value.rfind("PLUGIN", 0) == 0) { + return EFillMethod::PLUGIN; + } else // Default. { return EFillMethod::NONE; From 57ef7a951def046598df0fa26de123006db19844 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 25 Jul 2023 12:46:05 +0000 Subject: [PATCH 145/470] Applied clang-format. --- include/settings/EnumSettings.h | 126 ++++++++++++++++---------------- src/settings/Settings.cpp | 48 ++++++------ 2 files changed, 90 insertions(+), 84 deletions(-) diff --git a/include/settings/EnumSettings.h b/include/settings/EnumSettings.h index bb289c4e8a..b594854f2a 100644 --- a/include/settings/EnumSettings.h +++ b/include/settings/EnumSettings.h @@ -1,5 +1,5 @@ -//Copyright (c) 2021 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2021 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef ENUMSETTINGS_H #define ENUMSETTINGS_H @@ -28,7 +28,7 @@ enum class EFillMethod GYROID, LIGHTNING, PLUGIN, - NONE // NOTE: Should remain last! (May be used in testing to enumarate the enum.) + NONE // NOTE: Should remain last! (May be used in testing to enumarate the enum.) }; /*! @@ -116,8 +116,8 @@ enum class CombingMode */ enum class DraftShieldHeightLimitation { - FULL, //Draft shield takes full height of the print. - LIMITED //Draft shield is limited by draft_shield_height setting. + FULL, // Draft shield takes full height of the print. + LIMITED // Draft shield is limited by draft_shield_height setting. }; enum class SupportDistPriority @@ -138,74 +138,74 @@ enum class SlicingTolerance */ enum class EGCodeFlavor { -/** - * Marlin flavored GCode is Marlin/Sprinter based GCode. - * This is the most commonly used GCode set. - * G0 for moves, G1 for extrusion. - * E values give mm of filament extrusion. - * Retraction is done on E values with G1. Start/end code is added. - * M106 Sxxx and M107 are used to turn the fan on/off. - **/ + /** + * Marlin flavored GCode is Marlin/Sprinter based GCode. + * This is the most commonly used GCode set. + * G0 for moves, G1 for extrusion. + * E values give mm of filament extrusion. + * Retraction is done on E values with G1. Start/end code is added. + * M106 Sxxx and M107 are used to turn the fan on/off. + **/ MARLIN = 0, -/** - * UltiGCode flavored is Marlin based GCode. - * UltiGCode uses less settings on the slicer and puts more settings in the firmware. This makes for more hardware/material independed GCode. - * G0 for moves, G1 for extrusion. - * E values give mm^3 of filament extrusion. Ignores the filament diameter setting. - * Retraction is done with G10 and G11. Retraction settings are ignored. G10 S1 is used for multi-extruder switch retraction. - * Start/end code is not added. - * M106 Sxxx and M107 are used to turn the fan on/off. - **/ + /** + * UltiGCode flavored is Marlin based GCode. + * UltiGCode uses less settings on the slicer and puts more settings in the firmware. This makes for more hardware/material independed GCode. + * G0 for moves, G1 for extrusion. + * E values give mm^3 of filament extrusion. Ignores the filament diameter setting. + * Retraction is done with G10 and G11. Retraction settings are ignored. G10 S1 is used for multi-extruder switch retraction. + * Start/end code is not added. + * M106 Sxxx and M107 are used to turn the fan on/off. + **/ ULTIGCODE = 1, -/** - * Makerbot flavored GCode. - * Looks a lot like RepRap GCode with a few changes. Requires MakerWare to convert to X3G files. - * Heating needs to be done with M104 Sxxx T0 - * No G21 or G90 - * Fan ON is M126 T0 (No fan strength control?) - * Fan OFF is M127 T0 - * Homing is done with G162 X Y F2000 - **/ + /** + * Makerbot flavored GCode. + * Looks a lot like RepRap GCode with a few changes. Requires MakerWare to convert to X3G files. + * Heating needs to be done with M104 Sxxx T0 + * No G21 or G90 + * Fan ON is M126 T0 (No fan strength control?) + * Fan OFF is M127 T0 + * Homing is done with G162 X Y F2000 + **/ MAKERBOT = 2, -/** - * Bits From Bytes GCode. - * BFB machines use RPM instead of E. Which is coupled to the F instead of independed. (M108 S[deciRPM]) - * Need X,Y,Z,F on every line. - * Needs extruder ON/OFF (M101, M103), has auto-retrection (M227 S[2560*mm] P[2560*mm]) - **/ + /** + * Bits From Bytes GCode. + * BFB machines use RPM instead of E. Which is coupled to the F instead of independed. (M108 S[deciRPM]) + * Need X,Y,Z,F on every line. + * Needs extruder ON/OFF (M101, M103), has auto-retrection (M227 S[2560*mm] P[2560*mm]) + **/ BFB = 3, -/** - * MACH3 GCode - * MACH3 is CNC control software, which expects A/B/C/D for extruders, instead of E. - **/ + /** + * MACH3 GCode + * MACH3 is CNC control software, which expects A/B/C/D for extruders, instead of E. + **/ MACH3 = 4, -/** - * RepRap volumatric flavored GCode is Marlin based GCode. - * Volumatric uses less settings on the slicer and puts more settings in the firmware. This makes for more hardware/material independed GCode. - * G0 for moves, G1 for extrusion. - * E values give mm^3 of filament extrusion. Ignores the filament diameter setting. - * Retraction is done with G10 and G11. Retraction settings are ignored. G10 S1 is used for multi-extruder switch retraction. - * M106 Sxxx and M107 are used to turn the fan on/off. - **/ + /** + * RepRap volumatric flavored GCode is Marlin based GCode. + * Volumatric uses less settings on the slicer and puts more settings in the firmware. This makes for more hardware/material independed GCode. + * G0 for moves, G1 for extrusion. + * E values give mm^3 of filament extrusion. Ignores the filament diameter setting. + * Retraction is done with G10 and G11. Retraction settings are ignored. G10 S1 is used for multi-extruder switch retraction. + * M106 Sxxx and M107 are used to turn the fan on/off. + **/ MARLIN_VOLUMATRIC = 5, -/** - * Griffin flavored is Marlin based GCode. - * This is a type of RepRap used for machines with multiple extruder trains. - * G0 for moves, G1 for extrusion. - * E values give mm of filament extrusion. - * E values are stored separately per extruder train. - * Retraction is done on E values with G1. Start/end code is added. - * M227 is used to initialize a single extrusion train. - **/ + /** + * Griffin flavored is Marlin based GCode. + * This is a type of RepRap used for machines with multiple extruder trains. + * G0 for moves, G1 for extrusion. + * E values give mm of filament extrusion. + * E values are stored separately per extruder train. + * Retraction is done on E values with G1. Start/end code is added. + * M227 is used to initialize a single extrusion train. + **/ GRIFFIN = 6, REPETIER = 7, -/** - * Real RepRap GCode suitable for printers using RepRap firmware (e.g. Duet controllers) - **/ + /** + * Real RepRap GCode suitable for printers using RepRap firmware (e.g. Duet controllers) + **/ REPRAP = 8, }; @@ -231,6 +231,6 @@ enum class InsetDirection CENTER_LAST }; -} //Cura namespace. +} // namespace cura -#endif //ENUMSETTINGS_H \ No newline at end of file +#endif // ENUMSETTINGS_H \ No newline at end of file diff --git a/src/settings/Settings.cpp b/src/settings/Settings.cpp index f2781cb5a3..92e1e6afe9 100644 --- a/src/settings/Settings.cpp +++ b/src/settings/Settings.cpp @@ -1,14 +1,7 @@ // Copyright (c) 2022 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher -#include -#include -#include // regex parsing for temp flow graph -#include // ostringstream -#include -#include //Parsing strings (stod, stoul). - -#include +#include "settings/Settings.h" #include "Application.h" //To get the extruders. #include "BeadingStrategy/BeadingStrategyFactory.h" @@ -16,7 +9,6 @@ #include "Slice.h" #include "settings/EnumSettings.h" #include "settings/FlowTempGraph.h" -#include "settings/Settings.h" #include "settings/types/Angle.h" #include "settings/types/Duration.h" //For duration and time settings. #include "settings/types/LayerIndex.h" //For layer index settings. @@ -24,8 +16,17 @@ #include "settings/types/Temperature.h" //For temperature settings. #include "settings/types/Velocity.h" //For velocity settings. #include "utils/FMatrix4x3.h" -#include "utils/string.h" //For Escaped. #include "utils/polygon.h" +#include "utils/string.h" //For Escaped. + +#include + +#include +#include +#include // regex parsing for temp flow graph +#include // ostringstream +#include +#include //Parsing strings (stod, stoul). namespace cura { @@ -112,7 +113,8 @@ ExtruderTrain& Settings::get(const std::string& key) const return Application::getInstance().current_slice->scene.extruders[extruder_nr]; } -template<> std::vector Settings::get>(const std::string& key) const +template<> +std::vector Settings::get>(const std::string& key) const { int extruder_nr = std::atoi(get(key).c_str()); std::vector ret; @@ -133,7 +135,8 @@ template<> std::vector Settings::get template<> LayerIndex Settings::get(const std::string& key) const { - return std::atoi(get(key).c_str()) - 1; // For the user we display layer numbers starting from 1, but we start counting from 0. Still it may be negative for Raft layers. + return std::atoi(get(key).c_str()) + - 1; // For the user we display layer numbers starting from 1, but we start counting from 0. Still it may be negative for Raft layers. } template<> @@ -240,14 +243,15 @@ FlowTempGraph Settings::get(const std::string& key) const return result; } -template<> Polygons Settings::get(const std::string& key) const +template<> +Polygons Settings::get(const std::string& key) const { std::string value_string = get(key); Polygons result; if (value_string.empty()) { - return result; //Empty at this point. + return result; // Empty at this point. } /* We're looking to match one or more floating point values separated by * commas and surrounded by square brackets. Note that because the QML @@ -260,22 +264,22 @@ template<> Polygons Settings::get(const std::string& key) const if (std::regex_search(value_string, polygons_match, polygons_regex) && polygons_match.size() > 1) { std::string polygons_string = polygons_match.str(1); - + std::regex polygon_regex(R"(\[((\[[^\[\]]*\]\s*,?\s*)*)\]\s*,?)"); // matches with a list of lists (a list of 2D vertices) std::smatch polygon_match; - - std::regex_token_iterator rend; //Default constructor gets the end-of-sequence iterator. + + std::regex_token_iterator rend; // Default constructor gets the end-of-sequence iterator. std::regex_token_iterator polygon_match_iter(polygons_string.begin(), polygons_string.end(), polygon_regex, 0); while (polygon_match_iter != rend) { std::string polygon_str = *polygon_match_iter++; - + result.emplace_back(); PolygonRef poly = result.back(); std::regex point2D_regex(R"(\[([^,\[]*),([^,\]]*)\])"); // matches to a list of exactly two things - const int submatches[] = {1, 2}; // Match first number and second number of a pair. + const int submatches[] = { 1, 2 }; // Match first number and second number of a pair. std::regex_token_iterator match_iter(polygon_str.begin(), polygon_str.end(), point2D_regex, submatches); while (match_iter != rend) { @@ -443,7 +447,8 @@ EFillMethod Settings::get(const std::string& key) const { return EFillMethod::LIGHTNING; } - else if (value.rfind("PLUGIN", 0) == 0) { + else if (value.rfind("PLUGIN", 0) == 0) + { return EFillMethod::PLUGIN; } else // Default. @@ -519,7 +524,8 @@ EZSeamType Settings::get(const std::string& key) const { return EZSeamType::RANDOM; } - else if (value == "back") // It's called 'back' internally because originally this was intended to allow the user to put the seam in the back of the object where it's less visible. + else if (value == "back") // It's called 'back' internally because originally this was intended to allow the user to put the seam in the back of the object where it's less + // visible. { return EZSeamType::USER_SPECIFIED; } From 8d1d3115baf4d64260e8e7a0c081602764be6b0c Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 25 Jul 2023 15:28:16 +0200 Subject: [PATCH 146/470] Fix unit tests CURA-10720 --- include/settings/EnumSettings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/settings/EnumSettings.h b/include/settings/EnumSettings.h index b594854f2a..0f0489a0d2 100644 --- a/include/settings/EnumSettings.h +++ b/include/settings/EnumSettings.h @@ -27,8 +27,8 @@ enum class EFillMethod CROSS_3D, GYROID, LIGHTNING, - PLUGIN, - NONE // NOTE: Should remain last! (May be used in testing to enumarate the enum.) + NONE, // NOTE: Should remain last! (May be used in testing to enumarate the enum.) + PLUGIN, // Place plugin after none to prevent it from being tested in the gtest suite. }; /*! From aaccc0ca662bfc1cab21fcd6d92edf8836804cec Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 27 Jul 2023 12:36:42 +0200 Subject: [PATCH 147/470] Access slot-register functions via SlotID instead of the full type. Users (of plugins) should only have to know about the SlotID enum. part of CURA-10805 --- include/plugins/slots.h | 39 ++++++++++++------------ src/communication/ArcusCommunication.cpp | 6 ++-- src/slicer.cpp | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 80613cad1b..fbc8e0b664 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -79,7 +79,7 @@ template class Unit> class Registry, Unit> { public: - template + template void broadcast(auto&&... args) { } // Base case, do nothing @@ -94,48 +94,49 @@ class Registry, Unit> : public Registry using Base::broadcast; friend Base; - template - constexpr Tp& get() + template + constexpr auto& get() { - return get_type().proxy; + return get_type().proxy; } - template + template constexpr auto modify(auto&&... args) { - return get().modify(std::forward(args)...); + return get().modify(std::forward(args)...); } - template + template void connect(auto&& plugin) { - get_type().proxy = Tp{ std::forward(std::move(plugin)) }; + using Tp = decltype(get_type().proxy); + get_type().proxy = Tp{ std::forward(std::move(plugin)) }; } - template + template void broadcast(auto&&... args) { - value_.proxy.template broadcast(std::forward(args)...); - Base::template broadcast(std::forward(args)...); + value_.proxy.template broadcast(std::forward(args)...); + Base::template broadcast(std::forward(args)...); } protected: - template - constexpr Unit& get_type() + template + constexpr auto& get_type() { - return get_helper(std::is_same{}); + return get_helper(std::bool_constant{}); } - template - constexpr Unit& get_helper(std::true_type) + template + constexpr auto& get_helper(std::true_type) { return value_; } - template - constexpr Unit& get_helper(std::false_type) + template + constexpr auto& get_helper(std::false_type) { - return Base::template get_type(); + return Base::template get_type(); } Unit value_; diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index c1ffa1410c..70df99a55f 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -342,7 +342,7 @@ void ArcusCommunication::beginGCode() void ArcusCommunication::flushGCode() { - const std::string& message_str = slots::instance().modify(private_data->gcode_output_stream.str()); + const std::string& message_str = slots::instance().modify(private_data->gcode_output_stream.str()); if (message_str.size() == 0) { return; @@ -375,7 +375,7 @@ void ArcusCommunication::sendCurrentPosition(const Point& position) void ArcusCommunication::sendGCodePrefix(const std::string& prefix) const { std::shared_ptr message = std::make_shared(); - message->set_data(slots::instance().modify(prefix)); + message->set_data(slots::instance().modify(prefix)); private_data->socket->sendMessage(message); } @@ -547,7 +547,7 @@ void ArcusCommunication::sliceNext() private_data->readExtruderSettingsMessage(slice_message->extruders()); // Broadcast the settings to the plugins - slots::instance().broadcast(*slice_message); + slots::instance().broadcast(*slice_message); const size_t extruder_count = slice.scene.extruders.size(); // For each setting, register what extruder it should be obtained from (if this is limited to an extruder). diff --git a/src/slicer.cpp b/src/slicer.cpp index f02003e925..16cf1c63f6 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -788,7 +788,7 @@ void SlicerLayer::makePolygons(const Mesh* mesh) // Finally optimize all the polygons. Every point removed saves time in the long run. // polygons = Simplify(mesh->settings).polygon(polygons); - polygons = slots::instance().modify( + polygons = slots::instance().modify( polygons, mesh->settings.get("meshfix_maximum_resolution"), mesh->settings.get("meshfix_maximum_deviation"), From b26cb029c82bfcfca27dc710983581a30380c76a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 27 Jul 2023 13:45:30 +0200 Subject: [PATCH 148/470] Replace (slot connection) switch statement with factory. This reduces the responsibility of the general communication layer for the plugins by increasing encapsulation. Will also take care of adding new ones automagically. part of CURA-10805 --- include/plugins/slots.h | 37 ++++++++++++++++++++++++ src/communication/ArcusCommunication.cpp | 17 ++--------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index fbc8e0b664..3b4fab22cd 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -67,6 +67,8 @@ template using slot_settings_broadcast_ = SlotProxy; +using slot_to_connect_map_t = std::map)>>; + template struct Typelist { @@ -79,6 +81,10 @@ template class Unit> class Registry, Unit> { public: + void append_to_connect_map(std::map)>>& function_map) + { + } // Base case, do nothing. + template void broadcast(auto&&... args) { @@ -94,6 +100,11 @@ class Registry, Unit> : public Registry using Base::broadcast; friend Base; + void append_to_connect_map(slot_to_connect_map_t& function_map) + { + function_map.insert({ T::slot_id, [&](std::shared_ptr plugin) { this->connect(plugin); } }); + } + template constexpr auto& get() { @@ -170,8 +181,34 @@ using slot_postprocess = details::slot_postprocess_<>; using slot_settings_broadcast = details::slot_settings_broadcast_<>; using SlotTypes = details::Typelist; + +template +class SlotConnectionFactory_ +{ +public: + static SlotConnectionFactory_& instance() + { + static SlotConnectionFactory_ instance; + return instance; + } + + void connect(const plugins::v0::SlotID& slot_id, std::shared_ptr plugin) + { + slot_to_connect_map[slot_id](plugin); + } + +private: + SlotConnectionFactory_() + { + S::instance().append_to_connect_map(slot_to_connect_map); + } + + plugins::details::slot_to_connect_map_t slot_to_connect_map; +}; + } // namespace plugins using slots = plugins::details::SingletonRegistry; +using SlotConnectionFactory = plugins::SlotConnectionFactory_; } // namespace cura diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 70df99a55f..78377ed2f7 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -521,21 +521,8 @@ void ArcusCommunication::sliceNext() { if (plugin.has_address() && plugin.has_port()) { - switch (plugin.id()) - { - case cura::proto::SlotID::SETTINGS_BROADCAST: - slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); - break; - case cura::proto::SlotID::SIMPLIFY_MODIFY: - slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); - break; - case cura::proto::SlotID::POSTPROCESS_MODIFY: - slots::instance().connect(utils::createChannel({ plugin.address(), plugin.port() })); - break; - default: - spdlog::error("Not yet implemented: {}", plugin.id()); - break; - } + const auto slot_id = static_cast(plugin.id()); + SlotConnectionFactory::instance().connect(slot_id, utils::createChannel({ plugin.address(), plugin.port() })); } } #endif // ENABLE_PLUGINS From 7e860330525c091b74dc0a106ecaaac5db7fe0a9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 27 Jul 2023 18:02:58 +0200 Subject: [PATCH 149/470] Fix slots used in benchmark (SlotId instead of definition). done as part of CURA-10805 --- benchmark/simplify_benchmark.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 5c91874a97..1dfe5d3716 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -64,7 +64,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } @@ -78,7 +78,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St try { - slots::instance().connect(utils::createChannel({host, port})); + slots::instance().connect(utils::createChannel({host, port})); } catch (std::runtime_error e) { @@ -89,7 +89,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St Polygons simplified; for (const auto& polys : shapes) { - benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); } } } From e32cb04c87e065c013d7d1717376f73be9c8d89c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 27 Jul 2023 18:05:35 +0200 Subject: [PATCH 150/470] Should be possible now to make a slot without modify. If NoStub is used instead of the modify one (for that slot, which doesn't exist in the use case here discussed), it should now use the default implementation of the slot instead. part of CURA-10805 --- include/plugins/slotproxy.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 8d6f818009..6b45563ee6 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -21,6 +21,11 @@ namespace cura::plugins { +// (Will be) Used to make/identify slots with no modify (or generate) methods. +class NoStub +{ +}; + /** * @brief A class template representing a proxy for a plugin slot. * @@ -76,7 +81,7 @@ class SlotProxy */ constexpr auto modify(auto&&... args) { - if (plugin_.has_value()) + if (plugin_.has_value() && ! std::is_same{}) { return plugin_.value().modify(std::forward(args)...); } From bfae0ea221aba1f521ebf65e905d17e883b71533 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 27 Jul 2023 18:08:26 +0200 Subject: [PATCH 151/470] Add string-switch type and integrate into settings retrieval This commit introduces a new type 'string-switch' to handle string comparisons in a switch-case format. This is achieved by employing a DJB2a-based hash function to convert each string to a unique, corresponding enum value. The primary motivation behind this was to refactor the existing settings retrieval process, which was heavily reliant on long if-else constructs. By replacing these with more manageable switch statements, the code readability and maintainability is significantly improved. This change also facilitates the addition of new settings by simply extending existing enums and the related switch statements. Contributes to CURA-10702 --- include/settings/EnumSettings.h | 46 ++-- include/utils/types/string_switch.h | 41 ++++ src/settings/Settings.cpp | 328 ++++++++++++++-------------- 3 files changed, 230 insertions(+), 185 deletions(-) create mode 100644 include/utils/types/string_switch.h diff --git a/include/settings/EnumSettings.h b/include/settings/EnumSettings.h index 0f0489a0d2..1d82feb83c 100644 --- a/include/settings/EnumSettings.h +++ b/include/settings/EnumSettings.h @@ -1,5 +1,5 @@ -// Copyright (c) 2021 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef ENUMSETTINGS_H #define ENUMSETTINGS_H @@ -27,7 +27,7 @@ enum class EFillMethod CROSS_3D, GYROID, LIGHTNING, - NONE, // NOTE: Should remain last! (May be used in testing to enumarate the enum.) + NONE, // NOTE: Should remain second last! Before PLUGIN (Might be used in testing to enumerate the enum.) PLUGIN, // Place plugin after none to prevent it from being tested in the gtest suite. }; @@ -39,7 +39,8 @@ enum class EPlatformAdhesion SKIRT, BRIM, RAFT, - NONE + NONE, + PLUGIN, }; /*! @@ -49,7 +50,8 @@ enum class ESupportType { NONE, PLATFORM_ONLY, - EVERYWHERE + EVERYWHERE, + PLUGIN, }; /*! @@ -58,7 +60,8 @@ enum class ESupportType enum class ESupportStructure { NORMAL, - TREE + TREE, + PLUGIN, }; enum class EZSeamType @@ -71,7 +74,8 @@ enum class EZSeamType /* The 'Skirt/brim' type behaves like shortest, except it doesn't try to do tie-breaking for similar locations to * the last attempt, as that gives a different result when the seams are next to each other instead of on top. */ - SKIRT_BRIM + SKIRT_BRIM, + PLUGIN, }; enum class EZSeamCornerPrefType @@ -80,26 +84,30 @@ enum class EZSeamCornerPrefType Z_SEAM_CORNER_PREF_INNER, Z_SEAM_CORNER_PREF_OUTER, Z_SEAM_CORNER_PREF_ANY, - Z_SEAM_CORNER_PREF_WEIGHTED + Z_SEAM_CORNER_PREF_WEIGHTED, + PLUGIN, }; enum class ESurfaceMode { NORMAL, SURFACE, - BOTH + BOTH, + PLUGIN, }; enum class FillPerimeterGapMode { NOWHERE, - EVERYWHERE + EVERYWHERE, + PLUGIN, }; enum class BuildPlateShape { RECTANGULAR, - ELLIPTIC + ELLIPTIC, + PLUGIN, }; enum class CombingMode @@ -108,7 +116,8 @@ enum class CombingMode ALL, NO_SKIN, NO_OUTER_SURFACES, - INFILL + INFILL, + PLUGIN, }; /*! @@ -117,20 +126,23 @@ enum class CombingMode enum class DraftShieldHeightLimitation { FULL, // Draft shield takes full height of the print. - LIMITED // Draft shield is limited by draft_shield_height setting. + LIMITED, // Draft shield is limited by draft_shield_height setting. + PLUGIN, }; enum class SupportDistPriority { XY_OVERRIDES_Z, - Z_OVERRIDES_XY + Z_OVERRIDES_XY, + PLUGIN, }; enum class SlicingTolerance { MIDDLE, INCLUSIVE, - EXCLUSIVE + EXCLUSIVE, + PLUGIN, }; /*! * Different flavors of GCode. Some machines require different types of GCode. @@ -207,6 +219,7 @@ enum class EGCodeFlavor * Real RepRap GCode suitable for printers using RepRap firmware (e.g. Duet controllers) **/ REPRAP = 8, + PLUGIN = 9, }; /*! @@ -228,7 +241,8 @@ enum class InsetDirection * If the innermost wall is a central wall, it is printed last. Otherwise * prints the same as inside out. */ - CENTER_LAST + CENTER_LAST, + PLUGIN, }; } // namespace cura diff --git a/include/utils/types/string_switch.h b/include/utils/types/string_switch.h new file mode 100644 index 0000000000..e7d9689aac --- /dev/null +++ b/include/utils/types/string_switch.h @@ -0,0 +1,41 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef UTILS_TYPES_STRING_SWITCH_H +#define UTILS_TYPES_STRING_SWITCH_H + +#include + +namespace cura::utils +{ + +// Source: https://learnmoderncpp.com/2020/06/01/strings-as-switch-case-labels/ +inline constexpr uint64_t hash_djb2a(const std::string_view value) +{ + uint64_t hash{ 5381 }; + for (unsigned char c : value) + { + hash = ((hash << 5) + hash) ^ c; + } + return hash; +} + +inline constexpr uint64_t hash_enum(const std::string_view value) +{ + constexpr uint64_t plugin_namespace_sep_location{ 6 }; + if (value.size() > plugin_namespace_sep_location && value.at(plugin_namespace_sep_location) == ':') + { + return hash_djb2a("plugin"); + } + return hash_djb2a(value); +} + +constexpr inline auto operator""_sw(const char* str, size_t len) +{ + return hash_enum(std::string_view{ str, len }); +} + + +} // namespace cura::utils + +#endif // UTILS_TYPES_STRING_SWITCH_H diff --git a/src/settings/Settings.cpp b/src/settings/Settings.cpp index 92e1e6afe9..594aa2fccb 100644 --- a/src/settings/Settings.cpp +++ b/src/settings/Settings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Ultimaker B.V. +// Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher #include "settings/Settings.h" @@ -18,6 +18,7 @@ #include "utils/FMatrix4x3.h" #include "utils/polygon.h" #include "utils/string.h" //For Escaped. +#include "utils/types/string_switch.h" //For string switch. #include @@ -135,8 +136,8 @@ std::vector Settings::get>(const std template<> LayerIndex Settings::get(const std::string& key) const { - return std::atoi(get(key).c_str()) - - 1; // For the user we display layer numbers starting from 1, but we start counting from 0. Still it may be negative for Raft layers. + // For the user we display layer numbers starting from 1, but we start counting from 0. Still it may be negative for Raft layers. + return std::atoi(get(key).c_str()) - 1; } template<> @@ -185,12 +186,16 @@ template<> DraftShieldHeightLimitation Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "limited") + using namespace cura::utils; + switch (hash_enum(value)) { + case "full"_sw: + return DraftShieldHeightLimitation::FULL; + case "limited"_sw: return DraftShieldHeightLimitation::LIMITED; - } - else // if (value == "full") or default. - { + case "plugin"_sw: + return DraftShieldHeightLimitation::PLUGIN; + default: return DraftShieldHeightLimitation::FULL; } } @@ -350,109 +355,74 @@ template<> EGCodeFlavor Settings::get(const std::string& key) const { const std::string& value = get(key); - // I wish that switch statements worked for std::string... - if (value == "Griffin") + using namespace cura::utils; + switch (hash_enum(value)) { + case "Marlin"_sw: + return EGCodeFlavor::MARLIN; + case "Griffin"_sw: return EGCodeFlavor::GRIFFIN; - } - else if (value == "UltiGCode") - { + case "UltiGCode"_sw: return EGCodeFlavor::ULTIGCODE; - } - else if (value == "Makerbot") - { + case "Makerbot"_sw: return EGCodeFlavor::MAKERBOT; - } - else if (value == "BFB") - { + case "BFB"_sw: return EGCodeFlavor::BFB; - } - else if (value == "MACH3") - { + case "MACH3"_sw: return EGCodeFlavor::MACH3; - } - else if (value == "RepRap (Volumetric)") - { + case "RepRap (Volumetric)"_sw: return EGCodeFlavor::MARLIN_VOLUMATRIC; - } - else if (value == "Repetier") - { + case "Repetier"_sw: return EGCodeFlavor::REPETIER; - } - else if (value == "RepRap (RepRap)") - { + case "RepRap (RepRap)"_sw: return EGCodeFlavor::REPRAP; + case "plugin"_sw: + return EGCodeFlavor::PLUGIN; + default: + return EGCodeFlavor::MARLIN; } - // Default: - return EGCodeFlavor::MARLIN; } template<> EFillMethod Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "lines") + using namespace cura::utils; + switch (hash_enum(value)) { + case "none"_sw: + return EFillMethod::NONE; + case "lines"_sw: return EFillMethod::LINES; - } - else if (value == "grid") - { + case "grid"_sw: return EFillMethod::GRID; - } - else if (value == "cubic") - { + case "cubic"_sw: return EFillMethod::CUBIC; - } - else if (value == "cubicsubdiv") - { + case "cubicsubdiv"_sw: return EFillMethod::CUBICSUBDIV; - } - else if (value == "tetrahedral") - { + case "tetrahedral"_sw: return EFillMethod::TETRAHEDRAL; - } - else if (value == "quarter_cubic") - { + case "quarter_cubic"_sw: return EFillMethod::QUARTER_CUBIC; - } - else if (value == "triangles") - { + case "triangles"_sw: return EFillMethod::TRIANGLES; - } - else if (value == "trihexagon") - { + case "trihexagon"_sw: return EFillMethod::TRIHEXAGON; - } - else if (value == "concentric") - { + case "concentric"_sw: return EFillMethod::CONCENTRIC; - } - else if (value == "zigzag") - { + case "zigzag"_sw: return EFillMethod::ZIG_ZAG; - } - else if (value == "cross") - { + case "cross"_sw: return EFillMethod::CROSS; - } - else if (value == "cross_3d") - { + case "cross_3d"_sw: return EFillMethod::CROSS_3D; - } - else if (value == "gyroid") - { + case "gyroid"_sw: return EFillMethod::GYROID; - } - else if (value == "lightning") - { + case "lightning"_sw: return EFillMethod::LIGHTNING; - } - else if (value.rfind("PLUGIN", 0) == 0) - { + case "plugin"_sw: return EFillMethod::PLUGIN; - } - else // Default. - { + default: return EFillMethod::NONE; } } @@ -461,20 +431,20 @@ template<> EPlatformAdhesion Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "brim") + using namespace cura::utils; + switch (hash_enum(value)) { + case "skirt"_sw: + return EPlatformAdhesion::SKIRT; + case "brim"_sw: return EPlatformAdhesion::BRIM; - } - else if (value == "raft") - { + case "raft"_sw: return EPlatformAdhesion::RAFT; - } - else if (value == "none") - { + case "none"_sw: return EPlatformAdhesion::NONE; - } - else // Default. - { + case "plugin"_sw: + return EPlatformAdhesion::PLUGIN; + default: return EPlatformAdhesion::SKIRT; } } @@ -483,16 +453,18 @@ template<> ESupportType Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "everywhere") + using namespace cura::utils; + switch (hash_enum(value)) { + case "none"_sw: + return ESupportType::NONE; + case "everywhere"_sw: return ESupportType::EVERYWHERE; - } - else if (value == "buildplate") - { + case "buildplate"_sw: return ESupportType::PLATFORM_ONLY; - } - else // Default. - { + case "plugin"_sw: + return ESupportType::PLUGIN; + default: return ESupportType::NONE; } } @@ -501,16 +473,16 @@ template<> ESupportStructure Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "normal") + using namespace cura::utils; + switch (hash_enum(value)) { + case "normal"_sw: return ESupportStructure::NORMAL; - } - else if (value == "tree") - { + case "tree"_sw: return ESupportStructure::TREE; - } - else // Default. - { + case "plugin"_sw: + return ESupportStructure::PLUGIN; + default: return ESupportStructure::NORMAL; } } @@ -520,21 +492,20 @@ template<> EZSeamType Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "random") + using namespace cura::utils; + switch (hash_enum(value)) { + case "shortest"_sw: + return EZSeamType::SHORTEST; + case "random"_sw: return EZSeamType::RANDOM; - } - else if (value == "back") // It's called 'back' internally because originally this was intended to allow the user to put the seam in the back of the object where it's less - // visible. - { + case "back"_sw: return EZSeamType::USER_SPECIFIED; - } - else if (value == "sharpest_corner") - { + case "sharpest_corner"_sw: return EZSeamType::SHARPEST_CORNER; - } - else // Default. - { + case "plugin"_sw: + return EZSeamType::PLUGIN; + default: return EZSeamType::SHORTEST; } } @@ -543,24 +514,22 @@ template<> EZSeamCornerPrefType Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "z_seam_corner_inner") + using namespace cura::utils; + switch (hash_enum(value)) { + case "z_seam_corner_none"_sw: + return EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE; + case "z_seam_corner_inner"_sw: return EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER; - } - else if (value == "z_seam_corner_outer") - { + case "z_seam_corner_outer"_sw: return EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER; - } - else if (value == "z_seam_corner_any") - { + case "z_seam_corner_any"_sw: return EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY; - } - else if (value == "z_seam_corner_weighted") - { + case "z_seam_corner_weighted"_sw: return EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_WEIGHTED; - } - else // Default. - { + case "plugin"_sw: + return EZSeamCornerPrefType::PLUGIN; + default: return EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE; } } @@ -569,16 +538,18 @@ template<> ESurfaceMode Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "surface") + using namespace cura::utils; + switch (hash_enum(value)) { + case "normal"_sw: + return ESurfaceMode::NORMAL; + case "surface"_sw: return ESurfaceMode::SURFACE; - } - else if (value == "both") - { + case "both"_sw: return ESurfaceMode::BOTH; - } - else // Default. - { + case "plugin"_sw: + return ESurfaceMode::PLUGIN; + default: return ESurfaceMode::NORMAL; } } @@ -586,12 +557,17 @@ ESurfaceMode Settings::get(const std::string& key) const template<> FillPerimeterGapMode Settings::get(const std::string& key) const { - if (get(key) == "everywhere") + const std::string& value = get(key); + using namespace cura::utils; + switch (hash_enum(value)) { + case "nowhere"_sw: + return FillPerimeterGapMode::NOWHERE; + case "everywhere"_sw: return FillPerimeterGapMode::EVERYWHERE; - } - else // Default. - { + case "plugin"_sw: + return FillPerimeterGapMode::PLUGIN; + default: return FillPerimeterGapMode::NOWHERE; } } @@ -599,12 +575,17 @@ FillPerimeterGapMode Settings::get(const std::string& key) template<> BuildPlateShape Settings::get(const std::string& key) const { - if (get(key) == "elliptic") + const std::string& value = get(key); + using namespace cura::utils; + switch (hash_enum(value)) { + case "rectangular"_sw: + return BuildPlateShape::RECTANGULAR; + case "elliptic"_sw: return BuildPlateShape::ELLIPTIC; - } - else // Default. - { + case "plugin"_sw: + return BuildPlateShape::PLUGIN; + default: return BuildPlateShape::RECTANGULAR; } } @@ -613,24 +594,22 @@ template<> CombingMode Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "off") + using namespace cura::utils; + switch (hash_enum(value)) { + case "all"_sw: + return CombingMode::ALL; + case "off"_sw: return CombingMode::OFF; - } - else if (value == "noskin") - { + case "noskin"_sw: return CombingMode::NO_SKIN; - } - else if (value == "no_outer_surfaces") - { + case "no_outer_surfaces"_sw: return CombingMode::NO_OUTER_SURFACES; - } - else if (value == "infill") - { + case "infill"_sw: return CombingMode::INFILL; - } - else // Default. - { + case "plugin"_sw: + return CombingMode::PLUGIN; + default: return CombingMode::ALL; } } @@ -638,12 +617,17 @@ CombingMode Settings::get(const std::string& key) const template<> SupportDistPriority Settings::get(const std::string& key) const { - if (get(key) == "z_overrides_xy") + const std::string& value = get(key); + using namespace cura::utils; + switch (hash_enum(value)) { + case "xy_overrides_z"_sw: + return SupportDistPriority::XY_OVERRIDES_Z; + case "z_overrides_xy"_sw: return SupportDistPriority::Z_OVERRIDES_XY; - } - else // Default. - { + case "plugin"_sw: + return SupportDistPriority::PLUGIN; + default: return SupportDistPriority::XY_OVERRIDES_Z; } } @@ -652,16 +636,18 @@ template<> SlicingTolerance Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "inclusive") + using namespace cura::utils; + switch (hash_enum(value)) { + case "middle"_sw: + return SlicingTolerance::MIDDLE; + case "inclusive"_sw: return SlicingTolerance::INCLUSIVE; - } - else if (value == "exclusive") - { + case "exclusive"_sw: return SlicingTolerance::EXCLUSIVE; - } - else // Default. - { + case "plugin"_sw: + return SlicingTolerance::PLUGIN; + default: return SlicingTolerance::MIDDLE; } } @@ -670,12 +656,16 @@ template<> InsetDirection Settings::get(const std::string& key) const { const std::string& value = get(key); - if (value == "outside_in") + using namespace cura::utils; + switch (hash_enum(value)) { + case "inside_out"_sw: + return InsetDirection::INSIDE_OUT; + case "outside_in"_sw: return InsetDirection::OUTSIDE_IN; - } - else // Default. - { + case "plugin"_sw: + return InsetDirection::PLUGIN; + default: return InsetDirection::INSIDE_OUT; } } From 79b30cbae5fa46d41a44da096fa67b7e4824d0f1 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 27 Jul 2023 18:10:22 +0200 Subject: [PATCH 152/470] Start of component based system for building slots/plugins. The end-goal of this is to ensure each plugin can have any combination of Generate/Modify/Broadcast. For now, just (partially) carve out the Modifier functionality out of the PluginProxy. part of CURA-10851 --- include/plugins/pluginproxy.h | 187 ++++++++++++++++++++++------------ 1 file changed, 124 insertions(+), 63 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 25ac9ac433..d090fa4e52 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -35,6 +35,125 @@ namespace cura::plugins { +template +concept plugin_modifier_v = requires(T value) +{ + requires std::is_member_function_pointer_v; +}; + +template +concept default_modifier_v = requires(T value) +{ + requires ! plugin_modifier_v; + requires std::is_member_function_pointer_v; +}; + +template +class PluginProxyModifyComponent +{ + using value_type = typename ResponseTp::native_value_type; + +public: + PluginProxyModifyComponent(Parent& parent); + value_type modify(auto&&... args); +}; + +template +class PluginProxyModifyComponent +{ + using value_type = typename ResponseTp::native_value_type; +public: + PluginProxyModifyComponent(Parent& parent) + { + } + + value_type modify(auto&&... args) + { + return Default(std::forward(args)...); + } +}; + +template +class PluginProxyModifyComponent +{ + using value_type = typename ResponseTp::native_value_type; + using rsp_msg_type = typename ResponseTp::value_type; + using modify_stub_t = Stub; + +public: + PluginProxyModifyComponent(Parent& parent) : parent_(parent) + { + } + + /** + * @brief Executes to plugin Modify operation. + * + * As part of this operation, a request is sent to the plugin + * and the returned response is processed. + * + * @tparam Args - argument types for the plugin request + * @param args - arguments for the plugin request + * @return The converted response value from plugin. + * + * @throws std::runtime_error if communication with the plugin fails. + */ + value_type modify(auto&&... args) + { + agrpc::GrpcContext grpc_context; + value_type ret_value{}; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &ret_value, &args...]() + { + return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (parent_.plugin_info_.has_value()) + { + throw exceptions::RemoteException(parent_.slot_info_, parent_.plugin_info_.value(), status.error_message()); + } + throw exceptions::RemoteException(parent_.slot_info_, status.error_message()); + } + return ret_value; + } + +private: + /** + * @brief Executes the modifyCall operation with the plugin. + * + * Sends a request to the plugin and saves the response. + * + * @param grpc_context - The gRPC context to use for the call + * @param status - Status of the gRPC call which gets updated in this method + * @param ret_value - Reference to the value in which response to be stored + * @param args - Request arguments + * @return A boost::asio::awaitable indicating completion of the operation + */ + boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) + { + using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + parent_.prep_client_context(client_context); + + // Construct request + auto request{ parent_.req_(std::forward(args)...) }; + + // Make unary request + rsp_msg_type response; + status = co_await RPC::request(grpc_context, parent_.modify_stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = parent_.rsp_(response); + co_return; + } + + Parent& parent_; +}; + /** * @brief A plugin proxy class template. * @@ -51,6 +170,7 @@ namespace cura::plugins template class PluginProxy { + friend PluginProxyModifyComponent; public: // type aliases for easy use using value_type = typename ResponseTp::native_value_type; @@ -109,7 +229,7 @@ class PluginProxy if (valid_) { spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); - if (! plugin_info.broadcast_subscriptions.empty()) + if (!plugin_info.broadcast_subscriptions.empty()) { spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); } @@ -122,7 +242,7 @@ class PluginProxy { throw exceptions::RemoteException(slot_info_, status.error_message()); } - if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) + if (! plugin_info.plugin_name.empty() && !plugin_info.slot_version.empty()) { plugin_info_ = plugin_info; } @@ -156,42 +276,10 @@ class PluginProxy } ~PluginProxy() = default; - /** - * @brief Executes to plugin Modify operation. - * - * As part of this operation, a request is sent to the plugin - * and the returned response is processed. - * - * @tparam Args - argument types for the plugin request - * @param args - arguments for the plugin request - * @return The converted response value from plugin. - * - * @throws std::runtime_error if communication with the plugin fails. - */ value_type modify(auto&&... args) { - agrpc::GrpcContext grpc_context; - value_type ret_value{}; - grpc::Status status; - - boost::asio::co_spawn( - grpc_context, - [this, &grpc_context, &status, &ret_value, &args...]() - { - return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); - }, - boost::asio::detached); - grpc_context.run(); - - if (! status.ok()) // TODO: handle different kind of status codes - { - if (plugin_info_.has_value()) - { - throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); - } - throw exceptions::RemoteException(slot_info_, status.error_message()); - } - return ret_value; + static auto modify_component = PluginProxyModifyComponent(*this); + return modify_component.modify(std::forward(args)...); } template @@ -236,33 +324,6 @@ class PluginProxy .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake - /** - * @brief Executes the modifyCall operation with the plugin. - * - * Sends a request to the plugin and saves the response. - * - * @param grpc_context - The gRPC context to use for the call - * @param status - Status of the gRPC call which gets updated in this method - * @param ret_value - Reference to the value in which response to be stored - * @param args - Request arguments - * @return A boost::asio::awaitable indicating completion of the operation - */ - boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) - { - using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context); - - // Construct request - auto request{ req_(std::forward(args)...) }; - - // Make unary request - rsp_msg_type response; - status = co_await RPC::request(grpc_context, modify_stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = rsp_(response); - co_return; - } - template boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) { From 991662c684596c3bcddb81dafd4d11c66bc745ea Mon Sep 17 00:00:00 2001 From: rburema Date: Thu, 27 Jul 2023 16:11:33 +0000 Subject: [PATCH 153/470] Applied clang-format. --- include/plugins/slots.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 3b4fab22cd..72cbdb6898 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -102,7 +102,11 @@ class Registry, Unit> : public Registry void append_to_connect_map(slot_to_connect_map_t& function_map) { - function_map.insert({ T::slot_id, [&](std::shared_ptr plugin) { this->connect(plugin); } }); + function_map.insert({ T::slot_id, + [&](std::shared_ptr plugin) + { + this->connect(plugin); + } }); } template From c40dd58cfab4e777f99b064241208ed550bbd8ff Mon Sep 17 00:00:00 2001 From: rburema Date: Thu, 27 Jul 2023 16:11:56 +0000 Subject: [PATCH 154/470] Applied clang-format. --- include/plugins/pluginproxy.h | 9 ++++++--- include/plugins/slots.h | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index d090fa4e52..de3c9d8af6 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -62,6 +62,7 @@ template { using value_type = typename ResponseTp::native_value_type; + public: PluginProxyModifyComponent(Parent& parent) { @@ -81,7 +82,8 @@ class PluginProxyModifyComponent using modify_stub_t = Stub; public: - PluginProxyModifyComponent(Parent& parent) : parent_(parent) + PluginProxyModifyComponent(Parent& parent) + : parent_(parent) { } @@ -171,6 +173,7 @@ template, Unit> : public Registry void append_to_connect_map(slot_to_connect_map_t& function_map) { - function_map.insert({ T::slot_id, [&](std::shared_ptr plugin) { this->connect(plugin); } }); + function_map.insert({ T::slot_id, + [&](std::shared_ptr plugin) + { + this->connect(plugin); + } }); } template From 6ece234ff37378283a8e33d2c292955af403f0c1 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 27 Jul 2023 18:47:46 +0200 Subject: [PATCH 155/470] Small fixes. - The statement with is_same would not compile on linux, try this way. - The (slot) map wasn't filled, since no recursion happened in the recursive tempated (Registry) type(s). part of CURA-10805 --- include/plugins/slotproxy.h | 2 +- include/plugins/slots.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 6b45563ee6..015d2b061e 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -81,7 +81,7 @@ class SlotProxy */ constexpr auto modify(auto&&... args) { - if (plugin_.has_value() && ! std::is_same{}) + if (plugin_.has_value() && ! std::is_same_v) { return plugin_.value().modify(std::forward(args)...); } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 72cbdb6898..700b7c3989 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -81,7 +81,7 @@ template class Unit> class Registry, Unit> { public: - void append_to_connect_map(std::map)>>& function_map) + constexpr void append_to_connect_map(slot_to_connect_map_t& function_map) { } // Base case, do nothing. @@ -100,13 +100,14 @@ class Registry, Unit> : public Registry using Base::broadcast; friend Base; - void append_to_connect_map(slot_to_connect_map_t& function_map) + constexpr void append_to_connect_map(slot_to_connect_map_t& function_map) { function_map.insert({ T::slot_id, [&](std::shared_ptr plugin) { - this->connect(plugin); + connect(plugin); } }); + Base::append_to_connect_map(function_map); } template From 34d64ec746781bc04e3b209ea36ea19fcaccbe4b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 28 Jul 2023 08:00:17 +0200 Subject: [PATCH 156/470] Add tests for the new string_view switch setting retrieval CURA-10720 --- tests/settings/SettingsTest.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/settings/SettingsTest.cpp b/tests/settings/SettingsTest.cpp index a59acbda1b..f0c727b246 100644 --- a/tests/settings/SettingsTest.cpp +++ b/tests/settings/SettingsTest.cpp @@ -1,10 +1,12 @@ -// Copyright (c) 2022 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #include "settings/Settings.h" //The class under test. + #include "Application.h" //To test extruder train settings. #include "ExtruderTrain.h" #include "Slice.h" +#include "settings/EnumSettings.h" #include "settings/FlowTempGraph.h" #include "settings/types/Angle.h" #include "settings/types/Duration.h" @@ -14,6 +16,7 @@ #include "settings/types/Velocity.h" #include "utils/Coord_t.h" #include "utils/FMatrix4x3.h" //Testing matrix transformation settings. + #include //For M_PI. #include #include //For shared_ptr. @@ -250,5 +253,17 @@ TEST_F(SettingsTest, LimitToExtruder) EXPECT_EQ(limit_extruder_value, settings.get("test_setting")); } +TEST_F(SettingsTest, PluginExtendedEnum) +{ + settings.add("infill_type", "PLUGIN::plugin_1::MOZAIC"); + EXPECT_EQ(settings.get("infill_type"), EFillMethod::PLUGIN); +} + +TEST_F(SettingsTest, EnumStringSwitch) +{ + settings.add("infill_type", "lightning"); + EXPECT_EQ(settings.get("infill_type"), EFillMethod::LIGHTNING); +} + } // namespace cura // NOLINTEND(*-magic-numbers) From a0c33afaef92f61b372e6b870ab4f6f05da28141 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 28 Jul 2023 09:11:36 +0200 Subject: [PATCH 157/470] Should fix it for non-MSVC compilers. done as part of CURA-10805 --- include/plugins/slotproxy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 015d2b061e..d1a7c51907 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -81,7 +81,7 @@ class SlotProxy */ constexpr auto modify(auto&&... args) { - if (plugin_.has_value() && ! std::is_same_v) + if (plugin_.has_value() && ! std::is_same_v) { return plugin_.value().modify(std::forward(args)...); } From af234bd9b0b2a07e3b5e67db4939e43aaf53d4be Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 28 Jul 2023 10:54:17 +0200 Subject: [PATCH 158/470] uniform keyword ordering CURA-10720 --- include/utils/types/string_switch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/utils/types/string_switch.h b/include/utils/types/string_switch.h index e7d9689aac..7b520858ae 100644 --- a/include/utils/types/string_switch.h +++ b/include/utils/types/string_switch.h @@ -10,7 +10,7 @@ namespace cura::utils { // Source: https://learnmoderncpp.com/2020/06/01/strings-as-switch-case-labels/ -inline constexpr uint64_t hash_djb2a(const std::string_view value) +constexpr inline uint64_t hash_djb2a(const std::string_view value) { uint64_t hash{ 5381 }; for (unsigned char c : value) @@ -20,7 +20,7 @@ inline constexpr uint64_t hash_djb2a(const std::string_view value) return hash; } -inline constexpr uint64_t hash_enum(const std::string_view value) +constexpr inline uint64_t hash_enum(const std::string_view value) { constexpr uint64_t plugin_namespace_sep_location{ 6 }; if (value.size() > plugin_namespace_sep_location && value.at(plugin_namespace_sep_location) == ':') From ec5e17f58d88b2bc3c2ebf9ee25c6049e162d91d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 28 Jul 2023 11:51:25 +0200 Subject: [PATCH 159/470] Remove the previous way of handling slots without modify. One one hand, this was arguably a hack, since it sort-of depended on the compiler throwing away the call to (plugin-proxy) modify, which, if not done, would eventually have lead to a compiler-error (in the situation before the plugin-proxy had a separated-out modify component at least), since NoStub doesn't have the requisite types associated with it to go through with the entire modify call-stack. On the other, the whole modify-component (in the PluginProxy file) despite not being a hack, has its own problems at the moment (overreliance on 'parent' class breaking modularization) and while perhaps more 'correct' does feel like a more cumbersome solution in way. On the up side, this does give a bit more flexibility for coming up with different 'defaults' under different conditions. For when the behaviour should be slightly different when there is a plugin that doesn't implement one of the methods that is called versus no plugin being subscribed to that slot. part of CURA-10851 --- include/plugins/slotproxy.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 6b45563ee6..8d6f818009 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -21,11 +21,6 @@ namespace cura::plugins { -// (Will be) Used to make/identify slots with no modify (or generate) methods. -class NoStub -{ -}; - /** * @brief A class template representing a proxy for a plugin slot. * @@ -81,7 +76,7 @@ class SlotProxy */ constexpr auto modify(auto&&... args) { - if (plugin_.has_value() && ! std::is_same{}) + if (plugin_.has_value()) { return plugin_.value().modify(std::forward(args)...); } From 4b88ec475dca17d2eb3b206bdee97b0258482603 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 31 Jul 2023 11:39:58 +0200 Subject: [PATCH 160/470] Moved SlotConnectionFact Refactored the "SlotConnectionFactory_" class in the slots.h file to utilize "std::move" in order to improve performance by minimizing unnecessary copies. Also rearranged the order of code for better clarity and maintenance. This will make understanding and working with the code easier for future developers. --- include/plugins/slots.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 700b7c3989..e682f55e78 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -18,6 +18,7 @@ #include #include +#include namespace cura { @@ -179,31 +180,23 @@ struct Holder T proxy; }; -} // namespace details - -using slot_simplify = details::slot_simplify_; -using slot_postprocess = details::slot_postprocess_<>; -using slot_settings_broadcast = details::slot_settings_broadcast_<>; - -using SlotTypes = details::Typelist; - template -class SlotConnectionFactory_ +class SlotConnectionFactory { public: - static SlotConnectionFactory_& instance() + static SlotConnectionFactory& instance() { - static SlotConnectionFactory_ instance; + static SlotConnectionFactory instance; return instance; } void connect(const plugins::v0::SlotID& slot_id, std::shared_ptr plugin) { - slot_to_connect_map[slot_id](plugin); + slot_to_connect_map[slot_id](std::move(plugin)); } private: - SlotConnectionFactory_() + SlotConnectionFactory() { S::instance().append_to_connect_map(slot_to_connect_map); } @@ -211,9 +204,17 @@ class SlotConnectionFactory_ plugins::details::slot_to_connect_map_t slot_to_connect_map; }; +} // namespace details + +using slot_simplify = details::slot_simplify_; +using slot_postprocess = details::slot_postprocess_<>; +using slot_settings_broadcast = details::slot_settings_broadcast_<>; + +using SlotTypes = details::Typelist; + } // namespace plugins using slots = plugins::details::SingletonRegistry; -using SlotConnectionFactory = plugins::SlotConnectionFactory_; +using SlotConnectionFactory = plugins::details::SlotConnectionFactory; } // namespace cura From 233abae7888116663e425cfd6879c6ce47d9715d Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 31 Jul 2023 14:02:58 +0200 Subject: [PATCH 161/470] Update grpc definitions possible broken commit CURA-10619 --- conanfile.py | 2 +- include/plugins/converters.h | 22 ++++++++++++++-------- include/plugins/slots.h | 9 +++++---- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/conanfile.py b/conanfile.py index db6341e9d0..22e5dbf6b7 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10619") def generate(self): deps = CMakeDeps(self) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 5260d33731..7b6ec71e42 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -9,10 +9,10 @@ #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.pb.h" -#include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" -#include "cura/plugins/slots/postprocess/v0/postprocess.pb.h" -#include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" -#include "cura/plugins/slots/simplify/v0/simplify.pb.h" +#include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" +#include "cura/plugins/slots/postprocess/v0/modify.pb.h" +#include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" +#include "cura/plugins/slots/simplify/v0/modify.pb.h" #include "plugins/metadata.h" #include "plugins/types.h" @@ -140,7 +140,7 @@ struct handshake_response struct simplify_request { - using value_type = slots::simplify::v0::CallRequest; ///< The protobuf message type. + using value_type = slots::simplify::v0::modify::CallRequest; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -198,7 +198,7 @@ struct simplify_request */ struct simplify_response { - using value_type = slots::simplify::v0::CallResponse; ///< The protobuf message type. + using value_type = slots::simplify::v0::modify::CallResponse; ///< The protobuf message type. using native_value_type = Polygons; ///< The native value type. /** @@ -236,7 +236,7 @@ struct simplify_response struct postprocess_request { - using value_type = slots::postprocess::v0::CallRequest; ///< The protobuf message type. + using value_type = slots::postprocess::v0::modify::CallRequest; ///< The protobuf message type. using native_value_type = std::string; ///< The native value type. /** @@ -255,7 +255,7 @@ struct postprocess_request struct postprocess_response { - using value_type = slots::postprocess::v0::CallResponse; + using value_type = slots::postprocess::v0::modify::CallResponse; using native_value_type = std::string; native_value_type operator()(const value_type& message) const @@ -264,6 +264,12 @@ struct postprocess_response } }; +//struct infill_generate_request +//{ +// using value_type = slots::infill::v0::generate::CallRequest +// using native_value_type = Polygons +//} + } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 0117ccc7c0..38fa880b9d 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -4,9 +4,10 @@ #ifndef PLUGINS_SLOTS_H #define PLUGINS_SLOTS_H -#include "cura/plugins/slots/postprocess/v0/postprocess.grpc.pb.h" -#include "cura/plugins/slots/simplify/v0/simplify.grpc.pb.h" +#include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" +#include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" +#include "infill.h" #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" @@ -49,7 +50,7 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy; +using slot_simplify_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -60,7 +61,7 @@ using slot_simplify_ = SlotProxy using slot_postprocess_ - = SlotProxy; + = SlotProxy; template struct Typelist From 965030b1a8751686d0c5dbc739319c52619137c0 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Mon, 31 Jul 2023 12:03:46 +0000 Subject: [PATCH 162/470] Applied clang-format. --- include/plugins/converters.h | 8 ++++---- include/plugins/slots.h | 13 ++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 7b6ec71e42..05945ab49d 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -264,11 +264,11 @@ struct postprocess_response } }; -//struct infill_generate_request +// struct infill_generate_request //{ -// using value_type = slots::infill::v0::generate::CallRequest -// using native_value_type = Polygons -//} +// using value_type = slots::infill::v0::generate::CallRequest +// using native_value_type = Polygons +// } } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 38fa880b9d..935f8fff48 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -50,7 +50,8 @@ struct simplify_default * @tparam Default The default behavior when no plugin is registered. */ template -using slot_simplify_ = SlotProxy; +using slot_simplify_ + = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -60,8 +61,14 @@ using slot_simplify_ = SlotProxy -using slot_postprocess_ - = SlotProxy; +using slot_postprocess_ = SlotProxy< + v0::SlotID::POSTPROCESS_MODIFY, + "<=1.0.0", + slots::postprocess::v0::modify::PostprocessModifyService::Stub, + Validator, + postprocess_request, + postprocess_response, + Default>; template struct Typelist From 9a65b9778ebecb22b7211160426311fa3ea80fb8 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 31 Jul 2023 14:16:53 +0200 Subject: [PATCH 163/470] Add generate method In this change, all instances of the "modify" method in slots.h, pluginproxy.h, and slotproxy.h have been renamed to "invoke". The aim of this refactoring is to improve the method semantics to more accurately describe the implementation, which is to invoke plugin directives rather than modify them. An additional "generate" method has also been created in slots.h for additional functionality. Contributes to CURA-10619 --- include/plugins/pluginproxy.h | 2 +- include/plugins/slotproxy.h | 4 ++-- include/plugins/slots.h | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 25ac9ac433..4fb0865ab1 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -168,7 +168,7 @@ class PluginProxy * * @throws std::runtime_error if communication with the plugin fails. */ - value_type modify(auto&&... args) + value_type invoke(auto&&... args) { agrpc::GrpcContext grpc_context; value_type ret_value{}; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index d1a7c51907..f53aab16a9 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -79,11 +79,11 @@ class SlotProxy * @param args The arguments for the plugin request. * @return The result of the plugin request or the default behavior. */ - constexpr auto modify(auto&&... args) + constexpr auto invoke(auto&&... args) { if (plugin_.has_value() && ! std::is_same_v) { - return plugin_.value().modify(std::forward(args)...); + return plugin_.value().invoke(std::forward(args)...); } return std::invoke(default_process, std::forward(args)...); } diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 6e12cd664a..36ee93e6f8 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -128,7 +128,13 @@ class Registry, Unit> : public Registry template constexpr auto modify(auto&&... args) { - return get().modify(std::forward(args)...); + return get().invoke(std::forward(args)...); + } + + template + constexpr auto generate(auto&&... args) + { + return get().invoke(std::forward(args)...); } template From 70da939883c756ae6fa4dadd928a87e5c34c9cb9 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Mon, 31 Jul 2023 12:17:37 +0000 Subject: [PATCH 164/470] Applied clang-format. --- include/plugins/slots.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 36ee93e6f8..d73140026e 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -4,9 +4,9 @@ #ifndef PLUGINS_SLOTS_H #define PLUGINS_SLOTS_H +#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" -#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" #include "infill.h" #include "plugins/converters.h" From 4da9cd1943e1a793b2d45d3d644d358213023a04 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 31 Jul 2023 15:20:46 +0200 Subject: [PATCH 165/470] Merge branch 'CURA-10619-infill-generate-slot' of /Users/c.lamboo/CuraEngineII with conflicts. --- include/TreeSupportUtils.h | 6 ++-- include/infill.h | 34 +++++++++++++++----- include/plugins/slots.h | 12 +++++++ src/FffGcodeWriter.cpp | 65 ++++++++++++++++++++++---------------- src/TopSurface.cpp | 4 +-- src/infill.cpp | 29 ++++++++--------- src/utils/polygonUtils.cpp | 4 +-- 7 files changed, 97 insertions(+), 57 deletions(-) diff --git a/include/TreeSupportUtils.h b/include/TreeSupportUtils.h index 2f6378dc20..e6b2d9577f 100644 --- a/include/TreeSupportUtils.h +++ b/include/TreeSupportUtils.h @@ -139,6 +139,7 @@ class TreeSupportUtils support_shift, config.maximum_resolution, config.maximum_deviation, + config.settings, wall_line_count, narrow_area_width, infill_origin, @@ -148,12 +149,13 @@ class TreeSupportUtils use_endpieces, skip_some_zags, zag_skip_count, - pocket_size + pocket_size, + cross_fill_provider ); Polygons areas; Polygons lines; - roof_computation.generate(toolpaths, areas, lines, config.settings, layer_idx, SectionType::SUPPORT, cross_fill_provider); + roof_computation.generate(toolpaths, areas, lines, layer_idx, SectionType::SUPPORT); lines.add(toPolylines(areas)); lines.add(toPolylines(toolpaths)); return lines; diff --git a/include/infill.h b/include/infill.h index c6ce9ce4cd..d3e823cb8e 100644 --- a/include/infill.h +++ b/include/infill.h @@ -7,8 +7,8 @@ #include "infill/LightningGenerator.h" #include "infill/ZigzagConnectorProcessor.h" #include "settings/EnumSettings.h" //For infill types. -#include "settings/types/Angle.h" #include "settings/Settings.h" +#include "settings/types/Angle.h" #include "utils/ExtrusionLine.h" #include "utils/IntPoint.h" #include "utils/section_type.h" @@ -20,9 +20,15 @@ class AABB; class SierpinskiFillProvider; class SliceMeshStorage; +//namespace plugins::details +//{ +// struct infill_default; +//} + class Infill { friend class InfillTest; +// friend class plugins::details::infill_default; EFillMethod pattern; //!< the space filling pattern of the infill to generate bool zig_zaggify; //!< Whether to connect the end pieces of the support lines via the wall @@ -51,6 +57,11 @@ class Infill coord_t pocket_size; //!< The size of the pockets at the intersections of the fractal in the cross 3d pattern bool mirror_offset; //!< Indication in which offset direction the extra infill lines are made + const Settings& settings; + const SierpinskiFillProvider* cross_fill_provider = nullptr; + const LightningLayer * lightning_layer = nullptr; + const SliceMeshStorage* mesh = nullptr; + static constexpr double one_over_sqrt_2 = 0.7071067811865475244008443621048490392848359376884740; //!< 1.0 / sqrt(2.0) public: Infill(EFillMethod pattern @@ -66,6 +77,7 @@ class Infill , coord_t shift , coord_t max_resolution , coord_t max_deviation + , const Settings& settings , size_t wall_line_count = 0 , coord_t small_area_width = 0 , const Point& infill_origin = Point() @@ -76,6 +88,9 @@ class Infill , bool skip_some_zags = false , size_t zag_skip_count = 0 , coord_t pocket_size = 0 + , const SierpinskiFillProvider* cross_fill_provider = nullptr + , const LightningLayer* lightning_layer = nullptr + , const SliceMeshStorage* mesh = nullptr ) : pattern(pattern) , zig_zaggify(zig_zaggify) @@ -101,6 +116,10 @@ class Infill , zag_skip_count(zag_skip_count) , pocket_size(pocket_size) , mirror_offset(zig_zaggify) + , settings(settings) + , cross_fill_provider(cross_fill_provider) + , lightning_layer(lightning_layer) + , mesh(mesh) { //TODO: The connected lines algorithm is only available for linear-based infill, for now. //We skip ZigZag, Cross and Cross3D because they have their own algorithms. Eventually we want to replace all that with the new algorithm. @@ -119,7 +138,7 @@ class Infill * \param mesh A mesh for which to generate infill (should only be used for non-helper-mesh objects). * \param[in] cross_fill_provider The cross fractal subdivision decision functor */ - void generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, const Settings& settings, int layer_idx, SectionType section_type, const SierpinskiFillProvider* cross_fill_provider = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); + void generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, int layer_idx, SectionType section_type); /*! * Generate the wall toolpaths of an infill area. It will return the inner contour and set the inner-contour. @@ -138,16 +157,15 @@ class Infill /*! * Generate the infill pattern without the infill_multiplier functionality */ - void _generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, const Settings& settings, const SierpinskiFillProvider* cross_fill_pattern = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); - + void _generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines); /*! * Multiply the infill lines, so that any single line becomes [infill_multiplier] lines next to each other. - * + * * This is done in a way such that there is not overlap between the lines * except the middle original one if the multiplier is odd. - * + * * This introduces a lot of line segments. - * + * * \param[in,out] result_polygons The polygons to be multiplied (input and output) * \param[in,out] result_lines The lines to be multiplied (input and output) */ @@ -266,7 +284,7 @@ class Infill * \param toolpaths (output) The resulting toolpaths. Binned by inset_idx. * \param inset_value The offset between each consecutive two polygons */ - void generateConcentricInfill(std::vector& toolpaths, const Settings& settings); + void generateConcentricInfill(std::vector& toolpaths); /*! * Generate a rectangular grid of infill lines diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 36ee93e6f8..9157d728b4 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -44,6 +44,14 @@ struct simplify_default } }; +//struct infill_generate_default +//{ +// auto operator()(Infill& infill, auto&&... args) +// { +// return infill._generate(std::forward(args)...); +// } +//}; + /** * @brief Alias for the Simplify slot. * @@ -55,6 +63,9 @@ template using slot_simplify_ = SlotProxy; +//template +//using slot_infill_generate_ = SlotProxy; + /** * @brief Alias for the Postprocess slot. * @@ -223,6 +234,7 @@ class SlotConnectionFactory using slot_simplify = details::slot_simplify_; using slot_postprocess = details::slot_postprocess_<>; using slot_settings_broadcast = details::slot_settings_broadcast_<>; +//using slot_infill_generate = details::slot_infill_generate_; using SlotTypes = details::Typelist; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 9586059a53..64fdc416b6 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -639,6 +639,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) extra_infill_shift, max_resolution, max_deviation, + base_settings, wall_line_count, small_area_width, infill_origin, @@ -650,7 +651,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) zag_skip_count, pocket_size); std::vector raft_paths; - infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); + infill_comp.generate(raft_paths, raft_polygons, raftLines, layer_nr, SectionType::ADHESION); if (! raft_paths.empty()) { const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; @@ -765,6 +766,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) extra_infill_shift, interface_max_resolution, interface_max_deviation, + interface_settings, wall_line_count, small_area_width, infill_origin, @@ -776,7 +778,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) zag_skip_count, pocket_size); std::vector raft_paths; // Should remain empty, since we have no walls. - infill_comp.generate(raft_paths, raft_polygons, raft_lines, interface_settings, layer_nr, SectionType::ADHESION); + infill_comp.generate(raft_paths, raft_polygons, raft_lines, layer_nr, SectionType::ADHESION); gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_interface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); raft_polygons.clear(); @@ -870,6 +872,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) extra_infill_shift, surface_max_resolution, surface_max_deviation, + surface_settings, wall_line_count, small_area_width, infill_origin, @@ -881,7 +884,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) zag_skip_count, pocket_size); std::vector raft_paths; // Should remain empty, since we have no walls. - infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); + infill_comp.generate(raft_paths, raft_polygons, raft_lines, layer_nr, SectionType::ADHESION); gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); raft_polygons.clear(); @@ -1629,6 +1632,7 @@ bool FffGcodeWriter::processMultiLayerInfill( infill_shift, max_resolution, max_deviation, + mesh.settings, wall_line_count, small_area_width, infill_origin, @@ -1638,17 +1642,17 @@ bool FffGcodeWriter::processMultiLayerInfill( use_endpieces, skip_some_zags, zag_skip_count, - mesh.settings.get("cross_infill_pocket_size")); + mesh.settings.get("cross_infill_pocket_size"), + mesh.cross_fill_provider, + lightning_layer, + &mesh + ); infill_comp.generate( infill_paths, infill_polygons, infill_lines, - mesh.settings, gcode_layer.getLayerNr(), - SectionType::INFILL, - mesh.cross_fill_provider, - lightning_layer, - &mesh); + SectionType::INFILL); } if (! infill_lines.empty() || ! infill_polygons.empty()) { @@ -1835,6 +1839,7 @@ bool FffGcodeWriter::processSingleLayerInfill( infill_shift, max_resolution, max_deviation, + mesh.settings, skin_below_wall_count, small_area_width, infill_origin, @@ -1844,17 +1849,16 @@ bool FffGcodeWriter::processSingleLayerInfill( use_endpieces, skip_some_zags, zag_skip_count, - pocket_size); + pocket_size, + mesh.cross_fill_provider, + lightning_layer, + &mesh); infill_comp.generate( wall_tool_paths.back(), infill_polygons, infill_lines, - mesh.settings, gcode_layer.getLayerNr(), - SectionType::INFILL, - mesh.cross_fill_provider, - lightning_layer, - &mesh); + SectionType::INFILL); if (density_idx < last_idx) { const coord_t cut_offset = get_cut_offset(zig_zaggify_infill, infill_line_width, min_skin_below_wall_count); @@ -1900,6 +1904,7 @@ bool FffGcodeWriter::processSingleLayerInfill( infill_shift, max_resolution, max_deviation, + mesh.settings, wall_line_count_here, small_area_width, infill_origin, @@ -1909,17 +1914,18 @@ bool FffGcodeWriter::processSingleLayerInfill( use_endpieces, skip_some_zags, zag_skip_count, - pocket_size); + pocket_size, + mesh.cross_fill_provider, + lightning_layer, + &mesh + ); infill_comp.generate( wall_tool_paths.back(), infill_polygons, infill_lines, - mesh.settings, gcode_layer.getLayerNr(), - SectionType::INFILL, - mesh.cross_fill_provider, - lightning_layer, - &mesh); + SectionType::INFILL + ); if (density_idx < last_idx) { const coord_t cut_offset = get_cut_offset(zig_zaggify_infill, infill_line_width, wall_line_count); @@ -2761,6 +2767,7 @@ void FffGcodeWriter::processSkinPrintFeature( extra_infill_shift, max_resolution, max_deviation, + mesh.settings, wall_line_count, small_area_width, infill_origin, @@ -2771,7 +2778,7 @@ void FffGcodeWriter::processSkinPrintFeature( skip_some_zags, zag_skip_count, pocket_size); - infill_comp.generate(skin_paths, skin_polygons, skin_lines, mesh.settings, gcode_layer.getLayerNr(), SectionType::SKIN); + infill_comp.generate(skin_paths, skin_polygons, skin_lines, gcode_layer.getLayerNr(), SectionType::SKIN); // add paths if (! skin_polygons.empty() || ! skin_lines.empty() || ! skin_paths.empty()) @@ -3113,6 +3120,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer support_shift, max_resolution, max_deviation, + infill_extruder.settings, wall_count, small_area_width, infill_origin, @@ -3122,15 +3130,14 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer use_endpieces, skip_some_zags, zag_skip_count, - pocket_size); + pocket_size, + storage.support.cross_fill_provider); infill_comp.generate( wall_toolpaths_here, support_polygons, support_lines, - infill_extruder.settings, gcode_layer.getLayerNr(), - SectionType::SUPPORT, - storage.support.cross_fill_provider); + SectionType::SUPPORT); } if (need_travel_to_end_of_last_spiral && infill_extruder.settings.get("magic_spiralize")) @@ -3314,6 +3321,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay extra_infill_shift, max_resolution, max_deviation, + roof_extruder.settings, wall_line_count, small_area_width, infill_origin, @@ -3327,7 +3335,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay Polygons roof_polygons; std::vector roof_paths; Polygons roof_lines; - roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); + roof_computation.generate(roof_paths, roof_polygons, roof_lines, gcode_layer.getLayerNr(), SectionType::SUPPORT); if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) { return false; // We didn't create any support roof. @@ -3432,6 +3440,7 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L extra_infill_shift, max_resolution, max_deviation, + bottom_extruder.settings, wall_line_count, small_area_width, infill_origin, @@ -3445,7 +3454,7 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L Polygons bottom_polygons; std::vector bottom_paths; Polygons bottom_lines; - bottom_computation.generate(bottom_paths, bottom_polygons, bottom_lines, bottom_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); + bottom_computation.generate(bottom_paths, bottom_polygons, bottom_lines, gcode_layer.getLayerNr(), SectionType::SUPPORT); if (bottom_paths.empty() && bottom_polygons.empty() && bottom_lines.empty()) { return false; diff --git a/src/TopSurface.cpp b/src/TopSurface.cpp index 86d546e4ad..7c3553ef61 100644 --- a/src/TopSurface.cpp +++ b/src/TopSurface.cpp @@ -86,11 +86,11 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage } Polygons ironed_areas = areas.offset(ironing_inset); - Infill infill_generator(pattern, zig_zaggify_infill, connect_polygons, ironed_areas, line_width, line_spacing, infill_overlap, infill_multiplier, direction, layer.z - 10, shift, max_resolution, max_deviation, wall_line_count, small_area_width, infill_origin, skip_line_stitching); + Infill infill_generator(pattern, zig_zaggify_infill, connect_polygons, ironed_areas, line_width, line_spacing, infill_overlap, infill_multiplier, direction, layer.z - 10, shift, max_resolution, max_deviation, mesh.settings, wall_line_count, small_area_width, infill_origin, skip_line_stitching); std::vector ironing_paths; Polygons ironing_polygons; Polygons ironing_lines; - infill_generator.generate(ironing_paths, ironing_polygons, ironing_lines, mesh.settings, layer.getLayerNr(), SectionType::IRONING); + infill_generator.generate(ironing_paths, ironing_polygons, ironing_lines, layer.getLayerNr(), SectionType::IRONING); if(ironing_polygons.empty() && ironing_lines.empty() && ironing_paths.empty()) { diff --git a/src/infill.cpp b/src/infill.cpp index 26911124dc..662af51889 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -72,12 +72,8 @@ Polygons Infill::generateWallToolPaths(std::vector& toolpath void Infill::generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, - const Settings& settings, int layer_idx, - SectionType section_type, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh) + SectionType section_type) { if (outer_contour.empty()) { @@ -159,7 +155,9 @@ void Infill::generate(std::vector& toolpaths, Polygons generated_result_polygons; Polygons generated_result_lines; - _generate(toolpaths, generated_result_polygons, generated_result_lines, settings, cross_fill_provider, lightning_trees, mesh); + _generate(toolpaths, generated_result_polygons, generated_result_lines); + + zig_zaggify = zig_zaggify_real; multiplyInfill(generated_result_polygons, generated_result_lines); result_polygons.add(generated_result_polygons); @@ -171,7 +169,12 @@ void Infill::generate(std::vector& toolpaths, // So make sure we provide it with a Polygons that is safe to clear and only add stuff to result_lines. Polygons generated_result_polygons; Polygons generated_result_lines; - _generate(toolpaths, generated_result_polygons, generated_result_lines, settings, cross_fill_provider, lightning_trees, mesh); + + + + _generate(toolpaths, generated_result_polygons, generated_result_lines); + + result_polygons.add(generated_result_polygons); result_lines.add(generated_result_lines); } @@ -211,11 +214,7 @@ void Infill::generate(std::vector& toolpaths, void Infill::_generate(std::vector& toolpaths, Polygons& result_polygons, - Polygons& result_lines, - const Settings& settings, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh) + Polygons& result_lines) { if (inner_contour.empty()) return; @@ -246,7 +245,7 @@ void Infill::_generate(std::vector& toolpaths, generateTrihexagonInfill(result_lines); break; case EFillMethod::CONCENTRIC: - generateConcentricInfill(toolpaths, settings); + generateConcentricInfill(toolpaths); break; case EFillMethod::ZIG_ZAG: generateZigZagInfill(result_lines, line_distance, fill_angle); @@ -273,7 +272,7 @@ void Infill::_generate(std::vector& toolpaths, break; case EFillMethod::LIGHTNING: assert(lightning_trees); // "Cannot generate Lightning infill without a generator!\n" - generateLightningInfill(lightning_trees, result_lines); + generateLightningInfill(lightning_layer, result_lines); break; default: spdlog::error("Fill pattern has unknown value.\n"); @@ -386,7 +385,7 @@ void Infill::generateLightningInfill(const LightningLayer* trees, Polygons& resu result_lines.add(trees->convertToLines(inner_contour, infill_line_width)); } -void Infill::generateConcentricInfill(std::vector& toolpaths, const Settings& settings) +void Infill::generateConcentricInfill(std::vector& toolpaths) { const coord_t min_area = infill_line_width * infill_line_width; diff --git a/src/utils/polygonUtils.cpp b/src/utils/polygonUtils.cpp index 8135507834..2c02820f76 100644 --- a/src/utils/polygonUtils.cpp +++ b/src/utils/polygonUtils.cpp @@ -95,10 +95,10 @@ std::vector PolygonUtils::spreadDotsArea(const Polygons& polygons, Point { std::vector dummy_toolpaths; Settings dummy_settings; - Infill infill_gen(EFillMethod::LINES, false, false, polygons, 0, grid_size.X, 0, 1, 0, 0, 0, 0, 0); + Infill infill_gen(EFillMethod::LINES, false, false, polygons, 0, grid_size.X, 0, 1, 0, 0, 0, 0, 0, dummy_settings); Polygons result_polygons; Polygons result_lines; - infill_gen.generate(dummy_toolpaths, result_polygons, result_lines, dummy_settings, 0, SectionType::DOTS); // FIXME: @jellespijker make sure the propper layer nr is used + infill_gen.generate(dummy_toolpaths, result_polygons, result_lines, 0, SectionType::DOTS); // FIXME: @jellespijker make sure the propper layer nr is used std::vector result; for (PolygonRef line : result_lines) { From 30e27b1ca6e5cb79f94d67fdb0704d8d4acc1ee4 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 31 Jul 2023 16:59:59 +0200 Subject: [PATCH 166/470] Add infill slots to generate CURA-10619 --- include/TreeSupportUtils.h | 6 +- include/infill.h | 44 ++++++------- include/plugins/converters.h | 121 +++++++++++++++++++++++++++++++++-- include/plugins/slots.h | 23 +++---- src/FffGcodeWriter.cpp | 65 ++++++++----------- src/TopSurface.cpp | 22 ++++++- src/infill.cpp | 59 ++++++++++------- src/utils/polygonUtils.cpp | 4 +- 8 files changed, 235 insertions(+), 109 deletions(-) diff --git a/include/TreeSupportUtils.h b/include/TreeSupportUtils.h index e6b2d9577f..2f6378dc20 100644 --- a/include/TreeSupportUtils.h +++ b/include/TreeSupportUtils.h @@ -139,7 +139,6 @@ class TreeSupportUtils support_shift, config.maximum_resolution, config.maximum_deviation, - config.settings, wall_line_count, narrow_area_width, infill_origin, @@ -149,13 +148,12 @@ class TreeSupportUtils use_endpieces, skip_some_zags, zag_skip_count, - pocket_size, - cross_fill_provider + pocket_size ); Polygons areas; Polygons lines; - roof_computation.generate(toolpaths, areas, lines, layer_idx, SectionType::SUPPORT); + roof_computation.generate(toolpaths, areas, lines, config.settings, layer_idx, SectionType::SUPPORT, cross_fill_provider); lines.add(toPolylines(areas)); lines.add(toPolylines(toolpaths)); return lines; diff --git a/include/infill.h b/include/infill.h index d3e823cb8e..43d7ddf27c 100644 --- a/include/infill.h +++ b/include/infill.h @@ -7,8 +7,8 @@ #include "infill/LightningGenerator.h" #include "infill/ZigzagConnectorProcessor.h" #include "settings/EnumSettings.h" //For infill types. -#include "settings/Settings.h" #include "settings/types/Angle.h" +#include "settings/Settings.h" #include "utils/ExtrusionLine.h" #include "utils/IntPoint.h" #include "utils/section_type.h" @@ -20,15 +20,18 @@ class AABB; class SierpinskiFillProvider; class SliceMeshStorage; -//namespace plugins::details -//{ -// struct infill_default; -//} +namespace plugins { +namespace details { +struct infill_generate_default; +} +struct infill_generate_request; +} -class Infill +class Infill { friend class InfillTest; -// friend class plugins::details::infill_default; + friend class plugins::details::infill_generate_default; + friend class plugins::infill_generate_request; EFillMethod pattern; //!< the space filling pattern of the infill to generate bool zig_zaggify; //!< Whether to connect the end pieces of the support lines via the wall @@ -47,7 +50,7 @@ class Infill coord_t max_deviation; //!< Max deviation fro the original poly when enforcing max_resolution size_t wall_line_count; //!< Number of walls to generate at the boundary of the infill region, spaced \ref infill_line_width apart coord_t small_area_width; //!< Maximum width of a small infill region to be filled with walls - const Point infill_origin; //!< origin of the infill pattern + Point infill_origin; //!< origin of the infill pattern bool skip_line_stitching; //!< Whether to bypass the line stitching normally performed for polyline type infills bool fill_gaps; //!< Whether to fill gaps in strips of infill that would be too thin to fit the infill lines. If disabled, those areas are left empty. bool connected_zigzags; //!< (ZigZag) Whether endpieces of zigzag infill should be connected to the nearest infill line on both sides of the zigzag connector @@ -57,17 +60,14 @@ class Infill coord_t pocket_size; //!< The size of the pockets at the intersections of the fractal in the cross 3d pattern bool mirror_offset; //!< Indication in which offset direction the extra infill lines are made - const Settings& settings; - const SierpinskiFillProvider* cross_fill_provider = nullptr; - const LightningLayer * lightning_layer = nullptr; - const SliceMeshStorage* mesh = nullptr; - static constexpr double one_over_sqrt_2 = 0.7071067811865475244008443621048490392848359376884740; //!< 1.0 / sqrt(2.0) public: + Infill() = default; + Infill(EFillMethod pattern , bool zig_zaggify , bool connect_polygons - , const Polygons& in_outline + , const Polygons in_outline , coord_t infill_line_width , coord_t line_distance , coord_t infill_overlap @@ -77,7 +77,6 @@ class Infill , coord_t shift , coord_t max_resolution , coord_t max_deviation - , const Settings& settings , size_t wall_line_count = 0 , coord_t small_area_width = 0 , const Point& infill_origin = Point() @@ -88,10 +87,7 @@ class Infill , bool skip_some_zags = false , size_t zag_skip_count = 0 , coord_t pocket_size = 0 - , const SierpinskiFillProvider* cross_fill_provider = nullptr - , const LightningLayer* lightning_layer = nullptr - , const SliceMeshStorage* mesh = nullptr - ) + ) : pattern(pattern) , zig_zaggify(zig_zaggify) , connect_polygons(connect_polygons) @@ -116,10 +112,6 @@ class Infill , zag_skip_count(zag_skip_count) , pocket_size(pocket_size) , mirror_offset(zig_zaggify) - , settings(settings) - , cross_fill_provider(cross_fill_provider) - , lightning_layer(lightning_layer) - , mesh(mesh) { //TODO: The connected lines algorithm is only available for linear-based infill, for now. //We skip ZigZag, Cross and Cross3D because they have their own algorithms. Eventually we want to replace all that with the new algorithm. @@ -138,7 +130,7 @@ class Infill * \param mesh A mesh for which to generate infill (should only be used for non-helper-mesh objects). * \param[in] cross_fill_provider The cross fractal subdivision decision functor */ - void generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, int layer_idx, SectionType section_type); + void generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, const Settings& settings, int layer_idx, SectionType section_type, const SierpinskiFillProvider* cross_fill_provider = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! * Generate the wall toolpaths of an infill area. It will return the inner contour and set the inner-contour. @@ -157,7 +149,7 @@ class Infill /*! * Generate the infill pattern without the infill_multiplier functionality */ - void _generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines); + std::tuple, Polygons, Polygons> _generate(const Settings& settings, const SierpinskiFillProvider* cross_fill_pattern = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! * Multiply the infill lines, so that any single line becomes [infill_multiplier] lines next to each other. * @@ -284,7 +276,7 @@ class Infill * \param toolpaths (output) The resulting toolpaths. Binned by inset_idx. * \param inset_value The offset between each consecutive two polygons */ - void generateConcentricInfill(std::vector& toolpaths); + void generateConcentricInfill(std::vector& toolpaths, const Settings& settings); /*! * Generate a rectangular grid of infill lines diff --git a/include/plugins/converters.h b/include/plugins/converters.h index ca36ddb99c..3706bd3962 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -9,6 +9,7 @@ #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.pb.h" +#include "cura/plugins/slots/infill/v0/generate.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" @@ -264,11 +265,121 @@ struct postprocess_response } }; -// struct infill_generate_request -//{ -// using value_type = slots::infill::v0::generate::CallRequest -// using native_value_type = Polygons -// } +struct infill_generate_request +{ + using value_type = slots::infill::v0::generate::CallRequest; + using native_value_type = Infill; + + value_type operator()(native_value_type infill, + const Settings& settings, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh + ) const + { + value_type message{}; + + if (infill.inner_contour.empty()) + { + return message; + } + + auto* msg_infill_areas = message.mutable_infill_areas(); + auto* msg_polygons = msg_infill_areas->mutable_polygons(); + for (auto& polygon: infill.inner_contour.splitIntoParts()) + { + auto* msg_polygon = msg_polygons->Add(); + auto* msg_outline = msg_polygon->mutable_outline(); + + auto* msg_outline_path = msg_outline->add_path(); + for (const auto& point : ranges::front(polygon)) + { + msg_outline_path->set_x(point.X); + msg_outline_path->set_y(point.Y); + } + + auto* msg_holes = msg_polygon->mutable_holes(); + for (const auto& polygon : polygon.paths | ranges::views::drop(1)) + { + auto* msg_hole = msg_holes->Add(); + for (const auto& point : polygon) + { + auto* msg_path = msg_hole->add_path(); + msg_path->set_x(point.X); + msg_path->set_y(point.Y); + } + } + } + + return message; + } +}; + +struct infill_generate_response +{ + using value_type = slots::infill::v0::generate::CallResponse; + using native_value_type = std::tuple, Polygons, Polygons>; + + native_value_type operator()(const value_type& message) const + { + VariableWidthLines toolpaths; + Polygons result_polygons; + Polygons result_lines; + + for (auto& tool_path: message.tool_paths().tool_paths()) + { + ExtrusionLine lines; + for (auto& msg_junction: tool_path.junctions()) + { + auto& p = msg_junction.point(); + auto junction = ExtrusionJunction { p.x(), p.y(), msg_junction.width() }; + lines.emplace_back(junction); + } + + toolpaths.push_back(lines); + } + + std::vector toolpaths_; + toolpaths_.push_back(toolpaths); + + for (auto& polygon_msg: message.polygons().polygons()) + { + Polygons polygon {}; + + Polygon outline {}; + for (auto& path_msg: polygon_msg.outline().path()) + { + outline.add(Point{ path_msg.x(), path_msg.y() }); + } + polygon.add(outline); + + + for (auto& hole_msg: polygon_msg.holes()) + { + Polygon hole {}; + for (auto& path_msg: hole_msg.path()) + { + hole.add(Point{ path_msg.x(), path_msg.y() }); + } + polygon.add(hole); + } + + result_polygons.add(polygon); + } + + for (auto& polygon: message.poly_lines().paths()) + { + Polygon poly_line; + for (auto& p: polygon.path()) + { + poly_line.emplace_back(Point{ p.x(), p.y() }); + } + result_lines.emplace_back(poly_line); + } + + return std::make_tuple(toolpaths_, result_polygons, result_lines); + } +}; } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index bc4a5d35f0..de1a77cf0c 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -7,6 +7,7 @@ #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" +#include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" #include "infill.h" #include "plugins/converters.h" @@ -44,13 +45,13 @@ struct simplify_default } }; -//struct infill_generate_default -//{ -// auto operator()(Infill& infill, auto&&... args) -// { -// return infill._generate(std::forward(args)...); -// } -//}; +struct infill_generate_default +{ + auto operator()(Infill infill, auto&&... args) + { + return infill._generate(std::forward(args)...); + } +}; /** * @brief Alias for the Simplify slot. @@ -63,8 +64,8 @@ template using slot_simplify_ = SlotProxy; -//template -//using slot_infill_generate_ = SlotProxy; +template +using slot_infill_generate_ = SlotProxy; /** * @brief Alias for the Postprocess slot. @@ -234,9 +235,9 @@ class SlotConnectionFactory using slot_simplify = details::slot_simplify_; using slot_postprocess = details::slot_postprocess_<>; using slot_settings_broadcast = details::slot_settings_broadcast_<>; -//using slot_infill_generate = details::slot_infill_generate_; +using slot_infill_generate = details::slot_infill_generate_; -using SlotTypes = details::Typelist; +using SlotTypes = details::Typelist; } // namespace plugins using slots = plugins::details::SingletonRegistry; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 64fdc416b6..9586059a53 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -639,7 +639,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) extra_infill_shift, max_resolution, max_deviation, - base_settings, wall_line_count, small_area_width, infill_origin, @@ -651,7 +650,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) zag_skip_count, pocket_size); std::vector raft_paths; - infill_comp.generate(raft_paths, raft_polygons, raftLines, layer_nr, SectionType::ADHESION); + infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); if (! raft_paths.empty()) { const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; @@ -766,7 +765,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) extra_infill_shift, interface_max_resolution, interface_max_deviation, - interface_settings, wall_line_count, small_area_width, infill_origin, @@ -778,7 +776,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) zag_skip_count, pocket_size); std::vector raft_paths; // Should remain empty, since we have no walls. - infill_comp.generate(raft_paths, raft_polygons, raft_lines, layer_nr, SectionType::ADHESION); + infill_comp.generate(raft_paths, raft_polygons, raft_lines, interface_settings, layer_nr, SectionType::ADHESION); gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_interface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); raft_polygons.clear(); @@ -872,7 +870,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) extra_infill_shift, surface_max_resolution, surface_max_deviation, - surface_settings, wall_line_count, small_area_width, infill_origin, @@ -884,7 +881,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) zag_skip_count, pocket_size); std::vector raft_paths; // Should remain empty, since we have no walls. - infill_comp.generate(raft_paths, raft_polygons, raft_lines, layer_nr, SectionType::ADHESION); + infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); raft_polygons.clear(); @@ -1632,7 +1629,6 @@ bool FffGcodeWriter::processMultiLayerInfill( infill_shift, max_resolution, max_deviation, - mesh.settings, wall_line_count, small_area_width, infill_origin, @@ -1642,17 +1638,17 @@ bool FffGcodeWriter::processMultiLayerInfill( use_endpieces, skip_some_zags, zag_skip_count, - mesh.settings.get("cross_infill_pocket_size"), - mesh.cross_fill_provider, - lightning_layer, - &mesh - ); + mesh.settings.get("cross_infill_pocket_size")); infill_comp.generate( infill_paths, infill_polygons, infill_lines, + mesh.settings, gcode_layer.getLayerNr(), - SectionType::INFILL); + SectionType::INFILL, + mesh.cross_fill_provider, + lightning_layer, + &mesh); } if (! infill_lines.empty() || ! infill_polygons.empty()) { @@ -1839,7 +1835,6 @@ bool FffGcodeWriter::processSingleLayerInfill( infill_shift, max_resolution, max_deviation, - mesh.settings, skin_below_wall_count, small_area_width, infill_origin, @@ -1849,16 +1844,17 @@ bool FffGcodeWriter::processSingleLayerInfill( use_endpieces, skip_some_zags, zag_skip_count, - pocket_size, - mesh.cross_fill_provider, - lightning_layer, - &mesh); + pocket_size); infill_comp.generate( wall_tool_paths.back(), infill_polygons, infill_lines, + mesh.settings, gcode_layer.getLayerNr(), - SectionType::INFILL); + SectionType::INFILL, + mesh.cross_fill_provider, + lightning_layer, + &mesh); if (density_idx < last_idx) { const coord_t cut_offset = get_cut_offset(zig_zaggify_infill, infill_line_width, min_skin_below_wall_count); @@ -1904,7 +1900,6 @@ bool FffGcodeWriter::processSingleLayerInfill( infill_shift, max_resolution, max_deviation, - mesh.settings, wall_line_count_here, small_area_width, infill_origin, @@ -1914,18 +1909,17 @@ bool FffGcodeWriter::processSingleLayerInfill( use_endpieces, skip_some_zags, zag_skip_count, - pocket_size, - mesh.cross_fill_provider, - lightning_layer, - &mesh - ); + pocket_size); infill_comp.generate( wall_tool_paths.back(), infill_polygons, infill_lines, + mesh.settings, gcode_layer.getLayerNr(), - SectionType::INFILL - ); + SectionType::INFILL, + mesh.cross_fill_provider, + lightning_layer, + &mesh); if (density_idx < last_idx) { const coord_t cut_offset = get_cut_offset(zig_zaggify_infill, infill_line_width, wall_line_count); @@ -2767,7 +2761,6 @@ void FffGcodeWriter::processSkinPrintFeature( extra_infill_shift, max_resolution, max_deviation, - mesh.settings, wall_line_count, small_area_width, infill_origin, @@ -2778,7 +2771,7 @@ void FffGcodeWriter::processSkinPrintFeature( skip_some_zags, zag_skip_count, pocket_size); - infill_comp.generate(skin_paths, skin_polygons, skin_lines, gcode_layer.getLayerNr(), SectionType::SKIN); + infill_comp.generate(skin_paths, skin_polygons, skin_lines, mesh.settings, gcode_layer.getLayerNr(), SectionType::SKIN); // add paths if (! skin_polygons.empty() || ! skin_lines.empty() || ! skin_paths.empty()) @@ -3120,7 +3113,6 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer support_shift, max_resolution, max_deviation, - infill_extruder.settings, wall_count, small_area_width, infill_origin, @@ -3130,14 +3122,15 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer use_endpieces, skip_some_zags, zag_skip_count, - pocket_size, - storage.support.cross_fill_provider); + pocket_size); infill_comp.generate( wall_toolpaths_here, support_polygons, support_lines, + infill_extruder.settings, gcode_layer.getLayerNr(), - SectionType::SUPPORT); + SectionType::SUPPORT, + storage.support.cross_fill_provider); } if (need_travel_to_end_of_last_spiral && infill_extruder.settings.get("magic_spiralize")) @@ -3321,7 +3314,6 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay extra_infill_shift, max_resolution, max_deviation, - roof_extruder.settings, wall_line_count, small_area_width, infill_origin, @@ -3335,7 +3327,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay Polygons roof_polygons; std::vector roof_paths; Polygons roof_lines; - roof_computation.generate(roof_paths, roof_polygons, roof_lines, gcode_layer.getLayerNr(), SectionType::SUPPORT); + roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) { return false; // We didn't create any support roof. @@ -3440,7 +3432,6 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L extra_infill_shift, max_resolution, max_deviation, - bottom_extruder.settings, wall_line_count, small_area_width, infill_origin, @@ -3454,7 +3445,7 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L Polygons bottom_polygons; std::vector bottom_paths; Polygons bottom_lines; - bottom_computation.generate(bottom_paths, bottom_polygons, bottom_lines, gcode_layer.getLayerNr(), SectionType::SUPPORT); + bottom_computation.generate(bottom_paths, bottom_polygons, bottom_lines, bottom_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); if (bottom_paths.empty() && bottom_polygons.empty() && bottom_lines.empty()) { return false; diff --git a/src/TopSurface.cpp b/src/TopSurface.cpp index 7c3553ef61..ffa95e8f21 100644 --- a/src/TopSurface.cpp +++ b/src/TopSurface.cpp @@ -86,11 +86,29 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage } Polygons ironed_areas = areas.offset(ironing_inset); - Infill infill_generator(pattern, zig_zaggify_infill, connect_polygons, ironed_areas, line_width, line_spacing, infill_overlap, infill_multiplier, direction, layer.z - 10, shift, max_resolution, max_deviation, mesh.settings, wall_line_count, small_area_width, infill_origin, skip_line_stitching); + Infill infill_generator( + pattern, + zig_zaggify_infill, + connect_polygons, + ironed_areas, + line_width, + line_spacing, + infill_overlap, + infill_multiplier, + direction, + layer.z - 10, + shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_line_stitching + ); std::vector ironing_paths; Polygons ironing_polygons; Polygons ironing_lines; - infill_generator.generate(ironing_paths, ironing_polygons, ironing_lines, layer.getLayerNr(), SectionType::IRONING); + infill_generator.generate(ironing_paths, ironing_polygons, ironing_lines, mesh.settings, layer.getLayerNr(), SectionType::IRONING); if(ironing_polygons.empty() && ironing_lines.empty() && ironing_paths.empty()) { diff --git a/src/infill.cpp b/src/infill.cpp index 662af51889..7cc5546958 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -1,15 +1,9 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include //For std::sort. -#include -#include - -#include -#include +#include "infill.h" #include "WallToolPaths.h" -#include "infill.h" #include "infill/GyroidInfill.h" #include "infill/ImageBasedDensityProvider.h" #include "infill/LightningGenerator.h" @@ -18,6 +12,7 @@ #include "infill/SierpinskiFillProvider.h" #include "infill/SubDivCube.h" #include "infill/UniformDensityProvider.h" +#include "plugins/slots.h" #include "sliceDataStorage.h" #include "utils/PolygonConnector.h" #include "utils/PolylineStitcher.h" @@ -25,6 +20,13 @@ #include "utils/UnionFind.h" #include "utils/polygonUtils.h" +#include +#include + +#include //For std::sort. +#include +#include + /*! * Function which returns the scanline_idx for a given x coordinate * @@ -72,8 +74,12 @@ Polygons Infill::generateWallToolPaths(std::vector& toolpath void Infill::generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, + const Settings& settings, int layer_idx, - SectionType section_type) + SectionType section_type, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh) { if (outer_contour.empty()) { @@ -155,8 +161,10 @@ void Infill::generate(std::vector& toolpaths, Polygons generated_result_polygons; Polygons generated_result_lines; - _generate(toolpaths, generated_result_polygons, generated_result_lines); - + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); + toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); + generated_result_polygons.add(generated_result_polygons_); + generated_result_lines.add(generated_result_lines_); zig_zaggify = zig_zaggify_real; multiplyInfill(generated_result_polygons, generated_result_lines); @@ -170,10 +178,10 @@ void Infill::generate(std::vector& toolpaths, Polygons generated_result_polygons; Polygons generated_result_lines; - - - _generate(toolpaths, generated_result_polygons, generated_result_lines); - + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); + toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); + generated_result_polygons.add(generated_result_polygons_); + generated_result_lines.add(generated_result_lines_); result_polygons.add(generated_result_polygons); result_lines.add(generated_result_lines); @@ -212,14 +220,21 @@ void Infill::generate(std::vector& toolpaths, } } -void Infill::_generate(std::vector& toolpaths, - Polygons& result_polygons, - Polygons& result_lines) +std::tuple, Polygons, Polygons> Infill::_generate( + const Settings& settings, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh + ) { if (inner_contour.empty()) - return; + return {}; if (line_distance == 0) - return; + return {}; + + std::vector toolpaths; + Polygons result_polygons; + Polygons result_lines; switch (pattern) { @@ -245,7 +260,7 @@ void Infill::_generate(std::vector& toolpaths, generateTrihexagonInfill(result_lines); break; case EFillMethod::CONCENTRIC: - generateConcentricInfill(toolpaths); + generateConcentricInfill(toolpaths, settings); break; case EFillMethod::ZIG_ZAG: generateZigZagInfill(result_lines, line_distance, fill_angle); @@ -272,7 +287,7 @@ void Infill::_generate(std::vector& toolpaths, break; case EFillMethod::LIGHTNING: assert(lightning_trees); // "Cannot generate Lightning infill without a generator!\n" - generateLightningInfill(lightning_layer, result_lines); + generateLightningInfill(lightning_trees, result_lines); break; default: spdlog::error("Fill pattern has unknown value.\n"); @@ -385,7 +400,7 @@ void Infill::generateLightningInfill(const LightningLayer* trees, Polygons& resu result_lines.add(trees->convertToLines(inner_contour, infill_line_width)); } -void Infill::generateConcentricInfill(std::vector& toolpaths) +void Infill::generateConcentricInfill(std::vector& toolpaths, const Settings& settings) { const coord_t min_area = infill_line_width * infill_line_width; diff --git a/src/utils/polygonUtils.cpp b/src/utils/polygonUtils.cpp index 2c02820f76..8135507834 100644 --- a/src/utils/polygonUtils.cpp +++ b/src/utils/polygonUtils.cpp @@ -95,10 +95,10 @@ std::vector PolygonUtils::spreadDotsArea(const Polygons& polygons, Point { std::vector dummy_toolpaths; Settings dummy_settings; - Infill infill_gen(EFillMethod::LINES, false, false, polygons, 0, grid_size.X, 0, 1, 0, 0, 0, 0, 0, dummy_settings); + Infill infill_gen(EFillMethod::LINES, false, false, polygons, 0, grid_size.X, 0, 1, 0, 0, 0, 0, 0); Polygons result_polygons; Polygons result_lines; - infill_gen.generate(dummy_toolpaths, result_polygons, result_lines, 0, SectionType::DOTS); // FIXME: @jellespijker make sure the propper layer nr is used + infill_gen.generate(dummy_toolpaths, result_polygons, result_lines, dummy_settings, 0, SectionType::DOTS); // FIXME: @jellespijker make sure the propper layer nr is used std::vector result; for (PolygonRef line : result_lines) { From f5a96cc992aab20053d9189aaa382f36aeec41eb Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Mon, 31 Jul 2023 15:00:45 +0000 Subject: [PATCH 167/470] Applied clang-format. --- include/infill.h | 226 ++++++++++++++++++++--------------- include/plugins/converters.h | 58 ++++----- include/plugins/slots.h | 11 +- src/TopSurface.cpp | 77 +++++++----- src/infill.cpp | 200 ++++++++++++++++++++----------- 5 files changed, 347 insertions(+), 225 deletions(-) diff --git a/include/infill.h b/include/infill.h index 43d7ddf27c..906f069421 100644 --- a/include/infill.h +++ b/include/infill.h @@ -7,8 +7,8 @@ #include "infill/LightningGenerator.h" #include "infill/ZigzagConnectorProcessor.h" #include "settings/EnumSettings.h" //For infill types. -#include "settings/types/Angle.h" #include "settings/Settings.h" +#include "settings/types/Angle.h" #include "utils/ExtrusionLine.h" #include "utils/IntPoint.h" #include "utils/section_type.h" @@ -20,12 +20,14 @@ class AABB; class SierpinskiFillProvider; class SliceMeshStorage; -namespace plugins { -namespace details { +namespace plugins +{ +namespace details +{ struct infill_generate_default; } struct infill_generate_request; -} +} // namespace plugins class Infill { @@ -55,8 +57,8 @@ class Infill bool fill_gaps; //!< Whether to fill gaps in strips of infill that would be too thin to fit the infill lines. If disabled, those areas are left empty. bool connected_zigzags; //!< (ZigZag) Whether endpieces of zigzag infill should be connected to the nearest infill line on both sides of the zigzag connector bool use_endpieces; //!< (ZigZag) Whether to include endpieces: zigzag connector segments from one infill line to itself - bool skip_some_zags; //!< (ZigZag) Whether to skip some zags - size_t zag_skip_count; //!< (ZigZag) To skip one zag in every N if skip some zags is enabled + bool skip_some_zags; //!< (ZigZag) Whether to skip some zags + size_t zag_skip_count; //!< (ZigZag) To skip one zag in every N if skip some zags is enabled coord_t pocket_size; //!< The size of the pockets at the intersections of the fractal in the cross 3d pattern bool mirror_offset; //!< Indication in which offset direction the extra infill lines are made @@ -64,64 +66,67 @@ class Infill public: Infill() = default; - Infill(EFillMethod pattern - , bool zig_zaggify - , bool connect_polygons - , const Polygons in_outline - , coord_t infill_line_width - , coord_t line_distance - , coord_t infill_overlap - , size_t infill_multiplier - , AngleDegrees fill_angle - , coord_t z - , coord_t shift - , coord_t max_resolution - , coord_t max_deviation - , size_t wall_line_count = 0 - , coord_t small_area_width = 0 - , const Point& infill_origin = Point() - , bool skip_line_stitching = false - , bool fill_gaps = true - , bool connected_zigzags = false - , bool use_endpieces = false - , bool skip_some_zags = false - , size_t zag_skip_count = 0 - , coord_t pocket_size = 0 - ) - : pattern(pattern) - , zig_zaggify(zig_zaggify) - , connect_polygons(connect_polygons) - , outer_contour(in_outline) - , infill_line_width(infill_line_width) - , line_distance(line_distance) - , infill_overlap(infill_overlap) - , infill_multiplier(infill_multiplier) - , fill_angle(fill_angle) - , z(z) - , shift(shift) - , max_resolution(max_resolution) - , max_deviation(max_deviation) - , wall_line_count(wall_line_count) - , small_area_width(0) // FIXME!: Disable small_area_width for the 5.4.x releases. Current plan is to figure out why this feature causes small line segments & fix that before 5.5.x - , infill_origin(infill_origin) - , skip_line_stitching(skip_line_stitching) - , fill_gaps(fill_gaps) - , connected_zigzags(connected_zigzags) - , use_endpieces(use_endpieces) - , skip_some_zags(skip_some_zags) - , zag_skip_count(zag_skip_count) - , pocket_size(pocket_size) - , mirror_offset(zig_zaggify) + Infill( + EFillMethod pattern, + bool zig_zaggify, + bool connect_polygons, + const Polygons in_outline, + coord_t infill_line_width, + coord_t line_distance, + coord_t infill_overlap, + size_t infill_multiplier, + AngleDegrees fill_angle, + coord_t z, + coord_t shift, + coord_t max_resolution, + coord_t max_deviation, + size_t wall_line_count = 0, + coord_t small_area_width = 0, + const Point& infill_origin = Point(), + bool skip_line_stitching = false, + bool fill_gaps = true, + bool connected_zigzags = false, + bool use_endpieces = false, + bool skip_some_zags = false, + size_t zag_skip_count = 0, + coord_t pocket_size = 0) + : pattern(pattern) + , zig_zaggify(zig_zaggify) + , connect_polygons(connect_polygons) + , outer_contour(in_outline) + , infill_line_width(infill_line_width) + , line_distance(line_distance) + , infill_overlap(infill_overlap) + , infill_multiplier(infill_multiplier) + , fill_angle(fill_angle) + , z(z) + , shift(shift) + , max_resolution(max_resolution) + , max_deviation(max_deviation) + , wall_line_count(wall_line_count) + , small_area_width( + 0) // FIXME!: Disable small_area_width for the 5.4.x releases. Current plan is to figure out why this feature causes small line segments & fix that before 5.5.x + , infill_origin(infill_origin) + , skip_line_stitching(skip_line_stitching) + , fill_gaps(fill_gaps) + , connected_zigzags(connected_zigzags) + , use_endpieces(use_endpieces) + , skip_some_zags(skip_some_zags) + , zag_skip_count(zag_skip_count) + , pocket_size(pocket_size) + , mirror_offset(zig_zaggify) { - //TODO: The connected lines algorithm is only available for linear-based infill, for now. - //We skip ZigZag, Cross and Cross3D because they have their own algorithms. Eventually we want to replace all that with the new algorithm. - //Cubic Subdivision ends lines in the center of the infill so it won't be effective. - connect_lines = zig_zaggify && (pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON); + // TODO: The connected lines algorithm is only available for linear-based infill, for now. + // We skip ZigZag, Cross and Cross3D because they have their own algorithms. Eventually we want to replace all that with the new algorithm. + // Cubic Subdivision ends lines in the center of the infill so it won't be effective. + connect_lines = zig_zaggify + && (pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC + || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON); } /*! * Generate the infill. - * + * * \param toolpaths (output) The resulting variable-width paths (from the extra walls around the pattern). Binned by inset_idx. * \param result_polygons (output) The resulting polygons (from concentric infill) * \param result_lines (output) The resulting line segments (from linear infill types) @@ -130,7 +135,16 @@ class Infill * \param mesh A mesh for which to generate infill (should only be used for non-helper-mesh objects). * \param[in] cross_fill_provider The cross fractal subdivision decision functor */ - void generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, const Settings& settings, int layer_idx, SectionType section_type, const SierpinskiFillProvider* cross_fill_provider = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); + void generate( + std::vector& toolpaths, + Polygons& result_polygons, + Polygons& result_lines, + const Settings& settings, + int layer_idx, + SectionType section_type, + const SierpinskiFillProvider* cross_fill_provider = nullptr, + const LightningLayer* lightning_layer = nullptr, + const SliceMeshStorage* mesh = nullptr); /*! * Generate the wall toolpaths of an infill area. It will return the inner contour and set the inner-contour. @@ -144,12 +158,25 @@ class Infill * \param settings [in] A settings storage to use for generating variable-width walls. * \return The inner contour of the wall toolpaths */ - static Polygons generateWallToolPaths(std::vector& toolpaths, Polygons& outer_contour, const size_t wall_line_count, const coord_t line_width, const coord_t infill_overlap, const Settings& settings, int layer_idx, SectionType section_type); + static Polygons generateWallToolPaths( + std::vector& toolpaths, + Polygons& outer_contour, + const size_t wall_line_count, + const coord_t line_width, + const coord_t infill_overlap, + const Settings& settings, + int layer_idx, + SectionType section_type); + private: /*! * Generate the infill pattern without the infill_multiplier functionality */ - std::tuple, Polygons, Polygons> _generate(const Settings& settings, const SierpinskiFillProvider* cross_fill_pattern = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); + std::tuple, Polygons, Polygons> _generate( + const Settings& settings, + const SierpinskiFillProvider* cross_fill_pattern = nullptr, + const LightningLayer* lightning_layer = nullptr, + const SliceMeshStorage* mesh = nullptr); /*! * Multiply the infill lines, so that any single line becomes [infill_multiplier] lines next to each other. * @@ -181,9 +208,7 @@ class Infill , end_segment(end_segment) , end_polygon(end_polygon) , previous(nullptr) - , next(nullptr) - { - }; + , next(nullptr){}; /*! * Where the line segment starts. @@ -246,7 +271,7 @@ class Infill * This is necessary for putting line segments in a hash set. * \param other The line segment to compare this line segment with. */ - bool operator ==(const InfillLineSegment& other) const; + bool operator==(const InfillLineSegment& other) const; }; /*! @@ -262,7 +287,7 @@ class Infill * \param result_polygons (output) The resulting polygons, if zigzagging accidentally happened to connect gyroid lines in a circle. */ void generateGyroidInfill(Polygons& result_polylines, Polygons& result_polygons); - + /*! * Generate lightning fill aka minfill aka 'Ribbed Support Vault Infill', see Tricard,Claux,Lefebvre/'Ribbed Support Vaults for 3D Printing of Hollowed Objects' * see https://hal.archives-ouvertes.fr/hal-02155929/document @@ -272,7 +297,7 @@ class Infill /*! * Generate sparse concentric infill - * + * * \param toolpaths (output) The resulting toolpaths. Binned by inset_idx. * \param inset_value The offset between each consecutive two polygons */ @@ -305,7 +330,7 @@ class Infill /*! * Generate a single shifting square grid of infill lines. * This is used in tetrahedral infill (Octet infill) and in Quarter Cubic infill. - * + * * \param pattern_z_shift The amount by which to shift the whole pattern down * \param angle_shift The angle to add to the infill_angle * \param[out] result (output) The resulting lines @@ -342,94 +367,101 @@ class Infill /*! * Convert a mapping from scanline to line_segment-scanline-intersections (\p cut_list) into line segments, using the even-odd rule * \param[out] result (output) The resulting lines - * \param rotation_matrix The rotation matrix (un)applied to enforce the angle of the infill + * \param rotation_matrix The rotation matrix (un)applied to enforce the angle of the infill * \param scanline_min_idx The lowest index of all scanlines crossing the polygon * \param line_distance The distance between two lines which are in the same direction * \param boundary The axis aligned boundary box within which the polygon is * \param cut_list A mapping of each scanline to all y-coordinates (in the space transformed by rotation_matrix) where the polygons are crossing the scanline * \param total_shift total shift of the scanlines in the direction perpendicular to the fill_angle. */ - void addLineInfill( Polygons& result, - const PointMatrix& rotation_matrix, - const int scanline_min_idx, - const int line_distance, - const AABB boundary, - std::vector>& cut_list, - coord_t total_shift); + void addLineInfill( + Polygons& result, + const PointMatrix& rotation_matrix, + const int scanline_min_idx, + const int line_distance, + const AABB boundary, + std::vector>& cut_list, + coord_t total_shift); /*! * generate lines within the area of \p in_outline, at regular intervals of \p line_distance - * + * * idea: * intersect a regular grid of 'scanlines' with the area inside \p in_outline - * + * * \param[out] result (output) The resulting lines * \param line_distance The distance between two lines which are in the same direction * \param infill_rotation The angle of the generated lines * \param extra_shift extra shift of the scanlines in the direction perpendicular to the infill_rotation */ void generateLineInfill(Polygons& result, int line_distance, const double& infill_rotation, coord_t extra_shift); - + /*! * Function for creating linear based infill types (Lines, ZigZag). - * + * * This function implements the basic functionality of Infill::generateLineInfill (see doc of that function), * but makes calls to a ZigzagConnectorProcessor which handles what to do with each line segment - scanline intersection. - * + * * It is called only from Infill::generateLineinfill and Infill::generateZigZagInfill. * * \param[out] result (output) The resulting lines * \param line_distance The distance between two lines which are in the same direction - * \param rotation_matrix The rotation matrix (un)applied to enforce the angle of the infill + * \param rotation_matrix The rotation matrix (un)applied to enforce the angle of the infill * \param zigzag_connector_processor The processor used to generate zigzag connectors * \param connected_zigzags Whether to connect the endpiece zigzag segments on both sides to the same infill line * \param extra_shift extra shift of the scanlines in the direction perpendicular to the fill_angle */ - void generateLinearBasedInfill(Polygons& result, const int line_distance, const PointMatrix& rotation_matrix, ZigzagConnectorProcessor& zigzag_connector_processor, const bool connected_zigzags, coord_t extra_shift); + void generateLinearBasedInfill( + Polygons& result, + const int line_distance, + const PointMatrix& rotation_matrix, + ZigzagConnectorProcessor& zigzag_connector_processor, + const bool connected_zigzags, + coord_t extra_shift); /*! - * + * * generate lines within the area of [in_outline], at regular intervals of [line_distance] * idea: * intersect a regular grid of 'scanlines' with the area inside [in_outline] (see generateLineInfill) * zigzag: * include pieces of boundary, connecting the lines, forming an accordion like zigzag instead of separate lines |_|^|_| - * + * * Note that ZigZag consists of 3 types: * - without endpieces * - with disconnected endpieces * - with connected endpieces - * + * * <-- * ___ * | | | * | | | * | |___| * --> - * + * * ^ = even scanline * ^ ^ no endpieces - * + * * start boundary from even scanline! :D - * - * + * + * * v disconnected end piece: leave out last line segment * _____ * | | | \ . * | | | | * |_____| |__/ - * + * * ^ ^ ^ scanlines - * - * + * + * * v connected end piece * ________ * | | | \ . * | | | | * |_____| |__/ . - * + * * ^ ^ ^ scanlines - * + * * \param[out] result (output) The resulting lines * \param line_distance The distance between two lines which are in the same direction * \param infill_rotation The angle of the generated lines @@ -456,6 +488,6 @@ class Infill void connectLines(Polygons& result_lines); }; -}//namespace cura +} // namespace cura #endif // INFILL_H diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 3706bd3962..f14d1308fd 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -267,16 +267,16 @@ struct postprocess_response struct infill_generate_request { - using value_type = slots::infill::v0::generate::CallRequest; - using native_value_type = Infill; - - value_type operator()(native_value_type infill, - const Settings& settings, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh - ) const - { + using value_type = slots::infill::v0::generate::CallRequest; + using native_value_type = Infill; + + value_type operator()( + native_value_type infill, + const Settings& settings, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh) const + { value_type message{}; if (infill.inner_contour.empty()) @@ -286,7 +286,7 @@ struct infill_generate_request auto* msg_infill_areas = message.mutable_infill_areas(); auto* msg_polygons = msg_infill_areas->mutable_polygons(); - for (auto& polygon: infill.inner_contour.splitIntoParts()) + for (auto& polygon : infill.inner_contour.splitIntoParts()) { auto* msg_polygon = msg_polygons->Add(); auto* msg_outline = msg_polygon->mutable_outline(); @@ -312,27 +312,27 @@ struct infill_generate_request } return message; - } + } }; struct infill_generate_response { - using value_type = slots::infill::v0::generate::CallResponse; - using native_value_type = std::tuple, Polygons, Polygons>; + using value_type = slots::infill::v0::generate::CallResponse; + using native_value_type = std::tuple, Polygons, Polygons>; - native_value_type operator()(const value_type& message) const - { + native_value_type operator()(const value_type& message) const + { VariableWidthLines toolpaths; Polygons result_polygons; Polygons result_lines; - for (auto& tool_path: message.tool_paths().tool_paths()) + for (auto& tool_path : message.tool_paths().tool_paths()) { ExtrusionLine lines; - for (auto& msg_junction: tool_path.junctions()) + for (auto& msg_junction : tool_path.junctions()) { auto& p = msg_junction.point(); - auto junction = ExtrusionJunction { p.x(), p.y(), msg_junction.width() }; + auto junction = ExtrusionJunction{ p.x(), p.y(), msg_junction.width() }; lines.emplace_back(junction); } @@ -342,22 +342,22 @@ struct infill_generate_response std::vector toolpaths_; toolpaths_.push_back(toolpaths); - for (auto& polygon_msg: message.polygons().polygons()) + for (auto& polygon_msg : message.polygons().polygons()) { - Polygons polygon {}; + Polygons polygon{}; - Polygon outline {}; - for (auto& path_msg: polygon_msg.outline().path()) + Polygon outline{}; + for (auto& path_msg : polygon_msg.outline().path()) { outline.add(Point{ path_msg.x(), path_msg.y() }); } polygon.add(outline); - for (auto& hole_msg: polygon_msg.holes()) + for (auto& hole_msg : polygon_msg.holes()) { - Polygon hole {}; - for (auto& path_msg: hole_msg.path()) + Polygon hole{}; + for (auto& path_msg : hole_msg.path()) { hole.add(Point{ path_msg.x(), path_msg.y() }); } @@ -367,10 +367,10 @@ struct infill_generate_response result_polygons.add(polygon); } - for (auto& polygon: message.poly_lines().paths()) + for (auto& polygon : message.poly_lines().paths()) { Polygon poly_line; - for (auto& p: polygon.path()) + for (auto& p : polygon.path()) { poly_line.emplace_back(Point{ p.x(), p.y() }); } @@ -378,7 +378,7 @@ struct infill_generate_response } return std::make_tuple(toolpaths_, result_polygons, result_lines); - } + } }; } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index de1a77cf0c..6a705fb446 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -5,9 +5,9 @@ #define PLUGINS_SLOTS_H #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" +#include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" -#include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" #include "infill.h" #include "plugins/converters.h" @@ -65,7 +65,14 @@ using slot_simplify_ = SlotProxy; template -using slot_infill_generate_ = SlotProxy; +using slot_infill_generate_ = SlotProxy< + v0::SlotID::INFILL_GENERATE, + "<=1.0.0", + slots::infill::v0::generate::InfillGenerateService::Stub, + Validator, + infill_generate_request, + infill_generate_response, + Default>; /** * @brief Alias for the Postprocess slot. diff --git a/src/TopSurface.cpp b/src/TopSurface.cpp index ffa95e8f21..7accc653bc 100644 --- a/src/TopSurface.cpp +++ b/src/TopSurface.cpp @@ -1,28 +1,29 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include "infill.h" -#include "LayerPlan.h" -#include "sliceDataStorage.h" #include "TopSurface.h" + #include "ExtruderTrain.h" +#include "LayerPlan.h" +#include "infill.h" +#include "sliceDataStorage.h" namespace cura { TopSurface::TopSurface() { - //Do nothing. Areas stays empty. + // Do nothing. Areas stays empty. } void TopSurface::setAreasFromMeshAndLayerNumber(SliceMeshStorage& mesh, size_t layer_number) { - //The top surface is all parts of the mesh where there's no mesh above it, so find the layer above it first. + // The top surface is all parts of the mesh where there's no mesh above it, so find the layer above it first. Polygons mesh_above; if (layer_number < mesh.layers.size() - 1) { mesh_above = mesh.layers[layer_number + 1].getOutlines(); - } //If this is the top-most layer, mesh_above stays empty. + } // If this is the top-most layer, mesh_above stays empty. if (mesh.settings.get("magic_spiralize")) { @@ -39,13 +40,14 @@ void TopSurface::setAreasFromMeshAndLayerNumber(SliceMeshStorage& mesh, size_t l } } -bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const GCodePathConfig& line_config, LayerPlan& layer, const FffGcodeWriter& gcode_writer) const +bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const GCodePathConfig& line_config, LayerPlan& layer, const FffGcodeWriter& gcode_writer) + const { if (areas.empty()) { - return false; //Nothing to do. + return false; // Nothing to do. } - //Generate the lines to cover the surface. + // Generate the lines to cover the surface. const int extruder_nr = mesh.settings.get("top_bottom_extruder_nr").extruder_nr; const EFillMethod pattern = mesh.settings.get("ironing_pattern"); const bool zig_zaggify_infill = pattern == EFillMethod::ZIG_ZAG; @@ -55,7 +57,7 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage const size_t roofing_layer_count = std::min(mesh.settings.get("roofing_layer_count"), mesh.settings.get("top_layers")); const std::vector& top_most_skin_angles = (roofing_layer_count > 0) ? mesh.roofing_angles : mesh.skin_angles; assert(top_most_skin_angles.size() > 0); - const AngleDegrees direction = top_most_skin_angles[layer.getLayerNr() % top_most_skin_angles.size()] + AngleDegrees(90.0); //Always perpendicular to the skin lines. + const AngleDegrees direction = top_most_skin_angles[layer.getLayerNr() % top_most_skin_angles.size()] + AngleDegrees(90.0); // Always perpendicular to the skin lines. constexpr coord_t infill_overlap = 0; constexpr int infill_multiplier = 1; constexpr coord_t shift = 0; @@ -71,17 +73,17 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage coord_t ironing_inset = -mesh.settings.get("ironing_inset"); if (pattern == EFillMethod::ZIG_ZAG) { - //Compensate for the outline_offset decrease that takes place when using the infill generator to generate ironing with the zigzag pattern + // Compensate for the outline_offset decrease that takes place when using the infill generator to generate ironing with the zigzag pattern const Ratio width_scale = (float)mesh.settings.get("layer_height") / mesh.settings.get("infill_sparse_thickness"); ironing_inset += width_scale * line_width / 2; - //Align the edge of the ironing line with the edge of the outer wall + // Align the edge of the ironing line with the edge of the outer wall ironing_inset -= ironing_flow * line_width / 2; } else if (pattern == EFillMethod::CONCENTRIC) { - //Counteract the outline_offset increase that takes place when using the infill generator to generate ironing with the concentric pattern + // Counteract the outline_offset increase that takes place when using the infill generator to generate ironing with the concentric pattern ironing_inset += line_spacing - line_width / 2; - //Align the edge of the ironing line with the edge of the outer wall + // Align the edge of the ironing line with the edge of the outer wall ironing_inset -= ironing_flow * line_width / 2; } Polygons ironed_areas = areas.offset(ironing_inset); @@ -103,38 +105,38 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage wall_line_count, small_area_width, infill_origin, - skip_line_stitching - ); + skip_line_stitching); std::vector ironing_paths; Polygons ironing_polygons; Polygons ironing_lines; infill_generator.generate(ironing_paths, ironing_polygons, ironing_lines, mesh.settings, layer.getLayerNr(), SectionType::IRONING); - if(ironing_polygons.empty() && ironing_lines.empty() && ironing_paths.empty()) + if (ironing_polygons.empty() && ironing_lines.empty() && ironing_paths.empty()) { - return false; //Nothing to do. + return false; // Nothing to do. } layer.mode_skip_agressive_merge = true; bool added = false; - if(!ironing_polygons.empty()) + if (! ironing_polygons.empty()) { constexpr bool force_comb_retract = false; layer.addTravel(ironing_polygons[0][0], force_comb_retract); layer.addPolygonsByOptimizer(ironing_polygons, line_config, ZSeamConfig()); added = true; } - if(!ironing_lines.empty()) + if (! ironing_lines.empty()) { if (pattern == EFillMethod::LINES || pattern == EFillMethod::ZIG_ZAG) { - //Move to a corner of the area that is perpendicular to the ironing lines, to reduce the number of seams. + // Move to a corner of the area that is perpendicular to the ironing lines, to reduce the number of seams. const AABB bounding_box(ironed_areas); PointMatrix rotate(-direction + 90); const Point center = bounding_box.getMiddle(); - const Point far_away = rotate.apply(Point(0, vSize(bounding_box.max - center) * 100)); //Some direction very far away in the direction perpendicular to the ironing lines, relative to the centre. - //Two options to start, both perpendicular to the ironing lines. Which is closer? + const Point far_away = rotate.apply( + Point(0, vSize(bounding_box.max - center) * 100)); // Some direction very far away in the direction perpendicular to the ironing lines, relative to the centre. + // Two options to start, both perpendicular to the ironing lines. Which is closer? const Point front_side = PolygonUtils::findNearestVert(center + far_away, ironed_areas).p(); const Point back_side = PolygonUtils::findNearestVert(center - far_away, ironed_areas).p(); if (vSize2(layer.getLastPlannedPositionOrStartingPosition() - front_side) < vSize2(layer.getLastPlannedPositionOrStartingPosition() - back_side)) @@ -147,25 +149,40 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage } } - if( ! enforce_monotonic_order) + if (! enforce_monotonic_order) { layer.addLinesByOptimizer(ironing_lines, line_config, SpaceFillType::PolyLines); } else { - const coord_t max_adjacent_distance = line_spacing * 1.1; //Lines are considered adjacent - meaning they need to be printed in monotonic order - if spaced 1 line apart, with 10% extra play. + const coord_t max_adjacent_distance + = line_spacing * 1.1; // Lines are considered adjacent - meaning they need to be printed in monotonic order - if spaced 1 line apart, with 10% extra play. layer.addLinesMonotonic(Polygons(), ironing_lines, line_config, SpaceFillType::PolyLines, AngleRadians(direction), max_adjacent_distance); } added = true; } - if(!ironing_paths.empty()) + if (! ironing_paths.empty()) { constexpr bool retract_before_outer_wall = false; constexpr coord_t wipe_dist = 0u; const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); - InsetOrderOptimizer wall_orderer(gcode_writer, storage, layer, mesh.settings, extruder_nr, - line_config, line_config, line_config, line_config, - retract_before_outer_wall, wipe_dist, wipe_dist, extruder_nr, extruder_nr, z_seam_config, ironing_paths); + InsetOrderOptimizer wall_orderer( + gcode_writer, + storage, + layer, + mesh.settings, + extruder_nr, + line_config, + line_config, + line_config, + line_config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + extruder_nr, + extruder_nr, + z_seam_config, + ironing_paths); wall_orderer.addToLayer(); added = true; } @@ -174,4 +191,4 @@ bool TopSurface::ironing(const SliceDataStorage& storage, const SliceMeshStorage return added; } -} +} // namespace cura diff --git a/src/infill.cpp b/src/infill.cpp index 7cc5546958..cae9b1ebc2 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -51,7 +51,15 @@ static inline int computeScanSegmentIdx(int x, int line_width) namespace cura { -Polygons Infill::generateWallToolPaths(std::vector& toolpaths, Polygons& outer_contour, const size_t wall_line_count, const coord_t line_width, const coord_t infill_overlap, const Settings& settings, int layer_idx, SectionType section_type) +Polygons Infill::generateWallToolPaths( + std::vector& toolpaths, + Polygons& outer_contour, + const size_t wall_line_count, + const coord_t line_width, + const coord_t infill_overlap, + const Settings& settings, + int layer_idx, + SectionType section_type) { outer_contour = outer_contour.offset(infill_overlap); scripta::log("infill_outer_contour", outer_contour, section_type, layer_idx, scripta::CellVDI{ "infill_overlap", infill_overlap }); @@ -71,15 +79,16 @@ Polygons Infill::generateWallToolPaths(std::vector& toolpath return inner_contour; } -void Infill::generate(std::vector& toolpaths, - Polygons& result_polygons, - Polygons& result_lines, - const Settings& settings, - int layer_idx, - SectionType section_type, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh) +void Infill::generate( + std::vector& toolpaths, + Polygons& result_polygons, + Polygons& result_lines, + const Settings& settings, + int layer_idx, + SectionType section_type, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh) { if (outer_contour.empty()) { @@ -106,10 +115,8 @@ void Infill::generate(std::vector& toolpaths, small_infill.clear(); for (const auto& small_infill_part : small_infill_parts) { - if ( - small_infill_part.offset(-infill_line_width / 2).offset(infill_line_width / 2).area() < infill_line_width * infill_line_width * 10 - && ! inner_contour.intersection(small_infill_part.offset(infill_line_width / 4)).empty() - ) + if (small_infill_part.offset(-infill_line_width / 2).offset(infill_line_width / 2).area() < infill_line_width * infill_line_width * 10 + && ! inner_contour.intersection(small_infill_part.offset(infill_line_width / 4)).empty()) { inner_contour.add(small_infill_part); } @@ -125,12 +132,16 @@ void Infill::generate(std::vector& toolpaths, const size_t narrow_wall_count = small_area_width / infill_line_width + 1; WallToolPaths wall_toolpaths(small_infill, infill_line_width, narrow_wall_count, 0, settings, layer_idx, section_type); std::vector small_infill_paths = wall_toolpaths.getToolPaths(); - scripta::log("infill_small_infill_paths_0", small_infill_paths, section_type, layer_idx, - scripta::CellVDI{"is_closed", &ExtrusionLine::is_closed }, - scripta::CellVDI{"is_odd", &ExtrusionLine::is_odd }, - scripta::CellVDI{"inset_idx", &ExtrusionLine::inset_idx }, - scripta::PointVDI{"width", &ExtrusionJunction::w }, - scripta::PointVDI{"perimeter_index", &ExtrusionJunction::perimeter_index }); + scripta::log( + "infill_small_infill_paths_0", + small_infill_paths, + section_type, + layer_idx, + scripta::CellVDI{ "is_closed", &ExtrusionLine::is_closed }, + scripta::CellVDI{ "is_odd", &ExtrusionLine::is_odd }, + scripta::CellVDI{ "inset_idx", &ExtrusionLine::inset_idx }, + scripta::PointVDI{ "width", &ExtrusionJunction::w }, + scripta::PointVDI{ "perimeter_index", &ExtrusionJunction::perimeter_index }); for (const auto& small_infill_path : small_infill_paths) { toolpaths.emplace_back(small_infill_path); @@ -142,9 +153,11 @@ void Infill::generate(std::vector& toolpaths, if (pattern == EFillMethod::ZIG_ZAG // Zig-zag prints the zags along the walls. || (zig_zaggify && (pattern == EFillMethod::LINES // Zig-zaggified infill patterns print their zags along the walls. - || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON - || pattern == EFillMethod::GYROID || pattern == EFillMethod::CROSS || pattern == EFillMethod::CROSS_3D)) - || infill_multiplier % 2 == 0) // Multiplied infill prints loops of infill, partly along the walls, if even. For odd multipliers >1 it gets offset by the multiply algorithm itself. + || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC || pattern == EFillMethod::TETRAHEDRAL + || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON || pattern == EFillMethod::GYROID || pattern == EFillMethod::CROSS + || pattern == EFillMethod::CROSS_3D)) + || infill_multiplier % 2 + == 0) // Multiplied infill prints loops of infill, partly along the walls, if even. For odd multipliers >1 it gets offset by the multiply algorithm itself. { inner_contour = inner_contour.offset(-infill_line_width / 2); inner_contour = Simplify(max_resolution, max_deviation, 0).polygon(inner_contour); @@ -161,7 +174,8 @@ void Infill::generate(std::vector& toolpaths, Polygons generated_result_polygons; Polygons generated_result_lines; - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] + = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); generated_result_polygons.add(generated_result_polygons_); generated_result_lines.add(generated_result_lines_); @@ -178,7 +192,8 @@ void Infill::generate(std::vector& toolpaths, Polygons generated_result_polygons; Polygons generated_result_lines; - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] + = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); generated_result_polygons.add(generated_result_polygons_); generated_result_lines.add(generated_result_lines_); @@ -188,17 +203,27 @@ void Infill::generate(std::vector& toolpaths, } scripta::log("infill_result_polygons_0", result_polygons, section_type, layer_idx); scripta::log("infill_result_lines_0", result_lines, section_type, layer_idx); - scripta::log("infill_toolpaths_0", toolpaths, section_type, layer_idx, - scripta::CellVDI{"is_closed", &ExtrusionLine::is_closed }, - scripta::CellVDI{"is_odd", &ExtrusionLine::is_odd }, - scripta::CellVDI{"inset_idx", &ExtrusionLine::inset_idx }, - scripta::PointVDI{"width", &ExtrusionJunction::w }, - scripta::PointVDI{"perimeter_index", &ExtrusionJunction::perimeter_index }); + scripta::log( + "infill_toolpaths_0", + toolpaths, + section_type, + layer_idx, + scripta::CellVDI{ "is_closed", &ExtrusionLine::is_closed }, + scripta::CellVDI{ "is_odd", &ExtrusionLine::is_odd }, + scripta::CellVDI{ "inset_idx", &ExtrusionLine::inset_idx }, + scripta::PointVDI{ "width", &ExtrusionJunction::w }, + scripta::PointVDI{ "perimeter_index", &ExtrusionJunction::perimeter_index }); if (connect_polygons) { // remove too small polygons coord_t snap_distance = infill_line_width * 2; // polygons with a span of max 1 * nozzle_size are too small - auto it = std::remove_if(result_polygons.begin(), result_polygons.end(), [snap_distance](PolygonRef poly) { return poly.shorterThan(snap_distance); }); + auto it = std::remove_if( + result_polygons.begin(), + result_polygons.end(), + [snap_distance](PolygonRef poly) + { + return poly.shorterThan(snap_distance); + }); result_polygons.erase(it, result_polygons.end()); PolygonConnector connector(infill_line_width); @@ -211,21 +236,21 @@ void Infill::generate(std::vector& toolpaths, toolpaths = connected_paths; scripta::log("infill_result_polygons_1", result_polygons, section_type, layer_idx); scripta::log("infill_result_lines_1", result_lines, section_type, layer_idx); - scripta::log("infill_toolpaths_1", toolpaths, section_type, layer_idx, - scripta::CellVDI{"is_closed", &ExtrusionLine::is_closed }, - scripta::CellVDI{"is_odd", &ExtrusionLine::is_odd }, - scripta::CellVDI{"inset_idx", &ExtrusionLine::inset_idx }, - scripta::PointVDI{"width", &ExtrusionJunction::w }, - scripta::PointVDI{"perimeter_index", &ExtrusionJunction::perimeter_index }); + scripta::log( + "infill_toolpaths_1", + toolpaths, + section_type, + layer_idx, + scripta::CellVDI{ "is_closed", &ExtrusionLine::is_closed }, + scripta::CellVDI{ "is_odd", &ExtrusionLine::is_odd }, + scripta::CellVDI{ "inset_idx", &ExtrusionLine::inset_idx }, + scripta::PointVDI{ "width", &ExtrusionJunction::w }, + scripta::PointVDI{ "perimeter_index", &ExtrusionJunction::perimeter_index }); } } -std::tuple, Polygons, Polygons> Infill::_generate( - const Settings& settings, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh - ) +std::tuple, Polygons, Polygons> + Infill::_generate(const Settings& settings, const SierpinskiFillProvider* cross_fill_provider, const LightningLayer* lightning_trees, const SliceMeshStorage* mesh) { if (inner_contour.empty()) return {}; @@ -305,7 +330,9 @@ std::tuple, Polygons, Polygons> Infill::_generat Simplify simplifier(max_resolution, max_deviation, 0); result_polygons = simplifier.polygon(result_polygons); - if (! skip_line_stitching && (zig_zaggify || pattern == EFillMethod::CROSS || pattern == EFillMethod::CROSS_3D || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::GYROID || pattern == EFillMethod::ZIG_ZAG)) + if (! skip_line_stitching + && (zig_zaggify || pattern == EFillMethod::CROSS || pattern == EFillMethod::CROSS_3D || pattern == EFillMethod::CUBICSUBDIV || pattern == EFillMethod::GYROID + || pattern == EFillMethod::ZIG_ZAG)) { // don't stich for non-zig-zagged line infill types Polygons stitched_lines; PolylineStitcher::stitch(result_lines, stitched_lines, result_polygons, infill_line_width); @@ -332,7 +359,8 @@ void Infill::multiplyInfill(Polygons& result_polygons, Polygons& result_lines) const Polygons first_offset_polygons_inward = result_polygons.offset(-offset); // make lines on the inside of the input polygons const Polygons first_offset_polygons_outward = result_polygons.offset(offset); // make lines on the other side of the input polygons const Polygons first_offset_polygons = first_offset_polygons_outward.difference(first_offset_polygons_inward); - first_offset = first_offset_lines.unionPolygons(first_offset_polygons); // usually we only have either lines or polygons, but this code also handles an infill pattern which generates both + first_offset = first_offset_lines.unionPolygons( + first_offset_polygons); // usually we only have either lines or polygons, but this code also handles an infill pattern which generates both if (zig_zaggify) { first_offset = inner_contour.difference(first_offset); @@ -419,7 +447,8 @@ void Infill::generateConcentricInfill(std::vector& toolpaths constexpr size_t inset_wall_count = 1; // 1 wall at a time. constexpr coord_t wall_0_inset = 0; // Don't apply any outer wall inset for these. That's just for the outer wall. - WallToolPaths wall_toolpaths(current_inset, infill_line_width, inset_wall_count, wall_0_inset, settings, 0, SectionType::CONCENTRIC_INFILL); // FIXME: @jellespijker pass the correct layer + WallToolPaths wall_toolpaths(current_inset, infill_line_width, inset_wall_count, wall_0_inset, settings, 0, SectionType::CONCENTRIC_INFILL); // FIXME: @jellespijker pass + // the correct layer const std::vector inset_paths = wall_toolpaths.getToolPaths(); toolpaths.insert(toolpaths.end(), inset_paths.begin(), inset_paths.end()); @@ -513,7 +542,14 @@ void Infill::generateCrossInfill(const SierpinskiFillProvider& cross_fill_provid } } -void Infill::addLineInfill(Polygons& result, const PointMatrix& rotation_matrix, const int scanline_min_idx, const int line_distance, const AABB boundary, std::vector>& cut_list, coord_t shift) +void Infill::addLineInfill( + Polygons& result, + const PointMatrix& rotation_matrix, + const int scanline_min_idx, + const int line_distance, + const AABB boundary, + std::vector>& cut_list, + coord_t shift) { assert(! connect_lines && "connectLines() should add the infill lines, not addLineInfill"); @@ -590,7 +626,13 @@ void Infill::generateZigZagInfill(Polygons& result, const coord_t line_distance, * Edit: the term scansegment is wrong, since I call a boundary segment leaving from an even scanline to the left as belonging to an even scansegment, * while I also call a boundary segment leaving from an even scanline toward the right as belonging to an even scansegment. */ -void Infill::generateLinearBasedInfill(Polygons& result, const int line_distance, const PointMatrix& rotation_matrix, ZigzagConnectorProcessor& zigzag_connector_processor, const bool connected_zigzags, coord_t extra_shift) +void Infill::generateLinearBasedInfill( + Polygons& result, + const int line_distance, + const PointMatrix& rotation_matrix, + ZigzagConnectorProcessor& zigzag_connector_processor, + const bool connected_zigzags, + coord_t extra_shift) { if (line_distance == 0 || inner_contour.empty()) // No infill to generate (0% density) or no area to generate it in. { @@ -621,7 +663,10 @@ void Infill::generateLinearBasedInfill(Polygons& result, const int line_distance // Then we can later join two crossings together to form lines and still know what polygon line segments that infill line connected to. struct Crossing { - Crossing(Point coordinate, size_t polygon_index, size_t vertex_index) : coordinate(coordinate), polygon_index(polygon_index), vertex_index(vertex_index){}; + Crossing(Point coordinate, size_t polygon_index, size_t vertex_index) + : coordinate(coordinate) + , polygon_index(polygon_index) + , vertex_index(vertex_index){}; Point coordinate; size_t polygon_index; size_t vertex_index; @@ -670,12 +715,14 @@ void Infill::generateLinearBasedInfill(Polygons& result, const int line_distance if (p0.X < p1.X) { scanline_idx0 = computeScanSegmentIdx(p0.X - shift, line_distance) + 1; // + 1 cause we don't cross the scanline of the first scan segment - scanline_idx1 = computeScanSegmentIdx(p1.X - shift, line_distance); // -1 cause the vertex point is handled in the next segment (or not in the case which looks like >) + scanline_idx1 + = computeScanSegmentIdx(p1.X - shift, line_distance); // -1 cause the vertex point is handled in the next segment (or not in the case which looks like >) } else { direction = -1; - scanline_idx0 = computeScanSegmentIdx(p0.X - shift, line_distance); // -1 cause the vertex point is handled in the previous segment (or not in the case which looks like >) + scanline_idx0 + = computeScanSegmentIdx(p0.X - shift, line_distance); // -1 cause the vertex point is handled in the previous segment (or not in the case which looks like >) scanline_idx1 = computeScanSegmentIdx(p1.X - shift, line_distance) + 1; // + 1 cause we don't cross the scanline of the first scan segment } @@ -715,7 +762,8 @@ void Infill::generateLinearBasedInfill(Polygons& result, const int line_distance { continue; } - InfillLineSegment* new_segment = new InfillLineSegment(unrotated_first, first.vertex_index, first.polygon_index, unrotated_second, second.vertex_index, second.polygon_index); + InfillLineSegment* new_segment + = new InfillLineSegment(unrotated_first, first.vertex_index, first.polygon_index, unrotated_second, second.vertex_index, second.polygon_index); // Put the same line segment in the data structure twice: Once for each of the polygon line segment that it crosses. crossings_on_line[first.polygon_index][first.vertex_index].push_back(new_segment); crossings_on_line[second.polygon_index][second.vertex_index].push_back(new_segment); @@ -774,15 +822,18 @@ void Infill::connectLines(Polygons& result_lines) Point vertex_after = inner_contour_polygon[vertex_index]; // Sort crossings on every line by how far they are from their initial point. - std::sort(crossings_on_polygon_segment.begin(), - crossings_on_polygon_segment.end(), - [&vertex_before, polygon_index, vertex_index](InfillLineSegment* left_hand_side, InfillLineSegment* right_hand_side) - { - // Find the two endpoints that are relevant. - const Point left_hand_point = (left_hand_side->start_segment == vertex_index && left_hand_side->start_polygon == polygon_index) ? left_hand_side->start : left_hand_side->end; - const Point right_hand_point = (right_hand_side->start_segment == vertex_index && right_hand_side->start_polygon == polygon_index) ? right_hand_side->start : right_hand_side->end; - return vSize(left_hand_point - vertex_before) < vSize(right_hand_point - vertex_before); - }); + std::sort( + crossings_on_polygon_segment.begin(), + crossings_on_polygon_segment.end(), + [&vertex_before, polygon_index, vertex_index](InfillLineSegment* left_hand_side, InfillLineSegment* right_hand_side) + { + // Find the two endpoints that are relevant. + const Point left_hand_point + = (left_hand_side->start_segment == vertex_index && left_hand_side->start_polygon == polygon_index) ? left_hand_side->start : left_hand_side->end; + const Point right_hand_point + = (right_hand_side->start_segment == vertex_index && right_hand_side->start_polygon == polygon_index) ? right_hand_side->start : right_hand_side->end; + return vSize(left_hand_point - vertex_before) < vSize(right_hand_point - vertex_before); + }); for (InfillLineSegment* crossing : crossings_on_polygon_segment) { @@ -797,14 +848,16 @@ void Infill::connectLines(Polygons& result_lines) assert(crossing_handle != (size_t)-1); const size_t previous_crossing_handle = connected_lines.find(previous_crossing); assert(previous_crossing_handle != (size_t)-1); - if (crossing_handle == previous_crossing_handle) // These two infill lines are already connected. Don't create a loop now. Continue connecting with the next crossing. + if (crossing_handle + == previous_crossing_handle) // These two infill lines are already connected. Don't create a loop now. Continue connecting with the next crossing. { continue; } // Join two infill lines together with a connecting line. // Here the InfillLineSegments function as a linked list, so that they can easily be joined. - const Point previous_point = (previous_segment->start_segment == vertex_index && previous_segment->start_polygon == polygon_index) ? previous_segment->start : previous_segment->end; + const Point previous_point + = (previous_segment->start_segment == vertex_index && previous_segment->start_polygon == polygon_index) ? previous_segment->start : previous_segment->end; const Point next_point = (crossing->start_segment == vertex_index && crossing->start_polygon == polygon_index) ? crossing->start : crossing->end; InfillLineSegment* new_segment; // If the segment is zero length, we avoid creating it but still want to connect the crossing with the previous segment @@ -822,7 +875,8 @@ void Infill::connectLines(Polygons& result_lines) } else { - new_segment = new InfillLineSegment(previous_point, vertex_index, polygon_index, next_point, vertex_index, polygon_index); // A connecting line between them. + new_segment + = new InfillLineSegment(previous_point, vertex_index, polygon_index, next_point, vertex_index, polygon_index); // A connecting line between them. new_segment->previous = previous_segment; if (previous_segment->start_segment == vertex_index && previous_segment->start_polygon == polygon_index) { @@ -863,7 +917,13 @@ void Infill::connectLines(Polygons& result_lines) } else { - new_segment = new InfillLineSegment(previous_segment->start, vertex_index, polygon_index, vertex_after, (vertex_index + 1) % inner_contour[polygon_index].size(), polygon_index); + new_segment = new InfillLineSegment( + previous_segment->start, + vertex_index, + polygon_index, + vertex_after, + (vertex_index + 1) % inner_contour[polygon_index].size(), + polygon_index); previous_segment->previous = new_segment; new_segment->previous = previous_segment; previous_segment = new_segment; @@ -879,7 +939,13 @@ void Infill::connectLines(Polygons& result_lines) } else { - new_segment = new InfillLineSegment(previous_segment->end, vertex_index, polygon_index, vertex_after, (vertex_index + 1) % inner_contour[polygon_index].size(), polygon_index); + new_segment = new InfillLineSegment( + previous_segment->end, + vertex_index, + polygon_index, + vertex_after, + (vertex_index + 1) % inner_contour[polygon_index].size(), + polygon_index); previous_segment->next = new_segment; new_segment->previous = previous_segment; previous_segment = new_segment; From 787bad091b2a3807741fe4065416ab6156924f09 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 31 Jul 2023 17:06:29 +0200 Subject: [PATCH 168/470] Fixed merge conflict CURA-10619 --- include/infill.h | 63 +++++++++++++++++++++--------------- include/plugins/converters.h | 1 + 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/include/infill.h b/include/infill.h index 906f069421..f5ca5d1e43 100644 --- a/include/infill.h +++ b/include/infill.h @@ -35,32 +35,35 @@ class Infill friend class plugins::details::infill_generate_default; friend class plugins::infill_generate_request; - EFillMethod pattern; //!< the space filling pattern of the infill to generate - bool zig_zaggify; //!< Whether to connect the end pieces of the support lines via the wall - bool connect_lines; //!< Whether the lines and zig_zaggification are generated by the connectLines algorithm - bool connect_polygons; //!< Whether to connect as much polygons together into a single path - Polygons outer_contour; //!< The area that originally needs to be filled with infill. The input of the algorithm. - Polygons inner_contour; //!< The part of the contour that will get filled with an infill pattern. Equals outer_contour minus the extra infill walls. - coord_t infill_line_width; //!< The line width of the infill lines to generate - coord_t line_distance; //!< The distance between two infill lines / polygons - coord_t infill_overlap; //!< the distance by which to overlap with the actual area within which to generate infill - size_t infill_multiplier; //!< the number of infill lines next to each other - AngleDegrees fill_angle; //!< for linear infill types: the angle of the infill lines (or the angle of the grid) - coord_t z; //!< height of the layer for which we generate infill - coord_t shift; //!< shift of the scanlines in the direction perpendicular to the fill_angle - coord_t max_resolution; //!< Min feature size of the output - coord_t max_deviation; //!< Max deviation fro the original poly when enforcing max_resolution - size_t wall_line_count; //!< Number of walls to generate at the boundary of the infill region, spaced \ref infill_line_width apart - coord_t small_area_width; //!< Maximum width of a small infill region to be filled with walls - Point infill_origin; //!< origin of the infill pattern - bool skip_line_stitching; //!< Whether to bypass the line stitching normally performed for polyline type infills - bool fill_gaps; //!< Whether to fill gaps in strips of infill that would be too thin to fit the infill lines. If disabled, those areas are left empty. - bool connected_zigzags; //!< (ZigZag) Whether endpieces of zigzag infill should be connected to the nearest infill line on both sides of the zigzag connector - bool use_endpieces; //!< (ZigZag) Whether to include endpieces: zigzag connector segments from one infill line to itself - bool skip_some_zags; //!< (ZigZag) Whether to skip some zags - size_t zag_skip_count; //!< (ZigZag) To skip one zag in every N if skip some zags is enabled - coord_t pocket_size; //!< The size of the pockets at the intersections of the fractal in the cross 3d pattern - bool mirror_offset; //!< Indication in which offset direction the extra infill lines are made + EFillMethod pattern{}; //!< the space filling pattern of the infill to generate + bool zig_zaggify{}; //!< Whether to connect the end pieces of the support lines via the wall + bool connect_lines{ calcConnectLines(pattern, zig_zaggify) }; //!< Whether the lines and zig_zaggification are generated by the connectLines algorithm + // TODO: The connected lines algorithm is only available for linear-based infill, for now. + // We skip ZigZag, Cross and Cross3D because they have their own algorithms. Eventually we want to replace all that with the new algorithm. + // Cubic Subdivision ends lines in the center of the infill so it won't be effective. + bool connect_polygons{}; //!< Whether to connect as much polygons together into a single path + Polygons outer_contour{}; //!< The area that originally needs to be filled with infill. The input of the algorithm. + Polygons inner_contour{}; //!< The part of the contour that will get filled with an infill pattern. Equals outer_contour minus the extra infill walls. + coord_t infill_line_width{}; //!< The line width of the infill lines to generate + coord_t line_distance{}; //!< The distance between two infill lines / polygons + coord_t infill_overlap{}; //!< the distance by which to overlap with the actual area within which to generate infill + size_t infill_multiplier{}; //!< the number of infill lines next to each other + AngleDegrees fill_angle{}; //!< for linear infill types: the angle of the infill lines (or the angle of the grid) + coord_t z{}; //!< height of the layer for which we generate infill + coord_t shift{}; //!< shift of the scanlines in the direction perpendicular to the fill_angle + coord_t max_resolution{}; //!< Min feature size of the output + coord_t max_deviation{}; //!< Max deviation fro the original poly when enforcing max_resolution + size_t wall_line_count{}; //!< Number of walls to generate at the boundary of the infill region, spaced \ref infill_line_width apart + coord_t small_area_width{}; //!< Maximum width of a small infill region to be filled with walls + Point infill_origin{}; //!< origin of the infill pattern + bool skip_line_stitching{}; //!< Whether to bypass the line stitching normally performed for polyline type infills + bool fill_gaps{}; //!< Whether to fill gaps in strips of infill that would be too thin to fit the infill lines. If disabled, those areas are left empty. + bool connected_zigzags{}; //!< (ZigZag) Whether endpieces of zigzag infill should be connected to the nearest infill line on both sides of the zigzag connector + bool use_endpieces{}; //!< (ZigZag) Whether to include endpieces: zigzag connector segments from one infill line to itself + bool skip_some_zags{}; //!< (ZigZag) Whether to skip some zags + size_t zag_skip_count{}; //!< (ZigZag) To skip one zag in every N if skip some zags is enabled + coord_t pocket_size{}; //!< The size of the pockets at the intersections of the fractal in the cross 3d pattern + bool mirror_offset{}; //!< Indication in which offset direction the extra infill lines are made static constexpr double one_over_sqrt_2 = 0.7071067811865475244008443621048490392848359376884740; //!< 1.0 / sqrt(2.0) public: @@ -169,6 +172,13 @@ class Infill SectionType section_type); private: + constexpr bool calcConnectLines(const auto& pattern, const auto& zig_zaggify) const + { + return zig_zaggify + && (pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC + || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON); + } + /*! * Generate the infill pattern without the infill_multiplier functionality */ @@ -487,6 +497,7 @@ class Infill */ void connectLines(Polygons& result_lines); }; +static_assert(std::semiregular, "Infill should be semiregular"); } // namespace cura diff --git a/include/plugins/converters.h b/include/plugins/converters.h index f14d1308fd..d359660675 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -9,6 +9,7 @@ #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.pb.h" +#include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" #include "cura/plugins/slots/infill/v0/generate.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.pb.h" From aa7e83a8072849ea19e8d689d03eae05c8b98a05 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 31 Jul 2023 17:47:28 +0200 Subject: [PATCH 169/470] Ensure default constructible CURA-10619 --- include/TopSurface.h | 5 +- include/infill.h | 150 ++++++++++++++++++++++++++++++------------- 2 files changed, 109 insertions(+), 46 deletions(-) diff --git a/include/TopSurface.h b/include/TopSurface.h index dcc5e5b9c2..05affb5ad9 100644 --- a/include/TopSurface.h +++ b/include/TopSurface.h @@ -1,5 +1,5 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef TOPSURFACE_H #define TOPSURFACE_H @@ -13,6 +13,7 @@ class GCodePathConfig; class FffGcodeWriter; class LayerPlan; class SliceMeshStorage; +class SliceDataStorage; class TopSurface { diff --git a/include/infill.h b/include/infill.h index f5ca5d1e43..2fbfa80b72 100644 --- a/include/infill.h +++ b/include/infill.h @@ -13,6 +13,8 @@ #include "utils/IntPoint.h" #include "utils/section_type.h" +#include + namespace cura { @@ -65,15 +67,81 @@ class Infill coord_t pocket_size{}; //!< The size of the pockets at the intersections of the fractal in the cross 3d pattern bool mirror_offset{}; //!< Indication in which offset direction the extra infill lines are made - static constexpr double one_over_sqrt_2 = 0.7071067811865475244008443621048490392848359376884740; //!< 1.0 / sqrt(2.0) + static constexpr auto one_over_sqrt_2 = 1.0 / std::numbers::sqrt2; + public: - Infill() = default; + constexpr Infill() noexcept = default; + + Infill( + EFillMethod pattern, + bool zig_zaggify, + bool connect_polygons, + Polygons in_outline, + coord_t infill_line_width, + coord_t line_distance, + coord_t infill_overlap, + size_t infill_multiplier, + AngleDegrees fill_angle, + coord_t z, + coord_t shift, + coord_t max_resolution, + coord_t max_deviation) noexcept + : pattern{ pattern } + , zig_zaggify{ zig_zaggify } + , connect_polygons{ connect_polygons } + , outer_contour{ in_outline } + , infill_line_width{ infill_line_width } + , line_distance{ line_distance } + , infill_overlap{ infill_overlap } + , infill_multiplier{ infill_multiplier } + , fill_angle{ fill_angle } + , z{ z } + , shift{ shift } + , max_resolution{ max_resolution } + , max_deviation{ max_deviation } {}; + + Infill( + EFillMethod pattern, + bool zig_zaggify, + bool connect_polygons, + Polygons in_outline, + coord_t infill_line_width, + coord_t line_distance, + coord_t infill_overlap, + size_t infill_multiplier, + AngleDegrees fill_angle, + coord_t z, + coord_t shift, + coord_t max_resolution, + coord_t max_deviation, + size_t wall_line_count, + coord_t small_area_width, + Point infill_origin, + bool skip_line_stitching) noexcept + : pattern{ pattern } + , zig_zaggify{ zig_zaggify } + , connect_polygons{ connect_polygons } + , outer_contour{ in_outline } + , infill_line_width{ infill_line_width } + , line_distance{ line_distance } + , infill_overlap{ infill_overlap } + , infill_multiplier{ infill_multiplier } + , fill_angle{ fill_angle } + , z{ z } + , shift{ shift } + , max_resolution{ max_resolution } + , max_deviation{ max_deviation } + , wall_line_count{ wall_line_count } + , small_area_width{ 0 } + // FIXME!: Disable small_area_width for the 5.4.x releases. Current plan is to figure out why this feature causes small line segments & fix that before 5.5.0 + , infill_origin{ infill_origin } + , skip_line_stitching{ skip_line_stitching } {}; Infill( EFillMethod pattern, bool zig_zaggify, bool connect_polygons, - const Polygons in_outline, + Polygons in_outline, coord_t infill_line_width, coord_t line_distance, coord_t infill_overlap, @@ -83,48 +151,42 @@ class Infill coord_t shift, coord_t max_resolution, coord_t max_deviation, - size_t wall_line_count = 0, - coord_t small_area_width = 0, - const Point& infill_origin = Point(), - bool skip_line_stitching = false, - bool fill_gaps = true, - bool connected_zigzags = false, - bool use_endpieces = false, - bool skip_some_zags = false, - size_t zag_skip_count = 0, - coord_t pocket_size = 0) - : pattern(pattern) - , zig_zaggify(zig_zaggify) - , connect_polygons(connect_polygons) - , outer_contour(in_outline) - , infill_line_width(infill_line_width) - , line_distance(line_distance) - , infill_overlap(infill_overlap) - , infill_multiplier(infill_multiplier) - , fill_angle(fill_angle) - , z(z) - , shift(shift) - , max_resolution(max_resolution) - , max_deviation(max_deviation) - , wall_line_count(wall_line_count) - , small_area_width( - 0) // FIXME!: Disable small_area_width for the 5.4.x releases. Current plan is to figure out why this feature causes small line segments & fix that before 5.5.x - , infill_origin(infill_origin) - , skip_line_stitching(skip_line_stitching) - , fill_gaps(fill_gaps) - , connected_zigzags(connected_zigzags) - , use_endpieces(use_endpieces) - , skip_some_zags(skip_some_zags) - , zag_skip_count(zag_skip_count) - , pocket_size(pocket_size) - , mirror_offset(zig_zaggify) + size_t wall_line_count, + coord_t small_area_width, + Point infill_origin, + bool skip_line_stitching, + bool fill_gaps, + bool connected_zigzags, + bool use_endpieces, + bool skip_some_zags, + size_t zag_skip_count, + coord_t pocket_size) noexcept + : pattern{ pattern } + , zig_zaggify{ zig_zaggify } + , connect_polygons{ connect_polygons } + , outer_contour{ in_outline } + , infill_line_width{ infill_line_width } + , line_distance{ line_distance } + , infill_overlap{ infill_overlap } + , infill_multiplier{ infill_multiplier } + , fill_angle{ fill_angle } + , z{ z } + , shift{ shift } + , max_resolution{ max_resolution } + , max_deviation{ max_deviation } + , wall_line_count{ wall_line_count } + , small_area_width{ 0 } + // FIXME!: Disable small_area_width for the 5.4.x releases. Current plan is to figure out why this feature causes small line segments & fix that before 5.5.0 + , infill_origin{ infill_origin } + , skip_line_stitching{ skip_line_stitching } + , fill_gaps{ fill_gaps } + , connected_zigzags{ connected_zigzags } + , use_endpieces{ use_endpieces } + , skip_some_zags{ skip_some_zags } + , zag_skip_count{ zag_skip_count } + , pocket_size{ pocket_size } + , mirror_offset{ zig_zaggify } { - // TODO: The connected lines algorithm is only available for linear-based infill, for now. - // We skip ZigZag, Cross and Cross3D because they have their own algorithms. Eventually we want to replace all that with the new algorithm. - // Cubic Subdivision ends lines in the center of the infill so it won't be effective. - connect_lines = zig_zaggify - && (pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC - || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON); } /*! From 967912560cabc5cae0aa3a401f78202f24cd632b Mon Sep 17 00:00:00 2001 From: jellespijker Date: Mon, 31 Jul 2023 15:48:12 +0000 Subject: [PATCH 170/470] Applied clang-format. --- include/TopSurface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/TopSurface.h b/include/TopSurface.h index 05affb5ad9..bfebc3f3a9 100644 --- a/include/TopSurface.h +++ b/include/TopSurface.h @@ -60,6 +60,6 @@ class TopSurface Polygons areas; }; -} +} // namespace cura #endif /* TOPSURFACE_H */ From 73ca065a613c160249a0eef0a0ec8e8dc86495bf Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 1 Aug 2023 14:54:47 +0200 Subject: [PATCH 171/470] Make it work on apple CURA-10619 --- include/infill.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/infill.h b/include/infill.h index 2fbfa80b72..20f44b64da 100644 --- a/include/infill.h +++ b/include/infill.h @@ -69,6 +69,13 @@ class Infill static constexpr auto one_over_sqrt_2 = 1.0 / std::numbers::sqrt2; + constexpr bool calcConnectLines(const EFillMethod pattern, const bool zig_zaggify) + { + return zig_zaggify + && (pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC + || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON); + } + public: constexpr Infill() noexcept = default; @@ -234,12 +241,7 @@ class Infill SectionType section_type); private: - constexpr bool calcConnectLines(const auto& pattern, const auto& zig_zaggify) const - { - return zig_zaggify - && (pattern == EFillMethod::LINES || pattern == EFillMethod::TRIANGLES || pattern == EFillMethod::GRID || pattern == EFillMethod::CUBIC - || pattern == EFillMethod::TETRAHEDRAL || pattern == EFillMethod::QUARTER_CUBIC || pattern == EFillMethod::TRIHEXAGON); - } + /*! * Generate the infill pattern without the infill_multiplier functionality From 0d3eb73e6f818011a83e82707c3dfb658d3d04c8 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 1 Aug 2023 12:55:23 +0000 Subject: [PATCH 172/470] Applied clang-format. --- include/infill.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/infill.h b/include/infill.h index 20f44b64da..6d462e2c6a 100644 --- a/include/infill.h +++ b/include/infill.h @@ -241,8 +241,6 @@ class Infill SectionType section_type); private: - - /*! * Generate the infill pattern without the infill_multiplier functionality */ From dd6f138ff5dc59b5e05599e0fbb6527532c231f7 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 1 Aug 2023 16:17:13 +0200 Subject: [PATCH 173/470] Move slot generation step in infill switch This was needed because otherwise, if a infill generate slot was loaded _all_ infill would automatically be routed through the plugin, bypassing the regular engine behavior. By executing the slot within the infill pattern type switch the plugin infill pattern generation is only executed when that infill pattern is set to plugin. CURA-10619 --- include/infill.h | 18 +--------------- include/plugins/converters.h | 15 +++++-------- include/plugins/slots.h | 7 ++++-- src/infill.cpp | 41 ++++++++++++++++++------------------ 4 files changed, 32 insertions(+), 49 deletions(-) diff --git a/include/infill.h b/include/infill.h index 6d462e2c6a..7ce22ecc3e 100644 --- a/include/infill.h +++ b/include/infill.h @@ -22,20 +22,9 @@ class AABB; class SierpinskiFillProvider; class SliceMeshStorage; -namespace plugins -{ -namespace details -{ -struct infill_generate_default; -} -struct infill_generate_request; -} // namespace plugins - class Infill { friend class InfillTest; - friend class plugins::details::infill_generate_default; - friend class plugins::infill_generate_request; EFillMethod pattern{}; //!< the space filling pattern of the infill to generate bool zig_zaggify{}; //!< Whether to connect the end pieces of the support lines via the wall @@ -244,12 +233,7 @@ class Infill /*! * Generate the infill pattern without the infill_multiplier functionality */ - std::tuple, Polygons, Polygons> _generate( - const Settings& settings, - const SierpinskiFillProvider* cross_fill_pattern = nullptr, - const LightningLayer* lightning_layer = nullptr, - const SliceMeshStorage* mesh = nullptr); - /*! + void _generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, const Settings& settings, const SierpinskiFillProvider* cross_fill_pattern = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! * Multiply the infill lines, so that any single line becomes [infill_multiplier] lines next to each other. * * This is done in a way such that there is not overlap between the lines diff --git a/include/plugins/converters.h b/include/plugins/converters.h index d359660675..38e6c21958 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -269,25 +269,20 @@ struct postprocess_response struct infill_generate_request { using value_type = slots::infill::v0::generate::CallRequest; - using native_value_type = Infill; - - value_type operator()( - native_value_type infill, - const Settings& settings, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh) const + using native_value_type = Polygons; + + value_type operator()(const native_value_type& inner_contour) const { value_type message{}; - if (infill.inner_contour.empty()) + if (inner_contour.empty()) { return message; } auto* msg_infill_areas = message.mutable_infill_areas(); auto* msg_polygons = msg_infill_areas->mutable_polygons(); - for (auto& polygon : infill.inner_contour.splitIntoParts()) + for (auto& polygon : inner_contour.splitIntoParts()) { auto* msg_polygon = msg_polygons->Add(); auto* msg_outline = msg_polygon->mutable_outline(); diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 6a705fb446..6a11a48235 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -47,9 +47,12 @@ struct simplify_default struct infill_generate_default { - auto operator()(Infill infill, auto&&... args) + std::tuple, Polygons, Polygons> operator()(Polygons _infill, auto&&... args) { - return infill._generate(std::forward(args)...); + // this code is only reachable when no slot is registered while the infill type is requested to be + // generated by a plugin; this should not be possible to set up in the first place. Return an empty + // infill. + return {}; } }; diff --git a/src/infill.cpp b/src/infill.cpp index cae9b1ebc2..06690f6df9 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -174,11 +174,7 @@ void Infill::generate( Polygons generated_result_polygons; Polygons generated_result_lines; - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] - = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); - toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); - generated_result_polygons.add(generated_result_polygons_); - generated_result_lines.add(generated_result_lines_); + _generate(toolpaths, generated_result_polygons, generated_result_lines, settings, cross_fill_provider, lightning_trees, mesh); zig_zaggify = zig_zaggify_real; multiplyInfill(generated_result_polygons, generated_result_lines); @@ -192,11 +188,7 @@ void Infill::generate( Polygons generated_result_polygons; Polygons generated_result_lines; - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] - = slots::instance().generate(*this, settings, cross_fill_provider, lightning_trees, mesh); - toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); - generated_result_polygons.add(generated_result_polygons_); - generated_result_lines.add(generated_result_lines_); + _generate(toolpaths, generated_result_polygons, generated_result_lines, settings, cross_fill_provider, lightning_trees, mesh); result_polygons.add(generated_result_polygons); result_lines.add(generated_result_lines); @@ -249,17 +241,17 @@ void Infill::generate( } } -std::tuple, Polygons, Polygons> - Infill::_generate(const Settings& settings, const SierpinskiFillProvider* cross_fill_provider, const LightningLayer* lightning_trees, const SliceMeshStorage* mesh) -{ +void Infill::_generate(std::vector& toolpaths, + Polygons& result_polygons, + Polygons& result_lines, + const Settings& settings, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh){ if (inner_contour.empty()) - return {}; + return; if (line_distance == 0) - return {}; - - std::vector toolpaths; - Polygons result_polygons; - Polygons result_lines; + return; switch (pattern) { @@ -314,6 +306,15 @@ std::tuple, Polygons, Polygons> assert(lightning_trees); // "Cannot generate Lightning infill without a generator!\n" generateLightningInfill(lightning_trees, result_lines); break; + case EFillMethod::PLUGIN: + { + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] + = slots::instance().generate(inner_contour); + toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); + result_polygons.add(generated_result_polygons_); + result_lines.add(generated_result_lines_); + break; + } default: spdlog::error("Fill pattern has unknown value.\n"); break; @@ -321,7 +322,7 @@ std::tuple, Polygons, Polygons> if (connect_lines) { - // The list should be empty because it will be again filled completely. Otherwise might have double lines. + // The list should be empty because it will be again filled completely. Otherwise, might have double lines. assert(result_lines.empty()); result_lines.clear(); connectLines(result_lines); From 7da387413409a8dc07aa238f09ed41c9bbe51e03 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 1 Aug 2023 14:31:21 +0000 Subject: [PATCH 174/470] Applied clang-format. --- include/infill.h | 29 ++++++++++++++++++----------- src/infill.cpp | 25 +++++++++++++------------ 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/include/infill.h b/include/infill.h index 7ce22ecc3e..92bd5749d0 100644 --- a/include/infill.h +++ b/include/infill.h @@ -233,17 +233,24 @@ class Infill /*! * Generate the infill pattern without the infill_multiplier functionality */ - void _generate(std::vector& toolpaths, Polygons& result_polygons, Polygons& result_lines, const Settings& settings, const SierpinskiFillProvider* cross_fill_pattern = nullptr, const LightningLayer * lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! - * Multiply the infill lines, so that any single line becomes [infill_multiplier] lines next to each other. - * - * This is done in a way such that there is not overlap between the lines - * except the middle original one if the multiplier is odd. - * - * This introduces a lot of line segments. - * - * \param[in,out] result_polygons The polygons to be multiplied (input and output) - * \param[in,out] result_lines The lines to be multiplied (input and output) - */ + void _generate( + std::vector& toolpaths, + Polygons& result_polygons, + Polygons& result_lines, + const Settings& settings, + const SierpinskiFillProvider* cross_fill_pattern = nullptr, + const LightningLayer* lightning_layer = nullptr, + const SliceMeshStorage* mesh = nullptr); /*! + * Multiply the infill lines, so that any single line becomes [infill_multiplier] lines next to each other. + * + * This is done in a way such that there is not overlap between the lines + * except the middle original one if the multiplier is odd. + * + * This introduces a lot of line segments. + * + * \param[in,out] result_polygons The polygons to be multiplied (input and output) + * \param[in,out] result_lines The lines to be multiplied (input and output) + */ void multiplyInfill(Polygons& result_polygons, Polygons& result_lines); struct InfillLineSegment diff --git a/src/infill.cpp b/src/infill.cpp index 06690f6df9..0e5665fd31 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -241,13 +241,15 @@ void Infill::generate( } } -void Infill::_generate(std::vector& toolpaths, - Polygons& result_polygons, - Polygons& result_lines, - const Settings& settings, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, - const SliceMeshStorage* mesh){ +void Infill::_generate( + std::vector& toolpaths, + Polygons& result_polygons, + Polygons& result_lines, + const Settings& settings, + const SierpinskiFillProvider* cross_fill_provider, + const LightningLayer* lightning_trees, + const SliceMeshStorage* mesh) +{ if (inner_contour.empty()) return; if (line_distance == 0) @@ -308,11 +310,10 @@ void Infill::_generate(std::vector& toolpaths, break; case EFillMethod::PLUGIN: { - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] - = slots::instance().generate(inner_contour); - toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); - result_polygons.add(generated_result_polygons_); - result_lines.add(generated_result_lines_); + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate(inner_contour); + toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); + result_polygons.add(generated_result_polygons_); + result_lines.add(generated_result_lines_); break; } default: From 4e850d7d9e4d2ad875fe331f7c8d2d24781cf047 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 2 Aug 2023 08:55:27 +0200 Subject: [PATCH 175/470] Send pattern with the plugin generate Retrieving the used pattern would be nearly impossible from the SettingsBroadcast alone. We need to be aware of the context in which this is called. CURA-10619 --- include/plugins/converters.h | 3 ++- src/infill.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 38e6c21958..3184bcf6e3 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -271,9 +271,10 @@ struct infill_generate_request using value_type = slots::infill::v0::generate::CallRequest; using native_value_type = Polygons; - value_type operator()(const native_value_type& inner_contour) const + value_type operator()(const native_value_type& inner_contour, const std::string& pattern) const { value_type message{}; + message.set_pattern(pattern); if (inner_contour.empty()) { diff --git a/src/infill.cpp b/src/infill.cpp index 0e5665fd31..f09e09f7bc 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -310,7 +310,8 @@ void Infill::_generate( break; case EFillMethod::PLUGIN: { - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate(inner_contour); + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] + = slots::instance().generate(inner_contour, mesh->settings.get("infill_pattern")); toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); result_polygons.add(generated_result_polygons_); result_lines.add(generated_result_lines_); From 3fbca78d8b2527a61257e2b6706b67313f41d675 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 2 Aug 2023 09:18:31 +0200 Subject: [PATCH 176/470] Make 'slot connection factory' implicit. Don't need the cumbersome way if we can do it this simply. done as part of CURA-10851 (but maybe should have been part of CURA-10805). --- include/plugins/slots.h | 54 +++++------------------- src/communication/ArcusCommunication.cpp | 2 +- 2 files changed, 12 insertions(+), 44 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 700b7c3989..43b1c08ef1 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -67,8 +67,6 @@ template using slot_settings_broadcast_ = SlotProxy; -using slot_to_connect_map_t = std::map)>>; - template struct Typelist { @@ -81,9 +79,10 @@ template class Unit> class Registry, Unit> { public: - constexpr void append_to_connect_map(slot_to_connect_map_t& function_map) + void connect(const v0::SlotID& slot_id, auto&& channel) { - } // Base case, do nothing. + assert(false); + } // Base case, should not be executed template void broadcast(auto&&... args) @@ -100,16 +99,6 @@ class Registry, Unit> : public Registry using Base::broadcast; friend Base; - constexpr void append_to_connect_map(slot_to_connect_map_t& function_map) - { - function_map.insert({ T::slot_id, - [&](std::shared_ptr plugin) - { - connect(plugin); - } }); - Base::append_to_connect_map(function_map); - } - template constexpr auto& get() { @@ -122,11 +111,15 @@ class Registry, Unit> : public Registry return get().modify(std::forward(args)...); } - template - void connect(auto&& plugin) + void connect(const v0::SlotID& slot_id, auto&& channel) { - using Tp = decltype(get_type().proxy); - get_type().proxy = Tp{ std::forward(std::move(plugin)) }; + if (slot_id == T::slot_id) + { + using Tp = decltype(get_type().proxy); + get_type().proxy = Tp{ std::forward(std::move(channel)) }; + return; + } + Base::connect(slot_id, channel); } template @@ -187,33 +180,8 @@ using slot_settings_broadcast = details::slot_settings_broadcast_<>; using SlotTypes = details::Typelist; -template -class SlotConnectionFactory_ -{ -public: - static SlotConnectionFactory_& instance() - { - static SlotConnectionFactory_ instance; - return instance; - } - - void connect(const plugins::v0::SlotID& slot_id, std::shared_ptr plugin) - { - slot_to_connect_map[slot_id](plugin); - } - -private: - SlotConnectionFactory_() - { - S::instance().append_to_connect_map(slot_to_connect_map); - } - - plugins::details::slot_to_connect_map_t slot_to_connect_map; -}; - } // namespace plugins using slots = plugins::details::SingletonRegistry; -using SlotConnectionFactory = plugins::SlotConnectionFactory_; } // namespace cura diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 78377ed2f7..2ff13196b9 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -522,7 +522,7 @@ void ArcusCommunication::sliceNext() if (plugin.has_address() && plugin.has_port()) { const auto slot_id = static_cast(plugin.id()); - SlotConnectionFactory::instance().connect(slot_id, utils::createChannel({ plugin.address(), plugin.port() })); + slots::instance().connect(slot_id, utils::createChannel({ plugin.address(), plugin.port() })); } } #endif // ENABLE_PLUGINS From 21fcdae9accb1131f9e11d598d5f2355b9eb4eef Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 2 Aug 2023 12:31:45 +0200 Subject: [PATCH 177/470] Make modify component independant of plugin-proxy. part of CURA-10851 --- include/plugins/pluginproxy.h | 159 ++++++++++++++++++++-------------- 1 file changed, 95 insertions(+), 64 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index de3c9d8af6..e6483822ac 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -35,55 +35,103 @@ namespace cura::plugins { +namespace details +{ template -concept plugin_modifier_v = requires(T value) +concept plugin_modifier = requires(T value) { requires std::is_member_function_pointer_v; }; template -concept default_modifier_v = requires(T value) +concept not_plugin_modifier = requires(T value) +{ + requires ! plugin_modifier; +}; + +template +concept default_modifier = requires(T value) { - requires ! plugin_modifier_v; + requires not_plugin_modifier; requires std::is_member_function_pointer_v; }; +} // namespace details -template -class PluginProxyModifyComponent +/** + * @brief Prepares client_context for the remote call. + * + * Sets timeout for the call and adds metadata to context. + * + * @param client_context - Client context to prepare + * @param timeout - Call timeout duration (optional, default = 500ms) + */ +inline void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) { - using value_type = typename ResponseTp::native_value_type; + // Set time-out + client_context.set_deadline(std::chrono::system_clock::now() + timeout); + + // Metadata + client_context.AddMetadata("cura-engine-uuid", slot_info.engine_uuid.data()); + client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); +} +template +class PluginProxyModifyComponent +{ public: - PluginProxyModifyComponent(Parent& parent); - value_type modify(auto&&... args); + PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel); + auto modify(auto&&... args); }; -template -class PluginProxyModifyComponent +template +class PluginProxyModifyComponent { - using value_type = typename ResponseTp::native_value_type; +public: + PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) + { + } + + auto modify(auto&&... args) + { + return default_modify_(std::forward(args)...); + } + +private: + Default default_modify_; +}; +template +class PluginProxyModifyComponent +{ public: - PluginProxyModifyComponent(Parent& parent) + PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) { } - value_type modify(auto&&... args) + auto modify(auto&&... args) { - return Default(std::forward(args)...); + assert(false); // Modify on a stub which it isn't meant for (for example, broadcast), should not actually be called. + return 0; } }; -template -class PluginProxyModifyComponent +template +class PluginProxyModifyComponent { using value_type = typename ResponseTp::native_value_type; + + using req_converter_type = RequestTp; + using rsp_converter_type = ResponseTp; + using req_msg_type = typename RequestTp::value_type; using rsp_msg_type = typename ResponseTp::value_type; + using modify_stub_t = Stub; public: - PluginProxyModifyComponent(Parent& parent) - : parent_(parent) + PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) + : slot_info_{ slot_info } + , plugin_info_{ plugin_info } + , modify_stub_{ channel } { } @@ -99,7 +147,7 @@ class PluginProxyModifyComponent * * @throws std::runtime_error if communication with the plugin fails. */ - value_type modify(auto&&... args) + auto modify(auto&&... args) { agrpc::GrpcContext grpc_context; value_type ret_value{}; @@ -116,11 +164,11 @@ class PluginProxyModifyComponent if (! status.ok()) // TODO: handle different kind of status codes { - if (parent_.plugin_info_.has_value()) + if (plugin_info_.has_value()) { - throw exceptions::RemoteException(parent_.slot_info_, parent_.plugin_info_.value(), status.error_message()); + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); } - throw exceptions::RemoteException(parent_.slot_info_, status.error_message()); + throw exceptions::RemoteException(slot_info_, status.error_message()); } return ret_value; } @@ -141,19 +189,24 @@ class PluginProxyModifyComponent { using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; - parent_.prep_client_context(client_context); + prep_client_context(client_context, slot_info_); // Construct request - auto request{ parent_.req_(std::forward(args)...) }; + auto request{ req_(std::forward(args)...) }; // Make unary request rsp_msg_type response; - status = co_await RPC::request(grpc_context, parent_.modify_stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = parent_.rsp_(response); + status = co_await RPC::request(grpc_context, modify_stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = rsp_(response); co_return; } - Parent& parent_; + req_converter_type req_{}; ///< The Modify request converter object. + rsp_converter_type rsp_{}; ///< The Modify response converter object. + + slot_metadata/*&*/ slot_info_; + std::optional/*&*/ plugin_info_; + ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. }; /** @@ -164,30 +217,27 @@ class PluginProxyModifyComponent * SlotVersionRng - plugin version range * Stub - process stub type * ValidatorTp - validator type - * RequestTp - gRPC convertible request type, - * ResponseTp - gRPC convertible response type. + * RequestTp - gRPC convertible request type, or dummy -- if stub is a proper modify-stub, and not default, this is enforced by the specialization of the modify component + * ResponseTp - gRPC convertible response type, or dummy -- if stub is a proper modify-stub, and not default, this is enforced by the specialization of the modify component * * Class provides methods for validating the plugin, making requests and processing responses. */ -template +template class PluginProxy { - friend PluginProxyModifyComponent; - public: // type aliases for easy use using value_type = typename ResponseTp::native_value_type; using validator_type = ValidatorTp; - using req_msg_type = typename RequestTp::value_type; - using rsp_msg_type = typename ResponseTp::value_type; - using req_converter_type = RequestTp; using rsp_converter_type = ResponseTp; using modify_stub_t = Stub; using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; + using modify_component_t = PluginProxyModifyComponent; + /** * @brief Constructs a PluginProxy object. * @@ -202,8 +252,8 @@ class PluginProxy constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) - : modify_stub_(channel) - , broadcast_stub_(channel) + : broadcast_stub_(channel) + , modify_component_(slot_info_, plugin_info_, channel) { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -217,7 +267,7 @@ class PluginProxy { using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; grpc::ClientContext client_context{}; - prep_client_context(client_context); + prep_client_context(client_context, slot_info_); // Construct request handshake_request handshake_req; @@ -258,7 +308,7 @@ class PluginProxy if (this != &other) { valid_ = other.valid_; - modify_stub_ = other.modify_stub_; + modify_component_ = other.modify_component_; broadcast_stub_ = other.broadcast_stub_; plugin_info_ = other.plugin_info_; slot_info_ = other.slot_info_; @@ -270,7 +320,7 @@ class PluginProxy if (this != &other) { valid_ = std::move(other.valid_); - modify_stub_ = std::move(other.modify_stub_); + modify_component_ = std::move(other.modify_component_); broadcast_stub_ = std::move(other.broadcast_stub_); plugin_info_ = std::move(other.plugin_info_); slot_info_ = std::move(other.slot_info_); @@ -281,8 +331,7 @@ class PluginProxy value_type modify(auto&&... args) { - static auto modify_component = PluginProxyModifyComponent(*this); - return modify_component.modify(std::forward(args)...); + return modify_component_.modify(std::forward(args)...); } template @@ -316,10 +365,7 @@ class PluginProxy private: validator_type valid_{}; ///< The validator object for plugin validation. - req_converter_type req_{}; ///< The Modify request converter object. - rsp_converter_type rsp_{}; ///< The Modify response converter object. - ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. slot_metadata slot_info_{ .slot_id = SlotID, @@ -327,11 +373,13 @@ class PluginProxy .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake + modify_component_t modify_component_; + template boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) { grpc::ClientContext client_context{}; - prep_client_context(client_context); + prep_client_context(client_context, slot_info_); auto broadcaster{ details::broadcast_factory() }; auto request = details::broadcast_message_factory(std::forward(args)...); @@ -339,25 +387,8 @@ class PluginProxy status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); co_return; } - - /** - * @brief Prepares client_context for the remote call. - * - * Sets timeout for the call and adds metadata to context. - * - * @param client_context - Client context to prepare - * @param timeout - Call timeout duration (optional, default = 500ms) - */ - void prep_client_context(grpc::ClientContext& client_context, std::chrono::milliseconds timeout = std::chrono::milliseconds(500)) - { - // Set time-out - client_context.set_deadline(std::chrono::system_clock::now() + timeout); - - // Metadata - client_context.AddMetadata("cura-engine-uuid", slot_info_.engine_uuid.data()); - client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); - } }; + } // namespace cura::plugins #endif // PLUGINS_PLUGINPROXY_H From f431744291f2e5e94253ea7904faa7c967f30ae0 Mon Sep 17 00:00:00 2001 From: rburema Date: Wed, 2 Aug 2023 10:36:12 +0000 Subject: [PATCH 178/470] Applied clang-format. --- include/plugins/pluginproxy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index e6483822ac..d23762c1f2 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -204,8 +204,8 @@ class PluginProxyModifyComponent req_converter_type req_{}; ///< The Modify request converter object. rsp_converter_type rsp_{}; ///< The Modify response converter object. - slot_metadata/*&*/ slot_info_; - std::optional/*&*/ plugin_info_; + slot_metadata /*&*/ slot_info_; + std::optional /*&*/ plugin_info_; ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. }; From 46e45333093d4a63037a03b4d887458ea40dba53 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 2 Aug 2023 14:23:00 +0200 Subject: [PATCH 179/470] Use sample Polygon logic as Simplify converter CURA-10619 --- include/plugins/converters.h | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 3184bcf6e3..01109c9733 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -281,30 +281,26 @@ struct infill_generate_request return message; } - auto* msg_infill_areas = message.mutable_infill_areas(); - auto* msg_polygons = msg_infill_areas->mutable_polygons(); - for (auto& polygon : inner_contour.splitIntoParts()) - { - auto* msg_polygon = msg_polygons->Add(); - auto* msg_outline = msg_polygon->mutable_outline(); + auto* msg_polygons = message.mutable_infill_areas(); + auto* msg_polygon = msg_polygons->add_polygons(); + auto* msg_outline = msg_polygon->mutable_outline(); + for (const auto& point : ranges::front(inner_contour.paths)) + { auto* msg_outline_path = msg_outline->add_path(); - for (const auto& point : ranges::front(polygon)) - { - msg_outline_path->set_x(point.X); - msg_outline_path->set_y(point.Y); - } + msg_outline_path->set_x(point.X); + msg_outline_path->set_y(point.Y); + } - auto* msg_holes = msg_polygon->mutable_holes(); - for (const auto& polygon : polygon.paths | ranges::views::drop(1)) + auto* msg_holes = msg_polygon->mutable_holes(); + for (const auto& polygon : inner_contour.paths | ranges::views::drop(1)) + { + auto* msg_hole = msg_holes->Add(); + for (const auto& point : polygon) { - auto* msg_hole = msg_holes->Add(); - for (const auto& point : polygon) - { - auto* msg_path = msg_hole->add_path(); - msg_path->set_x(point.X); - msg_path->set_y(point.Y); - } + auto* msg_path = msg_hole->add_path(); + msg_path->set_x(point.X); + msg_path->set_y(point.Y); } } From 643f047d1aa2d7473443bce3d8ad82845d81e032 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 2 Aug 2023 18:03:53 +0200 Subject: [PATCH 180/470] Split broadcast-functionality component out of plugin-proxy. Also remove unclear and unused 'default' behaviour made earlier in this feature-branch. Might return to this later, but that depends on implementation of the other parts of version 0 of the engine plugins. part of CURA-10851 --- include/plugins/pluginproxy.h | 159 ++++++++++++++++++---------------- 1 file changed, 82 insertions(+), 77 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index d23762c1f2..d79efc4a62 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -37,6 +37,7 @@ namespace cura::plugins namespace details { + template concept plugin_modifier = requires(T value) { @@ -44,17 +45,8 @@ concept plugin_modifier = requires(T value) }; template -concept not_plugin_modifier = requires(T value) -{ - requires ! plugin_modifier; -}; +concept not_plugin_modifier = ! plugin_modifier; -template -concept default_modifier = requires(T value) -{ - requires not_plugin_modifier; - requires std::is_member_function_pointer_v; -}; } // namespace details /** @@ -79,31 +71,17 @@ template class PluginProxyModifyComponent { public: + constexpr PluginProxyModifyComponent(); PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel); auto modify(auto&&... args); }; -template -class PluginProxyModifyComponent +template +class PluginProxyModifyComponent { public: - PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) - { - } - - auto modify(auto&&... args) - { - return default_modify_(std::forward(args)...); - } + constexpr PluginProxyModifyComponent() = default; -private: - Default default_modify_; -}; - -template -class PluginProxyModifyComponent -{ -public: PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) { } @@ -122,12 +100,13 @@ class PluginProxyModifyComponent using req_converter_type = RequestTp; using rsp_converter_type = ResponseTp; - using req_msg_type = typename RequestTp::value_type; using rsp_msg_type = typename ResponseTp::value_type; using modify_stub_t = Stub; public: + constexpr PluginProxyModifyComponent() = default; + PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) : slot_info_{ slot_info } , plugin_info_{ plugin_info } @@ -209,6 +188,69 @@ class PluginProxyModifyComponent ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. }; +template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. +class PluginProxyBroadcastComponent +{ + using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; + +public: + constexpr PluginProxyBroadcastComponent() = default; + + PluginProxyBroadcastComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) + : slot_info_{ slot_info } + , plugin_info_{ plugin_info } + , broadcast_stub_{ channel } + { + } + + template + void broadcast(auto&&... args) + { + if (! plugin_info_->broadcast_subscriptions.contains(Subscription)) + { + return; + } + agrpc::GrpcContext grpc_context; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &args...]() + { + return this->broadcastCall(grpc_context, status, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_.has_value()) + { + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + } + throw exceptions::RemoteException(slot_info_, status.error_message()); + } + } + +private: + template + boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) + { + grpc::ClientContext client_context{}; + prep_client_context(client_context, slot_info_); + + auto broadcaster{ details::broadcast_factory() }; + auto request = details::broadcast_message_factory(std::forward(args)...); + auto response = google::protobuf::Empty{}; + status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); + co_return; + } + + slot_metadata/*&*/ slot_info_; + std::optional/*&*/ plugin_info_; + ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. +}; + /** * @brief A plugin proxy class template. * @@ -233,10 +275,8 @@ class PluginProxy using req_converter_type = RequestTp; using rsp_converter_type = ResponseTp; - using modify_stub_t = Stub; - using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; - - using modify_component_t = PluginProxyModifyComponent; + using modify_component_t = PluginProxyModifyComponent; + using broadcast_component_t = PluginProxyBroadcastComponent; /** * @brief Constructs a PluginProxy object. @@ -252,8 +292,6 @@ class PluginProxy constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) - : broadcast_stub_(channel) - , modify_component_(slot_info_, plugin_info_, channel) { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -299,6 +337,10 @@ class PluginProxy { plugin_info_ = plugin_info; } + + // Can only do this _after_ it's sure the slot_info and plugin_info have been set properly. + broadcast_component_ = broadcast_component_t(slot_info_, plugin_info_, channel); + modify_component_ = modify_component_t(slot_info_, plugin_info_, channel); }; constexpr PluginProxy(const PluginProxy&) = default; @@ -309,7 +351,7 @@ class PluginProxy { valid_ = other.valid_; modify_component_ = other.modify_component_; - broadcast_stub_ = other.broadcast_stub_; + broadcast_component_ = other.broadcast_component_; plugin_info_ = other.plugin_info_; slot_info_ = other.slot_info_; } @@ -321,7 +363,7 @@ class PluginProxy { valid_ = std::move(other.valid_); modify_component_ = std::move(other.modify_component_); - broadcast_stub_ = std::move(other.broadcast_stub_); + broadcast_component_ = std::move(other.broadcast_component_); plugin_info_ = std::move(other.plugin_info_); slot_info_ = std::move(other.slot_info_); } @@ -334,59 +376,22 @@ class PluginProxy return modify_component_.modify(std::forward(args)...); } - template + template void broadcast(auto&&... args) { - if (! plugin_info_->broadcast_subscriptions.contains(S)) - { - return; - } - agrpc::GrpcContext grpc_context; - grpc::Status status; - - boost::asio::co_spawn( - grpc_context, - [this, &grpc_context, &status, &args...]() - { - return this->broadcastCall(grpc_context, status, std::forward(args)...); - }, - boost::asio::detached); - grpc_context.run(); - - if (! status.ok()) // TODO: handle different kind of status codes - { - if (plugin_info_.has_value()) - { - throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); - } - throw exceptions::RemoteException(slot_info_, status.error_message()); - } + return broadcast_component_.broadcast(std::forward(args)...); } private: validator_type valid_{}; ///< The validator object for plugin validation. - ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. - slot_metadata slot_info_{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake modify_component_t modify_component_; - - template - boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) - { - grpc::ClientContext client_context{}; - prep_client_context(client_context, slot_info_); - - auto broadcaster{ details::broadcast_factory() }; - auto request = details::broadcast_message_factory(std::forward(args)...); - auto response = google::protobuf::Empty{}; - status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); - co_return; - } + broadcast_component_t broadcast_component_; }; } // namespace cura::plugins From c35275197192f47796c23fc80b04c684d575f8f3 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 2 Aug 2023 19:29:25 +0200 Subject: [PATCH 181/470] Don't copy metadata all over the place. References where a bit hard to use here, as PluginProxy needs to be copied at some point, so a std::move wouldn't have worked (at least not without extra work). Used pointers instead. part of CURA-10851 --- include/plugins/pluginproxy.h | 70 +++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index d79efc4a62..c680b42711 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -47,6 +47,9 @@ concept plugin_modifier = requires(T value) template concept not_plugin_modifier = ! plugin_modifier; +using slot_info_ptr = std::shared_ptr; +using plugin_info_ptr = std::shared_ptr>; + } // namespace details /** @@ -72,7 +75,7 @@ class PluginProxyModifyComponent { public: constexpr PluginProxyModifyComponent(); - PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel); + PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel); auto modify(auto&&... args); }; @@ -82,7 +85,7 @@ class PluginProxyModifyComponent public: constexpr PluginProxyModifyComponent() = default; - PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) + PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) { } @@ -107,7 +110,7 @@ class PluginProxyModifyComponent public: constexpr PluginProxyModifyComponent() = default; - PluginProxyModifyComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) + PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) : slot_info_{ slot_info } , plugin_info_{ plugin_info } , modify_stub_{ channel } @@ -143,11 +146,11 @@ class PluginProxyModifyComponent if (! status.ok()) // TODO: handle different kind of status codes { - if (plugin_info_.has_value()) + if (plugin_info_->has_value()) { - throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); } - throw exceptions::RemoteException(slot_info_, status.error_message()); + throw exceptions::RemoteException(*slot_info_, status.error_message()); } return ret_value; } @@ -168,7 +171,7 @@ class PluginProxyModifyComponent { using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; - prep_client_context(client_context, slot_info_); + prep_client_context(client_context, *slot_info_); // Construct request auto request{ req_(std::forward(args)...) }; @@ -183,8 +186,8 @@ class PluginProxyModifyComponent req_converter_type req_{}; ///< The Modify request converter object. rsp_converter_type rsp_{}; ///< The Modify response converter object. - slot_metadata /*&*/ slot_info_; - std::optional /*&*/ plugin_info_; + details::slot_info_ptr slot_info_; + details::plugin_info_ptr plugin_info_; ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. }; @@ -196,7 +199,7 @@ class PluginProxyBroadcastComponent public: constexpr PluginProxyBroadcastComponent() = default; - PluginProxyBroadcastComponent(const slot_metadata& slot_info, const std::optional& plugin_info, std::shared_ptr channel) + PluginProxyBroadcastComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) : slot_info_{ slot_info } , plugin_info_{ plugin_info } , broadcast_stub_{ channel } @@ -206,7 +209,7 @@ class PluginProxyBroadcastComponent template void broadcast(auto&&... args) { - if (! plugin_info_->broadcast_subscriptions.contains(Subscription)) + if (! plugin_info_->value().broadcast_subscriptions.contains(Subscription)) { return; } @@ -224,11 +227,11 @@ class PluginProxyBroadcastComponent if (! status.ok()) // TODO: handle different kind of status codes { - if (plugin_info_.has_value()) + if (plugin_info_->has_value()) { - throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); } - throw exceptions::RemoteException(slot_info_, status.error_message()); + throw exceptions::RemoteException(*slot_info_, status.error_message()); } } @@ -237,7 +240,7 @@ class PluginProxyBroadcastComponent boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) { grpc::ClientContext client_context{}; - prep_client_context(client_context, slot_info_); + prep_client_context(client_context, *slot_info_); auto broadcaster{ details::broadcast_factory() }; auto request = details::broadcast_message_factory(std::forward(args)...); @@ -246,8 +249,8 @@ class PluginProxyBroadcastComponent co_return; } - slot_metadata/*&*/ slot_info_; - std::optional/*&*/ plugin_info_; + details::slot_info_ptr slot_info_; + details::plugin_info_ptr plugin_info_; ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. }; @@ -292,6 +295,8 @@ class PluginProxy constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) + : modify_component_{ slot_info_, plugin_info_, channel } + , broadcast_component_{ slot_info_, plugin_info_, channel } { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -305,21 +310,21 @@ class PluginProxy { using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; grpc::ClientContext client_context{}; - prep_client_context(client_context, slot_info_); + prep_client_context(client_context, *slot_info_); // Construct request handshake_request handshake_req; - handshake_request::value_type request{ handshake_req(slot_info_) }; + handshake_request::value_type request{ handshake_req(*slot_info_) }; // Make unary request handshake_response::value_type response; status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); handshake_response handshake_rsp; plugin_info = handshake_rsp(response, client_context.peer()); - valid_ = validator_type{ slot_info_, plugin_info_.value() }; + valid_ = validator_type{ *slot_info_, plugin_info }; if (valid_) { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_->slot_id); if (! plugin_info.broadcast_subscriptions.empty()) { spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); @@ -331,16 +336,12 @@ class PluginProxy if (! status.ok()) // TODO: handle different kind of status codes { - throw exceptions::RemoteException(slot_info_, status.error_message()); + throw exceptions::RemoteException(*slot_info_, status.error_message()); } if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) { - plugin_info_ = plugin_info; + plugin_info_->emplace(plugin_info); } - - // Can only do this _after_ it's sure the slot_info and plugin_info have been set properly. - broadcast_component_ = broadcast_component_t(slot_info_, plugin_info_, channel); - modify_component_ = modify_component_t(slot_info_, plugin_info_, channel); }; constexpr PluginProxy(const PluginProxy&) = default; @@ -385,10 +386,17 @@ class PluginProxy private: validator_type valid_{}; ///< The validator object for plugin validation. - slot_metadata slot_info_{ .slot_id = SlotID, - .version_range = SlotVersionRng.value, - .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. - std::optional plugin_info_{ std::nullopt }; ///< Optional object that holds the plugin metadata, set after handshake + details::slot_info_ptr slot_info_ ///< Holds information about the plugin slot. + { + std::make_shared( + slot_metadata + { + .slot_id = SlotID, + .version_range = SlotVersionRng.value, + .engine_uuid = Application::getInstance().instance_uuid + }) + }; + details::plugin_info_ptr plugin_info_{ std::make_shared>(std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake modify_component_t modify_component_; broadcast_component_t broadcast_component_; From ecc7ecb5c1a5698de325982648962362a84c56f4 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 2 Aug 2023 20:10:04 +0200 Subject: [PATCH 182/470] Move (plugin-proxy) components to their own files. part of CURA-10851 --- include/plugins/components/broadcast.h | 95 +++++++++++ include/plugins/components/common.h | 43 +++++ include/plugins/components/modify.h | 166 ++++++++++++++++++ include/plugins/pluginproxy.h | 222 +------------------------ 4 files changed, 307 insertions(+), 219 deletions(-) create mode 100644 include/plugins/components/broadcast.h create mode 100644 include/plugins/components/common.h create mode 100644 include/plugins/components/modify.h diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h new file mode 100644 index 0000000000..cb9fc96c09 --- /dev/null +++ b/include/plugins/components/broadcast.h @@ -0,0 +1,95 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PLUGINS_BROADCASTCOMPONENT_H +#define PLUGINS_BROADCASTCOMPONENT_H + +#include "common.h" +#include "cura/plugins/v0/slot_id.pb.h" +#include "plugins/broadcasts.h" +#include "plugins/exception.h" +#include "plugins/metadata.h" +#include "utils/format/thread_id.h" +#include "utils/types/char_range_literal.h" +#include "utils/types/generic.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace cura::plugins +{ + +template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. +class PluginProxyBroadcastComponent +{ + using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; + +public: + constexpr PluginProxyBroadcastComponent() = default; + + PluginProxyBroadcastComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) + : slot_info_{ slot_info } + , plugin_info_{ plugin_info } + , broadcast_stub_{ channel } + { + } + + template + void broadcast(auto&&... args) + { + if (! plugin_info_->value().broadcast_subscriptions.contains(Subscription)) + { + return; + } + agrpc::GrpcContext grpc_context; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &args...]() + { + return this->broadcastCall(grpc_context, status, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_->has_value()) + { + throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); + } + throw exceptions::RemoteException(*slot_info_, status.error_message()); + } + } + +private: + template + boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) + { + grpc::ClientContext client_context{}; + prep_client_context(client_context, *slot_info_); + + auto broadcaster{ details::broadcast_factory() }; + auto request = details::broadcast_message_factory(std::forward(args)...); + auto response = google::protobuf::Empty{}; + status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); + co_return; + } + + details::slot_info_ptr slot_info_; + details::plugin_info_ptr plugin_info_; + ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. +}; + +} // namespace cura::plugins + +#endif // PLUGINS_BROADCASTCOMPONENT_H diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h new file mode 100644 index 0000000000..45b04d80ea --- /dev/null +++ b/include/plugins/components/common.h @@ -0,0 +1,43 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PLUGINS_COMPONENTCOMMON_H +#define PLUGINS_COMPONENTCOMMON_H + +#include "cura/plugins/v0/slot_id.pb.h" +#include "plugins/metadata.h" +#include "utils/format/thread_id.h" + +#include +#include + +namespace cura::plugins +{ + +namespace details +{ +using slot_info_ptr = std::shared_ptr; +using plugin_info_ptr = std::shared_ptr>; +} // namespace details + +/** + * @brief Prepares client_context for the remote call. + * + * Sets timeout for the call and adds metadata to context. + * + * @param client_context - Client context to prepare + * @param timeout - Call timeout duration (optional, default = 500ms) + */ +inline void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) +{ + // Set time-out + client_context.set_deadline(std::chrono::system_clock::now() + timeout); + + // Metadata + client_context.AddMetadata("cura-engine-uuid", slot_info.engine_uuid.data()); + client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); +} + +} // namespace cura::plugins + +#endif // PLUGINS_COMPONENTCOMMON_H diff --git a/include/plugins/components/modify.h b/include/plugins/components/modify.h new file mode 100644 index 0000000000..830c0596a9 --- /dev/null +++ b/include/plugins/components/modify.h @@ -0,0 +1,166 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PLUGINS_MODIFYCOMPONENT_H +#define PLUGINS_MODIFYCOMPONENT_H + +#include "common.h" +#include "cura/plugins/v0/slot_id.pb.h" +#include "plugins/broadcasts.h" +#include "plugins/exception.h" +#include "plugins/metadata.h" +#include "utils/format/thread_id.h" +#include "utils/types/char_range_literal.h" +#include "utils/types/generic.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace cura::plugins +{ +namespace details +{ + +template +concept plugin_modifier = requires(T value) +{ + requires std::is_member_function_pointer_v; +}; + +template +concept not_plugin_modifier = ! plugin_modifier; + +} // namespace details + +template +class PluginProxyModifyComponent +{ +public: + constexpr PluginProxyModifyComponent(); + PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel); + auto modify(auto&&... args); +}; + +template +class PluginProxyModifyComponent +{ +public: + constexpr PluginProxyModifyComponent() = default; + + PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) + { + } + + auto modify(auto&&... args) + { + assert(false); // Modify on a stub which it isn't meant for (for example, broadcast), should not actually be called. + return 0; + } +}; + +template +class PluginProxyModifyComponent +{ + using value_type = typename ResponseTp::native_value_type; + + using req_converter_type = RequestTp; + using rsp_converter_type = ResponseTp; + using rsp_msg_type = typename ResponseTp::value_type; + + using modify_stub_t = Stub; + +public: + constexpr PluginProxyModifyComponent() = default; + + PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) + : slot_info_{ slot_info } + , plugin_info_{ plugin_info } + , modify_stub_{ channel } + { + } + + /** + * @brief Executes to plugin Modify operation. + * + * As part of this operation, a request is sent to the plugin + * and the returned response is processed. + * + * @tparam Args - argument types for the plugin request + * @param args - arguments for the plugin request + * @return The converted response value from plugin. + * + * @throws std::runtime_error if communication with the plugin fails. + */ + auto modify(auto&&... args) + { + agrpc::GrpcContext grpc_context; + value_type ret_value{}; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &ret_value, &args...]() + { + return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_->has_value()) + { + throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); + } + throw exceptions::RemoteException(*slot_info_, status.error_message()); + } + return ret_value; + } + +private: + /** + * @brief Executes the modifyCall operation with the plugin. + * + * Sends a request to the plugin and saves the response. + * + * @param grpc_context - The gRPC context to use for the call + * @param status - Status of the gRPC call which gets updated in this method + * @param ret_value - Reference to the value in which response to be stored + * @param args - Request arguments + * @return A boost::asio::awaitable indicating completion of the operation + */ + boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) + { + using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context, *slot_info_); + + // Construct request + auto request{ req_(std::forward(args)...) }; + + // Make unary request + rsp_msg_type response; + status = co_await RPC::request(grpc_context, modify_stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = rsp_(response); + co_return; + } + + req_converter_type req_{}; ///< The Modify request converter object. + rsp_converter_type rsp_{}; ///< The Modify response converter object. + + details::slot_info_ptr slot_info_; + details::plugin_info_ptr plugin_info_; + ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. +}; + +} // namespace cura::plugins + +#endif // PLUGINS_MODIFYCOMPONENT_H diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index c680b42711..370ae8bba1 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -5,6 +5,9 @@ #define PLUGINS_PLUGINPROXY_H #include "Application.h" +#include "components/common.h" +#include "components/broadcast.h" +#include "components/modify.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" @@ -35,225 +38,6 @@ namespace cura::plugins { -namespace details -{ - -template -concept plugin_modifier = requires(T value) -{ - requires std::is_member_function_pointer_v; -}; - -template -concept not_plugin_modifier = ! plugin_modifier; - -using slot_info_ptr = std::shared_ptr; -using plugin_info_ptr = std::shared_ptr>; - -} // namespace details - -/** - * @brief Prepares client_context for the remote call. - * - * Sets timeout for the call and adds metadata to context. - * - * @param client_context - Client context to prepare - * @param timeout - Call timeout duration (optional, default = 500ms) - */ -inline void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) -{ - // Set time-out - client_context.set_deadline(std::chrono::system_clock::now() + timeout); - - // Metadata - client_context.AddMetadata("cura-engine-uuid", slot_info.engine_uuid.data()); - client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); -} - -template -class PluginProxyModifyComponent -{ -public: - constexpr PluginProxyModifyComponent(); - PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel); - auto modify(auto&&... args); -}; - -template -class PluginProxyModifyComponent -{ -public: - constexpr PluginProxyModifyComponent() = default; - - PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) - { - } - - auto modify(auto&&... args) - { - assert(false); // Modify on a stub which it isn't meant for (for example, broadcast), should not actually be called. - return 0; - } -}; - -template -class PluginProxyModifyComponent -{ - using value_type = typename ResponseTp::native_value_type; - - using req_converter_type = RequestTp; - using rsp_converter_type = ResponseTp; - using rsp_msg_type = typename ResponseTp::value_type; - - using modify_stub_t = Stub; - -public: - constexpr PluginProxyModifyComponent() = default; - - PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) - : slot_info_{ slot_info } - , plugin_info_{ plugin_info } - , modify_stub_{ channel } - { - } - - /** - * @brief Executes to plugin Modify operation. - * - * As part of this operation, a request is sent to the plugin - * and the returned response is processed. - * - * @tparam Args - argument types for the plugin request - * @param args - arguments for the plugin request - * @return The converted response value from plugin. - * - * @throws std::runtime_error if communication with the plugin fails. - */ - auto modify(auto&&... args) - { - agrpc::GrpcContext grpc_context; - value_type ret_value{}; - grpc::Status status; - - boost::asio::co_spawn( - grpc_context, - [this, &grpc_context, &status, &ret_value, &args...]() - { - return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); - }, - boost::asio::detached); - grpc_context.run(); - - if (! status.ok()) // TODO: handle different kind of status codes - { - if (plugin_info_->has_value()) - { - throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); - } - throw exceptions::RemoteException(*slot_info_, status.error_message()); - } - return ret_value; - } - -private: - /** - * @brief Executes the modifyCall operation with the plugin. - * - * Sends a request to the plugin and saves the response. - * - * @param grpc_context - The gRPC context to use for the call - * @param status - Status of the gRPC call which gets updated in this method - * @param ret_value - Reference to the value in which response to be stored - * @param args - Request arguments - * @return A boost::asio::awaitable indicating completion of the operation - */ - boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) - { - using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context, *slot_info_); - - // Construct request - auto request{ req_(std::forward(args)...) }; - - // Make unary request - rsp_msg_type response; - status = co_await RPC::request(grpc_context, modify_stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = rsp_(response); - co_return; - } - - req_converter_type req_{}; ///< The Modify request converter object. - rsp_converter_type rsp_{}; ///< The Modify response converter object. - - details::slot_info_ptr slot_info_; - details::plugin_info_ptr plugin_info_; - ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. -}; - -template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. -class PluginProxyBroadcastComponent -{ - using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; - -public: - constexpr PluginProxyBroadcastComponent() = default; - - PluginProxyBroadcastComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) - : slot_info_{ slot_info } - , plugin_info_{ plugin_info } - , broadcast_stub_{ channel } - { - } - - template - void broadcast(auto&&... args) - { - if (! plugin_info_->value().broadcast_subscriptions.contains(Subscription)) - { - return; - } - agrpc::GrpcContext grpc_context; - grpc::Status status; - - boost::asio::co_spawn( - grpc_context, - [this, &grpc_context, &status, &args...]() - { - return this->broadcastCall(grpc_context, status, std::forward(args)...); - }, - boost::asio::detached); - grpc_context.run(); - - if (! status.ok()) // TODO: handle different kind of status codes - { - if (plugin_info_->has_value()) - { - throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); - } - throw exceptions::RemoteException(*slot_info_, status.error_message()); - } - } - -private: - template - boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) - { - grpc::ClientContext client_context{}; - prep_client_context(client_context, *slot_info_); - - auto broadcaster{ details::broadcast_factory() }; - auto request = details::broadcast_message_factory(std::forward(args)...); - auto response = google::protobuf::Empty{}; - status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); - co_return; - } - - details::slot_info_ptr slot_info_; - details::plugin_info_ptr plugin_info_; - ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. -}; - /** * @brief A plugin proxy class template. * From bde1cbfae7777dd066a8ff85c8e6e205e6b38cee Mon Sep 17 00:00:00 2001 From: rburema Date: Wed, 2 Aug 2023 18:16:46 +0000 Subject: [PATCH 183/470] Applied clang-format. --- include/plugins/components/broadcast.h | 2 +- include/plugins/pluginproxy.h | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index cb9fc96c09..57720a61cc 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -27,7 +27,7 @@ namespace cura::plugins { -template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. +template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. class PluginProxyBroadcastComponent { using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 370ae8bba1..7a6fd15376 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -5,8 +5,8 @@ #define PLUGINS_PLUGINPROXY_H #include "Application.h" -#include "components/common.h" #include "components/broadcast.h" +#include "components/common.h" #include "components/modify.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" @@ -171,16 +171,9 @@ class PluginProxy validator_type valid_{}; ///< The validator object for plugin validation. details::slot_info_ptr slot_info_ ///< Holds information about the plugin slot. - { - std::make_shared( - slot_metadata - { - .slot_id = SlotID, - .version_range = SlotVersionRng.value, - .engine_uuid = Application::getInstance().instance_uuid - }) - }; - details::plugin_info_ptr plugin_info_{ std::make_shared>(std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake + { std::make_shared(slot_metadata{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }) }; + details::plugin_info_ptr plugin_info_{ std::make_shared>( + std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake modify_component_t modify_component_; broadcast_component_t broadcast_component_; From c725c49274c744b08c939ab0a7bc3a6f58f194fd Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 3 Aug 2023 08:25:03 +0200 Subject: [PATCH 184/470] Make it work on Linux. done as part of CURA-10851 --- include/plugins/pluginproxy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 7a6fd15376..cb8b246e13 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -164,7 +164,7 @@ class PluginProxy template void broadcast(auto&&... args) { - return broadcast_component_.broadcast(std::forward(args)...); + return broadcast_component_.template broadcast(std::forward(args)...); } private: From 8b08b21e42599f81ac09816fd8237132aa589b54 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 3 Aug 2023 09:00:43 +0200 Subject: [PATCH 185/470] Rename modify to invoke as it also (will) handle(s) generate. part of CURA-10851 and CURA-10619 --- .../plugins/components/{modify.h => invoke.h} | 62 +++++++++---------- include/plugins/pluginproxy.h | 18 +++--- 2 files changed, 40 insertions(+), 40 deletions(-) rename include/plugins/components/{modify.h => invoke.h} (67%) diff --git a/include/plugins/components/modify.h b/include/plugins/components/invoke.h similarity index 67% rename from include/plugins/components/modify.h rename to include/plugins/components/invoke.h index 830c0596a9..616f33c087 100644 --- a/include/plugins/components/modify.h +++ b/include/plugins/components/invoke.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef PLUGINS_MODIFYCOMPONENT_H -#define PLUGINS_MODIFYCOMPONENT_H +#ifndef PLUGINS_INVOKECOMPONENT_H +#define PLUGINS_INVOKECOMPONENT_H #include "common.h" #include "cura/plugins/v0/slot_id.pb.h" @@ -30,44 +30,44 @@ namespace details { template -concept plugin_modifier = requires(T value) +concept plugin_invoker = requires(T value) { requires std::is_member_function_pointer_v; }; template -concept not_plugin_modifier = ! plugin_modifier; +concept not_plugin_invoker = ! plugin_invoker; } // namespace details template -class PluginProxyModifyComponent +class PluginProxyInvokeComponent { public: - constexpr PluginProxyModifyComponent(); - PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel); - auto modify(auto&&... args); + constexpr PluginProxyInvokeComponent(); + PluginProxyInvokeComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel); + auto invoke(auto&&... args); }; -template -class PluginProxyModifyComponent +template +class PluginProxyInvokeComponent { public: - constexpr PluginProxyModifyComponent() = default; + constexpr PluginProxyInvokeComponent() = default; - PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) + PluginProxyInvokeComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) { } - auto modify(auto&&... args) + auto invoke(auto&&... args) { - assert(false); // Modify on a stub which it isn't meant for (for example, broadcast), should not actually be called. + assert(false); // Invoke called on a stub which it isn't meant for (for example, broadcast), should not actually be called. return 0; } }; -template -class PluginProxyModifyComponent +template +class PluginProxyInvokeComponent { using value_type = typename ResponseTp::native_value_type; @@ -75,20 +75,20 @@ class PluginProxyModifyComponent using rsp_converter_type = ResponseTp; using rsp_msg_type = typename ResponseTp::value_type; - using modify_stub_t = Stub; + using invoke_stub_t = Stub; public: - constexpr PluginProxyModifyComponent() = default; + constexpr PluginProxyInvokeComponent() = default; - PluginProxyModifyComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) + PluginProxyInvokeComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) : slot_info_{ slot_info } , plugin_info_{ plugin_info } - , modify_stub_{ channel } + , invoke_stub_{ channel } { } /** - * @brief Executes to plugin Modify operation. + * @brief Executes to plugin Invoke (modify/generate) operation. * * As part of this operation, a request is sent to the plugin * and the returned response is processed. @@ -99,7 +99,7 @@ class PluginProxyModifyComponent * * @throws std::runtime_error if communication with the plugin fails. */ - auto modify(auto&&... args) + auto invoke(auto&&... args) { agrpc::GrpcContext grpc_context; value_type ret_value{}; @@ -109,7 +109,7 @@ class PluginProxyModifyComponent grpc_context, [this, &grpc_context, &status, &ret_value, &args...]() { - return this->modifyCall(grpc_context, status, ret_value, std::forward(args)...); + return this->invokeCall(grpc_context, status, ret_value, std::forward(args)...); }, boost::asio::detached); grpc_context.run(); @@ -127,7 +127,7 @@ class PluginProxyModifyComponent private: /** - * @brief Executes the modifyCall operation with the plugin. + * @brief Executes the invokeCall operation with the plugin. * * Sends a request to the plugin and saves the response. * @@ -137,9 +137,9 @@ class PluginProxyModifyComponent * @param args - Request arguments * @return A boost::asio::awaitable indicating completion of the operation */ - boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) + boost::asio::awaitable invokeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) { - using RPC = agrpc::RPC<&modify_stub_t::PrepareAsyncCall>; + using RPC = agrpc::RPC<&invoke_stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; prep_client_context(client_context, *slot_info_); @@ -148,19 +148,19 @@ class PluginProxyModifyComponent // Make unary request rsp_msg_type response; - status = co_await RPC::request(grpc_context, modify_stub_, client_context, request, response, boost::asio::use_awaitable); + status = co_await RPC::request(grpc_context, invoke_stub_, client_context, request, response, boost::asio::use_awaitable); ret_value = rsp_(response); co_return; } - req_converter_type req_{}; ///< The Modify request converter object. - rsp_converter_type rsp_{}; ///< The Modify response converter object. + req_converter_type req_{}; ///< The Invoke request converter object. + rsp_converter_type rsp_{}; ///< The Invoke response converter object. details::slot_info_ptr slot_info_; details::plugin_info_ptr plugin_info_; - ranges::semiregular_box modify_stub_; ///< The gRPC Modify stub for communication. + ranges::semiregular_box invoke_stub_; ///< The gRPC Invoke stub for communication. }; } // namespace cura::plugins -#endif // PLUGINS_MODIFYCOMPONENT_H +#endif // PLUGINS_INVOKECOMPONENT_H diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index b9fde6a3a5..2b6c7e5b38 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -7,7 +7,7 @@ #include "Application.h" #include "components/broadcast.h" #include "components/common.h" -#include "components/modify.h" +#include "components/invoke.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" @@ -46,8 +46,8 @@ namespace cura::plugins * SlotVersionRng - plugin version range * Stub - process stub type * ValidatorTp - validator type - * RequestTp - gRPC convertible request type, or dummy -- if stub is a proper modify-stub, and not default, this is enforced by the specialization of the modify component - * ResponseTp - gRPC convertible response type, or dummy -- if stub is a proper modify-stub, and not default, this is enforced by the specialization of the modify component + * RequestTp - gRPC convertible request type, or dummy -- if stub is a proper invoke-stub, this is enforced by the specialization of the invoke component + * ResponseTp - gRPC convertible response type, or dummy -- if stub is a proper invoke-stub, this is enforced by the specialization of the invoke component * * Class provides methods for validating the plugin, making requests and processing responses. */ @@ -62,7 +62,7 @@ class PluginProxy using req_converter_type = RequestTp; using rsp_converter_type = ResponseTp; - using modify_component_t = PluginProxyModifyComponent; + using invoke_component_t = PluginProxyInvokeComponent; using broadcast_component_t = PluginProxyBroadcastComponent; /** @@ -79,7 +79,7 @@ class PluginProxy constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) - : modify_component_{ slot_info_, plugin_info_, channel } + : invoke_component_{ slot_info_, plugin_info_, channel } , broadcast_component_{ slot_info_, plugin_info_, channel } { // Connect to the plugin and exchange a handshake @@ -135,7 +135,7 @@ class PluginProxy if (this != &other) { valid_ = other.valid_; - modify_component_ = other.modify_component_; + invoke_component_ = other.invoke_component_; broadcast_component_ = other.broadcast_component_; plugin_info_ = other.plugin_info_; slot_info_ = other.slot_info_; @@ -147,7 +147,7 @@ class PluginProxy if (this != &other) { valid_ = std::move(other.valid_); - modify_component_ = std::move(other.modify_component_); + invoke_component_ = std::move(other.invoke_component_); broadcast_component_ = std::move(other.broadcast_component_); plugin_info_ = std::move(other.plugin_info_); slot_info_ = std::move(other.slot_info_); @@ -158,7 +158,7 @@ class PluginProxy value_type invoke(auto&&... args) { - return modify_component_.modify(std::forward(args)...); + return invoke_component_.invoke(std::forward(args)...); } template @@ -175,7 +175,7 @@ class PluginProxy details::plugin_info_ptr plugin_info_{ std::make_shared>( std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake - modify_component_t modify_component_; + invoke_component_t invoke_component_; broadcast_component_t broadcast_component_; }; From bba52adb4f81c072a6d67696a6d9ae1d40a157ab Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 6 Aug 2023 12:17:26 +0200 Subject: [PATCH 186/470] Send allong flattend mesh settings In this commit, the functionality to transfer flattened mesh settings to plugins was added. This was necessary to ensure additional mesh settings could be understood and implemented by the plugins in the system. A new utility function "getFlattendSettings" that returns flattened mesh settings was introduced in the settings module. This functions gathers settings from the parent containers as well as child containers for completeness. Finally, changes were made to the infill operation to adapt it to the new functionality. The flattened mesh settings are now sent to plugin function calls. Contributes to CURA-10619 --- include/plugins/converters.h | 8 +++++++- include/settings/Settings.h | 6 ++++-- src/infill.cpp | 2 +- src/settings/Settings.cpp | 15 +++++++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 01109c9733..77d266d9b6 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -271,10 +272,15 @@ struct infill_generate_request using value_type = slots::infill::v0::generate::CallRequest; using native_value_type = Polygons; - value_type operator()(const native_value_type& inner_contour, const std::string& pattern) const + value_type operator()(const native_value_type& inner_contour, const std::string& pattern, const Settings& settings) const { value_type message{}; message.set_pattern(pattern); + auto* msg_settings = message.mutable_settings()->mutable_settings(); + for (const auto& [key, value] : settings.getFlattendSettings()) + { + msg_settings->insert({ key, value }); + } if (inner_contour.empty()) { diff --git a/include/settings/Settings.h b/include/settings/Settings.h index e0af78044c..9ac578ffaa 100644 --- a/include/settings/Settings.h +++ b/include/settings/Settings.h @@ -1,5 +1,5 @@ -// Copyright (c) 2022 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef SETTINGS_SETTINGS_H #define SETTINGS_SETTINGS_H @@ -95,6 +95,8 @@ class Settings */ void setParent(Settings* new_parent); + std::unordered_map getFlattendSettings() const; + private: /*! * Optionally, a parent setting container to ask for the value of a setting diff --git a/src/infill.cpp b/src/infill.cpp index f09e09f7bc..9e54cfc074 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -311,7 +311,7 @@ void Infill::_generate( case EFillMethod::PLUGIN: { auto [toolpaths_, generated_result_polygons_, generated_result_lines_] - = slots::instance().generate(inner_contour, mesh->settings.get("infill_pattern")); + = slots::instance().generate(inner_contour, mesh->settings.get("infill_pattern"), mesh->settings); toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); result_polygons.add(generated_result_polygons_); result_lines.add(generated_result_lines_); diff --git a/src/settings/Settings.cpp b/src/settings/Settings.cpp index 594aa2fccb..e8b2ebfed4 100644 --- a/src/settings/Settings.cpp +++ b/src/settings/Settings.cpp @@ -20,6 +20,7 @@ #include "utils/string.h" //For Escaped. #include "utils/types/string_switch.h" //For string switch. +#include #include #include @@ -771,4 +772,18 @@ std::string Settings::getWithoutLimiting(const std::string& key) const } } +std::unordered_map Settings::getFlattendSettings() const +{ + if (parent) + { + auto parent_settings = parent->getFlattendSettings(); + parent_settings.insert(settings.begin(), settings.end()); + return parent_settings; + } + else + { + return settings; + } +} + } // namespace cura From b1ea45b337c2fed0241e2768d128e7dd0cb24222 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Sun, 6 Aug 2023 10:18:09 +0000 Subject: [PATCH 187/470] Applied clang-format. --- include/settings/Settings.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/settings/Settings.h b/include/settings/Settings.h index 9ac578ffaa..f810e0774a 100644 --- a/include/settings/Settings.h +++ b/include/settings/Settings.h @@ -64,7 +64,8 @@ class Settings * \param key The key of the setting to get. * \return The setting's value, cast to the desired type. */ - template A get(const std::string& key) const; + template + A get(const std::string& key) const; /*! * \brief Get a string containing all settings in this container. @@ -121,7 +122,6 @@ class Settings std::string getWithoutLimiting(const std::string& key) const; }; -} //namespace cura - -#endif //SETTINGS_SETTINGS_H +} // namespace cura +#endif // SETTINGS_SETTINGS_H From a85186f7b5db726f2d0ab0f7dbbdfb2d8935a90f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 6 Aug 2023 13:39:13 +0200 Subject: [PATCH 188/470] Fix mesh setting retrieval Separated logic in getFlattendSettings() method to a new method getKeys(), for fetching keys in a way that better respects parent-child relationships. This method returns setting keys in a vector, improving retrieval of mesh settings. Changes made in line with CURA-10619 to avoid erroneous values due to overlooking parent settings. Contributes to CURA-10619 --- include/settings/Settings.h | 2 ++ src/settings/Settings.cpp | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/include/settings/Settings.h b/include/settings/Settings.h index f810e0774a..2327e41141 100644 --- a/include/settings/Settings.h +++ b/include/settings/Settings.h @@ -98,6 +98,8 @@ class Settings std::unordered_map getFlattendSettings() const; + std::vector getKeys() const; + private: /*! * Optionally, a parent setting container to ask for the value of a setting diff --git a/src/settings/Settings.cpp b/src/settings/Settings.cpp index e8b2ebfed4..6b88a3b363 100644 --- a/src/settings/Settings.cpp +++ b/src/settings/Settings.cpp @@ -20,7 +20,8 @@ #include "utils/string.h" //For Escaped. #include "utils/types/string_switch.h" //For string switch. -#include +#include +#include #include #include @@ -773,17 +774,24 @@ std::string Settings::getWithoutLimiting(const std::string& key) const } std::unordered_map Settings::getFlattendSettings() const +{ + auto keys = getKeys(); + return keys + | ranges::views::transform( + [&](const auto& key) + { + return std::pair(key, get(key)); + }) + | ranges::to>(); +} + +std::vector Settings::getKeys() const { if (parent) { - auto parent_settings = parent->getFlattendSettings(); - parent_settings.insert(settings.begin(), settings.end()); - return parent_settings; - } - else - { - return settings; + return parent->getKeys(); } + return ranges::views::keys(settings) | ranges::to_vector; } } // namespace cura From 5a3331c22901a5c548af103b011b33b1e7d86f0b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 11:48:40 +0200 Subject: [PATCH 189/470] Made prep_client_context function static in common.h This change was to ensure that the prep_client_context function isn't exposed to the linker. This is a part of code clean-up as well as to avoid any potential issues of function collision during linking. It keeps this function limited to its translation unit, thereby enhancing modularity and reducing possible side-effects. CURA-10851 relates to the task of improving code quality and maintainability. Contributes to CURA-10851 --- include/plugins/components/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h index 45b04d80ea..099c84a12f 100644 --- a/include/plugins/components/common.h +++ b/include/plugins/components/common.h @@ -28,7 +28,7 @@ using plugin_info_ptr = std::shared_ptr>; * @param client_context - Client context to prepare * @param timeout - Call timeout duration (optional, default = 500ms) */ -inline void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) +inline static void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) { // Set time-out client_context.set_deadline(std::chrono::system_clock::now() + timeout); From fd5f1772c8da023d6c459444c5ebc2676a0acaf8 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Mon, 7 Aug 2023 10:41:49 +0000 Subject: [PATCH 190/470] Applied clang-format. --- include/plugins/components/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h index 099c84a12f..661e1dc23d 100644 --- a/include/plugins/components/common.h +++ b/include/plugins/components/common.h @@ -28,7 +28,8 @@ using plugin_info_ptr = std::shared_ptr>; * @param client_context - Client context to prepare * @param timeout - Call timeout duration (optional, default = 500ms) */ -inline static void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) +inline static void + prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) { // Set time-out client_context.set_deadline(std::chrono::system_clock::now() + timeout); From f806338b90911b9ddb5bf9f039607bc92d98ec73 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 12:47:31 +0200 Subject: [PATCH 191/470] Fixed Benchmarks for plugin CURA-10851 --- benchmark/simplify_benchmark.h | 49 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 1dfe5d3716..6320bb7b36 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -4,31 +4,32 @@ #ifndef CURAENGINE_BENCHMARK_SIMPLIFY_BENCHMARK_H #define CURAENGINE_BENCHMARK_SIMPLIFY_BENCHMARK_H -#include - -#include -#include -#include - #include "../tests/ReadTestPolygons.h" - -#include "utils/channel.h" +#include "plugins/slots.h" #include "utils/Simplify.h" +#include "utils/channel.h" -#include "plugins/slots.h" +#include + +#include +#include +#include namespace cura { class SimplifyTestFixture : public benchmark::Fixture { public: - const std::vector POLYGON_FILENAMES = { - std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave_hole.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square_hole.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_triangle.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_two_squares.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_1.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_2.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_3.txt").string(), std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_4.txt").string() - }; + const std::vector POLYGON_FILENAMES = { std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_concave_hole.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_square_hole.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_triangle.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/polygon_two_squares.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_1.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_2.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_3.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("tests/resources/slice_polygon_4.txt").string() }; std::vector shapes; @@ -59,14 +60,14 @@ BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_local); BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State& st) { - for (auto _ : st) - { + for (auto _ : st) + { Polygons simplified; - for (const auto& polys : shapes) - { - benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); - } - } + for (const auto& polys : shapes) + { + benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); + } + } } BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_noplugin); @@ -78,7 +79,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St try { - slots::instance().connect(utils::createChannel({host, port})); + slots::instance().connect(plugins::v0::SlotID::SIMPLIFY_MODIFY, utils::createChannel({ host, port })); } catch (std::runtime_error e) { From 3c588006d4000a7aa00966baba108c5eeb4d3640 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 13:00:47 +0200 Subject: [PATCH 192/470] Use main gRPC defs CURA-10475 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 22e5dbf6b7..db6341e9d0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10619") + self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") def generate(self): deps = CMakeDeps(self) From 3c8ad145b74ba651bc1dc6180c8d6d50f0e74d13 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Mon, 7 Aug 2023 11:28:37 +0000 Subject: [PATCH 193/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 9546d81e00..2f8f50050a 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1115,7 +1115,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan } Polygons all_brim_lines; - + all_brim_lines.reserve(total_line_count); const coord_t line_w = train.settings.get("skirt_brim_line_width") * train.settings.get("initial_layer_line_width_factor"); @@ -1214,15 +1214,15 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan gcode_layer.addLinesByOptimizer( layer_nr == 0 ? all_brim_lines : inner_brim_line, - gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], - SpaceFillType::PolyLines, - enable_travel_optimization, - wipe_dist, - flow_ratio, - start_close_to, - fan_speed, - reverse_print_direction, - order_requirements); + gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], + SpaceFillType::PolyLines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + start_close_to, + fan_speed, + reverse_print_direction, + order_requirements); } From 20932c9e70fb2118f4b78510f579a7fcb0c8f85e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 15:25:23 +0200 Subject: [PATCH 194/470] Use gRPC definitions from working branch Contributes to CURA-10446 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index b65c67a704..4aa676d960 100644 --- a/conanfile.py +++ b/conanfile.py @@ -106,7 +106,7 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") self.requires("asio-grpc/2.4.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") def generate(self): deps = CMakeDeps(self) From 0f3bca785dc0078afc183720202ee9cbb69a18b1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 16:06:08 +0200 Subject: [PATCH 195/470] Add GCodePaths modify to Cura.proto SlotID CURA-10446 --- Cura.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/Cura.proto b/Cura.proto index 4942f9c5ce..ceb294f619 100644 --- a/Cura.proto +++ b/Cura.proto @@ -17,6 +17,7 @@ enum SlotID { SIMPLIFY_MODIFY = 100; POSTPROCESS_MODIFY = 101; INFILL_MODIFY = 102; + GCODE_PATHS_MODIFY = 103; INFILL_GENERATE = 200; } From 6de08b94ac2a3b599c8c0acead2105afb976a164 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 16:06:43 +0200 Subject: [PATCH 196/470] Add GcodePathsModify Slot Converters are empty for now CURA-10446 --- include/plugins/slots.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 49235da4a3..48f6804185 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -5,6 +5,7 @@ #define PLUGINS_SLOTS_H #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" +#include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h" #include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" @@ -98,6 +99,10 @@ template using slot_settings_broadcast_ = SlotProxy; +template +using slot_gcode_paths_modify_ + = SlotProxy; + template struct Typelist { @@ -211,12 +216,13 @@ struct Holder } // namespace details -using slot_simplify = details::slot_simplify_; +using slot_gcode_paths_modify = details::slot_gcode_paths_modify_<>; +using slot_infill_generate = details::slot_infill_generate_; using slot_postprocess = details::slot_postprocess_<>; using slot_settings_broadcast = details::slot_settings_broadcast_<>; -using slot_infill_generate = details::slot_infill_generate_; +using slot_simplify = details::slot_simplify_; -using SlotTypes = details::Typelist; +using SlotTypes = details::Typelist; } // namespace plugins using slots = plugins::details::SingletonRegistry; From d4376fd030243d93c8466c8b122feba93f9bc60d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 16:07:45 +0200 Subject: [PATCH 197/470] Format Layerplan with ClangFormat CURA-10446 --- src/LayerPlan.cpp | 527 ++++++++++++++++++++++++++++------------------ 1 file changed, 326 insertions(+), 201 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 5c60180631..e05ec309e0 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1,17 +1,10 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include -#include -#include -#include - -#include -#include +#include "LayerPlan.h" #include "Application.h" //To communicate layer view data. #include "ExtruderTrain.h" -#include "LayerPlan.h" #include "PathOrderMonotonic.h" //Monotonic ordering of skin lines. #include "Slice.h" #include "WipeScriptConfig.h" @@ -25,34 +18,40 @@ #include "utils/linearAlg2D.h" #include "utils/polygonUtils.h" +#include +#include + +#include +#include +#include +#include + namespace cura { constexpr int MINIMUM_LINE_LENGTH = 5; // in uM. Generated lines shorter than this may be discarded constexpr int MINIMUM_SQUARED_LINE_LENGTH = MINIMUM_LINE_LENGTH * MINIMUM_LINE_LENGTH; -ExtruderPlan::ExtruderPlan -( +ExtruderPlan::ExtruderPlan( const size_t extruder, const LayerIndex layer_nr, const bool is_initial_layer, const bool is_raft_layer, const coord_t layer_thickness, const FanSpeedLayerTimeSettings& fan_speed_layer_time_settings, - const RetractionConfig& retraction_config -) : - heated_pre_travel_time(0), - required_start_temperature(-1), - extruder_nr(extruder), - layer_nr(layer_nr), - is_initial_layer(is_initial_layer), - is_raft_layer(is_raft_layer), - layer_thickness(layer_thickness), - fan_speed_layer_time_settings(fan_speed_layer_time_settings), - retraction_config(retraction_config), - extraTime(0.0), - temperatureFactor(0.0), - slowest_path_speed(0.0) + const RetractionConfig& retraction_config) + : heated_pre_travel_time(0) + , required_start_temperature(-1) + , extruder_nr(extruder) + , layer_nr(layer_nr) + , is_initial_layer(is_initial_layer) + , is_raft_layer(is_raft_layer) + , layer_thickness(layer_thickness) + , fan_speed_layer_time_settings(fan_speed_layer_time_settings) + , retraction_config(retraction_config) + , extraTime(0.0) + , temperatureFactor(0.0) + , slowest_path_speed(0.0) { } @@ -99,19 +98,17 @@ void ExtruderPlan::applyBackPressureCompensation(const Ratio back_pressure_compe } } -GCodePath* LayerPlan::getLatestPathWithConfig(const GCodePathConfig& config, SpaceFillType space_fill_type, const Ratio flow, const Ratio width_factor, bool spiralize, const Ratio speed_factor) +GCodePath* LayerPlan::getLatestPathWithConfig( + const GCodePathConfig& config, + SpaceFillType space_fill_type, + const Ratio flow, + const Ratio width_factor, + bool spiralize, + const Ratio speed_factor) { std::vector& paths = extruder_plans.back().paths; - if - ( - paths.size() > 0 && - paths.back().config == &config && - ! paths.back().done && - paths.back().flow == flow && - paths.back().width_factor == width_factor && - paths.back().speed_factor == speed_factor && - paths.back().mesh == current_mesh - ) // spiralize can only change when a travel path is in between + if (paths.size() > 0 && paths.back().config == &config && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor + && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between { return &paths.back(); } @@ -133,8 +130,7 @@ void LayerPlan::forceNewPathStart() paths[paths.size() - 1].done = true; } -LayerPlan::LayerPlan -( +LayerPlan::LayerPlan( const SliceDataStorage& storage, LayerIndex layer_nr, coord_t z, @@ -143,26 +139,26 @@ LayerPlan::LayerPlan const std::vector& fan_speed_layer_time_settings_per_extruder, coord_t comb_boundary_offset, coord_t comb_move_inside_distance, - coord_t travel_avoid_distance -) : - configs_storage(storage, layer_nr, layer_thickness), - z(z), - final_travel_z(z), - mode_skip_agressive_merge(false), - storage(storage), - layer_nr(layer_nr), - is_initial_layer(layer_nr == 0 - static_cast(Raft::getTotalExtraLayers())), - is_raft_layer(layer_nr < 0 - static_cast(Raft::getFillerLayerCount())), - layer_thickness(layer_thickness), - has_prime_tower_planned_per_extruder(Application::getInstance().current_slice->scene.extruders.size(), false), - current_mesh(nullptr), - last_extruder_previous_layer(start_extruder), - last_planned_extruder(&Application::getInstance().current_slice->scene.extruders[start_extruder]), - first_travel_destination_is_inside(false), // set properly when addTravel is called for the first time (otherwise not set properly) - comb_boundary_minimum(computeCombBoundary(CombBoundary::MINIMUM)), - comb_boundary_preferred(computeCombBoundary(CombBoundary::PREFERRED)), - comb_move_inside_distance(comb_move_inside_distance), - fan_speed_layer_time_settings_per_extruder(fan_speed_layer_time_settings_per_extruder) + coord_t travel_avoid_distance) + : configs_storage(storage, layer_nr, layer_thickness) + , z(z) + , final_travel_z(z) + , mode_skip_agressive_merge(false) + , storage(storage) + , layer_nr(layer_nr) + , is_initial_layer(layer_nr == 0 - static_cast(Raft::getTotalExtraLayers())) + , is_raft_layer(layer_nr < 0 - static_cast(Raft::getFillerLayerCount())) + , layer_thickness(layer_thickness) + , has_prime_tower_planned_per_extruder(Application::getInstance().current_slice->scene.extruders.size(), false) + , current_mesh(nullptr) + , last_extruder_previous_layer(start_extruder) + , last_planned_extruder(&Application::getInstance().current_slice->scene.extruders[start_extruder]) + , first_travel_destination_is_inside(false) + , // set properly when addTravel is called for the first time (otherwise not set properly) + comb_boundary_minimum(computeCombBoundary(CombBoundary::MINIMUM)) + , comb_boundary_preferred(computeCombBoundary(CombBoundary::PREFERRED)) + , comb_move_inside_distance(comb_move_inside_distance) + , fan_speed_layer_time_settings_per_extruder(fan_speed_layer_time_settings_per_extruder) { size_t current_extruder = start_extruder; was_inside = true; // not used, because the first travel move is bogus @@ -180,7 +176,14 @@ LayerPlan::LayerPlan layer_start_pos_per_extruder.emplace_back(extruder.settings.get("layer_start_x"), extruder.settings.get("layer_start_y")); } extruder_plans.reserve(Application::getInstance().current_slice->scene.extruders.size()); - extruder_plans.emplace_back(current_extruder, layer_nr, is_initial_layer, is_raft_layer, layer_thickness, fan_speed_layer_time_settings_per_extruder[current_extruder], storage.retraction_wipe_config_per_extruder[current_extruder].retraction_config); + extruder_plans.emplace_back( + current_extruder, + layer_nr, + is_initial_layer, + is_raft_layer, + layer_thickness, + fan_speed_layer_time_settings_per_extruder[current_extruder], + storage.retraction_wipe_config_per_extruder[current_extruder].retraction_config); for (size_t extruder_nr = 0; extruder_nr < Application::getInstance().current_slice->scene.extruders.size(); extruder_nr++) { // Skirt and brim. @@ -303,7 +306,14 @@ bool LayerPlan::setExtruder(const size_t extruder_nr) { // first extruder plan in a layer might be empty, cause it is made with the last extruder planned in the previous layer extruder_plans.back().extruder_nr = extruder_nr; } - extruder_plans.emplace_back(extruder_nr, layer_nr, is_initial_layer, is_raft_layer, layer_thickness, fan_speed_layer_time_settings_per_extruder[extruder_nr], storage.retraction_wipe_config_per_extruder[extruder_nr].retraction_config); + extruder_plans.emplace_back( + extruder_nr, + layer_nr, + is_initial_layer, + is_raft_layer, + layer_thickness, + fan_speed_layer_time_settings_per_extruder[extruder_nr], + storage.retraction_wipe_config_per_extruder[extruder_nr].retraction_config); assert(extruder_plans.size() <= Application::getInstance().current_slice->scene.extruders.size() && "Never use the same extruder twice on one layer!"); last_planned_extruder = &Application::getInstance().current_slice->scene.extruders[extruder_nr]; @@ -374,7 +384,8 @@ GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract) { const GCodePathConfig& travel_config = configs_storage.travel_config_per_extruder[getExtruder()]; - const RetractionConfig& retraction_config = current_mesh ? current_mesh->retraction_wipe_config.retraction_config : storage.retraction_wipe_config_per_extruder[getExtruder()].retraction_config; + const RetractionConfig& retraction_config + = current_mesh ? current_mesh->retraction_wipe_config.retraction_config : storage.retraction_wipe_config_per_extruder[getExtruder()].retraction_config; GCodePath* path = getLatestPathWithConfig(travel_config, SpaceFillType::None); @@ -422,20 +433,17 @@ GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract) bool unretract_before_last_travel_move = false; // Decided when calculating the combing const bool perform_z_hops = mesh_or_extruder_settings.get("retraction_hop_enabled"); const bool perform_z_hops_only_when_collides = mesh_or_extruder_settings.get("retraction_hop_only_when_collides"); - combed = - comb->calc - ( - perform_z_hops, - perform_z_hops_only_when_collides, - *extruder, - *last_planned_position, - p, - combPaths, - was_inside, - is_inside, - max_distance_ignored, - unretract_before_last_travel_move - ); + combed = comb->calc( + perform_z_hops, + perform_z_hops_only_when_collides, + *extruder, + *last_planned_position, + p, + combPaths, + was_inside, + is_inside, + max_distance_ignored, + unretract_before_last_travel_move); if (combed) { bool retract = path->retract || (combPaths.size() > 1 && retraction_enable); @@ -503,8 +511,9 @@ GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract) { if (was_inside) // when the previous location was from printing something which is considered inside (not support or prime tower etc) { // then move inside the printed part, so that we don't ooze on the outer wall while retraction, but on the inside of the print. - assert (extruder != nullptr); - coord_t innermost_wall_line_width = mesh_or_extruder_settings.get((mesh_or_extruder_settings.get("wall_line_count") > 1) ? "wall_line_width_x" : "wall_line_width_0"); + assert(extruder != nullptr); + coord_t innermost_wall_line_width + = mesh_or_extruder_settings.get((mesh_or_extruder_settings.get("wall_line_count") > 1) ? "wall_line_width_x" : "wall_line_width_0"); if (layer_nr == 0) { innermost_wall_line_width *= mesh_or_extruder_settings.get("initial_layer_line_width_factor"); @@ -550,7 +559,15 @@ void LayerPlan::planPrime(const float& prime_blob_wipe_length) forceNewPathStart(); } -void LayerPlan::addExtrusionMove(Point p, const GCodePathConfig& config, SpaceFillType space_fill_type, const Ratio& flow, const Ratio width_factor, bool spiralize, Ratio speed_factor, double fan_speed) +void LayerPlan::addExtrusionMove( + Point p, + const GCodePathConfig& config, + SpaceFillType space_fill_type, + const Ratio& flow, + const Ratio width_factor, + bool spiralize, + Ratio speed_factor, + double fan_speed) { GCodePath* path = getLatestPathWithConfig(config, space_fill_type, flow, width_factor, spiralize, speed_factor); path->points.push_back(p); @@ -562,7 +579,15 @@ void LayerPlan::addExtrusionMove(Point p, const GCodePathConfig& config, SpaceFi last_planned_position = p; } -void LayerPlan::addPolygon(ConstPolygonRef polygon, int start_idx, const bool backwards, const GCodePathConfig& config, coord_t wall_0_wipe_dist, bool spiralize, const Ratio& flow_ratio, bool always_retract) +void LayerPlan::addPolygon( + ConstPolygonRef polygon, + int start_idx, + const bool backwards, + const GCodePathConfig& config, + coord_t wall_0_wipe_dist, + bool spiralize, + const Ratio& flow_ratio, + bool always_retract) { constexpr Ratio width_ratio = 1.0_r; // Not printed with variable line width. Point p0 = polygon[start_idx]; @@ -610,15 +635,16 @@ void LayerPlan::addPolygon(ConstPolygonRef polygon, int start_idx, const bool ba } } -void LayerPlan::addPolygonsByOptimizer(const Polygons& polygons, - const GCodePathConfig& config, - const ZSeamConfig& z_seam_config, - coord_t wall_0_wipe_dist, - bool spiralize, - const Ratio flow_ratio, - bool always_retract, - bool reverse_order, - const std::optional start_near_location) +void LayerPlan::addPolygonsByOptimizer( + const Polygons& polygons, + const GCodePathConfig& config, + const ZSeamConfig& z_seam_config, + coord_t wall_0_wipe_dist, + bool spiralize, + const Ratio flow_ratio, + bool always_retract, + bool reverse_order, + const std::optional start_near_location) { if (polygons.empty()) { @@ -650,16 +676,17 @@ void LayerPlan::addPolygonsByOptimizer(const Polygons& polygons, static constexpr float max_non_bridge_line_volume = MM2INT(100); // limit to accumulated "volume" of non-bridge lines which is proportional to distance x extrusion rate -void LayerPlan::addWallLine(const Point& p0, - const Point& p1, - const Settings& settings, - const GCodePathConfig& non_bridge_config, - const GCodePathConfig& bridge_config, - float flow, - const Ratio width_factor, - float& non_bridge_line_volume, - Ratio speed_factor, - double distance_to_bridge_start) +void LayerPlan::addWallLine( + const Point& p0, + const Point& p1, + const Settings& settings, + const GCodePathConfig& non_bridge_config, + const GCodePathConfig& bridge_config, + float flow, + const Ratio width_factor, + float& non_bridge_line_volume, + Ratio speed_factor, + double distance_to_bridge_start) { const coord_t min_line_len = settings.get("meshfix_maximum_resolution") / 2; // Shouldn't cut up stuff (too much) below the required simplify resolution. const double acceleration_segment_len = MM2INT(1); // accelerate using segments of this length @@ -685,7 +712,9 @@ void LayerPlan::addWallLine(const Point& p0, while (distance_to_line_end > min_line_len) { // if we are accelerating after a bridge line, the segment length is less than the whole line length - Point segment_end = (speed_factor == 1 || distance_to_line_end < acceleration_segment_len) ? line_end : cur_point + (line_end - cur_point) * acceleration_segment_len / distance_to_line_end; + Point segment_end = (speed_factor == 1 || distance_to_line_end < acceleration_segment_len) + ? line_end + : cur_point + (line_end - cur_point) * acceleration_segment_len / distance_to_line_end; // flow required for the next line segment - when accelerating after a bridge segment, the flow is increased in inverse proportion to the speed_factor // so the slower the feedrate, the greater the flow - the idea is to get the extruder back to normal pressure as quickly as possible @@ -714,7 +743,14 @@ void LayerPlan::addWallLine(const Point& p0, if ((len - coast_dist) > min_line_len) { // segment is longer than coast distance so extrude using non-bridge config to start of coast - addExtrusionMove(segment_end + coast_dist * (cur_point - segment_end) / len, non_bridge_config, SpaceFillType::Polygons, segment_flow, width_factor, spiralize, speed_factor); + addExtrusionMove( + segment_end + coast_dist * (cur_point - segment_end) / len, + non_bridge_config, + SpaceFillType::Polygons, + segment_flow, + width_factor, + spiralize, + speed_factor); } // then coast to start of bridge segment constexpr Ratio flow = 0.0_r; // Coasting has no flow rate. @@ -723,13 +759,14 @@ void LayerPlan::addWallLine(const Point& p0, else { // no coasting required, just normal segment using non-bridge config - addExtrusionMove(segment_end, - non_bridge_config, - SpaceFillType::Polygons, - segment_flow, - width_factor, - spiralize, - (overhang_mask.empty() || (! overhang_mask.inside(p0, true) && ! overhang_mask.inside(p1, true))) ? speed_factor : overhang_speed_factor); + addExtrusionMove( + segment_end, + non_bridge_config, + SpaceFillType::Polygons, + segment_flow, + width_factor, + spiralize, + (overhang_mask.empty() || (! overhang_mask.inside(p0, true) && ! overhang_mask.inside(p1, true))) ? speed_factor : overhang_speed_factor); } distance_to_bridge_start -= len; @@ -737,13 +774,14 @@ void LayerPlan::addWallLine(const Point& p0, else { // no coasting required, just normal segment using non-bridge config - addExtrusionMove(segment_end, - non_bridge_config, - SpaceFillType::Polygons, - segment_flow, - width_factor, - spiralize, - (overhang_mask.empty() || (! overhang_mask.inside(p0, true) && ! overhang_mask.inside(p1, true))) ? speed_factor : overhang_speed_factor); + addExtrusionMove( + segment_end, + non_bridge_config, + SpaceFillType::Polygons, + segment_flow, + width_factor, + spiralize, + (overhang_mask.empty() || (! overhang_mask.inside(p0, true) && ! overhang_mask.inside(p1, true))) ? speed_factor : overhang_speed_factor); } non_bridge_line_volume += vSize(cur_point - segment_end) * segment_flow * width_factor * speed_factor * non_bridge_config.getSpeed(); cur_point = segment_end; @@ -759,7 +797,14 @@ void LayerPlan::addWallLine(const Point& p0, if (bridge_wall_mask.empty()) { // no bridges required - addExtrusionMove(p1, non_bridge_config, SpaceFillType::Polygons, flow, width_factor, spiralize, (overhang_mask.empty() || (! overhang_mask.inside(p0, true) && ! overhang_mask.inside(p1, true))) ? 1.0_r : overhang_speed_factor); + addExtrusionMove( + p1, + non_bridge_config, + SpaceFillType::Polygons, + flow, + width_factor, + spiralize, + (overhang_mask.empty() || (! overhang_mask.inside(p0, true) && ! overhang_mask.inside(p1, true))) ? 1.0_r : overhang_speed_factor); } else { @@ -851,7 +896,15 @@ void LayerPlan::addWallLine(const Point& p0, } } -void LayerPlan::addWall(ConstPolygonRef wall, int start_idx, const Settings& settings, const GCodePathConfig& non_bridge_config, const GCodePathConfig& bridge_config, coord_t wall_0_wipe_dist, float flow_ratio, bool always_retract) +void LayerPlan::addWall( + ConstPolygonRef wall, + int start_idx, + const Settings& settings, + const GCodePathConfig& non_bridge_config, + const GCodePathConfig& bridge_config, + coord_t wall_0_wipe_dist, + float flow_ratio, + bool always_retract) { // TODO: Deprecated in favor of ExtrusionJunction version below. if (wall.size() < 3) @@ -860,10 +913,18 @@ void LayerPlan::addWall(ConstPolygonRef wall, int start_idx, const Settings& set } constexpr size_t dummy_perimeter_id = 0; // <-- Here, don't care about which perimeter any more. - const coord_t nominal_line_width = non_bridge_config.getLineWidth(); // <-- The line width which it's 'supposed to' be will be used to adjust the flow ratio each time, this'll give a flow-ratio-multiplier of 1. + const coord_t nominal_line_width + = non_bridge_config + .getLineWidth(); // <-- The line width which it's 'supposed to' be will be used to adjust the flow ratio each time, this'll give a flow-ratio-multiplier of 1. ExtrusionLine ewall; - std::for_each(wall.begin(), wall.end(), [&dummy_perimeter_id, &nominal_line_width, &ewall](const Point& p) { ewall.emplace_back(p, nominal_line_width, dummy_perimeter_id); }); + std::for_each( + wall.begin(), + wall.end(), + [&dummy_perimeter_id, &nominal_line_width, &ewall](const Point& p) + { + ewall.emplace_back(p, nominal_line_width, dummy_perimeter_id); + }); ewall.emplace_back(*wall.begin(), nominal_line_width, dummy_perimeter_id); constexpr bool is_closed = true; constexpr bool is_reversed = false; @@ -871,17 +932,18 @@ void LayerPlan::addWall(ConstPolygonRef wall, int start_idx, const Settings& set addWall(ewall, start_idx, settings, non_bridge_config, bridge_config, wall_0_wipe_dist, flow_ratio, always_retract, is_closed, is_reversed, is_linked_path); } -void LayerPlan::addWall(const ExtrusionLine& wall, - int start_idx, - const Settings& settings, - const GCodePathConfig& non_bridge_config, - const GCodePathConfig& bridge_config, - coord_t wall_0_wipe_dist, - float flow_ratio, - bool always_retract, - const bool is_closed, - const bool is_reversed, - const bool is_linked_path) +void LayerPlan::addWall( + const ExtrusionLine& wall, + int start_idx, + const Settings& settings, + const GCodePathConfig& non_bridge_config, + const GCodePathConfig& bridge_config, + coord_t wall_0_wipe_dist, + float flow_ratio, + bool always_retract, + const bool is_closed, + const bool is_reversed, + const bool is_linked_path) { if (wall.empty()) { @@ -899,7 +961,8 @@ void LayerPlan::addWall(const ExtrusionLine& wall, const coord_t min_bridge_line_len = settings.get("bridge_wall_min_length"); - const Ratio nominal_line_width_multiplier = 1.0 / Ratio(non_bridge_config.getLineWidth()); // we multiply the flow with the actual wanted line width (for that junction), and then multiply with this + const Ratio nominal_line_width_multiplier + = 1.0 / Ratio(non_bridge_config.getLineWidth()); // we multiply the flow with the actual wanted line width (for that junction), and then multiply with this // helper function to calculate the distance from the start of the current wall line to the first bridge segment @@ -1047,12 +1110,29 @@ void LayerPlan::addWall(const ExtrusionLine& wall, if (is_small_feature) { constexpr bool spiralize = false; - addExtrusionMove(destination, non_bridge_config, SpaceFillType::Polygons, flow_ratio, line_width * nominal_line_width_multiplier, spiralize, small_feature_speed_factor); + addExtrusionMove( + destination, + non_bridge_config, + SpaceFillType::Polygons, + flow_ratio, + line_width * nominal_line_width_multiplier, + spiralize, + small_feature_speed_factor); } else { const Point origin = p0.p + normal(line_vector, piece_length * piece); - addWallLine(origin, destination, settings, non_bridge_config, bridge_config, flow_ratio, line_width * nominal_line_width_multiplier, non_bridge_line_volume, speed_factor, distance_to_bridge_start); + addWallLine( + origin, + destination, + settings, + non_bridge_config, + bridge_config, + flow_ratio, + line_width * nominal_line_width_multiplier, + non_bridge_line_volume, + speed_factor, + distance_to_bridge_start); } } @@ -1117,14 +1197,15 @@ void LayerPlan::addInfillWall(const ExtrusionLine& wall, const GCodePathConfig& } } -void LayerPlan::addWalls(const Polygons& walls, - const Settings& settings, - const GCodePathConfig& non_bridge_config, - const GCodePathConfig& bridge_config, - const ZSeamConfig& z_seam_config, - coord_t wall_0_wipe_dist, - float flow_ratio, - bool always_retract) +void LayerPlan::addWalls( + const Polygons& walls, + const Settings& settings, + const GCodePathConfig& non_bridge_config, + const GCodePathConfig& bridge_config, + const ZSeamConfig& z_seam_config, + coord_t wall_0_wipe_dist, + float flow_ratio, + bool always_retract) { // TODO: Deprecated in favor of ExtrusionJunction version below. PathOrderOptimizer orderOptimizer(getLastPlannedPositionOrStartingPosition(), z_seam_config); @@ -1140,16 +1221,17 @@ void LayerPlan::addWalls(const Polygons& walls, } -void LayerPlan::addLinesByOptimizer(const Polygons& polygons, - const GCodePathConfig& config, - const SpaceFillType space_fill_type, - const bool enable_travel_optimization, - const coord_t wipe_dist, - const Ratio flow_ratio, - const std::optional near_start_location, - const double fan_speed, - const bool reverse_print_direction, - const std::unordered_multimap& order_requirements) +void LayerPlan::addLinesByOptimizer( + const Polygons& polygons, + const GCodePathConfig& config, + const SpaceFillType space_fill_type, + const bool enable_travel_optimization, + const coord_t wipe_dist, + const Ratio flow_ratio, + const std::optional near_start_location, + const double fan_speed, + const bool reverse_print_direction, + const std::unordered_multimap& order_requirements) { Polygons boundary; if (enable_travel_optimization && ! comb_boundary_minimum.empty()) @@ -1174,7 +1256,13 @@ void LayerPlan::addLinesByOptimizer(const Polygons& polygons, boundary = Simplify(MM2INT(0.1), MM2INT(0.1), 0).polygon(boundary); } constexpr bool detect_loops = true; - PathOrderOptimizer order_optimizer(near_start_location.value_or(getLastPlannedPositionOrStartingPosition()), ZSeamConfig(), detect_loops, &boundary, reverse_print_direction, order_requirements); + PathOrderOptimizer order_optimizer( + near_start_location.value_or(getLastPlannedPositionOrStartingPosition()), + ZSeamConfig(), + detect_loops, + &boundary, + reverse_print_direction, + order_requirements); for (size_t line_idx = 0; line_idx < polygons.size(); line_idx++) { order_optimizer.addPolyline(polygons[line_idx]); @@ -1185,7 +1273,13 @@ void LayerPlan::addLinesByOptimizer(const Polygons& polygons, } -void LayerPlan::addLinesInGivenOrder(const std::vector>& paths, const GCodePathConfig& config, const SpaceFillType space_fill_type, const coord_t wipe_dist, const Ratio flow_ratio, const double fan_speed) +void LayerPlan::addLinesInGivenOrder( + const std::vector>& paths, + const GCodePathConfig& config, + const SpaceFillType space_fill_type, + const coord_t wipe_dist, + const Ratio flow_ratio, + const double fan_speed) { coord_t half_line_width = config.getLineWidth() / 2; coord_t line_width_2 = half_line_width * half_line_width; @@ -1282,16 +1376,17 @@ void LayerPlan::addLinesInGivenOrder(const std::vector order(monotonic_direction, max_adjacent_distance, last_position); @@ -1335,7 +1433,14 @@ void LayerPlan::addLinesMonotonic(const Polygons& area, addLinesByOptimizer(left_over, config, space_fill_type, true, wipe_dist, flow_ratio, getLastPlannedPositionOrStartingPosition(), fan_speed); } -void LayerPlan::spiralizeWallSlice(const GCodePathConfig& config, ConstPolygonRef wall, ConstPolygonRef last_wall, const int seam_vertex_idx, const int last_seam_vertex_idx, const bool is_top_layer, const bool is_bottom_layer) +void LayerPlan::spiralizeWallSlice( + const GCodePathConfig& config, + ConstPolygonRef wall, + ConstPolygonRef last_wall, + const int seam_vertex_idx, + const int last_seam_vertex_idx, + const bool is_top_layer, + const bool is_bottom_layer) { const bool smooth_contours = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("smooth_spiralized_contours"); constexpr bool spiralize = true; // In addExtrusionMove calls, enable spiralize and use nominal line width. @@ -1503,10 +1608,10 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ double factor = 0.0; double target_speed = 0.0; - std::function slow_down_func - { - [&target_speed](const GCodePath& path) { return std::min(target_speed / (path.config->getSpeed() * path.speed_factor), 1.0); } - }; + std::function slow_down_func{ [&target_speed](const GCodePath& path) + { + return std::min(target_speed / (path.config->getSpeed() * path.speed_factor), 1.0); + } }; if (minExtrudeTime >= total_extrude_time_at_minimum_speed) { @@ -1525,8 +1630,9 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ { // Slowing down to the slowest path speed is not sufficient, need to slow down further to the minimum speed. // Linear interpolate between total_extrude_time_at_slowest_speed and total_extrude_time_at_minimum_speed - const double factor = (1/total_extrude_time_at_minimum_speed - 1/minExtrudeTime) / (1/total_extrude_time_at_minimum_speed - 1/total_extrude_time_at_slowest_speed); - target_speed = minimalSpeed * (1.0-factor) + slowest_path_speed * factor; + const double factor + = (1 / total_extrude_time_at_minimum_speed - 1 / minExtrudeTime) / (1 / total_extrude_time_at_minimum_speed - 1 / total_extrude_time_at_slowest_speed); + target_speed = minimalSpeed * (1.0 - factor) + slowest_path_speed * factor; temperatureFactor = 1.0 - factor; // Update stored naive time estimates @@ -1536,13 +1642,12 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ { // Slowing down to the slowest_speed is sufficient to respect the minimum layer time. // Linear interpolate between extrudeTime and total_extrude_time_at_slowest_speed - factor = (1/total_extrude_time_at_slowest_speed - 1/minExtrudeTime) / (1/total_extrude_time_at_slowest_speed - 1/extrudeTime); - slow_down_func = - [&slowest_path_speed = slowest_path_speed, &factor](const GCodePath& path) - { - const double target_speed = slowest_path_speed * (1.0 - factor) + (path.config->getSpeed() * path.speed_factor) * factor; - return std::min(target_speed / (path.config->getSpeed() * path.speed_factor), 1.0); - }; + factor = (1 / total_extrude_time_at_slowest_speed - 1 / minExtrudeTime) / (1 / total_extrude_time_at_slowest_speed - 1 / extrudeTime); + slow_down_func = [&slowest_path_speed = slowest_path_speed, &factor](const GCodePath& path) + { + const double target_speed = slowest_path_speed * (1.0 - factor) + (path.config->getSpeed() * path.speed_factor) * factor; + return std::min(target_speed / (path.config->getSpeed() * path.speed_factor), 1.0); + }; // Update stored naive time estimates estimates.extrude_time = minExtrudeTime; @@ -1577,17 +1682,14 @@ TimeMaterialEstimates ExtruderPlan::computeNaiveTimeEstimates(Point starting_pos Point p0 = starting_position; const double min_path_speed = fan_speed_layer_time_settings.cool_min_speed; - slowest_path_speed = - std::accumulate - ( - paths.begin(), - paths.end(), - std::numeric_limits::max(), - [](double value, const GCodePath& path) - { - return path.isTravelPath() ? value : std::min(value, path.config->getSpeed().value * path.speed_factor); - } - ); + slowest_path_speed = std::accumulate( + paths.begin(), + paths.end(), + std::numeric_limits::max(), + [](double value, const GCodePath& path) + { + return path.isTravelPath() ? value : std::min(value, path.config->getSpeed().value * path.speed_factor); + }); bool was_retracted = false; // wrong assumption; won't matter that much. (TODO) for (GCodePath& path : paths) @@ -1706,19 +1808,27 @@ void ExtruderPlan::processFanSpeedForFirstLayers() */ fan_speed = fan_speed_layer_time_settings.cool_fan_speed_min; - if (layer_nr < fan_speed_layer_time_settings.cool_fan_full_layer && fan_speed_layer_time_settings.cool_fan_full_layer > 0 // don't apply initial layer fan speed speedup if disabled. + if (layer_nr < fan_speed_layer_time_settings.cool_fan_full_layer + && fan_speed_layer_time_settings.cool_fan_full_layer > 0 // don't apply initial layer fan speed speedup if disabled. && ! is_raft_layer // don't apply initial layer fan speed speedup to raft, but to model layers ) { // Slow down the fan on the layers below the [cool_fan_full_layer], where layer 0 is speed 0. - fan_speed = fan_speed_layer_time_settings.cool_fan_speed_0 + (fan_speed - fan_speed_layer_time_settings.cool_fan_speed_0) * std::max(LayerIndex(0), layer_nr) / fan_speed_layer_time_settings.cool_fan_full_layer; + fan_speed = fan_speed_layer_time_settings.cool_fan_speed_0 + + (fan_speed - fan_speed_layer_time_settings.cool_fan_speed_0) * std::max(LayerIndex(0), layer_nr) / fan_speed_layer_time_settings.cool_fan_full_layer; } } void LayerPlan::processFanSpeedAndMinimalLayerTime(Point starting_position) { // the minimum layer time behaviour is only applied to the last extruder. - const size_t last_extruder_nr = ranges::max_element(extruder_plans, [](const ExtruderPlan& a, const ExtruderPlan& b) { return a.extruder_nr < b.extruder_nr; })->extruder_nr; + const size_t last_extruder_nr = ranges::max_element( + extruder_plans, + [](const ExtruderPlan& a, const ExtruderPlan& b) + { + return a.extruder_nr < b.extruder_nr; + }) + ->extruder_nr; Point starting_position_last_extruder; unsigned int last_extruder_idx; double other_extr_plan_time = 0.0; @@ -1770,10 +1880,13 @@ void LayerPlan::writeGCode(GCodeExport& gcode) // flow-rate compensation const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - gcode.setFlowRateExtrusionSettings(mesh_group_settings.get("flow_rate_max_extrusion_offset"), mesh_group_settings.get("flow_rate_extrusion_offset_factor")); // Offset is in mm. + gcode.setFlowRateExtrusionSettings( + mesh_group_settings.get("flow_rate_max_extrusion_offset"), + mesh_group_settings.get("flow_rate_extrusion_offset_factor")); // Offset is in mm. static LayerIndex layer_1{ 1 - static_cast(Raft::getTotalExtraLayers()) }; - if (layer_nr == layer_1 && mesh_group_settings.get("machine_heated_bed") && mesh_group_settings.get("material_bed_temperature") != mesh_group_settings.get("material_bed_temperature_layer_0")) + if (layer_nr == layer_1 && mesh_group_settings.get("machine_heated_bed") + && mesh_group_settings.get("material_bed_temperature") != mesh_group_settings.get("material_bed_temperature_layer_0")) { constexpr bool wait = false; gcode.writeBedTemperatureCommand(mesh_group_settings.get("material_bed_temperature"), wait); @@ -1793,7 +1906,11 @@ void LayerPlan::writeGCode(GCodeExport& gcode) for (size_t extruder_plan_idx = 0; extruder_plan_idx < extruder_plans.size(); extruder_plan_idx++) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; - const RetractionAndWipeConfig* retraction_config = current_mesh ? ¤t_mesh->retraction_wipe_config: &storage.retraction_wipe_config_per_extruder[extruder_plan.extruder_nr]; + + // TODO: Insert modify slot for the gcodepaths CURA-10446 + + const RetractionAndWipeConfig* retraction_config + = current_mesh ? ¤t_mesh->retraction_wipe_config : &storage.retraction_wipe_config_per_extruder[extruder_plan.extruder_nr]; coord_t z_hop_height = retraction_config->retraction_config.zHop; if (extruder_nr != extruder_plan.extruder_nr) @@ -1866,8 +1983,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) bool update_extrusion_offset = true; double cumulative_path_time = 0.; // Time in seconds. - const std::function insertTempOnTime = - [&](const double to_add, const int64_t path_idx) + const std::function insertTempOnTime = [&](const double to_add, const int64_t path_idx) { cumulative_path_time += to_add; extruder_plan.handleInserts(path_idx, gcode, cumulative_path_time); @@ -1990,7 +2106,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) // for some movements such as prime tower purge, the speed may get changed by this factor speed *= path.speed_factor; - //This seems to be the best location to place this, but still not ideal. + // This seems to be the best location to place this, but still not ideal. if (path.mesh != current_mesh) { current_mesh = path.mesh; @@ -2102,7 +2218,8 @@ void LayerPlan::writeGCode(GCodeExport& gcode) if (extruder.settings.get("cool_lift_head") && extruder_plan.extraTime > 0.0) { gcode.writeComment("Small layer, adding delay"); - const RetractionAndWipeConfig& retraction_config = current_mesh ? current_mesh->retraction_wipe_config: storage.retraction_wipe_config_per_extruder[gcode.getExtruderNr()]; + const RetractionAndWipeConfig& retraction_config + = current_mesh ? current_mesh->retraction_wipe_config : storage.retraction_wipe_config_per_extruder[gcode.getExtruderNr()]; gcode.writeRetraction(retraction_config.retraction_config); if (extruder_plan_idx == extruder_plans.size() - 1 || ! extruder.settings.get("machine_extruder_end_pos_abs")) { // only do the z-hop if it's the last extruder plan; otherwise it's already at the switching bay area @@ -2154,7 +2271,12 @@ bool LayerPlan::makeRetractSwitchRetract(unsigned int extruder_plan_idx, unsigne } } -bool LayerPlan::writePathWithCoasting(GCodeExport& gcode, const size_t extruder_plan_idx, const size_t path_idx, const coord_t layer_thickness, const std::function insertTempOnTime) +bool LayerPlan::writePathWithCoasting( + GCodeExport& gcode, + const size_t extruder_plan_idx, + const size_t path_idx, + const coord_t layer_thickness, + const std::function insertTempOnTime) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; const ExtruderTrain& extruder = Application::getInstance().current_slice->scene.extruders[extruder_plan.extruder_nr]; @@ -2174,9 +2296,11 @@ bool LayerPlan::writePathWithCoasting(GCodeExport& gcode, const size_t extruder_ const double extrude_speed = path.config->getSpeed() * path.speed_factor * path.speed_back_pressure_factor; - const coord_t coasting_dist = MM2INT(MM2_2INT(coasting_volume) / layer_thickness) / path.config->getLineWidth(); // closing brackets of MM2INT at weird places for precision issues + const coord_t coasting_dist + = MM2INT(MM2_2INT(coasting_volume) / layer_thickness) / path.config->getLineWidth(); // closing brackets of MM2INT at weird places for precision issues const double coasting_min_volume = extruder.settings.get("coasting_min_volume"); - const coord_t coasting_min_dist = MM2INT(MM2_2INT(coasting_min_volume + coasting_volume) / layer_thickness) / path.config->getLineWidth(); // closing brackets of MM2INT at weird places for precision issues + const coord_t coasting_min_dist = MM2INT(MM2_2INT(coasting_min_volume + coasting_volume) / layer_thickness) + / path.config->getLineWidth(); // closing brackets of MM2INT at weird places for precision issues // /\ the minimal distance when coasting will coast the full coasting volume instead of linearly less with linearly smaller paths std::vector accumulated_dist_per_point; // the first accumulated dist is that of the last point! (that of the last point is always zero...) @@ -2281,7 +2405,8 @@ void LayerPlan::applyBackPressureCompensation() { for (auto& extruder_plan : extruder_plans) { - const Ratio back_pressure_compensation = Application::getInstance().current_slice->scene.extruders[extruder_plan.extruder_nr].settings.get("speed_equalize_flow_width_factor"); + const Ratio back_pressure_compensation + = Application::getInstance().current_slice->scene.extruders[extruder_plan.extruder_nr].settings.get("speed_equalize_flow_width_factor"); if (back_pressure_compensation != 0.0) { extruder_plan.applyBackPressureCompensation(back_pressure_compensation); From cf45455cc0fae3223fb932978fb19099bdf984fe Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 7 Aug 2023 18:06:07 +0200 Subject: [PATCH 198/470] Added forward declaration of RemoteException in broadcast.h and included "plugins/slots.h" in LayerPlan.cpp. This change was necessary due to obfuscation of some classes with forward declarations. Including the "plugins/slots.h" in "LayerPlan.cpp" ensures the program has knowledge of the corresponding definitions and declarations. This adjustment ensures the correct functioning and stability of the system in handling remote exceptions. Contributes to CURA-10446 --- include/plugins/components/broadcast.h | 4 ++++ src/LayerPlan.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index 57720a61cc..fc9e4f6c11 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -26,6 +26,10 @@ namespace cura::plugins { +namespace exceptions +{ +class RemoteException; // forward declaration probably needed due to us obfuscating some other classes with forward declarations +} // namespace exceptions template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. class PluginProxyBroadcastComponent diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index e05ec309e0..5f87dc2e17 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -11,6 +11,7 @@ #include "communication/Communication.h" #include "pathPlanning/Comb.h" #include "pathPlanning/CombPaths.h" +#include "plugins/slots.h" #include "raft.h" // getTotalExtraLayers #include "settings/types/Ratio.h" #include "sliceDataStorage.h" From 45832a17b514710d3030bc1f4ce2387230f8338f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 07:28:28 +0200 Subject: [PATCH 199/470] Full include paths CURA-10446 --- include/plugins/components/broadcast.h | 2 +- include/plugins/components/invoke.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index fc9e4f6c11..37a91eb9d7 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -4,9 +4,9 @@ #ifndef PLUGINS_BROADCASTCOMPONENT_H #define PLUGINS_BROADCASTCOMPONENT_H -#include "common.h" #include "cura/plugins/v0/slot_id.pb.h" #include "plugins/broadcasts.h" +#include "plugins/components/common.h" #include "plugins/exception.h" #include "plugins/metadata.h" #include "utils/format/thread_id.h" diff --git a/include/plugins/components/invoke.h b/include/plugins/components/invoke.h index 616f33c087..7fffb6daec 100644 --- a/include/plugins/components/invoke.h +++ b/include/plugins/components/invoke.h @@ -4,9 +4,9 @@ #ifndef PLUGINS_INVOKECOMPONENT_H #define PLUGINS_INVOKECOMPONENT_H -#include "common.h" #include "cura/plugins/v0/slot_id.pb.h" #include "plugins/broadcasts.h" +#include "plugins/components/common.h" #include "plugins/exception.h" #include "plugins/metadata.h" #include "utils/format/thread_id.h" From f88649a00ff217a73cf9c30570ca5065c5732e3b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 07:42:28 +0200 Subject: [PATCH 200/470] Include what you use CURA-10446 --- include/plugins/converters.h | 6 +++++- include/plugins/slots.h | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 77d266d9b6..5dd2b526ac 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -5,8 +5,11 @@ #define PLUGINS_CONVERTERS_H #include "Cura.pb.h" +#include "WallToolPaths.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" +#include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h" +#include "cura/plugins/slots/gcode_paths/v0/modify.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.pb.h" #include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" @@ -17,6 +20,7 @@ #include "cura/plugins/slots/simplify/v0/modify.pb.h" #include "plugins/metadata.h" #include "plugins/types.h" +#include "utils/polygon.h" #include #include @@ -376,7 +380,7 @@ struct infill_generate_response result_lines.emplace_back(poly_line); } - return std::make_tuple(toolpaths_, result_polygons, result_lines); + return { toolpaths_, result_polygons, result_lines }; } }; diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 48f6804185..33731d03ea 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -4,19 +4,20 @@ #ifndef PLUGINS_SLOTS_H #define PLUGINS_SLOTS_H +#include "WallToolPaths.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h" #include "cura/plugins/slots/infill/v0/generate.grpc.pb.h" #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" -#include "infill.h" #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" #include "plugins/validator.h" #include "utils/IntPoint.h" #include "utils/Simplify.h" // TODO: Remove once the simplify slot has been removed +#include "utils/polygon.h" #include "utils/types/char_range_literal.h" #include From 76e20fb1f6849c56deadbb8c2428df30f757fe71 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 07:42:51 +0200 Subject: [PATCH 201/470] Use specific converters CURA-10446 --- include/plugins/converters.h | 23 +++++++++++++++++++++++ include/plugins/slots.h | 10 ++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 5dd2b526ac..b806385991 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -384,6 +384,29 @@ struct infill_generate_response } }; +struct gcode_paths_modify_request +{ + using value_type = slots::gcode_paths::v0::modify::CallRequest; + using native_value_type = std::vector; + + value_type operator()(const native_value_type& paths, const std::integral auto extruder_nr, const std::integral auto layer_nr) const + { + value_type message{}; + return message; + } +}; + +struct gcode_paths_modify_response +{ + using value_type = slots::gcode_paths::v0::modify::CallResponse; + using native_value_type = std::vector; + + native_value_type operator()(const value_type& message) const + { + return {}; + } +}; + } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 33731d03ea..bcd9040f71 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -101,8 +101,14 @@ using slot_settings_broadcast_ = SlotProxy; template -using slot_gcode_paths_modify_ - = SlotProxy; +using slot_gcode_paths_modify_ = SlotProxy< + v0::SlotID::GCODE_PATHS_MODIFY, + "<=1.0.0", + slots::gcode_paths::v0::modify::GCodePathsModifyService::Stub, + Validator, + gcode_paths_modify_request, + gcode_paths_modify_response, + Default>; template struct Typelist From 28791f64342d6398d32f785f3a5b09a0e09bc229 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 09:06:54 +0200 Subject: [PATCH 202/470] Refactor TimeMaterialEstimates I do think that we need to have a propper look int the future, how this struct is "misused" when calculating the minimum layer time CURA-10446 --- CMakeLists.txt | 2 +- include/pathPlanning/TimeMaterialEstimates.h | 192 ++++++++----------- src/LayerPlan.cpp | 2 +- src/LayerPlanBuffer.cpp | 6 +- src/pathPlanning/TimeMaterialEstimates.cpp | 86 --------- 5 files changed, 81 insertions(+), 207 deletions(-) delete mode 100644 src/pathPlanning/TimeMaterialEstimates.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c35efd46a..286820b6fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ set(engine_SRCS # Except main.cpp. src/pathPlanning/GCodePath.cpp src/pathPlanning/LinePolygonsCrossings.cpp src/pathPlanning/NozzleTempInsert.cpp - src/pathPlanning/TimeMaterialEstimates.cpp + src/progress/Progress.cpp src/progress/ProgressStageEstimator.cpp diff --git a/include/pathPlanning/TimeMaterialEstimates.h b/include/pathPlanning/TimeMaterialEstimates.h index 4a00526553..68a33e3cd8 100644 --- a/include/pathPlanning/TimeMaterialEstimates.h +++ b/include/pathPlanning/TimeMaterialEstimates.h @@ -1,126 +1,86 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef PATH_PLANNING_TIME_MATERIAL_ESTIMATES_H #define PATH_PLANNING_TIME_MATERIAL_ESTIMATES_H -namespace cura +namespace cura { -class ExtruderPlan; // forward declaration so that TimeMaterialEstimates can be a friend - -/*! - * Time and material estimates for a portion of paths, e.g. layer, extruder plan, path. - */ -class TimeMaterialEstimates +struct TimeMaterialEstimates { - friend class ExtruderPlan; // cause there the naive estimates are calculated -private: - double extrude_time; //!< Time in seconds occupied by extrusion - double extrude_time_at_slowest_path_speed; //!< Time in seconds occupied by extrusion assuming paths are printed at slowest path speed, usually the outer wall speed - double extrude_time_at_minimum_speed; //!< Time in seconds occupied by extrusion assuming paths are printed at the user specified Minimum Speed - double unretracted_travel_time; //!< Time in seconds occupied by non-retracted travel (non-extrusion) - double retracted_travel_time; //!< Time in seconds occupied by retracted travel (non-extrusion) - double material; //!< Material used (in mm^3) -public: - /*! - * Basic contructor - * - * \param extrude_time Time in seconds occupied by extrusion - * \param unretracted_travel_time Time in seconds occupied by non-retracted travel (non-extrusion) - * \param retracted_travel_time Time in seconds occupied by retracted travel (non-extrusion) - * \param material Material used (in mm^3) - */ - TimeMaterialEstimates(double extrude_time, double unretracted_travel_time, double retracted_travel_time, double material); - - /*! - * Basic constructor initializing all estimates to zero. - */ - TimeMaterialEstimates(); - - /*! - * Set all estimates to zero. - */ - void reset(); - - /*! - * Pointwise addition of estimate stats - * - * \param other The estimates to add to these estimates. - * \return The resulting estimates - */ - TimeMaterialEstimates operator+(const TimeMaterialEstimates& other); - - /*! - * In place pointwise addition of estimate stats - * - * \param other The estimates to add to these estimates. - * \return These estimates - */ - TimeMaterialEstimates& operator+=(const TimeMaterialEstimates& other); - - /*! - * \brief Subtracts the specified estimates from these estimates and returns - * the result. - * - * Each of the estimates in this class are individually subtracted. - * - * \param other The estimates to subtract from these estimates. - * \return These estimates with the specified estimates subtracted. - */ - TimeMaterialEstimates operator-(const TimeMaterialEstimates& other); - - /*! - * \brief Subtracts the specified elements from these estimates. - * - * This causes the estimates in this instance to change. Each of the - * estimates in this class are individually subtracted. - * - * \param other The estimates to subtract from these estimates. - * \return A reference to this instance. - */ - TimeMaterialEstimates& operator-=(const TimeMaterialEstimates& other); - - /*! - * Get total time estimate. The different time estimate member values added together. - * - * \return the total of all different time estimate values - */ - double getTotalTime() const; - - /*! - * Get the total time during which the head is not retracted. - * - * This includes extrusion time and non-retracted travel time - * - * \return the total time during which the head is not retracted. - */ - double getTotalUnretractedTime() const; - - /*! - * Get the total travel time. - * - * This includes the retracted travel time as well as the unretracted travel time. - * - * \return the total travel time. - */ - double getTravelTime() const; - - /*! - * Get the extrusion time. - * - * \return extrusion time. - */ - double getExtrudeTime() const; - - /*! - * Get the amount of material used in mm^3. - * - * \return amount of material - */ - double getMaterial() const; + double extrude_time{ 0.0 }; //!< Time in seconds occupied by extrusion + double extrude_time_at_slowest_path_speed{ 0.0 }; //!< Time in seconds occupied by extrusion assuming paths are printed at slowest path speed, usually the outer wall speed + double extrude_time_at_minimum_speed{ 0.0 }; //!< Time in seconds occupied by extrusion assuming paths are printed at the user specified Minimum Speed + double unretracted_travel_time{ 0.0 }; //!< Time in seconds occupied by non-retracted travel (non-extrusion) + double retracted_travel_time{ 0.0 }; //!< Time in seconds occupied by retracted travel (non-extrusion) + double material{ 0.0 }; //!< Material used (in mm^3) + + constexpr TimeMaterialEstimates& operator+=(const TimeMaterialEstimates& other) noexcept + { + extrude_time += other.extrude_time; + extrude_time_at_slowest_path_speed += other.extrude_time_at_slowest_path_speed; + extrude_time_at_minimum_speed += other.extrude_time_at_minimum_speed; + unretracted_travel_time += other.unretracted_travel_time; + retracted_travel_time += other.retracted_travel_time; + material += other.material; + return *this; + } + + constexpr TimeMaterialEstimates& operator-=(const TimeMaterialEstimates& other) noexcept + { + extrude_time -= other.extrude_time; + extrude_time_at_slowest_path_speed -= other.extrude_time_at_slowest_path_speed; + extrude_time_at_minimum_speed -= other.extrude_time_at_minimum_speed; + unretracted_travel_time -= other.unretracted_travel_time; + retracted_travel_time -= other.retracted_travel_time; + material -= other.material; + return *this; + } + + constexpr TimeMaterialEstimates operator+(const TimeMaterialEstimates& other) const noexcept + { + return TimeMaterialEstimates{ extrude_time + other.extrude_time, + extrude_time_at_slowest_path_speed + other.extrude_time_at_slowest_path_speed, + extrude_time_at_minimum_speed + other.extrude_time_at_minimum_speed, + unretracted_travel_time + other.unretracted_travel_time, + retracted_travel_time + other.retracted_travel_time, + material + other.material }; + } + + constexpr TimeMaterialEstimates operator-(const TimeMaterialEstimates& other) const noexcept + { + return TimeMaterialEstimates{ extrude_time - other.extrude_time, + extrude_time_at_slowest_path_speed - other.extrude_time_at_slowest_path_speed, + extrude_time_at_minimum_speed - other.extrude_time_at_minimum_speed, + unretracted_travel_time - other.unretracted_travel_time, + retracted_travel_time - other.retracted_travel_time, + material - other.material }; + } + + constexpr bool operator<=>(const TimeMaterialEstimates& other) const noexcept = default; + + constexpr void reset() noexcept + { + *this = TimeMaterialEstimates{}; + } + + [[nodiscard]] constexpr auto getTotalTime() const noexcept + { + return extrude_time + unretracted_travel_time + retracted_travel_time; + } + + [[nodiscard]] constexpr auto getTotalUnretractedTime() const noexcept + { + return extrude_time + unretracted_travel_time; + } + + [[nodiscard]] constexpr auto getTravelTime() const noexcept + { + return retracted_travel_time + unretracted_travel_time; + } }; -}//namespace cura +} // namespace cura -#endif//PATH_PLANNING_TIME_MATERIAL_ESTIMATES_H +#endif // PATH_PLANNING_TIME_MATERIAL_ESTIMATES_H diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 5f87dc2e17..1bccfcc077 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1590,7 +1590,7 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ { const double minimalSpeed = fan_speed_layer_time_settings.cool_min_speed; const double travelTime = estimates.getTravelTime(); - const double extrudeTime = estimates.getExtrudeTime(); + const double extrudeTime = estimates.extrude_time; const double totalTime = travelTime + extrudeTime + time_other_extr_plans; constexpr double epsilon = 0.01; diff --git a/src/LayerPlanBuffer.cpp b/src/LayerPlanBuffer.cpp index 1ef34d1e1b..a985c8306b 100644 --- a/src/LayerPlanBuffer.cpp +++ b/src/LayerPlanBuffer.cpp @@ -427,7 +427,7 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex return; } - assert((time_window >= 0 || last_extruder_plan.estimates.getMaterial() == 0) && "Time window should always be positive if we actually extrude"); + assert((time_window >= 0 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); // ,layer change . // : ,precool command ,layer change . @@ -520,11 +520,11 @@ void LayerPlanBuffer::insertTempCommands() Ratio avg_flow; if (time > 0.0) { - avg_flow = extruder_plan.estimates.getMaterial() / time; + avg_flow = extruder_plan.estimates.material / time; } else { - assert(extruder_plan.estimates.getMaterial() == 0.0 && "No extrusion time should mean no material usage!"); + assert(extruder_plan.estimates.material == 0.0 && "No extrusion time should mean no material usage!"); avg_flow = 0.0; } diff --git a/src/pathPlanning/TimeMaterialEstimates.cpp b/src/pathPlanning/TimeMaterialEstimates.cpp deleted file mode 100644 index 1ecbd04d87..0000000000 --- a/src/pathPlanning/TimeMaterialEstimates.cpp +++ /dev/null @@ -1,86 +0,0 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. - -#include "pathPlanning/TimeMaterialEstimates.h" - -namespace cura -{ - -TimeMaterialEstimates::TimeMaterialEstimates(double extrude_time, double unretracted_travel_time, double retracted_travel_time, double material) -: extrude_time(extrude_time) -, unretracted_travel_time(unretracted_travel_time) -, retracted_travel_time(retracted_travel_time) -, material(material) -{ -} - -TimeMaterialEstimates::TimeMaterialEstimates() -: extrude_time(0.0) -, unretracted_travel_time(0.0) -, retracted_travel_time(0.0) -, material(0.0) -{ -} - -TimeMaterialEstimates TimeMaterialEstimates::operator-(const TimeMaterialEstimates& other) -{ - return TimeMaterialEstimates(extrude_time - other.extrude_time,unretracted_travel_time - other.unretracted_travel_time,retracted_travel_time - other.retracted_travel_time,material - other.material); -} - -TimeMaterialEstimates& TimeMaterialEstimates::operator-=(const TimeMaterialEstimates& other) -{ - extrude_time -= other.extrude_time; - unretracted_travel_time -= other.unretracted_travel_time; - retracted_travel_time -= other.retracted_travel_time; - material -= other.material; - return *this; -} - -TimeMaterialEstimates TimeMaterialEstimates::operator+(const TimeMaterialEstimates& other) -{ - return TimeMaterialEstimates(extrude_time+other.extrude_time, unretracted_travel_time+other.unretracted_travel_time, retracted_travel_time+other.retracted_travel_time, material+other.material); -} - -TimeMaterialEstimates& TimeMaterialEstimates::operator+=(const TimeMaterialEstimates& other) -{ - extrude_time += other.extrude_time; - unretracted_travel_time += other.unretracted_travel_time; - retracted_travel_time += other.retracted_travel_time; - material += other.material; - return *this; -} - -double TimeMaterialEstimates::getExtrudeTime() const -{ - return extrude_time; -} - -double TimeMaterialEstimates::getMaterial() const -{ - return material; -} - -double TimeMaterialEstimates::getTotalTime() const -{ - return extrude_time + unretracted_travel_time + retracted_travel_time; -} - -double TimeMaterialEstimates::getTotalUnretractedTime() const -{ - return extrude_time + unretracted_travel_time; -} - -double TimeMaterialEstimates::getTravelTime() const -{ - return retracted_travel_time + unretracted_travel_time; -} - -void TimeMaterialEstimates::reset() -{ - extrude_time = 0.0; - unretracted_travel_time = 0.0; - retracted_travel_time = 0.0; - material = 0.0; -} - -}//namespace cura From 7352914dde1aa97967432a1669bae06bbf1c9fa3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 10:57:44 +0200 Subject: [PATCH 203/470] Move conversion logic to dedicated .cpp file Moved the conversion logic of broadcast_settings_request, handshake_request, simplify_request, postprocess_request, infill_generate_request and gcode_paths_modify_request to a dedicated cpp file. This refactoring was necessary to resolve multiple 'exceptions not declared' messages, likely due to includes and auto return types declared in multiple translation units. This change will improve the architecture and maintainability of the code. Contributes to CURA-10466 --- include/plugins/converters.h | 270 ++++---------------------------- src/plugins/converters.cpp | 294 +++++++++++++++++++++++++++++++++++ 2 files changed, 321 insertions(+), 243 deletions(-) create mode 100644 src/plugins/converters.cpp diff --git a/include/plugins/converters.h b/include/plugins/converters.h index b806385991..dac97eb8b7 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -5,7 +5,6 @@ #define PLUGINS_CONVERTERS_H #include "Cura.pb.h" -#include "WallToolPaths.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h" @@ -20,7 +19,6 @@ #include "cura/plugins/slots/simplify/v0/modify.pb.h" #include "plugins/metadata.h" #include "plugins/types.h" -#include "utils/polygon.h" #include #include @@ -30,6 +28,16 @@ #include #include + +namespace cura +{ +class GCodePath; +class LayerIndex; +class ExtrusionLine; +class Polygons; +class Settings; +} // namespace cura + namespace cura::plugins { @@ -39,15 +47,9 @@ struct empty using value_type = google::protobuf::Empty; ///< The protobuf message type. using native_value_type = std::nullptr_t; ///< The native value type. - value_type operator()() const - { - return {}; - } + value_type operator()() const; - constexpr native_value_type operator()(const value_type&) const - { - return nullptr; - } + constexpr native_value_type operator()(const value_type&) const; }; struct broadcast_settings_request @@ -62,42 +64,7 @@ struct broadcast_settings_request * @param value The value of the setting to be broadcasted. * @return The converted `proto::BroadcastServiceSettingsRequest` message. */ - value_type operator()(const native_value_type& slice_message) const - { - value_type message{}; - auto* global_settings = message.mutable_global_settings()->mutable_settings(); - for (const auto& setting : slice_message.global_settings().settings()) - { - global_settings->emplace(setting.name(), setting.value()); - } - - auto* extruders_settings = message.mutable_extruder_settings(); - for (const auto& extruder : slice_message.extruders()) - { - auto* settings = extruders_settings->Add()->mutable_settings(); - for (const auto& setting : extruder.settings().settings()) - { - settings->emplace(setting.name(), setting.value()); - } - } - - auto* object_settings = message.mutable_object_settings(); - for (const auto& object : slice_message.object_lists()) - { - auto* settings = object_settings->Add()->mutable_settings(); - for (const auto& setting : object.settings()) - { - settings->emplace(setting.name(), setting.value()); - } - } - - auto* limit_to_extruder = message.mutable_limit_to_extruder(); - for (const auto& setting_extruder : slice_message.limit_to_extruder()) - { - limit_to_extruder->emplace(setting_extruder.name(), setting_extruder.extruder()); - } - return message; - } + value_type operator()(const native_value_type& slice_message) const; }; @@ -114,13 +81,7 @@ struct handshake_request * @return The converted `proto::HandshakeRequest` message. */ - value_type operator()(const native_value_type& slot_info) const - { - value_type message{}; - message.set_slot_id(slot_info.slot_id); - message.set_version_range(slot_info.version_range.data()); - return message; - } + value_type operator()(const native_value_type& slot_info) const; }; struct handshake_response @@ -134,14 +95,7 @@ struct handshake_response * @param message The `proto::HandshakeResponse` message. * @return The native data. */ - native_value_type operator()(const value_type& message, std::string_view peer) const - { - return { .slot_version = message.slot_version(), - .plugin_name = message.plugin_name(), - .plugin_version = message.plugin_version(), - .peer = std::string{ peer }, - .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; - } + native_value_type operator()(const value_type& message, std::string_view peer) const; }; @@ -159,42 +113,7 @@ struct simplify_request * @param max_area_deviation The maximum area deviation for the simplified polygons. * @return The converted `proto::SimplifyRequest` message. */ - value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const - { - value_type message{}; - if (polygons.empty()) - { - return message; - } - - auto* msg_polygons = message.mutable_polygons(); - auto* msg_polygon = msg_polygons->add_polygons(); - auto* msg_outline = msg_polygon->mutable_outline(); - - for (const auto& point : ranges::front(polygons.paths)) - { - auto* msg_outline_path = msg_outline->add_path(); - msg_outline_path->set_x(point.X); - msg_outline_path->set_y(point.Y); - } - - auto* msg_holes = msg_polygon->mutable_holes(); - for (const auto& polygon : polygons.paths | ranges::views::drop(1)) - { - auto* msg_hole = msg_holes->Add(); - for (const auto& point : polygon) - { - auto* msg_path = msg_hole->add_path(); - msg_path->set_x(point.X); - msg_path->set_y(point.Y); - } - } - - message.set_max_resolution(max_resolution); - message.set_max_deviation(max_resolution); - message.set_max_area_deviation(max_resolution); - return message; - } + value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const; }; /** @@ -214,30 +133,7 @@ struct simplify_response * @param message The `proto::SimplifyResponse` message. * @return The converted native value. */ - native_value_type operator()(const value_type& message) const - { - native_value_type poly{}; - for (const auto& paths : message.polygons().polygons()) - { - Polygon o{}; - for (const auto& point : paths.outline().path()) - { - o.add(Point{ point.x(), point.y() }); - } - poly.add(o); - - for (const auto& hole : paths.holes()) - { - Polygon h{}; - for (const auto& point : hole.path()) - { - h.add(Point{ point.x(), point.y() }); - } - poly.add(h); - } - } - return poly; - } + native_value_type operator()(const value_type& message) const; }; @@ -252,12 +148,7 @@ struct postprocess_request * @param gcode The native G-code string. * @return The converted `proto::PostprocessRequest` message. */ - value_type operator()(const native_value_type& gcode) const - { - value_type message{}; - message.set_gcode_word(gcode); - return message; - } + value_type operator()(const native_value_type& gcode) const; }; struct postprocess_response @@ -265,10 +156,7 @@ struct postprocess_response using value_type = slots::postprocess::v0::modify::CallResponse; using native_value_type = std::string; - native_value_type operator()(const value_type& message) const - { - return message.gcode_word(); - } + native_value_type operator()(const value_type& message) const; }; struct infill_generate_request @@ -276,135 +164,31 @@ struct infill_generate_request using value_type = slots::infill::v0::generate::CallRequest; using native_value_type = Polygons; - value_type operator()(const native_value_type& inner_contour, const std::string& pattern, const Settings& settings) const - { - value_type message{}; - message.set_pattern(pattern); - auto* msg_settings = message.mutable_settings()->mutable_settings(); - for (const auto& [key, value] : settings.getFlattendSettings()) - { - msg_settings->insert({ key, value }); - } - - if (inner_contour.empty()) - { - return message; - } - - auto* msg_polygons = message.mutable_infill_areas(); - auto* msg_polygon = msg_polygons->add_polygons(); - auto* msg_outline = msg_polygon->mutable_outline(); - - for (const auto& point : ranges::front(inner_contour.paths)) - { - auto* msg_outline_path = msg_outline->add_path(); - msg_outline_path->set_x(point.X); - msg_outline_path->set_y(point.Y); - } - - auto* msg_holes = msg_polygon->mutable_holes(); - for (const auto& polygon : inner_contour.paths | ranges::views::drop(1)) - { - auto* msg_hole = msg_holes->Add(); - for (const auto& point : polygon) - { - auto* msg_path = msg_hole->add_path(); - msg_path->set_x(point.X); - msg_path->set_y(point.Y); - } - } - - return message; - } + value_type operator()(const native_value_type& inner_contour, const std::string& pattern, const Settings& settings) const; }; struct infill_generate_response { using value_type = slots::infill::v0::generate::CallResponse; - using native_value_type = std::tuple, Polygons, Polygons>; - - native_value_type operator()(const value_type& message) const - { - VariableWidthLines toolpaths; - Polygons result_polygons; - Polygons result_lines; - - for (auto& tool_path : message.tool_paths().tool_paths()) - { - ExtrusionLine lines; - for (auto& msg_junction : tool_path.junctions()) - { - auto& p = msg_junction.point(); - auto junction = ExtrusionJunction{ p.x(), p.y(), msg_junction.width() }; - lines.emplace_back(junction); - } - - toolpaths.push_back(lines); - } - - std::vector toolpaths_; - toolpaths_.push_back(toolpaths); - - for (auto& polygon_msg : message.polygons().polygons()) - { - Polygons polygon{}; - - Polygon outline{}; - for (auto& path_msg : polygon_msg.outline().path()) - { - outline.add(Point{ path_msg.x(), path_msg.y() }); - } - polygon.add(outline); - - - for (auto& hole_msg : polygon_msg.holes()) - { - Polygon hole{}; - for (auto& path_msg : hole_msg.path()) - { - hole.add(Point{ path_msg.x(), path_msg.y() }); - } - polygon.add(hole); - } - - result_polygons.add(polygon); - } - - for (auto& polygon : message.poly_lines().paths()) - { - Polygon poly_line; - for (auto& p : polygon.path()) - { - poly_line.emplace_back(Point{ p.x(), p.y() }); - } - result_lines.emplace_back(poly_line); - } - - return { toolpaths_, result_polygons, result_lines }; - } + using native_value_type = std::tuple>, Polygons, Polygons>; + + native_value_type operator()(const value_type& message) const; }; struct gcode_paths_modify_request { using value_type = slots::gcode_paths::v0::modify::CallRequest; - using native_value_type = std::vector; + using native_value_type = std::vector; - value_type operator()(const native_value_type& paths, const std::integral auto extruder_nr, const std::integral auto layer_nr) const - { - value_type message{}; - return message; - } + value_type operator()(const native_value_type& paths, const size_t extruder_nr, const LayerIndex layer_nr) const; }; struct gcode_paths_modify_response { using value_type = slots::gcode_paths::v0::modify::CallResponse; - using native_value_type = std::vector; + using native_value_type = std::vector; - native_value_type operator()(const value_type& message) const - { - return {}; - } + native_value_type operator()(const value_type& message) const; }; } // namespace cura::plugins diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp new file mode 100644 index 0000000000..e022497894 --- /dev/null +++ b/src/plugins/converters.cpp @@ -0,0 +1,294 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + + +#include "plugins/converters.h" + +#include "WallToolPaths.h" +#include "pathPlanning/GCodePath.h" +#include "settings/Settings.h" +#include "settings/types/LayerIndex.h" +#include "utils/polygon.h" + +namespace cura::plugins +{ + +empty::value_type empty::operator()() const +{ + return {}; +} + +constexpr empty::native_value_type empty::operator()(const value_type&) const +{ + return nullptr; +} + +broadcast_settings_request::value_type broadcast_settings_request::operator()(const broadcast_settings_request::native_value_type& slice_message) const +{ + value_type message{}; + auto* global_settings = message.mutable_global_settings()->mutable_settings(); + for (const auto& setting : slice_message.global_settings().settings()) + { + global_settings->emplace(setting.name(), setting.value()); + } + + auto* extruders_settings = message.mutable_extruder_settings(); + for (const auto& extruder : slice_message.extruders()) + { + auto* settings = extruders_settings->Add()->mutable_settings(); + for (const auto& setting : extruder.settings().settings()) + { + settings->emplace(setting.name(), setting.value()); + } + } + + auto* object_settings = message.mutable_object_settings(); + for (const auto& object : slice_message.object_lists()) + { + auto* settings = object_settings->Add()->mutable_settings(); + for (const auto& setting : object.settings()) + { + settings->emplace(setting.name(), setting.value()); + } + } + + auto* limit_to_extruder = message.mutable_limit_to_extruder(); + for (const auto& setting_extruder : slice_message.limit_to_extruder()) + { + limit_to_extruder->emplace(setting_extruder.name(), setting_extruder.extruder()); + } + return message; +} + +handshake_request::value_type handshake_request::operator()(const handshake_request::native_value_type& slot_info) const +{ + value_type message{}; + message.set_slot_id(slot_info.slot_id); + message.set_version_range(slot_info.version_range.data()); + return message; +} + +handshake_response::native_value_type handshake_response::operator()(const handshake_response::value_type& message, std::string_view peer) const +{ + return { .slot_version = message.slot_version(), + .plugin_name = message.plugin_name(), + .plugin_version = message.plugin_version(), + .peer = std::string{ peer }, + .broadcast_subscriptions = std::set(message.broadcast_subscriptions().begin(), message.broadcast_subscriptions().end()) }; +} + +simplify_request::value_type + simplify_request::operator()(const simplify_request::native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) + const +{ + value_type message{}; + if (polygons.empty()) + { + return message; + } + + auto* msg_polygons = message.mutable_polygons(); + auto* msg_polygon = msg_polygons->add_polygons(); + auto* msg_outline = msg_polygon->mutable_outline(); + + for (const auto& point : ranges::front(polygons.paths)) + { + auto* msg_outline_path = msg_outline->add_path(); + msg_outline_path->set_x(point.X); + msg_outline_path->set_y(point.Y); + } + + auto* msg_holes = msg_polygon->mutable_holes(); + for (const auto& polygon : polygons.paths | ranges::views::drop(1)) + { + auto* msg_hole = msg_holes->Add(); + for (const auto& point : polygon) + { + auto* msg_path = msg_hole->add_path(); + msg_path->set_x(point.X); + msg_path->set_y(point.Y); + } + } + + message.set_max_resolution(max_resolution); + message.set_max_deviation(max_resolution); + message.set_max_area_deviation(max_resolution); + return message; +} + +simplify_response::native_value_type simplify_response::operator()(const simplify_response::value_type& message) const +{ + native_value_type poly{}; + for (const auto& paths : message.polygons().polygons()) + { + Polygon o{}; + for (const auto& point : paths.outline().path()) + { + o.add(Point{ point.x(), point.y() }); + } + poly.add(o); + + for (const auto& hole : paths.holes()) + { + Polygon h{}; + for (const auto& point : hole.path()) + { + h.add(Point{ point.x(), point.y() }); + } + poly.add(h); + } + } + return poly; +} + +postprocess_request::value_type postprocess_request::operator()(const postprocess_request::native_value_type& gcode) const +{ + value_type message{}; + message.set_gcode_word(gcode); + return message; +} + +postprocess_response::native_value_type postprocess_response::operator()(const postprocess_response::value_type& message) const +{ + return message.gcode_word(); +} + +infill_generate_request::value_type + infill_generate_request::operator()(const infill_generate_request::native_value_type& inner_contour, const std::string& pattern, const Settings& settings) const +{ + value_type message{}; + message.set_pattern(pattern); + auto* msg_settings = message.mutable_settings()->mutable_settings(); + for (const auto& [key, value] : settings.getFlattendSettings()) + { + msg_settings->insert({ key, value }); + } + + if (inner_contour.empty()) + { + return message; + } + + auto* msg_polygons = message.mutable_infill_areas(); + auto* msg_polygon = msg_polygons->add_polygons(); + auto* msg_outline = msg_polygon->mutable_outline(); + + for (const auto& point : ranges::front(inner_contour.paths)) + { + auto* msg_outline_path = msg_outline->add_path(); + msg_outline_path->set_x(point.X); + msg_outline_path->set_y(point.Y); + } + + auto* msg_holes = msg_polygon->mutable_holes(); + for (const auto& polygon : inner_contour.paths | ranges::views::drop(1)) + { + auto* msg_hole = msg_holes->Add(); + for (const auto& point : polygon) + { + auto* msg_path = msg_hole->add_path(); + msg_path->set_x(point.X); + msg_path->set_y(point.Y); + } + } + + return message; +} + +infill_generate_response::native_value_type infill_generate_response::operator()(const infill_generate_response::value_type& message) const +{ + VariableWidthLines toolpaths; + Polygons result_polygons; + Polygons result_lines; + + for (auto& tool_path : message.tool_paths().tool_paths()) + { + ExtrusionLine lines; + for (auto& msg_junction : tool_path.junctions()) + { + auto& p = msg_junction.point(); + auto junction = ExtrusionJunction{ p.x(), p.y(), msg_junction.width() }; + lines.emplace_back(junction); + } + + toolpaths.push_back(lines); + } + + std::vector toolpaths_; + toolpaths_.push_back(toolpaths); + + for (auto& polygon_msg : message.polygons().polygons()) + { + Polygons polygon{}; + + Polygon outline{}; + for (auto& path_msg : polygon_msg.outline().path()) + { + outline.add(Point{ path_msg.x(), path_msg.y() }); + } + polygon.add(outline); + + + for (auto& hole_msg : polygon_msg.holes()) + { + Polygon hole{}; + for (auto& path_msg : hole_msg.path()) + { + hole.add(Point{ path_msg.x(), path_msg.y() }); + } + polygon.add(hole); + } + + result_polygons.add(polygon); + } + + for (auto& polygon : message.poly_lines().paths()) + { + Polygon poly_line; + for (auto& p : polygon.path()) + { + poly_line.emplace_back(Point{ p.x(), p.y() }); + } + result_lines.emplace_back(poly_line); + } + + return { toolpaths_, result_polygons, result_lines }; +} + + +gcode_paths_modify_request::value_type + gcode_paths_modify_request::operator()(const gcode_paths_modify_request::native_value_type& paths, const size_t extruder_nr, const LayerIndex layer_nr) const +{ + value_type message{}; + message.set_extruder_nr(extruder_nr); + message.set_layer_nr(layer_nr); + + // Construct the repeated GCodepath message + auto* gcode_paths = message.mutable_gcode_paths(); + for (const auto& path : paths) + { + auto* gcode_path = gcode_paths->Add(); + + // Construct the OpenPath from the points in a GCodePath + auto* points = gcode_path->mutable_path()->add_path(); + for (const auto& point : path.points) + { + points->set_x(point.X); + points->set_y(point.Y); + } + + // Construct the estimations for the GCodePath + auto* estimations = gcode_path->mutable_estimates(); + estimations->set_extrude_time(path.estimates.extrude_time); + } + + + return message; +} + + +gcode_paths_modify_response::native_value_type gcode_paths_modify_response::operator()(const gcode_paths_modify_response::value_type& message) const +{ + return gcode_paths_modify_response::native_value_type(); +} +} // namespace cura::plugins \ No newline at end of file From 22af2e07348316573ef3596e5fb20e841b8ab003 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Tue, 8 Aug 2023 08:58:31 +0000 Subject: [PATCH 204/470] Applied clang-format. --- src/LayerPlanBuffer.cpp | 55 +++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/src/LayerPlanBuffer.cpp b/src/LayerPlanBuffer.cpp index a985c8306b..6551543bdc 100644 --- a/src/LayerPlanBuffer.cpp +++ b/src/LayerPlanBuffer.cpp @@ -1,17 +1,18 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include +#include "LayerPlanBuffer.h" #include "Application.h" //To flush g-code through the communication channel. #include "ExtruderTrain.h" #include "FffProcessor.h" #include "LayerPlan.h" -#include "LayerPlanBuffer.h" #include "Slice.h" #include "communication/Communication.h" //To flush g-code through the communication channel. #include "gcodeExport.h" +#include + namespace cura { @@ -99,7 +100,8 @@ void LayerPlanBuffer::addConnectingTravelMove(LayerPlan* prev_layer, const Layer prev_layer->setIsInside(new_layer_destination_state->second); const bool force_retract = extruder_settings.get("retract_at_layer_change") || (mesh_group_settings.get("travel_retract_before_outer_wall") - && (mesh_group_settings.get("inset_direction") == InsetDirection::OUTSIDE_IN || mesh_group_settings.get("wall_line_count") == 1)); // Moving towards an outer wall. + && (mesh_group_settings.get("inset_direction") == InsetDirection::OUTSIDE_IN + || mesh_group_settings.get("wall_line_count") == 1)); // Moving towards an outer wall. prev_layer->final_travel_z = newest_layer->z; GCodePath& path = prev_layer->addTravel(first_location_new_layer, force_retract); if (force_retract && ! path.retract) @@ -180,7 +182,13 @@ Preheat::WarmUpResult LayerPlanBuffer::computeStandbyTempPlan(std::vector("material_standby_temperature"), initial_print_temp, during_printing); + Preheat::WarmUpResult warm_up = preheat_config.getWarmUpPointAfterCoolDown( + in_between_time, + extruder, + temp_before, + extruder_settings.get("material_standby_temperature"), + initial_print_temp, + during_printing); warm_up.heating_time = std::min(in_between_time, warm_up.heating_time + extra_preheat_time); return warm_up; } @@ -233,10 +241,7 @@ void LayerPlanBuffer::handleStandbyTemp(std::vector& extruder_pla spdlog::warn("Couldn't find previous extruder plan so as to set the standby temperature. Inserting temp command in earliest available layer."); ExtruderPlan& earliest_extruder_plan = *extruder_plans[0]; constexpr bool wait = false; - earliest_extruder_plan.insertCommand(NozzleTempInsert{ .path_idx = 0, - .extruder = extruder, - .temperature = standby_temp, - .wait = wait }); + earliest_extruder_plan.insertCommand(NozzleTempInsert{ .path_idx = 0, .extruder = extruder, .temperature = standby_temp, .wait = wait }); } void LayerPlanBuffer::insertPreheatCommand_multiExtrusion(std::vector& extruder_plans, unsigned int extruder_plan_idx) @@ -281,10 +286,8 @@ void LayerPlanBuffer::insertPreheatCommand_multiExtrusion(std::vectorinsertCommand(NozzleTempInsert { .path_idx = path_idx, - .extruder = extruder, - .temperature = initial_print_temp, - .wait = wait }); // insert preheat command at verfy beginning of buffer + extruder_plans[0]->insertCommand( + NozzleTempInsert{ .path_idx = path_idx, .extruder = extruder, .temperature = initial_print_temp, .wait = wait }); // insert preheat command at verfy beginning of buffer } void LayerPlanBuffer::insertTempCommands(std::vector& extruder_plans, unsigned int extruder_plan_idx) @@ -350,10 +353,7 @@ void LayerPlanBuffer::insertPrintTempCommand(ExtruderPlan& extruder_plan) } } bool wait = false; - extruder_plan.insertCommand(NozzleTempInsert{ .path_idx = path_idx, - .extruder = extruder, - .temperature = print_temp, - .wait = wait }); + extruder_plan.insertCommand(NozzleTempInsert{ .path_idx = path_idx, .extruder = extruder, .temperature = print_temp, .wait = wait }); } extruder_plan.heated_pre_travel_time = heated_pre_travel_time; } @@ -388,12 +388,14 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex } } - double time_window = - 0; // The time window within which the nozzle needs to heat from the initial print temp to the printing temperature and then back to the final print temp; i.e. from the first to the last extrusion move with this extruder - double weighted_average_extrusion_temp = 0; // The average of the normal extrusion temperatures of the extruder plans (which might be different due to flow dependent temp or due to initial layer temp) Weighted by time + double time_window = 0; // The time window within which the nozzle needs to heat from the initial print temp to the printing temperature and then back to the final print temp; + // i.e. from the first to the last extrusion move with this extruder + double weighted_average_extrusion_temp = 0; // The average of the normal extrusion temperatures of the extruder plans (which might be different due to flow dependent temp or + // due to initial layer temp) Weighted by time std::optional initial_print_temp; // The initial print temp of the first extruder plan with this extruder { // compute time window and print temp statistics - double heated_pre_travel_time = -1; // The time before the first extrude move from the start of the extruder plan during which the nozzle is stable at the initial print temperature + double heated_pre_travel_time + = -1; // The time before the first extrude move from the start of the extruder plan during which the nozzle is stable at the initial print temperature for (unsigned int prev_extruder_plan_idx = last_extruder_plan_idx; (int)prev_extruder_plan_idx >= 0; prev_extruder_plan_idx--) { ExtruderPlan& prev_extruder_plan = *extruder_plans[prev_extruder_plan_idx]; @@ -442,7 +444,8 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex // This approximation is quite ok since it only determines where to insert the precool temp command, // which means the stable temperature of the previous extruder plan and the stable temperature of the next extruder plan couldn't be reached constexpr bool during_printing = true; - Preheat::CoolDownResult warm_cool_result = preheat_config.getCoolDownPointAfterWarmUp(time_window, extruder, *initial_print_temp, weighted_average_extrusion_temp, final_print_temp, during_printing); + Preheat::CoolDownResult warm_cool_result + = preheat_config.getCoolDownPointAfterWarmUp(time_window, extruder, *initial_print_temp, weighted_average_extrusion_temp, final_print_temp, during_printing); double cool_down_time = warm_cool_result.cooling_time; assert(cool_down_time >= 0); @@ -465,7 +468,8 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex } } - // at this point cool_down_time is what time is left if cool down time of extruder plans after precool_extruder_plan (up until last_extruder_plan) are already taken into account + // at this point cool_down_time is what time is left if cool down time of extruder plans after precool_extruder_plan (up until last_extruder_plan) are already taken into + // account { // insert temp command in precool_extruder_plan double extrusion_time_seen = 0; @@ -481,11 +485,8 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex } bool wait = false; double time_after_path_start = extrusion_time_seen - cool_down_time; - precool_extruder_plan->insertCommand(NozzleTempInsert { .path_idx = path_idx, - .extruder = extruder, - .temperature = final_print_temp, - .wait = wait, - .time_after_path_start = time_after_path_start }); + precool_extruder_plan->insertCommand( + NozzleTempInsert{ .path_idx = path_idx, .extruder = extruder, .temperature = final_print_temp, .wait = wait, .time_after_path_start = time_after_path_start }); } } From 62e05eb1654a24c78d9d36d176a75df7fc4c6be3 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 11:41:43 +0200 Subject: [PATCH 205/470] Use CRTP for convert specializations CURA-10446 --- include/plugins/converters.h | 125 ++++++++--------------------------- 1 file changed, 29 insertions(+), 96 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index dac97eb8b7..8ff5ad743e 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -41,6 +41,22 @@ class Settings; namespace cura::plugins { +namespace details +{ +template +struct converter +{ + using derived_type = T; ///< The derived type. + using value_type = Msg; ///< The protobuf message type. + using native_value_type = Native; ///< The native value type. + friend derived_type; + + constexpr auto operator()(auto&&... args) const + { + return static_cast(this)->operator()(std::forward(args)...); + } +}; +} struct empty { @@ -52,142 +68,59 @@ struct empty constexpr native_value_type operator()(const value_type&) const; }; -struct broadcast_settings_request +struct broadcast_settings_request : public details::converter { - using value_type = slots::broadcast::v0::BroadcastServiceSettingsRequest; ///< The protobuf message type. - using native_value_type = cura::proto::Slice; ///< The native value type. - - /** - * @brief Converts native data for broadcasting to a `proto::BroadcastServiceSettingsRequest` message. - * - * @param key The key of the setting to be broadcasted. - * @param value The value of the setting to be broadcasted. - * @return The converted `proto::BroadcastServiceSettingsRequest` message. - */ value_type operator()(const native_value_type& slice_message) const; }; - -struct handshake_request +struct handshake_request : public details::converter { - using value_type = slots::handshake::v0::CallRequest; ///< The protobuf message type. - using native_value_type = slot_metadata; ///< The native value type. - - /** - * @brief Converts native data for handshake to a `proto::HandshakeRequest` message. - * - * @param service_name The name of the service. - * @param version_range The version range of the service. - * @return The converted `proto::HandshakeRequest` message. - */ - value_type operator()(const native_value_type& slot_info) const; }; -struct handshake_response +struct handshake_response : public details::converter { - using value_type = slots::handshake::v0::CallResponse; ///< The protobuf message type. - using native_value_type = plugin_metadata; ///< The native value type. - - /** - * @brief Converts a `proto::HandshakeResponse` message to native data. - * - * @param message The `proto::HandshakeResponse` message. - * @return The native data. - */ native_value_type operator()(const value_type& message, std::string_view peer) const; }; - -struct simplify_request +struct simplify_request : public details::converter { - using value_type = slots::simplify::v0::modify::CallRequest; ///< The protobuf message type. - using native_value_type = Polygons; ///< The native value type. - - /** - * @brief Converts native data for simplification to a `proto::SimplifyRequest` message. - * - * @param polygons The polygons to be simplified. - * @param max_resolution The maximum resolution for the simplified polygons. - * @param max_deviation The maximum deviation for the simplified polygons. - * @param max_area_deviation The maximum area deviation for the simplified polygons. - * @return The converted `proto::SimplifyRequest` message. - */ value_type operator()(const native_value_type& polygons, const coord_t max_resolution, const coord_t max_deviation, const coord_t max_area_deviation) const; }; -/** - * @brief A converter struct for simplify responses. - * - * The `simplify_response` struct provides a conversion function that converts a `proto::SimplifyResponse` - * message to a native value type. - */ -struct simplify_response -{ - using value_type = slots::simplify::v0::modify::CallResponse; ///< The protobuf message type. - using native_value_type = Polygons; ///< The native value type. - - /** - * @brief Converts a `proto::SimplifyResponse` message to a native value type. - * - * @param message The `proto::SimplifyResponse` message. - * @return The converted native value. - */ +struct simplify_response : public details::converter +{ native_value_type operator()(const value_type& message) const; }; - -struct postprocess_request +struct postprocess_request : public details::converter { - using value_type = slots::postprocess::v0::modify::CallRequest; ///< The protobuf message type. - using native_value_type = std::string; ///< The native value type. - - /** - * @brief Converts a native G-code string to a `proto::PostprocessRequest` message. - * - * @param gcode The native G-code string. - * @return The converted `proto::PostprocessRequest` message. - */ value_type operator()(const native_value_type& gcode) const; }; -struct postprocess_response +struct postprocess_response : public details::converter { - using value_type = slots::postprocess::v0::modify::CallResponse; - using native_value_type = std::string; - native_value_type operator()(const value_type& message) const; }; -struct infill_generate_request +struct infill_generate_request : public details::converter { - using value_type = slots::infill::v0::generate::CallRequest; - using native_value_type = Polygons; - value_type operator()(const native_value_type& inner_contour, const std::string& pattern, const Settings& settings) const; }; struct infill_generate_response + : public details::converter>, Polygons, Polygons>> { - using value_type = slots::infill::v0::generate::CallResponse; - using native_value_type = std::tuple>, Polygons, Polygons>; - native_value_type operator()(const value_type& message) const; }; -struct gcode_paths_modify_request +struct gcode_paths_modify_request : public details::converter> { - using value_type = slots::gcode_paths::v0::modify::CallRequest; - using native_value_type = std::vector; - - value_type operator()(const native_value_type& paths, const size_t extruder_nr, const LayerIndex layer_nr) const; + value_type operator()(const native_value_type& gcode, const size_t extruder_nr, const LayerIndex layer_nr) const; }; -struct gcode_paths_modify_response +struct gcode_paths_modify_response : public details::converter> { - using value_type = slots::gcode_paths::v0::modify::CallResponse; - using native_value_type = std::vector; - native_value_type operator()(const value_type& message) const; }; From 90ed90bc4b8d3312ce691ec2c0714b6edb2e8bc2 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Tue, 8 Aug 2023 11:05:06 +0000 Subject: [PATCH 206/470] Applied clang-format. --- include/plugins/converters.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 8ff5ad743e..083930599f 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -50,13 +50,13 @@ struct converter using value_type = Msg; ///< The protobuf message type. using native_value_type = Native; ///< The native value type. friend derived_type; - + constexpr auto operator()(auto&&... args) const { return static_cast(this)->operator()(std::forward(args)...); } }; -} +} // namespace details struct empty { From 5174cc353b2fc42366bf60b6809eb06c948c1367 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 14:12:47 +0200 Subject: [PATCH 207/470] Get settings from global stack when mesh is nullptr CURA-10619 --- src/infill.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infill.cpp b/src/infill.cpp index 9e54cfc074..701d5b21f4 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -311,7 +311,7 @@ void Infill::_generate( case EFillMethod::PLUGIN: { auto [toolpaths_, generated_result_polygons_, generated_result_lines_] - = slots::instance().generate(inner_contour, mesh->settings.get("infill_pattern"), mesh->settings); + = slots::instance().generate(inner_contour, mesh ? mesh->settings.get("infill_pattern") : settings.get("infill_pattern"), mesh ? mesh->settings : settings); toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); result_polygons.add(generated_result_polygons_); result_lines.add(generated_result_lines_); From 423234b4557f60dfe19817151c1f4ff2067787a4 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Tue, 8 Aug 2023 12:13:21 +0000 Subject: [PATCH 208/470] Applied clang-format. --- src/infill.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/infill.cpp b/src/infill.cpp index 701d5b21f4..c3e43854d9 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -310,8 +310,10 @@ void Infill::_generate( break; case EFillMethod::PLUGIN: { - auto [toolpaths_, generated_result_polygons_, generated_result_lines_] - = slots::instance().generate(inner_contour, mesh ? mesh->settings.get("infill_pattern") : settings.get("infill_pattern"), mesh ? mesh->settings : settings); + auto [toolpaths_, generated_result_polygons_, generated_result_lines_] = slots::instance().generate( + inner_contour, + mesh ? mesh->settings.get("infill_pattern") : settings.get("infill_pattern"), + mesh ? mesh->settings : settings); toolpaths.insert(toolpaths.end(), toolpaths_.begin(), toolpaths_.end()); result_polygons.add(generated_result_polygons_); result_lines.add(generated_result_lines_); From f6822d7622a0bafe9fcf6cfd91b4870600cfda03 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 15:06:37 +0200 Subject: [PATCH 209/470] Switched order of member variables To not mess up pre-refactor initialization CURA-10446 --- include/pathPlanning/TimeMaterialEstimates.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pathPlanning/TimeMaterialEstimates.h b/include/pathPlanning/TimeMaterialEstimates.h index 68a33e3cd8..eecc69348c 100644 --- a/include/pathPlanning/TimeMaterialEstimates.h +++ b/include/pathPlanning/TimeMaterialEstimates.h @@ -10,11 +10,11 @@ namespace cura struct TimeMaterialEstimates { double extrude_time{ 0.0 }; //!< Time in seconds occupied by extrusion - double extrude_time_at_slowest_path_speed{ 0.0 }; //!< Time in seconds occupied by extrusion assuming paths are printed at slowest path speed, usually the outer wall speed - double extrude_time_at_minimum_speed{ 0.0 }; //!< Time in seconds occupied by extrusion assuming paths are printed at the user specified Minimum Speed double unretracted_travel_time{ 0.0 }; //!< Time in seconds occupied by non-retracted travel (non-extrusion) double retracted_travel_time{ 0.0 }; //!< Time in seconds occupied by retracted travel (non-extrusion) double material{ 0.0 }; //!< Material used (in mm^3) + double extrude_time_at_slowest_path_speed{ 0.0 }; //!< Time in seconds occupied by extrusion assuming paths are printed at slowest path speed, usually the outer wall speed + double extrude_time_at_minimum_speed{ 0.0 }; //!< Time in seconds occupied by extrusion assuming paths are printed at the user specified Minimum Speed constexpr TimeMaterialEstimates& operator+=(const TimeMaterialEstimates& other) noexcept { From 6f34785069834b867c0c4572c69e65fdde7767ac Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 15:12:04 +0200 Subject: [PATCH 210/470] Fixed missing includes and forward decleration CURA-10446 --- include/LayerPlanBuffer.h | 77 +++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index 4e05ffcade..3f97b4e274 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -1,32 +1,35 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef LAYER_PLAN_BUFFER_H #define LAYER_PLAN_BUFFER_H -#include - #include "Preheat.h" +#include "settings/Settings.h" #include "settings/types/Duration.h" -namespace cura +#include +#include + +namespace cura { class ExtruderPlan; class LayerPlan; +class GCodeExport; /*! * Class for buffering multiple layer plans (\ref LayerPlan) / extruder plans within those layer plans, so that temperature commands can be inserted in earlier layer plans. - * + * * This class handles where to insert temperature commands for: * - initial layer temperature * - flow dependent temperature * - starting to heat up from the standby temperature * - initial printing temperature | printing temperature | final printing temperature - * + * * \image html assets/precool.png "Temperature Regulation" width=10cm * \image latex assets/precool.png "Temperature Regulation" width=10cm - * + * */ class LayerPlanBuffer { @@ -34,25 +37,30 @@ class LayerPlanBuffer Preheat preheat_config; //!< the nozzle and material temperature settings for each extruder train. - static constexpr size_t buffer_size = 5; // should be as low as possible while still allowing enough time in the buffer to heat up from standby temp to printing temp // TODO: hardcoded value + static constexpr size_t buffer_size + = 5; // should be as low as possible while still allowing enough time in the buffer to heat up from standby temp to printing temp // TODO: hardcoded value // this value should be higher than 1, cause otherwise each layer is viewed as the first layer and no temp commands are inserted. - static constexpr Duration extra_preheat_time = 1.0_s; //!< Time to start heating earlier than computed to avoid accummulative discrepancy between actual heating times and computed ones. + static constexpr Duration extra_preheat_time + = 1.0_s; //!< Time to start heating earlier than computed to avoid accummulative discrepancy between actual heating times and computed ones. - std::vector extruder_used_in_meshgroup; //!< For each extruder whether it has already been planned once in this meshgroup. This is used to see whether we should heat to the initial_print_temp or to the extrusion_temperature + std::vector extruder_used_in_meshgroup; //!< For each extruder whether it has already been planned once in this meshgroup. This is used to see whether we should heat to + //!< the initial_print_temp or to the extrusion_temperature /*! * The buffer containing several layer plans (LayerPlan) before writing them to gcode. - * + * * The front is the lowest/oldest layer. * The back is the highest/newest layer. */ std::list buffer; + public: LayerPlanBuffer(GCodeExport& gcode) - : gcode(gcode) - , extruder_used_in_meshgroup(MAX_EXTRUDERS, false) - { } + : gcode(gcode) + , extruder_used_in_meshgroup(MAX_EXTRUDERS, false) + { + } void setPreheatConfig(); @@ -64,7 +72,7 @@ class LayerPlanBuffer /*! * Push a new layer onto the buffer and handle the buffer. * Write a layer to gcode if it is popped out of the buffer. - * + * * \param layer_plan The layer to handle * \param gcode The exporter with which to write a layer to gcode if the buffer is too large after pushing the new layer. */ @@ -81,7 +89,7 @@ class LayerPlanBuffer * This inserts the temperature commands to start warming for a given layer in earlier layers; * the fan speeds and layer time settings of the most recently pushed layer are processed; * the correctly combing travel move between the last added layer and the layer before is added. - * + * * Pop out the earliest layer in the buffer if the buffer size is exceeded * \return A nullptr or the popped gcode_layer */ @@ -89,7 +97,7 @@ class LayerPlanBuffer /*! * Add the travel move to properly travel from the end location of the previous layer to the starting location of the next - * + * * \param prev_layer The layer before the just added layer, to which to add the combing travel move. * \param newest_layer The newly added layer, with a non-combing travel move as first path. */ @@ -102,7 +110,7 @@ class LayerPlanBuffer /*! * Insert a preheat command for @p extruder into @p extruder_plan_before - * + * * \param extruder_plan_before An extruder plan before the extruder plan for which the temperature is computed, in which to insert the preheat command * \param time_before_extruder_plan_end The time before the end of the extruder plan, before which to insert the preheat command * \param extruder_nr The extruder for which to set the temperature @@ -113,9 +121,9 @@ class LayerPlanBuffer /*! * Compute the time needed to preheat from standby to required (initial) printing temperature at the start of an extruder plan, * based on the time the extruder has been on standby. - * + * * Also computes the temperature to which we cool before starting to heat agian. - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans for which to find the preheat time needed * \return the time needed to preheat and the temperature from which heating starts @@ -123,11 +131,11 @@ class LayerPlanBuffer Preheat::WarmUpResult computeStandbyTempPlan(std::vector& extruder_plans, unsigned int extruder_plan_idx); /*! - * For two consecutive extruder plans of the same extruder (so on different layers), + * For two consecutive extruder plans of the same extruder (so on different layers), * preheat the extruder to the temperature corresponding to the average flow of the second extruder plan. - * + * * The preheat commands are inserted such that the middle of the temperature change coincides with the start of the next layer. - * + * * \param prev_extruder_plan The former extruder plan (of the former layer) * \param extruder_nr The extruder for which too set the temperature * \param required_temp The required temperature for the second extruder plan @@ -139,7 +147,7 @@ class LayerPlanBuffer * Find the time window in which this extruder hasn't been used * and compute at what time the preheat command needs to be inserted. * Then insert the preheat command in the right extruder plan. - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans for which to find the preheat time needed */ @@ -148,15 +156,15 @@ class LayerPlanBuffer /*! * Insert temperature commands related to the extruder plan corersponding to @p extruder_plan_idx * and the extruder plan before: - * + * * In case the extruder plan before has the same extruder: * - gradually change printing temperature around the layer change (\ref LayerPlanBuffer::insertPreheatCommand_singleExtrusion) - * + * * In case the previous extruder plan is a different extruder * - insert preheat command from standby to initial temp in the extruder plan(s) before (\ref LayerPlanBuffer::insertPreheatCommand_multiExtrusion) * - insert the final print temp command of the previous extruder plan (\ref LayerPlanBuffer::insertFinalPrintTempCommand) * - insert the normal extrusion temp command for the current extruder plan (\ref LayerPlanBuffer::insertPrintTempCommand) - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans for which to generate the preheat command */ @@ -164,20 +172,20 @@ class LayerPlanBuffer /*! * Insert the temperature command to heat from the initial print temperature to the printing temperature - * + * * The temperature command is insert at the start of the very first extrusion move - * + * * \param extruder_plan The extruder plan in which to insert the heat up command */ void insertPrintTempCommand(ExtruderPlan& extruder_plan); /*! * Insert the temp command to start cooling from the printing temperature to the final print temp - * + * * The print temp is inserted before the last extrusion move of the extruder plan corresponding to \p last_extruder_plan_idx - * + * * The command is inserted at a timed offset before the end of the last extrusion move - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param last_extruder_plan_idx The index of the last extruder plan in \p extruder_plans with the same extruder as previous extruder plans */ @@ -192,7 +200,7 @@ class LayerPlanBuffer * Reconfigure the standby temperature during which we didn't print with this extruder. * Find the previous extruder plan with the same extruder as layers[layer_plan_idx].extruder_plans[extruder_plan_idx] * Set the prev_extruder_standby_temp in the next extruder plan - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans before which to reconfigure the standby temperature * \param standby_temp The temperature to which to cool down when the extruder is in standby mode. @@ -201,7 +209,6 @@ class LayerPlanBuffer }; - } // namespace cura #endif // LAYER_PLAN_BUFFER_H \ No newline at end of file From 851bac857d33136a48bb03b2df46667370eb4587 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 8 Aug 2023 15:30:17 +0200 Subject: [PATCH 211/470] Add plugin/converters.cpp to CMakeLists.txt CURA-10446 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 286820b6fa..ad72830e85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,7 @@ set(engine_SRCS # Except main.cpp. src/pathPlanning/LinePolygonsCrossings.cpp src/pathPlanning/NozzleTempInsert.cpp + src/plugins/converters.cpp src/progress/Progress.cpp src/progress/ProgressStageEstimator.cpp From aab085ae3efe0ad92f7959846d107be2a328887f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 10 Aug 2023 08:25:50 +0200 Subject: [PATCH 212/470] Increase timeout to 5 minutes Supporting longer processes Contributes to CURA-10619 --- include/plugins/components/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h index 661e1dc23d..fe99c7043a 100644 --- a/include/plugins/components/common.h +++ b/include/plugins/components/common.h @@ -29,7 +29,7 @@ using plugin_info_ptr = std::shared_ptr>; * @param timeout - Call timeout duration (optional, default = 500ms) */ inline static void - prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(500)) + prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::minutes(5)) { // Set time-out client_context.set_deadline(std::chrono::system_clock::now() + timeout); From 2d05be95018a4f6cf973ee9f1284922bec933bfa Mon Sep 17 00:00:00 2001 From: jellespijker Date: Thu, 10 Aug 2023 06:26:33 +0000 Subject: [PATCH 213/470] Applied clang-format. --- include/plugins/components/common.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h index fe99c7043a..80666a9b3e 100644 --- a/include/plugins/components/common.h +++ b/include/plugins/components/common.h @@ -28,8 +28,7 @@ using plugin_info_ptr = std::shared_ptr>; * @param client_context - Client context to prepare * @param timeout - Call timeout duration (optional, default = 500ms) */ -inline static void - prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::minutes(5)) +inline static void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::minutes(5)) { // Set time-out client_context.set_deadline(std::chrono::system_clock::now() + timeout); From 6650e8021a01c9203fd2dbd052d3b9a25eaf1f19 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 10 Aug 2023 11:49:52 +0200 Subject: [PATCH 214/470] Refactor broadcast and invoke components, upgrade asio-grpc This commit refactors broadcast and invoke components to remove repetitive code and increase maintainability. It introduces 'broadcast_stub' and 'broadcast_rpc' structs to replace the 'broadcast_factory' and 'broadcast_message_factory' functions, improving clarity. Additionally, the 'agrpc::RPC' references have been updated to 'agrpc::ClientRPC' for better specificity. The asio-grpc library has also been upgraded from 2.4.0 to 2.6.0 to benefit from the latest features and improvements. The grpc backend option for asio-grpc is also set to 'boost' instead of the default value. Contribute to CURA-10619 --- conanfile.py | 3 ++- include/plugins/broadcasts.h | 29 ++++++++++++++++++-------- include/plugins/components/broadcast.h | 13 ++++++------ include/plugins/components/invoke.h | 3 ++- include/plugins/pluginproxy.h | 4 +++- 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/conanfile.py b/conanfile.py index b65c67a704..e6b63b137e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -71,6 +71,7 @@ def configure(self): self.options["grpc"].php_plugin = False self.options["grpc"].python_plugin = False self.options["grpc"].ruby_plugin = False + self.options["asio-grpc"].backend = "boost" self.options["asio-grpc"].local_allocator = "recycling_allocator" if self.options.enable_arcus: self.options["arcus"].shared = True @@ -105,7 +106,7 @@ def requirements(self): self.requires("protobuf/3.21.9") self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") - self.requires("asio-grpc/2.4.0") + self.requires("asio-grpc/2.6.0") self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") def generate(self): diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h index dd0ab746f8..4b19477ccc 100644 --- a/include/plugins/broadcasts.h +++ b/include/plugins/broadcasts.h @@ -5,6 +5,7 @@ #define PLUGINS_BROADCAST_H #include "cura/plugins/v0/slot_id.pb.h" +#include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "plugins/converters.h" #include @@ -23,20 +24,30 @@ struct is_broadcast_channel template inline constexpr bool is_broadcast_channel_v = is_broadcast_channel::value; -template -requires is_broadcast_channel_v -constexpr auto broadcast_message_factory(auto&&... args) +template +struct broadcast_stub { - return broadcast_settings_request{}(std::forward(args)...); -}; + using stub_type = slots::broadcast::v0::BroadcastService::Stub; + using derived_type = T; + friend derived_type; + + constexpr auto operator()(auto&&... args) + { + return request_(std::forward(args)...); + } +private: + C request_{}; +}; -template +template requires is_broadcast_channel_v -constexpr auto broadcast_factory() +struct broadcast_rpc : public broadcast_stub, broadcast_settings_request> { - return agrpc::RPC<&Stub::PrepareAsyncBroadcastSettings>{}; -} + using base_type = broadcast_stub>; + using ClientRPC = agrpc::ClientRPC<&base_type::stub_type::PrepareAsyncBroadcastSettings>; +}; + } // namespace cura::plugins::details diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index 57720a61cc..76214a7929 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -14,7 +14,9 @@ #include "utils/types/generic.h" #include +#include #include +#include #include #include #include @@ -30,8 +32,6 @@ namespace cura::plugins template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. class PluginProxyBroadcastComponent { - using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; - public: constexpr PluginProxyBroadcastComponent() = default; @@ -78,16 +78,17 @@ class PluginProxyBroadcastComponent grpc::ClientContext client_context{}; prep_client_context(client_context, *slot_info_); - auto broadcaster{ details::broadcast_factory() }; - auto request = details::broadcast_message_factory(std::forward(args)...); + using request_type = details::broadcast_rpc; + request_type request{}; + auto response = google::protobuf::Empty{}; - status = co_await broadcaster.request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); + status = co_await request_type::ClientRPC::request(grpc_context, broadcast_stub_, client_context, request(std::forward(args)...), response, boost::asio::use_awaitable); co_return; } details::slot_info_ptr slot_info_; details::plugin_info_ptr plugin_info_; - ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. + ranges::semiregular_box::stub_type> broadcast_stub_; ///< The gRPC Broadcast stub for communication. }; } // namespace cura::plugins diff --git a/include/plugins/components/invoke.h b/include/plugins/components/invoke.h index 616f33c087..332d08a4e2 100644 --- a/include/plugins/components/invoke.h +++ b/include/plugins/components/invoke.h @@ -14,6 +14,7 @@ #include "utils/types/generic.h" #include +#include #include #include #include @@ -139,7 +140,7 @@ class PluginProxyInvokeComponent */ boost::asio::awaitable invokeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) { - using RPC = agrpc::RPC<&invoke_stub_t::PrepareAsyncCall>; + using RPC = agrpc::ClientRPC<&invoke_stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; prep_client_context(client_context, *slot_info_); diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 2b6c7e5b38..49840be61d 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -21,6 +21,8 @@ #include "utils/types/generic.h" #include +#include +#include #include #include #include @@ -92,7 +94,7 @@ class PluginProxy grpc_context, [this, &grpc_context, &status, &plugin_info, &handshake_stub]() -> boost::asio::awaitable { - using RPC = agrpc::RPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; + using RPC = agrpc::ClientRPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; grpc::ClientContext client_context{}; prep_client_context(client_context, *slot_info_); From 5efa2cb700653418e3b0706631c8ab589ff99a25 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Thu, 10 Aug 2023 09:51:43 +0000 Subject: [PATCH 215/470] Applied clang-format. --- include/plugins/broadcasts.h | 2 +- include/plugins/components/broadcast.h | 8 +++++++- include/plugins/pluginproxy.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h index 4b19477ccc..acfaaa23ef 100644 --- a/include/plugins/broadcasts.h +++ b/include/plugins/broadcasts.h @@ -4,8 +4,8 @@ #ifndef PLUGINS_BROADCAST_H #define PLUGINS_BROADCAST_H -#include "cura/plugins/v0/slot_id.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" +#include "cura/plugins/v0/slot_id.pb.h" #include "plugins/converters.h" #include diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index 76214a7929..225ae0f586 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -82,7 +82,13 @@ class PluginProxyBroadcastComponent request_type request{}; auto response = google::protobuf::Empty{}; - status = co_await request_type::ClientRPC::request(grpc_context, broadcast_stub_, client_context, request(std::forward(args)...), response, boost::asio::use_awaitable); + status = co_await request_type::ClientRPC::request( + grpc_context, + broadcast_stub_, + client_context, + request(std::forward(args)...), + response, + boost::asio::use_awaitable); co_return; } diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 49840be61d..a7d0f6dac8 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -22,8 +22,8 @@ #include #include -#include #include +#include #include #include #include From 8e55e23b87e7bff526e00cc7a0d449f220ae5b42 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 10 Aug 2023 15:28:03 +0200 Subject: [PATCH 216/470] Don't inherit from numeric_facade for LayerIndex There where a lot of conversion troubles because it returned the base type. Contribute to CURA-10916 --- include/settings/types/LayerIndex.h | 188 +++++++++++++++++++++++++-- include/utils/types/numeric_facade.h | 64 +++------ 2 files changed, 192 insertions(+), 60 deletions(-) diff --git a/include/settings/types/LayerIndex.h b/include/settings/types/LayerIndex.h index 4588642cd5..28822675ff 100644 --- a/include/settings/types/LayerIndex.h +++ b/include/settings/types/LayerIndex.h @@ -4,26 +4,190 @@ #ifndef LAYERINDEX_H #define LAYERINDEX_H -#include "utils/types/numeric_facade.h" +#include "utils/types/generic.h" #include namespace cura { -/* - * \brief Struct behaving like a layer number. - * - * This is a facade. It behaves exactly like an integer but is used to indicate - * that it is a layer number. - */ -struct LayerIndex : public utils::NumericFacade +struct LayerIndex { - using base_type = utils::NumericFacade; - using base_type::NumericFacade; + using value_type = int64_t; + using difference_type = std::ptrdiff_t; - constexpr LayerIndex(const base_type& base) noexcept - : base_type{ base } {}; + value_type value{}; + + constexpr LayerIndex() noexcept = default; + + constexpr LayerIndex(const LayerIndex& other) noexcept = default; + constexpr LayerIndex(LayerIndex&& other) noexcept = default; + + constexpr explicit LayerIndex(const utils::floating_point auto val) noexcept : value{ static_cast(val) } {}; + + constexpr LayerIndex(const utils::integral auto val) noexcept : value{ static_cast(val) } {}; + + constexpr LayerIndex& operator=(const LayerIndex& other) noexcept = default; + + constexpr LayerIndex& operator=(const utils::integral auto& other) noexcept + { + this->value = static_cast(other); + return *this; + } + + constexpr LayerIndex& operator=(LayerIndex&& other) noexcept = default; + constexpr LayerIndex& operator=(const utils::integral auto&& other) noexcept + { + this->value = static_cast(other); + return *this; + } + + ~LayerIndex() noexcept = default; + + constexpr operator value_type() const noexcept + { + return value; + } + + constexpr bool operator==(const LayerIndex& other) const noexcept + { + return value == other.value; + } + + constexpr bool operator==(const utils::integral auto& other) const noexcept + { + return value == static_cast(other); + } + + constexpr auto operator<=>(const LayerIndex& other) const noexcept = default; + constexpr auto operator<=>(const utils::integral auto& other) const noexcept + { + return value <=> static_cast(other); + }; + + constexpr LayerIndex& operator+=(const LayerIndex& other) noexcept + { + value += other.value; + return *this; + } + + constexpr LayerIndex& operator+=(const utils::integral auto& other) noexcept + { + value += static_cast(other); + return *this; + } + + constexpr LayerIndex& operator-=(const LayerIndex& other) noexcept + { + value -= other.value; + return *this; + } + + constexpr LayerIndex& operator-=(const utils::integral auto& other) noexcept + { + value -= static_cast(other); + return *this; + } + + constexpr LayerIndex& operator*=(const LayerIndex& other) noexcept + { + value *= other.value; + return *this; + } + + constexpr LayerIndex& operator*=(const utils::integral auto& other) noexcept + { + value *= static_cast(other); + return *this; + } + + constexpr LayerIndex& operator/=(const LayerIndex& other) + { + value /= other.value; + return *this; + } + + constexpr LayerIndex& operator/=(const utils::integral auto& other) + { + value /= static_cast(other); + return *this; + } + + constexpr LayerIndex operator+(const LayerIndex& other) const noexcept + { + return { value + other.value }; + } + + constexpr LayerIndex operator+(LayerIndex&& other) const noexcept + { + return { value + other.value }; + } + + constexpr LayerIndex operator+(const utils::integral auto& other) const noexcept + { + return { value + static_cast(other) }; + } + + constexpr LayerIndex operator-(const LayerIndex& other) const noexcept + { + return { value - other.value }; + } + + constexpr LayerIndex operator-(const utils::integral auto& other) const noexcept + { + return { value - static_cast(other) }; + } + + constexpr LayerIndex operator*(const LayerIndex& other) const noexcept + { + return { value * other.value }; + } + + constexpr LayerIndex operator*(const utils::integral auto& other) const noexcept + { + return { value * static_cast(other) }; + } + + constexpr LayerIndex operator/(const LayerIndex& other) const + { + return { value / other.value }; + } + + constexpr LayerIndex operator/(const utils::integral auto& other) const + { + return { value / static_cast(other) }; + } + + constexpr LayerIndex operator-() const noexcept + { + return { -value }; + } + + constexpr LayerIndex& operator++() noexcept + { + ++value; + return *this; + } + + LayerIndex operator++(int) noexcept + { + LayerIndex tmp{ *this }; + operator++(); + return tmp; + } + + constexpr LayerIndex& operator--() noexcept + { + --value; + return *this; + } + + LayerIndex operator--(int) noexcept + { + LayerIndex tmp{ *this }; + operator--(); + return tmp; + } }; } // namespace cura diff --git a/include/utils/types/numeric_facade.h b/include/utils/types/numeric_facade.h index ae6a6074ec..6f70517199 100644 --- a/include/utils/types/numeric_facade.h +++ b/include/utils/types/numeric_facade.h @@ -9,11 +9,10 @@ namespace cura::utils { -template +template struct NumericFacade { using value_type = T; - using difference_type = std::ptrdiff_t; value_type value{}; @@ -22,30 +21,20 @@ struct NumericFacade constexpr NumericFacade(const NumericFacade& other) noexcept = default; constexpr NumericFacade(NumericFacade&& other) noexcept = default; - constexpr NumericFacade(const floating_point auto val) noexcept requires floating_point : value{ static_cast(val) } {}; - - constexpr NumericFacade(const integral auto val) noexcept requires integral : value{ static_cast(val) } {}; + constexpr NumericFacade(const floating_point auto val) noexcept : value{ static_cast(val) } {}; + constexpr explicit NumericFacade(const integral auto val) noexcept : value{ static_cast(val) } {}; constexpr NumericFacade& operator=(const NumericFacade& other) noexcept = default; - constexpr NumericFacade& operator=(const floating_point auto& other) noexcept requires floating_point - { - this->value = static_cast(other); - return *this; - } - constexpr NumericFacade& operator=(const integral auto& other) noexcept requires integral + constexpr NumericFacade& operator=(const floating_point auto& other) noexcept { this->value = static_cast(other); return *this; } constexpr NumericFacade& operator=(NumericFacade&& other) noexcept = default; - constexpr NumericFacade& operator=(const integral auto&& other) noexcept requires integral - { - this->value = static_cast(other); - return *this; - } - constexpr NumericFacade& operator=(const floating_point auto&& other) noexcept requires floating_point + + constexpr NumericFacade& operator=(const floating_point auto&& other) noexcept { this->value = static_cast(other); return *this; @@ -63,13 +52,13 @@ struct NumericFacade return value == other.value; } - constexpr bool operator==(const numeric auto& other) const noexcept + constexpr bool operator==(const floating_point auto& other) const noexcept { return value == static_cast(other); } constexpr auto operator<=>(const NumericFacade& other) const noexcept = default; - constexpr auto operator<=>(const numeric auto& other) const noexcept + constexpr auto operator<=>(const floating_point auto& other) const noexcept { return value <=> static_cast(other); }; @@ -80,7 +69,7 @@ struct NumericFacade return *this; } - constexpr NumericFacade& operator+=(const numeric auto& other) noexcept + constexpr NumericFacade& operator+=(const floating_point auto& other) noexcept { value += static_cast(other); return *this; @@ -92,7 +81,7 @@ struct NumericFacade return *this; } - constexpr NumericFacade& operator-=(const numeric auto& other) noexcept + constexpr NumericFacade& operator-=(const floating_point auto& other) noexcept { value -= static_cast(other); return *this; @@ -104,7 +93,7 @@ struct NumericFacade return *this; } - constexpr NumericFacade& operator*=(const numeric auto& other) noexcept + constexpr NumericFacade& operator*=(const floating_point auto& other) noexcept { value *= static_cast(other); return *this; @@ -116,7 +105,7 @@ struct NumericFacade return *this; } - constexpr NumericFacade& operator/=(const numeric auto& other) + constexpr NumericFacade& operator/=(const floating_point auto& other) { value /= static_cast(other); return *this; @@ -132,7 +121,7 @@ struct NumericFacade return { value + other.value }; } - constexpr NumericFacade operator+(const numeric auto& other) const noexcept + constexpr NumericFacade operator+(const floating_point auto& other) const noexcept { return { value + static_cast(other) }; } @@ -142,7 +131,7 @@ struct NumericFacade return { value - other.value }; } - constexpr NumericFacade operator-(const numeric auto& other) const noexcept + constexpr NumericFacade operator-(const floating_point auto& other) const noexcept { return { value - static_cast(other) }; } @@ -152,7 +141,7 @@ struct NumericFacade return { value * other.value }; } - constexpr NumericFacade operator*(const numeric auto& other) const noexcept + constexpr NumericFacade operator*(const floating_point auto& other) const noexcept { return { value * static_cast(other) }; } @@ -162,7 +151,7 @@ struct NumericFacade return { value / other.value }; } - constexpr NumericFacade operator/(const numeric auto& other) const + constexpr NumericFacade operator/(const floating_point auto& other) const { return { value / static_cast(other) }; } @@ -172,27 +161,6 @@ struct NumericFacade return { -value }; } - constexpr NumericFacade& operator++() noexcept requires integral - { - ++value; - return *this; - } - - constexpr NumericFacade operator++(int) noexcept requires integral - { - return { value++ }; - } - - constexpr NumericFacade& operator--() noexcept requires integral - { - --value; - return *this; - } - - constexpr NumericFacade operator--(int) noexcept requires integral - { - return { value-- }; - } }; } // namespace cura::utils From d2309635f5ecece62eef7fb9de154b99fc1dd148 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 10 Aug 2023 15:29:54 +0200 Subject: [PATCH 217/470] Make the connection a bit more robust Contribute to CURA-10916 --- src/utils/channel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/channel.cpp b/src/utils/channel.cpp index 2dbe8fca23..2a4c775767 100644 --- a/src/utils/channel.cpp +++ b/src/utils/channel.cpp @@ -36,7 +36,12 @@ std::shared_ptr createChannel(const ChannelSetupConfiguration& co spdlog::warn("Remote plugins where disabled, will not connect to {}:{}.", config.host, config.port); return std::shared_ptr(); }; - return grpc::CreateChannel(fmt::format("{}:{}", config.host, config.port), create_credentials(config)); + grpc::ChannelArguments args; + args.SetInt(GRPC_ARG_KEEPALIVE_TIME_MS, 200 * 1000 /*200 sec*/); + args.SetInt(GRPC_ARG_KEEPALIVE_TIMEOUT_MS, 100 * 1000 /*100 sec*/); + args.SetInt(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS, 1); + + return grpc::CreateCustomChannel(fmt::format("{}:{}", config.host, config.port), create_credentials(config), args); } } // namespace cura::utils From 0ee09437c2cd437a51fec17c0d67d0ecd10e424d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 10 Aug 2023 15:30:39 +0200 Subject: [PATCH 218/470] Make sure that COmmunication works with concrete int64 Contribute to CURA-10916 --- include/communication/ArcusCommunication.h | 4 ++-- include/communication/ArcusCommunicationPrivate.h | 2 +- include/communication/CommandLine.h | 4 ++-- include/communication/Communication.h | 4 ++-- src/communication/ArcusCommunication.cpp | 4 ++-- src/communication/ArcusCommunicationPrivate.cpp | 2 +- src/communication/CommandLine.cpp | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/communication/ArcusCommunication.h b/include/communication/ArcusCommunication.h index 133c68268f..c3dfa02846 100644 --- a/include/communication/ArcusCommunication.h +++ b/include/communication/ArcusCommunication.h @@ -117,7 +117,7 @@ class ArcusCommunication : public Communication * \param z The z-coordinate of the top side of the layer. * \param thickness The thickness of the layer. */ - void sendLayerComplete(const LayerIndex& layer_nr, const coord_t& z, const coord_t& thickness) override; + void sendLayerComplete(const LayerIndex::value_type& layer_nr, const coord_t& z, const coord_t& thickness) override; /* * \brief Send a line to the front-end to display in layer view. @@ -192,7 +192,7 @@ class ArcusCommunication : public Communication * \param layer_nr The index of the layer to send data for. This is zero- * indexed but may be negative for raft layers. */ - void setLayerForSend(const LayerIndex& layer_nr) override; + void setLayerForSend(const LayerIndex::value_type& layer_nr) override; /* * \brief Slice the next scene that the front-end wants us to slice. diff --git a/include/communication/ArcusCommunicationPrivate.h b/include/communication/ArcusCommunicationPrivate.h index 48534deee4..5d2cebfed2 100644 --- a/include/communication/ArcusCommunicationPrivate.h +++ b/include/communication/ArcusCommunicationPrivate.h @@ -27,7 +27,7 @@ class ArcusCommunication::Private * \param layer_nr The layer number to get the optimised layer data for. * \return The optimised layer data for that layer. */ - std::shared_ptr getOptimizedLayerById(LayerIndex layer_nr); + std::shared_ptr getOptimizedLayerById(LayerIndex::value_type layer_nr); /* * Reads the global settings from a Protobuf message. diff --git a/include/communication/CommandLine.h b/include/communication/CommandLine.h index 321671fd1c..b949ec647f 100644 --- a/include/communication/CommandLine.h +++ b/include/communication/CommandLine.h @@ -86,7 +86,7 @@ class CommandLine : public Communication * The command line doesn't do anything with that information so this is * ignored. */ - void sendLayerComplete(const LayerIndex&, const coord_t&, const coord_t&) override; + void sendLayerComplete(const LayerIndex::value_type&, const coord_t&, const coord_t&) override; /* * \brief Send a line for display. @@ -143,7 +143,7 @@ class CommandLine : public Communication * This has no effect though because we don't shwo these three functions * because the command line doesn't show layer view. */ - void setLayerForSend(const LayerIndex&) override; + void setLayerForSend(const LayerIndex::value_type&) override; /* * \brief Slice the next scene that the command line commands us to slice. diff --git a/include/communication/Communication.h b/include/communication/Communication.h index 48cc6a3133..bdd68b9630 100644 --- a/include/communication/Communication.h +++ b/include/communication/Communication.h @@ -62,7 +62,7 @@ class Communication * \param z The z-coordinate of the top side of the layer. * \param thickness The thickness of the layer. */ - virtual void sendLayerComplete(const LayerIndex& layer_nr, const coord_t& z, const coord_t& thickness) = 0; + virtual void sendLayerComplete(const LayerIndex::value_type& layer_nr, const coord_t& z, const coord_t& thickness) = 0; /* * \brief Send polygons to the user to visualise. @@ -126,7 +126,7 @@ class Communication * \param layer_nr The index of the layer to send data for. This is zero- * indexed but may be negative for raft layers. */ - virtual void setLayerForSend(const LayerIndex& layer_nr) = 0; + virtual void setLayerForSend(const LayerIndex::value_type& layer_nr) = 0; /* * \brief Send the sliced layer data through this communication after the diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index cd360ae5e4..0df3ac998d 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -393,7 +393,7 @@ void ArcusCommunication::sendFinishedSlicing() const spdlog::debug("Sent slicing finished message."); } -void ArcusCommunication::sendLayerComplete(const LayerIndex& layer_nr, const coord_t& z, const coord_t& thickness) +void ArcusCommunication::sendLayerComplete(const LayerIndex::value_type& layer_nr, const coord_t& z, const coord_t& thickness) { std::shared_ptr layer = private_data->getOptimizedLayerById(layer_nr); layer->set_height(z); @@ -494,7 +494,7 @@ void ArcusCommunication::sendProgress(const float& progress) const private_data->last_sent_progress = rounded_amount; } -void ArcusCommunication::setLayerForSend(const LayerIndex& layer_nr) +void ArcusCommunication::setLayerForSend(const LayerIndex::value_type& layer_nr) { path_compiler->setLayer(layer_nr); } diff --git a/src/communication/ArcusCommunicationPrivate.cpp b/src/communication/ArcusCommunicationPrivate.cpp index 9de1b6e2d3..fbeda21d21 100644 --- a/src/communication/ArcusCommunicationPrivate.cpp +++ b/src/communication/ArcusCommunicationPrivate.cpp @@ -20,7 +20,7 @@ ArcusCommunication::Private::Private() : socket(nullptr), object_count(0), last_ { } -std::shared_ptr ArcusCommunication::Private::getOptimizedLayerById(LayerIndex layer_nr) +std::shared_ptr ArcusCommunication::Private::getOptimizedLayerById(LayerIndex::value_type layer_nr) { layer_nr += optimized_layers.current_layer_offset; std::unordered_map>::iterator find_result = optimized_layers.slice_data.find(layer_nr); diff --git a/src/communication/CommandLine.cpp b/src/communication/CommandLine.cpp index cac3c7da6e..33410072ed 100644 --- a/src/communication/CommandLine.cpp +++ b/src/communication/CommandLine.cpp @@ -40,7 +40,7 @@ void CommandLine::sendCurrentPosition(const Point&) void CommandLine::sendFinishedSlicing() const { } -void CommandLine::sendLayerComplete(const LayerIndex&, const coord_t&, const coord_t&) +void CommandLine::sendLayerComplete(const LayerIndex::value_type&, const coord_t&, const coord_t&) { } void CommandLine::sendLineTo(const PrintFeatureType&, const Point&, const coord_t&, const coord_t&, const Velocity&) @@ -58,7 +58,7 @@ void CommandLine::sendPolygons(const PrintFeatureType&, const Polygons&, const c void CommandLine::setExtruderForSend(const ExtruderTrain&) { } -void CommandLine::setLayerForSend(const LayerIndex&) +void CommandLine::setLayerForSend(const LayerIndex::value_type&) { } From da5979d00a5a5d4dad426a7da18a470fc9c7fd06 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Thu, 10 Aug 2023 13:31:21 +0000 Subject: [PATCH 219/470] Applied clang-format. --- include/communication/ArcusCommunication.h | 16 ++--- include/communication/CommandLine.h | 14 ++--- include/settings/types/LayerIndex.h | 6 +- include/utils/types/numeric_facade.h | 7 ++- .../ArcusCommunicationPrivate.cpp | 16 +++-- src/communication/CommandLine.cpp | 62 +++++++++---------- 6 files changed, 65 insertions(+), 56 deletions(-) diff --git a/include/communication/ArcusCommunication.h b/include/communication/ArcusCommunication.h index c3dfa02846..7cc7679535 100644 --- a/include/communication/ArcusCommunication.h +++ b/include/communication/ArcusCommunication.h @@ -6,17 +6,17 @@ #ifdef ARCUS #ifdef BUILD_TESTS - #include +#include #endif -#include //For unique_ptr and shared_ptr. - #include "Communication.h" //The class we're implementing. #include "Cura.pb.h" //To create Protobuf messages for Cura's front-end. -//Forward declarations to speed up compilation. +#include //For unique_ptr and shared_ptr. + +// Forward declarations to speed up compilation. namespace Arcus { - class Socket; +class Socket; } namespace cura @@ -227,7 +227,7 @@ class ArcusCommunication : public Communication const std::unique_ptr path_compiler; }; -} //namespace cura +} // namespace cura -#endif //ARCUS -#endif //ARCUSCOMMUNICATION_H +#endif // ARCUS +#endif // ARCUSCOMMUNICATION_H diff --git a/include/communication/CommandLine.h b/include/communication/CommandLine.h index b949ec647f..2948241c51 100644 --- a/include/communication/CommandLine.h +++ b/include/communication/CommandLine.h @@ -4,13 +4,13 @@ #ifndef COMMANDLINE_H #define COMMANDLINE_H +#include "Communication.h" //The class we're implementing. + #include //Loading JSON documents to get settings from them. #include //To store the command line arguments. #include #include //To store the command line arguments. -#include "Communication.h" //The class we're implementing. - namespace cura { class Settings; @@ -188,14 +188,12 @@ class CommandLine : public Communication * \return Error code. If it's 0, the document was successfully loaded. If * it's 1, some inheriting file could not be opened. */ - int loadJSON - ( + int loadJSON( const rapidjson::Document& document, const std::unordered_set& search_directories, Settings& settings, bool force_read_parent = false, - bool force_read_nondefault = false - ); + bool force_read_nondefault = false); /* * \brief Load an element containing a list of settings. @@ -216,6 +214,6 @@ class CommandLine : public Communication const std::string findDefinitionFile(const std::string& definition_id, const std::unordered_set& search_directories); }; -} //namespace cura +} // namespace cura -#endif //COMMANDLINE_H \ No newline at end of file +#endif // COMMANDLINE_H \ No newline at end of file diff --git a/include/settings/types/LayerIndex.h b/include/settings/types/LayerIndex.h index 28822675ff..b1a7524428 100644 --- a/include/settings/types/LayerIndex.h +++ b/include/settings/types/LayerIndex.h @@ -23,9 +23,11 @@ struct LayerIndex constexpr LayerIndex(const LayerIndex& other) noexcept = default; constexpr LayerIndex(LayerIndex&& other) noexcept = default; - constexpr explicit LayerIndex(const utils::floating_point auto val) noexcept : value{ static_cast(val) } {}; + constexpr explicit LayerIndex(const utils::floating_point auto val) noexcept + : value{ static_cast(val) } {}; - constexpr LayerIndex(const utils::integral auto val) noexcept : value{ static_cast(val) } {}; + constexpr LayerIndex(const utils::integral auto val) noexcept + : value{ static_cast(val) } {}; constexpr LayerIndex& operator=(const LayerIndex& other) noexcept = default; diff --git a/include/utils/types/numeric_facade.h b/include/utils/types/numeric_facade.h index 6f70517199..ce986fcf25 100644 --- a/include/utils/types/numeric_facade.h +++ b/include/utils/types/numeric_facade.h @@ -21,8 +21,10 @@ struct NumericFacade constexpr NumericFacade(const NumericFacade& other) noexcept = default; constexpr NumericFacade(NumericFacade&& other) noexcept = default; - constexpr NumericFacade(const floating_point auto val) noexcept : value{ static_cast(val) } {}; - constexpr explicit NumericFacade(const integral auto val) noexcept : value{ static_cast(val) } {}; + constexpr NumericFacade(const floating_point auto val) noexcept + : value{ static_cast(val) } {}; + constexpr explicit NumericFacade(const integral auto val) noexcept + : value{ static_cast(val) } {}; constexpr NumericFacade& operator=(const NumericFacade& other) noexcept = default; @@ -160,7 +162,6 @@ struct NumericFacade { return { -value }; } - }; } // namespace cura::utils diff --git a/src/communication/ArcusCommunicationPrivate.cpp b/src/communication/ArcusCommunicationPrivate.cpp index fbeda21d21..90b23c1e64 100644 --- a/src/communication/ArcusCommunicationPrivate.cpp +++ b/src/communication/ArcusCommunicationPrivate.cpp @@ -3,20 +3,26 @@ #ifdef ARCUS -#include +#include "communication/ArcusCommunicationPrivate.h" #include "Application.h" #include "ExtruderTrain.h" #include "Slice.h" -#include "communication/ArcusCommunicationPrivate.h" #include "settings/types/LayerIndex.h" #include "utils/FMatrix4x3.h" //To convert vertices to integer-points. #include "utils/floatpoint.h" //To accept vertices (which are provided in floating point). +#include + namespace cura { -ArcusCommunication::Private::Private() : socket(nullptr), object_count(0), last_sent_progress(-1), slice_count(0), millisecUntilNextTry(100) +ArcusCommunication::Private::Private() + : socket(nullptr) + , object_count(0) + , last_sent_progress(-1) + , slice_count(0) + , millisecUntilNextTry(100) { } @@ -67,7 +73,9 @@ void ArcusCommunication::Private::readExtruderSettingsMessage(const google::prot spdlog::warn("Received extruder index that is out of range: {}", extruder_nr); continue; } - ExtruderTrain& extruder = slice->scene.extruders[extruder_nr]; // Extruder messages may arrive out of order, so don't iteratively get the next extruder but take the extruder_nr from this message. + ExtruderTrain& extruder + = slice->scene + .extruders[extruder_nr]; // Extruder messages may arrive out of order, so don't iteratively get the next extruder but take the extruder_nr from this message. for (const cura::proto::Setting& setting_message : extruder_message.settings().settings()) { extruder.settings.add(setting_message.name(), setting_message.value()); diff --git a/src/communication/CommandLine.cpp b/src/communication/CommandLine.cpp index 33410072ed..7b7c0f7163 100644 --- a/src/communication/CommandLine.cpp +++ b/src/communication/CommandLine.cpp @@ -1,29 +1,32 @@ // Copyright (c) 2022 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher +#include "communication/CommandLine.h" + +#include "Application.h" //To get the extruders for material estimates. +#include "ExtruderTrain.h" +#include "FffProcessor.h" //To start a slice and get time estimates. +#include "Slice.h" +#include "utils/FMatrix4x3.h" //For the mesh_rotation_matrix setting. + +#include + #include //For strtok and strcopy. #include // error number when trying to read file #include #include //To check if files exist. #include //For std::accumulate. -#include - #include //Loading JSON documents to get settings from them. #include #include -#include - -#include "Application.h" //To get the extruders for material estimates. -#include "ExtruderTrain.h" -#include "FffProcessor.h" //To start a slice and get time estimates. -#include "Slice.h" -#include "communication/CommandLine.h" -#include "utils/FMatrix4x3.h" //For the mesh_rotation_matrix setting. +#include namespace cura { -CommandLine::CommandLine(const std::vector& arguments) : arguments(arguments), last_shown_progress(0) +CommandLine::CommandLine(const std::vector& arguments) + : arguments(arguments) + , last_shown_progress(0) { } @@ -165,7 +168,8 @@ void CommandLine::sliceNext() } else if (argument.find("--force-read-nondefault") == 0 || argument.find("--force_read_nondefault") == 0) { - spdlog::info("From this point on, if 'default_value' is not available, force the parser to read 'value' (instead of dropping it) to fill the used setting-values."); + spdlog::info( + "From this point on, if 'default_value' is not available, force the parser to read 'value' (instead of dropping it) to fill the used setting-values."); force_read_nondefault = true; } else if (argument.find("--end-force-read") == 0 || argument.find("--end_force_read") == 0) @@ -407,14 +411,12 @@ std::unordered_set CommandLine::defaultSearchDirectories() return result; } -int CommandLine::loadJSON -( +int CommandLine::loadJSON( const rapidjson::Document& document, const std::unordered_set& search_directories, Settings& settings, bool force_read_parent, - bool force_read_nondefault -) + bool force_read_nondefault) { // Inheritance from other JSON documents. if (document.HasMember("inherits") && document["inherits"].IsString()) @@ -433,7 +435,8 @@ int CommandLine::loadJSON } // Extruders defined from here, if any. - // Note that this always puts the extruder settings in the slice of the current extruder. It doesn't keep the nested structure of the JSON files, if extruders would have their own sub-extruders. + // Note that this always puts the extruder settings in the slice of the current extruder. It doesn't keep the nested structure of the JSON files, if extruders would have their + // own sub-extruders. Scene& scene = Application::getInstance().current_slice->scene; if (document.HasMember("metadata") && document["metadata"].IsObject()) { @@ -502,20 +505,17 @@ bool jsonValue2Str(const rapidjson::Value& value, std::string& value_string) } std::string temp; jsonValue2Str(value[0], temp); - value_string = - std::string("[") + - std::accumulate - ( - std::next(value.Begin()), - value.End(), - temp, - [&temp](std::string converted, const rapidjson::Value& next) - { - jsonValue2Str(next, temp); - return std::move(converted) + "," + temp; - } - ) + - std::string("]"); + value_string = std::string("[") + + std::accumulate( + std::next(value.Begin()), + value.End(), + temp, + [&temp](std::string converted, const rapidjson::Value& next) + { + jsonValue2Str(next, temp); + return std::move(converted) + "," + temp; + }) + + std::string("]"); } else { From bf42bbc83c0bd08b496c2cdf1170b9c5cd36f718 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 11 Aug 2023 10:24:22 +0200 Subject: [PATCH 220/470] fix correct spaceship return type Contributes to CURA-10916 --- include/pathPlanning/TimeMaterialEstimates.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pathPlanning/TimeMaterialEstimates.h b/include/pathPlanning/TimeMaterialEstimates.h index eecc69348c..90a1cb3a76 100644 --- a/include/pathPlanning/TimeMaterialEstimates.h +++ b/include/pathPlanning/TimeMaterialEstimates.h @@ -58,7 +58,7 @@ struct TimeMaterialEstimates material - other.material }; } - constexpr bool operator<=>(const TimeMaterialEstimates& other) const noexcept = default; + constexpr auto operator<=>(const TimeMaterialEstimates& other) const noexcept = default; constexpr void reset() noexcept { From 3e2619af00fc3b40e1d09b08d5d01d9516022f29 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 11 Aug 2023 11:15:17 +0200 Subject: [PATCH 221/470] Add missing includes Contributes to CURA-10916 --- include/plugins/components/broadcast.h | 3 +++ include/plugins/components/common.h | 4 ++++ include/plugins/components/invoke.h | 3 +++ include/plugins/exception.h | 1 + 4 files changed, 11 insertions(+) diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index 754eef03e1..bc534fcb2b 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -26,6 +26,9 @@ #include #include +#include +#include + namespace cura::plugins { namespace exceptions diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h index 80666a9b3e..ee292d95ad 100644 --- a/include/plugins/components/common.h +++ b/include/plugins/components/common.h @@ -11,6 +11,10 @@ #include #include +#include +#include +#include + namespace cura::plugins { diff --git a/include/plugins/components/invoke.h b/include/plugins/components/invoke.h index 1ea2a2e758..e233f38bd7 100644 --- a/include/plugins/components/invoke.h +++ b/include/plugins/components/invoke.h @@ -25,6 +25,9 @@ #include #include +#include +#include + namespace cura::plugins { namespace details diff --git a/include/plugins/exception.h b/include/plugins/exception.h index 93f05638eb..8cc4d9a19f 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -6,6 +6,7 @@ #include "plugins/metadata.h" #include "plugins/types.h" +#include "plugins/validator.h" #include From 017655d178453aa0f9ac721b4510bfd7b267f1bd Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 11 Aug 2023 11:36:04 +0200 Subject: [PATCH 222/470] Fix compiling Fix exceptions guard CURA-10811 --- include/plugins/components/broadcast.h | 4 ---- include/plugins/exception.h | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h index bc534fcb2b..c1c5c03db6 100644 --- a/include/plugins/components/broadcast.h +++ b/include/plugins/components/broadcast.h @@ -31,10 +31,6 @@ namespace cura::plugins { -namespace exceptions -{ -class RemoteException; // forward declaration probably needed due to us obfuscating some other classes with forward declarations -} // namespace exceptions template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. class PluginProxyBroadcastComponent diff --git a/include/plugins/exception.h b/include/plugins/exception.h index 8cc4d9a19f..a1816c7754 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef UTILS_CONCEPTS_GRAPH_H -#define UTILS_CONCEPTS_GRAPH_H +#ifndef PLUGINS_EXCEPTION_H +#define PLUGINS_EXCEPTION_H #include "plugins/metadata.h" #include "plugins/types.h" @@ -71,4 +71,4 @@ class RemoteException : public std::exception } // namespace cura::plugins::exceptions -#endif // UTILS_CONCEPTS_GRAPH_H \ No newline at end of file +#endif // PLUGINS_EXCEPTION_H \ No newline at end of file From a72d348197b82e75d7f132e6e189eb5803243585 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 11 Aug 2023 11:39:13 +0200 Subject: [PATCH 223/470] Don't use forward decls for AABB CURA-10619 --- include/infill.h | 2 +- include/utils/AABB3D.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/infill.h b/include/infill.h index 92bd5749d0..760de7d135 100644 --- a/include/infill.h +++ b/include/infill.h @@ -9,6 +9,7 @@ #include "settings/EnumSettings.h" //For infill types. #include "settings/Settings.h" #include "settings/types/Angle.h" +#include "utils/AABB.h" #include "utils/ExtrusionLine.h" #include "utils/IntPoint.h" #include "utils/section_type.h" @@ -18,7 +19,6 @@ namespace cura { -class AABB; class SierpinskiFillProvider; class SliceMeshStorage; diff --git a/include/utils/AABB3D.h b/include/utils/AABB3D.h index 7b344b292f..b889f52d86 100644 --- a/include/utils/AABB3D.h +++ b/include/utils/AABB3D.h @@ -5,12 +5,11 @@ #define UTILS_AABB3D_H #include "IntPoint.h" +#include "utils/AABB.h" namespace cura { -class AABB; - /*! An Axis Aligned Bounding Box. Has a min and max vector, representing minimal and maximal coordinates in the three axes. */ From afcbff89e4921dc4814854528df53f179f482fc6 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Fri, 11 Aug 2023 09:39:52 +0000 Subject: [PATCH 224/470] Applied clang-format. --- include/utils/AABB3D.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/utils/AABB3D.h b/include/utils/AABB3D.h index b889f52d86..c7fca9c486 100644 --- a/include/utils/AABB3D.h +++ b/include/utils/AABB3D.h @@ -1,5 +1,5 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2018 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef UTILS_AABB3D_H #define UTILS_AABB3D_H @@ -43,9 +43,9 @@ struct AABB3D /*! * Check whether this aabb overlaps with another. - * + * * In the boundary case false is returned. - * + * * \param other the aabb to check for overlaps with * \return Whether the two aabbs overlap */ @@ -90,7 +90,7 @@ struct AABB3D /*! * Offset the bounding box in the horizontal direction; outward or inward. - * + * * \param outset the distance (positive or negative) to expand the bounding box outward * \return this object (which has changed) */ @@ -98,13 +98,12 @@ struct AABB3D /*! * Offset the bounding box in the horizontal direction; outward or inward. - * + * * \param outset the distance (positive or negative) to expand the bounding box outward * \return this object (which has changed) */ AABB3D expandXY(coord_t outset); }; -}//namespace cura -#endif//UTILS_AABB3D_H - +} // namespace cura +#endif // UTILS_AABB3D_H From 8e279e0ad94ab95ec0dd2af4d0ceb58ef7aa2b1c Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 11 Aug 2023 11:45:40 +0200 Subject: [PATCH 225/470] Attempt to fix cura builds --- include/infill.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/infill.h b/include/infill.h index 92bd5749d0..431bd15f37 100644 --- a/include/infill.h +++ b/include/infill.h @@ -66,7 +66,7 @@ class Infill } public: - constexpr Infill() noexcept = default; + Infill() noexcept = default; Infill( EFillMethod pattern, From 2a80b8e5e0797a9cdf1f8a15f415b03911dab085 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Fri, 11 Aug 2023 09:46:37 +0000 Subject: [PATCH 226/470] Applied clang-format. --- include/infill.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/infill.h b/include/infill.h index 431bd15f37..296e2dbed0 100644 --- a/include/infill.h +++ b/include/infill.h @@ -66,7 +66,7 @@ class Infill } public: - Infill() noexcept = default; + Infill() noexcept = default; Infill( EFillMethod pattern, From 7317a4960f9e9fdb61a37a7ea1443965370e6367 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 11 Aug 2023 12:55:36 +0200 Subject: [PATCH 227/470] Use updated concept for regular box --- include/infill.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/infill.h b/include/infill.h index fa5ace44d1..035781ccdb 100644 --- a/include/infill.h +++ b/include/infill.h @@ -14,6 +14,8 @@ #include "utils/IntPoint.h" #include "utils/section_type.h" +#include + #include namespace cura @@ -550,7 +552,7 @@ class Infill */ void connectLines(Polygons& result_lines); }; -static_assert(std::semiregular, "Infill should be semiregular"); +static_assert(concepts::semiregular, "Infill should be semiregular"); } // namespace cura From 1ab398a70d59e771dc4f14ed5c013e20e00ae1a4 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 11 Aug 2023 13:45:51 +0200 Subject: [PATCH 228/470] resolved linking issues. Removed redundant plugin components and added Infill as a direct dependency. Also, updated the plugin proxy to handle the invocation and broadcasting tasks previously handled by the deleted plugin components. Updated and moved function 'prep_client_context' to be used within plugin proxy. Added a direct #include for "infill.h" in "broadcasts.h" and updated corresponding cmake to reflect the changes. Commented out the inclusion of "plugins/slots.h" in "LayerPlan.cpp" to resolve linking issues. These changes greatly simplify the code structure, improve clarity and ensure successful linking during project build. Contributes to CURA-10916 --- CMakeLists.txt | 1 + include/infill.h | 2 +- include/plugins/broadcasts.h | 11 +- include/plugins/components/broadcast.h | 105 --------------- include/plugins/components/common.h | 47 ------- include/plugins/components/invoke.h | 170 ------------------------- include/plugins/converters.h | 13 +- include/plugins/pluginproxy.h | 161 ++++++++++++++++++----- include/plugins/slots.h | 4 +- src/LayerPlan.cpp | 2 +- 10 files changed, 147 insertions(+), 369 deletions(-) delete mode 100644 include/plugins/components/broadcast.h delete mode 100644 include/plugins/components/common.h delete mode 100644 include/plugins/components/invoke.h diff --git a/CMakeLists.txt b/CMakeLists.txt index ad72830e85..ef370f228b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,7 @@ set(engine_SRCS # Except main.cpp. src/pathPlanning/LinePolygonsCrossings.cpp src/pathPlanning/NozzleTempInsert.cpp + include/plugins/converters.h src/plugins/converters.cpp src/progress/Progress.cpp diff --git a/include/infill.h b/include/infill.h index 760de7d135..fa5ace44d1 100644 --- a/include/infill.h +++ b/include/infill.h @@ -66,7 +66,7 @@ class Infill } public: - constexpr Infill() noexcept = default; + Infill() noexcept = default; Infill( EFillMethod pattern, diff --git a/include/plugins/broadcasts.h b/include/plugins/broadcasts.h index acfaaa23ef..b73b753a64 100644 --- a/include/plugins/broadcasts.h +++ b/include/plugins/broadcasts.h @@ -9,6 +9,7 @@ #include "plugins/converters.h" #include +#include #include @@ -24,10 +25,9 @@ struct is_broadcast_channel template inline constexpr bool is_broadcast_channel_v = is_broadcast_channel::value; -template +template struct broadcast_stub { - using stub_type = slots::broadcast::v0::BroadcastService::Stub; using derived_type = T; friend derived_type; @@ -40,12 +40,11 @@ struct broadcast_stub C request_{}; }; -template +template requires is_broadcast_channel_v -struct broadcast_rpc : public broadcast_stub, broadcast_settings_request> +struct broadcast_rpc : public broadcast_stub, broadcast_settings_request> { - using base_type = broadcast_stub>; - using ClientRPC = agrpc::ClientRPC<&base_type::stub_type::PrepareAsyncBroadcastSettings>; + using ClientRPC = agrpc::ClientRPC<&Stub::PrepareAsyncBroadcastSettings>; }; diff --git a/include/plugins/components/broadcast.h b/include/plugins/components/broadcast.h deleted file mode 100644 index c1c5c03db6..0000000000 --- a/include/plugins/components/broadcast.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher - -#ifndef PLUGINS_BROADCASTCOMPONENT_H -#define PLUGINS_BROADCASTCOMPONENT_H - -#include "cura/plugins/v0/slot_id.pb.h" -#include "plugins/broadcasts.h" -#include "plugins/components/common.h" -#include "plugins/exception.h" -#include "plugins/metadata.h" -#include "utils/format/thread_id.h" -#include "utils/types/char_range_literal.h" -#include "utils/types/generic.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace cura::plugins -{ - -template // NOTE: Leave slot here (templated) for the case where we have to specialize broadcast-channels by slot. -class PluginProxyBroadcastComponent -{ -public: - constexpr PluginProxyBroadcastComponent() = default; - - PluginProxyBroadcastComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) - : slot_info_{ slot_info } - , plugin_info_{ plugin_info } - , broadcast_stub_{ channel } - { - } - - template - void broadcast(auto&&... args) - { - if (! plugin_info_->value().broadcast_subscriptions.contains(Subscription)) - { - return; - } - agrpc::GrpcContext grpc_context; - grpc::Status status; - - boost::asio::co_spawn( - grpc_context, - [this, &grpc_context, &status, &args...]() - { - return this->broadcastCall(grpc_context, status, std::forward(args)...); - }, - boost::asio::detached); - grpc_context.run(); - - if (! status.ok()) // TODO: handle different kind of status codes - { - if (plugin_info_->has_value()) - { - throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); - } - throw exceptions::RemoteException(*slot_info_, status.error_message()); - } - } - -private: - template - boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) - { - grpc::ClientContext client_context{}; - prep_client_context(client_context, *slot_info_); - - using request_type = details::broadcast_rpc; - request_type request{}; - - auto response = google::protobuf::Empty{}; - status = co_await request_type::ClientRPC::request( - grpc_context, - broadcast_stub_, - client_context, - request(std::forward(args)...), - response, - boost::asio::use_awaitable); - co_return; - } - - details::slot_info_ptr slot_info_; - details::plugin_info_ptr plugin_info_; - ranges::semiregular_box::stub_type> broadcast_stub_; ///< The gRPC Broadcast stub for communication. -}; - -} // namespace cura::plugins - -#endif // PLUGINS_BROADCASTCOMPONENT_H diff --git a/include/plugins/components/common.h b/include/plugins/components/common.h deleted file mode 100644 index ee292d95ad..0000000000 --- a/include/plugins/components/common.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher - -#ifndef PLUGINS_COMPONENTCOMMON_H -#define PLUGINS_COMPONENTCOMMON_H - -#include "cura/plugins/v0/slot_id.pb.h" -#include "plugins/metadata.h" -#include "utils/format/thread_id.h" - -#include -#include - -#include -#include -#include - -namespace cura::plugins -{ - -namespace details -{ -using slot_info_ptr = std::shared_ptr; -using plugin_info_ptr = std::shared_ptr>; -} // namespace details - -/** - * @brief Prepares client_context for the remote call. - * - * Sets timeout for the call and adds metadata to context. - * - * @param client_context - Client context to prepare - * @param timeout - Call timeout duration (optional, default = 500ms) - */ -inline static void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::minutes(5)) -{ - // Set time-out - client_context.set_deadline(std::chrono::system_clock::now() + timeout); - - // Metadata - client_context.AddMetadata("cura-engine-uuid", slot_info.engine_uuid.data()); - client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); -} - -} // namespace cura::plugins - -#endif // PLUGINS_COMPONENTCOMMON_H diff --git a/include/plugins/components/invoke.h b/include/plugins/components/invoke.h deleted file mode 100644 index e233f38bd7..0000000000 --- a/include/plugins/components/invoke.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher - -#ifndef PLUGINS_INVOKECOMPONENT_H -#define PLUGINS_INVOKECOMPONENT_H - -#include "cura/plugins/v0/slot_id.pb.h" -#include "plugins/broadcasts.h" -#include "plugins/components/common.h" -#include "plugins/exception.h" -#include "plugins/metadata.h" -#include "utils/format/thread_id.h" -#include "utils/types/char_range_literal.h" -#include "utils/types/generic.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace cura::plugins -{ -namespace details -{ - -template -concept plugin_invoker = requires(T value) -{ - requires std::is_member_function_pointer_v; -}; - -template -concept not_plugin_invoker = ! plugin_invoker; - -} // namespace details - -template -class PluginProxyInvokeComponent -{ -public: - constexpr PluginProxyInvokeComponent(); - PluginProxyInvokeComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel); - auto invoke(auto&&... args); -}; - -template -class PluginProxyInvokeComponent -{ -public: - constexpr PluginProxyInvokeComponent() = default; - - PluginProxyInvokeComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) - { - } - - auto invoke(auto&&... args) - { - assert(false); // Invoke called on a stub which it isn't meant for (for example, broadcast), should not actually be called. - return 0; - } -}; - -template -class PluginProxyInvokeComponent -{ - using value_type = typename ResponseTp::native_value_type; - - using req_converter_type = RequestTp; - using rsp_converter_type = ResponseTp; - using rsp_msg_type = typename ResponseTp::value_type; - - using invoke_stub_t = Stub; - -public: - constexpr PluginProxyInvokeComponent() = default; - - PluginProxyInvokeComponent(details::slot_info_ptr slot_info, details::plugin_info_ptr plugin_info, std::shared_ptr channel) - : slot_info_{ slot_info } - , plugin_info_{ plugin_info } - , invoke_stub_{ channel } - { - } - - /** - * @brief Executes to plugin Invoke (modify/generate) operation. - * - * As part of this operation, a request is sent to the plugin - * and the returned response is processed. - * - * @tparam Args - argument types for the plugin request - * @param args - arguments for the plugin request - * @return The converted response value from plugin. - * - * @throws std::runtime_error if communication with the plugin fails. - */ - auto invoke(auto&&... args) - { - agrpc::GrpcContext grpc_context; - value_type ret_value{}; - grpc::Status status; - - boost::asio::co_spawn( - grpc_context, - [this, &grpc_context, &status, &ret_value, &args...]() - { - return this->invokeCall(grpc_context, status, ret_value, std::forward(args)...); - }, - boost::asio::detached); - grpc_context.run(); - - if (! status.ok()) // TODO: handle different kind of status codes - { - if (plugin_info_->has_value()) - { - throw exceptions::RemoteException(*slot_info_, plugin_info_->value(), status.error_message()); - } - throw exceptions::RemoteException(*slot_info_, status.error_message()); - } - return ret_value; - } - -private: - /** - * @brief Executes the invokeCall operation with the plugin. - * - * Sends a request to the plugin and saves the response. - * - * @param grpc_context - The gRPC context to use for the call - * @param status - Status of the gRPC call which gets updated in this method - * @param ret_value - Reference to the value in which response to be stored - * @param args - Request arguments - * @return A boost::asio::awaitable indicating completion of the operation - */ - boost::asio::awaitable invokeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) - { - using RPC = agrpc::ClientRPC<&invoke_stub_t::PrepareAsyncCall>; - grpc::ClientContext client_context{}; - prep_client_context(client_context, *slot_info_); - - // Construct request - auto request{ req_(std::forward(args)...) }; - - // Make unary request - rsp_msg_type response; - status = co_await RPC::request(grpc_context, invoke_stub_, client_context, request, response, boost::asio::use_awaitable); - ret_value = rsp_(response); - co_return; - } - - req_converter_type req_{}; ///< The Invoke request converter object. - rsp_converter_type rsp_{}; ///< The Invoke response converter object. - - details::slot_info_ptr slot_info_; - details::plugin_info_ptr plugin_info_; - ranges::semiregular_box invoke_stub_; ///< The gRPC Invoke stub for communication. -}; - -} // namespace cura::plugins - -#endif // PLUGINS_INVOKECOMPONENT_H diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 083930599f..ced535407e 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -28,15 +28,12 @@ #include #include +#include "WallToolPaths.h" +#include "pathPlanning/GCodePath.h" +#include "settings/Settings.h" +#include "settings/types/LayerIndex.h" +#include "utils/polygon.h" -namespace cura -{ -class GCodePath; -class LayerIndex; -class ExtrusionLine; -class Polygons; -class Settings; -} // namespace cura namespace cura::plugins { diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index a7d0f6dac8..a7c813b48f 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -5,9 +5,6 @@ #define PLUGINS_PLUGINPROXY_H #include "Application.h" -#include "components/broadcast.h" -#include "components/common.h" -#include "components/invoke.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/handshake/v0/handshake.grpc.pb.h" @@ -34,6 +31,9 @@ #include #include +#include +#include +#include #include #include @@ -56,17 +56,18 @@ namespace cura::plugins template class PluginProxy { -public: // type aliases for easy use using value_type = typename ResponseTp::native_value_type; using validator_type = ValidatorTp; - using req_converter_type = RequestTp; using rsp_converter_type = ResponseTp; + using rsp_msg_type = typename ResponseTp::value_type; + using invoke_stub_t = Stub; + using broadcast_stub_t = slots::broadcast::v0::BroadcastService::Stub; - using invoke_component_t = PluginProxyInvokeComponent; - using broadcast_component_t = PluginProxyBroadcastComponent; - + ranges::semiregular_box invoke_stub_; ///< The gRPC Invoke stub for communication. + ranges::semiregular_box broadcast_stub_; ///< The gRPC Broadcast stub for communication. +public: /** * @brief Constructs a PluginProxy object. * @@ -81,8 +82,8 @@ class PluginProxy constexpr PluginProxy() = default; explicit PluginProxy(std::shared_ptr channel) - : invoke_component_{ slot_info_, plugin_info_, channel } - , broadcast_component_{ slot_info_, plugin_info_, channel } + : invoke_stub_{ channel } + , broadcast_stub_{ channel } { // Connect to the plugin and exchange a handshake agrpc::GrpcContext grpc_context; @@ -96,21 +97,21 @@ class PluginProxy { using RPC = agrpc::ClientRPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; grpc::ClientContext client_context{}; - prep_client_context(client_context, *slot_info_); + prep_client_context(client_context, slot_info_); // Construct request handshake_request handshake_req; - handshake_request::value_type request{ handshake_req(*slot_info_) }; + handshake_request::value_type request{ handshake_req(slot_info_) }; // Make unary request handshake_response::value_type response; status = co_await RPC::request(grpc_context, handshake_stub, client_context, request, response, boost::asio::use_awaitable); handshake_response handshake_rsp; plugin_info = handshake_rsp(response, client_context.peer()); - valid_ = validator_type{ *slot_info_, plugin_info }; + valid_ = validator_type{ slot_info_, plugin_info }; if (valid_) { - spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_->slot_id); + spdlog::info("Using plugin: '{}-{}' running at [{}] for slot {}", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info_.slot_id); if (! plugin_info.broadcast_subscriptions.empty()) { spdlog::info("Subscribing plugin '{}' to the following broadcasts {}", plugin_info.plugin_name, plugin_info.broadcast_subscriptions); @@ -122,11 +123,11 @@ class PluginProxy if (! status.ok()) // TODO: handle different kind of status codes { - throw exceptions::RemoteException(*slot_info_, status.error_message()); + throw exceptions::RemoteException(slot_info_, status.error_message()); } if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) { - plugin_info_->emplace(plugin_info); + plugin_info_.emplace(plugin_info); } }; @@ -136,21 +137,21 @@ class PluginProxy { if (this != &other) { + invoke_stub_ = other.invoke_stub_; + broadcast_stub_ = other.broadcast_stub_; valid_ = other.valid_; - invoke_component_ = other.invoke_component_; - broadcast_component_ = other.broadcast_component_; plugin_info_ = other.plugin_info_; slot_info_ = other.slot_info_; } return *this; } - constexpr PluginProxy& operator=(PluginProxy&& other) + constexpr PluginProxy& operator=(PluginProxy&& other) noexcept { if (this != &other) { + invoke_stub_ = std::move(other.invoke_stub_); + broadcast_stub_ = std::move(other.broadcast_stub_); valid_ = std::move(other.valid_); - invoke_component_ = std::move(other.invoke_component_); - broadcast_component_ = std::move(other.broadcast_component_); plugin_info_ = std::move(other.plugin_info_); slot_info_ = std::move(other.slot_info_); } @@ -160,25 +161,125 @@ class PluginProxy value_type invoke(auto&&... args) { - return invoke_component_.invoke(std::forward(args)...); + agrpc::GrpcContext grpc_context; + value_type ret_value{}; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &ret_value, &args...]() + { + return this->invokeCall(grpc_context, status, ret_value, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_.has_value()) + { + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + } + throw exceptions::RemoteException(slot_info_, status.error_message()); + } + return ret_value; } template void broadcast(auto&&... args) { - return broadcast_component_.template broadcast(std::forward(args)...); + if (! plugin_info_.value().broadcast_subscriptions.contains(Subscription)) + { + return; + } + agrpc::GrpcContext grpc_context; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &args...]() + { + return this->broadcastCall(grpc_context, status, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_.has_value()) + { + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + } + throw exceptions::RemoteException(slot_info_, status.error_message()); + } } private: - validator_type valid_{}; ///< The validator object for plugin validation. + inline static void prep_client_context(grpc::ClientContext& client_context, const slot_metadata& slot_info, const std::chrono::milliseconds& timeout = std::chrono::minutes(5)) + { + // Set time-out + client_context.set_deadline(std::chrono::system_clock::now() + timeout); - details::slot_info_ptr slot_info_ ///< Holds information about the plugin slot. - { std::make_shared(slot_metadata{ .slot_id = SlotID, .version_range = SlotVersionRng.value, .engine_uuid = Application::getInstance().instance_uuid }) }; - details::plugin_info_ptr plugin_info_{ std::make_shared>( - std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake + // Metadata + client_context.AddMetadata("cura-engine-uuid", slot_info.engine_uuid.data()); + client_context.AddMetadata("cura-thread-id", fmt::format("{}", std::this_thread::get_id())); + } - invoke_component_t invoke_component_; - broadcast_component_t broadcast_component_; + /** + * @brief Executes the invokeCall operation with the plugin. + * + * Sends a request to the plugin and saves the response. + * + * @param grpc_context - The gRPC context to use for the call + * @param status - Status of the gRPC call which gets updated in this method + * @param ret_value - Reference to the value in which response to be stored + * @param args - Request arguments + * @return A boost::asio::awaitable indicating completion of the operation + */ + boost::asio::awaitable invokeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) + { + using RPC = agrpc::ClientRPC<&invoke_stub_t::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context, slot_info_); + + // Construct request + auto request{ req_(std::forward(args)...) }; + + // Make unary request + rsp_msg_type response; + status = co_await RPC::request(grpc_context, invoke_stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = rsp_(response); + co_return; + } + + template + boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) + { + grpc::ClientContext client_context{}; + prep_client_context(client_context, slot_info_); + using RPC = agrpc::ClientRPC<&broadcast_stub_t::PrepareAsyncBroadcastSettings>; + + details::broadcast_rpc requester{}; + auto request = requester(std::forward(args)...); + + auto response = google::protobuf::Empty{}; + status = co_await RPC::request( + grpc_context, + broadcast_stub_, + client_context, + request, + response, + boost::asio::use_awaitable); + co_return; + } + + validator_type valid_{}; ///< The validator object for plugin validation. + req_converter_type req_{}; ///< The Invoke request converter object. + rsp_converter_type rsp_{}; ///< The Invoke response converter object. + slot_metadata slot_info_{ .slot_id = SlotID, + .version_range = SlotVersionRng.value, + .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. + std::optional plugin_info_{ std::optional(std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake }; } // namespace cura::plugins diff --git a/include/plugins/slots.h b/include/plugins/slots.h index bcd9040f71..d51d3d461f 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -11,6 +11,7 @@ #include "cura/plugins/slots/postprocess/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" #include "cura/plugins/v0/slot_id.pb.h" +#include "infill.h" #include "plugins/converters.h" #include "plugins/slotproxy.h" #include "plugins/types.h" @@ -22,6 +23,7 @@ #include #include +#include #include namespace cura @@ -49,7 +51,7 @@ struct simplify_default struct infill_generate_default { - std::tuple, Polygons, Polygons> operator()(Polygons _infill, auto&&... args) + std::tuple, Polygons, Polygons> operator()(auto&&... args) { // this code is only reachable when no slot is registered while the infill type is requested to be // generated by a plugin; this should not be possible to set up in the first place. Return an empty diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 273770a890..012d7ceb74 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -11,7 +11,7 @@ #include "communication/Communication.h" #include "pathPlanning/Comb.h" #include "pathPlanning/CombPaths.h" -#include "plugins/slots.h" +//#include "plugins/slots.h" #include "raft.h" // getTotalExtraLayers #include "settings/types/Ratio.h" #include "sliceDataStorage.h" From 927abbfe793c38c970f94b4e8797cb402a7ca065 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Fri, 11 Aug 2023 11:47:00 +0000 Subject: [PATCH 229/470] Applied clang-format. --- include/plugins/converters.h | 11 +++++------ include/plugins/pluginproxy.h | 8 +------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index ced535407e..74f6e0afc4 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -5,6 +5,7 @@ #define PLUGINS_CONVERTERS_H #include "Cura.pb.h" +#include "WallToolPaths.h" #include "cura/plugins/slots/broadcast/v0/broadcast.grpc.pb.h" #include "cura/plugins/slots/broadcast/v0/broadcast.pb.h" #include "cura/plugins/slots/gcode_paths/v0/modify.grpc.pb.h" @@ -17,8 +18,12 @@ #include "cura/plugins/slots/postprocess/v0/modify.pb.h" #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.pb.h" +#include "pathPlanning/GCodePath.h" #include "plugins/metadata.h" #include "plugins/types.h" +#include "settings/Settings.h" +#include "settings/types/LayerIndex.h" +#include "utils/polygon.h" #include #include @@ -28,12 +33,6 @@ #include #include -#include "WallToolPaths.h" -#include "pathPlanning/GCodePath.h" -#include "settings/Settings.h" -#include "settings/types/LayerIndex.h" -#include "utils/polygon.h" - namespace cura::plugins { diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index a7c813b48f..30a9965685 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -263,13 +263,7 @@ class PluginProxy auto request = requester(std::forward(args)...); auto response = google::protobuf::Empty{}; - status = co_await RPC::request( - grpc_context, - broadcast_stub_, - client_context, - request, - response, - boost::asio::use_awaitable); + status = co_await RPC::request(grpc_context, broadcast_stub_, client_context, request, response, boost::asio::use_awaitable); co_return; } From efefa16f613f0771854198a2476fcd4a76596a05 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Fri, 11 Aug 2023 14:38:52 +0200 Subject: [PATCH 230/470] log error before throw Contribute to CURA-10619 --- include/plugins/pluginproxy.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 30a9965685..6b04941e14 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -178,8 +178,10 @@ class PluginProxy { if (plugin_info_.has_value()) { + spdlog::error("Plugin '{}' running at [{}] for slot {} failed with error: {}", plugin_info_.value().plugin_name, plugin_info_.value().peer, slot_info_.slot_id, status.error_message()); throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); } + spdlog::error("Plugin for slot {} failed with error: {}", slot_info_.slot_id, status.error_message()); throw exceptions::RemoteException(slot_info_, status.error_message()); } return ret_value; @@ -208,8 +210,10 @@ class PluginProxy { if (plugin_info_.has_value()) { + spdlog::error("Plugin '{}' running at [{}] for slot {} failed with error: {}", plugin_info_.value().plugin_name, plugin_info_.value().peer, slot_info_.slot_id, status.error_message()); throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); } + spdlog::error("Plugin for slot {} failed with error: {}", slot_info_.slot_id, status.error_message()); throw exceptions::RemoteException(slot_info_, status.error_message()); } } From d99d094769c54c419b790af223594d3cd1177d3b Mon Sep 17 00:00:00 2001 From: jellespijker Date: Fri, 11 Aug 2023 12:39:29 +0000 Subject: [PATCH 231/470] Applied clang-format. --- include/plugins/pluginproxy.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 6b04941e14..8c0ccd895c 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -178,7 +178,12 @@ class PluginProxy { if (plugin_info_.has_value()) { - spdlog::error("Plugin '{}' running at [{}] for slot {} failed with error: {}", plugin_info_.value().plugin_name, plugin_info_.value().peer, slot_info_.slot_id, status.error_message()); + spdlog::error( + "Plugin '{}' running at [{}] for slot {} failed with error: {}", + plugin_info_.value().plugin_name, + plugin_info_.value().peer, + slot_info_.slot_id, + status.error_message()); throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); } spdlog::error("Plugin for slot {} failed with error: {}", slot_info_.slot_id, status.error_message()); @@ -210,7 +215,12 @@ class PluginProxy { if (plugin_info_.has_value()) { - spdlog::error("Plugin '{}' running at [{}] for slot {} failed with error: {}", plugin_info_.value().plugin_name, plugin_info_.value().peer, slot_info_.slot_id, status.error_message()); + spdlog::error( + "Plugin '{}' running at [{}] for slot {} failed with error: {}", + plugin_info_.value().plugin_name, + plugin_info_.value().peer, + slot_info_.slot_id, + status.error_message()); throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); } spdlog::error("Plugin for slot {} failed with error: {}", slot_info_.slot_id, status.error_message()); From 19046816e37df728dfeb1c5e568baeb0ff04119b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 14 Aug 2023 10:54:00 +0200 Subject: [PATCH 232/470] Fix compiling on mac --- include/plugins/exception.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/plugins/exception.h b/include/plugins/exception.h index 93f05638eb..7aeb14874d 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -1,8 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#ifndef UTILS_CONCEPTS_GRAPH_H -#define UTILS_CONCEPTS_GRAPH_H +#ifndef PLUGINS_EXCEPTIONS_H +#define PLUGINS_EXCEPTIONS_H #include "plugins/metadata.h" #include "plugins/types.h" @@ -70,4 +70,4 @@ class RemoteException : public std::exception } // namespace cura::plugins::exceptions -#endif // UTILS_CONCEPTS_GRAPH_H \ No newline at end of file +#endif // PLUGINS_EXCEPTIONS_H \ No newline at end of file From 2c43157b04c74424b40fd73f4499f380fd14bfdb Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 14 Aug 2023 13:26:58 +0200 Subject: [PATCH 233/470] Add missing slot string formats CURA-10446 --- include/plugins/types.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/plugins/types.h b/include/plugins/types.h index e46c2562b8..1585d5ff47 100644 --- a/include/plugins/types.h +++ b/include/plugins/types.h @@ -27,12 +27,24 @@ struct formatter switch (slot_id) { + case cura::plugins::v0::SlotID::SETTINGS_BROADCAST: + slot_name = "SettingsBroadcastService"; + break; case cura::plugins::v0::SlotID::SIMPLIFY_MODIFY: slot_name = "SimplifyService"; break; case cura::plugins::v0::SlotID::POSTPROCESS_MODIFY: slot_name = "PostprocessService"; break; + case cura::plugins::v0::SlotID::INFILL_MODIFY: + slot_name = "InfillModifyService"; + break; + case cura::plugins::v0::SlotID::GCODE_PATHS_MODIFY: + slot_name = "GcodePathsModifyService"; + break; + case cura::plugins::v0::SlotID::INFILL_GENERATE: + slot_name = "InfillGenerateService"; + break; default: slot_name = "Unknown"; break; From 57b47721092792c4341f1bb395d3dcf5d5a0e069 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 15 Aug 2023 11:11:59 +0200 Subject: [PATCH 234/470] Use precompiled grpc definitions Contribute to CURA-10619 --- CMakeLists.txt | 15 ++++----------- conanfile.py | 20 +++++--------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef370f228b..25471c12cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,25 +15,19 @@ option(ENABLE_REMOTE_PLUGINS "Build with all warnings" OFF) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF) -#set(GRPC_PROTOS "List of all protobuf definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") -#set(GRPC_IMPORT_DIRS "List of all protobuf dirs definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") # Generate the plugin types find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) find_package(gRPC REQUIRED) -option(RETARDED_APPLE_CLANG "Apple Clang <= 13 used" OFF) +find_package(curaengine_grpc_definitions REQUIRED) +option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF) MESSAGE(STATUS "Compiling with plugins support: ${ENABLE_PLUGINS}") if (${ENABLE_PLUGINS}) MESSAGE(STATUS "Plugin secure remotes allowed: ${ENABLE_REMOTE_PLUGINS}") endif () -asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" IMPORT_DIRS ${GRPC_IMPORT_DIRS} - OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" - OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" - GENERATE_GRPC GENERATE_MOCK_CODE) - if (ENABLE_ARCUS) message(STATUS "Building with Arcus") find_package(arcus REQUIRED) @@ -115,7 +109,6 @@ set(engine_SRCS # Except main.cpp. src/pathPlanning/LinePolygonsCrossings.cpp src/pathPlanning/NozzleTempInsert.cpp - include/plugins/converters.h src/plugins/converters.cpp src/progress/Progress.cpp @@ -157,7 +150,7 @@ set(engine_SRCS # Except main.cpp. src/utils/VoxelUtils.cpp ) -add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS} ${ASIO_GRPC_PLUGIN_PROTO_SOURCES}) +add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS}) use_threads(_CuraEngine) target_include_directories(_CuraEngine @@ -206,7 +199,6 @@ find_package(fmt REQUIRED) find_package(range-v3 REQUIRED) find_package(scripta REQUIRED) find_package(neargye-semver REQUIRED) -find_package(gRPC REQUIRED) if (ENABLE_TESTING) find_package(GTest REQUIRED) @@ -223,6 +215,7 @@ target_link_libraries(_CuraEngine boost::boost scripta::scripta neargye-semver::neargye-semver + curaengine_grpc_definitions::curaengine_grpc_definitions asio-grpc::asio-grpc grpc::grpc protobuf::libprotobuf diff --git a/conanfile.py b/conanfile.py index 3f48b98d9d..48a1345cca 100644 --- a/conanfile.py +++ b/conanfile.py @@ -65,14 +65,6 @@ def configure(self): self.options["clipper"].shared = True self.options["protobuf"].shared = False - self.options["grpc"].csharp_plugin = False - self.options["grpc"].node_plugin = False - self.options["grpc"].objective_c_plugin = False - self.options["grpc"].php_plugin = False - self.options["grpc"].python_plugin = False - self.options["grpc"].ruby_plugin = False - self.options["asio-grpc"].backend = "boost" - self.options["asio-grpc"].local_allocator = "recycling_allocator" if self.options.enable_arcus: self.options["arcus"].shared = True @@ -94,8 +86,11 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: self.requires("arcus/(latest)@ultimaker/cura_10475") # TODO: point to `testing` once the CURA-10475 from libArcus is main + self.requires("asio-grpc/2.6.0") + self.requires("grpc/1.50.1") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") self.requires("clipper/6.4.2") - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") self.requires("stb/20200203") self.requires("spdlog/1.10.0") @@ -106,8 +101,7 @@ def requirements(self): self.requires("protobuf/3.21.9") self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") - self.requires("asio-grpc/2.6.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") + def generate(self): deps = CMakeDeps(self) @@ -125,10 +119,6 @@ def generate(self): tc.variables["ENABLE_REMOTE_PLUGINS"] = self.options.enable_remote_plugins else: tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins - cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info - tc.variables["GRPC_IMPORT_DIRS"] = cpp_info.resdirs[0].replace("\\", "/") - tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).rglob("*.proto")]) - tc.generate() for dep in self.dependencies.values(): From 286a80418d19816b6d9e0d8fb0e000cd1b5a2858 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 15 Aug 2023 11:11:59 +0200 Subject: [PATCH 235/470] Use precompiled grpc definitions Contribute to CURA-10619 --- CMakeLists.txt | 14 ++++---------- conanfile.py | 20 +++++--------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad72830e85..25471c12cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,25 +15,19 @@ option(ENABLE_REMOTE_PLUGINS "Build with all warnings" OFF) option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags" ON) option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF) option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF) -#set(GRPC_PROTOS "List of all protobuf definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") -#set(GRPC_IMPORT_DIRS "List of all protobuf dirs definitions (see: https://github.com/Ultimaker/curaengine_grpc_definitions)") # Generate the plugin types find_package(protobuf REQUIRED) find_package(asio-grpc REQUIRED) find_package(gRPC REQUIRED) -option(RETARDED_APPLE_CLANG "Apple Clang <= 13 used" OFF) +find_package(curaengine_grpc_definitions REQUIRED) +option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF) MESSAGE(STATUS "Compiling with plugins support: ${ENABLE_PLUGINS}") if (${ENABLE_PLUGINS}) MESSAGE(STATUS "Plugin secure remotes allowed: ${ENABLE_REMOTE_PLUGINS}") endif () -asio_grpc_protobuf_generate(PROTOS "${GRPC_PROTOS}" IMPORT_DIRS ${GRPC_IMPORT_DIRS} - OUT_VAR "ASIO_GRPC_PLUGIN_PROTO_SOURCES" - OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated" - GENERATE_GRPC GENERATE_MOCK_CODE) - if (ENABLE_ARCUS) message(STATUS "Building with Arcus") find_package(arcus REQUIRED) @@ -156,7 +150,7 @@ set(engine_SRCS # Except main.cpp. src/utils/VoxelUtils.cpp ) -add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS} ${ASIO_GRPC_PLUGIN_PROTO_SOURCES}) +add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS}) use_threads(_CuraEngine) target_include_directories(_CuraEngine @@ -205,7 +199,6 @@ find_package(fmt REQUIRED) find_package(range-v3 REQUIRED) find_package(scripta REQUIRED) find_package(neargye-semver REQUIRED) -find_package(gRPC REQUIRED) if (ENABLE_TESTING) find_package(GTest REQUIRED) @@ -222,6 +215,7 @@ target_link_libraries(_CuraEngine boost::boost scripta::scripta neargye-semver::neargye-semver + curaengine_grpc_definitions::curaengine_grpc_definitions asio-grpc::asio-grpc grpc::grpc protobuf::libprotobuf diff --git a/conanfile.py b/conanfile.py index 3f48b98d9d..48a1345cca 100644 --- a/conanfile.py +++ b/conanfile.py @@ -65,14 +65,6 @@ def configure(self): self.options["clipper"].shared = True self.options["protobuf"].shared = False - self.options["grpc"].csharp_plugin = False - self.options["grpc"].node_plugin = False - self.options["grpc"].objective_c_plugin = False - self.options["grpc"].php_plugin = False - self.options["grpc"].python_plugin = False - self.options["grpc"].ruby_plugin = False - self.options["asio-grpc"].backend = "boost" - self.options["asio-grpc"].local_allocator = "recycling_allocator" if self.options.enable_arcus: self.options["arcus"].shared = True @@ -94,8 +86,11 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: self.requires("arcus/(latest)@ultimaker/cura_10475") # TODO: point to `testing` once the CURA-10475 from libArcus is main + self.requires("asio-grpc/2.6.0") + self.requires("grpc/1.50.1") + self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") self.requires("clipper/6.4.2") - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") self.requires("stb/20200203") self.requires("spdlog/1.10.0") @@ -106,8 +101,7 @@ def requirements(self): self.requires("protobuf/3.21.9") self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") - self.requires("asio-grpc/2.6.0") - self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") + def generate(self): deps = CMakeDeps(self) @@ -125,10 +119,6 @@ def generate(self): tc.variables["ENABLE_REMOTE_PLUGINS"] = self.options.enable_remote_plugins else: tc.variables["ENABLE_PLUGINS"] = self.options.enable_plugins - cpp_info = self.dependencies["curaengine_grpc_definitions"].cpp_info - tc.variables["GRPC_IMPORT_DIRS"] = cpp_info.resdirs[0].replace("\\", "/") - tc.variables["GRPC_PROTOS"] = ";".join([str(p).replace("\\", "/") for p in Path(cpp_info.resdirs[0]).rglob("*.proto")]) - tc.generate() for dep in self.dependencies.values(): From d64b33682934dbb42c41f91c253c10d10c1465d1 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 15 Aug 2023 12:40:32 +0200 Subject: [PATCH 236/470] Update converter and proxy classes to include name and version of plugins Modified the operator() in converter classes to include arguments for plugin name and version. Updated SlotProxy and PluginProxy constructors to accommodate these changes. Also updated the handshake request to include the plugin name and version in its request. This change is necessary to facilitate identification and version control for plugins during the handshake process. Contributes to CURA-10619 --- Cura.proto | 6 ++++-- include/plugins/converters.h | 2 +- include/plugins/pluginproxy.h | 6 +++--- include/plugins/slotproxy.h | 4 ++-- include/plugins/slots.h | 15 +++++++-------- src/communication/ArcusCommunication.cpp | 7 ++----- src/plugins/converters.cpp | 8 +++----- 7 files changed, 22 insertions(+), 26 deletions(-) diff --git a/Cura.proto b/Cura.proto index ceb294f619..960396c5a8 100644 --- a/Cura.proto +++ b/Cura.proto @@ -24,8 +24,10 @@ enum SlotID { message EnginePlugin { SlotID id = 1; - optional string address = 2; - optional uint32 port = 3; + string address = 2; + uint32 port = 3; + string plugin_name = 4; + string plugin_version = 5; } message Slice diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 74f6e0afc4..f25f6ea1ce 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -71,7 +71,7 @@ struct broadcast_settings_request : public details::converter { - value_type operator()(const native_value_type& slot_info) const; + value_type operator()(const std::string& name, const std::string& version, const native_value_type& slot_info) const; }; struct handshake_response : public details::converter diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 8c0ccd895c..88908c0fe5 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -81,7 +81,7 @@ class PluginProxy */ constexpr PluginProxy() = default; - explicit PluginProxy(std::shared_ptr channel) + PluginProxy(const std::string& name, const std::string& version, std::shared_ptr channel) : invoke_stub_{ channel } , broadcast_stub_{ channel } { @@ -93,7 +93,7 @@ class PluginProxy boost::asio::co_spawn( grpc_context, - [this, &grpc_context, &status, &plugin_info, &handshake_stub]() -> boost::asio::awaitable + [this, &grpc_context, &status, &plugin_info, &handshake_stub, &name, &version]() -> boost::asio::awaitable { using RPC = agrpc::ClientRPC<&slots::handshake::v0::HandshakeService::Stub::PrepareAsyncCall>; grpc::ClientContext client_context{}; @@ -101,7 +101,7 @@ class PluginProxy // Construct request handshake_request handshake_req; - handshake_request::value_type request{ handshake_req(slot_info_) }; + handshake_request::value_type request{ handshake_req(name, version, slot_info_) }; // Make unary request handshake_response::value_type response; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index d51533881e..6562f7660a 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -60,8 +60,8 @@ class SlotProxy * * @param channel A shared pointer to the gRPC channel for communication with the plugin. */ - SlotProxy(std::shared_ptr channel) - : plugin_{ std::move(channel) } {}; + SlotProxy(const std::string& name, const std::string& version, std::shared_ptr channel) + : plugin_{ value_type{ name, version, channel } } {}; /** * @brief Executes the plugin operation. diff --git a/include/plugins/slots.h b/include/plugins/slots.h index d51d3d461f..97849c49fa 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -124,13 +124,12 @@ template class Unit> class Registry, Unit> { public: - void connect(const v0::SlotID& slot_id, auto&& channel) + constexpr void connect(auto&&... args) noexcept { - assert(false); - } // Base case, should not be executed + } template - void broadcast(auto&&... args) + constexpr void broadcast(auto&&... args) noexcept { } // Base case, do nothing }; @@ -162,15 +161,15 @@ class Registry, Unit> : public Registry return get().invoke(std::forward(args)...); } - void connect(const v0::SlotID& slot_id, auto&& channel) + void connect(const v0::SlotID& slot_id, auto name, auto& version, auto&& channel) { if (slot_id == T::slot_id) { - using Tp = decltype(get_type().proxy); - get_type().proxy = Tp{ std::forward(std::move(channel)) }; + using Tp = Unit::value_type; + value_.proxy = Tp{ name, version, std::forward(channel) }; return; } - Base::connect(slot_id, channel); + Base::connect(slot_id, name, version, std::forward(channel)); } template diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index 0df3ac998d..c01222bd94 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -519,11 +519,8 @@ void ArcusCommunication::sliceNext() #ifdef ENABLE_PLUGINS for (const auto& plugin : slice_message->engine_plugins()) { - if (plugin.has_address() && plugin.has_port()) - { - const auto slot_id = static_cast(plugin.id()); - slots::instance().connect(slot_id, utils::createChannel({ plugin.address(), plugin.port() })); - } + const auto slot_id = static_cast(plugin.id()); + slots::instance().connect(slot_id, plugin.plugin_name(), plugin.plugin_version(), utils::createChannel({ plugin.address(), plugin.port() })); } #endif // ENABLE_PLUGINS diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index e022497894..1ba7d5cb6f 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -60,11 +60,13 @@ broadcast_settings_request::value_type broadcast_settings_request::operator()(co return message; } -handshake_request::value_type handshake_request::operator()(const handshake_request::native_value_type& slot_info) const +handshake_request::value_type handshake_request::operator()(const std::string& name, const std::string& version, const handshake_request::native_value_type& slot_info) const { value_type message{}; message.set_slot_id(slot_info.slot_id); message.set_version_range(slot_info.version_range.data()); + message.set_plugin_name(name); + message.set_plugin_version(version); return message; } @@ -276,10 +278,6 @@ gcode_paths_modify_request::value_type points->set_x(point.X); points->set_y(point.Y); } - - // Construct the estimations for the GCodePath - auto* estimations = gcode_path->mutable_estimates(); - estimations->set_extrude_time(path.estimates.extrude_time); } From 2bfee59cea7ed7d5ead6eb1e144cbba43a05ba92 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 15 Aug 2023 12:58:24 +0200 Subject: [PATCH 237/470] Fix compiling CURA-10446 --- include/plugins/slots.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 97849c49fa..6e0f81b949 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -165,7 +165,7 @@ class Registry, Unit> : public Registry { if (slot_id == T::slot_id) { - using Tp = Unit::value_type; + using Tp = typename Unit::value_type; value_.proxy = Tp{ name, version, std::forward(channel) }; return; } From b82b8d00bec3069e17f83e31ff68554c63868e72 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 15 Aug 2023 12:58:24 +0200 Subject: [PATCH 238/470] Fix compiling CURA-10446 --- include/plugins/slots.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 97849c49fa..6e0f81b949 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -165,7 +165,7 @@ class Registry, Unit> : public Registry { if (slot_id == T::slot_id) { - using Tp = Unit::value_type; + using Tp = typename Unit::value_type; value_.proxy = Tp{ name, version, std::forward(channel) }; return; } From 9292a0f0380296db2c9cd5539f94459ef2b5c04c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 15 Aug 2023 13:05:40 +0200 Subject: [PATCH 239/470] Fix benchmark test Contributes to CURA-10619 --- benchmark/simplify_benchmark.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index 6320bb7b36..ce28ee1985 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -79,7 +79,7 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::St try { - slots::instance().connect(plugins::v0::SlotID::SIMPLIFY_MODIFY, utils::createChannel({ host, port })); + slots::instance().connect(plugins::v0::SlotID::SIMPLIFY_MODIFY, "", "", utils::createChannel({ host, port })); } catch (std::runtime_error e) { From 6a1c241d7bf8f9fb9eec1436de0c9aa100c7a89c Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 15 Aug 2023 15:07:58 +0200 Subject: [PATCH 240/470] Implement basic gcode modify slot Still contains some todo's CURA-10446 --- include/pathPlanning/GCodePath.h | 29 +++-- src/LayerPlan.cpp | 96 +++++++++-------- src/pathPlanning/GCodePath.cpp | 12 +-- src/plugins/converters.cpp | 176 ++++++++++++++++++++++++++++++- src/utils/polygonUtils.cpp | 2 +- tests/ExtruderPlanTest.cpp | 4 +- 6 files changed, 249 insertions(+), 70 deletions(-) diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index e845fd1df4..4cd76687fe 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -1,41 +1,40 @@ -//Copyright (c) 2022 Ultimaker B.V. +//Copyright (c) 2023 UltiMaker //CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef PATH_PLANNING_G_CODE_PATH_H #define PATH_PLANNING_G_CODE_PATH_H #include "../SpaceFillType.h" -#include "../sliceDataStorage.h" #include "../settings/types/Ratio.h" +#include "../sliceDataStorage.h" #include "../utils/IntPoint.h" +#include "GCodePathConfig.h" #include "TimeMaterialEstimates.h" -namespace cura +namespace cura { -class GCodePathConfig; - /*! * A class for representing a planned path. - * + * * A path consists of several segments of the same type of movement: retracted travel, infill extrusion, etc. - * + * * This is a compact premature representation in which are line segments have the same config, i.e. the config of this path. - * - * In the final representation (gcode) each line segment may have different properties, + * + * In the final representation (gcode) each line segment may have different properties, * which are added when the generated GCodePaths are processed. */ class GCodePath { public: - const GCodePathConfig* config; //!< The configuration settings of the path. + const GCodePathConfig config; //!< The configuration settings of the path. const SliceMeshStorage* mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; SpaceFillType space_fill_type; //!< The type of space filling of which this path is a part Ratio flow; //!< A type-independent flow configuration Ratio width_factor; //!< Adjustment to the line width. Similar to flow, but causes the speed_back_pressure_factor to be adjusted. Ratio speed_factor; //!< A speed factor that is multiplied with the travel speed. This factor can be used to change the travel speed. Ratio speed_back_pressure_factor; // #include @@ -89,8 +90,8 @@ void ExtruderPlan::applyBackPressureCompensation(const Ratio back_pressure_compe constexpr double epsilon_speed_factor = 0.001; // Don't put on actual 'limit double minimum', because we don't want printers to stall. for (auto& path : paths) { - const double nominal_width_for_path = static_cast(path.config->getLineWidth()); - if (path.width_factor <= 0.0 || nominal_width_for_path <= 0.0 || path.config->isTravelPath() || path.config->isBridgePath()) + const double nominal_width_for_path = static_cast(path.config.getLineWidth()); + if (path.width_factor <= 0.0 || nominal_width_for_path <= 0.0 || path.config.isTravelPath() || path.config.isBridgePath()) { continue; } @@ -108,8 +109,9 @@ GCodePath* LayerPlan::getLatestPathWithConfig( const Ratio speed_factor) { std::vector& paths = extruder_plans.back().paths; - if (paths.size() > 0 && paths.back().config == &config && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor - && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between + // TODO put back config equality check + if (paths.size() > 0 /*&& paths.back().config == config*/ && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor + && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between { return &paths.back(); } @@ -575,7 +577,7 @@ void LayerPlan::addExtrusionMove( path->setFanSpeed(fan_speed); if (! static_cast(first_extrusion_acc_jerk)) { - first_extrusion_acc_jerk = std::make_pair(path->config->getAcceleration(), path->config->getJerk()); + first_extrusion_acc_jerk = std::make_pair(path->config.getAcceleration(), path->config.getJerk()); } last_planned_position = p; } @@ -1612,7 +1614,7 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ double target_speed = 0.0; std::function slow_down_func{ [&target_speed](const GCodePath& path) { - return std::min(target_speed / (path.config->getSpeed() * path.speed_factor), 1.0); + return std::min(target_speed / (path.config.getSpeed() * path.speed_factor), 1.0); } }; if (minExtrudeTime >= total_extrude_time_at_minimum_speed) @@ -1647,8 +1649,8 @@ void ExtruderPlan::forceMinimalLayerTime(double minTime, double time_other_extr_ factor = (1 / total_extrude_time_at_slowest_speed - 1 / minExtrudeTime) / (1 / total_extrude_time_at_slowest_speed - 1 / extrudeTime); slow_down_func = [&slowest_path_speed = slowest_path_speed, &factor](const GCodePath& path) { - const double target_speed = slowest_path_speed * (1.0 - factor) + (path.config->getSpeed() * path.speed_factor) * factor; - return std::min(target_speed / (path.config->getSpeed() * path.speed_factor), 1.0); + const double target_speed = slowest_path_speed * (1.0 - factor) + (path.config.getSpeed() * path.speed_factor) * factor; + return std::min(target_speed / (path.config.getSpeed() * path.speed_factor), 1.0); }; // Update stored naive time estimates @@ -1676,7 +1678,7 @@ double ExtruderPlan::getRetractTime(const GCodePath& path) std::pair ExtruderPlan::getPointToPointTime(const Point& p0, const Point& p1, const GCodePath& path) { const double length = vSizeMM(p0 - p1); - return { length, length / (path.config->getSpeed() * path.speed_factor) }; + return { length, length / (path.config.getSpeed() * path.speed_factor) }; } TimeMaterialEstimates ExtruderPlan::computeNaiveTimeEstimates(Point starting_position) @@ -1690,7 +1692,7 @@ TimeMaterialEstimates ExtruderPlan::computeNaiveTimeEstimates(Point starting_pos std::numeric_limits::max(), [](double value, const GCodePath& path) { - return path.isTravelPath() ? value : std::min(value, path.config->getSpeed().value * path.speed_factor); + return path.isTravelPath() ? value : std::min(value, path.config.getSpeed().value * path.speed_factor); }); bool was_retracted = false; // wrong assumption; won't matter that much. (TODO) @@ -1743,9 +1745,9 @@ TimeMaterialEstimates ExtruderPlan::computeNaiveTimeEstimates(Point starting_pos path.estimates.extrude_time_at_minimum_speed += length / min_path_speed; path.estimates.extrude_time_at_slowest_path_speed += length / slowest_path_speed; } - material_estimate += length * INT2MM(layer_thickness) * INT2MM(path.config->getLineWidth()); + material_estimate += length * INT2MM(layer_thickness) * INT2MM(path.config.getLineWidth()); } - double thisTime = length / (path.config->getSpeed() * path.speed_factor); + double thisTime = length / (path.config.getSpeed() * path.speed_factor); *path_time_estimate += thisTime; p0 = p1; } @@ -1896,7 +1898,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.setZ(z); - const GCodePathConfig* last_extrusion_config = nullptr; // used to check whether we need to insert a TYPE comment in the gcode. + std::optional last_extrusion_config = std::nullopt; // used to check whether we need to insert a TYPE comment in the gcode. size_t extruder_nr = gcode.getExtruderNr(); const bool acceleration_enabled = mesh_group_settings.get("acceleration_enabled"); @@ -1909,7 +1911,14 @@ void LayerPlan::writeGCode(GCodeExport& gcode) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; - // TODO: Insert modify slot for the gcodepaths CURA-10446 + extruder_plan.paths = slots::instance().generate( + extruder_plan.paths, + extruder_plan.extruder_nr, + layer_nr + ); + + // Since the time/material estimates _may_ have changed during the plugin modify step we recalculate it + extruder_plan.computeNaiveTimeEstimates(gcode.getPositionXY()); const RetractionAndWipeConfig* retraction_config = current_mesh ? ¤t_mesh->retraction_wipe_config : &storage.retraction_wipe_config_per_extruder[extruder_plan.extruder_nr]; @@ -2005,7 +2014,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.writeRetraction(retraction_config->retraction_config); } - if (! path.retract && path.config->isTravelPath() && path.points.size() == 1 && path.points[0] == gcode.getPositionXY() && z == gcode.getPositionZ()) + if (! path.retract && path.config.isTravelPath() && path.points.size() == 1 && path.points[0] == gcode.getPositionXY() && z == gcode.getPositionZ()) { // ignore travel moves to the current location to avoid needless change of acceleration/jerk continue; @@ -2015,7 +2024,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) size_t next_extrusion_idx = path_idx + 1; if ((acceleration_enabled && ! acceleration_travel_enabled) || (jerk_enabled && ! jerk_travel_enabled)) { - while (next_extrusion_idx < paths.size() && paths[next_extrusion_idx].config->isTravelPath()) + while (next_extrusion_idx < paths.size() && paths[next_extrusion_idx].config.isTravelPath()) { ++next_extrusion_idx; } @@ -2023,11 +2032,11 @@ void LayerPlan::writeGCode(GCodeExport& gcode) if (acceleration_enabled) { - if (path.config->isTravelPath()) + if (path.config.isTravelPath()) { if (acceleration_travel_enabled) { - gcode.writeTravelAcceleration(path.config->getAcceleration()); + gcode.writeTravelAcceleration(path.config.getAcceleration()); } else { @@ -2041,20 +2050,20 @@ void LayerPlan::writeGCode(GCodeExport& gcode) } else { - gcode.writeTravelAcceleration(paths[next_extrusion_idx].config->getAcceleration()); + gcode.writeTravelAcceleration(paths[next_extrusion_idx].config.getAcceleration()); } } } else { - gcode.writePrintAcceleration(path.config->getAcceleration()); + gcode.writePrintAcceleration(path.config.getAcceleration()); } } if (jerk_enabled) { if (jerk_travel_enabled) { - gcode.writeJerk(path.config->getJerk()); + gcode.writeJerk(path.config.getJerk()); } else { @@ -2068,7 +2077,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) } else { - gcode.writeJerk(paths[next_extrusion_idx].config->getJerk()); + gcode.writeJerk(paths[next_extrusion_idx].config.getJerk()); } } } @@ -2088,14 +2097,17 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.writeZhopEnd(); } } - if (! path.config->isTravelPath() && last_extrusion_config != path.config) + // TODO re-enable the config_changed check + const auto& extruder_changed = !last_extrusion_config.has_value() /* || last_extrusion_config.value() != path.config */; + if (! path.config.isTravelPath() && extruder_changed) { - gcode.writeTypeComment(path.config->type); - if (path.config->isBridgePath()) + gcode.writeTypeComment(path.config.type); + if (path.config.isBridgePath()) { gcode.writeComment("BRIDGE"); } - last_extrusion_config = path.config; + // TODO uncomment next line, make path.config copyable +// last_extrusion_config = path.config; update_extrusion_offset = true; } else @@ -2103,7 +2115,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) update_extrusion_offset = false; } - double speed = path.config->getSpeed(); + double speed = path.config.getSpeed(); // for some movements such as prime tower purge, the speed may get changed by this factor speed *= path.speed_factor; @@ -2116,7 +2128,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) ss << "MESH:" << (current_mesh ? current_mesh->mesh_name : "NONMESH"); gcode.writeComment(ss.str()); } - if (path.config->isTravelPath()) + if (path.config.isTravelPath()) { // early comp for travel paths, which are handled more simply if (! path.perform_z_hop && final_travel_z != z && extruder_plan_idx == (extruder_plans.size() - 1) && path_idx == (paths.size() - 1)) { @@ -2162,8 +2174,8 @@ void LayerPlan::writeGCode(GCodeExport& gcode) insertTempOnTime(time, path_idx); const double extrude_speed = speed * path.speed_back_pressure_factor; - communication->sendLineTo(path.config->type, path.points[point_idx], path.getLineWidthForLayerView(), path.config->getLayerThickness(), extrude_speed); - gcode.writeExtrusion(path.points[point_idx], extrude_speed, path.getExtrusionMM3perMM(), path.config->type, update_extrusion_offset); + communication->sendLineTo(path.config.type, path.points[point_idx], path.getLineWidthForLayerView(), path.config.getLayerThickness(), extrude_speed); + gcode.writeExtrusion(path.points[point_idx], extrude_speed, path.getExtrusionMM3perMM(), path.config.type, update_extrusion_offset); prev_point = path.points[point_idx]; } @@ -2199,8 +2211,8 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.setZ(std::round(z + layer_thickness * length / totalLength)); const double extrude_speed = speed * path.speed_back_pressure_factor; - communication->sendLineTo(path.config->type, path.points[point_idx], path.getLineWidthForLayerView(), path.config->getLayerThickness(), extrude_speed); - gcode.writeExtrusion(path.points[point_idx], extrude_speed, path.getExtrusionMM3perMM(), path.config->type, update_extrusion_offset); + communication->sendLineTo(path.config.type, path.points[point_idx], path.getLineWidthForLayerView(), path.config.getLayerThickness(), extrude_speed); + gcode.writeExtrusion(path.points[point_idx], extrude_speed, path.getExtrusionMM3perMM(), path.config.type, update_extrusion_offset); } // for layer display only - the loop finished at the seam vertex but as we started from // the location of the previous layer's seam vertex the loop may have a gap if this layer's @@ -2211,7 +2223,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) // vertex would not be shifted (as it's the last vertex in the sequence). The smoother the model, // the less the vertices are shifted and the less obvious is the ridge. If the layer display // really displayed a spiral rather than slices of a spiral, this would not be required. - communication->sendLineTo(path.config->type, path.points[0], path.getLineWidthForLayerView(), path.config->getLayerThickness(), speed); + communication->sendLineTo(path.config.type, path.points[0], path.getLineWidthForLayerView(), path.config.getLayerThickness(), speed); } path_idx--; // the last path_idx didnt spiralize, so it's not part of the current spiralize path } @@ -2289,20 +2301,20 @@ bool LayerPlan::writePathWithCoasting( } const std::vector& paths = extruder_plan.paths; const GCodePath& path = paths[path_idx]; - if (path_idx + 1 >= paths.size() || (path.isTravelPath() || ! paths[path_idx + 1].config->isTravelPath()) || path.points.size() < 2) + if (path_idx + 1 >= paths.size() || (path.isTravelPath() || ! paths[path_idx + 1].config.isTravelPath()) || path.points.size() < 2) { return false; } coord_t coasting_min_dist_considered = MM2INT(0.1); // hardcoded setting for when to not perform coasting - const double extrude_speed = path.config->getSpeed() * path.speed_factor * path.speed_back_pressure_factor; + const double extrude_speed = path.config.getSpeed() * path.speed_factor * path.speed_back_pressure_factor; const coord_t coasting_dist - = MM2INT(MM2_2INT(coasting_volume) / layer_thickness) / path.config->getLineWidth(); // closing brackets of MM2INT at weird places for precision issues + = MM2INT(MM2_2INT(coasting_volume) / layer_thickness) / path.config.getLineWidth(); // closing brackets of MM2INT at weird places for precision issues const double coasting_min_volume = extruder.settings.get("coasting_min_volume"); const coord_t coasting_min_dist = MM2INT(MM2_2INT(coasting_min_volume + coasting_volume) / layer_thickness) - / path.config->getLineWidth(); // closing brackets of MM2INT at weird places for precision issues + / path.config.getLineWidth(); // closing brackets of MM2INT at weird places for precision issues // /\ the minimal distance when coasting will coast the full coasting volume instead of linearly less with linearly smaller paths std::vector accumulated_dist_per_point; // the first accumulated dist is that of the last point! (that of the last point is always zero...) @@ -2379,13 +2391,13 @@ bool LayerPlan::writePathWithCoasting( auto [_, time] = extruder_plan.getPointToPointTime(prev_pt, path.points[point_idx], path); insertTempOnTime(time, path_idx); - communication->sendLineTo(path.config->type, path.points[point_idx], path.getLineWidthForLayerView(), path.config->getLayerThickness(), extrude_speed); - gcode.writeExtrusion(path.points[point_idx], extrude_speed, path.getExtrusionMM3perMM(), path.config->type); + communication->sendLineTo(path.config.type, path.points[point_idx], path.getLineWidthForLayerView(), path.config.getLayerThickness(), extrude_speed); + gcode.writeExtrusion(path.points[point_idx], extrude_speed, path.getExtrusionMM3perMM(), path.config.type); prev_pt = path.points[point_idx]; } - communication->sendLineTo(path.config->type, start, path.getLineWidthForLayerView(), path.config->getLayerThickness(), extrude_speed); - gcode.writeExtrusion(start, extrude_speed, path.getExtrusionMM3perMM(), path.config->type); + communication->sendLineTo(path.config.type, start, path.getLineWidthForLayerView(), path.config.getLayerThickness(), extrude_speed); + gcode.writeExtrusion(start, extrude_speed, path.getExtrusionMM3perMM(), path.config.type); } // write coasting path @@ -2395,7 +2407,7 @@ bool LayerPlan::writePathWithCoasting( insertTempOnTime(time, path_idx); const Ratio coasting_speed_modifier = extruder.settings.get("coasting_speed"); - const Velocity speed = Velocity(coasting_speed_modifier * path.config->getSpeed()); + const Velocity speed = Velocity(coasting_speed_modifier * path.config.getSpeed()); gcode.writeTravel(path.points[point_idx], speed); prev_pt = path.points[point_idx]; diff --git a/src/pathPlanning/GCodePath.cpp b/src/pathPlanning/GCodePath.cpp index 3c4ed61633..99cefde899 100644 --- a/src/pathPlanning/GCodePath.cpp +++ b/src/pathPlanning/GCodePath.cpp @@ -6,8 +6,8 @@ namespace cura { -GCodePath::GCodePath(const GCodePathConfig& config, const SliceMeshStorage* mesh, const SpaceFillType space_fill_type, const Ratio flow, const Ratio width_factor, const bool spiralize, const Ratio speed_factor) : - config(&config), +GCodePath::GCodePath(const GCodePathConfig config, const SliceMeshStorage* mesh, const SpaceFillType space_fill_type, const Ratio flow, const Ratio width_factor, const bool spiralize, const Ratio speed_factor) : + config(config), mesh(mesh), space_fill_type(space_fill_type), flow(flow), @@ -29,17 +29,17 @@ GCodePath::GCodePath(const GCodePathConfig& config, const SliceMeshStorage* mesh bool GCodePath::isTravelPath() const { - return config->isTravelPath(); + return config.isTravelPath(); } double GCodePath::getExtrusionMM3perMM() const { - return flow * width_factor * config->getExtrusionMM3perMM(); + return flow * width_factor * config.getExtrusionMM3perMM(); } coord_t GCodePath::getLineWidthForLayerView() const { - return flow * width_factor * config->getLineWidth() * config->getFlowRatio(); + return flow * width_factor * config.getLineWidth() * config.getFlowRatio(); } void GCodePath::setFanSpeed(double fan_speed) @@ -49,7 +49,7 @@ void GCodePath::setFanSpeed(double fan_speed) double GCodePath::getFanSpeed() const { - return (fan_speed >= 0 && fan_speed <= 100) ? fan_speed : config->getFanSpeed(); + return (fan_speed >= 0 && fan_speed <= 100) ? fan_speed : config.getFanSpeed(); } } diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 1ba7d5cb6f..6f123d45a4 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -4,12 +4,16 @@ #include "plugins/converters.h" +#include "GCodePathConfig.h" #include "WallToolPaths.h" #include "pathPlanning/GCodePath.h" #include "settings/Settings.h" #include "settings/types/LayerIndex.h" #include "utils/polygon.h" +#include +#include + namespace cura::plugins { @@ -271,22 +275,186 @@ gcode_paths_modify_request::value_type { auto* gcode_path = gcode_paths->Add(); + switch (path.space_fill_type){ + case SpaceFillType::None: + gcode_path->set_space_fill_type(v0::SpaceFillType::NONE); + break; + case SpaceFillType::Polygons: + gcode_path->set_space_fill_type(v0::SpaceFillType::POLYGONS); + break; + case SpaceFillType::PolyLines: + gcode_path->set_space_fill_type(v0::SpaceFillType::POLY_LINES); + break; + case SpaceFillType::Lines: + gcode_path->set_space_fill_type(v0::SpaceFillType::LINES); + break; + default: + gcode_path->set_space_fill_type(v0::SpaceFillType::NONE); + } + + gcode_path->set_flow(path.flow); + gcode_path->set_width_factor(path.width_factor); + spdlog::info("path.spiralize: {}", path.spiralize); + gcode_path->set_spiralize(path.spiralize); + gcode_path->set_speed_factor(path.speed_factor); + // Construct the OpenPath from the points in a GCodePath - auto* points = gcode_path->mutable_path()->add_path(); for (const auto& point : path.points) { + auto* points = gcode_path->mutable_path()->add_path(); points->set_x(point.X); points->set_y(point.Y); } - } + auto* config_msg = gcode_path->mutable_config(); + + switch (path.config.getPrintFeatureType()) + { + case PrintFeatureType::NoneType: + config_msg->set_feature(v0::PrintFeature::NONETYPE); + break; + case PrintFeatureType::OuterWall: + config_msg->set_feature(v0::PrintFeature::OUTERWALL); + break; + case PrintFeatureType::InnerWall: + config_msg->set_feature(v0::PrintFeature::INNERWALL); + break; + case PrintFeatureType::Skin: + config_msg->set_feature(v0::PrintFeature::SKIN); + break; + case PrintFeatureType::Support: + config_msg->set_feature(v0::PrintFeature::SUPPORT); + break; + case PrintFeatureType::SkirtBrim: + config_msg->set_feature(v0::PrintFeature::SKIRTBRIM); + break; + case PrintFeatureType::Infill: + config_msg->set_feature(v0::PrintFeature::INFILL); + break; + case PrintFeatureType::SupportInfill: + config_msg->set_feature(v0::PrintFeature::SUPPORTINFILL); + break; + case PrintFeatureType::MoveCombing: + config_msg->set_feature(v0::PrintFeature::MOVECOMBING); + break; + case PrintFeatureType::MoveRetraction: + config_msg->set_feature(v0::PrintFeature::MOVERETRACTION); + break; + case PrintFeatureType::SupportInterface: + config_msg->set_feature(v0::PrintFeature::SUPPORTINTERFACE); + break; + case PrintFeatureType::PrimeTower: + config_msg->set_feature(v0::PrintFeature::PRIMETOWER); + break; + case PrintFeatureType::NumPrintFeatureTypes: + config_msg->set_feature(v0::PrintFeature::NUMPRINTFEATURETYPES); + break; + default: + config_msg->set_feature(v0::PrintFeature::NONETYPE); + break; + } + + config_msg->set_line_width(path.config.getLineWidth()); + config_msg->set_layer_thickness(path.config.getLayerThickness()); + config_msg->set_flow_ratio(path.config.getFlowRatio()); + config_msg->set_is_bridge_path(path.config.isBridgePath()); + config_msg->set_fan_speed(path.config.getFanSpeed()); + config_msg->mutable_speed_derivatives()->set_velocity(path.config.getSpeed()); + config_msg->mutable_speed_derivatives()->set_acceleration(path.config.getAcceleration()); + config_msg->mutable_speed_derivatives()->set_jerk(path.config.getJerk()); + } return message; } - gcode_paths_modify_response::native_value_type gcode_paths_modify_response::operator()(const gcode_paths_modify_response::value_type& message) const { - return gcode_paths_modify_response::native_value_type(); + std::vector paths; + for (const auto& gcode_path_msg : message.gcode_paths()) + { + const auto config = [gcode_path_msg]() + { + const auto type = [gcode_path_msg]() { + switch (gcode_path_msg.config().feature()) { + case v0::PrintFeature::NONETYPE: + return PrintFeatureType::NoneType; + case v0::PrintFeature::OUTERWALL: + return PrintFeatureType::OuterWall; + case v0::PrintFeature::INNERWALL: + return PrintFeatureType::InnerWall; + case v0::PrintFeature::SKIN: + return PrintFeatureType::Skin; + case v0::PrintFeature::SUPPORT: + return PrintFeatureType::Support; + case v0::PrintFeature::SKIRTBRIM: + return PrintFeatureType::SkirtBrim; + case v0::PrintFeature::INFILL: + return PrintFeatureType::Infill; + case v0::PrintFeature::SUPPORTINFILL: + return PrintFeatureType::SupportInfill; + case v0::PrintFeature::MOVECOMBING: + return PrintFeatureType::MoveCombing; + case v0::PrintFeature::MOVERETRACTION: + return PrintFeatureType::MoveRetraction; + case v0::PrintFeature::SUPPORTINTERFACE: + return PrintFeatureType::SupportInterface; + case v0::PrintFeature::PRIMETOWER: + return PrintFeatureType::PrimeTower; + case v0::PrintFeature::NUMPRINTFEATURETYPES: + return PrintFeatureType::NumPrintFeatureTypes; + default: + return PrintFeatureType::NoneType; + } + }(); + + const coord_t line_width = gcode_path_msg.config().line_width(); + const coord_t layer_height = gcode_path_msg.config().layer_thickness(); + const Ratio flow = gcode_path_msg.config().flow_ratio(); + const GCodePathConfig::SpeedDerivatives speed_derivatives = { + gcode_path_msg.config().speed_derivatives().velocity(), + gcode_path_msg.config().speed_derivatives().acceleration(), + gcode_path_msg.config().speed_derivatives().jerk() + }; + const bool is_bridge_path = gcode_path_msg.config().is_bridge_path(); + const double fan_speed = gcode_path_msg.config().fan_speed(); + return GCodePathConfig(type, line_width, layer_height, flow, speed_derivatives, is_bridge_path, fan_speed); + }(); + + const auto gcode_path = [config, gcode_path_msg]() + { + // TODO get actual mesh_id from message + const SliceMeshStorage* mesh_id = nullptr; + const SpaceFillType space_fill_type = [gcode_path_msg]() + { + switch (gcode_path_msg.space_fill_type()) { + case v0::SpaceFillType::NONE: + return SpaceFillType::None; + case v0::SpaceFillType::POLYGONS: + return SpaceFillType::Polygons; + case v0::SpaceFillType::POLY_LINES: + return SpaceFillType::PolyLines; + case v0::SpaceFillType::LINES: + return SpaceFillType::Lines; + default: + return SpaceFillType::None; + } + }(); + const Ratio flow = gcode_path_msg.flow(); + const Ratio width_factor = gcode_path_msg.width_factor(); + const bool spiralize = gcode_path_msg.spiralize(); + const Ratio speed_factor = gcode_path_msg.speed_factor(); + + const auto path = GCodePath(config, mesh_id, space_fill_type, flow, width_factor, spiralize, speed_factor); + GCodePath gcode_path(path); + gcode_path.points = gcode_path_msg.path().path() + | ranges::views::transform([](const auto& point_msg) { return Point{ point_msg.x(), point_msg.y() }; }) + | ranges::to_vector; + return gcode_path; + }(); + + paths.emplace_back(gcode_path); + } + + return paths; } } // namespace cura::plugins \ No newline at end of file diff --git a/src/utils/polygonUtils.cpp b/src/utils/polygonUtils.cpp index 8135507834..634328ee66 100644 --- a/src/utils/polygonUtils.cpp +++ b/src/utils/polygonUtils.cpp @@ -1497,7 +1497,7 @@ Polygons PolygonUtils::unionManySmall(const Polygons& p) Polygons a, b; a.paths.reserve(p.paths.size() / 2); b.paths.reserve(a.paths.size() + 1); - for (const auto& [i, path] : p.paths | ranges::view::enumerate) + for (const auto& [i, path] : p.paths | ranges::views::enumerate) { (i % 2 == 0 ? b : a).paths.push_back(path); } diff --git a/tests/ExtruderPlanTest.cpp b/tests/ExtruderPlanTest.cpp index 190381ada3..b1a49a344a 100644 --- a/tests/ExtruderPlanTest.cpp +++ b/tests/ExtruderPlanTest.cpp @@ -198,12 +198,12 @@ class ExtruderPlanPathsParameterizedTest : public testing::TestWithParamgetFlowRatio() / path.flow * path.config->getSpeed() * path.speed_back_pressure_factor; + return path.getExtrusionMM3perMM() / path.config.getFlowRatio() / path.flow * path.config.getSpeed() * path.speed_back_pressure_factor; } [[nodiscard]] static bool shouldCountPath(const GCodePath& path) { - return path.flow > 0.0 && path.width_factor > 0.0 && path.config->getFlowRatio() > 0.0 && path.config->getLineWidth() > 0 && ! path.config->isTravelPath() && ! path.config->isBridgePath(); + return path.flow > 0.0 && path.width_factor > 0.0 && path.config.getFlowRatio() > 0.0 && path.config.getLineWidth() > 0 && ! path.config.isTravelPath() && ! path.config.isBridgePath(); } }; From 634cb8ae59615cb322bf9492f945d92ed8a93d1b Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 15 Aug 2023 13:08:37 +0000 Subject: [PATCH 241/470] Applied clang-format. --- include/pathPlanning/GCodePath.h | 25 ++++--- src/LayerPlan.cpp | 18 ++--- src/pathPlanning/GCodePath.cpp | 50 ++++++++------ src/plugins/converters.cpp | 26 ++++--- src/utils/polygonUtils.cpp | 115 ++++++++++++++++++++----------- 5 files changed, 145 insertions(+), 89 deletions(-) diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 4cd76687fe..3681e67e65 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -1,5 +1,5 @@ -//Copyright (c) 2023 UltiMaker -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef PATH_PLANNING_G_CODE_PATH_H #define PATH_PLANNING_G_CODE_PATH_H @@ -35,14 +35,16 @@ class GCodePath Ratio speed_factor; //!< A speed factor that is multiplied with the travel speed. This factor can be used to change the travel speed. Ratio speed_back_pressure_factor; // points; //!< The points constituting this path. bool done; //!< Path is finished, no more moves should be added, and a new path should be started instead of any appending done to this one. - bool spiralize; //!< Whether to gradually increment the z position during the printing of this path. A sequence of spiralized paths should start at the given layer height and end in one layer higher. + bool spiralize; //!< Whether to gradually increment the z position during the printing of this path. A sequence of spiralized paths should start at the given layer height and + //!< end in one layer higher. double fan_speed; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise @@ -61,7 +63,14 @@ class GCodePath * \param speed_factor The factor that the travel speed will be multiplied with * this path. */ - GCodePath(const GCodePathConfig config, const SliceMeshStorage* mesh_id, const SpaceFillType space_fill_type, const Ratio flow, const Ratio width_factor, const bool spiralize, const Ratio speed_factor = 1.0); + GCodePath( + const GCodePathConfig config, + const SliceMeshStorage* mesh_id, + const SpaceFillType space_fill_type, + const Ratio flow, + const Ratio width_factor, + const bool spiralize, + const Ratio speed_factor = 1.0); /*! * Whether this config is the config of a travel path. @@ -90,7 +99,7 @@ class GCodePath * * \param fan_speed the fan speed to use for this path */ - void setFanSpeed(double fan_speed); + void setFanSpeed(double fan_speed); /*! * Get the fan speed for this path @@ -99,6 +108,6 @@ class GCodePath double getFanSpeed() const; }; -}//namespace cura +} // namespace cura -#endif//PATH_PLANNING_G_CODE_PATH_H +#endif // PATH_PLANNING_G_CODE_PATH_H diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index f4df7e8072..743283025b 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -12,13 +12,13 @@ #include "pathPlanning/Comb.h" #include "pathPlanning/CombPaths.h" //#include "plugins/slots.h" +#include "plugins/slots.h" #include "raft.h" // getTotalExtraLayers #include "settings/types/Ratio.h" #include "sliceDataStorage.h" #include "utils/Simplify.h" #include "utils/linearAlg2D.h" #include "utils/polygonUtils.h" -#include "plugins/slots.h" #include #include @@ -111,7 +111,7 @@ GCodePath* LayerPlan::getLatestPathWithConfig( std::vector& paths = extruder_plans.back().paths; // TODO put back config equality check if (paths.size() > 0 /*&& paths.back().config == config*/ && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor - && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between + && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between { return &paths.back(); } @@ -1911,11 +1911,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; - extruder_plan.paths = slots::instance().generate( - extruder_plan.paths, - extruder_plan.extruder_nr, - layer_nr - ); + extruder_plan.paths = slots::instance().generate(extruder_plan.paths, extruder_plan.extruder_nr, layer_nr); // Since the time/material estimates _may_ have changed during the plugin modify step we recalculate it extruder_plan.computeNaiveTimeEstimates(gcode.getPositionXY()); @@ -2098,7 +2094,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) } } // TODO re-enable the config_changed check - const auto& extruder_changed = !last_extrusion_config.has_value() /* || last_extrusion_config.value() != path.config */; + const auto& extruder_changed = ! last_extrusion_config.has_value() /* || last_extrusion_config.value() != path.config */; if (! path.config.isTravelPath() && extruder_changed) { gcode.writeTypeComment(path.config.type); @@ -2107,7 +2103,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.writeComment("BRIDGE"); } // TODO uncomment next line, make path.config copyable -// last_extrusion_config = path.config; + // last_extrusion_config = path.config; update_extrusion_offset = true; } else @@ -2313,8 +2309,8 @@ bool LayerPlan::writePathWithCoasting( const coord_t coasting_dist = MM2INT(MM2_2INT(coasting_volume) / layer_thickness) / path.config.getLineWidth(); // closing brackets of MM2INT at weird places for precision issues const double coasting_min_volume = extruder.settings.get("coasting_min_volume"); - const coord_t coasting_min_dist = MM2INT(MM2_2INT(coasting_min_volume + coasting_volume) / layer_thickness) - / path.config.getLineWidth(); // closing brackets of MM2INT at weird places for precision issues + const coord_t coasting_min_dist + = MM2INT(MM2_2INT(coasting_min_volume + coasting_volume) / layer_thickness) / path.config.getLineWidth(); // closing brackets of MM2INT at weird places for precision issues // /\ the minimal distance when coasting will coast the full coasting volume instead of linearly less with linearly smaller paths std::vector accumulated_dist_per_point; // the first accumulated dist is that of the last point! (that of the last point is always zero...) diff --git a/src/pathPlanning/GCodePath.cpp b/src/pathPlanning/GCodePath.cpp index 99cefde899..5710f4e18d 100644 --- a/src/pathPlanning/GCodePath.cpp +++ b/src/pathPlanning/GCodePath.cpp @@ -1,29 +1,37 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #include "pathPlanning/GCodePath.h" + #include "GCodePathConfig.h" namespace cura { -GCodePath::GCodePath(const GCodePathConfig config, const SliceMeshStorage* mesh, const SpaceFillType space_fill_type, const Ratio flow, const Ratio width_factor, const bool spiralize, const Ratio speed_factor) : - config(config), - mesh(mesh), - space_fill_type(space_fill_type), - flow(flow), - width_factor(width_factor), - speed_factor(speed_factor), - speed_back_pressure_factor(1.0), - retract(false), - unretract_before_last_travel_move(false), - perform_z_hop(false), - perform_prime(false), - skip_agressive_merge_hint(false), - points(std::vector()), - done(false), - spiralize(spiralize), - fan_speed(GCodePathConfig::FAN_SPEED_DEFAULT), - estimates(TimeMaterialEstimates()) +GCodePath::GCodePath( + const GCodePathConfig config, + const SliceMeshStorage* mesh, + const SpaceFillType space_fill_type, + const Ratio flow, + const Ratio width_factor, + const bool spiralize, + const Ratio speed_factor) + : config(config) + , mesh(mesh) + , space_fill_type(space_fill_type) + , flow(flow) + , width_factor(width_factor) + , speed_factor(speed_factor) + , speed_back_pressure_factor(1.0) + , retract(false) + , unretract_before_last_travel_move(false) + , perform_z_hop(false) + , perform_prime(false) + , skip_agressive_merge_hint(false) + , points(std::vector()) + , done(false) + , spiralize(spiralize) + , fan_speed(GCodePathConfig::FAN_SPEED_DEFAULT) + , estimates(TimeMaterialEstimates()) { } @@ -52,4 +60,4 @@ double GCodePath::getFanSpeed() const return (fan_speed >= 0 && fan_speed <= 100) ? fan_speed : config.getFanSpeed(); } -} +} // namespace cura diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 6f123d45a4..23779507f9 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -275,7 +275,8 @@ gcode_paths_modify_request::value_type { auto* gcode_path = gcode_paths->Add(); - switch (path.space_fill_type){ + switch (path.space_fill_type) + { case SpaceFillType::None: gcode_path->set_space_fill_type(v0::SpaceFillType::NONE); break; @@ -374,8 +375,10 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper { const auto config = [gcode_path_msg]() { - const auto type = [gcode_path_msg]() { - switch (gcode_path_msg.config().feature()) { + const auto type = [gcode_path_msg]() + { + switch (gcode_path_msg.config().feature()) + { case v0::PrintFeature::NONETYPE: return PrintFeatureType::NoneType; case v0::PrintFeature::OUTERWALL: @@ -410,11 +413,9 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper const coord_t line_width = gcode_path_msg.config().line_width(); const coord_t layer_height = gcode_path_msg.config().layer_thickness(); const Ratio flow = gcode_path_msg.config().flow_ratio(); - const GCodePathConfig::SpeedDerivatives speed_derivatives = { - gcode_path_msg.config().speed_derivatives().velocity(), - gcode_path_msg.config().speed_derivatives().acceleration(), - gcode_path_msg.config().speed_derivatives().jerk() - }; + const GCodePathConfig::SpeedDerivatives speed_derivatives = { gcode_path_msg.config().speed_derivatives().velocity(), + gcode_path_msg.config().speed_derivatives().acceleration(), + gcode_path_msg.config().speed_derivatives().jerk() }; const bool is_bridge_path = gcode_path_msg.config().is_bridge_path(); const double fan_speed = gcode_path_msg.config().fan_speed(); return GCodePathConfig(type, line_width, layer_height, flow, speed_derivatives, is_bridge_path, fan_speed); @@ -426,7 +427,8 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper const SliceMeshStorage* mesh_id = nullptr; const SpaceFillType space_fill_type = [gcode_path_msg]() { - switch (gcode_path_msg.space_fill_type()) { + switch (gcode_path_msg.space_fill_type()) + { case v0::SpaceFillType::NONE: return SpaceFillType::None; case v0::SpaceFillType::POLYGONS: @@ -447,7 +449,11 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper const auto path = GCodePath(config, mesh_id, space_fill_type, flow, width_factor, spiralize, speed_factor); GCodePath gcode_path(path); gcode_path.points = gcode_path_msg.path().path() - | ranges::views::transform([](const auto& point_msg) { return Point{ point_msg.x(), point_msg.y() }; }) + | ranges::views::transform( + [](const auto& point_msg) + { + return Point{ point_msg.x(), point_msg.y() }; + }) | ranges::to_vector; return gcode_path; }(); diff --git a/src/utils/polygonUtils.cpp b/src/utils/polygonUtils.cpp index 634328ee66..0a8f627d53 100644 --- a/src/utils/polygonUtils.cpp +++ b/src/utils/polygonUtils.cpp @@ -1,27 +1,33 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include "utils/polygonUtils.h" + #include "infill.h" #include "utils/SparsePointGridInclusive.h" #include "utils/linearAlg2D.h" -#include "utils/polygonUtils.h" + +#include #include #include #include #include -#include #ifdef DEBUG #include "utils/AABB.h" #include "utils/SVG.h" + #include #endif namespace cura { -const std::function PolygonUtils::no_penalty_function = [](Point) { return 0; }; +const std::function PolygonUtils::no_penalty_function = [](Point) +{ + return 0; +}; int64_t PolygonUtils::segmentLength(PolygonsPointIndex start, PolygonsPointIndex end) { @@ -98,7 +104,7 @@ std::vector PolygonUtils::spreadDotsArea(const Polygons& polygons, Point Infill infill_gen(EFillMethod::LINES, false, false, polygons, 0, grid_size.X, 0, 1, 0, 0, 0, 0, 0); Polygons result_polygons; Polygons result_lines; - infill_gen.generate(dummy_toolpaths, result_polygons, result_lines, dummy_settings, 0, SectionType::DOTS); // FIXME: @jellespijker make sure the propper layer nr is used + infill_gen.generate(dummy_toolpaths, result_polygons, result_lines, dummy_settings, 0, SectionType::DOTS); // FIXME: @jellespijker make sure the propper layer nr is used std::vector result; for (PolygonRef line : result_lines) { @@ -120,7 +126,13 @@ std::vector PolygonUtils::spreadDotsArea(const Polygons& polygons, Point return result; } -bool PolygonUtils::lineSegmentPolygonsIntersection(const Point& a, const Point& b, const Polygons& current_outlines, const LocToLineGrid& outline_locator, Point& result, const coord_t within_max_dist) +bool PolygonUtils::lineSegmentPolygonsIntersection( + const Point& a, + const Point& b, + const Polygons& current_outlines, + const LocToLineGrid& outline_locator, + Point& result, + const coord_t within_max_dist) { const coord_t within_max_dist2 = within_max_dist * within_max_dist; @@ -129,7 +141,8 @@ bool PolygonUtils::lineSegmentPolygonsIntersection(const Point& a, const Point& const auto processOnIntersect = [&result, &closest_dist2, &a, &b, &coll](const Point& p_start, const Point& p_end) { - if (LinearAlg2D::lineLineIntersection(a, b, p_start, p_end, coll) && LinearAlg2D::pointIsProjectedBeyondLine(coll, p_start, p_end) == 0 && LinearAlg2D::pointIsProjectedBeyondLine(coll, a, b) == 0) + if (LinearAlg2D::lineLineIntersection(a, b, p_start, p_end, coll) && LinearAlg2D::pointIsProjectedBeyondLine(coll, p_start, p_end) == 0 + && LinearAlg2D::pointIsProjectedBeyondLine(coll, a, b) == 0) { const coord_t dist2 = vSize2(b - coll); if (dist2 < closest_dist2) @@ -233,13 +246,14 @@ unsigned int PolygonUtils::moveOutside(const Polygons& polygons, Point& from, in return moveInside(polygons, from, -distance, maxDist2); } -ClosestPolygonPoint PolygonUtils::moveInside2(const Polygons& polygons, - Point& from, - const int distance, - const int64_t max_dist2, - const Polygons* loc_to_line_polygons, - const LocToLineGrid* loc_to_line_grid, - const std::function& penalty_function) +ClosestPolygonPoint PolygonUtils::moveInside2( + const Polygons& polygons, + Point& from, + const int distance, + const int64_t max_dist2, + const Polygons* loc_to_line_polygons, + const LocToLineGrid* loc_to_line_grid, + const std::function& penalty_function) { std::optional closest_polygon_point; if (loc_to_line_grid) @@ -253,8 +267,14 @@ ClosestPolygonPoint PolygonUtils::moveInside2(const Polygons& polygons, return _moveInside2(*closest_polygon_point, distance, from, max_dist2); } -ClosestPolygonPoint - PolygonUtils::moveInside2(const Polygons& loc_to_line_polygons, ConstPolygonRef polygon, Point& from, const int distance, const int64_t max_dist2, const LocToLineGrid* loc_to_line_grid, const std::function& penalty_function) +ClosestPolygonPoint PolygonUtils::moveInside2( + const Polygons& loc_to_line_polygons, + ConstPolygonRef polygon, + Point& from, + const int distance, + const int64_t max_dist2, + const LocToLineGrid* loc_to_line_grid, + const std::function& penalty_function) { std::optional closest_polygon_point; if (loc_to_line_grid) @@ -596,25 +616,27 @@ Point PolygonUtils::moveInside(const ClosestPolygonPoint& cpp, const int distanc } } -ClosestPolygonPoint PolygonUtils::ensureInsideOrOutside(const Polygons& polygons, - Point& from, - int preferred_dist_inside, - int64_t max_dist2, - const Polygons* loc_to_line_polygons, - const LocToLineGrid* loc_to_line_grid, - const std::function& penalty_function) +ClosestPolygonPoint PolygonUtils::ensureInsideOrOutside( + const Polygons& polygons, + Point& from, + int preferred_dist_inside, + int64_t max_dist2, + const Polygons* loc_to_line_polygons, + const LocToLineGrid* loc_to_line_grid, + const std::function& penalty_function) { const ClosestPolygonPoint closest_polygon_point = moveInside2(polygons, from, preferred_dist_inside, max_dist2, loc_to_line_polygons, loc_to_line_grid, penalty_function); return ensureInsideOrOutside(polygons, from, closest_polygon_point, preferred_dist_inside, loc_to_line_polygons, loc_to_line_grid, penalty_function); } -ClosestPolygonPoint PolygonUtils::ensureInsideOrOutside(const Polygons& polygons, - Point& from, - const ClosestPolygonPoint& closest_polygon_point, - int preferred_dist_inside, - const Polygons* loc_to_line_polygons, - const LocToLineGrid* loc_to_line_grid, - const std::function& penalty_function) +ClosestPolygonPoint PolygonUtils::ensureInsideOrOutside( + const Polygons& polygons, + Point& from, + const ClosestPolygonPoint& closest_polygon_point, + int preferred_dist_inside, + const Polygons* loc_to_line_polygons, + const LocToLineGrid* loc_to_line_grid, + const std::function& penalty_function) { if (! closest_polygon_point.isValid()) { @@ -646,7 +668,8 @@ ClosestPolygonPoint PolygonUtils::ensureInsideOrOutside(const Polygons& polygons else { const coord_t offset = (is_outside_boundary) ? -preferred_dist_inside : preferred_dist_inside; // perform inset on outer boundary and outset on holes - Polygons insetted = closest_poly.offset(offset / 2); // perform less inset, because chances are (thin parts of) the polygon will disappear, given that moveInside did an overshoot + Polygons insetted + = closest_poly.offset(offset / 2); // perform less inset, because chances are (thin parts of) the polygon will disappear, given that moveInside did an overshoot if (insetted.size() == 0) { return ClosestPolygonPoint(); // we couldn't move inside @@ -666,7 +689,7 @@ ClosestPolygonPoint PolygonUtils::ensureInsideOrOutside(const Polygons& polygons { #ifdef DEBUG static bool has_run = false; - if ( ! has_run) + if (! has_run) { try { @@ -755,7 +778,8 @@ void PolygonUtils::walkToNearestSmallestConnection(ClosestPolygonPoint& poly1_re // \-'| // o o >> should find connection here coord_t best_distance2 = vSize2(poly1_result.p() - poly2_result.p()); - auto check_neighboring_vert = [&best_distance2](ConstPolygonRef from_poly, ConstPolygonRef to_poly, ClosestPolygonPoint& from_poly_result, ClosestPolygonPoint& to_poly_result, bool vertex_after) + auto check_neighboring_vert + = [&best_distance2](ConstPolygonRef from_poly, ConstPolygonRef to_poly, ClosestPolygonPoint& from_poly_result, ClosestPolygonPoint& to_poly_result, bool vertex_after) { const Point after_poly2_result = to_poly[(to_poly_result.point_idx + vertex_after) % to_poly.size()]; const ClosestPolygonPoint poly1_after_poly2_result = findNearestClosest(after_poly2_result, from_poly, from_poly_result.point_idx); @@ -978,7 +1002,8 @@ std::unique_ptr PolygonUtils::createLocToLineGrid(const Polygons& * * We could skip the duplication by keeping a vector of vectors of bools. */ -std::optional PolygonUtils::findClose(Point from, const Polygons& polygons, const LocToLineGrid& loc_to_line, const std::function& penalty_function) +std::optional + PolygonUtils::findClose(Point from, const Polygons& polygons, const LocToLineGrid& loc_to_line, const std::function& penalty_function) { std::vector near_lines = loc_to_line.getNearby(from, loc_to_line.getCellSize()); @@ -1011,7 +1036,8 @@ std::optional PolygonUtils::findClose(Point from, const Pol } } -std::vector> PolygonUtils::findClose(ConstPolygonRef from, const Polygons& destination, const LocToLineGrid& destination_loc_to_line, const std::function& penalty_function) +std::vector> + PolygonUtils::findClose(ConstPolygonRef from, const Polygons& destination, const LocToLineGrid& destination_loc_to_line, const std::function& penalty_function) { std::vector> ret; int p0_idx = from.size() - 1; @@ -1166,7 +1192,8 @@ std::optional PolygonUtils::getNextParallelIntersection(con coord_t prev_projected = 0; for (unsigned int next_point_nr = 0; next_point_nr < poly.size(); next_point_nr++) { - const unsigned int next_point_idx = forward ? (start.point_idx + 1 + next_point_nr) % poly.size() : (static_cast(start.point_idx) - next_point_nr + poly.size()) % poly.size(); // cast in order to accomodate subtracting + const unsigned int next_point_idx = forward ? (start.point_idx + 1 + next_point_nr) % poly.size() + : (static_cast(start.point_idx) - next_point_nr + poly.size()) % poly.size(); // cast in order to accomodate subtracting const Point next_vert = poly[next_point_idx]; const Point so = next_vert - s; const coord_t projected = dot(shift, so) / dist; @@ -1176,7 +1203,8 @@ std::optional PolygonUtils::getNextParallelIntersection(con const coord_t segment_length = vSize(segment_vector); const coord_t projected_segment_length = std::abs(projected - prev_projected); const int16_t sign = (projected > 0) ? 1 : -1; - const coord_t projected_inter_segment_length = dist - sign * prev_projected; // add the prev_projected to dist if it is projected to the other side of the input line than where the intersection occurs. + const coord_t projected_inter_segment_length + = dist - sign * prev_projected; // add the prev_projected to dist if it is projected to the other side of the input line than where the intersection occurs. const coord_t inter_segment_length = segment_length * projected_inter_segment_length / projected_segment_length; const Point intersection = prev_vert + normal(next_vert - prev_vert, inter_segment_length); @@ -1212,7 +1240,8 @@ bool PolygonUtils::polygonCollidesWithLineSegment(const Point from, const Point PolygonsPointIndex result; - std::function process_elem_func = [transformed_from, transformed_to, &transformation_matrix, &result, &ret](const PolygonsPointIndex& line_start) + std::function process_elem_func + = [transformed_from, transformed_to, &transformation_matrix, &result, &ret](const PolygonsPointIndex& line_start) { Point p0 = transformation_matrix.apply(line_start.p()); Point p1 = transformation_matrix.apply(line_start.next().p()); @@ -1331,7 +1360,11 @@ bool PolygonUtils::polygonOutlinesAdjacent(const ConstPolygonRef inner_poly, con return false; } -void PolygonUtils::findAdjacentPolygons(std::vector& adjacent_poly_indices, const ConstPolygonRef& poly, const std::vector& possible_adjacent_polys, const coord_t max_gap) +void PolygonUtils::findAdjacentPolygons( + std::vector& adjacent_poly_indices, + const ConstPolygonRef& poly, + const std::vector& possible_adjacent_polys, + const coord_t max_gap) { // given a polygon, and a vector of polygons, return a vector containing the indices of the polygons that are adjacent to the given polygon for (unsigned poly_idx = 0; poly_idx < possible_adjacent_polys.size(); ++poly_idx) @@ -1526,7 +1559,11 @@ Polygons PolygonUtils::clipPolygonWithAABB(const Polygons& src, const AABB& aabb Bottom = 8 }; - auto sides = [aabb](const Point& p) { return int(p.X < aabb.min.X) * int(Side::Left) + int(p.X > aabb.max.X) * int(Side::Right) + int(p.Y < aabb.min.Y) * int(Side::Bottom) + int(p.Y > aabb.max.Y) * int(Side::Top); }; + auto sides = [aabb](const Point& p) + { + return int(p.X < aabb.min.X) * int(Side::Left) + int(p.X > aabb.max.X) * int(Side::Right) + int(p.Y < aabb.min.Y) * int(Side::Bottom) + + int(p.Y > aabb.max.Y) * int(Side::Top); + }; int sides_prev = sides(path.back()); int sides_this = sides(path.front()); From 80e0872cd9fbb7f5224997557dcfbf4dfc51991d Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 15 Aug 2023 15:49:42 +0200 Subject: [PATCH 242/470] message to show if handshake failed CURA-10619 --- include/plugins/pluginproxy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 88908c0fe5..d5340db80e 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -123,6 +123,7 @@ class PluginProxy if (! status.ok()) // TODO: handle different kind of status codes { + spdlog::error(status.error_message()); throw exceptions::RemoteException(slot_info_, status.error_message()); } if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) From 4998bfc0323ff189830d29c48062103677ac8798 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 15 Aug 2023 16:56:24 +0200 Subject: [PATCH 243/470] Removed benchmark for remote plugin CURA-10619 --- benchmark/simplify_benchmark.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/benchmark/simplify_benchmark.h b/benchmark/simplify_benchmark.h index ce28ee1985..d3726bce65 100644 --- a/benchmark/simplify_benchmark.h +++ b/benchmark/simplify_benchmark.h @@ -72,29 +72,5 @@ BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_noplugin)(benchmark::State BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_noplugin); -BENCHMARK_DEFINE_F(SimplifyTestFixture, simplify_slot_localplugin)(benchmark::State& st) -{ - auto host = "localhost"; - auto port = 33700UL; - - try - { - slots::instance().connect(plugins::v0::SlotID::SIMPLIFY_MODIFY, "", "", utils::createChannel({ host, port })); - } - catch (std::runtime_error e) - { - st.SkipWithError(e.what()); - } - for (auto _ : st) - { - Polygons simplified; - for (const auto& polys : shapes) - { - benchmark::DoNotOptimize(simplified = slots::instance().modify(polys, MM2INT(0.25), MM2INT(0.025), 50000)); - } - } -} - -BENCHMARK_REGISTER_F(SimplifyTestFixture, simplify_slot_localplugin); } // namespace cura #endif // CURAENGINE_BENCHMARK_SIMPLIFY_BENCHMARK_H From 0a1bdf0b0d11e51ec1edf0735207769a5c69fa4f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 16 Aug 2023 14:37:19 +0200 Subject: [PATCH 244/470] Fixed compiler warnings for unused parameters CURA-10446 --- include/plugins/slots.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 6e0f81b949..c02f50ece2 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -124,12 +124,12 @@ template class Unit> class Registry, Unit> { public: - constexpr void connect(auto&&... args) noexcept + constexpr void connect([[maybe_unused]] auto&&... args) noexcept { } template - constexpr void broadcast(auto&&... args) noexcept + constexpr void broadcast([[maybe_unused]] auto&&... args) noexcept { } // Base case, do nothing }; From f2cd4057246644dd3e362b0a9dc2cf89fd9da182 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 16 Aug 2023 16:47:39 +0200 Subject: [PATCH 245/470] Moved SpeedDerivatives to its own file This commit primarily adds a new custom struct, SpeedDerivatives, for managing speed derivatives for path planning in the slicer. This structure has fields for speed, acceleration, and jerk which contain movement speed, acceleration for head movements, and jerk for instantaneous speed changes, respectively. Also, imports in several files have been streamlined by removing unnecessary imports to simplify code and improve readability. CURA-10446 --- CMakeLists.txt | 1 + include/GCodePathConfig.h | 20 +----- include/pathPlanning/GCodePath.h | 10 +-- include/pathPlanning/SpeedDerivatives.h | 24 +++++++ include/settings/PathConfigStorage.h | 7 ++- src/GCodePathConfig.cpp | 55 +++++++++------- src/LayerPlan.cpp | 1 - src/pathPlanning/SpeedDerivatives.cpp | 20 ++++++ src/plugins/converters.cpp | 7 ++- src/settings/PathConfigStorage.cpp | 63 ++++++++++--------- tests/ExtruderPlanTest.cpp | 83 ++++++++++++------------- 11 files changed, 163 insertions(+), 128 deletions(-) create mode 100644 include/pathPlanning/SpeedDerivatives.h create mode 100644 src/pathPlanning/SpeedDerivatives.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 25471c12cb..42a6ea97fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,7 @@ set(engine_SRCS # Except main.cpp. src/pathPlanning/GCodePath.cpp src/pathPlanning/LinePolygonsCrossings.cpp src/pathPlanning/NozzleTempInsert.cpp + src/pathPlanning/SpeedDerivatives.cpp src/plugins/converters.cpp diff --git a/include/GCodePathConfig.h b/include/GCodePathConfig.h index 39cac0852a..be02d75053 100644 --- a/include/GCodePathConfig.h +++ b/include/GCodePathConfig.h @@ -1,10 +1,11 @@ -// Copyright (c) 2018 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef G_CODE_PATH_CONFIG_H #define G_CODE_PATH_CONFIG_H #include "PrintFeature.h" +#include "pathPlanning/SpeedDerivatives.h" #include "settings/types/LayerIndex.h" #include "settings/types/Ratio.h" #include "settings/types/Velocity.h" @@ -19,21 +20,6 @@ namespace cura class GCodePathConfig { public: - /*! - * A simple wrapper class for all derivatives of position which are used when printing a line - */ - struct SpeedDerivatives - { - Velocity speed; //!< movement speed (mm/s) - Acceleration acceleration; //!< acceleration of head movement (mm/s^2) - Velocity jerk; //!< jerk of the head movement (around stand still) as instantaneous speed change (mm/s) - SpeedDerivatives(Velocity speed, Acceleration acceleration, Velocity jerk) - : speed(speed) - , acceleration(acceleration) - , jerk(jerk) - { - } - }; const PrintFeatureType type; //!< name of the feature type static constexpr double FAN_SPEED_DEFAULT = -1; diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 3681e67e65..412f7b49b6 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -1,15 +1,15 @@ // Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher. +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef PATH_PLANNING_G_CODE_PATH_H #define PATH_PLANNING_G_CODE_PATH_H -#include "../SpaceFillType.h" -#include "../settings/types/Ratio.h" -#include "../sliceDataStorage.h" -#include "../utils/IntPoint.h" #include "GCodePathConfig.h" +#include "SpaceFillType.h" #include "TimeMaterialEstimates.h" +#include "settings/types/Ratio.h" +#include "sliceDataStorage.h" +#include "utils/IntPoint.h" namespace cura { diff --git a/include/pathPlanning/SpeedDerivatives.h b/include/pathPlanning/SpeedDerivatives.h new file mode 100644 index 0000000000..47c6cab0a6 --- /dev/null +++ b/include/pathPlanning/SpeedDerivatives.h @@ -0,0 +1,24 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef PATHPLANNING_SPEEDDERIVATIVES_H +#define PATHPLANNING_SPEEDDERIVATIVES_H + +#include "settings/types/LayerIndex.h" +#include "settings/types/Velocity.h" + +namespace cura +{ + +struct SpeedDerivatives +{ + Velocity speed{}; //!< movement speed (mm/s) + Acceleration acceleration{}; //!< acceleration of head movement (mm/s^2) + Velocity jerk{}; //!< jerk of the head movement (around stand still) as instantaneous speed change (mm/s) + + constexpr void smoothSpeed(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer_nr); +}; + +} // namespace cura + +#endif // PATHPLANNING_SPEEDDERIVATIVES_H diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index 150f1a9fcb..b57fa0e8c7 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -1,10 +1,11 @@ -// Copyright (c) 2022 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef SETTINGS_PATH_CONFIGS_H #define SETTINGS_PATH_CONFIGS_H #include "GCodePathConfig.h" +#include "pathPlanning/SpeedDerivatives.h" #include "settings/types/LayerIndex.h" #include "utils/Coord_t.h" @@ -53,7 +54,7 @@ class PathConfigStorage GCodePathConfig ironing_config; MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder); - void smoothAllSpeeds(GCodePathConfig::SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer); + void smoothAllSpeeds(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer); }; GCodePathConfig raft_base_config; diff --git a/src/GCodePathConfig.cpp b/src/GCodePathConfig.cpp index aeb9ab3933..0b2ff5a972 100644 --- a/src/GCodePathConfig.cpp +++ b/src/GCodePathConfig.cpp @@ -1,40 +1,47 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#include "GCodePathConfig.h" #include "settings/types/LayerIndex.h" #include "utils/IntPoint.h" // INT2MM -#include "GCodePathConfig.h" -namespace cura +namespace cura { GCodePathConfig::GCodePathConfig(const GCodePathConfig& other) -: type(other.type) -, speed_derivatives(other.speed_derivatives) -, line_width(other.line_width) -, layer_thickness(other.layer_thickness) -, flow(other.flow) -, extrusion_mm3_per_mm(other.extrusion_mm3_per_mm) -, is_bridge_path(other.is_bridge_path) -, fan_speed(other.fan_speed) + : type(other.type) + , speed_derivatives(other.speed_derivatives) + , line_width(other.line_width) + , layer_thickness(other.layer_thickness) + , flow(other.flow) + , extrusion_mm3_per_mm(other.extrusion_mm3_per_mm) + , is_bridge_path(other.is_bridge_path) + , fan_speed(other.fan_speed) { } - -GCodePathConfig::GCodePathConfig(const PrintFeatureType& type, const coord_t line_width, const coord_t layer_height, const Ratio& flow, const GCodePathConfig::SpeedDerivatives speed_derivatives, const bool is_bridge_path, const double fan_speed) -: type(type) -, speed_derivatives(speed_derivatives) -, line_width(line_width) -, layer_thickness(layer_height) -, flow(flow) -, extrusion_mm3_per_mm(calculateExtrusion()) -, is_bridge_path(is_bridge_path) -, fan_speed(fan_speed) +GCodePathConfig::GCodePathConfig( + const PrintFeatureType& type, + const coord_t line_width, + const coord_t layer_height, + const Ratio& flow, + const SpeedDerivatives speed_derivatives, + const bool is_bridge_path, + const double fan_speed) + : type(type) + , speed_derivatives(speed_derivatives) + , line_width(line_width) + , layer_thickness(layer_height) + , flow(flow) + , extrusion_mm3_per_mm(calculateExtrusion()) + , is_bridge_path(is_bridge_path) + , fan_speed(fan_speed) { } -void GCodePathConfig::smoothSpeed(GCodePathConfig::SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer_nr) +void GCodePathConfig::smoothSpeed(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer_nr) { double max_speed_layer = max_speed_layer_nr; double first_layer_speed = std::min(speed_derivatives.speed, first_layer_config.speed); @@ -106,4 +113,4 @@ double GCodePathConfig::calculateExtrusion() const } -}//namespace cura +} // namespace cura diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 743283025b..5b9c3770d3 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -11,7 +11,6 @@ #include "communication/Communication.h" #include "pathPlanning/Comb.h" #include "pathPlanning/CombPaths.h" -//#include "plugins/slots.h" #include "plugins/slots.h" #include "raft.h" // getTotalExtraLayers #include "settings/types/Ratio.h" diff --git a/src/pathPlanning/SpeedDerivatives.cpp b/src/pathPlanning/SpeedDerivatives.cpp new file mode 100644 index 0000000000..0b623c8766 --- /dev/null +++ b/src/pathPlanning/SpeedDerivatives.cpp @@ -0,0 +1,20 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#include "pathPlanning/SpeedDerivatives.h" + +namespace cura +{ + +constexpr void SpeedDerivatives::smoothSpeed(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer_nr) +{ + double max_speed_layer = max_speed_layer_nr; + double first_layer_speed = std::min(speed, first_layer_config.speed); + double first_layer_acceleration = std::min(acceleration, first_layer_config.acceleration); + double first_layer_jerk = std::min(jerk, first_layer_config.jerk); + speed = (speed * layer_nr) / max_speed_layer + (first_layer_speed * (max_speed_layer - layer_nr) / max_speed_layer); + acceleration = (acceleration * layer_nr) / max_speed_layer + (first_layer_acceleration * (max_speed_layer - layer_nr) / max_speed_layer); + jerk = (jerk * layer_nr) / max_speed_layer + (first_layer_jerk * (max_speed_layer - layer_nr) / max_speed_layer); +} + +} // namespace cura \ No newline at end of file diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 23779507f9..8fb4a91805 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -7,6 +7,7 @@ #include "GCodePathConfig.h" #include "WallToolPaths.h" #include "pathPlanning/GCodePath.h" +#include "pathPlanning/SpeedDerivatives.h" #include "settings/Settings.h" #include "settings/types/LayerIndex.h" #include "utils/polygon.h" @@ -413,9 +414,9 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper const coord_t line_width = gcode_path_msg.config().line_width(); const coord_t layer_height = gcode_path_msg.config().layer_thickness(); const Ratio flow = gcode_path_msg.config().flow_ratio(); - const GCodePathConfig::SpeedDerivatives speed_derivatives = { gcode_path_msg.config().speed_derivatives().velocity(), - gcode_path_msg.config().speed_derivatives().acceleration(), - gcode_path_msg.config().speed_derivatives().jerk() }; + const SpeedDerivatives speed_derivatives = { gcode_path_msg.config().speed_derivatives().velocity(), + gcode_path_msg.config().speed_derivatives().acceleration(), + gcode_path_msg.config().speed_derivatives().jerk() }; const bool is_bridge_path = gcode_path_msg.config().is_bridge_path(); const double fan_speed = gcode_path_msg.config().fan_speed(); return GCodePathConfig(type, line_width, layer_height, flow, speed_derivatives, is_bridge_path, fan_speed); diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 9ab4b7704c..54913752f0 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -1,6 +1,7 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher +#include "pathPlanning/SpeedDerivatives.h" #include "settings/PathConfigStorage.h" #include "settings/Settings.h" // MAX_INFILL_COMBINE #include "Application.h" @@ -37,21 +38,21 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("wall_0_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("speed_wall_0"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0")} + , SpeedDerivatives{mesh.settings.get("speed_wall_0"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0")} ) , insetX_config( PrintFeatureType::InnerWall , mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("wall_x_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("speed_wall_x"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x")} + , SpeedDerivatives{mesh.settings.get("speed_wall_x"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x")} ) , bridge_inset0_config( PrintFeatureType::OuterWall , mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("bridge_wall_material_flow") - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0")} + , SpeedDerivatives{mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0")} , true // is_bridge_path , mesh.settings.get("bridge_fan_speed") * 100.0 ) @@ -60,7 +61,7 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("bridge_wall_material_flow") - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x")} + , SpeedDerivatives{mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x")} , true // is_bridge_path , mesh.settings.get("bridge_fan_speed") * 100.0 ) @@ -69,14 +70,14 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("skin_material_flow") * ((layer_nr == 0) ? mesh.settings.get("skin_material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("speed_topbottom"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} + , SpeedDerivatives{mesh.settings.get("speed_topbottom"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} ) , bridge_skin_config( // use bridge skin flow, speed and fan PrintFeatureType::Skin , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("bridge_skin_material_flow") - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("bridge_skin_speed"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} + , SpeedDerivatives{mesh.settings.get("bridge_skin_speed"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} , true // is_bridge_path , mesh.settings.get("bridge_fan_speed") * 100.0 ) @@ -85,7 +86,7 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("bridge_skin_material_flow_2") - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("bridge_skin_speed_2"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} + , SpeedDerivatives{mesh.settings.get("bridge_skin_speed_2"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} , true // is_bridge_path , mesh.settings.get("bridge_fan_speed_2") * 100.0 ) @@ -94,7 +95,7 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("bridge_skin_material_flow_3") - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("bridge_skin_speed_3"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} + , SpeedDerivatives{mesh.settings.get("bridge_skin_speed_3"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} , true // is_bridge_path , mesh.settings.get("bridge_fan_speed_3") * 100.0 ) @@ -103,14 +104,14 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("roofing_line_width") , layer_thickness , mesh.settings.get("roofing_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("speed_roofing"), mesh.settings.get("acceleration_roofing"), mesh.settings.get("jerk_roofing")} + , SpeedDerivatives{mesh.settings.get("speed_roofing"), mesh.settings.get("acceleration_roofing"), mesh.settings.get("jerk_roofing")} ) , ironing_config( PrintFeatureType::Skin , mesh.settings.get("ironing_line_spacing") , layer_thickness , mesh.settings.get("ironing_flow") - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("speed_ironing"), mesh.settings.get("acceleration_ironing"), mesh.settings.get("jerk_ironing")} + , SpeedDerivatives{mesh.settings.get("speed_ironing"), mesh.settings.get("acceleration_ironing"), mesh.settings.get("jerk_ironing")} ) { @@ -123,7 +124,7 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh , mesh.settings.get("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get("infill_extruder_nr").extruder_nr] , layer_thickness , mesh.settings.get("infill_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1) - , GCodePathConfig::SpeedDerivatives{mesh.settings.get("speed_infill"), mesh.settings.get("acceleration_infill"), mesh.settings.get("jerk_infill")} + , SpeedDerivatives{mesh.settings.get("speed_infill"), mesh.settings.get("acceleration_infill"), mesh.settings.get("jerk_infill")} ); } } @@ -144,35 +145,35 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye , raft_base_train.settings.get("raft_base_line_width") , raft_base_train.settings.get("raft_base_thickness") , Ratio(1.0) - , GCodePathConfig::SpeedDerivatives{raft_base_train.settings.get("raft_base_speed"), raft_base_train.settings.get("raft_base_acceleration"), raft_base_train.settings.get("raft_base_jerk")} + , SpeedDerivatives{raft_base_train.settings.get("raft_base_speed"), raft_base_train.settings.get("raft_base_acceleration"), raft_base_train.settings.get("raft_base_jerk")} ) , raft_interface_config( PrintFeatureType::Support , raft_interface_train.settings.get("raft_interface_line_width") , raft_interface_train.settings.get("raft_interface_thickness") , Ratio(1.0) - , GCodePathConfig::SpeedDerivatives{raft_interface_train.settings.get("raft_interface_speed"), raft_interface_train.settings.get("raft_interface_acceleration"), raft_interface_train.settings.get("raft_interface_jerk")} + , SpeedDerivatives{raft_interface_train.settings.get("raft_interface_speed"), raft_interface_train.settings.get("raft_interface_acceleration"), raft_interface_train.settings.get("raft_interface_jerk")} ) , raft_surface_config( PrintFeatureType::SupportInterface , raft_surface_train.settings.get("raft_surface_line_width") , raft_surface_train.settings.get("raft_surface_thickness") , Ratio(1.0) - , GCodePathConfig::SpeedDerivatives{raft_surface_train.settings.get("raft_surface_speed"), raft_surface_train.settings.get("raft_surface_acceleration"), raft_surface_train.settings.get("raft_surface_jerk")} + , SpeedDerivatives{raft_surface_train.settings.get("raft_surface_speed"), raft_surface_train.settings.get("raft_surface_acceleration"), raft_surface_train.settings.get("raft_surface_jerk")} ) , support_roof_config( PrintFeatureType::SupportInterface , support_roof_train.settings.get("support_roof_line_width") * line_width_factor_per_extruder[support_roof_extruder_nr] , layer_thickness , support_roof_train.settings.get("support_roof_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{support_roof_train.settings.get("speed_support_roof"), support_roof_train.settings.get("acceleration_support_roof"), support_roof_train.settings.get("jerk_support_roof")} + , SpeedDerivatives{support_roof_train.settings.get("speed_support_roof"), support_roof_train.settings.get("acceleration_support_roof"), support_roof_train.settings.get("jerk_support_roof")} ) , support_bottom_config( PrintFeatureType::SupportInterface , support_bottom_train.settings.get("support_bottom_line_width") * line_width_factor_per_extruder[support_bottom_extruder_nr] , layer_thickness , support_roof_train.settings.get("support_bottom_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{support_bottom_train.settings.get("speed_support_bottom"), support_bottom_train.settings.get("acceleration_support_bottom"), support_bottom_train.settings.get("jerk_support_bottom")} + , SpeedDerivatives{support_bottom_train.settings.get("speed_support_bottom"), support_bottom_train.settings.get("acceleration_support_bottom"), support_bottom_train.settings.get("jerk_support_bottom")} ) { const size_t extruder_count = Application::getInstance().current_slice->scene.extruders.size(); @@ -188,7 +189,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye , 0 , 0 , 0.0 - , GCodePathConfig::SpeedDerivatives{train.settings.get("speed_travel"), train.settings.get("acceleration_travel"), train.settings.get("jerk_travel")} + , SpeedDerivatives{train.settings.get("speed_travel"), train.settings.get("acceleration_travel"), train.settings.get("jerk_travel")} ); skirt_brim_config_per_extruder.emplace_back( PrintFeatureType::SkirtBrim @@ -196,7 +197,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]) // cause it's also used for the draft/ooze shield , layer_thickness , train.settings.get("skirt_brim_material_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{train.settings.get("skirt_brim_speed"), train.settings.get("acceleration_skirt_brim"), train.settings.get("jerk_skirt_brim")} + , SpeedDerivatives{train.settings.get("skirt_brim_speed"), train.settings.get("acceleration_skirt_brim"), train.settings.get("jerk_skirt_brim")} ); prime_tower_config_per_extruder.emplace_back( PrintFeatureType::PrimeTower @@ -204,7 +205,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]) , layer_thickness , train.settings.get("prime_tower_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , GCodePathConfig::SpeedDerivatives{train.settings.get("speed_prime_tower"), train.settings.get("acceleration_prime_tower"), train.settings.get("jerk_prime_tower")} + , SpeedDerivatives{train.settings.get("speed_prime_tower"), train.settings.get("acceleration_prime_tower"), train.settings.get("jerk_prime_tower")} ); } @@ -223,7 +224,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye , support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor , layer_thickness , support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1) - , GCodePathConfig::SpeedDerivatives{support_infill_train.settings.get("speed_support_infill"), support_infill_train.settings.get("acceleration_support_infill"), support_infill_train.settings.get("jerk_support_infill")} + , SpeedDerivatives{support_infill_train.settings.get("speed_support_infill"), support_infill_train.settings.get("acceleration_support_infill"), support_infill_train.settings.get("jerk_support_infill")} ); } @@ -234,7 +235,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye } } -void PathConfigStorage::MeshPathConfigs::smoothAllSpeeds(GCodePathConfig::SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer) +void PathConfigStorage::MeshPathConfigs::smoothAllSpeeds(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer) { inset0_config.smoothSpeed( first_layer_config, layer_nr, max_speed_layer); insetX_config.smoothSpeed( first_layer_config, layer_nr, max_speed_layer); @@ -249,12 +250,12 @@ void PathConfigStorage::MeshPathConfigs::smoothAllSpeeds(GCodePathConfig::SpeedD void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& storage, const LayerIndex& layer_nr, const size_t initial_speedup_layer_count) { - std::vector global_first_layer_config_per_extruder; + std::vector global_first_layer_config_per_extruder; global_first_layer_config_per_extruder.reserve(Application::getInstance().current_slice->scene.extruders.size()); for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders) { global_first_layer_config_per_extruder.emplace_back( - GCodePathConfig::SpeedDerivatives{ + SpeedDerivatives{ extruder.settings.get("speed_print_layer_0") , extruder.settings.get("acceleration_print_layer_0") , extruder.settings.get("jerk_print_layer_0") @@ -266,17 +267,17 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& { const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; const size_t extruder_nr_support_infill = mesh_group_settings.get((layer_nr <= 0) ? "support_extruder_nr_layer_0" : "support_infill_extruder_nr").extruder_nr; - GCodePathConfig::SpeedDerivatives& first_layer_config_infill = global_first_layer_config_per_extruder[extruder_nr_support_infill]; + SpeedDerivatives& first_layer_config_infill = global_first_layer_config_per_extruder[extruder_nr_support_infill]; for (unsigned int idx = 0; idx < MAX_INFILL_COMBINE; idx++) { support_infill_config[idx].smoothSpeed(first_layer_config_infill, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); } const size_t extruder_nr_support_roof = mesh_group_settings.get("support_roof_extruder_nr").extruder_nr; - GCodePathConfig::SpeedDerivatives& first_layer_config_roof = global_first_layer_config_per_extruder[extruder_nr_support_roof]; + SpeedDerivatives& first_layer_config_roof = global_first_layer_config_per_extruder[extruder_nr_support_roof]; support_roof_config.smoothSpeed(first_layer_config_roof, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); const size_t extruder_nr_support_bottom = mesh_group_settings.get("support_bottom_extruder_nr").extruder_nr; - GCodePathConfig::SpeedDerivatives& first_layer_config_bottom = global_first_layer_config_per_extruder[extruder_nr_support_bottom]; + SpeedDerivatives& first_layer_config_bottom = global_first_layer_config_per_extruder[extruder_nr_support_bottom]; support_bottom_config.smoothSpeed(first_layer_config_bottom, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); } } @@ -285,7 +286,7 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& for (size_t extruder_nr = 0; extruder_nr < Application::getInstance().current_slice->scene.extruders.size(); extruder_nr++) { const ExtruderTrain& train = Application::getInstance().current_slice->scene.extruders[extruder_nr]; - GCodePathConfig::SpeedDerivatives initial_layer_travel_speed_config{ + SpeedDerivatives initial_layer_travel_speed_config{ train.settings.get("speed_travel_layer_0") , train.settings.get("acceleration_travel_layer_0") , train.settings.get("jerk_travel_layer_0") @@ -297,7 +298,7 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& // don't smooth speed for the skirt/brim! // NOTE: not smoothing skirt/brim means the speeds are also not smoothed for the draft/ooze shield - const GCodePathConfig::SpeedDerivatives& initial_layer_print_speed_config = global_first_layer_config_per_extruder[extruder_nr]; + const SpeedDerivatives& initial_layer_print_speed_config = global_first_layer_config_per_extruder[extruder_nr]; GCodePathConfig& prime_tower = prime_tower_config_per_extruder[extruder_nr]; prime_tower.smoothSpeed(initial_layer_print_speed_config, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); @@ -310,7 +311,7 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& { const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; - GCodePathConfig::SpeedDerivatives initial_layer_speed_config{ + SpeedDerivatives initial_layer_speed_config{ mesh.settings.get("speed_print_layer_0") , mesh.settings.get("acceleration_print_layer_0") , mesh.settings.get("jerk_print_layer_0") diff --git a/tests/ExtruderPlanTest.cpp b/tests/ExtruderPlanTest.cpp index b1a49a344a..f5e1223816 100644 --- a/tests/ExtruderPlanTest.cpp +++ b/tests/ExtruderPlanTest.cpp @@ -2,6 +2,8 @@ // CuraEngine is released under the terms of the AGPLv3 or higher #include "LayerPlan.h" //Code under test. +#include "pathPlanning/SpeedDerivatives.h" + #include #include //For calculating averages. @@ -69,8 +71,8 @@ class ExtruderPlanTestPathCollection GCodePathConfig travel_config; ExtruderPlanTestPathCollection() - : extrusion_config(PrintFeatureType::OuterWall, 400, 100, 1.0_r, GCodePathConfig::SpeedDerivatives(50.0, 1000.0, 10.0)) - , travel_config(PrintFeatureType::MoveCombing, 0, 100, 0.0_r, GCodePathConfig::SpeedDerivatives(120.0, 5000.0, 30.0)) + : extrusion_config(PrintFeatureType::OuterWall, 400, 100, 1.0_r, SpeedDerivatives(50.0, 1000.0, 10.0)) + , travel_config(PrintFeatureType::MoveCombing, 0, 100, 0.0_r, SpeedDerivatives(120.0, 5000.0, 30.0)) { const SliceMeshStorage* mesh = nullptr; constexpr Ratio flow_1 = 1.0_r; @@ -78,23 +80,13 @@ class ExtruderPlanTestPathCollection constexpr bool no_spiralize = false; constexpr Ratio speed_1 = 1.0_r; square.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::PolyLines, flow_1, width_1, no_spiralize, speed_1) }); - square.back().points = - { - Point(0, 0), - Point(1000, 0), - Point(1000, 1000), - Point(0, 1000), - Point(0, 0) - }; - - lines.assign - ({ - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1) - }); + square.back().points = { Point(0, 0), Point(1000, 0), Point(1000, 1000), Point(0, 1000), Point(0, 0) }; + + lines.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1) }); lines[0].points = { Point(0, 0), Point(1000, 0) }; lines[1].points = { Point(1000, 0), Point(1000, 400) }; lines[2].points = { Point(1000, 400), Point(0, 400) }; @@ -104,14 +96,11 @@ class ExtruderPlanTestPathCollection constexpr Ratio flow_12 = 1.2_r; constexpr Ratio flow_08 = 0.8_r; constexpr Ratio flow_04 = 0.4_r; - decreasing_flow.assign - ({ - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_12, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_08, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_04, width_1, no_spiralize, speed_1) - }); + decreasing_flow.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_12, width_1, no_spiralize, speed_1), + GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_08, width_1, no_spiralize, speed_1), + GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_04, width_1, no_spiralize, speed_1) }); decreasing_flow[0].points = { Point(0, 0), Point(1000, 0) }; decreasing_flow[1].points = { Point(1000, 0), Point(1000, 400) }; decreasing_flow[2].points = { Point(1000, 400), Point(0, 400) }; @@ -121,22 +110,18 @@ class ExtruderPlanTestPathCollection constexpr Ratio speed_12 = 1.2_r; constexpr Ratio speed_08 = 0.8_r; constexpr Ratio speed_04 = 0.4_r; - decreasing_speed.assign - ({ - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_12), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_08), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_04) - }); + decreasing_speed.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_12), + GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_08), + GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), + GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_04) }); decreasing_speed[0].points = { Point(0, 0), Point(1000, 0) }; decreasing_speed[1].points = { Point(1000, 0), Point(1000, 400) }; decreasing_speed[2].points = { Point(1000, 400), Point(0, 400) }; decreasing_speed[3].points = { Point(0, 400), Point(0, 800) }; decreasing_speed[4].points = { Point(0, 800), Point(1000, 800) }; - variable_width.assign - ({ + variable_width.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.8_r, width_1, no_spiralize, speed_1), GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.6_r, width_1, no_spiralize, speed_1), @@ -203,13 +188,15 @@ class ExtruderPlanPathsParameterizedTest : public testing::TestWithParam 0.0 && path.width_factor > 0.0 && path.config.getFlowRatio() > 0.0 && path.config.getLineWidth() > 0 && ! path.config.isTravelPath() && ! path.config.isBridgePath(); + return path.flow > 0.0 && path.width_factor > 0.0 && path.config.getFlowRatio() > 0.0 && path.config.getLineWidth() > 0 && ! path.config.isTravelPath() + && ! path.config.isBridgePath(); } }; -INSTANTIATE_TEST_SUITE_P(ExtruderPlanTestInstantiation, - ExtruderPlanPathsParameterizedTest, - testing::Values(path_collection.square, path_collection.lines, path_collection.decreasing_flow, path_collection.decreasing_speed, path_collection.variable_width)); +INSTANTIATE_TEST_SUITE_P( + ExtruderPlanTestInstantiation, + ExtruderPlanPathsParameterizedTest, + testing::Values(path_collection.square, path_collection.lines, path_collection.decreasing_flow, path_collection.decreasing_speed, path_collection.variable_width)); /*! * A fixture for general test cases involving extruder plans. @@ -271,7 +258,13 @@ TEST_P(ExtruderPlanPathsParameterizedTest, BackPressureCompensationFull) extruder_plan.paths = GetParam(); extruder_plan.applyBackPressureCompensation(1.0_r); - auto first_extrusion = std::find_if(extruder_plan.paths.begin(), extruder_plan.paths.end(), [&](GCodePath& path) { return shouldCountPath(path); }); + auto first_extrusion = std::find_if( + extruder_plan.paths.begin(), + extruder_plan.paths.end(), + [&](GCodePath& path) + { + return shouldCountPath(path); + }); if (first_extrusion == extruder_plan.paths.end()) // Only travel moves in this plan. { return; @@ -286,7 +279,8 @@ TEST_P(ExtruderPlanPathsParameterizedTest, BackPressureCompensationFull) continue; // Ignore travel moves. } const double flow_mm3_per_sec = calculatePathWidth(path); - EXPECT_NEAR(flow_mm3_per_sec, first_flow_mm3_per_sec, error_margin) << "Every path must have a flow rate equal to the first, since the flow changes were completely compensated for."; + EXPECT_NEAR(flow_mm3_per_sec, first_flow_mm3_per_sec, error_margin) + << "Every path must have a flow rate equal to the first, since the flow changes were completely compensated for."; } } @@ -330,7 +324,8 @@ TEST_P(ExtruderPlanPathsParameterizedTest, BackPressureCompensationHalf) ASSERT_EQ(original_flows.size(), new_flows.size()) << "We need to have the same number of extrusion moves."; for (size_t i = 0; i < new_flows.size(); ++i) { - EXPECT_NEAR((original_flows[i] - original_average) / 2.0, new_flows[i] - new_average, error_margin) << "The differences in flow rate needs to be approximately halved, within margin of rounding errors."; + EXPECT_NEAR((original_flows[i] - original_average) / 2.0, new_flows[i] - new_average, error_margin) + << "The differences in flow rate needs to be approximately halved, within margin of rounding errors."; } } From b4db13e55b11ac0cc219895911d61444aed260b7 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Wed, 16 Aug 2023 14:48:21 +0000 Subject: [PATCH 246/470] Applied clang-format. --- src/settings/PathConfigStorage.cpp | 386 +++++++++++++++-------------- 1 file changed, 199 insertions(+), 187 deletions(-) diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 54913752f0..5a190f308c 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -1,15 +1,16 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include "pathPlanning/SpeedDerivatives.h" #include "settings/PathConfigStorage.h" -#include "settings/Settings.h" // MAX_INFILL_COMBINE + #include "Application.h" #include "ExtruderTrain.h" -#include "raft.h" #include "Slice.h" -#include "sliceDataStorage.h" // SliceDataStorage +#include "pathPlanning/SpeedDerivatives.h" +#include "raft.h" #include "settings/EnumSettings.h" //For EPlatformAdhesion. +#include "settings/Settings.h" // MAX_INFILL_COMBINE +#include "sliceDataStorage.h" // SliceDataStorage namespace cura { @@ -32,87 +33,94 @@ std::vector PathConfigStorage::getLineWidthFactorPerExtruder(const LayerI return ret; } -PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder) -: inset0_config( - PrintFeatureType::OuterWall - , mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("wall_0_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{mesh.settings.get("speed_wall_0"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0")} -) -, insetX_config( - PrintFeatureType::InnerWall - , mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("wall_x_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{mesh.settings.get("speed_wall_x"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x")} -) -, bridge_inset0_config( - PrintFeatureType::OuterWall - , mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("bridge_wall_material_flow") - , SpeedDerivatives{mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0")} - , true // is_bridge_path - , mesh.settings.get("bridge_fan_speed") * 100.0 -) -, bridge_insetX_config( - PrintFeatureType::InnerWall - , mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("bridge_wall_material_flow") - , SpeedDerivatives{mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x")} - , true // is_bridge_path - , mesh.settings.get("bridge_fan_speed") * 100.0 -) -, skin_config( - PrintFeatureType::Skin - , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("skin_material_flow") * ((layer_nr == 0) ? mesh.settings.get("skin_material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{mesh.settings.get("speed_topbottom"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} -) -, bridge_skin_config( // use bridge skin flow, speed and fan - PrintFeatureType::Skin - , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("bridge_skin_material_flow") - , SpeedDerivatives{mesh.settings.get("bridge_skin_speed"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} - , true // is_bridge_path - , mesh.settings.get("bridge_fan_speed") * 100.0 -) -, bridge_skin_config2( // use bridge skin 2 flow, speed and fan - PrintFeatureType::Skin - , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("bridge_skin_material_flow_2") - , SpeedDerivatives{mesh.settings.get("bridge_skin_speed_2"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} - , true // is_bridge_path - , mesh.settings.get("bridge_fan_speed_2") * 100.0 -) -, bridge_skin_config3( // use bridge skin 3 flow, speed and fan - PrintFeatureType::Skin - , mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("bridge_skin_material_flow_3") - , SpeedDerivatives{mesh.settings.get("bridge_skin_speed_3"), mesh.settings.get("acceleration_topbottom"), mesh.settings.get("jerk_topbottom")} - , true // is_bridge_path - , mesh.settings.get("bridge_fan_speed_3") * 100.0 -) -, roofing_config( - PrintFeatureType::Skin - , mesh.settings.get("roofing_line_width") - , layer_thickness - , mesh.settings.get("roofing_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{mesh.settings.get("speed_roofing"), mesh.settings.get("acceleration_roofing"), mesh.settings.get("jerk_roofing")} -) -, ironing_config( - PrintFeatureType::Skin - , mesh.settings.get("ironing_line_spacing") - , layer_thickness - , mesh.settings.get("ironing_flow") - , SpeedDerivatives{mesh.settings.get("speed_ironing"), mesh.settings.get("acceleration_ironing"), mesh.settings.get("jerk_ironing")} -) +PathConfigStorage::MeshPathConfigs::MeshPathConfigs( + const SliceMeshStorage& mesh, + const coord_t layer_thickness, + const LayerIndex& layer_nr, + const std::vector& line_width_factor_per_extruder) + : inset0_config( + PrintFeatureType::OuterWall, + mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("wall_0_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ mesh.settings.get("speed_wall_0"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0") }) + , insetX_config( + PrintFeatureType::InnerWall, + mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("wall_x_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ mesh.settings.get("speed_wall_x"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x") }) + , bridge_inset0_config( + PrintFeatureType::OuterWall, + mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("bridge_wall_material_flow"), + SpeedDerivatives{ mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0") }, + true // is_bridge_path + , + mesh.settings.get("bridge_fan_speed") * 100.0) + , bridge_insetX_config( + PrintFeatureType::InnerWall, + mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("bridge_wall_material_flow"), + SpeedDerivatives{ mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x") }, + true // is_bridge_path + , + mesh.settings.get("bridge_fan_speed") * 100.0) + , skin_config( + PrintFeatureType::Skin, + mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("skin_material_flow") * ((layer_nr == 0) ? mesh.settings.get("skin_material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ mesh.settings.get("speed_topbottom"), + mesh.settings.get("acceleration_topbottom"), + mesh.settings.get("jerk_topbottom") }) + , bridge_skin_config( // use bridge skin flow, speed and fan + PrintFeatureType::Skin, + mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("bridge_skin_material_flow"), + SpeedDerivatives{ mesh.settings.get("bridge_skin_speed"), + mesh.settings.get("acceleration_topbottom"), + mesh.settings.get("jerk_topbottom") }, + true // is_bridge_path + , + mesh.settings.get("bridge_fan_speed") * 100.0) + , bridge_skin_config2( // use bridge skin 2 flow, speed and fan + PrintFeatureType::Skin, + mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("bridge_skin_material_flow_2"), + SpeedDerivatives{ mesh.settings.get("bridge_skin_speed_2"), + mesh.settings.get("acceleration_topbottom"), + mesh.settings.get("jerk_topbottom") }, + true // is_bridge_path + , + mesh.settings.get("bridge_fan_speed_2") * 100.0) + , bridge_skin_config3( // use bridge skin 3 flow, speed and fan + PrintFeatureType::Skin, + mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("bridge_skin_material_flow_3"), + SpeedDerivatives{ mesh.settings.get("bridge_skin_speed_3"), + mesh.settings.get("acceleration_topbottom"), + mesh.settings.get("jerk_topbottom") }, + true // is_bridge_path + , + mesh.settings.get("bridge_fan_speed_3") * 100.0) + , roofing_config( + PrintFeatureType::Skin, + mesh.settings.get("roofing_line_width"), + layer_thickness, + mesh.settings.get("roofing_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ mesh.settings.get("speed_roofing"), mesh.settings.get("acceleration_roofing"), mesh.settings.get("jerk_roofing") }) + , ironing_config( + PrintFeatureType::Skin, + mesh.settings.get("ironing_line_spacing"), + layer_thickness, + mesh.settings.get("ironing_flow"), + SpeedDerivatives{ mesh.settings.get("speed_ironing"), mesh.settings.get("acceleration_ironing"), mesh.settings.get("jerk_ironing") }) { infill_config.reserve(MAX_INFILL_COMBINE); @@ -120,61 +128,65 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh for (int combine_idx = 0; combine_idx < MAX_INFILL_COMBINE; combine_idx++) { infill_config.emplace_back( - PrintFeatureType::Infill - , mesh.settings.get("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get("infill_extruder_nr").extruder_nr] - , layer_thickness - , mesh.settings.get("infill_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1) - , SpeedDerivatives{mesh.settings.get("speed_infill"), mesh.settings.get("acceleration_infill"), mesh.settings.get("jerk_infill")} - ); + PrintFeatureType::Infill, + mesh.settings.get("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get("infill_extruder_nr").extruder_nr], + layer_thickness, + mesh.settings.get("infill_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), + SpeedDerivatives{ mesh.settings.get("speed_infill"), mesh.settings.get("acceleration_infill"), mesh.settings.get("jerk_infill") }); } } PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const LayerIndex& layer_nr, const coord_t layer_thickness) -: support_infill_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_infill_extruder_nr").extruder_nr) -, support_roof_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_roof_extruder_nr").extruder_nr) -, support_bottom_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_bottom_extruder_nr").extruder_nr) -, raft_base_train(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_base_extruder_nr")) -, raft_interface_train(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_interface_extruder_nr")) -, raft_surface_train(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_surface_extruder_nr")) -, support_infill_train(Application::getInstance().current_slice->scene.extruders[support_infill_extruder_nr]) -, support_roof_train(Application::getInstance().current_slice->scene.extruders[support_roof_extruder_nr]) -, support_bottom_train(Application::getInstance().current_slice->scene.extruders[support_bottom_extruder_nr]) -, line_width_factor_per_extruder(PathConfigStorage::getLineWidthFactorPerExtruder(layer_nr)) -, raft_base_config( - PrintFeatureType::SupportInterface - , raft_base_train.settings.get("raft_base_line_width") - , raft_base_train.settings.get("raft_base_thickness") - , Ratio(1.0) - , SpeedDerivatives{raft_base_train.settings.get("raft_base_speed"), raft_base_train.settings.get("raft_base_acceleration"), raft_base_train.settings.get("raft_base_jerk")} - ) -, raft_interface_config( - PrintFeatureType::Support - , raft_interface_train.settings.get("raft_interface_line_width") - , raft_interface_train.settings.get("raft_interface_thickness") - , Ratio(1.0) - , SpeedDerivatives{raft_interface_train.settings.get("raft_interface_speed"), raft_interface_train.settings.get("raft_interface_acceleration"), raft_interface_train.settings.get("raft_interface_jerk")} - ) -, raft_surface_config( - PrintFeatureType::SupportInterface - , raft_surface_train.settings.get("raft_surface_line_width") - , raft_surface_train.settings.get("raft_surface_thickness") - , Ratio(1.0) - , SpeedDerivatives{raft_surface_train.settings.get("raft_surface_speed"), raft_surface_train.settings.get("raft_surface_acceleration"), raft_surface_train.settings.get("raft_surface_jerk")} - ) -, support_roof_config( - PrintFeatureType::SupportInterface - , support_roof_train.settings.get("support_roof_line_width") * line_width_factor_per_extruder[support_roof_extruder_nr] - , layer_thickness - , support_roof_train.settings.get("support_roof_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{support_roof_train.settings.get("speed_support_roof"), support_roof_train.settings.get("acceleration_support_roof"), support_roof_train.settings.get("jerk_support_roof")} - ) -, support_bottom_config( - PrintFeatureType::SupportInterface - , support_bottom_train.settings.get("support_bottom_line_width") * line_width_factor_per_extruder[support_bottom_extruder_nr] - , layer_thickness - , support_roof_train.settings.get("support_bottom_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{support_bottom_train.settings.get("speed_support_bottom"), support_bottom_train.settings.get("acceleration_support_bottom"), support_bottom_train.settings.get("jerk_support_bottom")} - ) + : support_infill_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_infill_extruder_nr").extruder_nr) + , support_roof_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_roof_extruder_nr").extruder_nr) + , support_bottom_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_bottom_extruder_nr").extruder_nr) + , raft_base_train(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_base_extruder_nr")) + , raft_interface_train(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_interface_extruder_nr")) + , raft_surface_train(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_surface_extruder_nr")) + , support_infill_train(Application::getInstance().current_slice->scene.extruders[support_infill_extruder_nr]) + , support_roof_train(Application::getInstance().current_slice->scene.extruders[support_roof_extruder_nr]) + , support_bottom_train(Application::getInstance().current_slice->scene.extruders[support_bottom_extruder_nr]) + , line_width_factor_per_extruder(PathConfigStorage::getLineWidthFactorPerExtruder(layer_nr)) + , raft_base_config( + PrintFeatureType::SupportInterface, + raft_base_train.settings.get("raft_base_line_width"), + raft_base_train.settings.get("raft_base_thickness"), + Ratio(1.0), + SpeedDerivatives{ raft_base_train.settings.get("raft_base_speed"), + raft_base_train.settings.get("raft_base_acceleration"), + raft_base_train.settings.get("raft_base_jerk") }) + , raft_interface_config( + PrintFeatureType::Support, + raft_interface_train.settings.get("raft_interface_line_width"), + raft_interface_train.settings.get("raft_interface_thickness"), + Ratio(1.0), + SpeedDerivatives{ raft_interface_train.settings.get("raft_interface_speed"), + raft_interface_train.settings.get("raft_interface_acceleration"), + raft_interface_train.settings.get("raft_interface_jerk") }) + , raft_surface_config( + PrintFeatureType::SupportInterface, + raft_surface_train.settings.get("raft_surface_line_width"), + raft_surface_train.settings.get("raft_surface_thickness"), + Ratio(1.0), + SpeedDerivatives{ raft_surface_train.settings.get("raft_surface_speed"), + raft_surface_train.settings.get("raft_surface_acceleration"), + raft_surface_train.settings.get("raft_surface_jerk") }) + , support_roof_config( + PrintFeatureType::SupportInterface, + support_roof_train.settings.get("support_roof_line_width") * line_width_factor_per_extruder[support_roof_extruder_nr], + layer_thickness, + support_roof_train.settings.get("support_roof_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ support_roof_train.settings.get("speed_support_roof"), + support_roof_train.settings.get("acceleration_support_roof"), + support_roof_train.settings.get("jerk_support_roof") }) + , support_bottom_config( + PrintFeatureType::SupportInterface, + support_bottom_train.settings.get("support_bottom_line_width") * line_width_factor_per_extruder[support_bottom_extruder_nr], + layer_thickness, + support_roof_train.settings.get("support_bottom_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ support_bottom_train.settings.get("speed_support_bottom"), + support_bottom_train.settings.get("acceleration_support_bottom"), + support_bottom_train.settings.get("jerk_support_bottom") }) { const size_t extruder_count = Application::getInstance().current_slice->scene.extruders.size(); travel_config_per_extruder.reserve(extruder_count); @@ -185,28 +197,32 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye { const ExtruderTrain& train = Application::getInstance().current_slice->scene.extruders[extruder_nr]; travel_config_per_extruder.emplace_back( - PrintFeatureType::MoveCombing - , 0 - , 0 - , 0.0 - , SpeedDerivatives{train.settings.get("speed_travel"), train.settings.get("acceleration_travel"), train.settings.get("jerk_travel")} - ); + PrintFeatureType::MoveCombing, + 0, + 0, + 0.0, + SpeedDerivatives{ train.settings.get("speed_travel"), train.settings.get("acceleration_travel"), train.settings.get("jerk_travel") }); skirt_brim_config_per_extruder.emplace_back( - PrintFeatureType::SkirtBrim - , train.settings.get("skirt_brim_line_width") - * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]) // cause it's also used for the draft/ooze shield - , layer_thickness - , train.settings.get("skirt_brim_material_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{train.settings.get("skirt_brim_speed"), train.settings.get("acceleration_skirt_brim"), train.settings.get("jerk_skirt_brim")} - ); + PrintFeatureType::SkirtBrim, + train.settings.get("skirt_brim_line_width") + * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) + ? 1.0_r + : line_width_factor_per_extruder[extruder_nr]) // cause it's also used for the draft/ooze shield + , + layer_thickness, + train.settings.get("skirt_brim_material_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ train.settings.get("skirt_brim_speed"), + train.settings.get("acceleration_skirt_brim"), + train.settings.get("jerk_skirt_brim") }); prime_tower_config_per_extruder.emplace_back( - PrintFeatureType::PrimeTower - , train.settings.get("prime_tower_line_width") - * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]) - , layer_thickness - , train.settings.get("prime_tower_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)) - , SpeedDerivatives{train.settings.get("speed_prime_tower"), train.settings.get("acceleration_prime_tower"), train.settings.get("jerk_prime_tower")} - ); + PrintFeatureType::PrimeTower, + train.settings.get("prime_tower_line_width") + * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]), + layer_thickness, + train.settings.get("prime_tower_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), + SpeedDerivatives{ train.settings.get("speed_prime_tower"), + train.settings.get("acceleration_prime_tower"), + train.settings.get("jerk_prime_tower") }); } mesh_configs.reserve(storage.meshes.size()); @@ -216,16 +232,19 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye } support_infill_config.reserve(MAX_INFILL_COMBINE); - const float support_infill_line_width_factor = (mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[support_infill_extruder_nr]; + const float support_infill_line_width_factor + = (mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[support_infill_extruder_nr]; for (int combine_idx = 0; combine_idx < MAX_INFILL_COMBINE; combine_idx++) { support_infill_config.emplace_back( - PrintFeatureType::Support - , support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor - , layer_thickness - , support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1) - , SpeedDerivatives{support_infill_train.settings.get("speed_support_infill"), support_infill_train.settings.get("acceleration_support_infill"), support_infill_train.settings.get("jerk_support_infill")} - ); + PrintFeatureType::Support, + support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor, + layer_thickness, + support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) + * (combine_idx + 1), + SpeedDerivatives{ support_infill_train.settings.get("speed_support_infill"), + support_infill_train.settings.get("acceleration_support_infill"), + support_infill_train.settings.get("jerk_support_infill") }); } const size_t initial_speedup_layer_count = mesh_group_settings.get("speed_slowdown_layers"); @@ -237,13 +256,13 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye void PathConfigStorage::MeshPathConfigs::smoothAllSpeeds(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer) { - inset0_config.smoothSpeed( first_layer_config, layer_nr, max_speed_layer); - insetX_config.smoothSpeed( first_layer_config, layer_nr, max_speed_layer); - skin_config.smoothSpeed( first_layer_config, layer_nr, max_speed_layer); - ironing_config.smoothSpeed( first_layer_config, layer_nr, max_speed_layer); + inset0_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + insetX_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + skin_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + ironing_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); for (size_t idx = 0; idx < MAX_INFILL_COMBINE; idx++) { - //Infill speed (per combine part per mesh). + // Infill speed (per combine part per mesh). infill_config[idx].smoothSpeed(first_layer_config, layer_nr, max_speed_layer); } } @@ -254,19 +273,17 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& global_first_layer_config_per_extruder.reserve(Application::getInstance().current_slice->scene.extruders.size()); for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders) { - global_first_layer_config_per_extruder.emplace_back( - SpeedDerivatives{ - extruder.settings.get("speed_print_layer_0") - , extruder.settings.get("acceleration_print_layer_0") - , extruder.settings.get("jerk_print_layer_0") - }); + global_first_layer_config_per_extruder.emplace_back(SpeedDerivatives{ extruder.settings.get("speed_print_layer_0"), + extruder.settings.get("acceleration_print_layer_0"), + extruder.settings.get("jerk_print_layer_0") }); } { // support if (layer_nr < static_cast(initial_speedup_layer_count)) { const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - const size_t extruder_nr_support_infill = mesh_group_settings.get((layer_nr <= 0) ? "support_extruder_nr_layer_0" : "support_infill_extruder_nr").extruder_nr; + const size_t extruder_nr_support_infill + = mesh_group_settings.get((layer_nr <= 0) ? "support_extruder_nr_layer_0" : "support_infill_extruder_nr").extruder_nr; SpeedDerivatives& first_layer_config_infill = global_first_layer_config_per_extruder[extruder_nr_support_infill]; for (unsigned int idx = 0; idx < MAX_INFILL_COMBINE; idx++) { @@ -286,11 +303,9 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& for (size_t extruder_nr = 0; extruder_nr < Application::getInstance().current_slice->scene.extruders.size(); extruder_nr++) { const ExtruderTrain& train = Application::getInstance().current_slice->scene.extruders[extruder_nr]; - SpeedDerivatives initial_layer_travel_speed_config{ - train.settings.get("speed_travel_layer_0") - , train.settings.get("acceleration_travel_layer_0") - , train.settings.get("jerk_travel_layer_0") - }; + SpeedDerivatives initial_layer_travel_speed_config{ train.settings.get("speed_travel_layer_0"), + train.settings.get("acceleration_travel_layer_0"), + train.settings.get("jerk_travel_layer_0") }; GCodePathConfig& travel = travel_config_per_extruder[extruder_nr]; travel.smoothSpeed(initial_layer_travel_speed_config, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); @@ -303,7 +318,6 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& GCodePathConfig& prime_tower = prime_tower_config_per_extruder[extruder_nr]; prime_tower.smoothSpeed(initial_layer_print_speed_config, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); } - } { // meshes @@ -311,11 +325,9 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& { const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; - SpeedDerivatives initial_layer_speed_config{ - mesh.settings.get("speed_print_layer_0") - , mesh.settings.get("acceleration_print_layer_0") - , mesh.settings.get("jerk_print_layer_0") - }; + SpeedDerivatives initial_layer_speed_config{ mesh.settings.get("speed_print_layer_0"), + mesh.settings.get("acceleration_print_layer_0"), + mesh.settings.get("jerk_print_layer_0") }; mesh_configs[mesh_idx].smoothAllSpeeds(initial_layer_speed_config, layer_nr, initial_speedup_layer_count); mesh_configs[mesh_idx].roofing_config.smoothSpeed(initial_layer_speed_config, layer_nr, initial_speedup_layer_count); @@ -323,4 +335,4 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& } } -}//namespace cura +} // namespace cura From edf782a8855b5751b99f99395cf7336ef1bffbf5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 16 Aug 2023 18:21:05 +0200 Subject: [PATCH 247/470] Refactor `MeshPathConfigs` related code for better readability This commit refactors the `MeshPathConfigs` related code for clarity and readability. It eliminates the `PathConfigStorage::` scope resolution from `MeshPathConfigs` usages and refactors the SpeedDerivatives struct initialization to use designated initialization. It also refactors the `handleInitialLayerSpeedup` function to use method `smoothSpeed` on `speed_derivatives` directly. This makes the code cleaner and easier to understand. Contribute to CURA-10446 --- CMakeLists.txt | 1 - include/FffGcodeWriter.h | 30 ++--- include/GCodePathConfig.h | 48 ++----- include/pathPlanning/SpeedDerivatives.h | 14 +- include/plugins/converters.h | 1 + include/settings/PathConfigStorage.h | 38 +++--- src/FffGcodeWriter.cpp | 30 ++--- src/GCodePathConfig.cpp | 43 ------ src/pathPlanning/SpeedDerivatives.cpp | 17 +-- src/settings/PathConfigStorage.cpp | 166 +++++++++++++----------- 10 files changed, 174 insertions(+), 214 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42a6ea97fd..6a100acaaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,6 @@ target_include_directories(_CuraEngine $ PRIVATE $ # Include Cura.pb.h - $ # Include generated plugin types ) target_compile_definitions(_CuraEngine diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 014e29f059..82e28c447c 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -1,5 +1,5 @@ // Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher. +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef GCODE_WRITER_H #define GCODE_WRITER_H @@ -309,7 +309,7 @@ class FffGcodeWriter : public NoCopy * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcodeLayer) const; + void addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcodeLayer) const; /*! * Add the open polylines from a single layer from a single mesh-volume to the layer plan \p gcodeLayer for mesh the surface modes. @@ -319,7 +319,7 @@ class FffGcodeWriter : public NoCopy * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ - void addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; + void addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; /*! * Add all features of a given extruder from a single layer from a single mesh-volume to the layer plan \p gcode_layer. @@ -332,7 +332,7 @@ class FffGcodeWriter : public NoCopy * \param mesh_config the line config with which to print a print feature * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; + void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; /*! * Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer. @@ -346,7 +346,7 @@ class FffGcodeWriter : public NoCopy * \param part The part to add * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshPartToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part, LayerPlan& gcode_layer) const; + void addMeshPartToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part, LayerPlan& gcode_layer) const; /*! * \brief Add infill for a given part in a layer plan. @@ -359,7 +359,7 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; /*! * \brief Add thicker (multiple layers) sparse infill for a given part in a @@ -373,7 +373,7 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processMultiLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processMultiLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; /*! * \brief Add normal sparse infill for a given part in a layer. @@ -385,7 +385,7 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processSingleLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processSingleLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; /*! * Generate the insets for the walls of a given layer part. @@ -397,7 +397,7 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processInsets(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processInsets(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; /*! * Generate the a spiralized wall for a given layer part. @@ -407,7 +407,7 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. */ - void processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) const; + void processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) const; /*! * Add the gcode of the top/bottom skin of the given part and of the perimeter gaps. @@ -420,7 +420,7 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processSkin(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processSkin(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; /*! * Add the gcode of the top/bottom skin of the given skin part and of the perimeter gaps. @@ -443,7 +443,7 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processSkinPart(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part) const; + bool processSkinPart(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SkinPart& skin_part) const; /*! * Add the roofing which is the area inside the innermost skin inset which has air 'directly' above @@ -456,7 +456,7 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \param[out] added_something Whether this function added anything to the layer plan */ - void processRoofing(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; + void processRoofing(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; /*! * Add the normal skinfill which is the area inside the innermost skin inset @@ -470,7 +470,7 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \param[out] added_something Whether this function added anything to the layer plan */ - void processTopBottom(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; + void processTopBottom(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; /*! * Process a dense skin feature like roofing or top/bottom @@ -491,7 +491,7 @@ class FffGcodeWriter : public NoCopy * \param[out] added_something Whether this function added anything to the layer plan * \param fan_speed fan speed override for this skin area */ - void processSkinPrintFeature(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, EFillMethod pattern, const AngleDegrees skin_angle, const coord_t skin_overlap, const Ratio skin_density, const bool monotonic, bool& added_something, double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; + void processSkinPrintFeature(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, EFillMethod pattern, const AngleDegrees skin_angle, const coord_t skin_overlap, const Ratio skin_density, const bool monotonic, bool& added_something, double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; /*! * see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to diff --git a/include/GCodePathConfig.h b/include/GCodePathConfig.h index be02d75053..9bf8002883 100644 --- a/include/GCodePathConfig.h +++ b/include/GCodePathConfig.h @@ -17,48 +17,18 @@ namespace cura /*! * The GCodePathConfig is the configuration for moves/extrusion actions. This defines at which width the line is printed and at which speed. */ -class GCodePathConfig +struct GCodePathConfig { -public: - const PrintFeatureType type; //!< name of the feature type + PrintFeatureType type {}; //!< name of the feature type + coord_t line_width {}; //!< width of the line extruded + coord_t layer_thickness {}; //!< current layer height in micron + Ratio flow {}; //!< extrusion flow modifier. + SpeedDerivatives speed_derivatives {}; //!< The speed settings (and acceleration and jerk) of the extruded line. May be changed when smoothSpeed is called. + bool is_bridge_path { false }; //!< whether current config is used when bridging + double fan_speed { FAN_SPEED_DEFAULT }; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise + double extrusion_mm3_per_mm { calculateExtrusion() }; //!< current mm^3 filament moved per mm line traversed static constexpr double FAN_SPEED_DEFAULT = -1; -private: - SpeedDerivatives speed_derivatives; //!< The speed settings (and acceleration and jerk) of the extruded line. May be changed when smoothSpeed is called. - const coord_t line_width; //!< width of the line extruded - const coord_t layer_thickness; //!< current layer height in micron - const Ratio flow; //!< extrusion flow modifier. - const double extrusion_mm3_per_mm; //!< current mm^3 filament moved per mm line traversed - const bool is_bridge_path; //!< whether current config is used when bridging - const double fan_speed; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise -public: - GCodePathConfig( - const PrintFeatureType& type, - const coord_t line_width, - const coord_t layer_height, - const Ratio& flow, - const SpeedDerivatives speed_derivatives, - const bool is_bridge_path = false, - const double fan_speed = FAN_SPEED_DEFAULT); - - /*! - * copy constructor - */ - GCodePathConfig(const GCodePathConfig& other); - - /*! - * Set the speed to somewhere between the speed of @p first_layer_config and the iconic speed. - * - * \warning This functions should not be called with @p layer_nr > @p max_speed_layer ! - * - * \warning Calling this function twice will smooth the speed more toward \p first_layer_config - * - * \param first_layer_config The speed settings at layer zero - * \param layer_nr The layer number - * \param max_speed_layer The layer number for which the speed_iconic should be used. - */ - void smoothSpeed(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer); - /*! * Can only be called after the layer height has been set (which is done while writing the gcode!) */ diff --git a/include/pathPlanning/SpeedDerivatives.h b/include/pathPlanning/SpeedDerivatives.h index 47c6cab0a6..f22afc795b 100644 --- a/include/pathPlanning/SpeedDerivatives.h +++ b/include/pathPlanning/SpeedDerivatives.h @@ -16,7 +16,19 @@ struct SpeedDerivatives Acceleration acceleration{}; //!< acceleration of head movement (mm/s^2) Velocity jerk{}; //!< jerk of the head movement (around stand still) as instantaneous speed change (mm/s) - constexpr void smoothSpeed(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer_nr); + + /*! + * Set the speed to somewhere between the speed of @p first_layer_config and the iconic speed. + * + * \warning This functions should not be called with @p layer_nr > @p max_speed_layer ! + * + * \warning Calling this function twice will smooth the speed more toward \p first_layer_config + * + * \param first_layer_config The speed settings at layer zero + * \param layer_nr The layer number + * \param max_speed_layer The layer number for which the speed_iconic should be used. + */ + void smoothSpeed(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer_nr); }; } // namespace cura diff --git a/include/plugins/converters.h b/include/plugins/converters.h index f25f6ea1ce..6219cbe502 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -24,6 +24,7 @@ #include "settings/Settings.h" #include "settings/types/LayerIndex.h" #include "utils/polygon.h" +#include "pathPlanning/SpeedDerivatives.h" #include #include diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index b57fa0e8c7..ea44eba320 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -18,6 +18,25 @@ class ExtruderTrain; class SliceDataStorage; class SliceMeshStorage; +class MeshPathConfigs +{ +public: + GCodePathConfig inset0_config; + GCodePathConfig insetX_config; + GCodePathConfig bridge_inset0_config; + GCodePathConfig bridge_insetX_config; + GCodePathConfig skin_config; + GCodePathConfig bridge_skin_config; // used for first bridge layer + GCodePathConfig bridge_skin_config2; // used for second bridge layer + GCodePathConfig bridge_skin_config3; // used for third bridge layer + GCodePathConfig roofing_config; + std::vector infill_config; + GCodePathConfig ironing_config; + + MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder); + void smoothAllSpeeds(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer); +}; + /*! * A class to represent all configurations for all features types of printed lines in a meshgroup. */ @@ -38,24 +57,7 @@ class PathConfigStorage static std::vector getLineWidthFactorPerExtruder(const LayerIndex& layer_nr); public: - class MeshPathConfigs - { - public: - GCodePathConfig inset0_config; - GCodePathConfig insetX_config; - GCodePathConfig bridge_inset0_config; - GCodePathConfig bridge_insetX_config; - GCodePathConfig skin_config; - GCodePathConfig bridge_skin_config; // used for first bridge layer - GCodePathConfig bridge_skin_config2; // used for second bridge layer - GCodePathConfig bridge_skin_config3; // used for third bridge layer - GCodePathConfig roofing_config; - std::vector infill_config; - GCodePathConfig ironing_config; - - MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder); - void smoothAllSpeeds(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer); - }; + GCodePathConfig raft_base_config; GCodePathConfig raft_interface_config; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 94e28c504d..a9835f852e 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1022,7 +1022,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn for (size_t mesh_idx : mesh_order) { const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; - const PathConfigStorage::MeshPathConfigs& mesh_config = gcode_layer.configs_storage.mesh_configs[mesh_idx]; + const MeshPathConfigs& mesh_config = gcode_layer.configs_storage.mesh_configs[mesh_idx]; if (mesh.settings.get("magic_mesh_surface_mode") == ESurfaceMode::SURFACE && extruder_nr == mesh.settings.get("wall_0_extruder_nr").extruder_nr // mesh surface mode should always only be printed with the outer wall extruder! @@ -1407,7 +1407,7 @@ std::vector FffGcodeWriter::calculateMeshOrder(const SliceDataStorage& s void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode( const SliceDataStorage& storage, const SliceMeshStorage& mesh, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const { if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer) @@ -1442,7 +1442,7 @@ void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode( addMeshOpenPolyLinesToGCode(mesh, mesh_config, gcode_layer); } -void FffGcodeWriter::addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const +void FffGcodeWriter::addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const { const SliceLayer* layer = &mesh.layers[gcode_layer.getLayerNr()]; @@ -1453,7 +1453,7 @@ void FffGcodeWriter::addMeshLayerToGCode( const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const { if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer) @@ -1511,7 +1511,7 @@ void FffGcodeWriter::addMeshPartToGCode( const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part, LayerPlan& gcode_layer) const { @@ -1553,7 +1553,7 @@ bool FffGcodeWriter::processInfill( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const { if (extruder_nr != mesh.settings.get("infill_extruder_nr").extruder_nr) @@ -1570,7 +1570,7 @@ bool FffGcodeWriter::processMultiLayerInfill( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const { if (extruder_nr != mesh.settings.get("infill_extruder_nr").extruder_nr) @@ -1707,7 +1707,7 @@ bool FffGcodeWriter::processSingleLayerInfill( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const { if (extruder_nr != mesh.settings.get("infill_extruder_nr").extruder_nr) @@ -2171,7 +2171,7 @@ bool FffGcodeWriter::partitionInfillBySkinAbove( void FffGcodeWriter::processSpiralizedWall( const SliceDataStorage& storage, LayerPlan& gcode_layer, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) const { @@ -2209,7 +2209,7 @@ bool FffGcodeWriter::processInsets( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const { bool added_something = false; @@ -2454,7 +2454,7 @@ bool FffGcodeWriter::processSkin( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const { const size_t top_bottom_extruder_nr = mesh.settings.get("top_bottom_extruder_nr").extruder_nr; @@ -2489,7 +2489,7 @@ bool FffGcodeWriter::processSkinPart( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SkinPart& skin_part) const { bool added_something = false; @@ -2508,7 +2508,7 @@ void FffGcodeWriter::processRoofing( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const { @@ -2549,7 +2549,7 @@ void FffGcodeWriter::processTopBottom( LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const { @@ -2730,7 +2730,7 @@ void FffGcodeWriter::processSkinPrintFeature( const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, - const PathConfigStorage::MeshPathConfigs& mesh_config, + const MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, diff --git a/src/GCodePathConfig.cpp b/src/GCodePathConfig.cpp index 0b2ff5a972..a2479d0a65 100644 --- a/src/GCodePathConfig.cpp +++ b/src/GCodePathConfig.cpp @@ -9,49 +9,6 @@ namespace cura { -GCodePathConfig::GCodePathConfig(const GCodePathConfig& other) - : type(other.type) - , speed_derivatives(other.speed_derivatives) - , line_width(other.line_width) - , layer_thickness(other.layer_thickness) - , flow(other.flow) - , extrusion_mm3_per_mm(other.extrusion_mm3_per_mm) - , is_bridge_path(other.is_bridge_path) - , fan_speed(other.fan_speed) -{ -} - - -GCodePathConfig::GCodePathConfig( - const PrintFeatureType& type, - const coord_t line_width, - const coord_t layer_height, - const Ratio& flow, - const SpeedDerivatives speed_derivatives, - const bool is_bridge_path, - const double fan_speed) - : type(type) - , speed_derivatives(speed_derivatives) - , line_width(line_width) - , layer_thickness(layer_height) - , flow(flow) - , extrusion_mm3_per_mm(calculateExtrusion()) - , is_bridge_path(is_bridge_path) - , fan_speed(fan_speed) -{ -} - -void GCodePathConfig::smoothSpeed(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer_nr) -{ - double max_speed_layer = max_speed_layer_nr; - double first_layer_speed = std::min(speed_derivatives.speed, first_layer_config.speed); - double first_layer_acceleration = std::min(speed_derivatives.acceleration, first_layer_config.acceleration); - double first_layer_jerk = std::min(speed_derivatives.jerk, first_layer_config.jerk); - speed_derivatives.speed = (speed_derivatives.speed * layer_nr) / max_speed_layer + (first_layer_speed * (max_speed_layer - layer_nr) / max_speed_layer); - speed_derivatives.acceleration = (speed_derivatives.acceleration * layer_nr) / max_speed_layer + (first_layer_acceleration * (max_speed_layer - layer_nr) / max_speed_layer); - speed_derivatives.jerk = (speed_derivatives.jerk * layer_nr) / max_speed_layer + (first_layer_jerk * (max_speed_layer - layer_nr) / max_speed_layer); -} - double GCodePathConfig::getExtrusionMM3perMM() const { return extrusion_mm3_per_mm; diff --git a/src/pathPlanning/SpeedDerivatives.cpp b/src/pathPlanning/SpeedDerivatives.cpp index 0b623c8766..9011f951a3 100644 --- a/src/pathPlanning/SpeedDerivatives.cpp +++ b/src/pathPlanning/SpeedDerivatives.cpp @@ -6,15 +6,16 @@ namespace cura { -constexpr void SpeedDerivatives::smoothSpeed(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer_nr) +void SpeedDerivatives::smoothSpeed(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer_nr) { - double max_speed_layer = max_speed_layer_nr; - double first_layer_speed = std::min(speed, first_layer_config.speed); - double first_layer_acceleration = std::min(acceleration, first_layer_config.acceleration); - double first_layer_jerk = std::min(jerk, first_layer_config.jerk); - speed = (speed * layer_nr) / max_speed_layer + (first_layer_speed * (max_speed_layer - layer_nr) / max_speed_layer); - acceleration = (acceleration * layer_nr) / max_speed_layer + (first_layer_acceleration * (max_speed_layer - layer_nr) / max_speed_layer); - jerk = (jerk * layer_nr) / max_speed_layer + (first_layer_jerk * (max_speed_layer - layer_nr) / max_speed_layer); + const auto max_speed_layer = static_cast(max_speed_layer_nr); + const auto first_layer_speed = std::min(speed, first_layer_config.speed); + const auto first_layer_acceleration = std::min(acceleration, first_layer_config.acceleration); + const auto first_layer_jerk = std::min(jerk, first_layer_config.jerk); + speed = (speed * static_cast(layer_nr)) / max_speed_layer + (first_layer_speed * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); + acceleration = (acceleration * static_cast(layer_nr)) / max_speed_layer + (first_layer_acceleration * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); + jerk = (jerk * static_cast(layer_nr)) / max_speed_layer + (first_layer_jerk * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); + } } // namespace cura \ No newline at end of file diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 5a190f308c..fbf3ef818e 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -6,7 +6,6 @@ #include "Application.h" #include "ExtruderTrain.h" #include "Slice.h" -#include "pathPlanning/SpeedDerivatives.h" #include "raft.h" #include "settings/EnumSettings.h" //For EPlatformAdhesion. #include "settings/Settings.h" // MAX_INFILL_COMBINE @@ -33,7 +32,7 @@ std::vector PathConfigStorage::getLineWidthFactorPerExtruder(const LayerI return ret; } -PathConfigStorage::MeshPathConfigs::MeshPathConfigs( +MeshPathConfigs::MeshPathConfigs( const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, @@ -43,19 +42,25 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("wall_0_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ mesh.settings.get("speed_wall_0"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0") }) + SpeedDerivatives{ .speed = mesh.settings.get("speed_wall_0"), + .acceleration = mesh.settings.get("acceleration_wall_0"), + .jerk = mesh.settings.get("jerk_wall_0") }) , insetX_config( PrintFeatureType::InnerWall, mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("wall_x_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ mesh.settings.get("speed_wall_x"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x") }) + SpeedDerivatives{ .speed = mesh.settings.get("speed_wall_x"), + .acceleration = mesh.settings.get("acceleration_wall_x"), + .jerk = mesh.settings.get("jerk_wall_x") }) , bridge_inset0_config( PrintFeatureType::OuterWall, mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("bridge_wall_material_flow"), - SpeedDerivatives{ mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_0"), mesh.settings.get("jerk_wall_0") }, + SpeedDerivatives{ .speed = mesh.settings.get("bridge_wall_speed"), + .acceleration = mesh.settings.get("acceleration_wall_0"), + .jerk = mesh.settings.get("jerk_wall_0") }, true // is_bridge_path , mesh.settings.get("bridge_fan_speed") * 100.0) @@ -64,7 +69,9 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("bridge_wall_material_flow"), - SpeedDerivatives{ mesh.settings.get("bridge_wall_speed"), mesh.settings.get("acceleration_wall_x"), mesh.settings.get("jerk_wall_x") }, + SpeedDerivatives{ .speed = mesh.settings.get("bridge_wall_speed"), + .acceleration = mesh.settings.get("acceleration_wall_x"), + .jerk = mesh.settings.get("jerk_wall_x") }, true // is_bridge_path , mesh.settings.get("bridge_fan_speed") * 100.0) @@ -73,17 +80,17 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("skin_material_flow") * ((layer_nr == 0) ? mesh.settings.get("skin_material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ mesh.settings.get("speed_topbottom"), - mesh.settings.get("acceleration_topbottom"), - mesh.settings.get("jerk_topbottom") }) + SpeedDerivatives{ .speed = mesh.settings.get("speed_topbottom"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }) , bridge_skin_config( // use bridge skin flow, speed and fan PrintFeatureType::Skin, mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("bridge_skin_material_flow"), - SpeedDerivatives{ mesh.settings.get("bridge_skin_speed"), - mesh.settings.get("acceleration_topbottom"), - mesh.settings.get("jerk_topbottom") }, + SpeedDerivatives{ .speed = mesh.settings.get("bridge_skin_speed"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }, true // is_bridge_path , mesh.settings.get("bridge_fan_speed") * 100.0) @@ -92,9 +99,9 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("bridge_skin_material_flow_2"), - SpeedDerivatives{ mesh.settings.get("bridge_skin_speed_2"), - mesh.settings.get("acceleration_topbottom"), - mesh.settings.get("jerk_topbottom") }, + SpeedDerivatives{ .speed = mesh.settings.get("bridge_skin_speed_2"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }, true // is_bridge_path , mesh.settings.get("bridge_fan_speed_2") * 100.0) @@ -103,9 +110,9 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("bridge_skin_material_flow_3"), - SpeedDerivatives{ mesh.settings.get("bridge_skin_speed_3"), - mesh.settings.get("acceleration_topbottom"), - mesh.settings.get("jerk_topbottom") }, + SpeedDerivatives{ .speed = mesh.settings.get("bridge_skin_speed_3"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }, true // is_bridge_path , mesh.settings.get("bridge_fan_speed_3") * 100.0) @@ -114,13 +121,17 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("roofing_line_width"), layer_thickness, mesh.settings.get("roofing_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ mesh.settings.get("speed_roofing"), mesh.settings.get("acceleration_roofing"), mesh.settings.get("jerk_roofing") }) + SpeedDerivatives{ .speed = mesh.settings.get("speed_roofing"), + .acceleration = mesh.settings.get("acceleration_roofing"), + .jerk = mesh.settings.get("jerk_roofing") }) , ironing_config( PrintFeatureType::Skin, mesh.settings.get("ironing_line_spacing"), layer_thickness, mesh.settings.get("ironing_flow"), - SpeedDerivatives{ mesh.settings.get("speed_ironing"), mesh.settings.get("acceleration_ironing"), mesh.settings.get("jerk_ironing") }) + SpeedDerivatives{ .speed = mesh.settings.get("speed_ironing"), + .acceleration = mesh.settings.get("acceleration_ironing"), + .jerk = mesh.settings.get("jerk_ironing") }) { infill_config.reserve(MAX_INFILL_COMBINE); @@ -132,7 +143,9 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs( mesh.settings.get("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get("infill_extruder_nr").extruder_nr], layer_thickness, mesh.settings.get("infill_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), - SpeedDerivatives{ mesh.settings.get("speed_infill"), mesh.settings.get("acceleration_infill"), mesh.settings.get("jerk_infill") }); + SpeedDerivatives{ .speed = mesh.settings.get("speed_infill"), + .acceleration = mesh.settings.get("acceleration_infill"), + .jerk = mesh.settings.get("jerk_infill") }); } } @@ -152,41 +165,41 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye raft_base_train.settings.get("raft_base_line_width"), raft_base_train.settings.get("raft_base_thickness"), Ratio(1.0), - SpeedDerivatives{ raft_base_train.settings.get("raft_base_speed"), - raft_base_train.settings.get("raft_base_acceleration"), - raft_base_train.settings.get("raft_base_jerk") }) + SpeedDerivatives{ .speed = raft_base_train.settings.get("raft_base_speed"), + .acceleration = raft_base_train.settings.get("raft_base_acceleration"), + .jerk = raft_base_train.settings.get("raft_base_jerk") }) , raft_interface_config( PrintFeatureType::Support, raft_interface_train.settings.get("raft_interface_line_width"), raft_interface_train.settings.get("raft_interface_thickness"), Ratio(1.0), - SpeedDerivatives{ raft_interface_train.settings.get("raft_interface_speed"), - raft_interface_train.settings.get("raft_interface_acceleration"), - raft_interface_train.settings.get("raft_interface_jerk") }) + SpeedDerivatives{ .speed = raft_interface_train.settings.get("raft_interface_speed"), + .acceleration = raft_interface_train.settings.get("raft_interface_acceleration"), + .jerk = raft_interface_train.settings.get("raft_interface_jerk") }) , raft_surface_config( PrintFeatureType::SupportInterface, raft_surface_train.settings.get("raft_surface_line_width"), raft_surface_train.settings.get("raft_surface_thickness"), Ratio(1.0), - SpeedDerivatives{ raft_surface_train.settings.get("raft_surface_speed"), - raft_surface_train.settings.get("raft_surface_acceleration"), - raft_surface_train.settings.get("raft_surface_jerk") }) + SpeedDerivatives{ .speed = raft_surface_train.settings.get("raft_surface_speed"), + .acceleration = raft_surface_train.settings.get("raft_surface_acceleration"), + .jerk = raft_surface_train.settings.get("raft_surface_jerk") }) , support_roof_config( PrintFeatureType::SupportInterface, support_roof_train.settings.get("support_roof_line_width") * line_width_factor_per_extruder[support_roof_extruder_nr], layer_thickness, support_roof_train.settings.get("support_roof_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ support_roof_train.settings.get("speed_support_roof"), - support_roof_train.settings.get("acceleration_support_roof"), - support_roof_train.settings.get("jerk_support_roof") }) + SpeedDerivatives{ .speed = support_roof_train.settings.get("speed_support_roof"), + .acceleration = support_roof_train.settings.get("acceleration_support_roof"), + .jerk = support_roof_train.settings.get("jerk_support_roof") }) , support_bottom_config( PrintFeatureType::SupportInterface, support_bottom_train.settings.get("support_bottom_line_width") * line_width_factor_per_extruder[support_bottom_extruder_nr], layer_thickness, support_roof_train.settings.get("support_bottom_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ support_bottom_train.settings.get("speed_support_bottom"), - support_bottom_train.settings.get("acceleration_support_bottom"), - support_bottom_train.settings.get("jerk_support_bottom") }) + SpeedDerivatives{ .speed = support_bottom_train.settings.get("speed_support_bottom"), + .acceleration = support_bottom_train.settings.get("acceleration_support_bottom"), + .jerk = support_bottom_train.settings.get("jerk_support_bottom") }) { const size_t extruder_count = Application::getInstance().current_slice->scene.extruders.size(); travel_config_per_extruder.reserve(extruder_count); @@ -201,7 +214,9 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye 0, 0, 0.0, - SpeedDerivatives{ train.settings.get("speed_travel"), train.settings.get("acceleration_travel"), train.settings.get("jerk_travel") }); + SpeedDerivatives{ .speed = train.settings.get("speed_travel"), + .acceleration = train.settings.get("acceleration_travel"), + .jerk = train.settings.get("jerk_travel") }); skirt_brim_config_per_extruder.emplace_back( PrintFeatureType::SkirtBrim, train.settings.get("skirt_brim_line_width") @@ -211,18 +226,18 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye , layer_thickness, train.settings.get("skirt_brim_material_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ train.settings.get("skirt_brim_speed"), - train.settings.get("acceleration_skirt_brim"), - train.settings.get("jerk_skirt_brim") }); + SpeedDerivatives{ .speed = train.settings.get("skirt_brim_speed"), + .acceleration = train.settings.get("acceleration_skirt_brim"), + .jerk = train.settings.get("jerk_skirt_brim") }); prime_tower_config_per_extruder.emplace_back( PrintFeatureType::PrimeTower, train.settings.get("prime_tower_line_width") * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]), layer_thickness, train.settings.get("prime_tower_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ train.settings.get("speed_prime_tower"), - train.settings.get("acceleration_prime_tower"), - train.settings.get("jerk_prime_tower") }); + SpeedDerivatives{ .speed = train.settings.get("speed_prime_tower"), + .acceleration = train.settings.get("acceleration_prime_tower"), + .jerk = train.settings.get("jerk_prime_tower") }); } mesh_configs.reserve(storage.meshes.size()); @@ -242,9 +257,9 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye layer_thickness, support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), - SpeedDerivatives{ support_infill_train.settings.get("speed_support_infill"), - support_infill_train.settings.get("acceleration_support_infill"), - support_infill_train.settings.get("jerk_support_infill") }); + SpeedDerivatives{ .speed = support_infill_train.settings.get("speed_support_infill"), + .acceleration = support_infill_train.settings.get("acceleration_support_infill"), + .jerk = support_infill_train.settings.get("jerk_support_infill") }); } const size_t initial_speedup_layer_count = mesh_group_settings.get("speed_slowdown_layers"); @@ -254,28 +269,28 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye } } -void PathConfigStorage::MeshPathConfigs::smoothAllSpeeds(SpeedDerivatives first_layer_config, const LayerIndex& layer_nr, const LayerIndex& max_speed_layer) +void MeshPathConfigs::smoothAllSpeeds(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer) { - inset0_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); - insetX_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); - skin_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); - ironing_config.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + inset0_config.speed_derivatives.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + insetX_config.speed_derivatives.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + skin_config.speed_derivatives.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + ironing_config.speed_derivatives.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); for (size_t idx = 0; idx < MAX_INFILL_COMBINE; idx++) { // Infill speed (per combine part per mesh). - infill_config[idx].smoothSpeed(first_layer_config, layer_nr, max_speed_layer); + infill_config[idx].speed_derivatives.smoothSpeed(first_layer_config, layer_nr, max_speed_layer); } } -void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& storage, const LayerIndex& layer_nr, const size_t initial_speedup_layer_count) +void PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& storage, const LayerIndex& layer_nr, const size_t initial_speedup_layer_count) { std::vector global_first_layer_config_per_extruder; global_first_layer_config_per_extruder.reserve(Application::getInstance().current_slice->scene.extruders.size()); for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders) { - global_first_layer_config_per_extruder.emplace_back(SpeedDerivatives{ extruder.settings.get("speed_print_layer_0"), - extruder.settings.get("acceleration_print_layer_0"), - extruder.settings.get("jerk_print_layer_0") }); + global_first_layer_config_per_extruder.emplace_back(SpeedDerivatives{ .speed = extruder.settings.get("speed_print_layer_0"), + .acceleration = extruder.settings.get("acceleration_print_layer_0"), + .jerk = extruder.settings.get("jerk_print_layer_0") }); } { // support @@ -284,18 +299,23 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; const size_t extruder_nr_support_infill = mesh_group_settings.get((layer_nr <= 0) ? "support_extruder_nr_layer_0" : "support_infill_extruder_nr").extruder_nr; - SpeedDerivatives& first_layer_config_infill = global_first_layer_config_per_extruder[extruder_nr_support_infill]; for (unsigned int idx = 0; idx < MAX_INFILL_COMBINE; idx++) { - support_infill_config[idx].smoothSpeed(first_layer_config_infill, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); + support_infill_config[idx].speed_derivatives.smoothSpeed( + global_first_layer_config_per_extruder[extruder_nr_support_infill], + std::max(LayerIndex(0), layer_nr), + initial_speedup_layer_count); } - const size_t extruder_nr_support_roof = mesh_group_settings.get("support_roof_extruder_nr").extruder_nr; - SpeedDerivatives& first_layer_config_roof = global_first_layer_config_per_extruder[extruder_nr_support_roof]; - support_roof_config.smoothSpeed(first_layer_config_roof, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); + support_roof_config.speed_derivatives.smoothSpeed( + global_first_layer_config_per_extruder[extruder_nr_support_roof], + std::max(LayerIndex(0), layer_nr), + initial_speedup_layer_count); const size_t extruder_nr_support_bottom = mesh_group_settings.get("support_bottom_extruder_nr").extruder_nr; - SpeedDerivatives& first_layer_config_bottom = global_first_layer_config_per_extruder[extruder_nr_support_bottom]; - support_bottom_config.smoothSpeed(first_layer_config_bottom, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); + support_bottom_config.speed_derivatives.smoothSpeed( + global_first_layer_config_per_extruder[extruder_nr_support_bottom], + std::max(LayerIndex(0), layer_nr), + initial_speedup_layer_count); } } @@ -303,20 +323,18 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& for (size_t extruder_nr = 0; extruder_nr < Application::getInstance().current_slice->scene.extruders.size(); extruder_nr++) { const ExtruderTrain& train = Application::getInstance().current_slice->scene.extruders[extruder_nr]; - SpeedDerivatives initial_layer_travel_speed_config{ train.settings.get("speed_travel_layer_0"), - train.settings.get("acceleration_travel_layer_0"), - train.settings.get("jerk_travel_layer_0") }; + const SpeedDerivatives initial_layer_travel_speed_config{ .speed = train.settings.get("speed_travel_layer_0"), + .acceleration = train.settings.get("acceleration_travel_layer_0"), + .jerk = train.settings.get("jerk_travel_layer_0") }; GCodePathConfig& travel = travel_config_per_extruder[extruder_nr]; - travel.smoothSpeed(initial_layer_travel_speed_config, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); + travel.speed_derivatives.smoothSpeed(initial_layer_travel_speed_config, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); // don't smooth speed for the skirt/brim! // NOTE: not smoothing skirt/brim means the speeds are also not smoothed for the draft/ooze shield - const SpeedDerivatives& initial_layer_print_speed_config = global_first_layer_config_per_extruder[extruder_nr]; - GCodePathConfig& prime_tower = prime_tower_config_per_extruder[extruder_nr]; - prime_tower.smoothSpeed(initial_layer_print_speed_config, std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); + prime_tower.speed_derivatives.smoothSpeed(global_first_layer_config_per_extruder[extruder_nr], std::max(LayerIndex(0), layer_nr), initial_speedup_layer_count); } } @@ -325,12 +343,12 @@ void cura::PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& { const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; - SpeedDerivatives initial_layer_speed_config{ mesh.settings.get("speed_print_layer_0"), - mesh.settings.get("acceleration_print_layer_0"), - mesh.settings.get("jerk_print_layer_0") }; + const SpeedDerivatives initial_layer_speed_config{ .speed = mesh.settings.get("speed_print_layer_0"), + .acceleration = mesh.settings.get("acceleration_print_layer_0"), + .jerk = mesh.settings.get("jerk_print_layer_0") }; mesh_configs[mesh_idx].smoothAllSpeeds(initial_layer_speed_config, layer_nr, initial_speedup_layer_count); - mesh_configs[mesh_idx].roofing_config.smoothSpeed(initial_layer_speed_config, layer_nr, initial_speedup_layer_count); + mesh_configs[mesh_idx].roofing_config.speed_derivatives.smoothSpeed(initial_layer_speed_config, layer_nr, initial_speedup_layer_count); } } } From d82063fd0c266c73397e1d1d777573be142321a1 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Wed, 16 Aug 2023 16:22:04 +0000 Subject: [PATCH 248/470] Applied clang-format. --- include/FffGcodeWriter.h | 219 ++++++++++++++++++-------- include/GCodePathConfig.h | 16 +- include/plugins/converters.h | 2 +- include/settings/PathConfigStorage.h | 2 - src/FffGcodeWriter.cpp | 7 +- src/pathPlanning/SpeedDerivatives.cpp | 4 +- src/settings/PathConfigStorage.cpp | 6 +- 7 files changed, 163 insertions(+), 93 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 82e28c447c..1c67fea697 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -4,17 +4,17 @@ #ifndef GCODE_WRITER_H #define GCODE_WRITER_H -#include -#include - #include "FanSpeedLayerTime.h" -#include "gcodeExport.h" #include "LayerPlanBuffer.h" +#include "gcodeExport.h" #include "settings/PathConfigStorage.h" //For the MeshPathConfigs subclass. #include "utils/ExtrusionLine.h" //Processing variable-width paths. #include "utils/NoCopy.h" -namespace cura +#include +#include + +namespace cura { class AngleDegrees; @@ -28,28 +28,28 @@ class TimeKeeper; /*! * Secondary stage in Fused Filament Fabrication processing: The generated polygons are used in the gcode generation. - * Some polygons in the SliceDataStorage signify areas which are to be filled with parallel lines, + * Some polygons in the SliceDataStorage signify areas which are to be filled with parallel lines, * while other polygons signify the contours which should be printed. - * + * * The main function of this class is FffGcodeWriter::writeGCode(). */ class FffGcodeWriter : public NoCopy { - friend class FffProcessor; //Because FffProcessor exposes finalize (TODO) + friend class FffProcessor; // Because FffProcessor exposes finalize (TODO) private: coord_t max_object_height; //!< The maximal height of all previously sliced meshgroups, used to avoid collision when moving to the next meshgroup to print. /* * Buffer for all layer plans (of type LayerPlan) - * + * * The layer plans are buffered so that we can start heating up a nozzle several layers before it needs to be used. * Another reason is to perform Auto Temperature. */ - LayerPlanBuffer layer_plan_buffer; + LayerPlanBuffer layer_plan_buffer; /*! * The class holding the current state of the gcode being written. - * + * * It holds information such as the last written position etc. */ GCodeExport gcode; @@ -104,18 +104,18 @@ class FffGcodeWriter : public NoCopy /*! * Set the target to write gcode to: an output stream. - * + * * Used when CuraEngine is NOT used as command line tool. - * + * * \param stream The stream to write gcode to. */ void setTargetStream(std::ostream* stream); /*! * Get the total extruded volume for a specific extruder in mm^3 - * + * * Retractions and unretractions don't contribute to this. - * + * * \param extruder_nr The extruder number for which to get the total netto extruded volume * \return total filament printed in mm^3 */ @@ -123,7 +123,7 @@ class FffGcodeWriter : public NoCopy /*! * Get the total estimated print time in seconds for each feature - * + * * \return total print time in seconds for each feature */ std::vector getTotalPrintTimePerFeature(); @@ -131,7 +131,7 @@ class FffGcodeWriter : public NoCopy /*! * Write all the gcode for the current meshgroup. * This is the primary function of this class. - * + * * \param[in] storage The data storage from which to get the polygons to print and the areas to fill. * \param timeKeeper The stop watch to see how long it takes for each of the stages in the slicing process. */ @@ -146,28 +146,28 @@ class FffGcodeWriter : public NoCopy /*! * Set the retraction and wipe config globally, per extruder and per mesh. - * + * * \param[out] storage The data storage to which to save the configurations */ void setConfigRetractionAndWipe(SliceDataStorage& storage); /*! * Get the extruder with which to start the print. - * + * * Generally this is the extruder of the adhesion type in use, but in case * the platform adhesion type is none, the support extruder is used. If * support is also disabled, the extruder with lowest number which is used * on the first layer is used as initial extruder. - * + * * \param[in] storage where to get settings from. */ size_t getStartExtruder(const SliceDataStorage& storage); /*! * Set the infill angles and skin angles in the SliceDataStorage. - * + * * These lists of angles are cycled through to get the infill angle of a specific layer. - * + * * \param mesh The mesh for which to determine the infill and skin angles. */ void setInfillAndSkinAngles(SliceMeshStorage& mesh); @@ -186,24 +186,24 @@ class FffGcodeWriter : public NoCopy /*! * Move up and over the already printed meshgroups to print the next meshgroup. - * + * * \param[in] storage where the slice data is stored. */ void processNextMeshGroupCode(const SliceDataStorage& storage); - + /*! * Add raft layer plans onto the FffGcodeWriter::layer_plan_buffer - * + * * \param[in,out] storage where the slice data is stored. */ void processRaft(const SliceDataStorage& storage); /*! * Convert the polygon data of a layer into a layer plan on the FffGcodeWriter::layer_plan_buffer - * + * * In case of negative layer numbers, create layers only containing the data from * the helper parts (support etc) to fill up the gap between the raft and the model. - * + * * \param[in] storage where the slice data is stored. * \param layer_nr The index of the layer to write the gcode of. * \param total_layers The total number of layers. @@ -217,17 +217,17 @@ class FffGcodeWriter : public NoCopy * * Technically, this function checks whether any extruder needs to be primed (with a prime blob) * separately just before they are used. - * + * * \return whether any extruder need to be primed separately just before they are used */ bool getExtruderNeedPrimeBlobDuringFirstLayer(const SliceDataStorage& storage, const size_t extruder_nr) const; /*! * Add the skirt or the brim to the layer plan \p gcodeLayer if it hasn't already been added yet. - * + * * This function should be called for only one layer; * calling it for multiple layers results in the skirt/brim being printed on multiple layers. - * + * * \param storage where the slice data is stored. * \param gcodeLayer The initial planning of the g-code of the layer. * \param extruder_nr The extruder train for which to process the skirt or @@ -238,15 +238,15 @@ class FffGcodeWriter : public NoCopy /*! * Adds the ooze shield to the layer plan \p gcodeLayer. - * + * * \param[in] storage where the slice data is stored. * \param gcodeLayer The initial planning of the gcode of the layer. */ void processOozeShield(const SliceDataStorage& storage, LayerPlan& gcodeLayer) const; - + /*! * Adds the draft protection screen to the layer plan \p gcodeLayer. - * + * * \param[in] storage where the slice data is stored. * \param gcodeLayer The initial planning of the gcode of the layer. */ @@ -256,14 +256,14 @@ class FffGcodeWriter : public NoCopy * Calculate in which order to plan the extruders for each layer * Store the order of extruders for each layer in extruder_order_per_layer for normal layers * and the order of extruders for raft/filler layers in extruder_order_per_layer_negative_layers. - * + * * Only extruders which are (most probably) going to be used are planned - * + * * \note At the planning stage we only have information on areas, not how those are filled. * If an area is too small to be filled with anything it will still get specified as being used with the extruder for that area. - * + * * Computes \ref FffGcodeWriter::extruder_order_per_layer and \ref FffGcodeWriter::extruder_order_per_layer_negative_layers - * + * * \param[in] storage where the slice data is stored. */ void calculateExtruderOrderPerLayer(const SliceDataStorage& storage); @@ -280,10 +280,10 @@ class FffGcodeWriter : public NoCopy /*! * Gets a list of extruders that are used on the given layer, but excluding the given starting extruder. * When it's on the first layer, the prime blob will also be taken into account. - * + * * \note At the planning stage we only have information on areas, not how those are filled. * If an area is too small to be filled with anything it will still get specified as being used with the extruder for that area. - * + * * \param[in] storage where the slice data is stored. * \param current_extruder The current extruder with which we last printed * \return The order of extruders for a layer beginning with \p current_extruder @@ -294,7 +294,7 @@ class FffGcodeWriter : public NoCopy * Calculate in which order to plan the meshes of a specific extruder * Each mesh which has some feature printed with the extruder is included in this order. * One mesh can occur in the mesh order of multiple extruders. - * + * * \param[in] storage where the slice data is stored. * \param extruder_nr The extruder for which to determine the order * \return A vector of mesh indices ordered on print order for that extruder. @@ -303,41 +303,42 @@ class FffGcodeWriter : public NoCopy /*! * Add a single layer from a single mesh-volume to the layer plan \p gcodeLayer in mesh surface mode. - * + * * \param[in] storage where the slice data is stored. * \param mesh The mesh to add to the layer plan \p gcodeLayer. * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ void addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcodeLayer) const; - + /*! * Add the open polylines from a single layer from a single mesh-volume to the layer plan \p gcodeLayer for mesh the surface modes. - * + * * \param[in] storage where the slice data is stored. * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ void addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; - + /*! * Add all features of a given extruder from a single layer from a single mesh-volume to the layer plan \p gcode_layer. - * + * * This adds all features (e.g. walls, skin etc.) of this \p mesh to the gcode which are printed using \p extruder_nr - * + * * \param[in] storage where the slice data is stored. * \param mesh The mesh to add to the layer plan \p gcode_layer. * \param extruder_nr The extruder for which to print all features of the mesh which should be printed with this extruder * \param mesh_config the line config with which to print a print feature * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; + void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) + const; /*! * Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer. * This only adds the features which are printed with \p extruder_nr. - * + * * \param[in] storage where the slice data is stored. * \param storage Storage to get global settings from. * \param mesh The mesh to add to the layer plan \p gcode_layer. @@ -346,7 +347,13 @@ class FffGcodeWriter : public NoCopy * \param part The part to add * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshPartToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part, LayerPlan& gcode_layer) const; + void addMeshPartToGCode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SliceLayerPart& part, + LayerPlan& gcode_layer) const; /*! * \brief Add infill for a given part in a layer plan. @@ -359,12 +366,18 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processInfill( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * \brief Add thicker (multiple layers) sparse infill for a given part in a * layer plan. - * + * * \param gcodeLayer The initial planning of the gcode of the layer. * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. * \param extruder_nr The extruder for which to print all features of the @@ -373,7 +386,13 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processMultiLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processMultiLayerInfill( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * \brief Add normal sparse infill for a given part in a layer. @@ -385,7 +404,13 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processSingleLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processSingleLayerInfill( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * Generate the insets for the walls of a given layer part. @@ -397,7 +422,13 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processInsets(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processInsets( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * Generate the a spiralized wall for a given layer part. @@ -407,7 +438,9 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. */ - void processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) const; + void + processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) + const; /*! * Add the gcode of the top/bottom skin of the given part and of the perimeter gaps. @@ -420,21 +453,27 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processSkin(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processSkin( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * Add the gcode of the top/bottom skin of the given skin part and of the perimeter gaps. - * + * * Perimeter gaps are handled for the current extruder for the following features if they are printed with this extruder. * - skin outlines * - roofing (if concentric) * - top/bottom (if concentric) * They are all printed at the end of printing the skin part features which are printed with this extruder. - * + * * Note that the normal perimeter gaps are printed with the outer wall extruder, * while newly generated perimeter gaps * are printed with the extruder with which the feature was printed which generated the gaps. - * + * * \param[in] storage where the slice data is stored. * \param gcode_layer The initial planning of the gcode of the layer. * \param mesh The mesh for which to add to the layer plan \p gcode_layer. @@ -443,7 +482,13 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processSkinPart(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SkinPart& skin_part) const; + bool processSkinPart( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SkinPart& skin_part) const; /*! * Add the roofing which is the area inside the innermost skin inset which has air 'directly' above @@ -456,7 +501,14 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \param[out] added_something Whether this function added anything to the layer plan */ - void processRoofing(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; + void processRoofing( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SkinPart& skin_part, + bool& added_something) const; /*! * Add the normal skinfill which is the area inside the innermost skin inset @@ -470,11 +522,18 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \param[out] added_something Whether this function added anything to the layer plan */ - void processTopBottom(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; + void processTopBottom( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + const SkinPart& skin_part, + bool& added_something) const; /*! * Process a dense skin feature like roofing or top/bottom - * + * * \param[in] storage where the slice data is stored. * \param gcode_layer The initial planning of the gcode of the layer. * \param mesh The mesh for which to add to the layer plan \p gcode_layer. @@ -491,7 +550,21 @@ class FffGcodeWriter : public NoCopy * \param[out] added_something Whether this function added anything to the layer plan * \param fan_speed fan speed override for this skin area */ - void processSkinPrintFeature(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, EFillMethod pattern, const AngleDegrees skin_angle, const coord_t skin_overlap, const Ratio skin_density, const bool monotonic, bool& added_something, double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; + void processSkinPrintFeature( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const MeshPathConfigs& mesh_config, + const size_t extruder_nr, + const Polygons& area, + const GCodePathConfig& config, + EFillMethod pattern, + const AngleDegrees skin_angle, + const coord_t skin_overlap, + const Ratio skin_density, + const bool monotonic, + bool& added_something, + double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; /*! * see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to @@ -510,7 +583,7 @@ class FffGcodeWriter : public NoCopy * +------+ +------+ * 1, 2 = start locations of skin segments * # = seam - * + * * \param filling_part The part which we are going to fill with a linear filling type * \param filling_angle The angle of the filling lines * \param last_position The position the print head is in before going to fill the part @@ -573,9 +646,9 @@ class FffGcodeWriter : public NoCopy /*! * Change to a new extruder, and add the prime tower instructions if the new extruder is different from the last. - * + * * On layer 0 this function adds the skirt for the nozzle it switches to, instead of the prime tower. - * + * * \param[in] storage where the slice data is stored. * \param gcode_layer The initial planning of the gcode of the layer. * \param extruder_nr The extruder to switch to. @@ -589,7 +662,7 @@ class FffGcodeWriter : public NoCopy * \param prev_extruder The current extruder with which we last printed. */ void addPrimeTower(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const size_t prev_extruder) const; - + /*! * Add the end gcode and set all temperatures to zero. */ @@ -628,9 +701,15 @@ class FffGcodeWriter : public NoCopy * \param infill_line_width line width of the infill * \return true if there needs to be a skin edge support wall in this layer, otherwise false */ - static bool partitionInfillBySkinAbove(Polygons& infill_below_skin, Polygons& infill_not_below_skin, const LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const SliceLayerPart& part, coord_t infill_line_width) ; + static bool partitionInfillBySkinAbove( + Polygons& infill_below_skin, + Polygons& infill_not_below_skin, + const LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const SliceLayerPart& part, + coord_t infill_line_width); }; -}//namespace cura +} // namespace cura #endif // GCODE_WRITER_H diff --git a/include/GCodePathConfig.h b/include/GCodePathConfig.h index 9bf8002883..5fbde5e3c6 100644 --- a/include/GCodePathConfig.h +++ b/include/GCodePathConfig.h @@ -19,14 +19,14 @@ namespace cura */ struct GCodePathConfig { - PrintFeatureType type {}; //!< name of the feature type - coord_t line_width {}; //!< width of the line extruded - coord_t layer_thickness {}; //!< current layer height in micron - Ratio flow {}; //!< extrusion flow modifier. - SpeedDerivatives speed_derivatives {}; //!< The speed settings (and acceleration and jerk) of the extruded line. May be changed when smoothSpeed is called. - bool is_bridge_path { false }; //!< whether current config is used when bridging - double fan_speed { FAN_SPEED_DEFAULT }; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise - double extrusion_mm3_per_mm { calculateExtrusion() }; //!< current mm^3 filament moved per mm line traversed + PrintFeatureType type{}; //!< name of the feature type + coord_t line_width{}; //!< width of the line extruded + coord_t layer_thickness{}; //!< current layer height in micron + Ratio flow{}; //!< extrusion flow modifier. + SpeedDerivatives speed_derivatives{}; //!< The speed settings (and acceleration and jerk) of the extruded line. May be changed when smoothSpeed is called. + bool is_bridge_path{ false }; //!< whether current config is used when bridging + double fan_speed{ FAN_SPEED_DEFAULT }; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise + double extrusion_mm3_per_mm{ calculateExtrusion() }; //!< current mm^3 filament moved per mm line traversed static constexpr double FAN_SPEED_DEFAULT = -1; /*! diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 6219cbe502..788bbab782 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -19,12 +19,12 @@ #include "cura/plugins/slots/simplify/v0/modify.grpc.pb.h" #include "cura/plugins/slots/simplify/v0/modify.pb.h" #include "pathPlanning/GCodePath.h" +#include "pathPlanning/SpeedDerivatives.h" #include "plugins/metadata.h" #include "plugins/types.h" #include "settings/Settings.h" #include "settings/types/LayerIndex.h" #include "utils/polygon.h" -#include "pathPlanning/SpeedDerivatives.h" #include #include diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index ea44eba320..b0279cbab4 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -57,8 +57,6 @@ class PathConfigStorage static std::vector getLineWidthFactorPerExtruder(const LayerIndex& layer_nr); public: - - GCodePathConfig raft_base_config; GCodePathConfig raft_interface_config; GCodePathConfig raft_surface_config; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index a9835f852e..c4fb4d8cb8 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1404,11 +1404,8 @@ std::vector FffGcodeWriter::calculateMeshOrder(const SliceDataStorage& s return ret; } -void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode( - const SliceDataStorage& storage, - const SliceMeshStorage& mesh, - const MeshPathConfigs& mesh_config, - LayerPlan& gcode_layer) const +void FffGcodeWriter::addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) + const { if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer) { diff --git a/src/pathPlanning/SpeedDerivatives.cpp b/src/pathPlanning/SpeedDerivatives.cpp index 9011f951a3..c2ca78c8cc 100644 --- a/src/pathPlanning/SpeedDerivatives.cpp +++ b/src/pathPlanning/SpeedDerivatives.cpp @@ -13,9 +13,9 @@ void SpeedDerivatives::smoothSpeed(const SpeedDerivatives& first_layer_config, c const auto first_layer_acceleration = std::min(acceleration, first_layer_config.acceleration); const auto first_layer_jerk = std::min(jerk, first_layer_config.jerk); speed = (speed * static_cast(layer_nr)) / max_speed_layer + (first_layer_speed * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); - acceleration = (acceleration * static_cast(layer_nr)) / max_speed_layer + (first_layer_acceleration * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); + acceleration + = (acceleration * static_cast(layer_nr)) / max_speed_layer + (first_layer_acceleration * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); jerk = (jerk * static_cast(layer_nr)) / max_speed_layer + (first_layer_jerk * (max_speed_layer - static_cast(layer_nr)) / max_speed_layer); - } } // namespace cura \ No newline at end of file diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index fbf3ef818e..9d253f83b4 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -32,11 +32,7 @@ std::vector PathConfigStorage::getLineWidthFactorPerExtruder(const LayerI return ret; } -MeshPathConfigs::MeshPathConfigs( - const SliceMeshStorage& mesh, - const coord_t layer_thickness, - const LayerIndex& layer_nr, - const std::vector& line_width_factor_per_extruder) +MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder) : inset0_config( PrintFeatureType::OuterWall, mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], From 730f89de2e4340a435aac0908ad7c43472464c9a Mon Sep 17 00:00:00 2001 From: jellespijker Date: Wed, 16 Aug 2023 22:30:08 +0000 Subject: [PATCH 249/470] Applied clang-format. --- include/infill.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/infill.h b/include/infill.h index bdeec89efd..704735e95d 100644 --- a/include/infill.h +++ b/include/infill.h @@ -10,7 +10,6 @@ #include "settings/Settings.h" #include "settings/types/Angle.h" #include "utils/AABB.h" -#include "settings/types/Angle.h" #include "utils/ExtrusionLine.h" #include "utils/IntPoint.h" #include "utils/section_type.h" From 3ac71c0280226b9ec7cf18219af0b1dbe40ef42d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sat, 19 Aug 2023 20:37:44 +0200 Subject: [PATCH 250/470] Add conditional compilation for coroutines support This commit updates the file `pluginproxy.h` to include support for both standard and experimental versions of coroutine. The preprocessor directives check if the standard coroutine header is available, if not it checks for the availability of the experimental version. In the latter's case, a flag `USE_EXPERIMENTAL_COROUTINE` is set. This change ensures compatibility across different compiler versions. Contribute to CURA-10475 --- include/plugins/pluginproxy.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index d5340db80e..c457b935d9 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -31,7 +31,12 @@ #include #include +#if __has_include() #include +#elif __has_include() +#include +#define USE_EXPERIMENTAL_COROUTINE +#endif #include #include #include From 4a8c9bcc9d893a3e8937a2cc1a6d2bfe89bdc354 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 21 Aug 2023 17:39:55 +0200 Subject: [PATCH 251/470] Refactor GCodePath to use smart pointers for mesh ownership This change migrates GCodePath from using raw pointers to shared pointers for referencing the mesh. This avoids potential raw pointer dangling and null dereference issues. Simultaneously, assertion statement within VoronoiUtils.cpp was commented out to prevent possible failures. Some styling and permissions were also updated across various files for consistency and to meet C++ guidelines. For instance, marking certain functions as [[nodiscard]] and noexcept. Lastly, Copyright headers for GCodePath were updated to reflect the current year and company name. Other files includes updating the header order and deleting unnecessary class declarations. Overall, the commit enhances memory safety and improves the readability and consistency of the codebase. Contributes to CURA-10446 --- include/FffGcodeWriter.h | 2 +- include/GCodePathConfig.h | 28 ++++----- include/LayerPlan.h | 21 +++---- include/TopSurface.h | 3 +- include/pathPlanning/GCodePath.h | 75 +++++++++---------------- include/pathPlanning/SpeedDerivatives.h | 2 + include/settings/PathConfigStorage.h | 20 +------ src/FffGcodeWriter.cpp | 3 +- src/GCodePathConfig.cpp | 25 ++++----- src/LayerPlan.cpp | 4 +- src/pathPlanning/GCodePath.cpp | 47 +++------------- src/plugins/converters.cpp | 2 +- src/utils/VoronoiUtils.cpp | 2 +- 13 files changed, 85 insertions(+), 149 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 1c67fea697..db9664e588 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -7,7 +7,7 @@ #include "FanSpeedLayerTime.h" #include "LayerPlanBuffer.h" #include "gcodeExport.h" -#include "settings/PathConfigStorage.h" //For the MeshPathConfigs subclass. +#include "settings/MeshPathConfigs.h" #include "utils/ExtrusionLine.h" //Processing variable-width paths. #include "utils/NoCopy.h" diff --git a/include/GCodePathConfig.h b/include/GCodePathConfig.h index 5fbde5e3c6..1ee2003195 100644 --- a/include/GCodePathConfig.h +++ b/include/GCodePathConfig.h @@ -6,7 +6,6 @@ #include "PrintFeature.h" #include "pathPlanning/SpeedDerivatives.h" -#include "settings/types/LayerIndex.h" #include "settings/types/Ratio.h" #include "settings/types/Velocity.h" #include "utils/Coord_t.h" @@ -29,42 +28,45 @@ struct GCodePathConfig double extrusion_mm3_per_mm{ calculateExtrusion() }; //!< current mm^3 filament moved per mm line traversed static constexpr double FAN_SPEED_DEFAULT = -1; + [[nodiscard]] constexpr bool operator==(const GCodePathConfig& other) const noexcept = default; + [[nodiscard]] constexpr auto operator<=>(const GCodePathConfig& other) const = default; + /*! * Can only be called after the layer height has been set (which is done while writing the gcode!) */ - double getExtrusionMM3perMM() const; + [[nodiscard]] double getExtrusionMM3perMM() const noexcept; /*! * Get the movement speed in mm/s */ - Velocity getSpeed() const; + [[nodiscard]] Velocity getSpeed() const noexcept; /*! * Get the current acceleration of this config */ - Acceleration getAcceleration() const; + [[nodiscard]] Acceleration getAcceleration() const noexcept; /*! * Get the current jerk of this config */ - Velocity getJerk() const; + [[nodiscard]] Velocity getJerk() const noexcept; - coord_t getLineWidth() const; + [[nodiscard]] coord_t getLineWidth() const noexcept; - bool isTravelPath() const; + [[nodiscard]] bool isTravelPath() const noexcept; - bool isBridgePath() const; + [[nodiscard]] bool isBridgePath() const noexcept; - double getFanSpeed() const; + [[nodiscard]] double getFanSpeed() const noexcept; - Ratio getFlowRatio() const; + [[nodiscard]] Ratio getFlowRatio() const noexcept; - coord_t getLayerThickness() const; + [[nodiscard]] coord_t getLayerThickness() const noexcept; - const PrintFeatureType& getPrintFeatureType() const; + [[nodiscard]] PrintFeatureType getPrintFeatureType() const noexcept; private: - double calculateExtrusion() const; + [[nodiscard]] double calculateExtrusion() const noexcept; }; diff --git a/include/LayerPlan.h b/include/LayerPlan.h index 64da17faa1..a6bf59f303 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -4,14 +4,6 @@ #ifndef LAYER_PLAN_H #define LAYER_PLAN_H -#include -#include -#include -#include -#ifdef BUILD_TESTS -#include //Friend tests, so that they can inspect the privates. -#endif - #include "FanSpeedLayerTime.h" #include "InsetOrderOptimizer.h" #include "PathOrderOptimizer.h" @@ -25,6 +17,15 @@ #include "utils/ExtrusionJunction.h" #include "utils/polygon.h" +#include +#include +#include +#include +#include +#ifdef BUILD_TESTS +#include //Friend tests, so that they can inspect the privates. +#endif + namespace cura { @@ -245,7 +246,7 @@ class LayerPlan : public NoCopy std::vector has_prime_tower_planned_per_extruder; //!< For each extruder, whether the prime tower is planned yet or not. std::optional last_planned_position; //!< The last planned XY position of the print head (if known) - const SliceMeshStorage* current_mesh; //!< The mesh of the last planned move. + std::shared_ptr current_mesh; //!< The mesh of the last planned move. /*! * Whether the skirt or brim polygons have been processed into planned paths @@ -413,7 +414,7 @@ class LayerPlan : public NoCopy * Track the currently printing mesh. * \param mesh_id A unique ID indicating the current mesh. */ - void setMesh(const SliceMeshStorage* mesh_id); + void setMesh(const std::shared_ptr &mesh); /*! * Set bridge_wall_mask. diff --git a/include/TopSurface.h b/include/TopSurface.h index bfebc3f3a9..16fbef18a3 100644 --- a/include/TopSurface.h +++ b/include/TopSurface.h @@ -4,12 +4,13 @@ #ifndef TOPSURFACE_H #define TOPSURFACE_H +#include "GCodePathConfig.h" + #include "utils/polygon.h" //For the polygon areas. namespace cura { -class GCodePathConfig; class FffGcodeWriter; class LayerPlan; class SliceMeshStorage; diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 412f7b49b6..1244dc63c9 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -11,6 +11,9 @@ #include "sliceDataStorage.h" #include "utils/IntPoint.h" +#include +#include + namespace cura { @@ -24,60 +27,34 @@ namespace cura * In the final representation (gcode) each line segment may have different properties, * which are added when the generated GCodePaths are processed. */ -class GCodePath +struct GCodePath { -public: - const GCodePathConfig config; //!< The configuration settings of the path. - const SliceMeshStorage* mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; - SpaceFillType space_fill_type; //!< The type of space filling of which this path is a part - Ratio flow; //!< A type-independent flow configuration - Ratio width_factor; //!< Adjustment to the line width. Similar to flow, but causes the speed_back_pressure_factor to be adjusted. - Ratio speed_factor; //!< A speed factor that is multiplied with the travel speed. This factor can be used to change the travel speed. - Ratio speed_back_pressure_factor; // mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; + SpaceFillType space_fill_type{}; //!< The type of space filling of which this path is a part + Ratio flow{}; //!< A type-independent flow configuration + Ratio width_factor{}; //!< Adjustment to the line width. Similar to flow, but causes the speed_back_pressure_factor to be adjusted. + bool spiralize{}; //!< Whether to gradually increment the z position during the printing of this path. A sequence of spiralized paths should start at the given layer height and + //!< end in one layer higher. + Ratio speed_factor{1.0}; //!< A speed factor that is multiplied with the travel speed. This factor can be used to change the travel speed. + Ratio speed_back_pressure_factor{1.0}; // points; //!< The points constituting this path. - bool done; //!< Path is finished, no more moves should be added, and a new path should be started instead of any appending done to this one. - - bool spiralize; //!< Whether to gradually increment the z position during the printing of this path. A sequence of spiralized paths should start at the given layer height and - //!< end in one layer higher. - - double fan_speed; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise - - TimeMaterialEstimates estimates; //!< Naive time and material estimates - - /*! - * \brief Creates a new g-code path. - * - * \param config The line configuration to use when printing this path. - * \param mesh_id The mesh that this path is part of. - * \param space_fill_type The type of space filling of which this path is a - * part. - * \param flow The flow rate to print this path with. - * \param width_factor A multiplier on the line width. - * \param spiralize Gradually increment the z-coordinate while traversing - * \param speed_factor The factor that the travel speed will be multiplied with - * this path. - */ - GCodePath( - const GCodePathConfig config, - const SliceMeshStorage* mesh_id, - const SpaceFillType space_fill_type, - const Ratio flow, - const Ratio width_factor, - const bool spiralize, - const Ratio speed_factor = 1.0); + bool done{false}; //!< Path is finished, no more moves should be added, and a new path should be started instead of any appending done to this one. + double fan_speed{GCodePathConfig::FAN_SPEED_DEFAULT}; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise + TimeMaterialEstimates estimates{}; //!< Naive time and material estimates /*! * Whether this config is the config of a travel path. * * \return Whether this config is the config of a travel path. */ - bool isTravelPath() const; + [[nodiscard]] bool isTravelPath() const noexcept; /*! * Get the material flow in mm^3 per mm traversed. @@ -86,26 +63,26 @@ class GCodePath * * \return The flow */ - double getExtrusionMM3perMM() const; + [[nodiscard]] double getExtrusionMM3perMM() const noexcept; /*! * Get the actual line width (modulated by the flow) * \return the actual line width as shown in layer view */ - coord_t getLineWidthForLayerView() const; + [[nodiscard]] coord_t getLineWidthForLayerView() const noexcept; /*! * Set fan_speed * * \param fan_speed the fan speed to use for this path */ - void setFanSpeed(double fan_speed); + void setFanSpeed(const double fanspeed) noexcept; /*! * Get the fan speed for this path * \return the value of fan_speed if it is in the range 0-100, otherwise the value from the config */ - double getFanSpeed() const; + [[nodiscard]] double getFanSpeed() const noexcept; }; } // namespace cura diff --git a/include/pathPlanning/SpeedDerivatives.h b/include/pathPlanning/SpeedDerivatives.h index f22afc795b..d4f47788b7 100644 --- a/include/pathPlanning/SpeedDerivatives.h +++ b/include/pathPlanning/SpeedDerivatives.h @@ -16,6 +16,8 @@ struct SpeedDerivatives Acceleration acceleration{}; //!< acceleration of head movement (mm/s^2) Velocity jerk{}; //!< jerk of the head movement (around stand still) as instantaneous speed change (mm/s) + constexpr bool operator==(const SpeedDerivatives& other) const noexcept = default; + constexpr auto operator<=>(const SpeedDerivatives& other) const noexcept = default; /*! * Set the speed to somewhere between the speed of @p first_layer_config and the iconic speed. diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index b0279cbab4..5e53ae9b72 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -7,6 +7,7 @@ #include "GCodePathConfig.h" #include "pathPlanning/SpeedDerivatives.h" #include "settings/types/LayerIndex.h" +#include "settings/MeshPathConfigs.h" #include "utils/Coord_t.h" #include @@ -18,25 +19,6 @@ class ExtruderTrain; class SliceDataStorage; class SliceMeshStorage; -class MeshPathConfigs -{ -public: - GCodePathConfig inset0_config; - GCodePathConfig insetX_config; - GCodePathConfig bridge_inset0_config; - GCodePathConfig bridge_insetX_config; - GCodePathConfig skin_config; - GCodePathConfig bridge_skin_config; // used for first bridge layer - GCodePathConfig bridge_skin_config2; // used for second bridge layer - GCodePathConfig bridge_skin_config3; // used for third bridge layer - GCodePathConfig roofing_config; - std::vector infill_config; - GCodePathConfig ironing_config; - - MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder); - void smoothAllSpeeds(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer); -}; - /*! * A class to represent all configurations for all features types of printed lines in a meshgroup. */ diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index c4fb4d8cb8..34d2496d7f 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -28,6 +28,7 @@ #include // numeric_limits #include #include +#include #include namespace cura @@ -1470,7 +1471,7 @@ void FffGcodeWriter::addMeshLayerToGCode( return; } - gcode_layer.setMesh(&mesh); + gcode_layer.setMesh(std::make_shared(mesh)); ZSeamConfig z_seam_config; if (mesh.isPrinted()) //"normal" meshes with walls, skin, infill, etc. get the traditional part ordering based on the z-seam settings. diff --git a/src/GCodePathConfig.cpp b/src/GCodePathConfig.cpp index a2479d0a65..2aacd198ad 100644 --- a/src/GCodePathConfig.cpp +++ b/src/GCodePathConfig.cpp @@ -3,68 +3,67 @@ #include "GCodePathConfig.h" -#include "settings/types/LayerIndex.h" #include "utils/IntPoint.h" // INT2MM namespace cura { -double GCodePathConfig::getExtrusionMM3perMM() const +[[nodiscard]] double GCodePathConfig::getExtrusionMM3perMM() const noexcept { return extrusion_mm3_per_mm; } -Velocity GCodePathConfig::getSpeed() const +[[nodiscard]] Velocity GCodePathConfig::getSpeed() const noexcept { return speed_derivatives.speed; } -Acceleration GCodePathConfig::getAcceleration() const +[[nodiscard]] Acceleration GCodePathConfig::getAcceleration() const noexcept { return speed_derivatives.acceleration; } -Velocity GCodePathConfig::getJerk() const +[[nodiscard]] Velocity GCodePathConfig::getJerk() const noexcept { return speed_derivatives.jerk; } -coord_t GCodePathConfig::getLineWidth() const +[[nodiscard]] coord_t GCodePathConfig::getLineWidth() const noexcept { return line_width; } -coord_t GCodePathConfig::getLayerThickness() const +[[nodiscard]] coord_t GCodePathConfig::getLayerThickness() const noexcept { return layer_thickness; } -const PrintFeatureType& GCodePathConfig::getPrintFeatureType() const +[[nodiscard]] PrintFeatureType GCodePathConfig::getPrintFeatureType() const noexcept { return type; } -bool GCodePathConfig::isTravelPath() const +[[nodiscard]] bool GCodePathConfig::isTravelPath() const noexcept { return line_width == 0; } -bool GCodePathConfig::isBridgePath() const +[[nodiscard]] bool GCodePathConfig::isBridgePath() const noexcept { return is_bridge_path; } -double GCodePathConfig::getFanSpeed() const +[[nodiscard]] double GCodePathConfig::getFanSpeed() const noexcept { return fan_speed; } -Ratio GCodePathConfig::getFlowRatio() const +[[nodiscard]] Ratio GCodePathConfig::getFlowRatio() const noexcept { return flow; } -double GCodePathConfig::calculateExtrusion() const +[[nodiscard]] double GCodePathConfig::calculateExtrusion() const noexcept { return INT2MM(line_width) * INT2MM(layer_thickness) * double(flow); } diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 5b9c3770d3..e0f4a47645 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -339,7 +339,7 @@ bool LayerPlan::setExtruder(const size_t extruder_nr) } return true; } -void LayerPlan::setMesh(const SliceMeshStorage* mesh) +void LayerPlan::setMesh(const std::shared_ptr &mesh) { current_mesh = mesh; } @@ -1904,7 +1904,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) const bool acceleration_travel_enabled = mesh_group_settings.get("acceleration_travel_enabled"); const bool jerk_enabled = mesh_group_settings.get("jerk_enabled"); const bool jerk_travel_enabled = mesh_group_settings.get("jerk_travel_enabled"); - const SliceMeshStorage* current_mesh = nullptr; + std::shared_ptr current_mesh; for (size_t extruder_plan_idx = 0; extruder_plan_idx < extruder_plans.size(); extruder_plan_idx++) { diff --git a/src/pathPlanning/GCodePath.cpp b/src/pathPlanning/GCodePath.cpp index 5710f4e18d..5e0fa03be6 100644 --- a/src/pathPlanning/GCodePath.cpp +++ b/src/pathPlanning/GCodePath.cpp @@ -1,61 +1,32 @@ -// Copyright (c) 2022 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #include "pathPlanning/GCodePath.h" -#include "GCodePathConfig.h" - namespace cura { -GCodePath::GCodePath( - const GCodePathConfig config, - const SliceMeshStorage* mesh, - const SpaceFillType space_fill_type, - const Ratio flow, - const Ratio width_factor, - const bool spiralize, - const Ratio speed_factor) - : config(config) - , mesh(mesh) - , space_fill_type(space_fill_type) - , flow(flow) - , width_factor(width_factor) - , speed_factor(speed_factor) - , speed_back_pressure_factor(1.0) - , retract(false) - , unretract_before_last_travel_move(false) - , perform_z_hop(false) - , perform_prime(false) - , skip_agressive_merge_hint(false) - , points(std::vector()) - , done(false) - , spiralize(spiralize) - , fan_speed(GCodePathConfig::FAN_SPEED_DEFAULT) - , estimates(TimeMaterialEstimates()) -{ -} -bool GCodePath::isTravelPath() const +[[nodiscard]] bool GCodePath::isTravelPath() const noexcept { return config.isTravelPath(); } -double GCodePath::getExtrusionMM3perMM() const +[[nodiscard]] double GCodePath::getExtrusionMM3perMM() const noexcept { return flow * width_factor * config.getExtrusionMM3perMM(); } -coord_t GCodePath::getLineWidthForLayerView() const +[[nodiscard]] coord_t GCodePath::getLineWidthForLayerView() const noexcept { - return flow * width_factor * config.getLineWidth() * config.getFlowRatio(); + return static_cast(flow * width_factor * static_cast(config.getLineWidth()) * config.getFlowRatio()); } -void GCodePath::setFanSpeed(double fan_speed) +void GCodePath::setFanSpeed(const double fanspeed) noexcept { - this->fan_speed = fan_speed; + fan_speed = fanspeed; } -double GCodePath::getFanSpeed() const +[[nodiscard]] double GCodePath::getFanSpeed() const noexcept { return (fan_speed >= 0 && fan_speed <= 100) ? fan_speed : config.getFanSpeed(); } diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 8fb4a91805..e7667dc741 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -447,7 +447,7 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper const bool spiralize = gcode_path_msg.spiralize(); const Ratio speed_factor = gcode_path_msg.speed_factor(); - const auto path = GCodePath(config, mesh_id, space_fill_type, flow, width_factor, spiralize, speed_factor); + const auto path = GCodePath(config, nullptr, space_fill_type, flow, width_factor, spiralize, speed_factor); GCodePath gcode_path(path); gcode_path.points = gcode_path_msg.path().path() | ranges::views::transform( diff --git a/src/utils/VoronoiUtils.cpp b/src/utils/VoronoiUtils.cpp index b260a74c3a..4b7f01799b 100644 --- a/src/utils/VoronoiUtils.cpp +++ b/src/utils/VoronoiUtils.cpp @@ -167,7 +167,7 @@ std::vector VoronoiUtils::discretizeParabola(const Point& p, const Segmen // are more than 10 microns away from the projected apex bool add_apex = (sx - px) * dir < -10 && (ex - px) * dir > 10; - assert(! (add_marking_start && add_marking_end) || add_apex); +// assert(! (add_marking_start && add_marking_end) || add_apex); if (add_marking_start && add_marking_end && ! add_apex) { RUN_ONCE(spdlog::warn("Failing to discretize parabola! Must add an apex or one of the endpoints.")); From 67152c7a4033a69ea73555bd320cc87f00adcc15 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Mon, 21 Aug 2023 15:40:30 +0000 Subject: [PATCH 252/470] Applied clang-format. --- include/LayerPlan.h | 2 +- include/TopSurface.h | 1 - include/pathPlanning/GCodePath.h | 20 ++++++++++---------- include/settings/PathConfigStorage.h | 2 +- src/FffGcodeWriter.cpp | 2 +- src/LayerPlan.cpp | 2 +- src/utils/VoronoiUtils.cpp | 13 +++++++------ 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/LayerPlan.h b/include/LayerPlan.h index a6bf59f303..42b5eb8d33 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -414,7 +414,7 @@ class LayerPlan : public NoCopy * Track the currently printing mesh. * \param mesh_id A unique ID indicating the current mesh. */ - void setMesh(const std::shared_ptr &mesh); + void setMesh(const std::shared_ptr& mesh); /*! * Set bridge_wall_mask. diff --git a/include/TopSurface.h b/include/TopSurface.h index 16fbef18a3..bac3d87ef3 100644 --- a/include/TopSurface.h +++ b/include/TopSurface.h @@ -5,7 +5,6 @@ #define TOPSURFACE_H #include "GCodePathConfig.h" - #include "utils/polygon.h" //For the polygon areas. namespace cura diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 1244dc63c9..8c3c34dcfe 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -36,17 +36,17 @@ struct GCodePath Ratio width_factor{}; //!< Adjustment to the line width. Similar to flow, but causes the speed_back_pressure_factor to be adjusted. bool spiralize{}; //!< Whether to gradually increment the z position during the printing of this path. A sequence of spiralized paths should start at the given layer height and //!< end in one layer higher. - Ratio speed_factor{1.0}; //!< A speed factor that is multiplied with the travel speed. This factor can be used to change the travel speed. - Ratio speed_back_pressure_factor{1.0}; // points; //!< The points constituting this path. - bool done{false}; //!< Path is finished, no more moves should be added, and a new path should be started instead of any appending done to this one. - double fan_speed{GCodePathConfig::FAN_SPEED_DEFAULT}; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise + bool done{ false }; //!< Path is finished, no more moves should be added, and a new path should be started instead of any appending done to this one. + double fan_speed{ GCodePathConfig::FAN_SPEED_DEFAULT }; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise TimeMaterialEstimates estimates{}; //!< Naive time and material estimates /*! diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index 5e53ae9b72..e7bd54773a 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -6,8 +6,8 @@ #include "GCodePathConfig.h" #include "pathPlanning/SpeedDerivatives.h" -#include "settings/types/LayerIndex.h" #include "settings/MeshPathConfigs.h" +#include "settings/types/LayerIndex.h" #include "utils/Coord_t.h" #include diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 34d2496d7f..82438267cc 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -27,8 +27,8 @@ #include #include // numeric_limits #include -#include #include +#include #include namespace cura diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index e0f4a47645..58e2eda6c5 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -339,7 +339,7 @@ bool LayerPlan::setExtruder(const size_t extruder_nr) } return true; } -void LayerPlan::setMesh(const std::shared_ptr &mesh) +void LayerPlan::setMesh(const std::shared_ptr& mesh) { current_mesh = mesh; } diff --git a/src/utils/VoronoiUtils.cpp b/src/utils/VoronoiUtils.cpp index 4b7f01799b..0a134906da 100644 --- a/src/utils/VoronoiUtils.cpp +++ b/src/utils/VoronoiUtils.cpp @@ -1,15 +1,16 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include -#include - -#include - #include "utils/VoronoiUtils.h" + #include "utils/linearAlg2D.h" #include "utils/macros.h" +#include + +#include +#include + namespace cura { @@ -167,7 +168,7 @@ std::vector VoronoiUtils::discretizeParabola(const Point& p, const Segmen // are more than 10 microns away from the projected apex bool add_apex = (sx - px) * dir < -10 && (ex - px) * dir > 10; -// assert(! (add_marking_start && add_marking_end) || add_apex); + // assert(! (add_marking_start && add_marking_end) || add_apex); if (add_marking_start && add_marking_end && ! add_apex) { RUN_ONCE(spdlog::warn("Failing to discretize parabola! Must add an apex or one of the endpoints.")); From 55c5aadff6aaeaf64461ecba8498c009efb3ca53 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 22 Aug 2023 10:41:17 +0200 Subject: [PATCH 253/470] Refactor gcode_paths_modify_response operation Extracted code into helper functions to decrease the complexity of the gcode_paths_modify_response::operator() function. This will aid future modifications and improve readability. Removed unnecessary log from the process. Contributes to CURA-10446 --- include/plugins/converters.h | 3 + src/plugins/converters.cpp | 182 ++++++++++++++++++----------------- 2 files changed, 98 insertions(+), 87 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 788bbab782..2ebc7eddb5 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -118,6 +118,9 @@ struct gcode_paths_modify_request : public details::converter> { + [[nodiscard]] static constexpr PrintFeatureType getPrintFeatureType(const v0::PrintFeature feature) noexcept; + [[nodiscard]] static GCodePathConfig buildConfig(const v0::GCodePath& path); + [[nodiscard]] static constexpr SpaceFillType getSpaceFillType(const v0::SpaceFillType space_fill_type) noexcept; native_value_type operator()(const value_type& message) const; }; diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index e7667dc741..4df1b999de 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -296,7 +296,6 @@ gcode_paths_modify_request::value_type gcode_path->set_flow(path.flow); gcode_path->set_width_factor(path.width_factor); - spdlog::info("path.spiralize: {}", path.spiralize); gcode_path->set_spiralize(path.spiralize); gcode_path->set_speed_factor(path.speed_factor); @@ -369,97 +368,106 @@ gcode_paths_modify_request::value_type return message; } +[[nodiscard]] constexpr PrintFeatureType gcode_paths_modify_response::getPrintFeatureType(const v0::PrintFeature feature) noexcept +{ + switch (feature) + { + case v0::PrintFeature::NONETYPE: + return PrintFeatureType::NoneType; + case v0::PrintFeature::OUTERWALL: + return PrintFeatureType::OuterWall; + case v0::PrintFeature::INNERWALL: + return PrintFeatureType::InnerWall; + case v0::PrintFeature::SKIN: + return PrintFeatureType::Skin; + case v0::PrintFeature::SUPPORT: + return PrintFeatureType::Support; + case v0::PrintFeature::SKIRTBRIM: + return PrintFeatureType::SkirtBrim; + case v0::PrintFeature::INFILL: + return PrintFeatureType::Infill; + case v0::PrintFeature::SUPPORTINFILL: + return PrintFeatureType::SupportInfill; + case v0::PrintFeature::MOVECOMBING: + return PrintFeatureType::MoveCombing; + case v0::PrintFeature::MOVERETRACTION: + return PrintFeatureType::MoveRetraction; + case v0::PrintFeature::SUPPORTINTERFACE: + return PrintFeatureType::SupportInterface; + case v0::PrintFeature::PRIMETOWER: + return PrintFeatureType::PrimeTower; + case v0::PrintFeature::NUMPRINTFEATURETYPES: + return PrintFeatureType::NumPrintFeatureTypes; + default: + return PrintFeatureType::NoneType; + } +} + +[[nodiscard]] constexpr SpaceFillType gcode_paths_modify_response::getSpaceFillType(const v0::SpaceFillType space_fill_type) noexcept +{ + switch (space_fill_type) + { + case v0::SpaceFillType::NONE: + return SpaceFillType::None; + case v0::SpaceFillType::POLYGONS: + return SpaceFillType::Polygons; + case v0::SpaceFillType::POLY_LINES: + return SpaceFillType::PolyLines; + case v0::SpaceFillType::LINES: + return SpaceFillType::Lines; + default: + return SpaceFillType::None; + } +} + +[[nodiscard]] GCodePathConfig gcode_paths_modify_response::buildConfig(const v0::GCodePath& path) +{ + const coord_t line_width = path.config().line_width(); + const coord_t layer_height = path.config().layer_thickness(); + const Ratio flow = path.config().flow_ratio(); + const SpeedDerivatives speed_derivatives{ .speed = path.config().speed_derivatives().velocity(), + .acceleration = path.config().speed_derivatives().acceleration(), + .jerk = path.config().speed_derivatives().jerk() }; + const bool is_bridge_path = path.config().is_bridge_path(); + const double fan_speed = path.config().fan_speed(); + const auto feature_type = getPrintFeatureType(path.config().feature()); + return { .type = feature_type, + .line_width = line_width, + .layer_thickness = layer_height, + .flow = flow, + .speed_derivatives = speed_derivatives, + .is_bridge_path = is_bridge_path, + .fan_speed = fan_speed }; +} + gcode_paths_modify_response::native_value_type gcode_paths_modify_response::operator()(const gcode_paths_modify_response::value_type& message) const { std::vector paths; for (const auto& gcode_path_msg : message.gcode_paths()) { - const auto config = [gcode_path_msg]() - { - const auto type = [gcode_path_msg]() - { - switch (gcode_path_msg.config().feature()) - { - case v0::PrintFeature::NONETYPE: - return PrintFeatureType::NoneType; - case v0::PrintFeature::OUTERWALL: - return PrintFeatureType::OuterWall; - case v0::PrintFeature::INNERWALL: - return PrintFeatureType::InnerWall; - case v0::PrintFeature::SKIN: - return PrintFeatureType::Skin; - case v0::PrintFeature::SUPPORT: - return PrintFeatureType::Support; - case v0::PrintFeature::SKIRTBRIM: - return PrintFeatureType::SkirtBrim; - case v0::PrintFeature::INFILL: - return PrintFeatureType::Infill; - case v0::PrintFeature::SUPPORTINFILL: - return PrintFeatureType::SupportInfill; - case v0::PrintFeature::MOVECOMBING: - return PrintFeatureType::MoveCombing; - case v0::PrintFeature::MOVERETRACTION: - return PrintFeatureType::MoveRetraction; - case v0::PrintFeature::SUPPORTINTERFACE: - return PrintFeatureType::SupportInterface; - case v0::PrintFeature::PRIMETOWER: - return PrintFeatureType::PrimeTower; - case v0::PrintFeature::NUMPRINTFEATURETYPES: - return PrintFeatureType::NumPrintFeatureTypes; - default: - return PrintFeatureType::NoneType; - } - }(); - - const coord_t line_width = gcode_path_msg.config().line_width(); - const coord_t layer_height = gcode_path_msg.config().layer_thickness(); - const Ratio flow = gcode_path_msg.config().flow_ratio(); - const SpeedDerivatives speed_derivatives = { gcode_path_msg.config().speed_derivatives().velocity(), - gcode_path_msg.config().speed_derivatives().acceleration(), - gcode_path_msg.config().speed_derivatives().jerk() }; - const bool is_bridge_path = gcode_path_msg.config().is_bridge_path(); - const double fan_speed = gcode_path_msg.config().fan_speed(); - return GCodePathConfig(type, line_width, layer_height, flow, speed_derivatives, is_bridge_path, fan_speed); - }(); - - const auto gcode_path = [config, gcode_path_msg]() - { - // TODO get actual mesh_id from message - const SliceMeshStorage* mesh_id = nullptr; - const SpaceFillType space_fill_type = [gcode_path_msg]() - { - switch (gcode_path_msg.space_fill_type()) - { - case v0::SpaceFillType::NONE: - return SpaceFillType::None; - case v0::SpaceFillType::POLYGONS: - return SpaceFillType::Polygons; - case v0::SpaceFillType::POLY_LINES: - return SpaceFillType::PolyLines; - case v0::SpaceFillType::LINES: - return SpaceFillType::Lines; - default: - return SpaceFillType::None; - } - }(); - const Ratio flow = gcode_path_msg.flow(); - const Ratio width_factor = gcode_path_msg.width_factor(); - const bool spiralize = gcode_path_msg.spiralize(); - const Ratio speed_factor = gcode_path_msg.speed_factor(); - - const auto path = GCodePath(config, nullptr, space_fill_type, flow, width_factor, spiralize, speed_factor); - GCodePath gcode_path(path); - gcode_path.points = gcode_path_msg.path().path() - | ranges::views::transform( - [](const auto& point_msg) - { - return Point{ point_msg.x(), point_msg.y() }; - }) - | ranges::to_vector; - return gcode_path; - }(); - - paths.emplace_back(gcode_path); + const std::shared_ptr mesh = nullptr; + const GCodePathConfig config = buildConfig(gcode_path_msg); + const Ratio flow = gcode_path_msg.flow(); + const Ratio width_factor = gcode_path_msg.width_factor(); + const bool spiralize = gcode_path_msg.spiralize(); + const Ratio speed_factor = gcode_path_msg.speed_factor(); + const auto space_fill_type = getSpaceFillType(gcode_path_msg.space_fill_type()); + GCodePath path{ .config = config, + .mesh = mesh, + .space_fill_type = space_fill_type, + .flow = flow, + .width_factor = width_factor, + .spiralize = spiralize, + .speed_factor = speed_factor }; + path.points = gcode_path_msg.path().path() + | ranges::views::transform( + [](const auto& point_msg) + { + return Point{ point_msg.x(), point_msg.y() }; + }) + | ranges::to_vector; + + paths.emplace_back(path); } return paths; From 23044f6db345944f9cea0c1c0073fc617659f115 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 22 Aug 2023 10:51:56 +0200 Subject: [PATCH 254/470] Refactored gcode_paths_modify_request function This commit simplifies the gcode_paths_modify_request function operator by extracting the logic for constructing SpaceFillType and PrintFeature into separate, reusable functions. This improves the readability of the code and makes it easier to maintain. The modification also fixes the casting issue of extruder_nr to ensure its value is transmitted correctly. Contributes to CURA-10446 --- include/plugins/converters.h | 2 + src/plugins/converters.cpp | 120 ++++++++++++++++------------------- 2 files changed, 56 insertions(+), 66 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 2ebc7eddb5..204925a2be 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -113,6 +113,8 @@ struct infill_generate_response struct gcode_paths_modify_request : public details::converter> { + [[nodsicard]] static constexpr v0::SpaceFillType getSpaceFillType(const SpaceFillType space_fill_type) noexcept; + [[nodiscard]] static constexpr v0::PrintFeature getPrintFeature(const PrintFeatureType print_feature_type) noexcept; value_type operator()(const native_value_type& gcode, const size_t extruder_nr, const LayerIndex layer_nr) const; }; diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 4df1b999de..1083256e44 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -262,12 +262,63 @@ infill_generate_response::native_value_type infill_generate_response::operator() return { toolpaths_, result_polygons, result_lines }; } +[[nodiscard]] constexpr v0::SpaceFillType gcode_paths_modify_request::getSpaceFillType(const cura::SpaceFillType space_fill_type) noexcept +{ + switch (space_fill_type) + { + case SpaceFillType::None: + return v0::SpaceFillType::NONE; + case SpaceFillType::Polygons: + return v0::SpaceFillType::POLYGONS; + case SpaceFillType::PolyLines: + return v0::SpaceFillType::POLY_LINES; + case SpaceFillType::Lines: + return v0::SpaceFillType::LINES; + default: + return v0::SpaceFillType::NONE; + } +} + +[[nodsicard]] constexpr v0::PrintFeature gcode_paths_modify_request::getPrintFeature(const cura::PrintFeatureType print_feature_type) noexcept +{ + switch (print_feature_type) + { + case PrintFeatureType::NoneType: + return v0::PrintFeature::NONETYPE; + case PrintFeatureType::OuterWall: + return v0::PrintFeature::OUTERWALL; + case PrintFeatureType::InnerWall: + return v0::PrintFeature::INNERWALL; + case PrintFeatureType::Skin: + return v0::PrintFeature::SKIN; + case PrintFeatureType::Support: + return v0::PrintFeature::SUPPORT; + case PrintFeatureType::SkirtBrim: + return v0::PrintFeature::SKIRTBRIM; + case PrintFeatureType::Infill: + return v0::PrintFeature::INFILL; + case PrintFeatureType::SupportInfill: + return v0::PrintFeature::SUPPORTINFILL; + case PrintFeatureType::MoveCombing: + return v0::PrintFeature::MOVECOMBING; + case PrintFeatureType::MoveRetraction: + return v0::PrintFeature::MOVERETRACTION; + case PrintFeatureType::SupportInterface: + return v0::PrintFeature::SUPPORTINTERFACE; + case PrintFeatureType::PrimeTower: + return v0::PrintFeature::PRIMETOWER; + case PrintFeatureType::NumPrintFeatureTypes: + return v0::PrintFeature::NUMPRINTFEATURETYPES; + default: + return v0::PrintFeature::NONETYPE; + } +} gcode_paths_modify_request::value_type gcode_paths_modify_request::operator()(const gcode_paths_modify_request::native_value_type& paths, const size_t extruder_nr, const LayerIndex layer_nr) const { value_type message{}; - message.set_extruder_nr(extruder_nr); + message.set_extruder_nr(static_cast(extruder_nr)); message.set_layer_nr(layer_nr); // Construct the repeated GCodepath message @@ -275,24 +326,7 @@ gcode_paths_modify_request::value_type for (const auto& path : paths) { auto* gcode_path = gcode_paths->Add(); - - switch (path.space_fill_type) - { - case SpaceFillType::None: - gcode_path->set_space_fill_type(v0::SpaceFillType::NONE); - break; - case SpaceFillType::Polygons: - gcode_path->set_space_fill_type(v0::SpaceFillType::POLYGONS); - break; - case SpaceFillType::PolyLines: - gcode_path->set_space_fill_type(v0::SpaceFillType::POLY_LINES); - break; - case SpaceFillType::Lines: - gcode_path->set_space_fill_type(v0::SpaceFillType::LINES); - break; - default: - gcode_path->set_space_fill_type(v0::SpaceFillType::NONE); - } + gcode_path->set_space_fill_type(getSpaceFillType(path.space_fill_type)); gcode_path->set_flow(path.flow); gcode_path->set_width_factor(path.width_factor); @@ -308,53 +342,7 @@ gcode_paths_modify_request::value_type } auto* config_msg = gcode_path->mutable_config(); - - switch (path.config.getPrintFeatureType()) - { - case PrintFeatureType::NoneType: - config_msg->set_feature(v0::PrintFeature::NONETYPE); - break; - case PrintFeatureType::OuterWall: - config_msg->set_feature(v0::PrintFeature::OUTERWALL); - break; - case PrintFeatureType::InnerWall: - config_msg->set_feature(v0::PrintFeature::INNERWALL); - break; - case PrintFeatureType::Skin: - config_msg->set_feature(v0::PrintFeature::SKIN); - break; - case PrintFeatureType::Support: - config_msg->set_feature(v0::PrintFeature::SUPPORT); - break; - case PrintFeatureType::SkirtBrim: - config_msg->set_feature(v0::PrintFeature::SKIRTBRIM); - break; - case PrintFeatureType::Infill: - config_msg->set_feature(v0::PrintFeature::INFILL); - break; - case PrintFeatureType::SupportInfill: - config_msg->set_feature(v0::PrintFeature::SUPPORTINFILL); - break; - case PrintFeatureType::MoveCombing: - config_msg->set_feature(v0::PrintFeature::MOVECOMBING); - break; - case PrintFeatureType::MoveRetraction: - config_msg->set_feature(v0::PrintFeature::MOVERETRACTION); - break; - case PrintFeatureType::SupportInterface: - config_msg->set_feature(v0::PrintFeature::SUPPORTINTERFACE); - break; - case PrintFeatureType::PrimeTower: - config_msg->set_feature(v0::PrintFeature::PRIMETOWER); - break; - case PrintFeatureType::NumPrintFeatureTypes: - config_msg->set_feature(v0::PrintFeature::NUMPRINTFEATURETYPES); - break; - default: - config_msg->set_feature(v0::PrintFeature::NONETYPE); - break; - } - + config_msg->set_feature(getPrintFeature(path.config.type)); config_msg->set_line_width(path.config.getLineWidth()); config_msg->set_layer_thickness(path.config.getLayerThickness()); config_msg->set_flow_ratio(path.config.getFlowRatio()); From 67e49a9ca787bc54b1fcc79453f961c4b62343e4 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 22 Aug 2023 10:52:20 +0200 Subject: [PATCH 255/470] Add dedicated MeshPatchConfig header CURA-10446 --- include/settings/MeshPathConfigs.h | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/settings/MeshPathConfigs.h diff --git a/include/settings/MeshPathConfigs.h b/include/settings/MeshPathConfigs.h new file mode 100644 index 0000000000..4f8d4143f0 --- /dev/null +++ b/include/settings/MeshPathConfigs.h @@ -0,0 +1,34 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef SETTINGS_TYPES_MESHPATHCONFIGS_H +#define SETTINGS_TYPES_MESHPATHCONFIGS_H + +#include "GCodePathConfig.h" +#include "settings/types/LayerIndex.h" +#include "settings/types/Ratio.h" +#include "sliceDataStorage.h" + +namespace cura +{ +struct MeshPathConfigs +{ + GCodePathConfig inset0_config{}; + GCodePathConfig insetX_config{}; + GCodePathConfig bridge_inset0_config{}; + GCodePathConfig bridge_insetX_config{}; + GCodePathConfig skin_config{}; + GCodePathConfig bridge_skin_config{}; // used for first bridge layer + GCodePathConfig bridge_skin_config2{}; // used for second bridge layer + GCodePathConfig bridge_skin_config3{}; // used for third bridge layer + GCodePathConfig roofing_config{}; + std::vector infill_config{}; + GCodePathConfig ironing_config{}; + + MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder); + void smoothAllSpeeds(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer); +}; + +} // namespace cura + +#endif // SETTINGS_TYPES_MESHPATHCONFIGS_H From 1a39eb23f7a2efeb5baf217bc60e8c4df0b25286 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 22 Aug 2023 15:15:00 +0200 Subject: [PATCH 256/470] Improve and refactor the code for better readability The commit drastically changes the way things are written in the code in different files to improve readability and efficiency. Major changes include an updated method for assigning properties to GCodePath and MeshPathConfigs objects, using struct-designated initializers to improve readability. Variable assignments were also refactored to make understanding the code easier. Overall, the commit aims to make the code more efficient and maintainable. Contributes to CURA-10446 --- CMakeLists.txt | 1 + include/pathPlanning/TimeMaterialEstimates.h | 28 +-- include/settings/MeshPathConfigs.h | 2 +- src/settings/MeshPathConfigs.cpp | 126 +++++++++++++ src/settings/PathConfigStorage.cpp | 113 ------------ tests/ExtruderPlanTest.cpp | 179 ++++++++++++++++--- 6 files changed, 298 insertions(+), 151 deletions(-) create mode 100644 src/settings/MeshPathConfigs.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a100acaaf..a27876f7f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,7 @@ set(engine_SRCS # Except main.cpp. src/settings/AdaptiveLayerHeights.cpp src/settings/FlowTempGraph.cpp + src/settings/MeshPathConfigs.cpp src/settings/PathConfigStorage.cpp src/settings/Settings.cpp src/settings/ZSeamConfig.cpp diff --git a/include/pathPlanning/TimeMaterialEstimates.h b/include/pathPlanning/TimeMaterialEstimates.h index 90a1cb3a76..4b30011a5e 100644 --- a/include/pathPlanning/TimeMaterialEstimates.h +++ b/include/pathPlanning/TimeMaterialEstimates.h @@ -40,23 +40,23 @@ struct TimeMaterialEstimates constexpr TimeMaterialEstimates operator+(const TimeMaterialEstimates& other) const noexcept { - return TimeMaterialEstimates{ extrude_time + other.extrude_time, - extrude_time_at_slowest_path_speed + other.extrude_time_at_slowest_path_speed, - extrude_time_at_minimum_speed + other.extrude_time_at_minimum_speed, - unretracted_travel_time + other.unretracted_travel_time, - retracted_travel_time + other.retracted_travel_time, - material + other.material }; - } + return { .extrude_time = extrude_time + other.extrude_time, + .unretracted_travel_time = unretracted_travel_time + other.unretracted_travel_time, + .retracted_travel_time = retracted_travel_time + other.retracted_travel_time, + .material = material + other.material, + .extrude_time_at_slowest_path_speed = extrude_time_at_slowest_path_speed + other.extrude_time_at_slowest_path_speed, + .extrude_time_at_minimum_speed = extrude_time_at_minimum_speed + other.extrude_time_at_minimum_speed }; + }; constexpr TimeMaterialEstimates operator-(const TimeMaterialEstimates& other) const noexcept { - return TimeMaterialEstimates{ extrude_time - other.extrude_time, - extrude_time_at_slowest_path_speed - other.extrude_time_at_slowest_path_speed, - extrude_time_at_minimum_speed - other.extrude_time_at_minimum_speed, - unretracted_travel_time - other.unretracted_travel_time, - retracted_travel_time - other.retracted_travel_time, - material - other.material }; - } + return { .extrude_time = extrude_time - other.extrude_time, + .unretracted_travel_time = unretracted_travel_time - other.unretracted_travel_time, + .retracted_travel_time = retracted_travel_time - other.retracted_travel_time, + .material = material - other.material, + .extrude_time_at_slowest_path_speed = extrude_time_at_slowest_path_speed - other.extrude_time_at_slowest_path_speed, + .extrude_time_at_minimum_speed = extrude_time_at_minimum_speed - other.extrude_time_at_minimum_speed }; + }; constexpr auto operator<=>(const TimeMaterialEstimates& other) const noexcept = default; diff --git a/include/settings/MeshPathConfigs.h b/include/settings/MeshPathConfigs.h index 4f8d4143f0..43457fbc8c 100644 --- a/include/settings/MeshPathConfigs.h +++ b/include/settings/MeshPathConfigs.h @@ -25,7 +25,7 @@ struct MeshPathConfigs std::vector infill_config{}; GCodePathConfig ironing_config{}; - MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder); + MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex layer_nr, const std::vector& line_width_factor_per_extruder); void smoothAllSpeeds(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer); }; diff --git a/src/settings/MeshPathConfigs.cpp b/src/settings/MeshPathConfigs.cpp new file mode 100644 index 0000000000..942084a231 --- /dev/null +++ b/src/settings/MeshPathConfigs.cpp @@ -0,0 +1,126 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#include "settings/MeshPathConfigs.h" + +#include "ExtruderTrain.h" +#include "PrintFeature.h" + +#include + +namespace cura +{ + +MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex layer_nr, const std::vector& line_width_factor_per_extruder) + : inset0_config{ .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("wall_0_material_flow") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_wall_0"), + .acceleration = mesh.settings.get("acceleration_wall_0"), + .jerk = mesh.settings.get("jerk_wall_0") } } + , insetX_config{ .type = PrintFeatureType::InnerWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("wall_x_material_flow") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x"), + .acceleration = mesh.settings.get("acceleration_wall_x"), + .jerk = mesh.settings.get("jerk_wall_x") } } + , bridge_inset0_config{ .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_0") + * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("bridge_wall_material_flow"), + .speed_derivatives = { .speed = mesh.settings.get("bridge_wall_speed"), + .acceleration = mesh.settings.get("acceleration_wall_0"), + .jerk = mesh.settings.get("jerk_wall_0") }, + .is_bridge_path = true, + .fan_speed = mesh.settings.get("bridge_fan_speed") * 100.0 } + , bridge_insetX_config{ .type = PrintFeatureType::InnerWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_x") + * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("bridge_wall_material_flow"), + .speed_derivatives = { .speed = mesh.settings.get("bridge_wall_speed"), + .acceleration = mesh.settings.get("acceleration_wall_x"), + .jerk = mesh.settings.get("jerk_wall_x") }, + .is_bridge_path = true, + .fan_speed = mesh.settings.get("bridge_fan_speed") * 100.0 } + , skin_config{ .type = PrintFeatureType::Skin, + .line_width = static_cast( + mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("skin_material_flow") * (layer_nr == 0 ? mesh.settings.get("skin_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_topbottom"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") } } + , bridge_skin_config{ .type = PrintFeatureType::Skin, + .line_width = static_cast( + mesh.settings.get("skin_line_width") + * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("bridge_skin_material_flow"), + .speed_derivatives = { .speed = mesh.settings.get("bridge_skin_speed"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }, + .is_bridge_path = true, + .fan_speed = mesh.settings.get("bridge_fan_speed") * 100.0 } + , bridge_skin_config2{ .type = PrintFeatureType::Skin, + .line_width = static_cast( + mesh.settings.get("skin_line_width") + * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("bridge_skin_material_flow_2"), + .speed_derivatives = { .speed = mesh.settings.get("bridge_skin_speed_2"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }, + .is_bridge_path = true, + .fan_speed = mesh.settings.get("bridge_fan_speed_2") * 100.0 } + , bridge_skin_config3{ .type = PrintFeatureType::Skin, + .line_width = static_cast( + mesh.settings.get("skin_line_width") + * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("bridge_skin_material_flow_3"), + .speed_derivatives = { .speed = mesh.settings.get("bridge_skin_speed_3"), + .acceleration = mesh.settings.get("acceleration_topbottom"), + .jerk = mesh.settings.get("jerk_topbottom") }, + .is_bridge_path = true, + .fan_speed = mesh.settings.get("bridge_fan_speed_3") * 100.0 } + , roofing_config{ .type = PrintFeatureType::Skin, + .line_width = mesh.settings.get("roofing_line_width"), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("roofing_material_flow") * (layer_nr == 0 ? mesh.settings.get("material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_roofing"), + .acceleration = mesh.settings.get("acceleration_roofing"), + .jerk = mesh.settings.get("jerk_roofing") } } + , ironing_config{ .type = PrintFeatureType::Skin, + .line_width = mesh.settings.get("ironing_line_spacing"), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("ironing_flow"), + .speed_derivatives = { .speed = mesh.settings.get("speed_ironing"), + .acceleration = mesh.settings.get("acceleration_ironing"), + .jerk = mesh.settings.get("jerk_ironing") } } + +{ + infill_config.reserve(MAX_INFILL_COMBINE); + + for (const auto combine_idx : ranges::views::iota(1, MAX_INFILL_COMBINE + 1)) + { + infill_config.emplace_back(GCodePathConfig{ + .type = PrintFeatureType::Infill, + .line_width = static_cast( + mesh.settings.get("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get("infill_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("infill_material_flow") * (layer_nr == 0 ? mesh.settings.get("material_flow_layer_0") : Ratio{ 1.0 }) * combine_idx, + .speed_derivatives = { .speed = mesh.settings.get("speed_infill"), + .acceleration = mesh.settings.get("acceleration_infill"), + .jerk = mesh.settings.get("jerk_infill") } }); + } +} + +} // namespace cura \ No newline at end of file diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 9d253f83b4..382eacb827 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -32,119 +32,6 @@ std::vector PathConfigStorage::getLineWidthFactorPerExtruder(const LayerI return ret; } -MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t layer_thickness, const LayerIndex& layer_nr, const std::vector& line_width_factor_per_extruder) - : inset0_config( - PrintFeatureType::OuterWall, - mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("wall_0_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = mesh.settings.get("speed_wall_0"), - .acceleration = mesh.settings.get("acceleration_wall_0"), - .jerk = mesh.settings.get("jerk_wall_0") }) - , insetX_config( - PrintFeatureType::InnerWall, - mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("wall_x_material_flow") * ((layer_nr == 0) ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = mesh.settings.get("speed_wall_x"), - .acceleration = mesh.settings.get("acceleration_wall_x"), - .jerk = mesh.settings.get("jerk_wall_x") }) - , bridge_inset0_config( - PrintFeatureType::OuterWall, - mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("bridge_wall_material_flow"), - SpeedDerivatives{ .speed = mesh.settings.get("bridge_wall_speed"), - .acceleration = mesh.settings.get("acceleration_wall_0"), - .jerk = mesh.settings.get("jerk_wall_0") }, - true // is_bridge_path - , - mesh.settings.get("bridge_fan_speed") * 100.0) - , bridge_insetX_config( - PrintFeatureType::InnerWall, - mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("bridge_wall_material_flow"), - SpeedDerivatives{ .speed = mesh.settings.get("bridge_wall_speed"), - .acceleration = mesh.settings.get("acceleration_wall_x"), - .jerk = mesh.settings.get("jerk_wall_x") }, - true // is_bridge_path - , - mesh.settings.get("bridge_fan_speed") * 100.0) - , skin_config( - PrintFeatureType::Skin, - mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("skin_material_flow") * ((layer_nr == 0) ? mesh.settings.get("skin_material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = mesh.settings.get("speed_topbottom"), - .acceleration = mesh.settings.get("acceleration_topbottom"), - .jerk = mesh.settings.get("jerk_topbottom") }) - , bridge_skin_config( // use bridge skin flow, speed and fan - PrintFeatureType::Skin, - mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("bridge_skin_material_flow"), - SpeedDerivatives{ .speed = mesh.settings.get("bridge_skin_speed"), - .acceleration = mesh.settings.get("acceleration_topbottom"), - .jerk = mesh.settings.get("jerk_topbottom") }, - true // is_bridge_path - , - mesh.settings.get("bridge_fan_speed") * 100.0) - , bridge_skin_config2( // use bridge skin 2 flow, speed and fan - PrintFeatureType::Skin, - mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("bridge_skin_material_flow_2"), - SpeedDerivatives{ .speed = mesh.settings.get("bridge_skin_speed_2"), - .acceleration = mesh.settings.get("acceleration_topbottom"), - .jerk = mesh.settings.get("jerk_topbottom") }, - true // is_bridge_path - , - mesh.settings.get("bridge_fan_speed_2") * 100.0) - , bridge_skin_config3( // use bridge skin 3 flow, speed and fan - PrintFeatureType::Skin, - mesh.settings.get("skin_line_width") * line_width_factor_per_extruder[mesh.settings.get("top_bottom_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("bridge_skin_material_flow_3"), - SpeedDerivatives{ .speed = mesh.settings.get("bridge_skin_speed_3"), - .acceleration = mesh.settings.get("acceleration_topbottom"), - .jerk = mesh.settings.get("jerk_topbottom") }, - true // is_bridge_path - , - mesh.settings.get("bridge_fan_speed_3") * 100.0) - , roofing_config( - PrintFeatureType::Skin, - mesh.settings.get("roofing_line_width"), - layer_thickness, - mesh.settings.get("roofing_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = mesh.settings.get("speed_roofing"), - .acceleration = mesh.settings.get("acceleration_roofing"), - .jerk = mesh.settings.get("jerk_roofing") }) - , ironing_config( - PrintFeatureType::Skin, - mesh.settings.get("ironing_line_spacing"), - layer_thickness, - mesh.settings.get("ironing_flow"), - SpeedDerivatives{ .speed = mesh.settings.get("speed_ironing"), - .acceleration = mesh.settings.get("acceleration_ironing"), - .jerk = mesh.settings.get("jerk_ironing") }) - -{ - infill_config.reserve(MAX_INFILL_COMBINE); - - for (int combine_idx = 0; combine_idx < MAX_INFILL_COMBINE; combine_idx++) - { - infill_config.emplace_back( - PrintFeatureType::Infill, - mesh.settings.get("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get("infill_extruder_nr").extruder_nr], - layer_thickness, - mesh.settings.get("infill_material_flow") * ((layer_nr == 0) ? mesh.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), - SpeedDerivatives{ .speed = mesh.settings.get("speed_infill"), - .acceleration = mesh.settings.get("acceleration_infill"), - .jerk = mesh.settings.get("jerk_infill") }); - } -} - PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const LayerIndex& layer_nr, const coord_t layer_thickness) : support_infill_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_infill_extruder_nr").extruder_nr) , support_roof_extruder_nr(Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_roof_extruder_nr").extruder_nr) diff --git a/tests/ExtruderPlanTest.cpp b/tests/ExtruderPlanTest.cpp index f5e1223816..026d87f0e4 100644 --- a/tests/ExtruderPlanTest.cpp +++ b/tests/ExtruderPlanTest.cpp @@ -74,19 +74,56 @@ class ExtruderPlanTestPathCollection : extrusion_config(PrintFeatureType::OuterWall, 400, 100, 1.0_r, SpeedDerivatives(50.0, 1000.0, 10.0)) , travel_config(PrintFeatureType::MoveCombing, 0, 100, 0.0_r, SpeedDerivatives(120.0, 5000.0, 30.0)) { - const SliceMeshStorage* mesh = nullptr; + std::shared_ptr mesh = nullptr; constexpr Ratio flow_1 = 1.0_r; constexpr Ratio width_1 = 1.0_r; constexpr bool no_spiralize = false; constexpr Ratio speed_1 = 1.0_r; - square.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::PolyLines, flow_1, width_1, no_spiralize, speed_1) }); + square.assign({ GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::PolyLines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 } }); + square.back().points = { Point(0, 0), Point(1000, 0), Point(1000, 1000), Point(0, 1000), Point(0, 0) }; - lines.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1) }); + lines.assign({ GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = travel_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = travel_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 } }); lines[0].points = { Point(0, 0), Point(1000, 0) }; lines[1].points = { Point(1000, 0), Point(1000, 400) }; lines[2].points = { Point(1000, 400), Point(0, 400) }; @@ -96,11 +133,41 @@ class ExtruderPlanTestPathCollection constexpr Ratio flow_12 = 1.2_r; constexpr Ratio flow_08 = 0.8_r; constexpr Ratio flow_04 = 0.4_r; - decreasing_flow.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_12, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_08, width_1, no_spiralize, speed_1), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_04, width_1, no_spiralize, speed_1) }); + decreasing_flow.assign({ GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_12, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = travel_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_08, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = travel_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_04, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 } }); decreasing_flow[0].points = { Point(0, 0), Point(1000, 0) }; decreasing_flow[1].points = { Point(1000, 0), Point(1000, 400) }; decreasing_flow[2].points = { Point(1000, 400), Point(0, 400) }; @@ -110,11 +177,41 @@ class ExtruderPlanTestPathCollection constexpr Ratio speed_12 = 1.2_r; constexpr Ratio speed_08 = 0.8_r; constexpr Ratio speed_04 = 0.4_r; - decreasing_speed.assign({ GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_12), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_08), - GCodePath(travel_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_04) }); + decreasing_speed.assign({ GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_12 }, + GCodePath{ .config = travel_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_08 }, + GCodePath{ .config = travel_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_04 } }); decreasing_speed[0].points = { Point(0, 0), Point(1000, 0) }; decreasing_speed[1].points = { Point(1000, 0), Point(1000, 400) }; decreasing_speed[2].points = { Point(1000, 400), Point(0, 400) }; @@ -122,12 +219,48 @@ class ExtruderPlanTestPathCollection decreasing_speed[4].points = { Point(0, 800), Point(1000, 800) }; variable_width.assign({ - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, flow_1, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.8_r, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.6_r, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.4_r, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.2_r, width_1, no_spiralize, speed_1), - GCodePath(extrusion_config, mesh, SpaceFillType::Lines, 0.0_r, width_1, no_spiralize, speed_1), + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = flow_1, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = 0.8_r, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = 0.6_r, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = 0.4_r, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = 0.2_r, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, + GCodePath{ .config = extrusion_config, + .mesh = mesh, + .space_fill_type = SpaceFillType::Lines, + .flow = 0.0_r, + .width_factor = width_1, + .spiralize = no_spiralize, + .speed_factor = speed_1 }, }); variable_width[0].points = { Point(0, 0), Point(1000, 0) }; variable_width[1].points = { Point(1000, 0), Point(2000, 0) }; From ae2473d72a6ccb5f16cdd3aab41e6ef4888005ba Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 22 Aug 2023 18:59:43 +0200 Subject: [PATCH 257/470] Map mesh to new gcode-paths CURA-10446 --- include/plugins/converters.h | 9 ++-- include/plugins/pluginproxy.h | 55 ++++++++++++++++++++++-- include/plugins/slotproxy.h | 17 +++++++- include/plugins/slots.h | 6 +-- src/LayerPlan.cpp | 2 +- src/communication/ArcusCommunication.cpp | 6 ++- src/plugins/converters.cpp | 27 +++++++++--- 7 files changed, 100 insertions(+), 22 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 204925a2be..36a89b9df9 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -87,7 +87,7 @@ struct simplify_request : public details::converter { - native_value_type operator()(const value_type& message) const; + native_value_type operator()([[maybe_unused]] native_value_type& original_value, const value_type& message) const; }; struct postprocess_request : public details::converter @@ -97,7 +97,7 @@ struct postprocess_request : public details::converter { - native_value_type operator()(const value_type& message) const; + native_value_type operator()([[maybe_unused]] native_value_type& original_value, const value_type& message) const; }; struct infill_generate_request : public details::converter @@ -113,17 +113,18 @@ struct infill_generate_response struct gcode_paths_modify_request : public details::converter> { - [[nodsicard]] static constexpr v0::SpaceFillType getSpaceFillType(const SpaceFillType space_fill_type) noexcept; + [[nodiscard]] static constexpr v0::SpaceFillType getSpaceFillType(const SpaceFillType space_fill_type) noexcept; [[nodiscard]] static constexpr v0::PrintFeature getPrintFeature(const PrintFeatureType print_feature_type) noexcept; value_type operator()(const native_value_type& gcode, const size_t extruder_nr, const LayerIndex layer_nr) const; }; struct gcode_paths_modify_response : public details::converter> { + [[nodiscard]] static constexpr PrintFeatureType getPrintFeatureType(const v0::PrintFeature feature) noexcept; [[nodiscard]] static GCodePathConfig buildConfig(const v0::GCodePath& path); [[nodiscard]] static constexpr SpaceFillType getSpaceFillType(const v0::SpaceFillType space_fill_type) noexcept; - native_value_type operator()(const value_type& message) const; + native_value_type operator()(native_value_type& original_value, const value_type& message) const; }; } // namespace cura::plugins diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index c457b935d9..102e76833f 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -165,7 +165,7 @@ class PluginProxy } ~PluginProxy() = default; - value_type invoke(auto&&... args) + value_type generate(auto&&... args) { agrpc::GrpcContext grpc_context; value_type ret_value{}; @@ -175,7 +175,40 @@ class PluginProxy grpc_context, [this, &grpc_context, &status, &ret_value, &args...]() { - return this->invokeCall(grpc_context, status, ret_value, std::forward(args)...); + return this->generateCall(grpc_context, status, ret_value, std::forward(args)...); + }, + boost::asio::detached); + grpc_context.run(); + + if (! status.ok()) // TODO: handle different kind of status codes + { + if (plugin_info_.has_value()) + { + spdlog::error( + "Plugin '{}' running at [{}] for slot {} failed with error: {}", + plugin_info_.value().plugin_name, + plugin_info_.value().peer, + slot_info_.slot_id, + status.error_message()); + throw exceptions::RemoteException(slot_info_, plugin_info_.value(), status.error_message()); + } + spdlog::error("Plugin for slot {} failed with error: {}", slot_info_.slot_id, status.error_message()); + throw exceptions::RemoteException(slot_info_, status.error_message()); + } + return ret_value; + } + + value_type modify(auto& original_value, auto&&... args) + { + agrpc::GrpcContext grpc_context; + value_type ret_value{}; + grpc::Status status; + + boost::asio::co_spawn( + grpc_context, + [this, &grpc_context, &status, &ret_value, &original_value, &args...]() + { + return this->modifyCall(grpc_context, status, ret_value, original_value, std::forward(args)...); }, boost::asio::detached); grpc_context.run(); @@ -256,7 +289,7 @@ class PluginProxy * @param args - Request arguments * @return A boost::asio::awaitable indicating completion of the operation */ - boost::asio::awaitable invokeCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) + boost::asio::awaitable generateCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto&&... args) { using RPC = agrpc::ClientRPC<&invoke_stub_t::PrepareAsyncCall>; grpc::ClientContext client_context{}; @@ -272,6 +305,22 @@ class PluginProxy co_return; } + boost::asio::awaitable modifyCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, value_type& ret_value, auto& original_value, auto&&... args) + { + using RPC = agrpc::ClientRPC<&invoke_stub_t::PrepareAsyncCall>; + grpc::ClientContext client_context{}; + prep_client_context(client_context, slot_info_); + + // Construct request + auto request{ req_(original_value, std::forward(args)...) }; + + // Make unary request + rsp_msg_type response; + status = co_await RPC::request(grpc_context, invoke_stub_, client_context, request, response, boost::asio::use_awaitable); + ret_value = std::move(rsp_(original_value, response)); + co_return; + } + template boost::asio::awaitable broadcastCall(agrpc::GrpcContext& grpc_context, grpc::Status& status, auto&&... args) { diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 6562f7660a..84ba7846c3 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -74,15 +74,28 @@ class SlotProxy * @param args The arguments for the plugin request. * @return The result of the plugin request or the default behavior. */ - constexpr auto invoke(auto&&... args) + constexpr auto generate(auto&&... args) { if (plugin_.has_value()) { - return plugin_.value().invoke(std::forward(args)...); + return plugin_.value().generate(std::forward(args)...); } return std::invoke(default_process, std::forward(args)...); } + constexpr auto modify(auto& original_value, auto&&... args) + { + if (plugin_.has_value()) + { + return plugin_.value().modify(original_value, std::forward(args)...); + } + if constexpr (sizeof...(args) == 0) + { + return std::invoke(default_process, original_value); + } + return std::invoke(default_process, original_value, std::forward(args)...); + } + template void broadcast(auto&&... args) { diff --git a/include/plugins/slots.h b/include/plugins/slots.h index c02f50ece2..5b99ab52b0 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -150,15 +150,15 @@ class Registry, Unit> : public Registry } template - constexpr auto modify(auto&&... args) + constexpr auto modify(auto& original_value, auto&&... args) { - return get().invoke(std::forward(args)...); + return get().modify(original_value, std::forward(args)...); } template constexpr auto generate(auto&&... args) { - return get().invoke(std::forward(args)...); + return get().generate(std::forward(args)...); } void connect(const v0::SlotID& slot_id, auto name, auto& version, auto&& channel) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 58e2eda6c5..0cfda2bd4b 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1910,7 +1910,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; - extruder_plan.paths = slots::instance().generate(extruder_plan.paths, extruder_plan.extruder_nr, layer_nr); + extruder_plan.paths = slots::instance().modify(extruder_plan.paths, extruder_plan.extruder_nr, layer_nr); // Since the time/material estimates _may_ have changed during the plugin modify step we recalculate it extruder_plan.computeNaiveTimeEstimates(gcode.getPositionXY()); diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index c01222bd94..cf17d69454 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -342,7 +342,8 @@ void ArcusCommunication::beginGCode() void ArcusCommunication::flushGCode() { - const std::string& message_str = slots::instance().modify(private_data->gcode_output_stream.str()); + std::string gcode_output_stream = private_data->gcode_output_stream.str(); + auto message_str = slots::instance().modify(gcode_output_stream); if (message_str.size() == 0) { return; @@ -375,7 +376,8 @@ void ArcusCommunication::sendCurrentPosition(const Point& position) void ArcusCommunication::sendGCodePrefix(const std::string& prefix) const { std::shared_ptr message = std::make_shared(); - message->set_data(slots::instance().modify(prefix)); + std::string message_str = prefix; + message->set_data(slots::instance().modify(message_str)); private_data->socket->sendMessage(message); } diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 1083256e44..9605f1964c 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -13,6 +13,7 @@ #include "utils/polygon.h" #include +#include #include namespace cura::plugins @@ -123,7 +124,8 @@ simplify_request::value_type return message; } -simplify_response::native_value_type simplify_response::operator()(const simplify_response::value_type& message) const +simplify_response::native_value_type + simplify_response::operator()([[maybe_unused]] simplify_response::native_value_type& original_value, const simplify_response::value_type& message) const { native_value_type poly{}; for (const auto& paths : message.polygons().polygons()) @@ -155,7 +157,8 @@ postprocess_request::value_type postprocess_request::operator()(const postproces return message; } -postprocess_response::native_value_type postprocess_response::operator()(const postprocess_response::value_type& message) const +postprocess_response::native_value_type + postprocess_response::operator()([[maybe_unused]] postprocess_response::native_value_type& original_value, const postprocess_response::value_type& message) const { return message.gcode_word(); } @@ -279,7 +282,7 @@ infill_generate_response::native_value_type infill_generate_response::operator() } } -[[nodsicard]] constexpr v0::PrintFeature gcode_paths_modify_request::getPrintFeature(const cura::PrintFeatureType print_feature_type) noexcept +[[nodiscard]] constexpr v0::PrintFeature gcode_paths_modify_request::getPrintFeature(const cura::PrintFeatureType print_feature_type) noexcept { switch (print_feature_type) { @@ -332,7 +335,7 @@ gcode_paths_modify_request::value_type gcode_path->set_width_factor(path.width_factor); gcode_path->set_spiralize(path.spiralize); gcode_path->set_speed_factor(path.speed_factor); - + gcode_path->set_mesh_name(path.mesh ? path.mesh->mesh_name : ""); // Construct the OpenPath from the points in a GCodePath for (const auto& point : path.points) { @@ -428,12 +431,22 @@ gcode_paths_modify_request::value_type .fan_speed = fan_speed }; } -gcode_paths_modify_response::native_value_type gcode_paths_modify_response::operator()(const gcode_paths_modify_response::value_type& message) const +gcode_paths_modify_response::native_value_type + gcode_paths_modify_response::operator()(gcode_paths_modify_response::native_value_type& original_value, const gcode_paths_modify_response::value_type& message) const { std::vector paths; + using map_t = std::unordered_map>; + auto meshes = original_value + | ranges::views::filter([](const auto& path){ return path.mesh != nullptr; }) + | ranges::views::transform( + [](const auto& path) -> map_t::value_type + { + return { path.mesh->mesh_name, path.mesh }; + }) + | ranges::to; + for (const auto& gcode_path_msg : message.gcode_paths()) { - const std::shared_ptr mesh = nullptr; const GCodePathConfig config = buildConfig(gcode_path_msg); const Ratio flow = gcode_path_msg.flow(); const Ratio width_factor = gcode_path_msg.width_factor(); @@ -441,7 +454,7 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::oper const Ratio speed_factor = gcode_path_msg.speed_factor(); const auto space_fill_type = getSpaceFillType(gcode_path_msg.space_fill_type()); GCodePath path{ .config = config, - .mesh = mesh, + .mesh = gcode_path_msg.mesh_name().empty() ? nullptr : meshes.at(gcode_path_msg.mesh_name()), .space_fill_type = space_fill_type, .flow = flow, .width_factor = width_factor, From 12b86855f73123618d3fa02185faeafe8383d53a Mon Sep 17 00:00:00 2001 From: jellespijker Date: Tue, 22 Aug 2023 17:00:19 +0000 Subject: [PATCH 258/470] Applied clang-format. --- include/plugins/converters.h | 1 - src/plugins/converters.cpp | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 36a89b9df9..9f76c71b5f 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -120,7 +120,6 @@ struct gcode_paths_modify_request : public details::converter> { - [[nodiscard]] static constexpr PrintFeatureType getPrintFeatureType(const v0::PrintFeature feature) noexcept; [[nodiscard]] static GCodePathConfig buildConfig(const v0::GCodePath& path); [[nodiscard]] static constexpr SpaceFillType getSpaceFillType(const v0::SpaceFillType space_fill_type) noexcept; diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 9605f1964c..d13c07d92e 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -437,7 +437,11 @@ gcode_paths_modify_response::native_value_type std::vector paths; using map_t = std::unordered_map>; auto meshes = original_value - | ranges::views::filter([](const auto& path){ return path.mesh != nullptr; }) + | ranges::views::filter( + [](const auto& path) + { + return path.mesh != nullptr; + }) | ranges::views::transform( [](const auto& path) -> map_t::value_type { From a0cfe1d40fe2e8ee67b5cf9afac0ae09ed789098 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 23 Aug 2023 01:37:19 +0200 Subject: [PATCH 259/470] Check configs CURA-10446 --- src/LayerPlan.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 0cfda2bd4b..f4ed218f36 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -108,8 +108,7 @@ GCodePath* LayerPlan::getLatestPathWithConfig( const Ratio speed_factor) { std::vector& paths = extruder_plans.back().paths; - // TODO put back config equality check - if (paths.size() > 0 /*&& paths.back().config == config*/ && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor + if (paths.size() > 0 && paths.back().config == config && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between { return &paths.back(); From 8e205a46a9ed2869b3f22d845b334fb7a615d48b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 23 Aug 2023 16:21:16 +0200 Subject: [PATCH 260/470] Refactor the ExtruderPlan and Infill class to use shared pointers instead of raw pointers In response to eliminating possible memory leaks and improving code quality, the 'ExtruderPlan' and 'infills' classes have been refactored to utilize standard smart pointers (shared_ptr) in lieu with raw pointers. The change affects the 'ExtruderPlan' and 'SierpinskiFillProvider' raw pointers been switched to use 'std::shared_ptr'. Additional changes include the removal of explicit destructors where necessary as shared_ptr manages the lifetime of the objects, ensuring proper clean up when they're no longer in use. Contributes to CURA-10446 --- CMakeLists.txt | 1 + include/ExtruderPlan.h | 212 +++++++++++++++++++++++++++++ include/LayerPlan.h | 192 ++------------------------ include/LayerPlanBuffer.h | 8 +- include/TreeSupportTipGenerator.h | 15 +- include/TreeSupportUtils.h | 5 +- include/infill.h | 10 +- include/infill/LightningLayer.h | 7 +- include/infill/LightningTreeNode.h | 9 +- include/infill/SubDivCube.h | 8 +- include/sliceDataStorage.h | 15 +- src/ExtruderPlan.cpp | 73 ++++++++++ src/FffGcodeWriter.cpp | 8 +- src/FffPolygonGenerator.cpp | 6 +- src/LayerPlan.cpp | 65 --------- src/TreeSupportTipGenerator.cpp | 9 +- src/infill.cpp | 10 +- src/infill/LightningTreeNode.cpp | 6 +- src/infill/SubDivCube.cpp | 15 +- src/sliceDataStorage.cpp | 19 --- src/support.cpp | 4 +- 21 files changed, 353 insertions(+), 344 deletions(-) create mode 100644 include/ExtruderPlan.h create mode 100644 src/ExtruderPlan.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index a27876f7f8..86cc733242 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ set(engine_SRCS # Except main.cpp. src/Application.cpp src/bridge.cpp src/ConicalOverhang.cpp + src/ExtruderPlan.cpp src/ExtruderTrain.cpp src/FffGcodeWriter.cpp src/FffPolygonGenerator.cpp diff --git a/include/ExtruderPlan.h b/include/ExtruderPlan.h new file mode 100644 index 0000000000..6f3155148e --- /dev/null +++ b/include/ExtruderPlan.h @@ -0,0 +1,212 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#ifndef EXTRUDERPLAN_H +#define EXTRUDERPLAN_H + +#include "FanSpeedLayerTime.h" +#include "RetractionConfig.h" +#include "gcodeExport.h" +#include "pathPlanning/GCodePath.h" +#include "pathPlanning/NozzleTempInsert.h" +#include "pathPlanning/TimeMaterialEstimates.h" +#include "settings/types/LayerIndex.h" +#include "settings/types/Ratio.h" +#include "utils/IntPoint.h" + +#ifdef BUILD_TESTS +#include //Friend tests, so that they can inspect the privates. +#endif + +#include +#include +#include +#include + +namespace cura +{ +class LayerPlanBuffer; +class LayerPlan; +/*! + * An extruder plan contains all planned paths (GCodePath) pertaining to a single extruder train. + * + * It allows for temperature command inserts which can be inserted in between paths. + */ +class ExtruderPlan +{ + friend class LayerPlanBuffer; + friend class LayerPlan; +#ifdef BUILD_TESTS + friend class ExtruderPlanPathsParameterizedTest; + FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationZeroIsUncompensated); + FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationFull); + FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationHalf); + FRIEND_TEST(ExtruderPlanTest, BackPressureCompensationEmptyPlan); +#endif +public: + size_t extruder_nr{ 0 }; //!< The extruder used for this paths in the current plan. + + ExtruderPlan() noexcept = default; + + /*! + * Simple contructor. + * + * \warning Doesn't set the required temperature yet. + * + * \param extruder The extruder number for which this object is a plan. + * \param layer_nr The layer index of the layer that this extruder plan is + * part of. + * \param is_raft_layer Whether this extruder plan is part of a raft layer. + */ + ExtruderPlan( + const size_t extruder, + const LayerIndex layer_nr, + const bool is_initial_layer, + const bool is_raft_layer, + const coord_t layer_thickness, + const FanSpeedLayerTimeSettings& fan_speed_layer_time_settings, + const RetractionConfig& retraction_config); + + + void insertCommand(NozzleTempInsert&& insert); + + /*! + * Insert the inserts into gcode which should be inserted before \p path_idx + * + * \param path_idx The index into ExtruderPlan::paths which is currently being consider for temperature command insertion + * \param gcode The gcode exporter to which to write the temperature command. + * \param cumulative_path_time The time spend on this path up to this point. + */ + void handleInserts(const size_t path_idx, GCodeExport& gcode, const double cumulative_path_time = std::numeric_limits::infinity()); + + /*! + * Insert all remaining temp inserts into gcode, to be called at the end of an extruder plan + * + * Inserts temperature commands which should be inserted _after_ the last path. + * Also inserts all temperatures which should have been inserted earlier, + * but for which ExtruderPlan::handleInserts hasn't been called correctly. + * + * \param gcode The gcode exporter to which to write the temperature command. + */ + void handleAllRemainingInserts(GCodeExport& gcode); + + /*! + * Applying fan speed changes for minimal layer times. + * + * \param starting_position The position the head was before starting this extruder plan + * \param minTime Maximum minimum layer time for all extruders in this layer + * \param time_other_extr_plans The time spent on the other extruder plans in this layer + */ + void processFanSpeedForMinimalLayerTime(Point starting_position, Duration maximum_cool_min_layer_time, double time_other_extr_plans); + + /*! + * Applying fan speed changes for the first layers. + */ + void processFanSpeedForFirstLayers(); + + /*! + * Get the fan speed computed for this extruder plan + * + * \warning assumes ExtruderPlan::processFanSpeedForMinimalLayerTime has already been called + * + * \return The fan speed computed in processFanSpeedForMinimalLayerTime + */ + double getFanSpeed(); + + /*! + * Apply back-pressure compensation to this path. + * Since the total (filament) pressure in a feeder-system is not only dependent on the pressure that exists between the nozzle and the + * feed-mechanism (which should be near-constant on a bowden style setup), but _also_ between the nozzle and the last-printed layer. + * This last type is called 'back-pressure'. In this function, properties of the path-outflow are adjusted so that the back-pressure is + * compensated for. This is conjectured to be especially important if the printer has a Bowden-tube style setup. + * + * \param The amount of back-pressure compensation as a ratio. 'Applying' a value of 0 is a no-op. + */ + void applyBackPressureCompensation(const Ratio back_pressure_compensation); + +private: + LayerIndex layer_nr{ 0 }; //!< The layer number at which we are currently printing. + bool is_initial_layer{ false }; //!< Whether this extruder plan is printed on the very first layer (which might be raft) + bool is_raft_layer{ false }; //!< Whether this is a layer which is part of the raft + + coord_t layer_thickness{ 200 }; //!< The thickness of this layer in Z-direction + + FanSpeedLayerTimeSettings fan_speed_layer_time_settings{}; //!< The fan speed and layer time settings used to limit this extruder plan + + RetractionConfig retraction_config{}; //!< The retraction settings for the extruder of this plan + + + std::vector paths; //!< The paths planned for this extruder + std::list inserts; //!< The nozzle temperature command inserts, to be inserted in between segments + double heated_pre_travel_time{ 0.0 }; //!< The time at the start of this ExtruderPlan during which the head travels and has a temperature of initial_print_temperature + + /*! + * The required temperature at the start of this extruder plan + * or the temp to which to heat gradually over the layer change between this plan and the previous with the same extruder. + * + * In case this extruder plan uses a different extruder than the last extruder plan: + * this is the temperature to which to heat and wait before starting this extruder. + * + * In case this extruder plan uses the same extruder as the previous extruder plan (previous layer): + * this is the temperature used to heat to gradually when moving from the previous extruder layer to the next. + * In that case no temperature (and wait) command will be inserted from this value, but a NozzleTempInsert is used instead. + * In this case this member is only used as a way to convey information between different calls of \ref LayerPlanBuffer::processBuffer + */ + double required_start_temperature{ -1.0 }; + std::optional extrusion_temperature{ std::nullopt }; //!< The normal temperature for printing this extruder plan. That start and end of this extruder plan may deviate + //!< because of the initial and final print temp (none if extruder plan has no extrusion moves) + std::optional::iterator> extrusion_temperature_command{ + std::nullopt + }; //!< The command to heat from the printing temperature of this extruder plan to the printing + //!< temperature of the next extruder plan (if it has the same extruder). + std::optional prev_extruder_standby_temp{ + std::nullopt + }; //!< The temperature to which to set the previous extruder. Not used if the previous extruder plan was the same extruder. + + TimeMaterialEstimates estimates{}; //!< Accumulated time and material estimates for all planned paths within this extruder plan. + double slowest_path_speed{ 0.0 }; + + double extraTime{ 0.0 }; //!< Extra waiting time at the and of this extruder plan, so that the filament can cool + + double fan_speed{ 0.0 }; //!< The fan speed to be used during this extruder plan + + double temperatureFactor{ 0.0 }; //!< Temperature reduction factor for small layers + + /*! + * Set the fan speed to be used while printing this extruder plan + * + * \param fan_speed The speed for the fan + */ + void setFanSpeed(double fan_speed); + + /*! + * Force the minimal layer time to hold by slowing down and lifting the head if required. + * + * \param maximum_cool_min_layer_time Maximum minimum layer time for all extruders in this layer + * \param time_other_extr_plans Time spend on other extruders in this layer + */ + void forceMinimalLayerTime(double maximum_cool_min_layer_time, double time_other_extr_plans); + + /*! + * @return The time needed for (un)retract the path + */ + double getRetractTime(const GCodePath& path); + + /*! + * @return distance between p0 and p1 as well as the time spend on the segment + */ + std::pair getPointToPointTime(const Point& p0, const Point& p1, const GCodePath& path); + + /*! + * Compute naive time estimates (without accounting for slow down at corners etc.) and naive material estimates. + * and store them in each ExtruderPlan and each GCodePath. + * + * \param starting_position The position the head was in before starting this layer + * \return the total estimates of this layer + */ + TimeMaterialEstimates computeNaiveTimeEstimates(Point starting_position); +}; + +} // namespace cura + +#endif // EXTRUDERPLAN_H diff --git a/include/LayerPlan.h b/include/LayerPlan.h index 42b5eb8d33..9a8be087f1 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -16,203 +16,25 @@ #include "settings/types/LayerIndex.h" #include "utils/ExtrusionJunction.h" #include "utils/polygon.h" +#include "ExtruderPlan.h" + +#ifdef BUILD_TESTS +#include //Friend tests, so that they can inspect the privates. +#endif #include #include #include #include #include -#ifdef BUILD_TESTS -#include //Friend tests, so that they can inspect the privates. -#endif namespace cura { class Comb; -class LayerPlan; // forward declaration so that ExtruderPlan can be a friend -class LayerPlanBuffer; // forward declaration so that ExtruderPlan can be a friend class SliceDataStorage; +class LayerPlanBuffer; -/*! - * An extruder plan contains all planned paths (GCodePath) pertaining to a single extruder train. - * - * It allows for temperature command inserts which can be inserted in between paths. - */ -class ExtruderPlan -{ - friend class LayerPlan; // TODO: LayerPlan still does a lot which should actually be handled in this class. - friend class LayerPlanBuffer; // TODO: LayerPlanBuffer handles paths directly -#ifdef BUILD_TESTS - friend class ExtruderPlanPathsParameterizedTest; - FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationZeroIsUncompensated); - FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationFull); - FRIEND_TEST(ExtruderPlanPathsParameterizedTest, BackPressureCompensationHalf); - FRIEND_TEST(ExtruderPlanTest, BackPressureCompensationEmptyPlan); -#endif -protected: - std::vector paths; //!< The paths planned for this extruder - std::list inserts; //!< The nozzle temperature command inserts, to be inserted in between segments - - double heated_pre_travel_time; //!< The time at the start of this ExtruderPlan during which the head travels and has a temperature of initial_print_temperature - - /*! - * The required temperature at the start of this extruder plan - * or the temp to which to heat gradually over the layer change between this plan and the previous with the same extruder. - * - * In case this extruder plan uses a different extruder than the last extruder plan: - * this is the temperature to which to heat and wait before starting this extruder. - * - * In case this extruder plan uses the same extruder as the previous extruder plan (previous layer): - * this is the temperature used to heat to gradually when moving from the previous extruder layer to the next. - * In that case no temperature (and wait) command will be inserted from this value, but a NozzleTempInsert is used instead. - * In this case this member is only used as a way to convey information between different calls of \ref LayerPlanBuffer::processBuffer - */ - double required_start_temperature; - std::optional extrusion_temperature; //!< The normal temperature for printing this extruder plan. That start and end of this extruder plan may deviate because of the - //!< initial and final print temp (none if extruder plan has no extrusion moves) - std::optional::iterator> extrusion_temperature_command; //!< The command to heat from the printing temperature of this extruder plan to the printing - //!< temperature of the next extruder plan (if it has the same extruder). - std::optional prev_extruder_standby_temp; //!< The temperature to which to set the previous extruder. Not used if the previous extruder plan was the same extruder. - - TimeMaterialEstimates estimates; //!< Accumulated time and material estimates for all planned paths within this extruder plan. - double slowest_path_speed; - -public: - size_t extruder_nr; //!< The extruder used for this paths in the current plan. - - /*! - * Simple contructor. - * - * \warning Doesn't set the required temperature yet. - * - * \param extruder The extruder number for which this object is a plan. - * \param layer_nr The layer index of the layer that this extruder plan is - * part of. - * \param is_raft_layer Whether this extruder plan is part of a raft layer. - */ - ExtruderPlan( - const size_t extruder, - const LayerIndex layer_nr, - const bool is_initial_layer, - const bool is_raft_layer, - const coord_t layer_thickness, - const FanSpeedLayerTimeSettings& fan_speed_layer_time_settings, - const RetractionConfig& retraction_config); - - - void insertCommand(auto&& insert) - { - inserts.emplace_back(std::forward(insert)); - } - - /*! - * Insert the inserts into gcode which should be inserted before \p path_idx - * - * \param path_idx The index into ExtruderPlan::paths which is currently being consider for temperature command insertion - * \param gcode The gcode exporter to which to write the temperature command. - * \param cumulative_path_time The time spend on this path up to this point. - */ - void handleInserts(const size_t path_idx, GCodeExport& gcode, const double& cumulative_path_time = std::numeric_limits::infinity()); - - /*! - * Insert all remaining temp inserts into gcode, to be called at the end of an extruder plan - * - * Inserts temperature commands which should be inserted _after_ the last path. - * Also inserts all temperatures which should have been inserted earlier, - * but for which ExtruderPlan::handleInserts hasn't been called correctly. - * - * \param gcode The gcode exporter to which to write the temperature command. - */ - void handleAllRemainingInserts(GCodeExport& gcode); - - /*! - * Applying fan speed changes for minimal layer times. - * - * \param starting_position The position the head was before starting this extruder plan - * \param minTime Maximum minimum layer time for all extruders in this layer - * \param time_other_extr_plans The time spent on the other extruder plans in this layer - */ - void processFanSpeedForMinimalLayerTime(Point starting_position, Duration maximum_cool_min_layer_time, double time_other_extr_plans); - - /*! - * Applying fan speed changes for the first layers. - */ - void processFanSpeedForFirstLayers(); - - /*! - * Get the fan speed computed for this extruder plan - * - * \warning assumes ExtruderPlan::processFanSpeedForMinimalLayerTime has already been called - * - * \return The fan speed computed in processFanSpeedForMinimalLayerTime - */ - double getFanSpeed(); - - /*! - * Apply back-pressure compensation to this path. - * Since the total (filament) pressure in a feeder-system is not only dependent on the pressure that exists between the nozzle and the - * feed-mechanism (which should be near-constant on a bowden style setup), but _also_ between the nozzle and the last-printed layer. - * This last type is called 'back-pressure'. In this function, properties of the path-outflow are adjusted so that the back-pressure is - * compensated for. This is conjectured to be especially important if the printer has a Bowden-tube style setup. - * - * \param The amount of back-pressure compensation as a ratio. 'Applying' a value of 0 is a no-op. - */ - void applyBackPressureCompensation(const Ratio back_pressure_compensation); - -protected: - LayerIndex layer_nr; //!< The layer number at which we are currently printing. - bool is_initial_layer; //!< Whether this extruder plan is printed on the very first layer (which might be raft) - const bool is_raft_layer; //!< Whether this is a layer which is part of the raft - - coord_t layer_thickness; //!< The thickness of this layer in Z-direction - - const FanSpeedLayerTimeSettings& fan_speed_layer_time_settings; //!< The fan speed and layer time settings used to limit this extruder plan - - const RetractionConfig& retraction_config; //!< The retraction settings for the extruder of this plan - - double extraTime; //!< Extra waiting time at the and of this extruder plan, so that the filament can cool - - double fan_speed; //!< The fan speed to be used during this extruder plan - - double temperatureFactor; //!< Temperature reduction factor for small layers - - /*! - * Set the fan speed to be used while printing this extruder plan - * - * \param fan_speed The speed for the fan - */ - void setFanSpeed(double fan_speed); - - /*! - * Force the minimal layer time to hold by slowing down and lifting the head if required. - * - * \param maximum_cool_min_layer_time Maximum minimum layer time for all extruders in this layer - * \param time_other_extr_plans Time spend on other extruders in this layer - */ - void forceMinimalLayerTime(double maximum_cool_min_layer_time, double time_other_extr_plans); - - /*! - * @return The time needed for (un)retract the path - */ - double getRetractTime(const GCodePath& path); - - /*! - * @return distance between p0 and p1 as well as the time spend on the segment - */ - std::pair getPointToPointTime(const Point& p0, const Point& p1, const GCodePath& path); - - /*! - * Compute naive time estimates (without accounting for slow down at corners etc.) and naive material estimates. - * and store them in each ExtruderPlan and each GCodePath. - * - * \param starting_position The position the head was in before starting this layer - * \return the total estimates of this layer - */ - TimeMaterialEstimates computeNaiveTimeEstimates(Point starting_position); -}; - -class LayerPlanBuffer; // forward declaration to prevent circular dependency /*! * The LayerPlan class stores multiple moves that are planned. @@ -227,7 +49,9 @@ class LayerPlanBuffer; // forward declaration to prevent circular dependency class LayerPlan : public NoCopy { friend class LayerPlanBuffer; +#ifdef BUILD_TESTS friend class AddTravelTest; +#endif public: const PathConfigStorage configs_storage; //!< The line configs for this layer for each feature type diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index 3f97b4e274..deb173c697 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -7,6 +7,8 @@ #include "Preheat.h" #include "settings/Settings.h" #include "settings/types/Duration.h" +#include "LayerPlan.h" +#include "ExtruderPlan.h" #include #include @@ -14,8 +16,8 @@ namespace cura { -class ExtruderPlan; -class LayerPlan; + + class GCodeExport; /*! @@ -33,6 +35,8 @@ class GCodeExport; */ class LayerPlanBuffer { + friend class LayerPlan; + friend class LayerPlanBuffer; GCodeExport& gcode; Preheat preheat_config; //!< the nozzle and material temperature settings for each extruder train. diff --git a/include/TreeSupportTipGenerator.h b/include/TreeSupportTipGenerator.h index 16985e90dc..e5118a0eec 100644 --- a/include/TreeSupportTipGenerator.h +++ b/include/TreeSupportTipGenerator.h @@ -1,3 +1,6 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + #ifndef TREESUPPORTTIPGENERATOR_H #define TREESUPPORTTIPGENERATOR_H @@ -25,14 +28,6 @@ class TreeSupportTipGenerator TreeSupportTipGenerator(const SliceDataStorage& storage, const SliceMeshStorage& mesh, TreeModelVolumes& volumes_); - ~ TreeSupportTipGenerator() - { - if (cross_fill_provider) - { - delete cross_fill_provider; - } - } - /*! * \brief Generate tips, that will later form branches * @@ -116,7 +111,7 @@ class TreeSupportTipGenerator * \param line_width[in] What is the width of a line used in the infill. * \return A valid CrossInfillProvider. Has to be freed manually to avoid a memory leak. */ - SierpinskiFillProvider* generateCrossFillProvider(const SliceMeshStorage& mesh, coord_t line_distance, coord_t line_width) const; + std::shared_ptr generateCrossFillProvider(const SliceMeshStorage& mesh, coord_t line_distance, coord_t line_width) const; /*! @@ -276,7 +271,7 @@ class TreeSupportTipGenerator /*! * \brief Required to generate cross infill patterns */ - SierpinskiFillProvider* cross_fill_provider; + std::shared_ptr cross_fill_provider; /*! * \brief Map that saves locations of already inserted tips. Used to prevent tips far to close together from being added. diff --git a/include/TreeSupportUtils.h b/include/TreeSupportUtils.h index 2f6378dc20..f2a58a16de 100644 --- a/include/TreeSupportUtils.h +++ b/include/TreeSupportUtils.h @@ -1,3 +1,6 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + #ifndef TREESUPPORTTUTILS_H #define TREESUPPORTTUTILS_H @@ -95,7 +98,7 @@ class TreeSupportUtils * todo doku * \return A Polygons object that represents the resulting infill lines. */ - [[nodiscard]] static Polygons generateSupportInfillLines(const Polygons& area,const TreeSupportSettings& config, bool roof, LayerIndex layer_idx, coord_t support_infill_distance, SierpinskiFillProvider* cross_fill_provider, bool include_walls, bool generate_support_supporting = false) + [[nodiscard]] static Polygons generateSupportInfillLines(const Polygons& area,const TreeSupportSettings& config, bool roof, LayerIndex layer_idx, coord_t support_infill_distance, std::shared_ptr cross_fill_provider, bool include_walls, bool generate_support_supporting = false) { Polygons gaps; // As we effectivly use lines to place our supportPoints we may use the Infill class for it, while not made for it, it works perfectly. diff --git a/include/infill.h b/include/infill.h index 704735e95d..df626001d6 100644 --- a/include/infill.h +++ b/include/infill.h @@ -203,8 +203,8 @@ class Infill const Settings& settings, int layer_idx, SectionType section_type, - const SierpinskiFillProvider* cross_fill_provider = nullptr, - const LightningLayer* lightning_layer = nullptr, + const std::shared_ptr cross_fill_provider = nullptr, + const std::shared_ptr lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! @@ -238,8 +238,8 @@ class Infill Polygons& result_polygons, Polygons& result_lines, const Settings& settings, - const SierpinskiFillProvider* cross_fill_pattern = nullptr, - const LightningLayer* lightning_layer = nullptr, + const std::shared_ptr cross_fill_pattern = nullptr, + const std::shared_ptr lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! @@ -358,7 +358,7 @@ class Infill * see https://hal.archives-ouvertes.fr/hal-02155929/document * \param result (output) The resulting polygons */ - void generateLightningInfill(const LightningLayer* lightning_layer, Polygons& result_lines); + void generateLightningInfill(const std::shared_ptr lightning_layer, Polygons& result_lines); /*! * Generate sparse concentric infill diff --git a/include/infill/LightningLayer.h b/include/infill/LightningLayer.h index 2ef03a4e0c..beffe612a4 100644 --- a/include/infill/LightningLayer.h +++ b/include/infill/LightningLayer.h @@ -1,11 +1,12 @@ -//Copyright (c) 2021 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef LIGHTNING_LAYER_H #define LIGHTNING_LAYER_H #include "../utils/polygonUtils.h" #include "../utils/SquareGrid.h" +#include "infill/LightningTreeNode.h" #include #include @@ -14,8 +15,6 @@ namespace cura { -class LightningTreeNode; - using LightningTreeNodeSPtr = std::shared_ptr; using SparseLightningTreeNodeGrid = SparsePointGridInclusive>; diff --git a/include/infill/LightningTreeNode.h b/include/infill/LightningTreeNode.h index b24f1e37c5..1a36729468 100644 --- a/include/infill/LightningTreeNode.h +++ b/include/infill/LightningTreeNode.h @@ -1,5 +1,5 @@ -//Copyright (c) 2021 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef LIGHTNING_TREE_NODE_H #define LIGHTNING_TREE_NODE_H @@ -17,10 +17,6 @@ namespace cura constexpr coord_t locator_cell_size = 4000; -class LightningTreeNode; - -using LightningTreeNodeSPtr = std::shared_ptr; - // NOTE: As written, this struct will only be valid for a single layer, will have to be updated for the next. // NOTE: Reasons for implementing this with some separate closures: // - keep clear deliniation during development @@ -37,6 +33,7 @@ using LightningTreeNodeSPtr = std::shared_ptr; */ class LightningTreeNode : public std::enable_shared_from_this { + using LightningTreeNodeSPtr = std::shared_ptr; public: // Workaround for private/protected constructors and 'make_shared': https://stackoverflow.com/a/27832765 template LightningTreeNodeSPtr static create(Arg&&...arg) diff --git a/include/infill/SubDivCube.h b/include/infill/SubDivCube.h index 4b1b31ef52..d2c7d60f16 100644 --- a/include/infill/SubDivCube.h +++ b/include/infill/SubDivCube.h @@ -1,5 +1,5 @@ -// Copyright (c) 2018 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef INFILL_SUBDIVCUBE_H #define INFILL_SUBDIVCUBE_H @@ -26,8 +26,6 @@ class SubDivCube */ SubDivCube(SliceMeshStorage& mesh, Point3& center, size_t depth); - ~SubDivCube(); //!< destructor (also destroys children) - /*! * Precompute the octree of subdivided cubes * \param mesh contains infill layer data and settings @@ -98,7 +96,7 @@ class SubDivCube size_t depth; //!< the recursion depth of the cube (0 is most recursed) Point3 center; //!< center location of the cube in absolute coordinates - SubDivCube* children[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; //!< pointers to this cube's eight octree children + std::array, 8> children; //!< pointers to this cube's eight octree children static std::vector cube_properties_per_recursion_step; //!< precomputed array of basic properties of cubes based on recursion depth. static Ratio radius_multiplier; //!< multiplier for the bounding radius when determining if a cube should be subdivided static Point3Matrix rotation_matrix; //!< The rotation matrix to get from axis aligned cubes to cubes standing on a corner point aligned with the infill_angle diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index b34c722fbf..b4f674e2e3 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -1,11 +1,12 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef SLICE_DATA_STORAGE_H #define SLICE_DATA_STORAGE_H #include #include +#include #include "PrimeTower.h" #include "RetractionConfig.h" @@ -231,7 +232,7 @@ class SupportStorage std::vector support_bottom_angles; //!< a list of angle values which is cycled through to determine the infill angle of each layer std::vector supportLayers; - SierpinskiFillProvider* cross_fill_provider; //!< the fractal pattern for the cross (3d) filling pattern + std::shared_ptr cross_fill_provider; //!< the fractal pattern for the cross (3d) filling pattern SupportStorage(); ~SupportStorage(); @@ -257,10 +258,10 @@ class SliceMeshStorage std::vector> overhang_points; //!< For each layer a list of points where point-overhang is detected. This is overhang that hasn't got any surface area, such as a corner pointing downwards. AABB3D bounding_box; //!< the mesh's bounding box - SubDivCube* base_subdiv_cube; - SierpinskiFillProvider* cross_fill_provider; //!< the fractal pattern for the cross (3d) filling pattern + std::shared_ptr base_subdiv_cube; + std::shared_ptr cross_fill_provider; //!< the fractal pattern for the cross (3d) filling pattern - LightningGenerator* lightning_generator; //!< Pre-computed structure for Lightning type infill + std::shared_ptr lightning_generator; //!< Pre-computed structure for Lightning type infill RetractionAndWipeConfig retraction_wipe_config; //!< Per-Object retraction and wipe settings. @@ -273,8 +274,6 @@ class SliceMeshStorage */ SliceMeshStorage(Mesh* mesh, const size_t slice_layer_count); - virtual ~SliceMeshStorage(); - /*! * \param extruder_nr The extruder for which to check * \return whether a particular extruder is used by this mesh diff --git a/src/ExtruderPlan.cpp b/src/ExtruderPlan.cpp new file mode 100644 index 0000000000..1b59ff7af4 --- /dev/null +++ b/src/ExtruderPlan.cpp @@ -0,0 +1,73 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#include "ExtruderPlan.h" + +namespace cura +{ +ExtruderPlan::ExtruderPlan( + const size_t extruder, + const LayerIndex layer_nr, + const bool is_initial_layer, + const bool is_raft_layer, + const coord_t layer_thickness, + const FanSpeedLayerTimeSettings& fan_speed_layer_time_settings, + const RetractionConfig& retraction_config) + : extruder_nr(extruder) + , layer_nr(layer_nr) + , is_initial_layer(is_initial_layer) + , is_raft_layer(is_raft_layer) + , layer_thickness(layer_thickness) + , fan_speed_layer_time_settings(fan_speed_layer_time_settings) + , retraction_config(retraction_config) +{ +} + +void ExtruderPlan::insertCommand(NozzleTempInsert&& insert) +{ + inserts.emplace_back(insert); +} + +void ExtruderPlan::handleInserts(const size_t path_idx, GCodeExport& gcode, const double cumulative_path_time) +{ + while (! inserts.empty() && path_idx >= inserts.front().path_idx && inserts.front().time_after_path_start < cumulative_path_time) + { // handle the Insert to be inserted before this path_idx (and all inserts not handled yet) + inserts.front().write(gcode); + inserts.pop_front(); + } +} + +void ExtruderPlan::handleAllRemainingInserts(GCodeExport& gcode) +{ + while (! inserts.empty()) + { // handle the Insert to be inserted before this path_idx (and all inserts not handled yet) + NozzleTempInsert& insert = inserts.front(); + insert.write(gcode); + inserts.pop_front(); + } +} + +void ExtruderPlan::setFanSpeed(double _fan_speed) +{ + fan_speed = _fan_speed; +} +double ExtruderPlan::getFanSpeed() +{ + return fan_speed; +} + +void ExtruderPlan::applyBackPressureCompensation(const Ratio back_pressure_compensation) +{ + constexpr double epsilon_speed_factor = 0.001; // Don't put on actual 'limit double minimum', because we don't want printers to stall. + for (auto& path : paths) + { + const double nominal_width_for_path = static_cast(path.config.getLineWidth()); + if (path.width_factor <= 0.0 || nominal_width_for_path <= 0.0 || path.config.isTravelPath() || path.config.isBridgePath()) + { + continue; + } + const double line_width_for_path = path.width_factor * nominal_width_for_path; + path.speed_back_pressure_factor = std::max(epsilon_speed_factor, 1.0 + (nominal_width_for_path / line_width_for_path - 1.0) * back_pressure_compensation); + } +} +} // namespace cura \ No newline at end of file diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index aceb1767b9..320d3843f3 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1624,10 +1624,10 @@ bool FffGcodeWriter::processMultiLayerInfill( constexpr size_t zag_skip_count = 0; const bool fill_gaps = density_idx == 0; // Only fill gaps for the lowest density. - const LightningLayer* lightning_layer = nullptr; + std::shared_ptr lightning_layer = nullptr; if (mesh.lightning_generator) { - lightning_layer = &mesh.lightning_generator->getTreesForLayer(gcode_layer.getLayerNr()); + lightning_layer = std::make_shared(mesh.lightning_generator->getTreesForLayer(gcode_layer.getLayerNr())); } Infill infill_comp( infill_pattern, @@ -1820,10 +1820,10 @@ bool FffGcodeWriter::processSingleLayerInfill( Polygons in_outline = part.infill_area_per_combine_per_density[density_idx][0]; - const LightningLayer* lightning_layer = nullptr; + std::shared_ptr lightning_layer; if (mesh.lightning_generator) { - lightning_layer = &mesh.lightning_generator->getTreesForLayer(gcode_layer.getLayerNr()); + lightning_layer = std::make_shared(mesh.lightning_generator->getTreesForLayer(gcode_layer.getLayerNr())); } const bool fill_gaps = density_idx == 0; // Only fill gaps in the lowest infill density pattern. diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp index 39648aafcf..f60b3f5768 100644 --- a/src/FffPolygonGenerator.cpp +++ b/src/FffPolygonGenerator.cpp @@ -684,7 +684,7 @@ void FffPolygonGenerator::processDerivedWallsSkinInfill(SliceMeshStorage& mesh) std::ifstream cross_fs(cross_subdivision_spec_image_file.c_str()); if (! cross_subdivision_spec_image_file.empty() && cross_fs.good()) { - mesh.cross_fill_provider = new SierpinskiFillProvider( + mesh.cross_fill_provider = std::make_shared( mesh.bounding_box, mesh.settings.get("infill_line_distance"), mesh.settings.get("infill_line_width"), @@ -697,7 +697,7 @@ void FffPolygonGenerator::processDerivedWallsSkinInfill(SliceMeshStorage& mesh) spdlog::error("Cannot find density image: {}.", cross_subdivision_spec_image_file); } mesh.cross_fill_provider - = new SierpinskiFillProvider(mesh.bounding_box, mesh.settings.get("infill_line_distance"), mesh.settings.get("infill_line_width")); + = std::make_shared(mesh.bounding_box, mesh.settings.get("infill_line_distance"), mesh.settings.get("infill_line_width")); } } @@ -705,7 +705,7 @@ void FffPolygonGenerator::processDerivedWallsSkinInfill(SliceMeshStorage& mesh) if (mesh.settings.get("infill_line_distance") > 0 && mesh.settings.get("infill_pattern") == EFillMethod::LIGHTNING) { // TODO: Make all of these into new type pointers (but the cross fill things need to happen too then, otherwise it'd just look weird). - mesh.lightning_generator = new LightningGenerator(mesh); + mesh.lightning_generator = std::make_shared(mesh); } // combine infill diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index f4ed218f36..31873f8608 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -33,71 +33,6 @@ namespace cura constexpr int MINIMUM_LINE_LENGTH = 5; // in uM. Generated lines shorter than this may be discarded constexpr int MINIMUM_SQUARED_LINE_LENGTH = MINIMUM_LINE_LENGTH * MINIMUM_LINE_LENGTH; -ExtruderPlan::ExtruderPlan( - const size_t extruder, - const LayerIndex layer_nr, - const bool is_initial_layer, - const bool is_raft_layer, - const coord_t layer_thickness, - const FanSpeedLayerTimeSettings& fan_speed_layer_time_settings, - const RetractionConfig& retraction_config) - : heated_pre_travel_time(0) - , required_start_temperature(-1) - , extruder_nr(extruder) - , layer_nr(layer_nr) - , is_initial_layer(is_initial_layer) - , is_raft_layer(is_raft_layer) - , layer_thickness(layer_thickness) - , fan_speed_layer_time_settings(fan_speed_layer_time_settings) - , retraction_config(retraction_config) - , extraTime(0.0) - , temperatureFactor(0.0) - , slowest_path_speed(0.0) -{ -} - -void ExtruderPlan::handleInserts(const size_t path_idx, GCodeExport& gcode, const double& cumulative_path_time) -{ - while (! inserts.empty() && path_idx >= inserts.front().path_idx && inserts.front().time_after_path_start < cumulative_path_time) - { // handle the Insert to be inserted before this path_idx (and all inserts not handled yet) - inserts.front().write(gcode); - inserts.pop_front(); - } -} - -void ExtruderPlan::handleAllRemainingInserts(GCodeExport& gcode) -{ - while (! inserts.empty()) - { // handle the Insert to be inserted before this path_idx (and all inserts not handled yet) - NozzleTempInsert& insert = inserts.front(); - insert.write(gcode); - inserts.pop_front(); - } -} - -void ExtruderPlan::setFanSpeed(double _fan_speed) -{ - fan_speed = _fan_speed; -} -double ExtruderPlan::getFanSpeed() -{ - return fan_speed; -} - -void ExtruderPlan::applyBackPressureCompensation(const Ratio back_pressure_compensation) -{ - constexpr double epsilon_speed_factor = 0.001; // Don't put on actual 'limit double minimum', because we don't want printers to stall. - for (auto& path : paths) - { - const double nominal_width_for_path = static_cast(path.config.getLineWidth()); - if (path.width_factor <= 0.0 || nominal_width_for_path <= 0.0 || path.config.isTravelPath() || path.config.isBridgePath()) - { - continue; - } - const double line_width_for_path = path.width_factor * nominal_width_for_path; - path.speed_back_pressure_factor = std::max(epsilon_speed_factor, 1.0 + (nominal_width_for_path / line_width_for_path - 1.0) * back_pressure_compensation); - } -} GCodePath* LayerPlan::getLatestPathWithConfig( const GCodePathConfig& config, diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index b0ddb5a41b..6544e8b799 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -378,7 +378,7 @@ Polygons TreeSupportTipGenerator::ensureMaximumDistancePolyline(const Polygons& } -SierpinskiFillProvider* TreeSupportTipGenerator::generateCrossFillProvider(const SliceMeshStorage& mesh, coord_t line_distance, coord_t line_width) const +std::shared_ptr TreeSupportTipGenerator::generateCrossFillProvider(const SliceMeshStorage& mesh, coord_t line_distance, coord_t line_width) const { if (config.support_pattern == EFillMethod::CROSS || config.support_pattern == EFillMethod::CROSS_3D) { @@ -399,12 +399,9 @@ SierpinskiFillProvider* TreeSupportTipGenerator::generateCrossFillProvider(const std::ifstream cross_fs(cross_subdisivion_spec_image_file.c_str()); if (cross_subdisivion_spec_image_file != "" && cross_fs.good()) { - return new SierpinskiFillProvider(aabb, line_distance, line_width, cross_subdisivion_spec_image_file); - } - else - { - return new SierpinskiFillProvider(aabb, line_distance, line_width); + return std::make_shared(aabb, line_distance, line_width, cross_subdisivion_spec_image_file); } + return std::make_shared(aabb, line_distance, line_width); } return nullptr; } diff --git a/src/infill.cpp b/src/infill.cpp index 622ba99229..f22a9756e7 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -86,8 +86,8 @@ void Infill::generate( const Settings& settings, int layer_idx, SectionType section_type, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, + const std::shared_ptr cross_fill_provider, + const std::shared_ptr lightning_trees, const SliceMeshStorage* mesh) { if (outer_contour.empty()) @@ -250,8 +250,8 @@ void Infill::_generate( Polygons& result_polygons, Polygons& result_lines, const Settings& settings, - const SierpinskiFillProvider* cross_fill_provider, - const LightningLayer* lightning_trees, + const std::shared_ptr cross_fill_provider, + const std::shared_ptr lightning_trees, const SliceMeshStorage* mesh) { if (inner_contour.empty()) @@ -427,7 +427,7 @@ void Infill::generateGyroidInfill(Polygons& result_lines, Polygons& result_polyg PolylineStitcher::stitch(line_segments, result_lines, result_polygons, infill_line_width); } -void Infill::generateLightningInfill(const LightningLayer* trees, Polygons& result_lines) +void Infill::generateLightningInfill(const std::shared_ptr trees, Polygons& result_lines) { // Don't need to support areas smaller than line width, as they are always within radius: if (std::abs(inner_contour.area()) < infill_line_width || ! trees) diff --git a/src/infill/LightningTreeNode.cpp b/src/infill/LightningTreeNode.cpp index 33af29678c..9766c6fcb2 100644 --- a/src/infill/LightningTreeNode.cpp +++ b/src/infill/LightningTreeNode.cpp @@ -1,5 +1,5 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #include "infill/LightningTreeNode.h" @@ -7,6 +7,8 @@ using namespace cura; +using LightningTreeNodeSPtr = std::shared_ptr; + coord_t LightningTreeNode::getWeightedDistance(const Point& unsupported_location, const coord_t& supporting_radius) const { constexpr coord_t min_valence_for_boost = 0; diff --git a/src/infill/SubDivCube.cpp b/src/infill/SubDivCube.cpp index 87478fa204..d81b92d0e0 100644 --- a/src/infill/SubDivCube.cpp +++ b/src/infill/SubDivCube.cpp @@ -23,17 +23,6 @@ coord_t SubDivCube::radius_addition = 0; Point3Matrix SubDivCube::rotation_matrix; PointMatrix SubDivCube::infill_rotation_matrix; -SubDivCube::~SubDivCube() -{ - for (int child_idx = 0; child_idx < 8; child_idx++) - { - if (children[child_idx]) - { - delete children[child_idx]; - } - } -} - void SubDivCube::precomputeOctree(SliceMeshStorage& mesh, const Point& infill_origin) { radius_addition = mesh.settings.get("sub_div_rad_add"); @@ -91,7 +80,7 @@ void SubDivCube::precomputeOctree(SliceMeshStorage& mesh, const Point& infill_or rotation_matrix = infill_angle_mat.compose(tilt); - mesh.base_subdiv_cube = new SubDivCube(mesh, center, curr_recursion_depth - 1); + mesh.base_subdiv_cube = std::make_shared(mesh, center, curr_recursion_depth - 1); } void SubDivCube::generateSubdivisionLines(const coord_t z, Polygons& result) @@ -189,7 +178,7 @@ SubDivCube::SubDivCube(SliceMeshStorage& mesh, Point3& center, size_t depth) child_center = center + rotation_matrix.apply(rel_child_center * int32_t(cube_properties.side_length / 4)); if (isValidSubdivision(mesh, child_center, radius)) { - children[child_nr] = new SubDivCube(mesh, child_center, depth - 1); + children[child_nr] = std::make_shared(mesh, child_center, depth - 1); child_nr++; } } diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 6dfe67a5e2..4e89ea5625 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -26,10 +26,6 @@ SupportStorage::SupportStorage() : generated(false), layer_nr_max_filled_layer(- SupportStorage::~SupportStorage() { supportLayers.clear(); - if (cross_fill_provider) - { - delete cross_fill_provider; - } } Polygons& SliceLayerPart::getOwnInfillArea() @@ -102,21 +98,6 @@ SliceMeshStorage::SliceMeshStorage(Mesh* mesh, const size_t slice_layer_count) layers.resize(slice_layer_count); } -SliceMeshStorage::~SliceMeshStorage() -{ - if (base_subdiv_cube) - { - delete base_subdiv_cube; - } - if (cross_fill_provider) - { - delete cross_fill_provider; - } - if (lightning_generator) - { - delete lightning_generator; - } -} bool SliceMeshStorage::getExtruderIsUsed(const size_t extruder_nr) const { diff --git a/src/support.cpp b/src/support.cpp index 45f9901d77..f1c1bc6bd6 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -749,7 +749,7 @@ void AreaSupport::precomputeCrossInfillTree(SliceDataStorage& storage) std::ifstream cross_fs(cross_subdisivion_spec_image_file.c_str()); if (cross_subdisivion_spec_image_file != "" && cross_fs.good()) { - storage.support.cross_fill_provider = new SierpinskiFillProvider( + storage.support.cross_fill_provider = std::make_shared( aabb, infill_extruder.settings.get("support_line_distance"), infill_extruder.settings.get("support_line_width"), @@ -762,7 +762,7 @@ void AreaSupport::precomputeCrossInfillTree(SliceDataStorage& storage) spdlog::error("Cannot find density image: {}.", cross_subdisivion_spec_image_file); } storage.support.cross_fill_provider - = new SierpinskiFillProvider(aabb, infill_extruder.settings.get("support_line_distance"), infill_extruder.settings.get("support_line_width")); + = std::make_shared(aabb, infill_extruder.settings.get("support_line_distance"), infill_extruder.settings.get("support_line_width")); } } } From 89c13338092b5e25a27029a855bdda693d5ec295 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Wed, 23 Aug 2023 14:21:57 +0000 Subject: [PATCH 261/470] Applied clang-format. --- include/LayerPlan.h | 2 +- include/LayerPlanBuffer.h | 5 +- include/TreeSupportTipGenerator.h | 56 ++++++++----- include/TreeSupportUtils.h | 124 ++++++++++++++--------------- include/infill/LightningLayer.h | 24 +++--- include/infill/LightningTreeNode.h | 40 ++++++---- include/sliceDataStorage.h | 64 ++++++++------- src/TreeSupportTipGenerator.cpp | 2 +- src/infill/LightningTreeNode.cpp | 55 +++++-------- src/sliceDataStorage.cpp | 45 +++++++---- src/support.cpp | 6 +- 11 files changed, 217 insertions(+), 206 deletions(-) diff --git a/include/LayerPlan.h b/include/LayerPlan.h index 9a8be087f1..3eda752178 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -4,6 +4,7 @@ #ifndef LAYER_PLAN_H #define LAYER_PLAN_H +#include "ExtruderPlan.h" #include "FanSpeedLayerTime.h" #include "InsetOrderOptimizer.h" #include "PathOrderOptimizer.h" @@ -16,7 +17,6 @@ #include "settings/types/LayerIndex.h" #include "utils/ExtrusionJunction.h" #include "utils/polygon.h" -#include "ExtruderPlan.h" #ifdef BUILD_TESTS #include //Friend tests, so that they can inspect the privates. diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index deb173c697..721a003ba5 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -4,11 +4,11 @@ #ifndef LAYER_PLAN_BUFFER_H #define LAYER_PLAN_BUFFER_H +#include "ExtruderPlan.h" +#include "LayerPlan.h" #include "Preheat.h" #include "settings/Settings.h" #include "settings/types/Duration.h" -#include "LayerPlan.h" -#include "ExtruderPlan.h" #include #include @@ -17,7 +17,6 @@ namespace cura { - class GCodeExport; /*! diff --git a/include/TreeSupportTipGenerator.h b/include/TreeSupportTipGenerator.h index e5118a0eec..d19e1a99b0 100644 --- a/include/TreeSupportTipGenerator.h +++ b/include/TreeSupportTipGenerator.h @@ -5,6 +5,7 @@ #define TREESUPPORTTIPGENERATOR_H #include "TreeModelVolumes.h" +#include "TreeSupport.h" #include "TreeSupportBaseCircle.h" #include "TreeSupportElement.h" #include "TreeSupportEnums.h" @@ -15,7 +16,6 @@ #include "sliceDataStorage.h" #include "utils/Coord_t.h" #include "utils/polygon.h" -#include "TreeSupport.h" namespace cura { @@ -23,9 +23,7 @@ namespace cura class TreeSupportTipGenerator { - public: - TreeSupportTipGenerator(const SliceDataStorage& storage, const SliceMeshStorage& mesh, TreeModelVolumes& volumes_); /*! @@ -38,10 +36,14 @@ class TreeSupportTipGenerator * \return All lines of the \p polylines object, with information for each point regarding in which avoidance it is currently valid in. */ - void generateTips(SliceDataStorage& storage,const SliceMeshStorage& mesh ,std::vector>& move_bounds, std::vector& additional_support_areas, std::vector& placed_support_lines_support_areas); + void generateTips( + SliceDataStorage& storage, + const SliceMeshStorage& mesh, + std::vector>& move_bounds, + std::vector& additional_support_areas, + std::vector& placed_support_lines_support_areas); private: - enum class LineStatus { INVALID, @@ -80,17 +82,16 @@ class TreeSupportTipGenerator std::function)> getEvaluatePointForNextLayerFunction(size_t current_layer); /*! - * \brief Evaluates which points of some lines are not valid one layer below and which are. Assumes all points are valid on the current layer. Validity is evaluated using supplied lambda. + * \brief Evaluates which points of some lines are not valid one layer below and which are. Assumes all points are valid on the current layer. Validity is evaluated using + * supplied lambda. * * \param lines[in] The lines that have to be evaluated. * \param evaluatePoint[in] The function used to evaluate the points. * \return A pair with which points are still valid in the first slot and which are not in the second slot. */ - std::pair, std::vector> splitLines - ( - std::vector lines, - std::function)> evaluatePoint - ); // assumes all Points on the current line are valid + std::pair, std::vector> splitLines( + std::vector lines, + std::function)> evaluatePoint); // assumes all Points on the current line are valid /*! * \brief Ensures that every line segment is about distance in length. The resulting lines may differ from the original but all points are on the original @@ -120,7 +121,7 @@ class TreeSupportTipGenerator * \param result[out] The dropped overhang ares * \param roof[in] Whether the result is for roof generation. */ - void dropOverhangAreas(const SliceMeshStorage& mesh, std::vector& result, bool roof ); + void dropOverhangAreas(const SliceMeshStorage& mesh, std::vector& result, bool roof); /*! * \brief Calculates which areas should be supported with roof, and saves these in roof support_roof_drawn @@ -138,7 +139,15 @@ class TreeSupportTipGenerator * \param roof[in] Whether the tip supports a roof. * \param skip_ovalisation[in] Whether the tip may be ovalized when drawn later. */ - void addPointAsInfluenceArea(std::vector>& move_bounds, std::pair p, size_t dtt, LayerIndex insert_layer, size_t dont_move_until, bool roof, bool skip_ovalisation, std::vector additional_ovalization_targets = std::vector()); + void addPointAsInfluenceArea( + std::vector>& move_bounds, + std::pair p, + size_t dtt, + LayerIndex insert_layer, + size_t dont_move_until, + bool roof, + bool skip_ovalisation, + std::vector additional_ovalization_targets = std::vector()); /*! @@ -150,7 +159,14 @@ class TreeSupportTipGenerator * \param supports_roof[in] Whether the tip supports a roof. * \param dont_move_until[in] Until which dtt the branch should not move if possible. */ - void addLinesAsInfluenceAreas(std::vector>& move_bounds, std::vector lines, size_t roof_tip_layers, LayerIndex insert_layer_idx, bool supports_roof, size_t dont_move_until, bool connect_points); + void addLinesAsInfluenceAreas( + std::vector>& move_bounds, + std::vector lines, + size_t roof_tip_layers, + LayerIndex insert_layer_idx, + bool supports_roof, + size_t dont_move_until, + bool connect_points); /*! * \brief Remove tips that should not have been added in the first place. @@ -158,7 +174,7 @@ class TreeSupportTipGenerator * \param storage[in] Background storage, required for adding roofs. * \param additional_support_areas[in] Areas that should have been roofs, but are now support, as they would not generate any lines as roof. */ - void removeUselessAddedPoints(std::vector>& move_bounds,SliceDataStorage& storage, std::vector& additional_support_areas); + void removeUselessAddedPoints(std::vector>& move_bounds, SliceDataStorage& storage, std::vector& additional_support_areas); /*! @@ -259,7 +275,8 @@ class TreeSupportTipGenerator const bool only_gracious = SUPPORT_TREE_ONLY_GRACIOUS_TO_MODEL; /*! - * \brief Whether minimum_roof_area is a hard limit. If false the roof will be combined with roof above and below, to see if a part of this roof may be part of a valid roof further up/down. + * \brief Whether minimum_roof_area is a hard limit. If false the roof will be combined with roof above and below, to see if a part of this roof may be part of a valid roof + * further up/down. */ const bool force_minimum_roof_area = SUPPORT_TREE_MINIMUM_ROOF_AREA_HARD_LIMIT; @@ -289,15 +306,10 @@ class TreeSupportTipGenerator std::vector roof_tips_drawn; - - std::mutex critical_move_bounds; std::mutex critical_roof_tips; - - - }; -} +} // namespace cura #endif /* TREESUPPORT_H */ \ No newline at end of file diff --git a/include/TreeSupportUtils.h b/include/TreeSupportUtils.h index f2a58a16de..fd6ab60526 100644 --- a/include/TreeSupportUtils.h +++ b/include/TreeSupportUtils.h @@ -10,21 +10,20 @@ #include "TreeSupportEnums.h" #include "TreeSupportSettings.h" #include "boost/functional/hash.hpp" // For combining hashes +#include "infill.h" #include "polyclipping/clipper.hpp" #include "settings/EnumSettings.h" #include "sliceDataStorage.h" #include "utils/Coord_t.h" #include "utils/polygon.h" + #include -#include "infill.h" namespace cura { class TreeSupportUtils { - - public: /*! * \brief Adds the implicit line from the last vertex of a Polygon to the first one. @@ -84,7 +83,6 @@ class TreeSupportUtils } - /*! * \brief Returns Polylines representing the (infill) lines that will result in slicing the given area * @@ -98,7 +96,15 @@ class TreeSupportUtils * todo doku * \return A Polygons object that represents the resulting infill lines. */ - [[nodiscard]] static Polygons generateSupportInfillLines(const Polygons& area,const TreeSupportSettings& config, bool roof, LayerIndex layer_idx, coord_t support_infill_distance, std::shared_ptr cross_fill_provider, bool include_walls, bool generate_support_supporting = false) + [[nodiscard]] static Polygons generateSupportInfillLines( + const Polygons& area, + const TreeSupportSettings& config, + bool roof, + LayerIndex layer_idx, + coord_t support_infill_distance, + std::shared_ptr cross_fill_provider, + bool include_walls, + bool generate_support_supporting = false) { Polygons gaps; // As we effectivly use lines to place our supportPoints we may use the Infill class for it, while not made for it, it works perfectly. @@ -110,7 +116,7 @@ class TreeSupportUtils constexpr coord_t support_roof_overlap = 0; constexpr size_t infill_multiplier = 1; const int support_shift = roof ? 0 : support_infill_distance / 2; - const size_t wall_line_count = include_walls ? (!roof ? config.support_wall_count : config.support_roof_wall_count):0; + const size_t wall_line_count = include_walls ? (! roof ? config.support_wall_count : config.support_roof_wall_count) : 0; constexpr coord_t narrow_area_width = 0; const Point infill_origin; constexpr bool skip_stitching = false; @@ -127,32 +133,30 @@ class TreeSupportUtils const size_t divisor = angles.size(); const size_t index = ((layer_idx % divisor) + divisor) % divisor; const AngleDegrees fill_angle = angles[index]; - Infill roof_computation - ( - pattern, - zig_zaggify_infill, - connect_polygons, - area, - roof ? config.support_roof_line_width : config.support_line_width, - support_infill_distance, - support_roof_overlap, - infill_multiplier, - fill_angle, - z, - support_shift, - config.maximum_resolution, - config.maximum_deviation, - wall_line_count, - narrow_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size - ); + Infill roof_computation( + pattern, + zig_zaggify_infill, + connect_polygons, + area, + roof ? config.support_roof_line_width : config.support_line_width, + support_infill_distance, + support_roof_overlap, + infill_multiplier, + fill_angle, + z, + support_shift, + config.maximum_resolution, + config.maximum_deviation, + wall_line_count, + narrow_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); Polygons areas; Polygons lines; @@ -171,8 +175,8 @@ class TreeSupportUtils [[nodiscard]] static Polygons safeUnion(const Polygons& first, const Polygons& second = Polygons()) { // The unionPolygons function can slowly remove Polygons under certain circumstances, because of rounding issues (Polygons that have a thin area). - // This does not cause a problem when actually using it on large areas, but as influence areas (representing centerpoints) can be very thin, this does occur so this ugly workaround is needed - // Here is an example of a Polygons object that will loose vertices when unioning, and will be gone after a few times unionPolygons was called: + // This does not cause a problem when actually using it on large areas, but as influence areas (representing centerpoints) can be very thin, this does occur so this ugly + // workaround is needed Here is an example of a Polygons object that will loose vertices when unioning, and will be gone after a few times unionPolygons was called: /* 120410,83599 120384,83643 @@ -201,14 +205,12 @@ class TreeSupportUtils * \param distance[in] The distance by which me should be offset. Expects values >=0. * \param collision[in] The area representing obstacles. * \param last_step_offset_without_check[in] The most it is allowed to offset in one step. - * \param min_amount_offset[in] How many steps have to be done at least. As this uses round offset this increases the amount of vertices, which may be required if Polygons get very small. - * Required as arcTolerance is not exposed in offset, which should result with a similar result, benefit may be eliminated by simplifying. - * \param min_offset_per_step Don't get below this amount of offset per step taken. Fine-tune tradeoff between speed and accuracy. - * \param simplifier[in] Pointer to Simplify object if the offset operation also simplify the Polygon. Improves performance. - * \return The resulting Polygons object. + * \param min_amount_offset[in] How many steps have to be done at least. As this uses round offset this increases the amount of vertices, which may be required if Polygons get + * very small. Required as arcTolerance is not exposed in offset, which should result with a similar result, benefit may be eliminated by simplifying. \param + * min_offset_per_step Don't get below this amount of offset per step taken. Fine-tune tradeoff between speed and accuracy. \param simplifier[in] Pointer to Simplify object if + * the offset operation also simplify the Polygon. Improves performance. \return The resulting Polygons object. */ - [[nodiscard]] static Polygons safeOffsetInc - ( + [[nodiscard]] static Polygons safeOffsetInc( const Polygons& me, coord_t distance, const Polygons& collision, @@ -216,8 +218,7 @@ class TreeSupportUtils coord_t last_step_offset_without_check, size_t min_amount_offset, coord_t min_offset_per_step, - Simplify* simplifier - ) + Simplify* simplifier) { bool do_final_difference = last_step_offset_without_check == 0; Polygons ret = safeUnion(me); // Ensure sane input. @@ -270,7 +271,7 @@ class TreeSupportUtils } } ret = ret.offset(distance - steps * step_size, ClipperLib::jtRound); // Offset the remainder. - if(simplifier) + if (simplifier) { ret = simplifier->polygon(ret); } @@ -287,31 +288,30 @@ class TreeSupportUtils * * \param polylines[in] The polyline object from which the lines are moved. * \param area[in] The area the points are moved out of. - * \param max_allowed_distance[in] The maximum distance a point may be moved. If not possible the point will be moved as far as possible in the direction of the outside of the provided area. - * \return A Polyline object containing the moved points. + * \param max_allowed_distance[in] The maximum distance a point may be moved. If not possible the point will be moved as far as possible in the direction of the outside of the + * provided area. \return A Polyline object containing the moved points. */ - [[nodiscard]]static Polygons movePointsOutside(const Polygons& polylines, const Polygons& area, coord_t max_allowed_distance) + [[nodiscard]] static Polygons movePointsOutside(const Polygons& polylines, const Polygons& area, coord_t max_allowed_distance) { Polygons result; - for (auto line:polylines) + for (auto line : polylines) { Polygon next_line; - for (Point p:line) + for (Point p : line) { - if (area.inside(p)) { Point next_outside = p; - PolygonUtils::moveOutside(area,next_outside); - if (vSize2(p-next_outside)0) + if (next_line.size() > 0) { result.add(next_line); } @@ -329,25 +329,23 @@ class TreeSupportUtils return result; } - [[nodiscard]]static VariableWidthLines polyLineToVWL(const Polygons& polylines, coord_t line_width) + [[nodiscard]] static VariableWidthLines polyLineToVWL(const Polygons& polylines, coord_t line_width) { VariableWidthLines result; - for (auto path: polylines) + for (auto path : polylines) { - ExtrusionLine vwl_line(1,true); + ExtrusionLine vwl_line(1, true); - for(Point p: path) + for (Point p : path) { - vwl_line.emplace_back(p,line_width,1); + vwl_line.emplace_back(p, line_width, 1); } result.emplace_back(vwl_line); } return result; } - - }; -} //namespace cura +} // namespace cura #endif // TREESUPPORTTUTILS_H diff --git a/include/infill/LightningLayer.h b/include/infill/LightningLayer.h index beffe612a4..64540ea896 100644 --- a/include/infill/LightningLayer.h +++ b/include/infill/LightningLayer.h @@ -4,14 +4,14 @@ #ifndef LIGHTNING_LAYER_H #define LIGHTNING_LAYER_H -#include "../utils/polygonUtils.h" #include "../utils/SquareGrid.h" +#include "../utils/polygonUtils.h" #include "infill/LightningTreeNode.h" -#include -#include #include +#include #include +#include namespace cura { @@ -35,28 +35,24 @@ class LightningLayer public: std::vector tree_roots; - void generateNewTrees - ( + void generateNewTrees( const Polygons& current_overhang, const Polygons& current_outlines, const LocToLineGrid& outline_locator, const coord_t supporting_radius, - const coord_t wall_supporting_radius - ); + const coord_t wall_supporting_radius); /*! Determine & connect to connection point in tree/outline. * \param min_dist_from_boundary_for_tree If the unsupported point is closer to the boundary than this then don't consider connecting it to a tree */ - GroundingLocation getBestGroundingLocation - ( + GroundingLocation getBestGroundingLocation( const Point& unsupported_location, const Polygons& current_outlines, const LocToLineGrid& outline_locator, const coord_t supporting_radius, const coord_t wall_supporting_radius, const SparseLightningTreeNodeGrid& tree_node_locator, - const LightningTreeNodeSPtr& exclude_tree = nullptr - ); + const LightningTreeNodeSPtr& exclude_tree = nullptr); /*! * \param[out] new_child The new child node introduced @@ -65,14 +61,12 @@ class LightningLayer */ bool attach(const Point& unsupported_location, const GroundingLocation& ground, LightningTreeNodeSPtr& new_child, LightningTreeNodeSPtr& new_root); - void reconnectRoots - ( + void reconnectRoots( std::vector& to_be_reconnected_tree_roots, const Polygons& current_outlines, const LocToLineGrid& outline_locator, const coord_t supporting_radius, - const coord_t wall_supporting_radius - ); + const coord_t wall_supporting_radius); Polygons convertToLines(const Polygons& limit_to_outline, const coord_t line_width) const; diff --git a/include/infill/LightningTreeNode.h b/include/infill/LightningTreeNode.h index 1a36729468..21c63bde3b 100644 --- a/include/infill/LightningTreeNode.h +++ b/include/infill/LightningTreeNode.h @@ -4,14 +4,14 @@ #ifndef LIGHTNING_TREE_NODE_H #define LIGHTNING_TREE_NODE_H +#include "../utils/polygon.h" +#include "../utils/polygonUtils.h" + #include #include #include #include -#include "../utils/polygonUtils.h" -#include "../utils/polygon.h" - namespace cura { @@ -34,13 +34,18 @@ constexpr coord_t locator_cell_size = 4000; class LightningTreeNode : public std::enable_shared_from_this { using LightningTreeNodeSPtr = std::shared_ptr; + public: // Workaround for private/protected constructors and 'make_shared': https://stackoverflow.com/a/27832765 - template LightningTreeNodeSPtr static create(Arg&&...arg) + template + LightningTreeNodeSPtr static create(Arg&&... arg) { struct EnableMakeShared : public LightningTreeNode { - EnableMakeShared(Arg&&...arg) : LightningTreeNode(std::forward(arg)...) {} + EnableMakeShared(Arg&&... arg) + : LightningTreeNode(std::forward(arg)...) + { + } }; return std::make_shared(std::forward(arg)...); } @@ -91,15 +96,13 @@ class LightningTreeNode : public std::enable_shared_from_this * \param max_remove_colinear_dist The maximum distance of a line-segment * from which straightening may remove a colinear point. */ - void propagateToNextLayer - ( + void propagateToNextLayer( std::vector& next_trees, const Polygons& next_outlines, const LocToLineGrid& outline_locator, const coord_t prune_distance, const coord_t smooth_magnitude, - const coord_t max_remove_colinear_dist - ) const; + const coord_t max_remove_colinear_dist) const; /*! * Executes a given function for every line segment in this node's sub-tree. @@ -144,7 +147,10 @@ class LightningTreeNode : public std::enable_shared_from_this * \return ``true`` if this node is the root (no parents) or ``false`` if it * is a child node of some other node. */ - bool isRoot() const { return is_root; } + bool isRoot() const + { + return is_root; + } /*! * Reverse the parent-child relationship all the way to the root, from this node onward. @@ -226,11 +232,11 @@ class LightningTreeNode : public std::enable_shared_from_this public: /*! * Convert the tree into polylines - * + * * At each junction one line is chosen at random to continue - * + * * The lines start at a leaf and end in a junction - * + * * \param output all branches in this tree connected into polylines */ void convertToPolylines(Polygons& output, const coord_t line_width) const; @@ -244,11 +250,11 @@ class LightningTreeNode : public std::enable_shared_from_this protected: /*! * Convert the tree into polylines - * + * * At each junction one line is chosen at random to continue - * + * * The lines start at a leaf and end in a junction - * + * * \param long_line a reference to a polyline in \p output which to continue building on in the recursion * \param output all branches in this tree connected into polylines */ @@ -261,7 +267,7 @@ class LightningTreeNode : public std::enable_shared_from_this std::weak_ptr parent; std::vector children; - std::optional last_grounding_location; // last_grounding_location; // -#include -#include - #include "PrimeTower.h" #include "RetractionConfig.h" #include "SupportInfillPart.h" #include "TopSurface.h" +#include "WipeScriptConfig.h" #include "settings/Settings.h" //For MAX_EXTRUDERS. #include "settings/types/Angle.h" //Infill angles. #include "settings/types/LayerIndex.h" @@ -20,7 +17,10 @@ #include "utils/IntPoint.h" #include "utils/NoCopy.h" #include "utils/polygon.h" -#include "WipeScriptConfig.h" + +#include +#include +#include // libArachne #include "utils/ExtrusionLine.h" @@ -33,14 +33,15 @@ class SierpinskiFillProvider; class LightningGenerator; /*! - * A SkinPart is a connected area designated as top and/or bottom skin. + * A SkinPart is a connected area designated as top and/or bottom skin. * Surrounding each non-bridged skin area with an outline may result in better top skins. * It's filled during FffProcessor.processSliceData(.) and used in FffProcessor.writeGCode(.) to generate the final gcode. */ class SkinPart { public: - PolygonsPart outline; //!< The skinOutline is the area which needs to be 100% filled to generate a proper top&bottom filling. It's filled by the "skin" module. Includes both roofing and non-roofing. + PolygonsPart outline; //!< The skinOutline is the area which needs to be 100% filled to generate a proper top&bottom filling. It's filled by the "skin" module. Includes both + //!< roofing and non-roofing. Polygons skin_fill; //!< The part of the skin which is not roofing. Polygons roofing_fill; //!< The inner infill which has air directly above Polygons top_most_surface_fill; //!< The inner infill of the uppermost top layer which has air directly above. @@ -65,7 +66,7 @@ class SliceLayerPart //!< Too small parts will be omitted compared to the outline. Polygons spiral_wall; //!< The centerline of the wall used by spiralize mode. Only computed if spiralize mode is enabled. Polygons inner_area; //!< The area of the outline, minus the walls. This will be filled with either skin or infill. - std::vector skin_parts; //!< The skin parts which are filled for 100% with lines and/or insets. + std::vector skin_parts; //!< The skin parts which are filled for 100% with lines and/or insets. std::vector wall_toolpaths; //!< toolpaths for walls, will replace(?) the insets. Binned by inset_idx. std::vector infill_wall_toolpaths; //!< toolpaths for the walls of the infill areas. Binned by inset_idx. @@ -126,7 +127,7 @@ class SliceLayerPart * This maximum number of layers we can combine is a user setting. This number, say "n", means the maximum number of layers we can combine into one. * On the combined layers, the extrusion amount will be higher than the normal extrusion amount because it needs to extrude for multiple layers instead of one. * - * infill_area[x][n] is infill_area of (n+1) layers thick. + * infill_area[x][n] is infill_area of (n+1) layers thick. * * infill_area[0] corresponds to the most dense infill area. * infill_area[x] will lie fully inside infill_area[x+1]. @@ -162,9 +163,9 @@ class SliceLayerPart class SliceLayer { public: - coord_t printZ; //!< The height at which this layer needs to be printed. Can differ from sliceZ due to the raft. - coord_t thickness; //!< The thickness of this layer. Can be different when using variable layer heights. - std::vector parts; //!< An array of LayerParts which contain the actual data. The parts are printed one at a time to minimize travel outside of the 3D model. + coord_t printZ; //!< The height at which this layer needs to be printed. Can differ from sliceZ due to the raft. + coord_t thickness; //!< The thickness of this layer. Can be different when using variable layer heights. + std::vector parts; //!< An array of LayerParts which contain the actual data. The parts are printed one at a time to minimize travel outside of the 3D model. Polygons openPolyLines; //!< A list of lines which were never hooked up into a 2D polygon. (Currently unused in normal operation) /*! @@ -177,7 +178,7 @@ class SliceLayer /*! * Get the all outlines of all layer parts in this layer. - * + * * \param external_polys_only Whether to only include the outermost outline of each layer part * \return A collection of all the outline polygons */ @@ -186,7 +187,7 @@ class SliceLayer /*! * Get the all outlines of all layer parts in this layer. * Add those polygons to @p result. - * + * * \param external_polys_only Whether to only include the outermost outline of each layer part * \param result The result: a collection of all the outline polygons */ @@ -198,12 +199,10 @@ class SliceLayer /******************/ - - class SupportLayer { public: - std::vector support_infill_parts; //!< a list of support infill parts + std::vector support_infill_parts; //!< a list of support infill parts Polygons support_bottom; //!< Piece of support below the support and above the model. This must not overlap with any of the support_infill_parts or support_roof. Polygons support_roof; //!< Piece of support above the support and below the model. This must not overlap with any of the support_infill_parts or support_bottom. Polygons support_mesh_drop_down; //!< Areas from support meshes which should be supported by more support @@ -254,8 +253,10 @@ class SliceMeshStorage std::vector roofing_angles; //!< a list of angle values which is cycled through to determine the roofing angle of each layer std::vector skin_angles; //!< a list of angle values which is cycled through to determine the skin angle of each layer std::vector overhang_areas; //!< For each layer the areas that are classified as overhang on this mesh. - std::vector full_overhang_areas; //!< For each layer the full overhang without the tangent of the overhang angle removed, such that the overhang area adjoins the areas of the next layers. - std::vector> overhang_points; //!< For each layer a list of points where point-overhang is detected. This is overhang that hasn't got any surface area, such as a corner pointing downwards. + std::vector full_overhang_areas; //!< For each layer the full overhang without the tangent of the overhang angle removed, such that the overhang area adjoins the + //!< areas of the next layers. + std::vector> overhang_points; //!< For each layer a list of points where point-overhang is detected. This is overhang that hasn't got any surface area, + //!< such as a corner pointing downwards. AABB3D bounding_box; //!< the mesh's bounding box std::shared_ptr base_subdiv_cube; @@ -321,22 +322,23 @@ class SliceDataStorage : public NoCopy std::vector retraction_wipe_config_per_extruder; //!< Config for retractions, extruder switch retractions, and wipes, per extruder. SupportStorage support; - + std::vector skirt_brim[MAX_EXTRUDERS]; //!< Skirt/brim polygons per extruder, ordered from inner to outer polygons. Polygons support_brim; //!< brim lines for support, going from the edge of the support inward. \note Not ordered by inset. - Polygons raftOutline; //Storage for the outline of the raft. Will be filled with lines when the GCode is generated. - Polygons primeRaftOutline; // ... the raft underneath the prime-tower will have to be printed first, if there is one. (When the raft has top layers with a different extruder for example.) + Polygons raftOutline; // Storage for the outline of the raft. Will be filled with lines when the GCode is generated. + Polygons primeRaftOutline; // ... the raft underneath the prime-tower will have to be printed first, if there is one. (When the raft has top layers with a different extruder + // for example.) int max_print_height_second_to_last_extruder; //!< Used in multi-extrusion: the layer number beyond which all models are printed with the same extruder std::vector max_print_height_per_extruder; //!< For each extruder the highest layer number at which it is used. std::vector max_print_height_order; //!< Ordered indices into max_print_height_per_extruder: back() will return the extruder number with the highest print height. std::vector spiralize_seam_vertex_indices; //!< the index of the seam vertex for each layer - std::vector spiralize_wall_outlines; //!< the wall outline polygons for each layer + std::vector spiralize_wall_outlines; //!< the wall outline polygons for each layer PrimeTower primeTower; - std::vector oozeShield; //oozeShield per layer + std::vector oozeShield; // oozeShield per layer Polygons draft_protection_shield; //!< The polygons for a heightened skirt which protects from warping by gusts of wind and acts as a heated chamber. /*! @@ -351,7 +353,7 @@ class SliceDataStorage : public NoCopy /*! * Get all outlines within a given layer. - * + * * \param layer_nr The index of the layer for which to get the outlines * (negative layer numbers indicate the raft). * \param include_support Whether to include support in the outline. @@ -360,11 +362,13 @@ class SliceDataStorage : public NoCopy * \param external_polys_only Whether to disregard all hole polygons. * \param extruder_nr (optional) only give back outlines for this extruder (where the walls are printed with this extruder) */ - Polygons getLayerOutlines(const LayerIndex layer_nr, const bool include_support, const bool include_prime_tower, const bool external_polys_only = false, const int extruder_nr = -1) const; + Polygons + getLayerOutlines(const LayerIndex layer_nr, const bool include_support, const bool include_prime_tower, const bool external_polys_only = false, const int extruder_nr = -1) + const; /*! * Get the extruders used. - * + * * \return A vector of booleans indicating whether the extruder with the * corresponding index is used in the mesh group. */ @@ -372,7 +376,7 @@ class SliceDataStorage : public NoCopy /*! * Get the extruders used on a particular layer. - * + * * \param layer_nr the layer for which to check * \return a vector of bools indicating whether the extruder with corresponding index is used in this layer. */ @@ -401,6 +405,6 @@ class SliceDataStorage : public NoCopy std::vector initializeRetractionAndWipeConfigs(); }; -}//namespace cura +} // namespace cura -#endif//SLICE_DATA_STORAGE_H +#endif // SLICE_DATA_STORAGE_H diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 6544e8b799..35419aef1e 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -401,7 +401,7 @@ std::shared_ptr TreeSupportTipGenerator::generateCrossFi { return std::make_shared(aabb, line_distance, line_width, cross_subdisivion_spec_image_file); } - return std::make_shared(aabb, line_distance, line_width); + return std::make_shared(aabb, line_distance, line_width); } return nullptr; } diff --git a/src/infill/LightningTreeNode.cpp b/src/infill/LightningTreeNode.cpp index 9766c6fcb2..cdde2d374d 100644 --- a/src/infill/LightningTreeNode.cpp +++ b/src/infill/LightningTreeNode.cpp @@ -15,7 +15,7 @@ coord_t LightningTreeNode::getWeightedDistance(const Point& unsupported_location constexpr coord_t max_valence_for_boost = 4; constexpr coord_t valence_boost_multiplier = 4; - const size_t valence = (!is_root) + children.size(); + const size_t valence = (! is_root) + children.size(); const coord_t valence_boost = (min_valence_for_boost < valence && valence < max_valence_for_boost) ? valence_boost_multiplier * supporting_radius : 0; const coord_t dist_here = vSize(getLocation() - unsupported_location); return dist_here - valence_boost; @@ -29,7 +29,8 @@ bool LightningTreeNode::hasOffspring(const LightningTreeNodeSPtr& to_be_checked) } for (auto& child_ptr : children) { - if (child_ptr->hasOffspring(to_be_checked)) return true; + if (child_ptr->hasOffspring(to_be_checked)) + return true; } return false; } @@ -54,22 +55,20 @@ LightningTreeNodeSPtr LightningTreeNode::addChild(const Point& child_loc) LightningTreeNodeSPtr LightningTreeNode::addChild(LightningTreeNodeSPtr& new_child) { assert(new_child != shared_from_this()); - //assert(p != new_child->p); // NOTE: No problem for now. Issue to solve later. Maybe even afetr final. Low prio. + // assert(p != new_child->p); // NOTE: No problem for now. Issue to solve later. Maybe even afetr final. Low prio. children.push_back(new_child); new_child->parent = shared_from_this(); new_child->is_root = false; return new_child; } -void LightningTreeNode::propagateToNextLayer -( +void LightningTreeNode::propagateToNextLayer( std::vector& next_trees, const Polygons& next_outlines, const LocToLineGrid& outline_locator, const coord_t prune_distance, const coord_t smooth_magnitude, - const coord_t max_remove_colinear_dist -) const + const coord_t max_remove_colinear_dist) const { auto tree_below = deepCopy(); @@ -105,10 +104,11 @@ void LightningTreeNode::visitNodes(const std::function& last_grounding_location /*= std::nullopt*/) -: is_root(true) -, p(p) -, last_grounding_location(last_grounding_location) -{} + : is_root(true) + , p(p) + , last_grounding_location(last_grounding_location) +{ +} LightningTreeNodeSPtr LightningTreeNode::deepCopy() const { @@ -169,12 +169,7 @@ LightningTreeNodeSPtr LightningTreeNode::closestNode(const Point& loc) return result; } -bool LightningTreeNode::realign -( - const Polygons& outlines, - const LocToLineGrid& outline_locator, - std::vector& rerooted_parts -) +bool LightningTreeNode::realign(const Polygons& outlines, const LocToLineGrid& outline_locator, std::vector& rerooted_parts) { if (outlines.empty()) { @@ -186,8 +181,7 @@ bool LightningTreeNode::realign // Only keep children that have an unbroken connection to here, realign will put the rest in rerooted parts due to recursion: Point coll; bool reground_me = false; - const auto remove_unconnected_func - { + const auto remove_unconnected_func{ [&](const LightningTreeNodeSPtr& child) { bool connect_branch = child->realign(outlines, outline_locator, rerooted_parts); @@ -233,13 +227,8 @@ void LightningTreeNode::straighten(const coord_t magnitude, const coord_t max_re straighten(magnitude, p, 0, max_remove_colinear_dist * max_remove_colinear_dist); } -LightningTreeNode::RectilinearJunction LightningTreeNode::straighten -( - const coord_t magnitude, - const Point& junction_above, - const coord_t accumulated_dist, - const coord_t max_remove_colinear_dist2 -) +LightningTreeNode::RectilinearJunction + LightningTreeNode::straighten(const coord_t magnitude, const Point& junction_above, const coord_t accumulated_dist, const coord_t max_remove_colinear_dist2) { constexpr coord_t junction_magnitude_factor_numerator = 3; constexpr coord_t junction_magnitude_factor_denominator = 4; @@ -269,14 +258,10 @@ LightningTreeNode::RectilinearJunction LightningTreeNode::straighten { // remove nodes on linear segments constexpr coord_t close_enough = 10; - child_p = children.front(); //recursive call to straighten might have removed the child + child_p = children.front(); // recursive call to straighten might have removed the child const LightningTreeNodeSPtr& parent_node = parent.lock(); - if - ( - parent_node && - vSize2(child_p->p - parent_node->p) < max_remove_colinear_dist2 && - LinearAlg2D::getDist2FromLineSegment(parent_node->p, p, child_p->p) < close_enough - ) + if (parent_node && vSize2(child_p->p - parent_node->p) < max_remove_colinear_dist2 + && LinearAlg2D::getDist2FromLineSegment(parent_node->p, p, child_p->p) < close_enough) { child_p->parent = parent; for (auto& sibling : parent_node->children) @@ -329,7 +314,7 @@ coord_t LightningTreeNode::prune(const coord_t& pruning_distance) } coord_t max_distance_pruned = 0; - for (auto child_it = children.begin(); child_it != children.end(); ) + for (auto child_it = children.begin(); child_it != children.end();) { auto& child = *child_it; coord_t dist_pruned_child = child->prune(pruning_distance); @@ -403,7 +388,7 @@ void LightningTreeNode::convertToPolylines(size_t long_line_idx, Polygons& outpu void LightningTreeNode::removeJunctionOverlap(Polygons& result_lines, const coord_t line_width) const { const coord_t reduction = line_width / 2; // TODO make configurable? - for (auto poly_it = result_lines.begin(); poly_it != result_lines.end(); ) + for (auto poly_it = result_lines.begin(); poly_it != result_lines.end();) { PolygonRef polyline = *poly_it; if (polyline.size() <= 1) diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 4e89ea5625..788ac2e45a 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include +#include "sliceDataStorage.h" #include "Application.h" //To get settings. #include "ExtruderTrain.h" @@ -12,14 +12,18 @@ #include "infill/SierpinskiFillProvider.h" #include "infill/SubDivCube.h" // For the destructor #include "raft.h" -#include "sliceDataStorage.h" #include "utils/math.h" //For PI. +#include + namespace cura { -SupportStorage::SupportStorage() : generated(false), layer_nr_max_filled_layer(-1), cross_fill_provider(nullptr) +SupportStorage::SupportStorage() + : generated(false) + , layer_nr_max_filled_layer(-1) + , cross_fill_provider(nullptr) { } @@ -124,7 +128,8 @@ bool SliceMeshStorage::getExtruderIsUsed(const size_t extruder_nr) const { return true; } - if ((settings.get("wall_line_count") > 1 || settings.get("alternate_extra_perimeter")) && settings.get("wall_x_extruder_nr").extruder_nr == extruder_nr) + if ((settings.get("wall_line_count") > 1 || settings.get("alternate_extra_perimeter")) + && settings.get("wall_x_extruder_nr").extruder_nr == extruder_nr) { return true; } @@ -155,7 +160,8 @@ bool SliceMeshStorage::getExtruderIsUsed(const size_t extruder_nr, const LayerIn return false; } const SliceLayer& layer = layers[layer_nr]; - if (settings.get("wall_0_extruder_nr").extruder_nr == extruder_nr && (settings.get("wall_line_count") > 0 || settings.get("skin_outline_count") > 0)) + if (settings.get("wall_0_extruder_nr").extruder_nr == extruder_nr + && (settings.get("wall_line_count") > 0 || settings.get("skin_outline_count") > 0)) { for (const SliceLayerPart& part : layer.parts) { @@ -165,11 +171,13 @@ bool SliceMeshStorage::getExtruderIsUsed(const size_t extruder_nr, const LayerIn } } } - if (settings.get("magic_mesh_surface_mode") != ESurfaceMode::NORMAL && settings.get("wall_0_extruder_nr").extruder_nr == extruder_nr && layer.openPolyLines.size() > 0) + if (settings.get("magic_mesh_surface_mode") != ESurfaceMode::NORMAL && settings.get("wall_0_extruder_nr").extruder_nr == extruder_nr + && layer.openPolyLines.size() > 0) { return true; } - if ((settings.get("wall_line_count") > 1 || settings.get("alternate_extra_perimeter")) && settings.get("wall_x_extruder_nr").extruder_nr == extruder_nr) + if ((settings.get("wall_line_count") > 1 || settings.get("alternate_extra_perimeter")) + && settings.get("wall_x_extruder_nr").extruder_nr == extruder_nr) { for (const SliceLayerPart& part : layer.parts) { @@ -241,10 +249,10 @@ std::vector SliceDataStorage::initializeRetractionAndWi return ret; } -SliceDataStorage::SliceDataStorage() : - print_layer_count(0), - retraction_wipe_config_per_extruder(initializeRetractionAndWipeConfigs()), - max_print_height_second_to_last_extruder(-1) +SliceDataStorage::SliceDataStorage() + : print_layer_count(0) + , retraction_wipe_config_per_extruder(initializeRetractionAndWipeConfigs()) + , max_print_height_second_to_last_extruder(-1) { const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; Point3 machine_max(mesh_group_settings.get("machine_width"), mesh_group_settings.get("machine_depth"), mesh_group_settings.get("machine_height")); @@ -258,7 +266,9 @@ SliceDataStorage::SliceDataStorage() : machine_size.include(machine_max); } -Polygons SliceDataStorage::getLayerOutlines(const LayerIndex layer_nr, const bool include_support, const bool include_prime_tower, const bool external_polys_only, const int extruder_nr) const +Polygons + SliceDataStorage::getLayerOutlines(const LayerIndex layer_nr, const bool include_support, const bool include_prime_tower, const bool external_polys_only, const int extruder_nr) + const { const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; if (layer_nr < 0 && layer_nr < -static_cast(Raft::getFillerLayerCount())) @@ -469,7 +479,8 @@ std::vector SliceDataStorage::getExtrudersUsed(const LayerIndex layer_nr) // support if (layer_nr < int(support.supportLayers.size())) { - const SupportLayer& support_layer = support.supportLayers[std::max(LayerIndex(0), layer_nr)]; // Below layer 0, it's the same as layer 0 (even though it's not stored here). + const SupportLayer& support_layer + = support.supportLayers[std::max(LayerIndex(0), layer_nr)]; // Below layer 0, it's the same as layer 0 (even though it's not stored here). if (layer_nr == 0) { if (! support_layer.support_infill_parts.empty()) @@ -552,7 +563,7 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const for (PolygonRef poly : disallowed_areas) for (Point& p : poly) p = Point(machine_size.max.x / 2 + p.X, machine_size.max.y / 2 - p.Y); // apparently the frontend stores the disallowed areas in a different coordinate system - + std::vector extruder_is_used = getExtrudersUsed(); constexpr coord_t prime_clearance = MM2INT(6.5); @@ -563,7 +574,7 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const continue; } Settings& extruder_settings = Application::getInstance().current_slice->scene.extruders[extruder_nr].settings; - if (!(extruder_settings.get("prime_blob_enable") && mesh_group_settings.get("extruder_prime_pos_abs"))) + if (! (extruder_settings.get("prime_blob_enable") && mesh_group_settings.get("extruder_prime_pos_abs"))) { continue; } @@ -583,7 +594,7 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const bool first = true; for (size_t extruder_nr = 0; extruder_nr < extruder_is_used.size(); extruder_nr++) { - if ((checking_extruder_nr != -1 && int(extruder_nr) != checking_extruder_nr) || !extruder_is_used[extruder_nr]) + if ((checking_extruder_nr != -1 && int(extruder_nr) != checking_extruder_nr) || ! extruder_is_used[extruder_nr]) { continue; } @@ -602,7 +613,7 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const } } disallowed_all_extruders.processEvenOdd(ClipperLib::pftNonZero); // prevent overlapping disallowed areas from XORing - + Polygons border_all_extruders = border; // each extruders border areas must be limited to the global border, which is the union of all extruders borders if (mesh_group_settings.has("nozzle_offsetting_for_disallowed_areas") && mesh_group_settings.get("nozzle_offsetting_for_disallowed_areas")) { diff --git a/src/support.cpp b/src/support.cpp index f1c1bc6bd6..1adb0b1ae7 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -761,8 +761,10 @@ void AreaSupport::precomputeCrossInfillTree(SliceDataStorage& storage) { spdlog::error("Cannot find density image: {}.", cross_subdisivion_spec_image_file); } - storage.support.cross_fill_provider - = std::make_shared(aabb, infill_extruder.settings.get("support_line_distance"), infill_extruder.settings.get("support_line_width")); + storage.support.cross_fill_provider = std::make_shared( + aabb, + infill_extruder.settings.get("support_line_distance"), + infill_extruder.settings.get("support_line_width")); } } } From 159dd626f746e029a30e123026414111aed887c4 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 24 Aug 2023 12:35:25 +0200 Subject: [PATCH 262/470] Add scripta logs CURA-10446 --- src/LayerPlan.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 31873f8608..0851d6cb40 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -18,8 +18,10 @@ #include "utils/Simplify.h" #include "utils/linearAlg2D.h" #include "utils/polygonUtils.h" +#include "utils/section_type.h" #include +#include #include #include @@ -1844,10 +1846,45 @@ void LayerPlan::writeGCode(GCodeExport& gcode) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; + scripta::log( + "extruder_plan_0", + extruder_plan.paths, + SectionType::NA, + layer_nr, + scripta::CellVDI{ "flow", &GCodePath::flow }, + scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, + scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, + scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, + scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, + scripta::CellVDI{ "retract", &GCodePath::retract }, + scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, + scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, + scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, + scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, + scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, + scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); + extruder_plan.paths = slots::instance().modify(extruder_plan.paths, extruder_plan.extruder_nr, layer_nr); // Since the time/material estimates _may_ have changed during the plugin modify step we recalculate it extruder_plan.computeNaiveTimeEstimates(gcode.getPositionXY()); + scripta::log( + "extruder_plan_1", + extruder_plan.paths, + SectionType::NA, + layer_nr, + scripta::CellVDI{ "flow", &GCodePath::flow }, + scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, + scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, + scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, + scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, + scripta::CellVDI{ "retract", &GCodePath::retract }, + scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, + scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, + scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, + scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, + scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, + scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); const RetractionAndWipeConfig* retraction_config = current_mesh ? ¤t_mesh->retraction_wipe_config : &storage.retraction_wipe_config_per_extruder[extruder_plan.extruder_nr]; @@ -2173,6 +2210,23 @@ void LayerPlan::writeGCode(GCodeExport& gcode) } extruder_plan.handleAllRemainingInserts(gcode); + scripta::log( + "extruder_plan_2", + extruder_plan.paths, + SectionType::NA, + layer_nr, + scripta::CellVDI{ "flow", &GCodePath::flow }, + scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, + scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, + scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, + scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, + scripta::CellVDI{ "retract", &GCodePath::retract }, + scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, + scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, + scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, + scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, + scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, + scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); } // extruder plans /\ . communication->sendLayerComplete(layer_nr, z, layer_thickness); From 49055b7fb251d542466fc56667de854ecdb46f0b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 25 Aug 2023 14:27:49 +0200 Subject: [PATCH 263/470] Fix compiling on mac CURA-10446 --- src/LayerPlan.cpp | 9 +- src/settings/PathConfigStorage.cpp | 152 ++++++++++++++--------------- 2 files changed, 84 insertions(+), 77 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 0851d6cb40..e66328e18c 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -50,7 +50,14 @@ GCodePath* LayerPlan::getLatestPathWithConfig( { return &paths.back(); } - paths.emplace_back(config, current_mesh, space_fill_type, flow, width_factor, spiralize, speed_factor); + paths.emplace_back(GCodePath{ .config = config, + .mesh = current_mesh, + .space_fill_type = space_fill_type, + .flow = flow, + .width_factor = width_factor, + .spiralize = spiralize, + .speed_factor = speed_factor }); + GCodePath* ret = &paths.back(); ret->skip_agressive_merge_hint = mode_skip_agressive_merge; return ret; diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 382eacb827..e32e9afb15 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -43,46 +43,45 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye , support_roof_train(Application::getInstance().current_slice->scene.extruders[support_roof_extruder_nr]) , support_bottom_train(Application::getInstance().current_slice->scene.extruders[support_bottom_extruder_nr]) , line_width_factor_per_extruder(PathConfigStorage::getLineWidthFactorPerExtruder(layer_nr)) - , raft_base_config( - PrintFeatureType::SupportInterface, - raft_base_train.settings.get("raft_base_line_width"), - raft_base_train.settings.get("raft_base_thickness"), - Ratio(1.0), - SpeedDerivatives{ .speed = raft_base_train.settings.get("raft_base_speed"), - .acceleration = raft_base_train.settings.get("raft_base_acceleration"), - .jerk = raft_base_train.settings.get("raft_base_jerk") }) - , raft_interface_config( - PrintFeatureType::Support, - raft_interface_train.settings.get("raft_interface_line_width"), - raft_interface_train.settings.get("raft_interface_thickness"), - Ratio(1.0), - SpeedDerivatives{ .speed = raft_interface_train.settings.get("raft_interface_speed"), - .acceleration = raft_interface_train.settings.get("raft_interface_acceleration"), - .jerk = raft_interface_train.settings.get("raft_interface_jerk") }) - , raft_surface_config( - PrintFeatureType::SupportInterface, - raft_surface_train.settings.get("raft_surface_line_width"), - raft_surface_train.settings.get("raft_surface_thickness"), - Ratio(1.0), - SpeedDerivatives{ .speed = raft_surface_train.settings.get("raft_surface_speed"), - .acceleration = raft_surface_train.settings.get("raft_surface_acceleration"), - .jerk = raft_surface_train.settings.get("raft_surface_jerk") }) - , support_roof_config( - PrintFeatureType::SupportInterface, - support_roof_train.settings.get("support_roof_line_width") * line_width_factor_per_extruder[support_roof_extruder_nr], - layer_thickness, - support_roof_train.settings.get("support_roof_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = support_roof_train.settings.get("speed_support_roof"), - .acceleration = support_roof_train.settings.get("acceleration_support_roof"), - .jerk = support_roof_train.settings.get("jerk_support_roof") }) - , support_bottom_config( - PrintFeatureType::SupportInterface, - support_bottom_train.settings.get("support_bottom_line_width") * line_width_factor_per_extruder[support_bottom_extruder_nr], - layer_thickness, - support_roof_train.settings.get("support_bottom_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = support_bottom_train.settings.get("speed_support_bottom"), - .acceleration = support_bottom_train.settings.get("acceleration_support_bottom"), - .jerk = support_bottom_train.settings.get("jerk_support_bottom") }) + , raft_base_config(GCodePathConfig{ .type = PrintFeatureType::SupportInterface, + .line_width = raft_base_train.settings.get("raft_base_line_width"), + .layer_thickness = raft_base_train.settings.get("raft_base_thickness"), + .flow = Ratio(1.0), + .speed_derivatives = SpeedDerivatives{ .speed = raft_base_train.settings.get("raft_base_speed"), + .acceleration = raft_base_train.settings.get("raft_base_acceleration"), + .jerk = raft_base_train.settings.get("raft_base_jerk") } }) + , raft_interface_config(GCodePathConfig{ .type = PrintFeatureType::Support, + .line_width = raft_interface_train.settings.get("raft_interface_line_width"), + .layer_thickness = raft_interface_train.settings.get("raft_interface_thickness"), + .flow = Ratio(1.0), + .speed_derivatives = SpeedDerivatives{ .speed = raft_interface_train.settings.get("raft_interface_speed"), + .acceleration = raft_interface_train.settings.get("raft_interface_acceleration"), + .jerk = raft_interface_train.settings.get("raft_interface_jerk") } }) + , raft_surface_config(GCodePathConfig{ .type = PrintFeatureType::SupportInterface, + .line_width = raft_surface_train.settings.get("raft_surface_line_width"), + .layer_thickness = raft_surface_train.settings.get("raft_surface_thickness"), + .flow = Ratio(1.0), + .speed_derivatives = SpeedDerivatives{ .speed = raft_surface_train.settings.get("raft_surface_speed"), + .acceleration = raft_surface_train.settings.get("raft_surface_acceleration"), + .jerk = raft_surface_train.settings.get("raft_surface_jerk") } }) + , support_roof_config(GCodePathConfig{ + .type = PrintFeatureType::SupportInterface, + .line_width = static_cast(support_roof_train.settings.get("support_roof_line_width") * line_width_factor_per_extruder[support_roof_extruder_nr]), + .layer_thickness = layer_thickness, + .flow + = support_roof_train.settings.get("support_roof_material_flow") * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), + .speed_derivatives = { .speed = support_roof_train.settings.get("speed_support_roof"), + .acceleration = support_roof_train.settings.get("acceleration_support_roof"), + .jerk = support_roof_train.settings.get("jerk_support_roof") } }) + , support_bottom_config(GCodePathConfig{ + .type = PrintFeatureType::SupportInterface, + .line_width = static_cast(support_bottom_train.settings.get("support_bottom_line_width") * line_width_factor_per_extruder[support_bottom_extruder_nr]), + .layer_thickness = layer_thickness, + .flow = support_roof_train.settings.get("support_bottom_material_flow") + * ((layer_nr == 0) ? support_roof_train.settings.get("material_flow_layer_0") : Ratio(1.0)), + .speed_derivatives = SpeedDerivatives{ .speed = support_bottom_train.settings.get("speed_support_bottom"), + .acceleration = support_bottom_train.settings.get("acceleration_support_bottom"), + .jerk = support_bottom_train.settings.get("jerk_support_bottom") } }) { const size_t extruder_count = Application::getInstance().current_slice->scene.extruders.size(); travel_config_per_extruder.reserve(extruder_count); @@ -92,35 +91,36 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye for (size_t extruder_nr = 0; extruder_nr < extruder_count; extruder_nr++) { const ExtruderTrain& train = Application::getInstance().current_slice->scene.extruders[extruder_nr]; - travel_config_per_extruder.emplace_back( - PrintFeatureType::MoveCombing, - 0, - 0, - 0.0, - SpeedDerivatives{ .speed = train.settings.get("speed_travel"), - .acceleration = train.settings.get("acceleration_travel"), - .jerk = train.settings.get("jerk_travel") }); + travel_config_per_extruder.emplace_back(GCodePathConfig{ .type = PrintFeatureType::MoveCombing, + .line_width = 0, + .layer_thickness = 0, + .flow = 0.0, + .speed_derivatives = SpeedDerivatives{ .speed = train.settings.get("speed_travel"), + .acceleration = train.settings.get("acceleration_travel"), + .jerk = train.settings.get("jerk_travel") } }); skirt_brim_config_per_extruder.emplace_back( - PrintFeatureType::SkirtBrim, - train.settings.get("skirt_brim_line_width") - * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) - ? 1.0_r - : line_width_factor_per_extruder[extruder_nr]) // cause it's also used for the draft/ooze shield - , - layer_thickness, - train.settings.get("skirt_brim_material_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = train.settings.get("skirt_brim_speed"), - .acceleration = train.settings.get("acceleration_skirt_brim"), - .jerk = train.settings.get("jerk_skirt_brim") }); - prime_tower_config_per_extruder.emplace_back( - PrintFeatureType::PrimeTower, - train.settings.get("prime_tower_line_width") - * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr]), - layer_thickness, - train.settings.get("prime_tower_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), - SpeedDerivatives{ .speed = train.settings.get("speed_prime_tower"), - .acceleration = train.settings.get("acceleration_prime_tower"), - .jerk = train.settings.get("jerk_prime_tower") }); + GCodePathConfig{ .type = PrintFeatureType::SkirtBrim, + .line_width = static_cast( + train.settings.get("skirt_brim_line_width") + * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) + ? 1.0_r + : line_width_factor_per_extruder[extruder_nr])) // cause it's also used for the draft/ooze shield + , + .layer_thickness = layer_thickness, + .flow = train.settings.get("skirt_brim_material_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), + .speed_derivatives = SpeedDerivatives{ .speed = train.settings.get("skirt_brim_speed"), + .acceleration = train.settings.get("acceleration_skirt_brim"), + .jerk = train.settings.get("jerk_skirt_brim") } }); + prime_tower_config_per_extruder.emplace_back(GCodePathConfig{ + .type = PrintFeatureType::PrimeTower, + .line_width = static_cast( + train.settings.get("prime_tower_line_width") + * ((mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT) ? 1.0_r : line_width_factor_per_extruder[extruder_nr])), + .layer_thickness = layer_thickness, + .flow = train.settings.get("prime_tower_flow") * ((layer_nr == 0) ? train.settings.get("material_flow_layer_0") : Ratio(1.0)), + .speed_derivatives = SpeedDerivatives{ .speed = train.settings.get("speed_prime_tower"), + .acceleration = train.settings.get("acceleration_prime_tower"), + .jerk = train.settings.get("jerk_prime_tower") } }); } mesh_configs.reserve(storage.meshes.size()); @@ -135,14 +135,14 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye for (int combine_idx = 0; combine_idx < MAX_INFILL_COMBINE; combine_idx++) { support_infill_config.emplace_back( - PrintFeatureType::Support, - support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor, - layer_thickness, - support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) - * (combine_idx + 1), - SpeedDerivatives{ .speed = support_infill_train.settings.get("speed_support_infill"), - .acceleration = support_infill_train.settings.get("acceleration_support_infill"), - .jerk = support_infill_train.settings.get("jerk_support_infill") }); + GCodePathConfig{ .type = PrintFeatureType::Support, + .line_width = static_cast(support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor), + .layer_thickness = layer_thickness, + .flow = -support_infill_train.settings.get("support_material_flow") + * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), + .speed_derivatives = SpeedDerivatives{ .speed = support_infill_train.settings.get("speed_support_infill"), + .acceleration = support_infill_train.settings.get("acceleration_support_infill"), + .jerk = support_infill_train.settings.get("jerk_support_infill") } }); } const size_t initial_speedup_layer_count = mesh_group_settings.get("speed_slowdown_layers"); From b6b03ab78056694bc5e24004b771e9b41027658f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 29 Aug 2023 08:15:26 +0200 Subject: [PATCH 264/470] Points toward CURA-10951 Arcus Contributes to CURA-10951 and CURA-10446 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 48a1345cca..fb5c5b4fce 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/cura_10475") # TODO: point to `testing` once the CURA-10475 from libArcus is main + self.requires("arcus/(latest)@ultimaker/cura_10951") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") From 8d7f60caac521ea8361193597b62a0b08747cdc6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 29 Aug 2023 09:33:23 +0200 Subject: [PATCH 265/470] Use CURA-10475 for Arcus Contributes to CURA-10951 and CURA-10446 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index fb5c5b4fce..42fcd716de 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/cura_10951") + self.requires("arcus/(latest)@ultimaker/cura_10475") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") From 0e137e2583dd2c453a4851d40bff7e5b5372929f Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 29 Aug 2023 10:46:48 +0200 Subject: [PATCH 266/470] const correctness CURA-10446 --- include/plugins/converters.h | 4 ++-- src/plugins/converters.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/plugins/converters.h b/include/plugins/converters.h index 9f76c71b5f..01870b2056 100644 --- a/include/plugins/converters.h +++ b/include/plugins/converters.h @@ -87,7 +87,7 @@ struct simplify_request : public details::converter { - native_value_type operator()([[maybe_unused]] native_value_type& original_value, const value_type& message) const; + native_value_type operator()([[maybe_unused]] const native_value_type& original_value, const value_type& message) const; }; struct postprocess_request : public details::converter @@ -97,7 +97,7 @@ struct postprocess_request : public details::converter { - native_value_type operator()([[maybe_unused]] native_value_type& original_value, const value_type& message) const; + native_value_type operator()([[maybe_unused]] const native_value_type& original_value, const value_type& message) const; }; struct infill_generate_request : public details::converter diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index d13c07d92e..e0e9c27a3b 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -125,7 +125,7 @@ simplify_request::value_type } simplify_response::native_value_type - simplify_response::operator()([[maybe_unused]] simplify_response::native_value_type& original_value, const simplify_response::value_type& message) const + simplify_response::operator()([[maybe_unused]] const simplify_response::native_value_type& original_value, const simplify_response::value_type& message) const { native_value_type poly{}; for (const auto& paths : message.polygons().polygons()) @@ -158,7 +158,7 @@ postprocess_request::value_type postprocess_request::operator()(const postproces } postprocess_response::native_value_type - postprocess_response::operator()([[maybe_unused]] postprocess_response::native_value_type& original_value, const postprocess_response::value_type& message) const + postprocess_response::operator()([[maybe_unused]] const postprocess_response::native_value_type& original_value, const postprocess_response::value_type& message) const { return message.gcode_word(); } From 9d035ebe15d4f29e081cbb840d118a6d97cf64f5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 29 Aug 2023 13:02:35 +0200 Subject: [PATCH 267/470] remove postfix Contributes to CURA-10951 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 42fcd716de..58e40c0719 100644 --- a/conanfile.py +++ b/conanfile.py @@ -43,7 +43,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-alpha.1" + self.version = "5.5.0-alpha" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From e537fa6c8caf8aca5c8411283b59be25531f808e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 29 Aug 2023 15:17:24 +0200 Subject: [PATCH 268/470] add line Contributes to CURA-10951 --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 58e40c0719..4778c863bb 100644 --- a/conanfile.py +++ b/conanfile.py @@ -83,6 +83,7 @@ def build_requirements(self): if self.options.enable_benchmarks: self.test_requires("benchmark/1.7.0") + def requirements(self): if self.options.enable_arcus: self.requires("arcus/(latest)@ultimaker/cura_10475") From 49dd39dc7d980884e5e2ac80833c5c4df1609429 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 29 Aug 2023 17:09:26 +0200 Subject: [PATCH 269/470] Fix negative flows We were trying to retract the whole model back in the nozzle --- src/settings/PathConfigStorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index e32e9afb15..2f9dd2acea 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -138,7 +138,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye GCodePathConfig{ .type = PrintFeatureType::Support, .line_width = static_cast(support_infill_train.settings.get("support_line_width") * support_infill_line_width_factor), .layer_thickness = layer_thickness, - .flow = -support_infill_train.settings.get("support_material_flow") + .flow = support_infill_train.settings.get("support_material_flow") * ((layer_nr == 0) ? support_infill_train.settings.get("material_flow_layer_0") : Ratio(1.0)) * (combine_idx + 1), .speed_derivatives = SpeedDerivatives{ .speed = support_infill_train.settings.get("speed_support_infill"), .acceleration = support_infill_train.settings.get("acceleration_support_infill"), From 02c83d610120f1f39f552d81529333ca9239d101 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 30 Aug 2023 16:35:34 +0200 Subject: [PATCH 270/470] Extend grpc modify path messages CURA-10446 --- src/plugins/converters.cpp | 93 +++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index e0e9c27a3b..8214f402f4 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -329,13 +329,6 @@ gcode_paths_modify_request::value_type for (const auto& path : paths) { auto* gcode_path = gcode_paths->Add(); - gcode_path->set_space_fill_type(getSpaceFillType(path.space_fill_type)); - - gcode_path->set_flow(path.flow); - gcode_path->set_width_factor(path.width_factor); - gcode_path->set_spiralize(path.spiralize); - gcode_path->set_speed_factor(path.speed_factor); - gcode_path->set_mesh_name(path.mesh ? path.mesh->mesh_name : ""); // Construct the OpenPath from the points in a GCodePath for (const auto& point : path.points) { @@ -343,17 +336,27 @@ gcode_paths_modify_request::value_type points->set_x(point.X); points->set_y(point.Y); } - - auto* config_msg = gcode_path->mutable_config(); - config_msg->set_feature(getPrintFeature(path.config.type)); - config_msg->set_line_width(path.config.getLineWidth()); - config_msg->set_layer_thickness(path.config.getLayerThickness()); - config_msg->set_flow_ratio(path.config.getFlowRatio()); - config_msg->set_is_bridge_path(path.config.isBridgePath()); - config_msg->set_fan_speed(path.config.getFanSpeed()); - config_msg->mutable_speed_derivatives()->set_velocity(path.config.getSpeed()); - config_msg->mutable_speed_derivatives()->set_acceleration(path.config.getAcceleration()); - config_msg->mutable_speed_derivatives()->set_jerk(path.config.getJerk()); + gcode_path->set_space_fill_type(getSpaceFillType(path.space_fill_type)); + gcode_path->set_flow(path.flow); + gcode_path->set_width_factor(path.width_factor); + gcode_path->set_spiralize(path.spiralize); + gcode_path->set_speed_factor(path.speed_factor); + gcode_path->set_speed_back_pressure_factor(path.speed_back_pressure_factor); + gcode_path->set_retract(path.retract); + gcode_path->set_unretract_before_last_travel_move(path.unretract_before_last_travel_move); + gcode_path->set_perform_z_hop(path.perform_z_hop); + gcode_path->set_skip_agressive_merge_hint(path.skip_agressive_merge_hint); + gcode_path->set_done(path.done); + gcode_path->set_fan_speed(path.getFanSpeed()); + gcode_path->set_mesh_name(path.mesh ? path.mesh->mesh_name : ""); + gcode_path->set_feature(getPrintFeature(path.config.type)); + gcode_path->mutable_speed_derivatives()->set_velocity(path.config.getSpeed()); + gcode_path->mutable_speed_derivatives()->set_acceleration(path.config.getAcceleration()); + gcode_path->mutable_speed_derivatives()->set_jerk(path.config.getJerk()); + gcode_path->set_line_width(path.config.getLineWidth()); + gcode_path->set_layer_thickness(path.config.getLayerThickness()); + gcode_path->set_flow_ratio(path.config.getFlowRatio()); + gcode_path->set_is_bridge_path(path.config.isBridgePath()); } return message; @@ -413,22 +416,14 @@ gcode_paths_modify_request::value_type [[nodiscard]] GCodePathConfig gcode_paths_modify_response::buildConfig(const v0::GCodePath& path) { - const coord_t line_width = path.config().line_width(); - const coord_t layer_height = path.config().layer_thickness(); - const Ratio flow = path.config().flow_ratio(); - const SpeedDerivatives speed_derivatives{ .speed = path.config().speed_derivatives().velocity(), - .acceleration = path.config().speed_derivatives().acceleration(), - .jerk = path.config().speed_derivatives().jerk() }; - const bool is_bridge_path = path.config().is_bridge_path(); - const double fan_speed = path.config().fan_speed(); - const auto feature_type = getPrintFeatureType(path.config().feature()); - return { .type = feature_type, - .line_width = line_width, - .layer_thickness = layer_height, - .flow = flow, - .speed_derivatives = speed_derivatives, - .is_bridge_path = is_bridge_path, - .fan_speed = fan_speed }; + return { .type = getPrintFeatureType(path.feature()), + .line_width = path.line_width(), + .layer_thickness = path.layer_thickness(), + .flow = path.flow_ratio(), + .speed_derivatives + = SpeedDerivatives{ .speed = path.speed_derivatives().velocity(), .acceleration = path.speed_derivatives().acceleration(), .jerk = path.speed_derivatives().jerk() }, + .is_bridge_path = path.is_bridge_path(), + .fan_speed = path.fan_speed() }; } gcode_paths_modify_response::native_value_type @@ -451,19 +446,23 @@ gcode_paths_modify_response::native_value_type for (const auto& gcode_path_msg : message.gcode_paths()) { - const GCodePathConfig config = buildConfig(gcode_path_msg); - const Ratio flow = gcode_path_msg.flow(); - const Ratio width_factor = gcode_path_msg.width_factor(); - const bool spiralize = gcode_path_msg.spiralize(); - const Ratio speed_factor = gcode_path_msg.speed_factor(); - const auto space_fill_type = getSpaceFillType(gcode_path_msg.space_fill_type()); - GCodePath path{ .config = config, - .mesh = gcode_path_msg.mesh_name().empty() ? nullptr : meshes.at(gcode_path_msg.mesh_name()), - .space_fill_type = space_fill_type, - .flow = flow, - .width_factor = width_factor, - .spiralize = spiralize, - .speed_factor = speed_factor }; + GCodePath path { + .config = buildConfig(gcode_path_msg), + .mesh = gcode_path_msg.mesh_name().empty() ? nullptr : meshes.at(gcode_path_msg.mesh_name()), + .space_fill_type = getSpaceFillType(gcode_path_msg.space_fill_type()), + .flow = gcode_path_msg.flow(), + .width_factor = gcode_path_msg.width_factor(), + .spiralize = gcode_path_msg.spiralize(), + .speed_factor = gcode_path_msg.speed_factor(), + .speed_back_pressure_factor = gcode_path_msg.speed_back_pressure_factor(), + .retract = gcode_path_msg.retract(), + .unretract_before_last_travel_move = gcode_path_msg.unretract_before_last_travel_move(), + .perform_z_hop = gcode_path_msg.perform_z_hop(), + .skip_agressive_merge_hint = gcode_path_msg.skip_agressive_merge_hint(), + .done = gcode_path_msg.done(), + .fan_speed = gcode_path_msg.fan_speed(), + }; + path.points = gcode_path_msg.path().path() | ranges::views::transform( [](const auto& point_msg) From 4568c0ed6c6659d8ad22b3a501bdf102e286a3f4 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Wed, 30 Aug 2023 14:36:18 +0000 Subject: [PATCH 271/470] Applied clang-format. --- src/plugins/converters.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 8214f402f4..33e7d4882e 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -446,7 +446,7 @@ gcode_paths_modify_response::native_value_type for (const auto& gcode_path_msg : message.gcode_paths()) { - GCodePath path { + GCodePath path{ .config = buildConfig(gcode_path_msg), .mesh = gcode_path_msg.mesh_name().empty() ? nullptr : meshes.at(gcode_path_msg.mesh_name()), .space_fill_type = getSpaceFillType(gcode_path_msg.space_fill_type()), From 9614f94bb5292f838a3c3bfc91b6da5684e3c0bc Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 30 Aug 2023 16:57:51 +0200 Subject: [PATCH 272/470] Don't print wall type line comment with each path Resolves gcode comment spam CURA-10446 --- src/LayerPlan.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index a5553a8346..0ba0bf6cbc 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2070,8 +2070,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.writeZhopEnd(); } } - // TODO re-enable the config_changed check - const auto& extruder_changed = ! last_extrusion_config.has_value() /* || last_extrusion_config.value() != path.config */; + const auto& extruder_changed = ! last_extrusion_config.has_value() || (last_extrusion_config.value().type != path.config.type); if (! path.config.isTravelPath() && extruder_changed) { gcode.writeTypeComment(path.config.type); @@ -2079,8 +2078,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) { gcode.writeComment("BRIDGE"); } - // TODO uncomment next line, make path.config copyable - // last_extrusion_config = path.config; + last_extrusion_config = path.config; update_extrusion_offset = true; } else From bdc14ab76a1fb91570d75b1670c8bd3290a6910b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 30 Aug 2023 17:31:36 +0200 Subject: [PATCH 273/470] Use latest grpc definitions CURA-10446 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index fd4966cd98..02bb418c9a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -88,7 +88,7 @@ def requirements(self): self.requires("arcus/(latest)@ultimaker/cura_10475") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/latest@ultimaker/cura_10446") + self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From 60bd5dd82e2486131554a1dc4bfe2337a32c8e6d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 31 Aug 2023 04:52:49 +0200 Subject: [PATCH 274/470] updated required conan version Contribute to CURA-10951 --- conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 5f0f1993e1..49751fb6b0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -2,7 +2,6 @@ # CuraEngine is released under the terms of the AGPLv3 or higher from os import path -from pathlib import Path from conan import ConanFile from conan.errors import ConanInvalidConfiguration @@ -11,7 +10,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.scm import Version -required_conan_version = ">=1.54 <=1.56.0 || >=1.58.0 <2.0.0" +required_conan_version = ">=1.58.0 <2.0.0" class CuraEngineConan(ConanFile): From 1d94f07a304536d0d84fbb36aa7273d94afe7e43 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 31 Aug 2023 06:14:33 +0200 Subject: [PATCH 275/470] Enable the test_helper target for benchmarks as well Contribute to CURA-10475 --- CMakeLists.txt | 28 ++++++++++++++++++++++++++++ tests/CMakeLists.txt | 18 ------------------ 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86cc733242..a206a00c2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,6 +243,34 @@ target_link_libraries(CuraEngine PRIVATE _CuraEngine) target_compile_definitions(CuraEngine PRIVATE VERSION=\"${CURA_ENGINE_VERSION}\") # Compiling the test environment. +if (ENABLE_TESTING OR ENABLE_BENCHMARKS) + set(TESTS_HELPERS_SRC tests/ReadTestPolygons.cpp) + + set(TESTS_SRC_ARCUS) + if (ENABLE_ARCUS) + list(APPEND TESTS_SRC_ARCUS + ArcusCommunicationTest + ArcusCommunicationPrivateTest) + list(APPEND TESTS_HELPERS_SRC tests/arcus/MockSocket.cpp) + endif () + + add_library(test_helpers ${TESTS_HELPERS_SRC}) + target_compile_definitions(test_helpers PUBLIC $<$:BUILD_TESTS> $<$:ARCUS>) + target_include_directories(test_helpers PUBLIC "include" ${CMAKE_BINARY_DIR}/generated) + target_link_libraries(test_helpers PRIVATE + _CuraEngine + GTest::gtest + GTest::gmock + clipper::clipper + curaengine_grpc_definitions::curaengine_grpc_definitions + asio-grpc::asio-grpc + grpc::grpc + protobuf::libprotobuf) + if (ENABLE_ARCUS) + target_link_libraries(test_helpers PUBLIC arcus::arcus) + endif () +endif () + if (ENABLE_TESTING) enable_testing() add_subdirectory(tests) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b776a270b1..1e36893cee 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,24 +40,6 @@ set(TESTS_SRC_UTILS UnionFindTest ) -set(TESTS_HELPERS_SRC ReadTestPolygons.cpp) - -set(TESTS_SRC_ARCUS) -if (ENABLE_ARCUS) - list(APPEND TESTS_SRC_ARCUS - ArcusCommunicationTest - ArcusCommunicationPrivateTest) - list(APPEND TESTS_HELPERS_SRC arcus/MockSocket.cpp) -endif () - -add_library(test_helpers ${TESTS_HELPERS_SRC}) -target_compile_definitions(test_helpers PUBLIC $<$:BUILD_TESTS> $<$:ARCUS>) -target_include_directories(test_helpers PUBLIC "../include" ${CMAKE_BINARY_DIR}/generated) -target_link_libraries(test_helpers PRIVATE _CuraEngine GTest::gtest GTest::gmock clipper::clipper) -if (ENABLE_ARCUS) - target_link_libraries(test_helpers PUBLIC arcus::arcus protobuf::libprotobuf) -endif () - foreach (test ${TESTS_SRC_BASE}) add_executable(${test} main.cpp ${test}.cpp) add_test(NAME ${test} COMMAND "${test}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") From ac58f6b04fad6cc5c84fd29c75ef96d2f79ce99f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 31 Aug 2023 08:44:07 +0200 Subject: [PATCH 276/470] use latest version as specified as conan 2 Contribute to CURA-10475 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index be2badae8f..51fdfe6adb 100644 --- a/conanfile.py +++ b/conanfile.py @@ -86,7 +86,7 @@ def requirements(self): self.requires("arcus/(latest)@ultimaker/cura_10475") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/latest@ultimaker/testing") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From b3c5816fbcaa802a4ce3ffebd0d7cee677748d82 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 31 Aug 2023 09:24:20 +0200 Subject: [PATCH 277/470] Force gh runners --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 51fdfe6adb..0176fd6091 100644 --- a/conanfile.py +++ b/conanfile.py @@ -105,6 +105,7 @@ def generate(self): deps = CMakeDeps(self) deps.generate() + tc = CMakeToolchain(self) tc.variables["CURA_ENGINE_VERSION"] = self.version tc.variables["ENABLE_ARCUS"] = self.options.enable_arcus From 7a433a83e5155088629dff03f14800c53665573b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 31 Aug 2023 09:55:21 +0200 Subject: [PATCH 278/470] Fix building mac CURA-10951 --- tests/ExtruderPlanTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ExtruderPlanTest.cpp b/tests/ExtruderPlanTest.cpp index 026d87f0e4..d0d2772979 100644 --- a/tests/ExtruderPlanTest.cpp +++ b/tests/ExtruderPlanTest.cpp @@ -71,8 +71,8 @@ class ExtruderPlanTestPathCollection GCodePathConfig travel_config; ExtruderPlanTestPathCollection() - : extrusion_config(PrintFeatureType::OuterWall, 400, 100, 1.0_r, SpeedDerivatives(50.0, 1000.0, 10.0)) - , travel_config(PrintFeatureType::MoveCombing, 0, 100, 0.0_r, SpeedDerivatives(120.0, 5000.0, 30.0)) + : extrusion_config(GCodePathConfig{ .type = PrintFeatureType::OuterWall, .line_width = 400, .layer_thickness = 100, .flow = 1.0_r, .speed_derivatives = SpeedDerivatives { .speed = 50.0, .acceleration = 1000.0, .jerk = 10.0 } }) + , travel_config(GCodePathConfig{ .type = PrintFeatureType::MoveCombing, .line_width = 0, .layer_thickness = 100, .flow = 0.0_r, .speed_derivatives = SpeedDerivatives { .speed = 120.0, .acceleration = 5000.0, .jerk = 30.0 } }) { std::shared_ptr mesh = nullptr; constexpr Ratio flow_1 = 1.0_r; From d48b5fae04618b61b32a743a1fb607eaa9e3e6db Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 31 Aug 2023 09:58:53 +0200 Subject: [PATCH 279/470] Better handling of changing bed temperature CURA-8889 --- src/LayerPlan.cpp | 3 +-- src/gcodeExport.cpp | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 9122bbb414..3ec1ae09c5 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1886,8 +1886,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) mesh_group_settings.get("flow_rate_extrusion_offset_factor")); // Offset is in mm. static LayerIndex layer_1{ 1 - static_cast(Raft::getTotalExtraLayers()) }; - if (layer_nr == layer_1 && mesh_group_settings.get("machine_heated_bed") - && mesh_group_settings.get("material_bed_temperature") != mesh_group_settings.get("material_bed_temperature_layer_0")) + if (layer_nr == layer_1 && mesh_group_settings.get("machine_heated_bed")) { constexpr bool wait = false; gcode.writeBedTemperatureCommand(mesh_group_settings.get("material_bed_temperature"), wait); diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index 3fbd298ac8..e8b421b94a 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -110,6 +110,21 @@ void GCodeExport::preSetup(const size_t start_extruder) } estimateCalculator.setFirmwareDefaults(mesh_group->settings); + + if (mesh_group != scene.mesh_groups.begin()) + { + // Current bed temperature is the one of the previous group + bed_temperature = (scene.current_mesh_group - 1)->settings.get("material_bed_temperature"); + } + else if (! scene.current_mesh_group->settings.get("material_bed_temp_prepend")) + { + // Current bed temperature is the one of the first layer (has already been set in header) + bed_temperature = scene.current_mesh_group->settings.get("material_bed_temperature_layer_0"); + } + else + { + // Current bed temperature has not been set yet + } } void GCodeExport::setInitialAndBuildVolumeTemps(const unsigned int start_extruder_nr) @@ -708,21 +723,12 @@ bool GCodeExport::initializeExtruderTrains(const SliceDataStorage& storage, cons void GCodeExport::processInitialLayerBedTemperature() { - Scene& scene = Application::getInstance().current_slice->scene; - - if (scene.current_mesh_group->settings.get("material_bed_temp_prepend") && scene.current_mesh_group->settings.get("machine_heated_bed")) + const Scene& scene = Application::getInstance().current_slice->scene; + const bool heated = scene.current_mesh_group->settings.get("machine_heated_bed"); + const Temperature bed_temp = scene.current_mesh_group->settings.get("material_bed_temperature_layer_0"); + if (heated && bed_temp != 0) { - const Temperature bed_temp = scene.current_mesh_group->settings.get("material_bed_temperature_layer_0"); - if (scene.current_mesh_group == scene.mesh_groups.begin() // Always write bed temperature for first mesh group. - || bed_temp - != (scene.current_mesh_group - 1) - ->settings.get("material_bed_temperature")) // Don't write bed temperature if identical to temperature of previous group. - { - if (bed_temp != 0) - { - writeBedTemperatureCommand(bed_temp, scene.current_mesh_group->settings.get("material_bed_temp_wait")); - } - } + writeBedTemperatureCommand(bed_temp, scene.current_mesh_group->settings.get("material_bed_temp_wait")); } } From 6595207a83326bd8f5daf4d37671c5994d29ccd2 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 31 Aug 2023 13:32:20 +0200 Subject: [PATCH 280/470] Bed temperature management refinement This actually fixes a case where the temperature was not set properly with one-at-a-time mode CURA-8889 --- src/gcodeExport.cpp | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index e8b421b94a..396f702508 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -111,19 +111,22 @@ void GCodeExport::preSetup(const size_t start_extruder) estimateCalculator.setFirmwareDefaults(mesh_group->settings); - if (mesh_group != scene.mesh_groups.begin()) + if (mesh_group == scene.mesh_groups.begin()) { - // Current bed temperature is the one of the previous group - bed_temperature = (scene.current_mesh_group - 1)->settings.get("material_bed_temperature"); - } - else if (! scene.current_mesh_group->settings.get("material_bed_temp_prepend")) - { - // Current bed temperature is the one of the first layer (has already been set in header) - bed_temperature = scene.current_mesh_group->settings.get("material_bed_temperature_layer_0"); + if (! scene.current_mesh_group->settings.get("material_bed_temp_prepend")) + { + // Current bed temperature is the one of the first layer (has already been set in header) + bed_temperature = scene.current_mesh_group->settings.get("material_bed_temperature_layer_0"); + } + else + { + // Bed temperature has not been set yet + } } else { - // Current bed temperature has not been set yet + // Current bed temperature is the one of the previous group + bed_temperature = (scene.current_mesh_group - 1)->settings.get("material_bed_temperature"); } } @@ -1517,10 +1520,10 @@ void GCodeExport::writeBedTemperatureCommand(const Temperature& temperature, con { // The UM2 family doesn't support temperature commands (they are fixed in the firmware) return; } - bool wrote_command = false; - if (wait) + + if (bed_temperature != temperature) // Not already at the desired temperature. { - if (bed_temperature != temperature) // Not already at the desired temperature. + if (wait) { if (flavor == EGCodeFlavor::MARLIN) { @@ -1528,20 +1531,17 @@ void GCodeExport::writeBedTemperatureCommand(const Temperature& temperature, con *output_stream << PrecisionedDouble{ 1, temperature } << new_line; *output_stream << "M105" << new_line; } + *output_stream << "M190 S"; } - *output_stream << "M190 S"; - wrote_command = true; - } - else if (bed_temperature != temperature) - { - *output_stream << "M140 S"; - wrote_command = true; - } - if (wrote_command) - { + else + { + *output_stream << "M140 S"; + } + *output_stream << PrecisionedDouble{ 1, temperature } << new_line; + + bed_temperature = temperature; } - bed_temperature = temperature; } void GCodeExport::writeBuildVolumeTemperatureCommand(const Temperature& temperature, const bool wait) From 18abd192fd19dcb0cf1adcb04d7ff468afe9820d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 1 Sep 2023 16:09:23 +0200 Subject: [PATCH 281/470] Don't resolve crossing after all in certain cases. Most of this is defensive programming, but it can actually happen -- perhaps not anymore after the 'large_enough_vec' (for bisector calculation) will also have been upped (see next commit), but it's better to be safe and keep this as well. part of CURA-10410 second edition --- src/infill.cpp | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/infill.cpp b/src/infill.cpp index 75196336a6..6d83b49cbe 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -793,7 +793,9 @@ void Infill::resolveIntersection(const coord_t at_distance, const Point& interse auto& end_a = forward_line_a ? a->altered_end : a->altered_start; auto& end_b = forward_line_b ? b->altered_start : b->altered_end; - // Set values ('pre existing' values are needed when feeging these as reference parameters to functions that need a value). + // Set values ('pre existing' values are needed when feeding these as reference parameters to functions that need a value). + assert(! bend_a.has_value()); + assert(! bend_b.has_value()); bend_a.emplace(0, 0); bend_b.emplace(0, 0); @@ -806,17 +808,29 @@ void Infill::resolveIntersection(const coord_t at_distance, const Point& interse const auto s = intersect - offset; const auto t = s + bisect; + // In certain rare conditions, the lines do not actually intersect in a way that we can solve with the current algorithm. + bool is_resolved = true; + // Use both of the resulting lines to place the 'bends' by intersecting with the original line-segments. - LinearAlg2D::lineLineIntersection(q, r, a->start, a->end, bend_a.value()); - LinearAlg2D::lineLineIntersection(s, t, b->start, b->end, bend_b.value()); + is_resolved &= LinearAlg2D::lineLineIntersection(q, r, a->start, a->end, bend_a.value()); + is_resolved &= LinearAlg2D::lineLineIntersection(s, t, b->start, b->end, bend_b.value()); // Also set the new end-points. - LinearAlg2D::lineLineIntersection(connect_start, connect_end, q, r, end_a); - LinearAlg2D::lineLineIntersection(connect_start, connect_end, s, t, end_b); + is_resolved &= LinearAlg2D::lineLineIntersection(connect_start, connect_end, q, r, end_a); + is_resolved &= LinearAlg2D::lineLineIntersection(connect_start, connect_end, s, t, end_b); - // The connecting line will be made from the end-points. - connect_start = end_a; - connect_end = end_b; + if (is_resolved) + { + // The connecting line will be made from the end-points. + connect_start = end_a; + connect_end = end_b; + } + else + { + // Put everything that has now potentially become messed up, back. + bend_a.reset(); + bend_b.reset(); + } } void Infill::connectLines(Polygons& result_lines) From a77182eca1aa6c0d727aeb43d6bf4a758c2b8c10 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 1 Sep 2023 16:12:31 +0200 Subject: [PATCH 282/470] Large wasn't large enough. The smaller value caused rounding errors still. Since coord_t should always be 64-bit, even if people compile it for 32-bit systems (which we don't officially support, but still...), it's safe to go to the 32-bit max. This will solve most or all of the remaining issues with the infill-line-crossing-resolve. (It's a bit more important than the previous commit in that regard.) part of CURA-10410 second edition --- src/infill.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infill.cpp b/src/infill.cpp index 6d83b49cbe..2a137f71a9 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -800,7 +800,7 @@ void Infill::resolveIntersection(const coord_t at_distance, const Point& interse bend_b.emplace(0, 0); // Find a bisector of the intersection; specifically, the one that crosses the connection & offset it by 1/2 distance to each side. - constexpr auto large_enough_vec_len = 0xFFFF; + constexpr auto large_enough_vec_len = 0xFFFFFFFF; const auto bisect = LinearAlg2D::getBisectorVector(intersect, connect_start, connect_end, large_enough_vec_len); const auto offset = ((at_distance / 2) * Point(-bisect.Y, bisect.X)) / large_enough_vec_len; const auto q = intersect + offset; From e54f5719fbc11f352ff60f2a60d84c04521c3af6 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 1 Sep 2023 16:25:33 +0200 Subject: [PATCH 283/470] infill area calculated irrespective CURA-10823 --- include/skin.h | 2 +- src/skin.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/skin.h b/include/skin.h index 6beeae1643..65eb1dcaa8 100644 --- a/include/skin.h +++ b/include/skin.h @@ -125,7 +125,7 @@ class SkinInfillAreaComputation * where the infill areas (output) are stored. * \param skin The skin areas on the layer of the \p part */ - void generateInfill(SliceLayerPart& part, const Polygons& skin); + void generateInfill(SliceLayerPart& part); /*! * Remove the areas which are 'directly' under air from the \ref SkinPart::inner_infill and diff --git a/src/skin.cpp b/src/skin.cpp index c29fec0b63..227591a8c4 100644 --- a/src/skin.cpp +++ b/src/skin.cpp @@ -146,11 +146,12 @@ void SkinInfillAreaComputation::generateSkinAndInfillAreas(SliceLayerPart& part) Polygons skin = top_skin.unionPolygons(bottom_skin); skin.removeSmallAreas(MIN_AREA_SIZE); - + // Create infill area irrespective if the infill is to be generated or not(would be used for bridging). + part.infill_area = part.inner_area.difference(skin); if (process_infill) { // process infill when infill density > 0 // or when other infill meshes want to modify this infill - generateInfill(part, skin); + generateInfill(part); } for (PolygonsPart& skin_area_part : skin.splitIntoParts()) @@ -306,9 +307,9 @@ void SkinInfillAreaComputation::applySkinExpansion(const Polygons& original_outl * * generateInfill read mesh.layers[n].parts[*].{insets,skin_parts,boundingBox} and write mesh.layers[n].parts[*].infill_area */ -void SkinInfillAreaComputation::generateInfill(SliceLayerPart& part, const Polygons& skin) +void SkinInfillAreaComputation::generateInfill(SliceLayerPart& part) { - part.infill_area = part.inner_area.difference(skin); // Generate infill everywhere where there wasn't any skin. + // Generate infill everywhere where there wasn't any skin. part.infill_area.removeSmallAreas(MIN_AREA_SIZE); } From 46496189d356dad5eff2e96fe76278345f653125 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Fri, 1 Sep 2023 14:26:21 +0000 Subject: [PATCH 284/470] Applied clang-format. --- include/skin.h | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/include/skin.h b/include/skin.h index 65eb1dcaa8..de96d6e1c3 100644 --- a/include/skin.h +++ b/include/skin.h @@ -1,5 +1,5 @@ -//Copyright (c) 2021 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2021 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef SKIN_H #define SKIN_H @@ -7,7 +7,7 @@ #include "settings/types/LayerIndex.h" #include "utils/Coord_t.h" -namespace cura +namespace cura { class Polygons; @@ -21,10 +21,9 @@ class SliceMeshStorage; class SkinInfillAreaComputation { public: - /*! * \brief Initialize the parameters for skin and infill area computation. - * + * * \param layer_nr The index of the layer for which to generate the skins * and infill. * \param mesh The storage where the layer outline information (input) is @@ -41,11 +40,11 @@ class SkinInfillAreaComputation /*! * \brief Combines the infill of multiple layers for a specified mesh. - * + * * The infill layers are combined while the thickness of each layer is * multiplied such that the infill should fill up again to the full height of * all combined layers. - * + * * \param mesh The mesh to combine the infill layers of. */ static void combineInfillLayers(SliceMeshStorage& mesh); @@ -69,10 +68,10 @@ class SkinInfillAreaComputation /*! * Limit the infill areas to places where they support internal overhangs. - * + * * This function uses the part.infill_area and part.infill_area_own * and computes a new part.infill_area_own - * + * * \param mesh The mesh for which to recalculate the infill areas */ static void generateInfillSupport(SliceMeshStorage& mesh); @@ -85,7 +84,7 @@ class SkinInfillAreaComputation /*! * Generate the skin areas (outlines) of one part in a layer - * + * * \param part The part for which to generate skins. */ void generateSkinAndInfillAreas(SliceLayerPart& part); @@ -112,7 +111,7 @@ class SkinInfillAreaComputation * Apply skin expansion: * expand skins into infill area * where the skin is broad enough - * + * * \param original_outline The outline within which skin and infill lie (inner bounds of innermost walls) * \param[in,out] upskin The top skin areas to grow * \param[in,out] downskin The bottom skin areas to grow @@ -128,9 +127,9 @@ class SkinInfillAreaComputation void generateInfill(SliceLayerPart& part); /*! - * Remove the areas which are 'directly' under air from the \ref SkinPart::inner_infill and + * Remove the areas which are 'directly' under air from the \ref SkinPart::inner_infill and * save them in the \ref SkinPart::roofing_fill of the \p part. - * + * * \param[in,out] part Where to get the SkinParts to get the outline info from and to store the roofing areas */ void generateRoofingFillAndSkinFill(SliceLayerPart& part); @@ -194,6 +193,6 @@ class SkinInfillAreaComputation Polygons getOutlineOnLayer(const SliceLayerPart& part_here, const LayerIndex layer2_nr); }; -}//namespace cura +} // namespace cura -#endif//SKIN_H +#endif // SKIN_H From 0651e1cb7a0158dbc7867908c74fe0805ce7f86a Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 5 Sep 2023 14:39:20 +0200 Subject: [PATCH 285/470] Extra skin walls now do not influence bridging CURA-9521 --- include/FffGcodeWriter.h | 2 +- include/infill.h | 6 ++++-- src/FffGcodeWriter.cpp | 9 ++++++--- src/infill.cpp | 10 ++++++---- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 014e29f059..4b236d03b8 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -491,7 +491,7 @@ class FffGcodeWriter : public NoCopy * \param[out] added_something Whether this function added anything to the layer plan * \param fan_speed fan speed override for this skin area */ - void processSkinPrintFeature(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, EFillMethod pattern, const AngleDegrees skin_angle, const coord_t skin_overlap, const Ratio skin_density, const bool monotonic, bool& added_something, double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; + void processSkinPrintFeature(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, EFillMethod pattern, const AngleDegrees skin_angle, const coord_t skin_overlap, const Ratio skin_density, const bool monotonic, bool& added_something, double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, const bool is_bridge_skin = false) const; /*! * see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to diff --git a/include/infill.h b/include/infill.h index 269c695887..ecf22d59fe 100644 --- a/include/infill.h +++ b/include/infill.h @@ -131,7 +131,8 @@ class Infill const SierpinskiFillProvider* cross_fill_provider = nullptr, const LightningLayer* lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr, - const Polygons& prevent_small_exposed_to_air = Polygons()); + const Polygons& prevent_small_exposed_to_air = Polygons(), + const bool is_bridge_skin = false); /*! * Generate the wall toolpaths of an infill area. It will return the inner contour and set the inner-contour. @@ -153,7 +154,8 @@ class Infill const coord_t infill_overlap, const Settings& settings, int layer_idx, - SectionType section_type); + SectionType section_type, + const bool is_bridge_skin = false); private: /*! diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index b165e4e931..60efcd8a48 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2724,7 +2724,8 @@ void FffGcodeWriter::processTopBottom( skin_density, monotonic, added_something, - fan_speed); + fan_speed, + is_bridge_skin); } void FffGcodeWriter::processSkinPrintFeature( @@ -2741,7 +2742,8 @@ void FffGcodeWriter::processSkinPrintFeature( const Ratio skin_density, const bool monotonic, bool& added_something, - double fan_speed) const + double fan_speed, + const bool is_bridge_skin) const { Polygons skin_polygons; Polygons skin_lines; @@ -2801,7 +2803,8 @@ void FffGcodeWriter::processSkinPrintFeature( nullptr, nullptr, nullptr, - small_areas_on_surface ? Polygons() : exposed_to_air); + small_areas_on_surface ? Polygons() : exposed_to_air, + is_bridge_skin); // add paths if (! skin_polygons.empty() || ! skin_lines.empty() || ! skin_paths.empty()) diff --git a/src/infill.cpp b/src/infill.cpp index 2a137f71a9..79d68cb7a5 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -59,13 +59,14 @@ Polygons Infill::generateWallToolPaths( const coord_t infill_overlap, const Settings& settings, int layer_idx, - SectionType section_type) + SectionType section_type, + const bool is_bridge_skin) { outer_contour = outer_contour.offset(infill_overlap); scripta::log("infill_outer_contour", outer_contour, section_type, layer_idx, scripta::CellVDI{ "infill_overlap", infill_overlap }); Polygons inner_contour; - if (wall_line_count > 0) + if ((wall_line_count > 0) && (! is_bridge_skin)) { constexpr coord_t wall_0_inset = 0; // Don't apply any outer wall inset for these. That's just for the outer wall. WallToolPaths wall_toolpaths(outer_contour, line_width, wall_line_count, wall_0_inset, settings, layer_idx, section_type); @@ -89,14 +90,15 @@ void Infill::generate( const SierpinskiFillProvider* cross_fill_provider, const LightningLayer* lightning_trees, const SliceMeshStorage* mesh, - const Polygons& prevent_small_exposed_to_air) + const Polygons& prevent_small_exposed_to_air, + const bool is_bridge_skin) { if (outer_contour.empty()) { return; } - inner_contour = generateWallToolPaths(toolpaths, outer_contour, wall_line_count, infill_line_width, infill_overlap, settings, layer_idx, section_type); + inner_contour = generateWallToolPaths(toolpaths, outer_contour, wall_line_count, infill_line_width, infill_overlap, settings, layer_idx, section_type, is_bridge_skin); scripta::log("infill_inner_contour_0", inner_contour, section_type, layer_idx); // It does not make sense to print a pattern in a small region. So the infill region From f55e8a9f9d399728bc6bf298b6c3550172148cde Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Tue, 5 Sep 2023 12:40:02 +0000 Subject: [PATCH 286/470] Applied clang-format. --- include/FffGcodeWriter.h | 233 +++++++++++++++++++++++++++------------ 1 file changed, 162 insertions(+), 71 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 4b236d03b8..0db186ce36 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -4,17 +4,17 @@ #ifndef GCODE_WRITER_H #define GCODE_WRITER_H -#include -#include - #include "FanSpeedLayerTime.h" -#include "gcodeExport.h" #include "LayerPlanBuffer.h" +#include "gcodeExport.h" #include "settings/PathConfigStorage.h" //For the MeshPathConfigs subclass. #include "utils/ExtrusionLine.h" //Processing variable-width paths. #include "utils/NoCopy.h" -namespace cura +#include +#include + +namespace cura { class AngleDegrees; @@ -28,28 +28,28 @@ class TimeKeeper; /*! * Secondary stage in Fused Filament Fabrication processing: The generated polygons are used in the gcode generation. - * Some polygons in the SliceDataStorage signify areas which are to be filled with parallel lines, + * Some polygons in the SliceDataStorage signify areas which are to be filled with parallel lines, * while other polygons signify the contours which should be printed. - * + * * The main function of this class is FffGcodeWriter::writeGCode(). */ class FffGcodeWriter : public NoCopy { - friend class FffProcessor; //Because FffProcessor exposes finalize (TODO) + friend class FffProcessor; // Because FffProcessor exposes finalize (TODO) private: coord_t max_object_height; //!< The maximal height of all previously sliced meshgroups, used to avoid collision when moving to the next meshgroup to print. /* * Buffer for all layer plans (of type LayerPlan) - * + * * The layer plans are buffered so that we can start heating up a nozzle several layers before it needs to be used. * Another reason is to perform Auto Temperature. */ - LayerPlanBuffer layer_plan_buffer; + LayerPlanBuffer layer_plan_buffer; /*! * The class holding the current state of the gcode being written. - * + * * It holds information such as the last written position etc. */ GCodeExport gcode; @@ -104,18 +104,18 @@ class FffGcodeWriter : public NoCopy /*! * Set the target to write gcode to: an output stream. - * + * * Used when CuraEngine is NOT used as command line tool. - * + * * \param stream The stream to write gcode to. */ void setTargetStream(std::ostream* stream); /*! * Get the total extruded volume for a specific extruder in mm^3 - * + * * Retractions and unretractions don't contribute to this. - * + * * \param extruder_nr The extruder number for which to get the total netto extruded volume * \return total filament printed in mm^3 */ @@ -123,7 +123,7 @@ class FffGcodeWriter : public NoCopy /*! * Get the total estimated print time in seconds for each feature - * + * * \return total print time in seconds for each feature */ std::vector getTotalPrintTimePerFeature(); @@ -131,7 +131,7 @@ class FffGcodeWriter : public NoCopy /*! * Write all the gcode for the current meshgroup. * This is the primary function of this class. - * + * * \param[in] storage The data storage from which to get the polygons to print and the areas to fill. * \param timeKeeper The stop watch to see how long it takes for each of the stages in the slicing process. */ @@ -146,28 +146,28 @@ class FffGcodeWriter : public NoCopy /*! * Set the retraction and wipe config globally, per extruder and per mesh. - * + * * \param[out] storage The data storage to which to save the configurations */ void setConfigRetractionAndWipe(SliceDataStorage& storage); /*! * Get the extruder with which to start the print. - * + * * Generally this is the extruder of the adhesion type in use, but in case * the platform adhesion type is none, the support extruder is used. If * support is also disabled, the extruder with lowest number which is used * on the first layer is used as initial extruder. - * + * * \param[in] storage where to get settings from. */ size_t getStartExtruder(const SliceDataStorage& storage); /*! * Set the infill angles and skin angles in the SliceDataStorage. - * + * * These lists of angles are cycled through to get the infill angle of a specific layer. - * + * * \param mesh The mesh for which to determine the infill and skin angles. */ void setInfillAndSkinAngles(SliceMeshStorage& mesh); @@ -186,24 +186,24 @@ class FffGcodeWriter : public NoCopy /*! * Move up and over the already printed meshgroups to print the next meshgroup. - * + * * \param[in] storage where the slice data is stored. */ void processNextMeshGroupCode(const SliceDataStorage& storage); - + /*! * Add raft layer plans onto the FffGcodeWriter::layer_plan_buffer - * + * * \param[in,out] storage where the slice data is stored. */ void processRaft(const SliceDataStorage& storage); /*! * Convert the polygon data of a layer into a layer plan on the FffGcodeWriter::layer_plan_buffer - * + * * In case of negative layer numbers, create layers only containing the data from * the helper parts (support etc) to fill up the gap between the raft and the model. - * + * * \param[in] storage where the slice data is stored. * \param layer_nr The index of the layer to write the gcode of. * \param total_layers The total number of layers. @@ -217,17 +217,17 @@ class FffGcodeWriter : public NoCopy * * Technically, this function checks whether any extruder needs to be primed (with a prime blob) * separately just before they are used. - * + * * \return whether any extruder need to be primed separately just before they are used */ bool getExtruderNeedPrimeBlobDuringFirstLayer(const SliceDataStorage& storage, const size_t extruder_nr) const; /*! * Add the skirt or the brim to the layer plan \p gcodeLayer if it hasn't already been added yet. - * + * * This function should be called for only one layer; * calling it for multiple layers results in the skirt/brim being printed on multiple layers. - * + * * \param storage where the slice data is stored. * \param gcodeLayer The initial planning of the g-code of the layer. * \param extruder_nr The extruder train for which to process the skirt or @@ -238,15 +238,15 @@ class FffGcodeWriter : public NoCopy /*! * Adds the ooze shield to the layer plan \p gcodeLayer. - * + * * \param[in] storage where the slice data is stored. * \param gcodeLayer The initial planning of the gcode of the layer. */ void processOozeShield(const SliceDataStorage& storage, LayerPlan& gcodeLayer) const; - + /*! * Adds the draft protection screen to the layer plan \p gcodeLayer. - * + * * \param[in] storage where the slice data is stored. * \param gcodeLayer The initial planning of the gcode of the layer. */ @@ -256,14 +256,14 @@ class FffGcodeWriter : public NoCopy * Calculate in which order to plan the extruders for each layer * Store the order of extruders for each layer in extruder_order_per_layer for normal layers * and the order of extruders for raft/filler layers in extruder_order_per_layer_negative_layers. - * + * * Only extruders which are (most probably) going to be used are planned - * + * * \note At the planning stage we only have information on areas, not how those are filled. * If an area is too small to be filled with anything it will still get specified as being used with the extruder for that area. - * + * * Computes \ref FffGcodeWriter::extruder_order_per_layer and \ref FffGcodeWriter::extruder_order_per_layer_negative_layers - * + * * \param[in] storage where the slice data is stored. */ void calculateExtruderOrderPerLayer(const SliceDataStorage& storage); @@ -280,10 +280,10 @@ class FffGcodeWriter : public NoCopy /*! * Gets a list of extruders that are used on the given layer, but excluding the given starting extruder. * When it's on the first layer, the prime blob will also be taken into account. - * + * * \note At the planning stage we only have information on areas, not how those are filled. * If an area is too small to be filled with anything it will still get specified as being used with the extruder for that area. - * + * * \param[in] storage where the slice data is stored. * \param current_extruder The current extruder with which we last printed * \return The order of extruders for a layer beginning with \p current_extruder @@ -294,7 +294,7 @@ class FffGcodeWriter : public NoCopy * Calculate in which order to plan the meshes of a specific extruder * Each mesh which has some feature printed with the extruder is included in this order. * One mesh can occur in the mesh order of multiple extruders. - * + * * \param[in] storage where the slice data is stored. * \param extruder_nr The extruder for which to determine the order * \return A vector of mesh indices ordered on print order for that extruder. @@ -303,41 +303,50 @@ class FffGcodeWriter : public NoCopy /*! * Add a single layer from a single mesh-volume to the layer plan \p gcodeLayer in mesh surface mode. - * + * * \param[in] storage where the slice data is stored. * \param mesh The mesh to add to the layer plan \p gcodeLayer. * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcodeLayer) const; - + void addMeshLayerToGCode_meshSurfaceMode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const PathConfigStorage::MeshPathConfigs& mesh_config, + LayerPlan& gcodeLayer) const; + /*! * Add the open polylines from a single layer from a single mesh-volume to the layer plan \p gcodeLayer for mesh the surface modes. - * + * * \param[in] storage where the slice data is stored. * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ void addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; - + /*! * Add all features of a given extruder from a single layer from a single mesh-volume to the layer plan \p gcode_layer. - * + * * This adds all features (e.g. walls, skin etc.) of this \p mesh to the gcode which are printed using \p extruder_nr - * + * * \param[in] storage where the slice data is stored. * \param mesh The mesh to add to the layer plan \p gcode_layer. * \param extruder_nr The extruder for which to print all features of the mesh which should be printed with this extruder * \param mesh_config the line config with which to print a print feature * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; + void addMeshLayerToGCode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + LayerPlan& gcode_layer) const; /*! * Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer. * This only adds the features which are printed with \p extruder_nr. - * + * * \param[in] storage where the slice data is stored. * \param storage Storage to get global settings from. * \param mesh The mesh to add to the layer plan \p gcode_layer. @@ -346,7 +355,13 @@ class FffGcodeWriter : public NoCopy * \param part The part to add * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshPartToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part, LayerPlan& gcode_layer) const; + void addMeshPartToGCode( + const SliceDataStorage& storage, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part, + LayerPlan& gcode_layer) const; /*! * \brief Add infill for a given part in a layer plan. @@ -359,12 +374,18 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processInfill( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * \brief Add thicker (multiple layers) sparse infill for a given part in a * layer plan. - * + * * \param gcodeLayer The initial planning of the gcode of the layer. * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. * \param extruder_nr The extruder for which to print all features of the @@ -373,7 +394,13 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processMultiLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processMultiLayerInfill( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * \brief Add normal sparse infill for a given part in a layer. @@ -385,7 +412,13 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode. * \return Whether this function added anything to the layer plan. */ - bool processSingleLayerInfill(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processSingleLayerInfill( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * Generate the insets for the walls of a given layer part. @@ -397,7 +430,13 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processInsets(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processInsets( + const SliceDataStorage& storage, + LayerPlan& gcodeLayer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * Generate the a spiralized wall for a given layer part. @@ -407,7 +446,12 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. */ - void processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) const; + void processSpiralizedWall( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part, + const SliceMeshStorage& mesh) const; /*! * Add the gcode of the top/bottom skin of the given part and of the perimeter gaps. @@ -420,21 +464,27 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processSkin(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SliceLayerPart& part) const; + bool processSkin( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SliceLayerPart& part) const; /*! * Add the gcode of the top/bottom skin of the given skin part and of the perimeter gaps. - * + * * Perimeter gaps are handled for the current extruder for the following features if they are printed with this extruder. * - skin outlines * - roofing (if concentric) * - top/bottom (if concentric) * They are all printed at the end of printing the skin part features which are printed with this extruder. - * + * * Note that the normal perimeter gaps are printed with the outer wall extruder, * while newly generated perimeter gaps * are printed with the extruder with which the feature was printed which generated the gaps. - * + * * \param[in] storage where the slice data is stored. * \param gcode_layer The initial planning of the gcode of the layer. * \param mesh The mesh for which to add to the layer plan \p gcode_layer. @@ -443,7 +493,13 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \return Whether this function added anything to the layer plan */ - bool processSkinPart(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part) const; + bool processSkinPart( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SkinPart& skin_part) const; /*! * Add the roofing which is the area inside the innermost skin inset which has air 'directly' above @@ -456,7 +512,14 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \param[out] added_something Whether this function added anything to the layer plan */ - void processRoofing(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; + void processRoofing( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SkinPart& skin_part, + bool& added_something) const; /*! * Add the normal skinfill which is the area inside the innermost skin inset @@ -470,11 +533,18 @@ class FffGcodeWriter : public NoCopy * \param skin_part The skin part for which to create gcode * \param[out] added_something Whether this function added anything to the layer plan */ - void processTopBottom(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const size_t extruder_nr, const PathConfigStorage::MeshPathConfigs& mesh_config, const SkinPart& skin_part, bool& added_something) const; + void processTopBottom( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const size_t extruder_nr, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const SkinPart& skin_part, + bool& added_something) const; /*! * Process a dense skin feature like roofing or top/bottom - * + * * \param[in] storage where the slice data is stored. * \param gcode_layer The initial planning of the gcode of the layer. * \param mesh The mesh for which to add to the layer plan \p gcode_layer. @@ -491,7 +561,22 @@ class FffGcodeWriter : public NoCopy * \param[out] added_something Whether this function added anything to the layer plan * \param fan_speed fan speed override for this skin area */ - void processSkinPrintFeature(const SliceDataStorage& storage, LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const PathConfigStorage::MeshPathConfigs& mesh_config, const size_t extruder_nr, const Polygons& area, const GCodePathConfig& config, EFillMethod pattern, const AngleDegrees skin_angle, const coord_t skin_overlap, const Ratio skin_density, const bool monotonic, bool& added_something, double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, const bool is_bridge_skin = false) const; + void processSkinPrintFeature( + const SliceDataStorage& storage, + LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const PathConfigStorage::MeshPathConfigs& mesh_config, + const size_t extruder_nr, + const Polygons& area, + const GCodePathConfig& config, + EFillMethod pattern, + const AngleDegrees skin_angle, + const coord_t skin_overlap, + const Ratio skin_density, + const bool monotonic, + bool& added_something, + double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, + const bool is_bridge_skin = false) const; /*! * see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to @@ -510,7 +595,7 @@ class FffGcodeWriter : public NoCopy * +------+ +------+ * 1, 2 = start locations of skin segments * # = seam - * + * * \param filling_part The part which we are going to fill with a linear filling type * \param filling_angle The angle of the filling lines * \param last_position The position the print head is in before going to fill the part @@ -573,9 +658,9 @@ class FffGcodeWriter : public NoCopy /*! * Change to a new extruder, and add the prime tower instructions if the new extruder is different from the last. - * + * * On layer 0 this function adds the skirt for the nozzle it switches to, instead of the prime tower. - * + * * \param[in] storage where the slice data is stored. * \param gcode_layer The initial planning of the gcode of the layer. * \param extruder_nr The extruder to switch to. @@ -589,7 +674,7 @@ class FffGcodeWriter : public NoCopy * \param prev_extruder The current extruder with which we last printed. */ void addPrimeTower(const SliceDataStorage& storage, LayerPlan& gcodeLayer, const size_t prev_extruder) const; - + /*! * Add the end gcode and set all temperatures to zero. */ @@ -628,9 +713,15 @@ class FffGcodeWriter : public NoCopy * \param infill_line_width line width of the infill * \return true if there needs to be a skin edge support wall in this layer, otherwise false */ - static bool partitionInfillBySkinAbove(Polygons& infill_below_skin, Polygons& infill_not_below_skin, const LayerPlan& gcode_layer, const SliceMeshStorage& mesh, const SliceLayerPart& part, coord_t infill_line_width) ; + static bool partitionInfillBySkinAbove( + Polygons& infill_below_skin, + Polygons& infill_not_below_skin, + const LayerPlan& gcode_layer, + const SliceMeshStorage& mesh, + const SliceLayerPart& part, + coord_t infill_line_width); }; -}//namespace cura +} // namespace cura #endif // GCODE_WRITER_H From 65df641e3d96a911362f51afcb2244e7fc4e8c7a Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 5 Sep 2023 14:42:44 +0200 Subject: [PATCH 287/470] comment for param addition CURA-9521 --- include/infill.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/infill.h b/include/infill.h index ecf22d59fe..b048670db0 100644 --- a/include/infill.h +++ b/include/infill.h @@ -144,6 +144,7 @@ class Infill * \param line_width [in] The optimum wall line width of the walls * \param infill_overlap [in] The overlap of the infill * \param settings [in] A settings storage to use for generating variable-width walls. + * \param is_bridge_skin [in] Setting to filter out the extra skin walls while bridging * \return The inner contour of the wall toolpaths */ static Polygons generateWallToolPaths( From ce2394894e339f06d2aeb93555183bd48c3a34fc Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 5 Sep 2023 14:55:40 +0200 Subject: [PATCH 288/470] Bend- and end-points should not be beyond the original infill lines. part of CURA-10410 --- src/infill.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/infill.cpp b/src/infill.cpp index 2a137f71a9..e14ed2130f 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -812,12 +812,12 @@ void Infill::resolveIntersection(const coord_t at_distance, const Point& interse bool is_resolved = true; // Use both of the resulting lines to place the 'bends' by intersecting with the original line-segments. - is_resolved &= LinearAlg2D::lineLineIntersection(q, r, a->start, a->end, bend_a.value()); - is_resolved &= LinearAlg2D::lineLineIntersection(s, t, b->start, b->end, bend_b.value()); + is_resolved &= LinearAlg2D::lineLineIntersection(q, r, a->start, a->end, bend_a.value()) && LinearAlg2D::pointIsProjectedBeyondLine(bend_a.value(), a->start, a->end) == 0; + is_resolved &= LinearAlg2D::lineLineIntersection(s, t, b->start, b->end, bend_b.value()) && LinearAlg2D::pointIsProjectedBeyondLine(bend_b.value(), b->start, b->end) == 0; - // Also set the new end-points. - is_resolved &= LinearAlg2D::lineLineIntersection(connect_start, connect_end, q, r, end_a); - is_resolved &= LinearAlg2D::lineLineIntersection(connect_start, connect_end, s, t, end_b); + // Also set the new end-points + is_resolved &= LinearAlg2D::lineLineIntersection(connect_start, connect_end, q, r, end_a) && LinearAlg2D::pointIsProjectedBeyondLine(end_a, connect_start, connect_end) == 0; + is_resolved &= LinearAlg2D::lineLineIntersection(connect_start, connect_end, s, t, end_b) && LinearAlg2D::pointIsProjectedBeyondLine(end_b, connect_start, connect_end) == 0; if (is_resolved) { From 9ca2d9790a26c9a3cacca1268e6cf6db2019a1ae Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 5 Sep 2023 15:37:22 +0200 Subject: [PATCH 289/470] Reordering headers elsewhere exposed missed header here. --- include/LayerPlanBuffer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index 4e05ffcade..da86303817 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -4,11 +4,12 @@ #ifndef LAYER_PLAN_BUFFER_H #define LAYER_PLAN_BUFFER_H -#include - +#include "gcodeExport.h" #include "Preheat.h" #include "settings/types/Duration.h" +#include + namespace cura { From d9b92f2bb41ab3261050059508708b9b00d5e72b Mon Sep 17 00:00:00 2001 From: rburema Date: Tue, 5 Sep 2023 13:38:06 +0000 Subject: [PATCH 290/470] Applied clang-format. --- include/LayerPlanBuffer.h | 72 +++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index da86303817..7a61e414db 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -1,16 +1,16 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2018 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef LAYER_PLAN_BUFFER_H #define LAYER_PLAN_BUFFER_H -#include "gcodeExport.h" #include "Preheat.h" +#include "gcodeExport.h" #include "settings/types/Duration.h" #include -namespace cura +namespace cura { class ExtruderPlan; @@ -18,16 +18,16 @@ class LayerPlan; /*! * Class for buffering multiple layer plans (\ref LayerPlan) / extruder plans within those layer plans, so that temperature commands can be inserted in earlier layer plans. - * + * * This class handles where to insert temperature commands for: * - initial layer temperature * - flow dependent temperature * - starting to heat up from the standby temperature * - initial printing temperature | printing temperature | final printing temperature - * + * * \image html assets/precool.png "Temperature Regulation" width=10cm * \image latex assets/precool.png "Temperature Regulation" width=10cm - * + * */ class LayerPlanBuffer { @@ -35,25 +35,30 @@ class LayerPlanBuffer Preheat preheat_config; //!< the nozzle and material temperature settings for each extruder train. - static constexpr size_t buffer_size = 5; // should be as low as possible while still allowing enough time in the buffer to heat up from standby temp to printing temp // TODO: hardcoded value + static constexpr size_t buffer_size + = 5; // should be as low as possible while still allowing enough time in the buffer to heat up from standby temp to printing temp // TODO: hardcoded value // this value should be higher than 1, cause otherwise each layer is viewed as the first layer and no temp commands are inserted. - static constexpr Duration extra_preheat_time = 1.0_s; //!< Time to start heating earlier than computed to avoid accummulative discrepancy between actual heating times and computed ones. + static constexpr Duration extra_preheat_time + = 1.0_s; //!< Time to start heating earlier than computed to avoid accummulative discrepancy between actual heating times and computed ones. - std::vector extruder_used_in_meshgroup; //!< For each extruder whether it has already been planned once in this meshgroup. This is used to see whether we should heat to the initial_print_temp or to the extrusion_temperature + std::vector extruder_used_in_meshgroup; //!< For each extruder whether it has already been planned once in this meshgroup. This is used to see whether we should heat to + //!< the initial_print_temp or to the extrusion_temperature /*! * The buffer containing several layer plans (LayerPlan) before writing them to gcode. - * + * * The front is the lowest/oldest layer. * The back is the highest/newest layer. */ std::list buffer; + public: LayerPlanBuffer(GCodeExport& gcode) - : gcode(gcode) - , extruder_used_in_meshgroup(MAX_EXTRUDERS, false) - { } + : gcode(gcode) + , extruder_used_in_meshgroup(MAX_EXTRUDERS, false) + { + } void setPreheatConfig(); @@ -65,7 +70,7 @@ class LayerPlanBuffer /*! * Push a new layer onto the buffer and handle the buffer. * Write a layer to gcode if it is popped out of the buffer. - * + * * \param layer_plan The layer to handle * \param gcode The exporter with which to write a layer to gcode if the buffer is too large after pushing the new layer. */ @@ -82,7 +87,7 @@ class LayerPlanBuffer * This inserts the temperature commands to start warming for a given layer in earlier layers; * the fan speeds and layer time settings of the most recently pushed layer are processed; * the correctly combing travel move between the last added layer and the layer before is added. - * + * * Pop out the earliest layer in the buffer if the buffer size is exceeded * \return A nullptr or the popped gcode_layer */ @@ -90,7 +95,7 @@ class LayerPlanBuffer /*! * Add the travel move to properly travel from the end location of the previous layer to the starting location of the next - * + * * \param prev_layer The layer before the just added layer, to which to add the combing travel move. * \param newest_layer The newly added layer, with a non-combing travel move as first path. */ @@ -103,7 +108,7 @@ class LayerPlanBuffer /*! * Insert a preheat command for @p extruder into @p extruder_plan_before - * + * * \param extruder_plan_before An extruder plan before the extruder plan for which the temperature is computed, in which to insert the preheat command * \param time_before_extruder_plan_end The time before the end of the extruder plan, before which to insert the preheat command * \param extruder_nr The extruder for which to set the temperature @@ -114,9 +119,9 @@ class LayerPlanBuffer /*! * Compute the time needed to preheat from standby to required (initial) printing temperature at the start of an extruder plan, * based on the time the extruder has been on standby. - * + * * Also computes the temperature to which we cool before starting to heat agian. - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans for which to find the preheat time needed * \return the time needed to preheat and the temperature from which heating starts @@ -124,11 +129,11 @@ class LayerPlanBuffer Preheat::WarmUpResult computeStandbyTempPlan(std::vector& extruder_plans, unsigned int extruder_plan_idx); /*! - * For two consecutive extruder plans of the same extruder (so on different layers), + * For two consecutive extruder plans of the same extruder (so on different layers), * preheat the extruder to the temperature corresponding to the average flow of the second extruder plan. - * + * * The preheat commands are inserted such that the middle of the temperature change coincides with the start of the next layer. - * + * * \param prev_extruder_plan The former extruder plan (of the former layer) * \param extruder_nr The extruder for which too set the temperature * \param required_temp The required temperature for the second extruder plan @@ -140,7 +145,7 @@ class LayerPlanBuffer * Find the time window in which this extruder hasn't been used * and compute at what time the preheat command needs to be inserted. * Then insert the preheat command in the right extruder plan. - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans for which to find the preheat time needed */ @@ -149,15 +154,15 @@ class LayerPlanBuffer /*! * Insert temperature commands related to the extruder plan corersponding to @p extruder_plan_idx * and the extruder plan before: - * + * * In case the extruder plan before has the same extruder: * - gradually change printing temperature around the layer change (\ref LayerPlanBuffer::insertPreheatCommand_singleExtrusion) - * + * * In case the previous extruder plan is a different extruder * - insert preheat command from standby to initial temp in the extruder plan(s) before (\ref LayerPlanBuffer::insertPreheatCommand_multiExtrusion) * - insert the final print temp command of the previous extruder plan (\ref LayerPlanBuffer::insertFinalPrintTempCommand) * - insert the normal extrusion temp command for the current extruder plan (\ref LayerPlanBuffer::insertPrintTempCommand) - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans for which to generate the preheat command */ @@ -165,20 +170,20 @@ class LayerPlanBuffer /*! * Insert the temperature command to heat from the initial print temperature to the printing temperature - * + * * The temperature command is insert at the start of the very first extrusion move - * + * * \param extruder_plan The extruder plan in which to insert the heat up command */ void insertPrintTempCommand(ExtruderPlan& extruder_plan); /*! * Insert the temp command to start cooling from the printing temperature to the final print temp - * + * * The print temp is inserted before the last extrusion move of the extruder plan corresponding to \p last_extruder_plan_idx - * + * * The command is inserted at a timed offset before the end of the last extrusion move - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param last_extruder_plan_idx The index of the last extruder plan in \p extruder_plans with the same extruder as previous extruder plans */ @@ -193,7 +198,7 @@ class LayerPlanBuffer * Reconfigure the standby temperature during which we didn't print with this extruder. * Find the previous extruder plan with the same extruder as layers[layer_plan_idx].extruder_plans[extruder_plan_idx] * Set the prev_extruder_standby_temp in the next extruder plan - * + * * \param extruder_plans The extruder plans in the buffer, moved to a temporary vector (from lower to upper layers) * \param extruder_plan_idx The index of the extruder plan in \p extruder_plans before which to reconfigure the standby temperature * \param standby_temp The temperature to which to cool down when the extruder is in standby mode. @@ -202,7 +207,6 @@ class LayerPlanBuffer }; - } // namespace cura #endif // LAYER_PLAN_BUFFER_H \ No newline at end of file From 1ff2e4905c0cccd8227dd7678769ba4b941bf715 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 8 Sep 2023 12:08:16 +0200 Subject: [PATCH 291/470] Fix strange variations in width when bridging. part of CURA-10933 Co-authored-by: Saumya Jain --- src/LayerPlan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 3ec1ae09c5..679af6a215 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -718,7 +718,7 @@ void LayerPlan::addWallLine( // flow required for the next line segment - when accelerating after a bridge segment, the flow is increased in inverse proportion to the speed_factor // so the slower the feedrate, the greater the flow - the idea is to get the extruder back to normal pressure as quickly as possible - const float segment_flow = (speed_factor < 1) ? flow * (1 / speed_factor) : flow; + const float segment_flow = (speed_factor > 1) ? flow * (1 / speed_factor) : flow; // if a bridge is present in this wall, this particular segment may need to be partially or wholely coasted if (distance_to_bridge_start > 0) From 1b325a31d1e00e8864029836c57ef89df01acaa4 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 07:33:43 +0200 Subject: [PATCH 292/470] Pin Arcus version to arcus release (5.3.0) CURA-10475 --- conanfile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index 0176fd6091..7d4d5dc601 100644 --- a/conanfile.py +++ b/conanfile.py @@ -80,10 +80,9 @@ def build_requirements(self): if self.options.enable_benchmarks: self.test_requires("benchmark/1.7.0") - def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/cura_10475") + self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") @@ -100,12 +99,10 @@ def requirements(self): self.requires("zlib/1.2.12") self.requires("openssl/1.1.1l") - def generate(self): deps = CMakeDeps(self) deps.generate() - tc = CMakeToolchain(self) tc.variables["CURA_ENGINE_VERSION"] = self.version tc.variables["ENABLE_ARCUS"] = self.options.enable_arcus From a4cf30758a28b51cdcbdc98bc1af611c661a843d Mon Sep 17 00:00:00 2001 From: jellespijker Date: Mon, 11 Sep 2023 06:41:30 +0000 Subject: [PATCH 293/470] Applied clang-format. --- include/FffGcodeWriter.h | 23 ++++++----------------- include/LayerPlanBuffer.h | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index b7381f6bb5..2d2e7c7162 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -310,11 +310,7 @@ class FffGcodeWriter : public NoCopy * \param mesh_config the line config with which to print a print feature * \param gcodeLayer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode_meshSurfaceMode( - const SliceDataStorage& storage, - const SliceMeshStorage& mesh, - const MeshPathConfigs& mesh_config, - LayerPlan& gcodeLayer) const; + void addMeshLayerToGCode_meshSurfaceMode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const MeshPathConfigs& mesh_config, LayerPlan& gcodeLayer) const; /*! * Add the open polylines from a single layer from a single mesh-volume to the layer plan \p gcodeLayer for mesh the surface modes. @@ -337,12 +333,8 @@ class FffGcodeWriter : public NoCopy * \param mesh_config the line config with which to print a print feature * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode( - const SliceDataStorage& storage, - const SliceMeshStorage& mesh, - const size_t extruder_nr, - const MeshPathConfigs& mesh_config, - LayerPlan& gcode_layer) const; + void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) + const; /*! * Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer. @@ -447,12 +439,9 @@ class FffGcodeWriter : public NoCopy * \param part The part for which to create gcode * \param mesh The mesh for which to add to the layer plan \p gcodeLayer. */ - void processSpiralizedWall( - const SliceDataStorage& storage, - LayerPlan& gcode_layer, - const MeshPathConfigs& mesh_config, - const SliceLayerPart& part, - const SliceMeshStorage& mesh) const; + void + processSpiralizedWall(const SliceDataStorage& storage, LayerPlan& gcode_layer, const MeshPathConfigs& mesh_config, const SliceLayerPart& part, const SliceMeshStorage& mesh) + const; /*! * Add the gcode of the top/bottom skin of the given part and of the perimeter gaps. diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index 220afc1680..8898137b87 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -7,8 +7,8 @@ #include "ExtruderPlan.h" #include "LayerPlan.h" #include "Preheat.h" -#include "settings/Settings.h" #include "gcodeExport.h" +#include "settings/Settings.h" #include "settings/types/Duration.h" #include From f278ed959b8fbdc3d82138791986bd29092cbfed Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 09:15:06 +0200 Subject: [PATCH 294/470] fix benchmarks Contributes to CURA-10475 and CURA-10951 --- benchmark/wall_benchmark.h | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmark/wall_benchmark.h b/benchmark/wall_benchmark.h index 2af20fc862..314377c911 100644 --- a/benchmark/wall_benchmark.h +++ b/benchmark/wall_benchmark.h @@ -58,6 +58,7 @@ class WallTestFixture : public benchmark::Fixture settings.add("meshfix_maximum_deviation", "0.1"); settings.add("meshfix_maximum_extrusion_area_deviation", "0.01"); settings.add("meshfix_maximum_resolution", "0.01"); + settings.add("meshfix_fluid_motion_enabled", "false"); settings.add("min_wall_line_width", "0.3"); settings.add("min_bead_width", "0"); settings.add("min_feature_size", "0"); From 115f2865c8c19c80f7b1cc1ab7145ddd1394d37e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 11 Sep 2023 12:28:38 +0200 Subject: [PATCH 295/470] Don't build legacy linux Dropping support for this with GCC-13 Contributes to CURA-10475 and CURA-10951 --- .github/workflows/conan-package.yml | 278 +++++++++++++--------------- 1 file changed, 132 insertions(+), 146 deletions(-) diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index 922a549aff..749c67ac9d 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -7,151 +7,137 @@ name: conan-package # It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches on: - workflow_dispatch: - inputs: - # FIXME: Not yet implemented - conan_id: - required: false - type: string - description: 'The full conan package ID, e.g. "curaengine/1.2.3@ultimaker/stable"' - create_latest_alias: - required: true - default: false - type: boolean - description: 'Create latest alias' - create_binaries_windows: - required: true - default: false - type: boolean - description: 'create binaries Windows' - create_binaries_linux: - required: true - default: false - type: boolean - description: 'create binaries Linux' - create_binaries_macos: - required: true - default: false - type: boolean - description: 'create binaries Macos' - - push: - paths: - - 'include/**' - - 'src/**' - - 'cmake/**' - - 'tests/**' - - 'test_package/**' - - 'conanfile.py' - - 'conandata.yml' - - 'CMakeLists.txt' - - '.github/workflows/conan-package.yml' - - '.github/worflows/requirements-conan-package.txt' - branches: - - main - - 'CURA-*' - - '[1-9].[0-9]*' - - '[1-9].[0-9][0-9]*' - tags: - - '[1-9]+.[0-9]+.[0-9]*' - - '[1-9]+.[0-9]+.[0-9]' + workflow_dispatch: + inputs: + # FIXME: Not yet implemented + conan_id: + required: false + type: string + description: 'The full conan package ID, e.g. "curaengine/1.2.3@ultimaker/stable"' + create_latest_alias: + required: true + default: false + type: boolean + description: 'Create latest alias' + create_binaries_windows: + required: true + default: false + type: boolean + description: 'create binaries Windows' + create_binaries_linux: + required: true + default: false + type: boolean + description: 'create binaries Linux' + create_binaries_macos: + required: true + default: false + type: boolean + description: 'create binaries Macos' + + push: + paths: + - 'include/**' + - 'src/**' + - 'cmake/**' + - 'tests/**' + - 'test_package/**' + - 'conanfile.py' + - 'conandata.yml' + - 'CMakeLists.txt' + - '.github/workflows/conan-package.yml' + - '.github/worflows/requirements-conan-package.txt' + branches: + - main + - 'CURA-*' + - '[1-9].[0-9]*' + - '[1-9].[0-9][0-9]*' + tags: + - '[1-9]+.[0-9]+.[0-9]*' + - '[1-9]+.[0-9]+.[0-9]' jobs: - conan-recipe-version: - uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main - with: - project_name: curaengine - - conan-package-export: - needs: [ conan-recipe-version ] - uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main - with: - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} - runs_on: 'ubuntu-22.04' - python_version: '3.11.x' - conan_logging_level: 'info' - secrets: inherit - - conan-package-create-macos: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_macos) }} - needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main - with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 3 - runs_on: 'macos-11' - python_version: '3.11.x' - conan_logging_level: 'info' - secrets: inherit - - conan-package-create-windows: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true' )) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_windows) }} - needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main - with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 4 - runs_on: 'windows-2022' - python_version: '3.11.x' - conan_config_branch: '' - conan_logging_level: 'info' - secrets: inherit - - conan-package-create-linux: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux) }} - needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main - with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 1 - runs_on: 'ubuntu-20.04' - python_version: '3.11.x' - conan_logging_level: 'info' - secrets: inherit - - conan-package-create-linux-modern: - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux) }} - needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main - with: - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - build_id: 2 - runs_on: 'ubuntu-22.04' - python_version: '3.11.x' - conan_logging_level: 'info' - secrets: inherit - - notify-export: - if: ${{ always() }} - needs: [ conan-recipe-version, conan-package-export ] - - uses: ultimaker/cura/.github/workflows/notify.yml@main - with: - success: ${{ contains(join(needs.*.result, ','), 'success') }} - success_title: "New Conan recipe exported in ${{ github.repository }}" - success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - failure_title: "Failed to export Conan Export in ${{ github.repository }}" - failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - secrets: inherit - - notify-create: - if: ${{ always() && ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux)) }} - needs: [ conan-recipe-version, conan-package-create-macos, conan-package-create-windows, conan-package-create-linux, conan-package-create-linux-modern ] - - uses: ultimaker/cura/.github/workflows/notify.yml@main - with: - success: ${{ contains(join(needs.*.result, ','), 'success') }} - success_title: "New binaries created in ${{ github.repository }}" - success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - failure_title: "Failed to create binaries in ${{ github.repository }}" - failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" - secrets: inherit + conan-recipe-version: + uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main + with: + project_name: curaengine + + conan-package-export: + needs: [ conan-recipe-version ] + uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main + with: + recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} + recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} + runs_on: 'ubuntu-22.04' + python_version: '3.11.x' + conan_logging_level: 'info' + secrets: inherit + + conan-package-create-macos: + if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_macos) }} + needs: [ conan-recipe-version, conan-package-export ] + + uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main + with: + project_name: ${{ needs.conan-recipe-version.outputs.project_name }} + recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} + build_id: 3 + runs_on: 'macos-11' + python_version: '3.11.x' + conan_logging_level: 'info' + secrets: inherit + + conan-package-create-windows: + if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true' )) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_windows) }} + needs: [ conan-recipe-version, conan-package-export ] + + uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main + with: + project_name: ${{ needs.conan-recipe-version.outputs.project_name }} + recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} + build_id: 4 + runs_on: 'windows-2022' + python_version: '3.11.x' + conan_config_branch: '' + conan_logging_level: 'info' + secrets: inherit + + conan-package-create-linux: + if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux) }} + needs: [ conan-recipe-version, conan-package-export ] + + uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main + with: + project_name: ${{ needs.conan-recipe-version.outputs.project_name }} + recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} + build_id: 2 + runs_on: 'ubuntu-22.04' + python_version: '3.11.x' + conan_logging_level: 'info' + secrets: inherit + + notify-export: + if: ${{ always() }} + needs: [ conan-recipe-version, conan-package-export ] + + uses: ultimaker/cura/.github/workflows/notify.yml@main + with: + success: ${{ contains(join(needs.*.result, ','), 'success') }} + success_title: "New Conan recipe exported in ${{ github.repository }}" + success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" + failure_title: "Failed to export Conan Export in ${{ github.repository }}" + failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" + secrets: inherit + + notify-create: + if: ${{ always() && ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux)) }} + needs: [ conan-recipe-version, conan-package-create-macos, conan-package-create-windows, conan-package-create-linux ] + + uses: ultimaker/cura/.github/workflows/notify.yml@main + with: + success: ${{ contains(join(needs.*.result, ','), 'success') }} + success_title: "New binaries created in ${{ github.repository }}" + success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" + failure_title: "Failed to create binaries in ${{ github.repository }}" + failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" + secrets: inherit From aa60cddca7d935e589158af7bcad18569bf609bd Mon Sep 17 00:00:00 2001 From: rburema Date: Tue, 12 Sep 2023 13:49:44 +0000 Subject: [PATCH 296/470] Applied clang-format. --- include/gcodeExport.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gcodeExport.h b/include/gcodeExport.h index 25c20efa80..c332ef0f52 100644 --- a/include/gcodeExport.h +++ b/include/gcodeExport.h @@ -90,8 +90,8 @@ class GCodeExport : public NoCopy double last_e_value_after_wipe; //!< The current material amount extruded since last wipe unsigned fan_number; // nozzle print cooling fan number - Point nozzle_offset; //!< Cache of setting machine_nozzle_offset_[xy] - bool machine_firmware_retract; //!< Cache of setting machine_firmware_retract + Point nozzle_offset; //!< Cache of setting machine_nozzle_offset_[xy] + bool machine_firmware_retract; //!< Cache of setting machine_firmware_retract std::deque extruded_volume_at_previous_n_retractions; // in mm^3 From 4aa73919b616223d9bb9c00b6ecd4c02951ef5b6 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 14 Sep 2023 21:01:40 +0200 Subject: [PATCH 297/470] Pass shared pointers, per preference, by reference. Otherwise they're passed by value. Not as bad as passing the entire _original_ object of course, but a ref is still a little lighter weight than a shared pointer object. done as part of, but not nescesary for, CURA-11019 --- include/SkeletalTrapezoidationEdge.h | 6 +++--- include/SkeletalTrapezoidationJoint.h | 2 +- include/infill.h | 10 +++++----- src/communication/ArcusCommunication.cpp | 2 +- src/infill.cpp | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/SkeletalTrapezoidationEdge.h b/include/SkeletalTrapezoidationEdge.h index aa897d830f..4c0bfb365c 100644 --- a/include/SkeletalTrapezoidationEdge.h +++ b/include/SkeletalTrapezoidationEdge.h @@ -80,7 +80,7 @@ class SkeletalTrapezoidationEdge { return transitions.use_count() > 0 && (ignore_empty || ! transitions.lock()->empty()); } - void setTransitions(std::shared_ptr> storage) + void setTransitions(std::shared_ptr>& storage) { transitions = storage; } @@ -93,7 +93,7 @@ class SkeletalTrapezoidationEdge { return transition_ends.use_count() > 0 && (ignore_empty || ! transition_ends.lock()->empty()); } - void setTransitionEnds(std::shared_ptr> storage) + void setTransitionEnds(std::shared_ptr>& storage) { transition_ends = storage; } @@ -106,7 +106,7 @@ class SkeletalTrapezoidationEdge { return extrusion_junctions.use_count() > 0 && (ignore_empty || ! extrusion_junctions.lock()->empty()); } - void setExtrusionJunctions(std::shared_ptr storage) + void setExtrusionJunctions(std::shared_ptr& storage) { extrusion_junctions = storage; } diff --git a/include/SkeletalTrapezoidationJoint.h b/include/SkeletalTrapezoidationJoint.h index 603b9b452f..7c7575a07b 100644 --- a/include/SkeletalTrapezoidationJoint.h +++ b/include/SkeletalTrapezoidationJoint.h @@ -43,7 +43,7 @@ class SkeletalTrapezoidationJoint { return beading.use_count() > 0; } - void setBeading(std::shared_ptr storage) + void setBeading(std::shared_ptr& storage) { beading = storage; } diff --git a/include/infill.h b/include/infill.h index 7c6a342499..40ca7fbd59 100644 --- a/include/infill.h +++ b/include/infill.h @@ -203,8 +203,8 @@ class Infill const Settings& settings, int layer_idx, SectionType section_type, - const std::shared_ptr cross_fill_provider = nullptr, - const std::shared_ptr lightning_layer = nullptr, + const std::shared_ptr& cross_fill_provider = nullptr, + const std::shared_ptr& lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr, const Polygons& prevent_small_exposed_to_air = Polygons(), const bool is_bridge_skin = false); @@ -242,8 +242,8 @@ class Infill Polygons& result_polygons, Polygons& result_lines, const Settings& settings, - const std::shared_ptr cross_fill_pattern = nullptr, - const std::shared_ptr lightning_layer = nullptr, + const std::shared_ptr& cross_fill_pattern = nullptr, + const std::shared_ptr& lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr); /*! @@ -402,7 +402,7 @@ class Infill * see https://hal.archives-ouvertes.fr/hal-02155929/document * \param result (output) The resulting polygons */ - void generateLightningInfill(const std::shared_ptr lightning_layer, Polygons& result_lines); + void generateLightningInfill(const std::shared_ptr& lightning_layer, Polygons& result_lines); /*! * Generate sparse concentric infill diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index cf17d69454..44cc58cbe2 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -420,7 +420,7 @@ void ArcusCommunication::sendOptimizedLayerData() } spdlog::info("Sending {} layers.", data.current_layer_count); - for (std::pair> entry : data.slice_data) // Note: This is in no particular order! + for (const auto& entry : data.slice_data) // Note: This is in no particular order! { spdlog::debug("Sending layer data for layer {} of {}.", entry.first, data.slice_data.size()); private_data->socket->sendMessage(entry.second); // Send the actual layers. diff --git a/src/infill.cpp b/src/infill.cpp index 6bdd545aaa..9137aa66ca 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -88,8 +88,8 @@ void Infill::generate( const Settings& settings, int layer_idx, SectionType section_type, - const std::shared_ptr cross_fill_provider, - const std::shared_ptr lightning_trees, + const std::shared_ptr& cross_fill_provider, + const std::shared_ptr& lightning_trees, const SliceMeshStorage* mesh, const Polygons& prevent_small_exposed_to_air, const bool is_bridge_skin) @@ -255,8 +255,8 @@ void Infill::_generate( Polygons& result_polygons, Polygons& result_lines, const Settings& settings, - const std::shared_ptr cross_fill_provider, - const std::shared_ptr lightning_trees, + const std::shared_ptr& cross_fill_provider, + const std::shared_ptr& lightning_trees, const SliceMeshStorage* mesh) { if (inner_contour.empty()) @@ -432,7 +432,7 @@ void Infill::generateGyroidInfill(Polygons& result_lines, Polygons& result_polyg PolylineStitcher::stitch(line_segments, result_lines, result_polygons, infill_line_width); } -void Infill::generateLightningInfill(const std::shared_ptr trees, Polygons& result_lines) +void Infill::generateLightningInfill(const std::shared_ptr& trees, Polygons& result_lines) { // Don't need to support areas smaller than line width, as they are always within radius: if (std::abs(inner_contour.area()) < infill_line_width || ! trees) From 9b5da0ecf482c2d49164b19f1aea7eb2abb4b907 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 14 Sep 2023 21:39:25 +0200 Subject: [PATCH 298/470] Fix slowdown issue due to copy of large data. Since `make_shared` is a constructor, the mesh data was copied over each time we started a new layer. Properly fix this by using smart-pointers from the beginning, so we only have the creation overhead, which is nearly nothing. In fact, this solution may be _faster_ than the original, perhaps due to some constness that is now also enforced. fixes internal ticket CURA-11019 --- include/FffGcodeWriter.h | 5 ++-- include/LayerPlan.h | 4 +-- include/pathPlanning/GCodePath.h | 2 +- include/sliceDataStorage.h | 2 +- src/FffGcodeWriter.cpp | 39 +++++++++++++++++------------- src/FffPolygonGenerator.cpp | 30 +++++++++++++---------- src/LayerPlan.cpp | 11 +++++---- src/TreeModelVolumes.cpp | 5 ++-- src/TreeSupport.cpp | 16 ++++++------ src/bridge.cpp | 3 ++- src/plugins/converters.cpp | 2 +- src/settings/PathConfigStorage.cpp | 6 ++--- src/sliceDataStorage.cpp | 22 ++++++++--------- src/support.cpp | 19 ++++++++------- 14 files changed, 90 insertions(+), 76 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 2d2e7c7162..2cde3c40d4 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -328,13 +328,12 @@ class FffGcodeWriter : public NoCopy * This adds all features (e.g. walls, skin etc.) of this \p mesh to the gcode which are printed using \p extruder_nr * * \param[in] storage where the slice data is stored. - * \param mesh The mesh to add to the layer plan \p gcode_layer. + * \param mesh_ptr The mesh to add to the layer plan \p gcode_layer. * \param extruder_nr The extruder for which to print all features of the mesh which should be printed with this extruder * \param mesh_config the line config with which to print a print feature * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode(const SliceDataStorage& storage, const SliceMeshStorage& mesh, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) - const; + void addMeshLayerToGCode(const SliceDataStorage& storage, const std::shared_ptr& mesh_ptr, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; /*! * Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer. diff --git a/include/LayerPlan.h b/include/LayerPlan.h index 3eda752178..c894ab2a27 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -70,7 +70,7 @@ class LayerPlan : public NoCopy std::vector has_prime_tower_planned_per_extruder; //!< For each extruder, whether the prime tower is planned yet or not. std::optional last_planned_position; //!< The last planned XY position of the print head (if known) - std::shared_ptr current_mesh; //!< The mesh of the last planned move. + std::shared_ptr current_mesh; //!< The mesh of the last planned move. /*! * Whether the skirt or brim polygons have been processed into planned paths @@ -238,7 +238,7 @@ class LayerPlan : public NoCopy * Track the currently printing mesh. * \param mesh_id A unique ID indicating the current mesh. */ - void setMesh(const std::shared_ptr& mesh); + void setMesh(const std::shared_ptr& mesh); /*! * Set bridge_wall_mask. diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 8c3c34dcfe..7bbd56c709 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -30,7 +30,7 @@ namespace cura struct GCodePath { GCodePathConfig config{}; //!< The configuration settings of the path. - std::shared_ptr mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; + std::shared_ptr mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; SpaceFillType space_fill_type{}; //!< The type of space filling of which this path is a part Ratio flow{}; //!< A type-independent flow configuration Ratio width_factor{}; //!< Adjustment to the line width. Similar to flow, but causes the speed_back_pressure_factor to be adjusted. diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 32a391c24c..9b0661ed36 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -324,7 +324,7 @@ class SliceDataStorage : public NoCopy Point3 model_size, model_min, model_max; AABB3D machine_size; //!< The bounding box with the width, height and depth of the printer. - std::vector meshes; + std::vector> meshes; std::vector retraction_wipe_config_per_extruder; //!< Config for retractions, extruder switch retractions, and wipes, per extruder. diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 648e9082ce..0d6ea404fd 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -106,8 +106,9 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep } size_t total_layers = 0; - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh_ptr : storage.meshes) { + auto& mesh = *mesh_ptr; size_t mesh_layer_num = mesh.layers.size(); // calculation of _actual_ number of layers in loop. @@ -269,7 +270,7 @@ void FffGcodeWriter::findLayerSeamsForSpiralize(SliceDataStorage& storage, size_ const std::vector& mesh_order = mesh_order_per_extruder[extruder_nr]; for (unsigned int mesh_idx : mesh_order) { - SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + auto& mesh = *storage.meshes[mesh_idx]; // if this mesh has layer data for this layer process it if (! done_this_layer && mesh.layers.size() > layer_nr) { @@ -371,9 +372,9 @@ void FffGcodeWriter::setConfigRetractionAndWipe(SliceDataStorage& storage) ExtruderTrain& train = scene.extruders[extruder_index]; retractionAndWipeConfigFromSettings(train.settings, &storage.retraction_wipe_config_per_extruder[extruder_index]); } - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh : storage.meshes) { - retractionAndWipeConfigFromSettings(mesh.settings, &mesh.retraction_wipe_config); + retractionAndWipeConfigFromSettings(mesh->settings, &mesh->retraction_wipe_config); } } @@ -505,9 +506,9 @@ void FffGcodeWriter::setSupportAngles(SliceDataStorage& storage) } else { - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh : storage.meshes) { - if (mesh.settings.get(interface_height_setting) + if (mesh->settings.get(interface_height_setting) >= 2 * Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height")) { // Some roofs are quite thick. @@ -913,10 +914,11 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn } else { - z = storage.meshes[0].layers[layer_nr].printZ; // stub default + z = storage.meshes[0]->layers[layer_nr].printZ; // stub default // find printZ of first actual printed mesh - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh_ptr : storage.meshes) { + const auto& mesh = *mesh_ptr; if (layer_nr >= static_cast(mesh.layers.size()) || mesh.settings.get("support_mesh") || mesh.settings.get("anti_overhang_mesh") || mesh.settings.get("cutting_mesh") || mesh.settings.get("infill_mesh")) { @@ -951,8 +953,9 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn } coord_t max_inner_wall_width = 0; - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh_ptr : storage.meshes) { + const auto& mesh = *mesh_ptr; coord_t mesh_inner_wall_width = mesh.settings.get((mesh.settings.get("wall_line_count") > 1) ? "wall_line_width_x" : "wall_line_width_0"); if (layer_nr == 0) { @@ -1022,14 +1025,14 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn const std::vector& mesh_order = mesh_order_per_extruder[extruder_nr]; for (size_t mesh_idx : mesh_order) { - const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + const auto& mesh = storage.meshes[mesh_idx]; const MeshPathConfigs& mesh_config = gcode_layer.configs_storage.mesh_configs[mesh_idx]; - if (mesh.settings.get("magic_mesh_surface_mode") == ESurfaceMode::SURFACE + if (mesh->settings.get("magic_mesh_surface_mode") == ESurfaceMode::SURFACE && extruder_nr - == mesh.settings.get("wall_0_extruder_nr").extruder_nr // mesh surface mode should always only be printed with the outer wall extruder! + == mesh->settings.get("wall_0_extruder_nr").extruder_nr // mesh surface mode should always only be printed with the outer wall extruder! ) { - addMeshLayerToGCode_meshSurfaceMode(storage, mesh, mesh_config, gcode_layer); + addMeshLayerToGCode_meshSurfaceMode(storage, *mesh, mesh_config, gcode_layer); } else { @@ -1382,7 +1385,7 @@ std::vector FffGcodeWriter::calculateMeshOrder(const SliceDataStorage& s std::vector::iterator mesh_group = Application::getInstance().current_slice->scene.current_mesh_group; for (unsigned int mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + const auto& mesh = *storage.meshes[mesh_idx]; if (mesh.getExtruderIsUsed(extruder_nr)) { const Mesh& mesh_data = mesh_group->meshes[mesh_idx]; @@ -1449,11 +1452,12 @@ void FffGcodeWriter::addMeshOpenPolyLinesToGCode(const SliceMeshStorage& mesh, c void FffGcodeWriter::addMeshLayerToGCode( const SliceDataStorage& storage, - const SliceMeshStorage& mesh, + const std::shared_ptr& mesh_ptr, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const { + const auto& mesh = *mesh_ptr; if (gcode_layer.getLayerNr() > mesh.layer_nr_max_filled_layer) { return; @@ -1471,7 +1475,7 @@ void FffGcodeWriter::addMeshLayerToGCode( return; } - gcode_layer.setMesh(std::make_shared(mesh)); + gcode_layer.setMesh(mesh_ptr); ZSeamConfig z_seam_config; if (mesh.isPrinted()) //"normal" meshes with walls, skin, infill, etc. get the traditional part ordering based on the z-seam settings. @@ -2259,8 +2263,9 @@ bool FffGcodeWriter::processInsets( Polygons outlines_below; AABB boundaryBox(part.outline); - for (const SliceMeshStorage& m : storage.meshes) + for (const auto& mesh_ptr : storage.meshes) { + const auto& m = *mesh_ptr; if (m.isPrinted()) { for (const SliceLayerPart& prevLayerPart : m.layers[gcode_layer.getLayerNr() - 1].parts) diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp index 03c83c0627..942345ccc1 100644 --- a/src/FffPolygonGenerator.cpp +++ b/src/FffPolygonGenerator.cpp @@ -275,8 +275,8 @@ bool FffPolygonGenerator::sliceModel(MeshGroup* meshgroup, TimeKeeper& timeKeepe Mesh& mesh = scene.current_mesh_group->meshes[meshIdx]; // always make a new SliceMeshStorage, so that they have the same ordering / indexing as meshgroup.meshes - storage.meshes.emplace_back(&meshgroup->meshes[meshIdx], slicer->layers.size()); // new mesh in storage had settings from the Mesh - SliceMeshStorage& meshStorage = storage.meshes.back(); + storage.meshes.push_back(std::make_shared(& meshgroup->meshes[meshIdx], slicer->layers.size())); // new mesh in storage had settings from the Mesh + auto& meshStorage = *storage.meshes.back(); // only create layer parts for normal meshes const bool is_support_modifier = AreaSupport::handleSupportModifierMesh(storage, mesh.settings, slicer); @@ -347,8 +347,9 @@ void FffPolygonGenerator::slices2polygons(SliceDataStorage& storage, TimeKeeper& // compute layer count and remove first empty layers // there is no separate progress stage for removeEmptyFisrtLayer (TODO) unsigned int slice_layer_count = 0; - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh_ptr : storage.meshes) { + auto& mesh = *mesh_ptr; if (! mesh.settings.get("infill_mesh") && ! mesh.settings.get("anti_overhang_mesh")) { slice_layer_count = std::max(slice_layer_count, mesh.layers.size()); @@ -369,7 +370,7 @@ void FffPolygonGenerator::slices2polygons(SliceDataStorage& storage, TimeKeeper& std::multimap order_to_mesh_indices; for (size_t mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - order_to_mesh_indices.emplace(storage.meshes[mesh_idx].settings.get("infill_mesh_order"), mesh_idx); + order_to_mesh_indices.emplace(storage.meshes[mesh_idx]->settings.get("infill_mesh_order"), mesh_idx); } for (std::pair& order_and_mesh_idx : order_to_mesh_indices) { @@ -432,9 +433,9 @@ void FffPolygonGenerator::slices2polygons(SliceDataStorage& storage, TimeKeeper& spdlog::debug("Meshes post-processing"); // meshes post processing - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh : storage.meshes) { - processDerivedWallsSkinInfill(mesh); + processDerivedWallsSkinInfill(*mesh); } spdlog::debug("Processing gradual support"); @@ -449,7 +450,7 @@ void FffPolygonGenerator::processBasicWallsSkinInfill( ProgressStageEstimator& inset_skin_progress_estimate) { size_t mesh_idx = mesh_order[mesh_order_idx]; - SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; size_t mesh_layer_count = mesh.layers.size(); if (mesh.settings.get("infill_mesh")) { @@ -513,7 +514,7 @@ void FffPolygonGenerator::processBasicWallsSkinInfill( for (size_t other_mesh_order_idx = mesh_order_idx + 1; other_mesh_order_idx < mesh_order.size(); ++other_mesh_order_idx) { const size_t other_mesh_idx = mesh_order[other_mesh_order_idx]; - SliceMeshStorage& other_mesh = storage.meshes[other_mesh_idx]; + SliceMeshStorage& other_mesh = *storage.meshes[other_mesh_idx]; if (other_mesh.settings.get("infill_mesh")) { AABB3D aabb = scene.current_mesh_group->meshes[mesh_idx].getAABB(); @@ -553,7 +554,7 @@ void FffPolygonGenerator::processBasicWallsSkinInfill( void FffPolygonGenerator::processInfillMesh(SliceDataStorage& storage, const size_t mesh_order_idx, const std::vector& mesh_order) { size_t mesh_idx = mesh_order[mesh_order_idx]; - SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; coord_t surface_line_width = mesh.settings.get("wall_line_width_0"); mesh.layer_nr_max_filled_layer = -1; @@ -585,7 +586,7 @@ void FffPolygonGenerator::processInfillMesh(SliceDataStorage& storage, const siz { break; // all previous meshes have been processed } - SliceMeshStorage& other_mesh = storage.meshes[other_mesh_idx]; + SliceMeshStorage& other_mesh = *storage.meshes[other_mesh_idx]; if (layer_idx >= static_cast(other_mesh.layers.size())) { // there can be no interaction between the infill mesh and this other non-infill mesh continue; @@ -741,8 +742,9 @@ bool FffPolygonGenerator::isEmptyLayer(SliceDataStorage& storage, const LayerInd return false; } } - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh_ptr : storage.meshes) { + auto& mesh = *mesh_ptr; if (layer_idx >= mesh.layers.size()) { continue; @@ -782,8 +784,9 @@ void FffPolygonGenerator::removeEmptyFirstLayers(SliceDataStorage& storage, size { spdlog::info("Removing {} layers because they are empty", n_empty_first_layers); const coord_t layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh_ptr : storage.meshes) { + auto& mesh = *mesh_ptr; std::vector& layers = mesh.layers; if (layers.size() > n_empty_first_layers) { @@ -852,8 +855,9 @@ void FffPolygonGenerator::computePrintHeightStatistics(SliceDataStorage& storage max_print_height_per_extruder.resize(extruder_count, -(raft_layers + 1)); // Initialize all as -1 (or lower in case of raft). { // compute max_object_height_per_extruder // Height of the meshes themselves. - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh_ptr : storage.meshes) { + auto& mesh = *mesh_ptr; if (mesh.settings.get("anti_overhang_mesh") || mesh.settings.get("support_mesh")) { continue; // Special type of mesh that doesn't get printed. diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 600869daac..b7d24b1b11 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -159,8 +159,9 @@ Polygons LayerPlan::computeCombBoundary(const CombBoundary boundary_type) } else { - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh_ptr : storage.meshes) { + const auto& mesh = *mesh_ptr; const SliceLayer& layer = mesh.layers[static_cast(layer_nr)]; // don't process infill_mesh or anti_overhang_mesh if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) @@ -282,7 +283,7 @@ bool LayerPlan::setExtruder(const size_t extruder_nr) } return true; } -void LayerPlan::setMesh(const std::shared_ptr& mesh) +void LayerPlan::setMesh(const std::shared_ptr& mesh) { current_mesh = mesh; } @@ -1187,9 +1188,9 @@ void LayerPlan::addLinesByOptimizer( if (layer_nr >= 0) { // determine how much the skin/infill lines overlap the combing boundary - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh : storage.meshes) { - const coord_t overlap = std::max(mesh.settings.get("skin_overlap_mm"), mesh.settings.get("infill_overlap_mm")); + const coord_t overlap = std::max(mesh->settings.get("skin_overlap_mm"), mesh->settings.get("infill_overlap_mm")); if (overlap > dist) { dist = overlap; @@ -1846,7 +1847,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) const bool acceleration_travel_enabled = mesh_group_settings.get("acceleration_travel_enabled"); const bool jerk_enabled = mesh_group_settings.get("jerk_enabled"); const bool jerk_travel_enabled = mesh_group_settings.get("jerk_travel_enabled"); - std::shared_ptr current_mesh; + std::shared_ptr current_mesh; for (size_t extruder_plan_idx = 0; extruder_plan_idx < extruder_plans.size(); extruder_plan_idx++) { diff --git a/src/TreeModelVolumes.cpp b/src/TreeModelVolumes.cpp index fef53433e7..6ddcef2c93 100644 --- a/src/TreeModelVolumes.cpp +++ b/src/TreeModelVolumes.cpp @@ -49,8 +49,9 @@ TreeModelVolumes::TreeModelVolumes( coord_t min_maximum_area_deviation = std::numeric_limits::max(); support_rests_on_model = false; - for (auto [mesh_idx, mesh] : storage.meshes | ranges::views::enumerate) + for (auto [mesh_idx, mesh_ptr] : storage.meshes | ranges::views::enumerate) { + auto& mesh = *mesh_ptr; bool added = false; for (auto [idx, layer_outline] : layer_outlines_ | ranges::views::enumerate) { @@ -103,7 +104,7 @@ TreeModelVolumes::TreeModelVolumes( { // Workaround for compiler bug on apple-clang -- Closure won't properly capture variables in capture lists in outer scope. const auto& mesh_idx_l = mesh_idx; - const auto& mesh_l = mesh; + const auto& mesh_l = *mesh; // ^^^ Remove when fixed (and rename accordingly in the below parallel-for). cura::parallel_for( diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 5c7585cfbb..d9e56458c4 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -38,8 +38,9 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) { size_t largest_printed_mesh_idx = 0; - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh_ptr : storage.meshes) { + const auto& mesh = *mesh_ptr; TreeSupportSettings::some_model_contains_thick_roof |= mesh.settings.get("support_roof_height") >= 2 * mesh.settings.get("layer_height"); TreeSupportSettings::has_to_rely_on_min_xy_dist_only |= @@ -48,8 +49,9 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) // Group all meshes that can be processed together. NOTE this is different from mesh-groups! // Only one setting object is needed per group, as different settings in the same group may only occur in the tip, which uses the original settings objects from the meshes. - for (auto [mesh_idx, mesh] : storage.meshes | ranges::views::enumerate) + for (auto [mesh_idx, mesh_ptr] : storage.meshes | ranges::views::enumerate) { + auto& mesh = *mesh_ptr; const bool non_supportable_mesh = mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh") || mesh.settings.get("support_mesh"); if (mesh.settings.get("support_structure") != ESupportStructure::TREE || ! mesh.settings.get("support_enable") || non_supportable_mesh) { @@ -76,14 +78,14 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) } // no need to do this per mesh group as adaptive layers and raft setting are not setable per mesh. - if (storage.meshes[largest_printed_mesh_idx].layers.back().printZ < mesh.layers.back().printZ) + if (storage.meshes[largest_printed_mesh_idx]->layers.back().printZ < mesh.layers.back().printZ) { largest_printed_mesh_idx = mesh_idx; } } - std::vector known_z(storage.meshes[largest_printed_mesh_idx].layers.size()); + std::vector known_z(storage.meshes[largest_printed_mesh_idx]->layers.size()); - for (auto [z, layer] : ranges::views::enumerate(storage.meshes[largest_printed_mesh_idx].layers)) + for (auto [z, layer] : ranges::views::enumerate(storage.meshes[largest_printed_mesh_idx]->layers)) { known_z[z] = layer.printZ; } @@ -152,7 +154,7 @@ void TreeSupport::generateSupportAreas(SliceDataStorage& storage) // ### Place tips of the support tree for (size_t mesh_idx : processing.second) { - generateInitialAreas(storage.meshes[mesh_idx], move_bounds, storage); + generateInitialAreas(*storage.meshes[mesh_idx], move_bounds, storage); } const auto t_gen = std::chrono::high_resolution_clock::now(); @@ -206,7 +208,7 @@ void TreeSupport::precalculate(const SliceDataStorage& storage, std::vector("layer_height"); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); const size_t z_distance_top_layers = round_up_divide(z_distance_top, diff --git a/src/bridge.cpp b/src/bridge.cpp index f6f4b41f04..a395f7bd79 100644 --- a/src/bridge.cpp +++ b/src/bridge.cpp @@ -24,8 +24,9 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl const Ratio sparse_infill_max_density = settings.get("bridge_sparse_infill_max_density"); // include parts from all meshes - for (const SliceMeshStorage& mesh : storage.meshes) + for (const auto& mesh_ptr : storage.meshes) { + const auto& mesh = *mesh_ptr; if (mesh.isPrinted()) { const coord_t infill_line_distance = mesh.settings.get("infill_line_distance"); diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 33e7d4882e..88a716e47a 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -430,7 +430,7 @@ gcode_paths_modify_response::native_value_type gcode_paths_modify_response::operator()(gcode_paths_modify_response::native_value_type& original_value, const gcode_paths_modify_response::value_type& message) const { std::vector paths; - using map_t = std::unordered_map>; + using map_t = std::unordered_map>; auto meshes = original_value | ranges::views::filter( [](const auto& path) diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 2f9dd2acea..467b130f5c 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -124,9 +124,9 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye } mesh_configs.reserve(storage.meshes.size()); - for (const SliceMeshStorage& mesh_storage : storage.meshes) + for (const auto& mesh_storage : storage.meshes) { - mesh_configs.emplace_back(mesh_storage, layer_thickness, layer_nr, line_width_factor_per_extruder); + mesh_configs.emplace_back(*mesh_storage, layer_thickness, layer_nr, line_width_factor_per_extruder); } support_infill_config.reserve(MAX_INFILL_COMBINE); @@ -224,7 +224,7 @@ void PathConfigStorage::handleInitialLayerSpeedup(const SliceDataStorage& storag { // meshes for (size_t mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + const SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; const SpeedDerivatives initial_layer_speed_config{ .speed = mesh.settings.get("speed_print_layer_0"), .acceleration = mesh.settings.get("acceleration_print_layer_0"), diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 788ac2e45a..c890783f8c 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -300,16 +300,16 @@ Polygons Polygons total; if (layer_nr >= 0) { - for (const SliceMeshStorage& mesh : meshes) + for (const auto& mesh : meshes) { - if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh") - || (extruder_nr != -1 && extruder_nr != int(mesh.settings.get("wall_0_extruder_nr").extruder_nr))) + if (mesh->settings.get("infill_mesh") || mesh->settings.get("anti_overhang_mesh") + || (extruder_nr != -1 && extruder_nr != int(mesh->settings.get("wall_0_extruder_nr").extruder_nr))) { continue; } - const SliceLayer& layer = mesh.layers[layer_nr]; + const SliceLayer& layer = mesh->layers[layer_nr]; layer.getOutlines(total, external_polys_only); - if (mesh.settings.get("magic_mesh_surface_mode") != ESurfaceMode::NORMAL) + if (mesh->settings.get("magic_mesh_surface_mode") != ESurfaceMode::NORMAL) { total = total.unionPolygons(layer.openPolyLines.offsetPolyLine(MM2INT(0.1))); } @@ -381,9 +381,9 @@ std::vector SliceDataStorage::getExtrudersUsed() const // support // support is presupposed to be present... - for (const SliceMeshStorage& mesh : meshes) + for (const auto& mesh : meshes) { - if (mesh.settings.get("support_enable") || mesh.settings.get("support_mesh")) + if (mesh->settings.get("support_enable") || mesh->settings.get("support_mesh")) { ret[mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr] = true; ret[mesh_group_settings.get("support_infill_extruder_nr").extruder_nr] = true; @@ -399,11 +399,11 @@ std::vector SliceDataStorage::getExtrudersUsed() const } // all meshes are presupposed to actually have content - for (const SliceMeshStorage& mesh : meshes) + for (const auto& mesh : meshes) { for (unsigned int extruder_nr = 0; extruder_nr < ret.size(); extruder_nr++) { - ret[extruder_nr] = ret[extruder_nr] || mesh.getExtruderIsUsed(extruder_nr); + ret[extruder_nr] = ret[extruder_nr] || mesh->getExtruderIsUsed(extruder_nr); } } return ret; @@ -508,11 +508,11 @@ std::vector SliceDataStorage::getExtrudersUsed(const LayerIndex layer_nr) if (include_models) { - for (const SliceMeshStorage& mesh : meshes) + for (const auto& mesh : meshes) { for (unsigned int extruder_nr = 0; extruder_nr < ret.size(); extruder_nr++) { - ret[extruder_nr] = ret[extruder_nr] || mesh.getExtruderIsUsed(extruder_nr, layer_nr); + ret[extruder_nr] = ret[extruder_nr] || mesh->getExtruderIsUsed(extruder_nr, layer_nr); } } } diff --git a/src/support.cpp b/src/support.cpp index 1adb0b1ae7..a55d21b53f 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -599,8 +599,9 @@ Polygons AreaSupport::join(const SliceDataStorage& storage, const Polygons& supp void AreaSupport::generateOverhangAreas(SliceDataStorage& storage) { - for (SliceMeshStorage& mesh : storage.meshes) + for (auto& mesh_ptr : storage.meshes) { + auto& mesh = *mesh_ptr; if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) { continue; @@ -645,14 +646,14 @@ void AreaSupport::generateSupportAreas(SliceDataStorage& storage) const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; for (unsigned int mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) { continue; } - Settings* infill_settings = &storage.meshes[mesh_idx].settings; - Settings* roof_settings = &storage.meshes[mesh_idx].settings; - Settings* bottom_settings = &storage.meshes[mesh_idx].settings; + Settings* infill_settings = &storage.meshes[mesh_idx]->settings; + Settings* roof_settings = &storage.meshes[mesh_idx]->settings; + Settings* bottom_settings = &storage.meshes[mesh_idx]->settings; if (mesh.settings.get("support_mesh")) { if ((mesh.settings.get("support_mesh_drop_down") && support_meshes_drop_down_handled) @@ -694,7 +695,7 @@ void AreaSupport::generateSupportAreas(SliceDataStorage& storage) // handle support interface for (unsigned int mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) { continue; @@ -725,12 +726,12 @@ void AreaSupport::precomputeCrossInfillTree(SliceDataStorage& storage) AABB3D aabb; for (unsigned int mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - const SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + const SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) { continue; } - Settings& infill_settings = storage.meshes[mesh_idx].settings; + Settings& infill_settings = storage.meshes[mesh_idx]->settings; if (mesh.settings.get("support_mesh")) { // use extruder train settings rather than the per-object settings of the first support mesh encountered. @@ -1039,7 +1040,7 @@ void AreaSupport::generateSupportAreasForMesh( const size_t layer_count, std::vector& support_areas) { - SliceMeshStorage& mesh = storage.meshes[mesh_idx]; + SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; const ESupportStructure support_structure = mesh.settings.get("support_structure"); const bool is_support_mesh_place_holder From e171220546f94a513991d83bc5dd87e2ca7f44dd Mon Sep 17 00:00:00 2001 From: rburema Date: Fri, 15 Sep 2023 07:21:23 +0000 Subject: [PATCH 299/470] Applied clang-format. --- include/FffGcodeWriter.h | 7 +- include/SkeletalTrapezoidationEdge.h | 38 +- include/SkeletalTrapezoidationJoint.h | 25 +- src/FffPolygonGenerator.cpp | 2 +- src/TreeSupport.cpp | 1280 +++++++++++++------------ src/bridge.cpp | 46 +- 6 files changed, 756 insertions(+), 642 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 2cde3c40d4..0e3dea645c 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -333,7 +333,12 @@ class FffGcodeWriter : public NoCopy * \param mesh_config the line config with which to print a print feature * \param gcode_layer The initial planning of the gcode of the layer. */ - void addMeshLayerToGCode(const SliceDataStorage& storage, const std::shared_ptr& mesh_ptr, const size_t extruder_nr, const MeshPathConfigs& mesh_config, LayerPlan& gcode_layer) const; + void addMeshLayerToGCode( + const SliceDataStorage& storage, + const std::shared_ptr& mesh_ptr, + const size_t extruder_nr, + const MeshPathConfigs& mesh_config, + LayerPlan& gcode_layer) const; /*! * Add all features of the given extruder from a single part from a given layer of a mesh-volume to the layer plan \p gcode_layer. diff --git a/include/SkeletalTrapezoidationEdge.h b/include/SkeletalTrapezoidationEdge.h index 4c0bfb365c..60f464deb5 100644 --- a/include/SkeletalTrapezoidationEdge.h +++ b/include/SkeletalTrapezoidationEdge.h @@ -4,19 +4,24 @@ #ifndef SKELETAL_TRAPEZOIDATION_EDGE_H #define SKELETAL_TRAPEZOIDATION_EDGE_H -#include // smart pointers +#include "utils/ExtrusionJunction.h" + #include +#include // smart pointers #include -#include "utils/ExtrusionJunction.h" - namespace cura { class SkeletalTrapezoidationEdge { private: - enum class Central : int { UNKNOWN = -1, NO = 0, YES = 1}; + enum class Central : int + { + UNKNOWN = -1, + NO = 0, + YES = 1 + }; public: /*! @@ -28,9 +33,11 @@ class SkeletalTrapezoidationEdge int lower_bead_count; coord_t feature_radius; // The feature radius at which this transition is placed TransitionMiddle(coord_t pos, int lower_bead_count, coord_t feature_radius) - : pos(pos), lower_bead_count(lower_bead_count) + : pos(pos) + , lower_bead_count(lower_bead_count) , feature_radius(feature_radius) - {} + { + } }; /*! @@ -42,8 +49,11 @@ class SkeletalTrapezoidationEdge int lower_bead_count; bool is_lower_end; // Whether this is the ed of the transition with lower bead count TransitionEnd(coord_t pos, int lower_bead_count, bool is_lower_end) - : pos(pos), lower_bead_count(lower_bead_count), is_lower_end(is_lower_end) - {} + : pos(pos) + , lower_bead_count(lower_bead_count) + , is_lower_end(is_lower_end) + { + } }; enum class EdgeType : int @@ -55,12 +65,14 @@ class SkeletalTrapezoidationEdge EdgeType type; SkeletalTrapezoidationEdge() - : SkeletalTrapezoidationEdge(EdgeType::NORMAL) - {} + : SkeletalTrapezoidationEdge(EdgeType::NORMAL) + { + } SkeletalTrapezoidationEdge(const EdgeType& type) - : type(type) - , is_central(Central::UNKNOWN) - {} + : type(type) + , is_central(Central::UNKNOWN) + { + } bool isCentral() const { diff --git a/include/SkeletalTrapezoidationJoint.h b/include/SkeletalTrapezoidationJoint.h index 7c7575a07b..e8c5ad42a7 100644 --- a/include/SkeletalTrapezoidationJoint.h +++ b/include/SkeletalTrapezoidationJoint.h @@ -1,20 +1,21 @@ -//Copyright (c) 2020 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2020 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef SKELETAL_TRAPEZOIDATION_JOINT_H #define SKELETAL_TRAPEZOIDATION_JOINT_H -#include // smart pointers - #include "BeadingStrategy/BeadingStrategy.h" #include "utils/IntPoint.h" +#include // smart pointers + namespace cura { class SkeletalTrapezoidationJoint { using Beading = BeadingStrategy::Beading; + public: struct BeadingPropagation { @@ -27,17 +28,20 @@ class SkeletalTrapezoidationJoint , dist_to_bottom_source(0) , dist_from_top_source(0) , is_upward_propagated_only(false) - {} + { + } }; coord_t distance_to_boundary; coord_t bead_count; - float transition_ratio; //! The distance near the skeleton to leave free because this joint is in the middle of a transition, as a fraction of the inner bead width of the bead at the higher transition. + float transition_ratio; //! The distance near the skeleton to leave free because this joint is in the middle of a transition, as a fraction of the inner bead width of the bead + //! at the higher transition. SkeletalTrapezoidationJoint() - : distance_to_boundary(-1) - , bead_count(-1) - , transition_ratio(0) - {} + : distance_to_boundary(-1) + , bead_count(-1) + , transition_ratio(0) + { + } bool hasBeading() const { @@ -53,7 +57,6 @@ class SkeletalTrapezoidationJoint } private: - std::weak_ptr beading; }; diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp index 942345ccc1..edd5e48d6e 100644 --- a/src/FffPolygonGenerator.cpp +++ b/src/FffPolygonGenerator.cpp @@ -275,7 +275,7 @@ bool FffPolygonGenerator::sliceModel(MeshGroup* meshgroup, TimeKeeper& timeKeepe Mesh& mesh = scene.current_mesh_group->meshes[meshIdx]; // always make a new SliceMeshStorage, so that they have the same ordering / indexing as meshgroup.meshes - storage.meshes.push_back(std::make_shared(& meshgroup->meshes[meshIdx], slicer->layers.size())); // new mesh in storage had settings from the Mesh + storage.meshes.push_back(std::make_shared(&meshgroup->meshes[meshIdx], slicer->layers.size())); // new mesh in storage had settings from the Mesh auto& meshStorage = *storage.meshes.back(); // only create layer parts for normal meshes diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index d9e56458c4..9cc4c7d404 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2,6 +2,7 @@ // CuraEngine is released under the terms of the AGPLv3 or higher #include "TreeSupport.h" + #include "Application.h" //To get settings. #include "TreeSupportTipGenerator.h" #include "TreeSupportUtils.h" @@ -17,20 +18,20 @@ #include "utils/polygonUtils.h" //For moveInside. #include "utils/section_type.h" -#include -#include -#include #include #include #include #include +#include #include + +#include +#include +#include #include #include #include -#include - namespace cura { @@ -41,10 +42,10 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) for (const auto& mesh_ptr : storage.meshes) { const auto& mesh = *mesh_ptr; - TreeSupportSettings::some_model_contains_thick_roof |= - mesh.settings.get("support_roof_height") >= 2 * mesh.settings.get("layer_height"); - TreeSupportSettings::has_to_rely_on_min_xy_dist_only |= - mesh.settings.get("support_top_distance") == 0 || mesh.settings.get("support_bottom_distance") == 0 || mesh.settings.get("min_feature_size") < (FUDGE_LENGTH * 2); + TreeSupportSettings::some_model_contains_thick_roof |= mesh.settings.get("support_roof_height") >= 2 * mesh.settings.get("layer_height"); + TreeSupportSettings::has_to_rely_on_min_xy_dist_only |= mesh.settings.get("support_top_distance") == 0 + || mesh.settings.get("support_bottom_distance") == 0 + || mesh.settings.get("min_feature_size") < (FUDGE_LENGTH * 2); } // Group all meshes that can be processed together. NOTE this is different from mesh-groups! @@ -68,8 +69,10 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) { added = true; grouped_mesh.second.emplace_back(mesh_idx); - // Handle some settings that are only used for performance reasons. This ensures that a horrible set setting intended to improve performance can not reduce it drastically. - grouped_mesh.first.performance_interface_skip_layers = std::min(grouped_mesh.first.performance_interface_skip_layers, next_settings.performance_interface_skip_layers); + // Handle some settings that are only used for performance reasons. This ensures that a horrible set setting intended to improve performance can not reduce it + // drastically. + grouped_mesh.first.performance_interface_skip_layers + = std::min(grouped_mesh.first.performance_interface_skip_layers, next_settings.performance_interface_skip_layers); } } if (! added) @@ -95,8 +98,7 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) mesh.first.setActualZ(known_z); } - placed_support_lines_support_areas = std::vector(storage.support.supportLayers.size(),Polygons()); - + placed_support_lines_support_areas = std::vector(storage.support.supportLayers.size(), Polygons()); } void TreeSupport::generateSupportAreas(SliceDataStorage& storage) @@ -112,12 +114,14 @@ void TreeSupport::generateSupportAreas(SliceDataStorage& storage) } // Process every mesh group. These groups can not be processed parallel, as the processing in each group is parallelized, and nested parallelization is disables and slow. - for (auto [counter, processing] : grouped_meshes | ranges::views::enumerate ) + for (auto [counter, processing] : grouped_meshes | ranges::views::enumerate) { // process each combination of meshes - std::vector> move_bounds(storage.support.supportLayers.size()); // Value is the area where support may be placed. As this is calculated in CreateLayerPathing it is saved and reused in drawAreas. + std::vector> move_bounds( + storage.support.supportLayers + .size()); // Value is the area where support may be placed. As this is calculated in CreateLayerPathing it is saved and reused in drawAreas. - additional_required_support_area=std::vector(storage.support.supportLayers.size(),Polygons()); + additional_required_support_area = std::vector(storage.support.supportLayers.size(), Polygons()); spdlog::info("Processing support tree mesh group {} of {} containing {} meshes.", counter + 1, grouped_meshes.size(), grouped_meshes[counter].second.size()); @@ -125,8 +129,7 @@ void TreeSupport::generateSupportAreas(SliceDataStorage& storage) auto t_start = std::chrono::high_resolution_clock::now(); // get all already existing support areas and exclude them - cura::parallel_for - ( + cura::parallel_for( LayerIndex(0), LayerIndex(storage.support.supportLayers.size()), [&](const LayerIndex layer_idx) @@ -140,12 +143,20 @@ void TreeSupport::generateSupportAreas(SliceDataStorage& storage) } exclude[layer_idx] = exlude_at_layer.unionPolygons(); scripta::log("tree_support_exclude", exclude[layer_idx], SectionType::SUPPORT, layer_idx); - } - ); - config = processing.first; // This struct is used to easy retrieve setting. No other function except those in TreeModelVolumes and generateInitialAreas have knowledge of the existence of multiple meshes being processed. + }); + config = processing.first; // This struct is used to easy retrieve setting. No other function except those in TreeModelVolumes and generateInitialAreas have knowledge of + // the existence of multiple meshes being processed. progress_multiplier = 1.0 / double(grouped_meshes.size()); progress_offset = counter == 0 ? 0 : TREE_PROGRESS_TOTAL * (double(counter) * progress_multiplier); - volumes_ = TreeModelVolumes(storage, config.maximum_move_distance, config.maximum_move_distance_slow, config.support_line_width / 2, processing.second.front(), progress_multiplier, progress_offset, exclude); + volumes_ = TreeModelVolumes( + storage, + config.maximum_move_distance, + config.maximum_move_distance_slow, + config.support_line_width / 2, + processing.second.front(), + progress_multiplier, + progress_offset, + exclude); // ### Precalculate avoidances, collision etc. precalculate(storage, processing.second); @@ -176,19 +187,18 @@ void TreeSupport::generateSupportAreas(SliceDataStorage& storage) const auto dur_place = 0.001 * std::chrono::duration_cast(t_place - t_path).count(); const auto dur_draw = 0.001 * std::chrono::duration_cast(t_draw - t_place).count(); const auto dur_total = 0.001 * std::chrono::duration_cast(t_draw - t_start).count(); - spdlog::info - ( + spdlog::info( "Total time used creating Tree support for the currently grouped meshes: {} ms. Different subtasks:\n" - "Calculating Avoidance: {} ms Creating inital influence areas: {} ms Influence area creation: {} ms Placement of Points in InfluenceAreas: {} ms Drawing result as support {} ms", + "Calculating Avoidance: {} ms Creating inital influence areas: {} ms Influence area creation: {} ms Placement of Points in InfluenceAreas: {} ms Drawing result as " + "support {} ms", dur_total, dur_pre_gen, dur_gen, dur_path, dur_place, - dur_draw - ); + dur_draw); + - for (auto& layer : move_bounds) { for (auto elem : layer) @@ -212,7 +222,7 @@ void TreeSupport::precalculate(const SliceDataStorage& storage, std::vector("layer_height"); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); const size_t z_distance_top_layers = round_up_divide(z_distance_top, - layer_height) + 1; // Support must always be 1 layer below overhang. + layer_height) + 1; // Support must always be 1 layer below overhang. if (mesh.overhang_areas.size() <= z_distance_top_layers) { continue; @@ -222,7 +232,7 @@ void TreeSupport::precalculate(const SliceDataStorage& storage, std::vector max_layer) // iterates over multiple meshes { @@ -244,8 +254,7 @@ void TreeSupport::generateInitialAreas(const SliceMeshStorage& mesh, std::vector tip_gen.generateTips(storage, mesh, move_bounds, additional_required_support_area, placed_support_lines_support_areas); } -void TreeSupport::mergeHelper -( +void TreeSupport::mergeHelper( std::map& reduced_aabb, std::map& input_aabb, const PropertyAreasUnordered& to_bp_areas, @@ -254,12 +263,14 @@ void TreeSupport::mergeHelper PropertyAreasUnordered& insert_bp_areas, PropertyAreasUnordered& insert_model_areas, PropertyAreasUnordered& insert_influence, - std::vector& erase, const LayerIndex layer_idx -) + std::vector& erase, + const LayerIndex layer_idx) { const bool first_merge_iteration = reduced_aabb.empty(); // If this is the first iteration, all elements in input have to be merged with each other - const std::function getRadiusFunction = - [&](const size_t distance_to_top, const double buildplate_radius_increases) { return config.getRadius(distance_to_top, buildplate_radius_increases); }; + const std::function getRadiusFunction = [&](const size_t distance_to_top, const double buildplate_radius_increases) + { + return config.getRadius(distance_to_top, buildplate_radius_increases); + }; for (auto& influence : input_aabb) { bool merged = false; @@ -271,7 +282,7 @@ void TreeSupport::mergeHelper AABB aabb = reduced_check.second; if (aabb.hit(influence_aabb)) { - if (!first_merge_iteration && input_aabb.count(reduced_check.first)) + if (! first_merge_iteration && input_aabb.count(reduced_check.first)) { break; // Do not try to merge elements that already should have been merged. Done for potential performance improvement. } @@ -280,14 +291,15 @@ void TreeSupport::mergeHelper // ^^^ We do not want to merge a gracious with a non gracious area as bad placement could negatively impact the dependability of the whole subtree. const bool merging_to_bp = reduced_check.first.to_buildplate && influence.first.to_buildplate; const bool merging_min_and_regular_xy = reduced_check.first.use_min_xy_dist != influence.first.use_min_xy_dist; - // ^^^ Could cause some issues with the increase of one area, as it is assumed that if the smaller is increased by the delta to the larger it is engulfed by it already. + // ^^^ Could cause some issues with the increase of one area, as it is assumed that if the smaller is increased by the delta to the larger it is engulfed by it + // already. // But because a different collision may be removed from the in drawArea generated circles, this assumption could be wrong. - const bool merging_different_range_limits = - reduced_check.first.influence_area_limit_active && influence.first.influence_area_limit_active && influence.first.influence_area_limit_range != reduced_check.first.influence_area_limit_range; + const bool merging_different_range_limits = reduced_check.first.influence_area_limit_active && influence.first.influence_area_limit_active + && influence.first.influence_area_limit_range != reduced_check.first.influence_area_limit_range; coord_t increased_to_model_radius = 0; size_t larger_to_model_dtt = 0; - if (!merging_to_bp) + if (! merging_to_bp) { const coord_t infl_radius = config.getRadius(influence.first); // Get the real radius increase as the user does not care for the collision model. const coord_t redu_radius = config.getRadius(reduced_check.first); @@ -313,14 +325,9 @@ void TreeSupport::mergeHelper // If a merge could place a stable branch on unstable ground, would be increasing the radius further than allowed to when merging to model and to_bp trees or // would merge to model before it is known they will even been drawn the merge is skipped - if - ( - merging_min_and_regular_xy || - merging_gracious_and_non_gracious || - increased_to_model_radius > config.max_to_model_radius_increase || - (!merging_to_bp && larger_to_model_dtt < config.min_dtt_to_model && !reduced_check.first.supports_roof && !influence.first.supports_roof) || - merging_different_range_limits - ) + if (merging_min_and_regular_xy || merging_gracious_and_non_gracious || increased_to_model_radius > config.max_to_model_radius_increase + || (! merging_to_bp && larger_to_model_dtt < config.min_dtt_to_model && ! reduced_check.first.supports_roof && ! influence.first.supports_roof) + || merging_different_range_limits) { continue; } @@ -329,41 +336,29 @@ void TreeSupport::mergeHelper Polygons relevant_redu; if (merging_to_bp) { - relevant_infl = to_bp_areas.count(influence.first) ? to_bp_areas.at(influence.first) : Polygons(); // influence.first is a new element => not required to check if it was changed - relevant_redu = - insert_bp_areas.count - ( - reduced_check.first) ? - insert_bp_areas[reduced_check.first] : - (to_bp_areas.count(reduced_check.first) ? to_bp_areas.at(reduced_check.first) : Polygons() - ); + relevant_infl = to_bp_areas.count(influence.first) ? to_bp_areas.at(influence.first) + : Polygons(); // influence.first is a new element => not required to check if it was changed + relevant_redu = insert_bp_areas.count(reduced_check.first) ? insert_bp_areas[reduced_check.first] + : (to_bp_areas.count(reduced_check.first) ? to_bp_areas.at(reduced_check.first) : Polygons()); } else { relevant_infl = to_model_areas.count(influence.first) ? to_model_areas.at(influence.first) : Polygons(); - relevant_redu = - insert_model_areas.count - ( - reduced_check.first) ? - insert_model_areas[reduced_check.first] : - (to_model_areas.count(reduced_check.first) ? to_model_areas.at(reduced_check.first) : Polygons() - ); + relevant_redu = insert_model_areas.count(reduced_check.first) + ? insert_model_areas[reduced_check.first] + : (to_model_areas.count(reduced_check.first) ? to_model_areas.at(reduced_check.first) : Polygons()); } const bool red_bigger = config.getCollisionRadius(reduced_check.first) > config.getCollisionRadius(influence.first); - std::pair smaller_rad = - red_bigger ? - std::pair(influence.first, relevant_infl) : - std::pair(reduced_check.first, relevant_redu); - std::pair bigger_rad = - red_bigger ? - std::pair(reduced_check.first, relevant_redu) : - std::pair(influence.first, relevant_infl); + std::pair smaller_rad = red_bigger ? std::pair(influence.first, relevant_infl) + : std::pair(reduced_check.first, relevant_redu); + std::pair bigger_rad = red_bigger ? std::pair(reduced_check.first, relevant_redu) + : std::pair(influence.first, relevant_infl); const coord_t real_radius_delta = std::abs(config.getRadius(bigger_rad.first) - config.getRadius(smaller_rad.first)); const coord_t smaller_collision_radius = config.getCollisionRadius(smaller_rad.first); // the area of the bigger radius is used to ensure correct placement regarding the relevant avoidance, so if that would change an invalid area may be created - if (!bigger_rad.first.can_use_safe_radius && smaller_rad.first.can_use_safe_radius) + if (! bigger_rad.first.can_use_safe_radius && smaller_rad.first.can_use_safe_radius) { continue; } @@ -378,23 +373,23 @@ void TreeSupport::mergeHelper // a branch (of the larger collision radius) placed in this intersection, has already engulfed the branch of the smaller collision radius. // Because of this a merge may happen even if the influence areas (that represent possible center points of branches) do not intersect yet. // Remember that collision radius <= real radius as otherwise this assumption would be false. - const Polygons small_rad_increased_by_big_minus_small = - TreeSupportUtils::safeOffsetInc - ( - smaller_rad.second, - real_radius_delta, volumes_.getCollision(smaller_collision_radius, layer_idx - 1, use_min_radius), - 2 * (config.xy_distance + smaller_collision_radius - EPSILON), // Epsilon avoids possible rounding errors - 0, - 0, - config.support_line_distance / 2, - &config.simplifier - ); + const Polygons small_rad_increased_by_big_minus_small = TreeSupportUtils::safeOffsetInc( + smaller_rad.second, + real_radius_delta, + volumes_.getCollision(smaller_collision_radius, layer_idx - 1, use_min_radius), + 2 * (config.xy_distance + smaller_collision_radius - EPSILON), // Epsilon avoids possible rounding errors + 0, + 0, + config.support_line_distance / 2, + &config.simplifier); Polygons intersect = small_rad_increased_by_big_minus_small.intersection(bigger_rad.second); - if (intersect.area() > 1) // dont use empty as a line is not empty, but for this use-case it very well may be (and would be one layer down as union does not keep lines) + if (intersect.area() + > 1) // dont use empty as a line is not empty, but for this use-case it very well may be (and would be one layer down as union does not keep lines) { - // Check if the overlap is large enough (Small ares tend to attract rounding errors in clipper). While 25 was guessed as enough, i did not have reason to change it. - if (intersect.offset(-FUDGE_LENGTH/2).area() <= 1) + // Check if the overlap is large enough (Small ares tend to attract rounding errors in clipper). While 25 was guessed as enough, i did not have reason to change + // it. + if (intersect.offset(-FUDGE_LENGTH / 2).area() <= 1) { continue; } @@ -415,8 +410,7 @@ void TreeSupport::mergeHelper increased_to_model_radius = std::max(reduced_check.first.increased_to_model_radius, influence.first.increased_to_model_radius); } - const TreeSupportElement key - ( + const TreeSupportElement key( reduced_check.first, influence.first, layer_idx - 1, @@ -425,31 +419,30 @@ void TreeSupport::mergeHelper getRadiusFunction, config.diameter_scale_bp_radius, config.branch_radius, - config.diameter_angle_scale_factor - ); + config.diameter_angle_scale_factor); - const auto getIntersectInfluence = - [&] (const PropertyAreasUnordered& insert_infl, const PropertyAreas& infl_areas) - { - const Polygons infl_small = insert_infl.count(smaller_rad.first) ? insert_infl.at(smaller_rad.first) : (infl_areas.count(smaller_rad.first) ? infl_areas.at(smaller_rad.first) : Polygons()); - const Polygons infl_big = insert_infl.count(bigger_rad.first) ? insert_infl.at(bigger_rad.first) : (infl_areas.count(bigger_rad.first) ? infl_areas.at(bigger_rad.first) : Polygons()); - const Polygons small_rad_increased_by_big_minus_small_infl = - TreeSupportUtils::safeOffsetInc - ( - infl_small, - real_radius_delta, - volumes_.getCollision(smaller_collision_radius, layer_idx - 1, use_min_radius), - 2 * (config.xy_distance + smaller_collision_radius - EPSILON), - 0, - 0, - config.support_line_distance / 2, - &config.simplifier - ); - return small_rad_increased_by_big_minus_small_infl.intersection(infl_big); // If the one with the bigger radius with the lower radius removed overlaps we can merge. - }; + const auto getIntersectInfluence = [&](const PropertyAreasUnordered& insert_infl, const PropertyAreas& infl_areas) + { + const Polygons infl_small = insert_infl.count(smaller_rad.first) ? insert_infl.at(smaller_rad.first) + : (infl_areas.count(smaller_rad.first) ? infl_areas.at(smaller_rad.first) : Polygons()); + const Polygons infl_big = insert_infl.count(bigger_rad.first) ? insert_infl.at(bigger_rad.first) + : (infl_areas.count(bigger_rad.first) ? infl_areas.at(bigger_rad.first) : Polygons()); + const Polygons small_rad_increased_by_big_minus_small_infl = TreeSupportUtils::safeOffsetInc( + infl_small, + real_radius_delta, + volumes_.getCollision(smaller_collision_radius, layer_idx - 1, use_min_radius), + 2 * (config.xy_distance + smaller_collision_radius - EPSILON), + 0, + 0, + config.support_line_distance / 2, + &config.simplifier); + return small_rad_increased_by_big_minus_small_infl.intersection( + infl_big); // If the one with the bigger radius with the lower radius removed overlaps we can merge. + }; Polygons intersect_influence; - intersect_influence = TreeSupportUtils::safeUnion(intersect, getIntersectInfluence(insert_influence, influence_areas)); // Rounding errors again. Do not ask me where or why. + intersect_influence + = TreeSupportUtils::safeUnion(intersect, getIntersectInfluence(insert_influence, influence_areas)); // Rounding errors again. Do not ask me where or why. Polygons intersect_to_model; if (merging_to_bp && config.support_rests_on_model) @@ -475,8 +468,10 @@ void TreeSupport::mergeHelper erase.emplace_back(reduced_check.first); erase.emplace_back(influence.first); - const Polygons merge = intersect.unionPolygons(intersect_to_model).offset(config.getRadius(key), ClipperLib::jtRound).difference(volumes_.getCollision(0, layer_idx - 1)); - // ^^^ Regular union should be preferable here as Polygons tend to only become smaller through rounding errors (smaller!=has smaller area as holes have a negative area.). + const Polygons merge + = intersect.unionPolygons(intersect_to_model).offset(config.getRadius(key), ClipperLib::jtRound).difference(volumes_.getCollision(0, layer_idx - 1)); + // ^^^ Regular union should be preferable here as Polygons tend to only become smaller through rounding errors (smaller!=has smaller area as holes have a + // negative area.). // And if this area disappears because of rounding errors, the only downside is that it can not merge again on this layer. reduced_aabb.erase(reduced_check.first); // This invalidates reduced_check. @@ -495,13 +490,7 @@ void TreeSupport::mergeHelper } } -void TreeSupport::mergeInfluenceAreas -( - PropertyAreasUnordered& to_bp_areas, - PropertyAreas& to_model_areas, - PropertyAreas& influence_areas, - LayerIndex layer_idx -) +void TreeSupport::mergeInfluenceAreas(PropertyAreasUnordered& to_bp_areas, PropertyAreas& to_model_areas, PropertyAreas& influence_areas, LayerIndex layer_idx) { /* * Idea behind this is that the calculation of merges can be accelerated a bit using divide and conquer: @@ -521,13 +510,15 @@ void TreeSupport::mergeInfluenceAreas // max_bucket_count is input_size/min_elements_per_bucket round down to the next 2^n. // The rounding to 2^n is to ensure improved performance, as every iteration two buckets will be merged, halving the amount of buckets. - // If halving would cause an uneven count, e.g. 3 Then bucket 0 and 1 would have to be merged, and in the next iteration the last remaining buckets. This is assumed to not be optimal performance-wise. + // If halving would cause an uneven count, e.g. 3 Then bucket 0 and 1 would have to be merged, and in the next iteration the last remaining buckets. This is assumed to not be + // optimal performance-wise. const size_t max_bucket_count = std::pow(2, std::floor(std::log(round_up_divide(input_size, min_elements_per_bucket)))); int bucket_count = std::min(max_bucket_count, num_threads); // do not use more buckets than available threads. // To achieve that every element in a bucket is already correctly merged with other elements in this bucket // an extra empty bucket is created for each bucket, and the elements are merged into the empty one. - // Each thread will then process two buckets by merging all elements in the second bucket into the first one as mergeHelper will disable not trying to merge elements from the same bucket in this case. + // Each thread will then process two buckets by merging all elements in the second bucket into the first one as mergeHelper will disable not trying to merge elements from the + // same bucket in this case. std::vector buckets_area(2 * bucket_count); std::vector> buckets_aabb(2 * bucket_count); @@ -551,8 +542,7 @@ void TreeSupport::mergeInfluenceAreas } // Precalculate the AABBs from the influence areas. - cura::parallel_for - ( + cura::parallel_for( 0, buckets_area.size() / 2, [&](size_t idx) // +=2 as in the beginning only uneven buckets will be filled @@ -564,8 +554,7 @@ void TreeSupport::mergeInfluenceAreas outer_support_wall_aabb.expand(config.getRadius(input_pair.first)); buckets_aabb[idx].emplace(input_pair.first, outer_support_wall_aabb); } - } - ); + }); while (buckets_area.size() > 1) { @@ -575,16 +564,14 @@ void TreeSupport::mergeInfluenceAreas std::vector insert_influence(buckets_area.size() / 2); std::vector> erase(buckets_area.size() / 2); - cura::parallel_for - ( + cura::parallel_for( 0, (coord_t)buckets_area.size() / 2, [&](size_t bucket_pair_idx) { bucket_pair_idx *= 2; // this is eqivalent to a parallel for(size_t idx=0;idx x) mutable { return x.empty(); }); + const auto position_aabb = std::remove_if( + buckets_aabb.begin(), + buckets_aabb.end(), + [&](const std::map x) mutable + { + return x.empty(); + }); buckets_aabb.erase(position_aabb, buckets_aabb.end()); } } -std::optional TreeSupport::increaseSingleArea -( +std::optional TreeSupport::increaseSingleArea( AreaIncreaseSettings settings, LayerIndex layer_idx, TreeSupportElement* parent, const Polygons& relevant_offset, - Polygons& to_bp_data, Polygons& to_model_data, + Polygons& to_bp_data, + Polygons& to_model_data, Polygons& increased, const coord_t overspeed, - const bool mergelayer -) + const bool mergelayer) { TreeSupportElement current_elem(parent); // Also increases DTT by one. Polygons check_layer_data; @@ -659,22 +655,19 @@ std::optional TreeSupport::increaseSingleArea increased = relevant_offset; if (overspeed > 0) { - const coord_t safe_movement_distance = - (current_elem.use_min_xy_dist ? config.xy_min_distance : config.xy_distance) + (std::min(config.z_distance_top_layers, config.z_distance_bottom_layers) > 0 ? config.min_feature_size : 0); + const coord_t safe_movement_distance = (current_elem.use_min_xy_dist ? config.xy_min_distance : config.xy_distance) + + (std::min(config.z_distance_top_layers, config.z_distance_bottom_layers) > 0 ? config.min_feature_size : 0); // The difference to ensure that the result not only conforms to wall_restriction, but collision/avoidance is done later. // The higher last_safe_step_movement_distance comes exactly from the fact that the collision will be subtracted later. - increased = - TreeSupportUtils::safeOffsetInc - ( - increased, - overspeed, - volumes_.getWallRestriction(config.getCollisionRadius(*parent), layer_idx, parent->use_min_xy_dist), - safe_movement_distance, - safe_movement_distance + radius, - 1, - config.support_line_distance / 2, - nullptr - ); + increased = TreeSupportUtils::safeOffsetInc( + increased, + overspeed, + volumes_.getWallRestriction(config.getCollisionRadius(*parent), layer_idx, parent->use_min_xy_dist), + safe_movement_distance, + safe_movement_distance + radius, + 1, + config.support_line_distance / 2, + nullptr); } if (settings.no_error && settings.move) { @@ -711,7 +704,8 @@ std::optional TreeSupport::increaseSingleArea } else { - to_model_data = TreeSupportUtils::safeUnion(increased.difference(volumes_.getAvoidance(radius, layer_idx - 1, AvoidanceType::COLLISION, true, settings.use_min_distance))); + to_model_data + = TreeSupportUtils::safeUnion(increased.difference(volumes_.getAvoidance(radius, layer_idx - 1, AvoidanceType::COLLISION, true, settings.use_min_distance))); } } } @@ -720,29 +714,35 @@ std::optional TreeSupport::increaseSingleArea if (settings.increase_radius && check_layer_data.area() > 1) { - std::function validWithRadius = - [&](coord_t next_radius) + std::function validWithRadius = [&](coord_t next_radius) + { + if (volumes_.ceilRadius(next_radius, settings.use_min_distance) <= volumes_.ceilRadius(radius, settings.use_min_distance)) { - if (volumes_.ceilRadius(next_radius, settings.use_min_distance) <= volumes_.ceilRadius(radius, settings.use_min_distance)) - { - return true; - } + return true; + } - Polygons to_bp_data_2; - if (current_elem.to_buildplate) - { - // Regular union as output will not be used later => this area should always be a subset of the safeUnion one. - to_bp_data_2 = increased.difference(volumes_.getAvoidance(next_radius, layer_idx - 1, settings.type, false, settings.use_min_distance)).unionPolygons(); - } - Polygons to_model_data_2; - if (config.support_rests_on_model && !current_elem.to_buildplate) - { - to_model_data_2 = increased.difference(volumes_.getAvoidance(next_radius, layer_idx - 1, current_elem.to_model_gracious? settings.type:AvoidanceType::COLLISION, true, settings.use_min_distance)).unionPolygons(); - } - Polygons check_layer_data_2 = current_elem.to_buildplate ? to_bp_data_2 : to_model_data_2; + Polygons to_bp_data_2; + if (current_elem.to_buildplate) + { + // Regular union as output will not be used later => this area should always be a subset of the safeUnion one. + to_bp_data_2 = increased.difference(volumes_.getAvoidance(next_radius, layer_idx - 1, settings.type, false, settings.use_min_distance)).unionPolygons(); + } + Polygons to_model_data_2; + if (config.support_rests_on_model && ! current_elem.to_buildplate) + { + to_model_data_2 = increased + .difference(volumes_.getAvoidance( + next_radius, + layer_idx - 1, + current_elem.to_model_gracious ? settings.type : AvoidanceType::COLLISION, + true, + settings.use_min_distance)) + .unionPolygons(); + } + Polygons check_layer_data_2 = current_elem.to_buildplate ? to_bp_data_2 : to_model_data_2; - return check_layer_data_2.area() > 1; - }; + return check_layer_data_2.area() > 1; + }; coord_t ceil_radius_before = volumes_.ceilRadius(radius, settings.use_min_distance); // If the Collision Radius is smaller than the actual radius, check if it can catch up without violating the avoidance. @@ -756,18 +756,15 @@ std::optional TreeSupport::increaseSingleArea current_ceil_radius = volumes_.getRadiusNextCeil(current_ceil_radius + 1, settings.use_min_distance); } size_t resulting_eff_dtt = current_elem.effective_radius_height; - while - ( - resulting_eff_dtt + 1 < current_elem.distance_to_top && - config.getRadius(resulting_eff_dtt + 1, current_elem.buildplate_radius_increases) <= current_ceil_radius && - config.getRadius(resulting_eff_dtt + 1, current_elem.buildplate_radius_increases) <= config.getRadius(current_elem) - ) + while (resulting_eff_dtt + 1 < current_elem.distance_to_top && config.getRadius(resulting_eff_dtt + 1, current_elem.buildplate_radius_increases) <= current_ceil_radius + && config.getRadius(resulting_eff_dtt + 1, current_elem.buildplate_radius_increases) <= config.getRadius(current_elem)) { resulting_eff_dtt++; } current_elem.effective_radius_height = resulting_eff_dtt; - // If catchup is not possible, it is likely that there is a hole below. Assuming the branches are in some kind of bowl, the branches should still stay away from the wall of the bowl if possible. + // If catchup is not possible, it is likely that there is a hole below. Assuming the branches are in some kind of bowl, the branches should still stay away from the + // wall of the bowl if possible. if (config.getCollisionRadius(current_elem) < config.increase_radius_until_radius && config.getCollisionRadius(current_elem) < config.getRadius(current_elem)) { Polygons new_to_bp_data; @@ -781,7 +778,7 @@ std::optional TreeSupport::increaseSingleArea to_bp_data = new_to_bp_data; } } - if (config.support_rests_on_model && (!current_elem.to_buildplate || mergelayer)) + if (config.support_rests_on_model && (! current_elem.to_buildplate || mergelayer)) { new_to_model_data = to_model_data.difference(volumes_.getCollision(config.getRadius(current_elem), layer_idx - 1, current_elem.use_min_xy_dist)); if (new_to_model_data.area() > EPSILON) @@ -790,21 +787,24 @@ std::optional TreeSupport::increaseSingleArea } } } - } radius = config.getCollisionRadius(current_elem); const coord_t foot_radius_increase = config.branch_radius * (std::max(config.diameter_scale_bp_radius - config.diameter_angle_scale_factor, 0.0)); const double planned_foot_increase = std::min(1.0, double(config.recommendedMinRadius(layer_idx - 1) - config.getRadius(current_elem)) / foot_radius_increase); - // ^^^ Is nearly all of the time 1, but sometimes an increase of 1 could cause the radius to become bigger than recommendedMinRadius, which could cause the radius to become bigger than precalculated. + // ^^^ Is nearly all of the time 1, but sometimes an increase of 1 could cause the radius to become bigger than recommendedMinRadius, which could cause the radius to become + // bigger than precalculated. - // If the support_rest_preference is GRACEFUL, increase buildplate_radius_increases anyway. This does ONLY affect the CollisionRadius, as the regular radius only includes the buildplate_radius_increases when the SupportElement is to_buildplate (which it can not be when support_rest_preference is GRACEFUL). - // If the branch later rests on the buildplate the to_buildplate flag will only need to be updated to ensure that the radius is also correctly increased. - // Downside is that the enlargement of the CollisionRadius can cause branches, that could rest on the model if the radius was not increased, to instead rest on the buildplate. - // A better way could be changing avoidance to model to not include the buildplate and then calculate avoidances by combining the to model avoidance without the radius increase with the to buildplate avoidance with the larger radius. - // This would require ensuring all requests for the avoidance would have to ensure that the correct hybrid avoidance is requested (which would only be relevant when support_rest_preference is GRACEFUL) - // Also unioning areas when an avoidance is requested may also have a relevant performance impact, so there can be an argument made that the current workaround is preferable. - const bool increase_bp_foot = planned_foot_increase > 0 && (current_elem.to_buildplate || (current_elem.to_model_gracious && config.support_rest_preference == RestPreference::GRACEFUL)); + // If the support_rest_preference is GRACEFUL, increase buildplate_radius_increases anyway. This does ONLY affect the CollisionRadius, as the regular radius only includes + // the buildplate_radius_increases when the SupportElement is to_buildplate (which it can not be when support_rest_preference is GRACEFUL). If the branch later rests on the + // buildplate the to_buildplate flag will only need to be updated to ensure that the radius is also correctly increased. Downside is that the enlargement of the + // CollisionRadius can cause branches, that could rest on the model if the radius was not increased, to instead rest on the buildplate. A better way could be changing + // avoidance to model to not include the buildplate and then calculate avoidances by combining the to model avoidance without the radius increase with the to buildplate + // avoidance with the larger radius. This would require ensuring all requests for the avoidance would have to ensure that the correct hybrid avoidance is requested (which + // would only be relevant when support_rest_preference is GRACEFUL) Also unioning areas when an avoidance is requested may also have a relevant performance impact, so there + // can be an argument made that the current workaround is preferable. + const bool increase_bp_foot + = planned_foot_increase > 0 && (current_elem.to_buildplate || (current_elem.to_model_gracious && config.support_rest_preference == RestPreference::GRACEFUL)); if (increase_bp_foot && config.getRadius(current_elem) >= config.branch_radius && config.getRadius(current_elem) >= config.increase_radius_until_radius) @@ -822,26 +822,30 @@ std::optional TreeSupport::increaseSingleArea { to_bp_data = TreeSupportUtils::safeUnion(increased.difference(volumes_.getAvoidance(radius, layer_idx - 1, settings.type, false, settings.use_min_distance))); } - if (config.support_rests_on_model && (!current_elem.to_buildplate || mergelayer)) + if (config.support_rests_on_model && (! current_elem.to_buildplate || mergelayer)) { - to_model_data = TreeSupportUtils::safeUnion(increased.difference(volumes_.getAvoidance(radius, layer_idx - 1, current_elem.to_model_gracious? settings.type:AvoidanceType::COLLISION, true, settings.use_min_distance))); + to_model_data = TreeSupportUtils::safeUnion(increased.difference( + volumes_.getAvoidance(radius, layer_idx - 1, current_elem.to_model_gracious ? settings.type : AvoidanceType::COLLISION, true, settings.use_min_distance))); } check_layer_data = current_elem.to_buildplate ? to_bp_data : to_model_data; if (check_layer_data.area() < 1) { - spdlog::error("Lost area by doing catch up from {} to radius {}", ceil_radius_before, volumes_.ceilRadius(config.getCollisionRadius(current_elem), settings.use_min_distance)); + spdlog::error( + "Lost area by doing catch up from {} to radius {}", + ceil_radius_before, + volumes_.ceilRadius(config.getCollisionRadius(current_elem), settings.use_min_distance)); } } } - if (current_elem.influence_area_limit_active && !current_elem.use_min_xy_dist && check_layer_data.area() > 1 && (current_elem.to_model_gracious || current_elem.distance_to_top <= config.min_dtt_to_model)) + if (current_elem.influence_area_limit_active && ! current_elem.use_min_xy_dist && check_layer_data.area() > 1 + && (current_elem.to_model_gracious || current_elem.distance_to_top <= config.min_dtt_to_model)) { - const coord_t max_radius_increase = - std::max - ( - static_cast((config.branch_radius - config.min_radius) / config.tip_layers), - static_cast((config.branch_radius * config.diameter_angle_scale_factor) + config.branch_radius * (std::max(config.diameter_scale_bp_radius - config.diameter_angle_scale_factor, 0.0))) - ); + const coord_t max_radius_increase = std::max( + static_cast((config.branch_radius - config.min_radius) / config.tip_layers), + static_cast( + (config.branch_radius * config.diameter_angle_scale_factor) + + config.branch_radius * (std::max(config.diameter_scale_bp_radius - config.diameter_angle_scale_factor, 0.0)))); bool limit_range_validated = false; // Rounding errors in a while loop can cause non-termination, so better safe than sorry. See https://github.com/Ultimaker/Cura/issues/14133 for an example. to_bp_data = TreeSupportUtils::safeUnion(to_bp_data); @@ -868,7 +872,7 @@ std::optional TreeSupport::increaseSingleArea limit_range_validated = true; } } - if (!limit_range_validated) + if (! limit_range_validated) { const coord_t reach_increase = std::max(current_elem.influence_area_limit_range / 4, (config.maximum_move_distance + max_radius_increase)); current_elem.influence_area_limit_range += reach_increase; @@ -880,19 +884,17 @@ std::optional TreeSupport::increaseSingleArea return check_layer_data.area() > 1 ? std::optional(current_elem) : std::optional(); } -void TreeSupport::increaseAreas -( +void TreeSupport::increaseAreas( PropertyAreasUnordered& to_bp_areas, PropertyAreas& to_model_areas, PropertyAreas& influence_areas, std::vector& bypass_merge_areas, const std::vector& last_layer, - const LayerIndex layer_idx, const bool mergelayer -) + const LayerIndex layer_idx, + const bool mergelayer) { std::mutex critical_sections; - cura::parallel_for - ( + cura::parallel_for( 0, last_layer.size(), [&](const size_t idx) @@ -912,25 +914,28 @@ void TreeSupport::increaseAreas // As the branch may have become larger the distance between these 2 walls is smaller than the distance of the center points. // These extra distance is added to the movement distance possible for this layer. - coord_t extra_speed = EPSILON; // The extra speed is added to both movement distances. Also move 5 microns faster than allowed to avoid rounding errors, this may cause issues at VERY VERY small layer heights. + coord_t extra_speed = EPSILON; // The extra speed is added to both movement distances. Also move 5 microns faster than allowed to avoid rounding errors, this may cause + // issues at VERY VERY small layer heights. coord_t extra_slow_speed = 0; // Only added to the slow movement distance. const coord_t ceiled_parent_radius = volumes_.ceilRadius(config.getCollisionRadius(*parent), parent->use_min_xy_dist); const coord_t projected_radius_increased = config.getRadius(parent->effective_radius_height + 1, parent->buildplate_radius_increases); const coord_t projected_radius_delta = projected_radius_increased - config.getCollisionRadius(*parent); - // When z distance is more than one layer up and down the Collision used to calculate the wall restriction will always include the wall (and not just the xy_min_distance) of the layer above and below like this (d = blocked area because of z distance): + // When z distance is more than one layer up and down the Collision used to calculate the wall restriction will always include the wall (and not just the + // xy_min_distance) of the layer above and below like this (d = blocked area because of z distance): /* * layer z+1:dddddiiiiiioooo * layer z+0:xxxxxdddddddddd * layer z-1:dddddxxxxxxxxxx * For more detailed visualisation see calculateWallRestrictions */ - const coord_t safe_movement_distance = - (elem.use_min_xy_dist ? config.xy_min_distance : config.xy_distance) + - (std::min(config.z_distance_top_layers, config.z_distance_bottom_layers) > 0 ? config.min_feature_size : 0); - if (ceiled_parent_radius == volumes_.ceilRadius(projected_radius_increased, parent->use_min_xy_dist) || projected_radius_increased < config.increase_radius_until_radius) + const coord_t safe_movement_distance = (elem.use_min_xy_dist ? config.xy_min_distance : config.xy_distance) + + (std::min(config.z_distance_top_layers, config.z_distance_bottom_layers) > 0 ? config.min_feature_size : 0); + if (ceiled_parent_radius == volumes_.ceilRadius(projected_radius_increased, parent->use_min_xy_dist) + || projected_radius_increased < config.increase_radius_until_radius) { - // If it is guaranteed possible to increase the radius, the maximum movement speed can be increased, as it is assumed that the maximum movement speed is the one of the slower moving wall + // If it is guaranteed possible to increase the radius, the maximum movement speed can be increased, as it is assumed that the maximum movement speed is the one of + // the slower moving wall extra_speed += projected_radius_delta; } else @@ -940,16 +945,20 @@ void TreeSupport::increaseAreas extra_slow_speed += std::min(projected_radius_delta, (config.maximum_move_distance + extra_speed) - (config.maximum_move_distance_slow + extra_slow_speed)); } - if (config.layer_start_bp_radius > layer_idx && config.recommendedMinRadius(layer_idx - 1) < config.getRadius(elem.effective_radius_height + 1, elem.buildplate_radius_increases)) + if (config.layer_start_bp_radius > layer_idx + && config.recommendedMinRadius(layer_idx - 1) < config.getRadius(elem.effective_radius_height + 1, elem.buildplate_radius_increases)) { // Can guarantee elephant foot radius increase. - if (ceiled_parent_radius == volumes_.ceilRadius(config.getRadius(parent->effective_radius_height + 1, parent->buildplate_radius_increases + 1), parent->use_min_xy_dist)) + if (ceiled_parent_radius + == volumes_.ceilRadius(config.getRadius(parent->effective_radius_height + 1, parent->buildplate_radius_increases + 1), parent->use_min_xy_dist)) { extra_speed += config.branch_radius * config.diameter_scale_bp_radius; } else { - extra_slow_speed += std::min(coord_t(config.branch_radius * config.diameter_scale_bp_radius), config.maximum_move_distance - (config.maximum_move_distance_slow + extra_slow_speed)); + extra_slow_speed += std::min( + coord_t(config.branch_radius * config.diameter_scale_bp_radius), + config.maximum_move_distance - (config.maximum_move_distance_slow + extra_slow_speed)); } } @@ -970,60 +979,70 @@ void TreeSupport::increaseAreas // Determine in which order configurations are checked if they result in a valid influence area. Check will stop if a valid area is found std::deque order; - std::function insertSetting = - [&](const AreaIncreaseSettings& settings, bool back) + std::function insertSetting = [&](const AreaIncreaseSettings& settings, bool back) + { + if (std::find(order.begin(), order.end(), settings) == order.end()) { - if (std::find(order.begin(), order.end(), settings) == order.end()) + if (back) { - if (back) - { - order.emplace_back(settings); - } - else - { - order.emplace_front(settings); - } + order.emplace_back(settings); } - }; + else + { + order.emplace_front(settings); + } + } + }; const bool parent_moved_slow = elem.last_area_increase.increase_speed < config.maximum_move_distance; const bool avoidance_speed_mismatch = parent_moved_slow && elem.last_area_increase.type != AvoidanceType::SLOW; - if - ( - elem.last_area_increase.move && - elem.last_area_increase.no_error && - elem.can_use_safe_radius && - ! mergelayer && - ! avoidance_speed_mismatch && - (elem.distance_to_top >= config.tip_layers || parent_moved_slow) - ) + if (elem.last_area_increase.move && elem.last_area_increase.no_error && elem.can_use_safe_radius && ! mergelayer && ! avoidance_speed_mismatch + && (elem.distance_to_top >= config.tip_layers || parent_moved_slow)) { // Assume that the avoidance type that was best for the parent is best for me. Makes this function about 7% faster. const auto slow_or_fast = elem.last_area_increase.increase_speed < config.maximum_move_distance ? slow_speed : fast_speed; - insertSetting(AreaIncreaseSettings(elem.last_area_increase.type, slow_or_fast, increase_radius, elem.last_area_increase.no_error, ! use_min_radius, elem.last_area_increase.move), true); - insertSetting(AreaIncreaseSettings(elem.last_area_increase.type, slow_or_fast, ! increase_radius, elem.last_area_increase.no_error, ! use_min_radius, elem.last_area_increase.move), true); + insertSetting( + AreaIncreaseSettings( + elem.last_area_increase.type, + slow_or_fast, + increase_radius, + elem.last_area_increase.no_error, + ! use_min_radius, + elem.last_area_increase.move), + true); + insertSetting( + AreaIncreaseSettings( + elem.last_area_increase.type, + slow_or_fast, + ! increase_radius, + elem.last_area_increase.no_error, + ! use_min_radius, + elem.last_area_increase.move), + true); } // Branch may still go though a hole, so a check has to be done whether the hole was already passed, and the regular avoidance can be used. if (! elem.can_use_safe_radius) { // If the radius until which it is always increased can not be guaranteed, move fast. This is to avoid holes smaller than the real branch radius. // This does not guarantee the avoidance of such holes, but ensures they are avoided if possible. - insertSetting(AreaIncreaseSettings(AvoidanceType::SLOW, slow_speed, increase_radius, no_error, ! use_min_radius, !move), true); // Did we go through the hole. + insertSetting(AreaIncreaseSettings(AvoidanceType::SLOW, slow_speed, increase_radius, no_error, ! use_min_radius, ! move), true); // Did we go through the hole. // In many cases the definition of hole is overly restrictive, so to avoid unnecessary fast movement in the tip, it is ignored there for a bit. // This CAN cause a branch to go though a hole it otherwise may have avoided. if (elem.distance_to_top < round_up_divide(config.tip_layers, 2)) { - insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, slow_speed, increase_radius, no_error, ! use_min_radius, !move), true); + insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, slow_speed, increase_radius, no_error, ! use_min_radius, ! move), true); } - insertSetting(AreaIncreaseSettings(AvoidanceType::FAST_SAFE, fast_speed, increase_radius, no_error, ! use_min_radius, !move), true); // Did we manage to avoid the hole, - insertSetting(AreaIncreaseSettings(AvoidanceType::FAST_SAFE, fast_speed, !increase_radius, no_error, ! use_min_radius, move), true); - insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, fast_speed, !increase_radius, no_error, ! use_min_radius, move), true); + insertSetting( + AreaIncreaseSettings(AvoidanceType::FAST_SAFE, fast_speed, increase_radius, no_error, ! use_min_radius, ! move), + true); // Did we manage to avoid the hole, + insertSetting(AreaIncreaseSettings(AvoidanceType::FAST_SAFE, fast_speed, ! increase_radius, no_error, ! use_min_radius, move), true); + insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, fast_speed, ! increase_radius, no_error, ! use_min_radius, move), true); } else { insertSetting(AreaIncreaseSettings(AvoidanceType::SLOW, slow_speed, increase_radius, no_error, ! use_min_radius, move), true); - // While moving fast to be able to increase the radius (b) may seems preferable (over a) this can cause the a sudden skip in movement, which looks similar to a layer shift and can reduce stability. - // As such idx have chosen to only use the user setting for radius increases as a friendly recommendation. + // While moving fast to be able to increase the radius (b) may seems preferable (over a) this can cause the a sudden skip in movement, which looks similar to a + // layer shift and can reduce stability. As such idx have chosen to only use the user setting for radius increases as a friendly recommendation. insertSetting(AreaIncreaseSettings(AvoidanceType::SLOW, slow_speed, ! increase_radius, no_error, ! use_min_radius, move), true); // a (See above.) if (elem.distance_to_top < config.tip_layers) { @@ -1046,43 +1065,48 @@ void TreeSupport::increaseAreas order = new_order; } - insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, fast_speed, !increase_radius, !no_error, elem.use_min_xy_dist, move), true); //simplifying is very important for performance, but before an error is compensated by moving faster it makes sense to check to see if the simplifying has caused issues + insertSetting( + AreaIncreaseSettings(AvoidanceType::FAST, fast_speed, ! increase_radius, ! no_error, elem.use_min_xy_dist, move), + true); // simplifying is very important for performance, but before an error is compensated by moving faster it makes sense to check to see if the simplifying has + // caused issues // The getAccumulatedPlaceable0 intersection is just a quick and dirty check to see that at least a part of the branch would correctly rest on the model. - // Proper way would be to offset getAccumulatedPlaceable0 by -radius first, but the small benefit to maybe detect an error, that should not be happening anyway is not worth the performance impact in the expected case when a branch rests on the model. - if (elem.to_buildplate || (elem.to_model_gracious && (parent->area->intersection(volumes_.getPlaceableAreas(radius, layer_idx)).empty())) || (!elem.to_model_gracious && (parent->area->intersection(volumes_.getAccumulatedPlaceable0(layer_idx)).empty())) ) // Error case. + // Proper way would be to offset getAccumulatedPlaceable0 by -radius first, but the small benefit to maybe detect an error, that should not be happening anyway is not + // worth the performance impact in the expected case when a branch rests on the model. + if (elem.to_buildplate || (elem.to_model_gracious && (parent->area->intersection(volumes_.getPlaceableAreas(radius, layer_idx)).empty())) + || (! elem.to_model_gracious && (parent->area->intersection(volumes_.getAccumulatedPlaceable0(layer_idx)).empty()))) // Error case. { // It is normal that we won't be able to find a new area at some point in time if we won't be able to reach layer 0 aka have to connect with the model. - insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, fast_speed * 1.5, !increase_radius, !no_error, elem.use_min_xy_dist, move), true); + insertSetting(AreaIncreaseSettings(AvoidanceType::FAST, fast_speed * 1.5, ! increase_radius, ! no_error, elem.use_min_xy_dist, move), true); } if (elem.distance_to_top < elem.dont_move_until && elem.can_use_safe_radius) // Only do not move when holes would be avoided in every case. { - insertSetting(AreaIncreaseSettings(AvoidanceType::SLOW, 0, increase_radius, no_error, !use_min_radius, !move), false); // Only do not move when already in a no hole avoidance with the regular xy distance. + insertSetting( + AreaIncreaseSettings(AvoidanceType::SLOW, 0, increase_radius, no_error, ! use_min_radius, ! move), + false); // Only do not move when already in a no hole avoidance with the regular xy distance. } Polygons inc_wo_collision; - // Check whether it is faster to calculate the area increased with the fast speed independently from the slow area, or time could be saved by reusing the slow area to calculate the fast one. - // Calculated by comparing the steps saved when calculating independently with the saved steps when not. - const bool offset_independent_faster = - (radius / safe_movement_distance - (((config.maximum_move_distance + extra_speed) < (radius + safe_movement_distance)) ? 1 : 0)) > - (round_up_divide((extra_speed + extra_slow_speed + config.maximum_move_distance_slow), safe_movement_distance)); + // Check whether it is faster to calculate the area increased with the fast speed independently from the slow area, or time could be saved by reusing the slow area to + // calculate the fast one. Calculated by comparing the steps saved when calculating independently with the saved steps when not. + const bool offset_independent_faster = (radius / safe_movement_distance - (((config.maximum_move_distance + extra_speed) < (radius + safe_movement_distance)) ? 1 : 0)) + > (round_up_divide((extra_speed + extra_slow_speed + config.maximum_move_distance_slow), safe_movement_distance)); for (AreaIncreaseSettings settings : order) { if (settings.move) { if (offset_slow.empty() && (settings.increase_speed == slow_speed || ! offset_independent_faster)) { - offset_slow = - TreeSupportUtils::safeOffsetInc - ( - *parent->area, - extra_speed + extra_slow_speed + config.maximum_move_distance_slow, - wall_restriction, - safe_movement_distance, offset_independent_faster ? safe_movement_distance + radius : 0, - 2, // Offsetting in 2 steps makes our offsetted area rounder preventing (rounding) errors created by to pointy areas. - config.support_line_distance / 2, - &config.simplifier - ).unionPolygons(); + offset_slow = TreeSupportUtils::safeOffsetInc( + *parent->area, + extra_speed + extra_slow_speed + config.maximum_move_distance_slow, + wall_restriction, + safe_movement_distance, + offset_independent_faster ? safe_movement_distance + radius : 0, + 2, // Offsetting in 2 steps makes our offsetted area rounder preventing (rounding) errors created by to pointy areas. + config.support_line_distance / 2, + &config.simplifier) + .unionPolygons(); // At this point one can see that the Polygons class was never made for precision in the single digit micron range. } @@ -1090,22 +1114,30 @@ void TreeSupport::increaseAreas { if (offset_independent_faster) { - offset_fast = - TreeSupportUtils::safeOffsetInc - ( - *parent->area, - extra_speed + config.maximum_move_distance, - wall_restriction, - safe_movement_distance, offset_independent_faster ? safe_movement_distance + radius : 0, - 1, - config.support_line_distance / 2, - &config.simplifier - ).unionPolygons(); + offset_fast = TreeSupportUtils::safeOffsetInc( + *parent->area, + extra_speed + config.maximum_move_distance, + wall_restriction, + safe_movement_distance, + offset_independent_faster ? safe_movement_distance + radius : 0, + 1, + config.support_line_distance / 2, + &config.simplifier) + .unionPolygons(); } else { const coord_t delta_slow_fast = config.maximum_move_distance - (config.maximum_move_distance_slow + extra_slow_speed); - offset_fast = TreeSupportUtils::safeOffsetInc(offset_slow, delta_slow_fast, wall_restriction, safe_movement_distance, safe_movement_distance + radius, offset_independent_faster ? 2 : 1, config.support_line_distance / 2, &config.simplifier).unionPolygons(); + offset_fast = TreeSupportUtils::safeOffsetInc( + offset_slow, + delta_slow_fast, + wall_restriction, + safe_movement_distance, + safe_movement_distance + radius, + offset_independent_faster ? 2 : 1, + config.support_line_distance / 2, + &config.simplifier) + .unionPolygons(); } } } @@ -1114,20 +1146,22 @@ void TreeSupport::increaseAreas // Check for errors! if (! settings.no_error) { - - // If the area becomes for whatever reason something that clipper sees as a line, offset would stop working, so ensure that even if if wrongly would be a line, it still actually has an area that can be increased + // If the area becomes for whatever reason something that clipper sees as a line, offset would stop working, so ensure that even if if wrongly would be a line, + // it still actually has an area that can be increased Polygons lines_offset = TreeSupportUtils::toPolylines(*parent->area).offsetPolyLine(EPSILON); Polygons base_error_area = parent->area->unionPolygons(lines_offset); result = increaseSingleArea(settings, layer_idx, parent, base_error_area, to_bp_data, to_model_data, inc_wo_collision, settings.increase_speed, mergelayer); - if(fast_speed < settings.increase_speed) + if (fast_speed < settings.increase_speed) { - spdlog::warn - ( + spdlog::warn( "Influence area could not be increased! Data about the Influence area: " - "Radius: {} at layer: {} NextTarget: {} Distance to top: {} Elephant foot increases {} use_min_xy_dist {} to buildplate {} gracious {} safe {} until move {} \n " - "Parent {}: Radius: {} at layer: {} NextTarget: {} Distance to top: {} Elephant foot increases {} use_min_xy_dist {} to buildplate {} gracious {} safe {} until move {}", - radius, layer_idx - 1, + "Radius: {} at layer: {} NextTarget: {} Distance to top: {} Elephant foot increases {} use_min_xy_dist {} to buildplate {} gracious {} safe {} until " + "move {} \n " + "Parent {}: Radius: {} at layer: {} NextTarget: {} Distance to top: {} Elephant foot increases {} use_min_xy_dist {} to buildplate {} gracious {} " + "safe {} until move {}", + radius, + layer_idx - 1, elem.next_height, elem.distance_to_top, elem.buildplate_radius_increases, @@ -1138,20 +1172,29 @@ void TreeSupport::increaseAreas elem.dont_move_until, fmt::ptr(parent), config.getCollisionRadius(*parent), - layer_idx, parent->next_height, + layer_idx, + parent->next_height, parent->distance_to_top, parent->buildplate_radius_increases, parent->use_min_xy_dist, parent->to_buildplate, parent->to_model_gracious, parent->can_use_safe_radius, - parent->dont_move_until - ); + parent->dont_move_until); } } else { - result = increaseSingleArea(settings, layer_idx, parent, settings.increase_speed == slow_speed ? offset_slow : offset_fast, to_bp_data, to_model_data, inc_wo_collision, std::max(settings.increase_speed-fast_speed,coord_t(0)), mergelayer); + result = increaseSingleArea( + settings, + layer_idx, + parent, + settings.increase_speed == slow_speed ? offset_slow : offset_fast, + to_bp_data, + to_model_data, + inc_wo_collision, + std::max(settings.increase_speed - fast_speed, coord_t(0)), + mergelayer); } if (result) @@ -1160,7 +1203,10 @@ void TreeSupport::increaseAreas radius = config.getCollisionRadius(elem); elem.last_area_increase = settings; add = true; - bypass_merge = ! settings.move || (settings.use_min_distance && elem.distance_to_top < config.tip_layers); // Do not merge if the branch should not move or the priority has to be to get farther away from the model. + bypass_merge + = ! settings.move + || (settings.use_min_distance + && elem.distance_to_top < config.tip_layers); // Do not merge if the branch should not move or the priority has to be to get farther away from the model. if (settings.move) { elem.dont_move_until = 0; @@ -1190,7 +1236,9 @@ void TreeSupport::increaseAreas if (add) { - Polygons max_influence_area = TreeSupportUtils::safeUnion(inc_wo_collision.difference(volumes_.getCollision(radius, layer_idx - 1, elem.use_min_xy_dist)), TreeSupportUtils::safeUnion(to_bp_data, to_model_data)); + Polygons max_influence_area = TreeSupportUtils::safeUnion( + inc_wo_collision.difference(volumes_.getCollision(radius, layer_idx - 1, elem.use_min_xy_dist)), + TreeSupportUtils::safeUnion(to_bp_data, to_model_data)); // ^^^ Note: union seems useless, but some rounding errors somewhere can cause to_bp_data to be slightly bigger than it should be { @@ -1222,8 +1270,7 @@ void TreeSupport::increaseAreas // A point can be set on the top most tip layer (maybe more if it should not move for a few layers). parent->result_on_layer = Point(-1, -1); } - } - ); + }); } void TreeSupport::createLayerPathing(std::vector>& move_bounds) @@ -1241,7 +1288,9 @@ void TreeSupport::createLayerPathing(std::vector>& bool new_element = false; // Ensure at least one merge operation per 3mm height, 50 layers, 1 mm movement of slow speed or 5mm movement of fast speed (whatever is lowest). Values were guessed. - size_t max_merge_every_x_layers = std::min(std::min(5000 / (std::max(config.maximum_move_distance, static_cast(100))), 1000 / std::max(config.maximum_move_distance_slow, static_cast(20))), 3000 / config.layer_height); + size_t max_merge_every_x_layers = std::min( + std::min(5000 / (std::max(config.maximum_move_distance, static_cast(100))), 1000 / std::max(config.maximum_move_distance_slow, static_cast(20))), + 3000 / config.layer_height); size_t merge_every_x_layers = 1; // Calculate the influence areas for each layer below (Top down) @@ -1259,7 +1308,8 @@ void TreeSupport::createLayerPathing(std::vector>& PropertyAreas influence_areas; // Over this map will be iterated when merging, as such it has to be ordered to ensure deterministic results. PropertyAreas to_model_areas; // The area of these SupportElement is not set, to avoid to much allocation and deallocation on the heap. PropertyAreasUnordered to_bp_areas; // Same. - std::vector bypass_merge_areas; // Different to the other maps of SupportElements as these here have the area already set, as they are already to be inserted into move_bounds. + std::vector + bypass_merge_areas; // Different to the other maps of SupportElements as these here have the area already set, as they are already to be inserted into move_bounds. const auto time_a = std::chrono::high_resolution_clock::now(); @@ -1279,7 +1329,7 @@ void TreeSupport::createLayerPathing(std::vector>& last_merge = layer_idx; reduced_by_merging = count_before_merge > influence_areas.size(); - if (! reduced_by_merging && !new_element) + if (! reduced_by_merging && ! new_element) { merge_every_x_layers = std::min(max_merge_every_x_layers, merge_every_x_layers + 1); } @@ -1334,16 +1384,21 @@ void TreeSupport::setPointsOnAreas(const TreeSupportElement* elem) for (TreeSupportElement* next_elem : elem->parents) { - if (next_elem->result_on_layer != Point(-1, -1)) // If the value was set somewhere else it it kept. This happens when a branch tries not to move after being unable to create a roof. + if (next_elem->result_on_layer + != Point(-1, -1)) // If the value was set somewhere else it it kept. This happens when a branch tries not to move after being unable to create a roof. { continue; } Point from = elem->result_on_layer; - if (!(next_elem->area->inside(from, true))) + if (! (next_elem->area->inside(from, true))) { - PolygonUtils::moveInside(*next_elem->area, from, 0); // Move inside has edgecases (see tests) so DONT use Polygons.inside to confirm correct move, Error with distance 0 is <= 1 - // It is not required to check if how far this move moved a point as is can be larger than maximum_movement_distance. While this seems like a problem it may for example occur after merges. + PolygonUtils::moveInside( + *next_elem->area, + from, + 0); // Move inside has edgecases (see tests) so DONT use Polygons.inside to confirm correct move, Error with distance 0 is <= 1 + // It is not required to check if how far this move moved a point as is can be larger than maximum_movement_distance. While this seems like a problem it may for example + // occur after merges. } next_elem->result_on_layer = from; // Do not call recursive because then amount of layers would be restricted by the stack size. @@ -1367,7 +1422,8 @@ bool TreeSupport::setToModelContact(std::vector>& Polygons valid_place_area; - // Check for every layer upwards, up to the point where this influence area was created (either by initial insert or merge) if the branch could be placed on it, and highest up layer index. + // Check for every layer upwards, up to the point where this influence area was created (either by initial insert or merge) if the branch could be placed on it, and highest + // up layer index. for (LayerIndex layer_check = layer_idx; check->next_height >= layer_check; layer_check++) { Polygons check_valid_place_area = check->area->intersection(volumes_.getPlaceableAreas(config.getCollisionRadius(*check), layer_check)); @@ -1411,7 +1467,8 @@ bool TreeSupport::setToModelContact(std::vector>& } } - for (LayerIndex layer = layer_idx + 1; layer < last_successfull_layer - 1; ++layer) // NOTE: Use of 'itoa' will make this crash in the loop, even though the operation should be equivalent. + for (LayerIndex layer = layer_idx + 1; layer < last_successfull_layer - 1; + ++layer) // NOTE: Use of 'itoa' will make this crash in the loop, even though the operation should be equivalent. { move_bounds[layer].erase(checked[layer - layer_idx]); delete checked[layer - layer_idx]->area; @@ -1440,29 +1497,36 @@ bool TreeSupport::setToModelContact(std::vector>& else // can not add graceful => just place it here and hope for the best { Point best = first_elem->next_position; - Polygons valid_place_area = first_elem->area->difference(volumes_.getAvoidance(config.getCollisionRadius(first_elem), layer_idx, AvoidanceType::COLLISION, first_elem->use_min_xy_dist)); + Polygons valid_place_area + = first_elem->area->difference(volumes_.getAvoidance(config.getCollisionRadius(first_elem), layer_idx, AvoidanceType::COLLISION, first_elem->use_min_xy_dist)); - if (!valid_place_area.inside(best, true)) + if (! valid_place_area.inside(best, true)) { - if (!valid_place_area.empty()) + if (! valid_place_area.empty()) { PolygonUtils::moveInside(valid_place_area, best); } else { bool found_partial_placement; - for (coord_t radius_offset : { -config.getCollisionRadius(first_elem), -config.getCollisionRadius(first_elem) / 2, coord_t(0) }) // Interestingly the first radius is working most of the time, even though it seems like it shouldn't. + for (coord_t radius_offset : { -config.getCollisionRadius(first_elem), + -config.getCollisionRadius(first_elem) / 2, + coord_t(0) }) // Interestingly the first radius is working most of the time, even though it seems like it shouldn't. { valid_place_area = first_elem->area->intersection(volumes_.getAccumulatedPlaceable0(layer_idx).offset(radius_offset)); - if (!valid_place_area.empty()) + if (! valid_place_area.empty()) { PolygonUtils::moveInside(valid_place_area, best); - spdlog::warn("Not able to place branch fully on non support blocker at layer {} using offset {} for radius {}", layer_idx, radius_offset, config.getCollisionRadius(first_elem)); + spdlog::warn( + "Not able to place branch fully on non support blocker at layer {} using offset {} for radius {}", + layer_idx, + radius_offset, + config.getCollisionRadius(first_elem)); found_partial_placement = true; break; } } - if (!found_partial_placement) + if (! found_partial_placement) { PolygonUtils::moveInside(*first_elem->area, best); spdlog::warn("Not able to place branch on non support blocker at layer {}", layer_idx); @@ -1478,7 +1542,8 @@ bool TreeSupport::setToModelContact(std::vector>& void TreeSupport::createNodesFromArea(std::vector>& move_bounds) { - // Initialize points on layer 0, with a "random" point in the influence area. Point is chosen based on an inaccurate estimate where the branches will split into two, but every point inside the influence area would produce a valid result. + // Initialize points on layer 0, with a "random" point in the influence area. Point is chosen based on an inaccurate estimate where the branches will split into two, but every + // point inside the influence area would produce a valid result. std::unordered_set remove; for (TreeSupportElement* init : move_bounds[0]) { @@ -1499,7 +1564,8 @@ void TreeSupport::createNodesFromArea(std::vector> } else { - // If the support_rest_preference is GRACEFUL the collision radius is increased, but the radius will only be increased if the element is to_buildplate, so if the branch rests on the buildplate, the element will have to be updated to include this information. + // If the support_rest_preference is GRACEFUL the collision radius is increased, but the radius will only be increased if the element is to_buildplate, so if the + // branch rests on the buildplate, the element will have to be updated to include this information. init->setToBuildplateForAllParents(true); } } @@ -1520,17 +1586,23 @@ void TreeSupport::createNodesFromArea(std::vector> bool removed = false; if (elem->result_on_layer == Point(-1, -1)) // Check if the resulting center point is not yet set. { - if (elem->to_buildplate || (!elem->to_buildplate && elem->distance_to_top < config.min_dtt_to_model && !elem->supports_roof)) + if (elem->to_buildplate || (! elem->to_buildplate && elem->distance_to_top < config.min_dtt_to_model && ! elem->supports_roof)) { if (elem->to_buildplate) { - spdlog::error("Uninitialized Influence area targeting ({},{}) at target_height: {} layer: {}", elem->target_position.X, elem->target_position.Y, elem->target_height, layer_idx); + spdlog::error( + "Uninitialized Influence area targeting ({},{}) at target_height: {} layer: {}", + elem->target_position.X, + elem->target_position.Y, + elem->target_height, + layer_idx); } remove.emplace(elem); // We dont need to remove yet the parents as they will have a lower dtt and also no result_on_layer set. removed = true; for (TreeSupportElement* parent : elem->parents) { - // When the roof was not able to generate downwards enough, the top elements may have not moved, and have result_on_layer already set. As this branch needs to be removed => all parents result_on_layer have to be invalidated. + // When the roof was not able to generate downwards enough, the top elements may have not moved, and have result_on_layer already set. As this branch needs + // to be removed => all parents result_on_layer have to be invalidated. parent->result_on_layer = Point(-1, -1); } continue; @@ -1546,7 +1618,7 @@ void TreeSupport::createNodesFromArea(std::vector> } } - if (!removed) + if (! removed) { setPointsOnAreas(elem); // Element is valid now setting points in the layer above. } @@ -1563,7 +1635,10 @@ void TreeSupport::createNodesFromArea(std::vector> } } -void TreeSupport::generateBranchAreas(std::vector>& linear_data, std::vector>& layer_tree_polygons, const std::map& inverse_tree_order) +void TreeSupport::generateBranchAreas( + std::vector>& linear_data, + std::vector>& layer_tree_polygons, + const std::map& inverse_tree_order) { double progress_total = TREE_PROGRESS_PRECALC_AVO + TREE_PROGRESS_PRECALC_COLL + TREE_PROGRESS_GENERATE_NODES + TREE_PROGRESS_AREA_CALC; constexpr int progress_report_steps = 10; @@ -1582,136 +1657,135 @@ void TreeSupport::generateBranchAreas(std::vector - ( - 0, - linear_data.size(), - [&](const size_t idx) - { - TreeSupportElement* elem = linear_data[idx].second; - coord_t radius = config.getRadius(*elem); - bool parent_uses_min = false; - TreeSupportElement* child_elem = inverse_tree_order.count(elem) ? inverse_tree_order.at(elem) : nullptr; + cura::parallel_for( + 0, + linear_data.size(), + [&](const size_t idx) + { + TreeSupportElement* elem = linear_data[idx].second; + coord_t radius = config.getRadius(*elem); + bool parent_uses_min = false; + TreeSupportElement* child_elem = inverse_tree_order.count(elem) ? inverse_tree_order.at(elem) : nullptr; - // Calculate multiple ovalized circles, to connect with every parent and child. Also generate regular circle for the current layer. Merge all these into one area. - std::vector> movement_directions{ std::pair(Point(0, 0), radius) }; - if (! elem->skip_ovalisation) + // Calculate multiple ovalized circles, to connect with every parent and child. Also generate regular circle for the current layer. Merge all these into one area. + std::vector> movement_directions{ std::pair(Point(0, 0), radius) }; + if (! elem->skip_ovalisation) + { + if (child_elem != nullptr) { - if (child_elem != nullptr) - { - Point movement = (child_elem->result_on_layer - elem->result_on_layer); - movement_directions.emplace_back(movement, radius); - } - for (TreeSupportElement* parent : elem->parents) - { - Point movement = (parent->result_on_layer - elem->result_on_layer); - movement_directions.emplace_back(movement, std::max(config.getRadius(parent), config.support_line_width)); - parent_uses_min |= parent->use_min_xy_dist; - } - - for (Point target: elem->additional_ovalization_targets) - { - Point movement = (target - elem->result_on_layer); - movement_directions.emplace_back(movement, std::max(radius, config.support_line_width)); - } - + Point movement = (child_elem->result_on_layer - elem->result_on_layer); + movement_directions.emplace_back(movement, radius); } - - coord_t max_speed_sqd = 0; - std::function generateArea = - [&](coord_t offset) + for (TreeSupportElement* parent : elem->parents) { - Polygons poly; + Point movement = (parent->result_on_layer - elem->result_on_layer); + movement_directions.emplace_back(movement, std::max(config.getRadius(parent), config.support_line_width)); + parent_uses_min |= parent->use_min_xy_dist; + } - for (std::pair movement : movement_directions) - { - max_speed_sqd = std::max(max_speed_sqd, vSize2(movement.first)); + for (Point target : elem->additional_ovalization_targets) + { + Point movement = (target - elem->result_on_layer); + movement_directions.emplace_back(movement, std::max(radius, config.support_line_width)); + } + } - // Visualization: https://jsfiddle.net/0zvcq39L/2/ - // Ovalizes the circle to an ellipse, that contains both old center and new target position. - double used_scale = (movement.second + offset) / (1.0 * config.branch_radius); - Point center_position = elem->result_on_layer + movement.first / 2; - const double moveX = movement.first.X / (used_scale * config.branch_radius); - const double moveY = movement.first.Y / (used_scale * config.branch_radius); - const double vsize_inv = 0.5 / (0.01 + std::sqrt(moveX * moveX + moveY * moveY)); + coord_t max_speed_sqd = 0; + std::function generateArea = [&](coord_t offset) + { + Polygons poly; - std::array matrix = - { - used_scale * (1 + moveX * moveX * vsize_inv), - used_scale * (0 + moveX * moveY * vsize_inv), - used_scale * (0 + moveX * moveY * vsize_inv), - used_scale * (1 + moveY * moveY * vsize_inv), - }; - Polygon circle; - for (Point vertex : branch_circle) - { - vertex = Point(matrix[0] * vertex.X + matrix[1] * vertex.Y, matrix[2] * vertex.X + matrix[3] * vertex.Y); - circle.add(center_position + vertex); - } - poly.add(circle.offset(0)); + for (std::pair movement : movement_directions) + { + max_speed_sqd = std::max(max_speed_sqd, vSize2(movement.first)); + + // Visualization: https://jsfiddle.net/0zvcq39L/2/ + // Ovalizes the circle to an ellipse, that contains both old center and new target position. + double used_scale = (movement.second + offset) / (1.0 * config.branch_radius); + Point center_position = elem->result_on_layer + movement.first / 2; + const double moveX = movement.first.X / (used_scale * config.branch_radius); + const double moveY = movement.first.Y / (used_scale * config.branch_radius); + const double vsize_inv = 0.5 / (0.01 + std::sqrt(moveX * moveX + moveY * moveY)); + + std::array matrix = { + used_scale * (1 + moveX * moveX * vsize_inv), + used_scale * (0 + moveX * moveY * vsize_inv), + used_scale * (0 + moveX * moveY * vsize_inv), + used_scale * (1 + moveY * moveY * vsize_inv), + }; + Polygon circle; + for (Point vertex : branch_circle) + { + vertex = Point(matrix[0] * vertex.X + matrix[1] * vertex.Y, matrix[2] * vertex.X + matrix[3] * vertex.Y); + circle.add(center_position + vertex); } + poly.add(circle.offset(0)); + } - poly = poly.unionPolygons().offset(std::min(static_cast(FUDGE_LENGTH), config.support_line_width / 4)).difference(volumes_.getCollision(0, linear_data[idx].first, parent_uses_min || elem->use_min_xy_dist)); - // ^^^ There seem to be some rounding errors, causing a branch to be a tiny bit further away from the model that it has to be. This can cause the tip to be slightly further away front the overhang (x/y wise) than optimal. - // This fixes it, and for every other part, 0.05mm will not be noticed. - return poly; - }; + poly = poly.unionPolygons() + .offset(std::min(static_cast(FUDGE_LENGTH), config.support_line_width / 4)) + .difference(volumes_.getCollision(0, linear_data[idx].first, parent_uses_min || elem->use_min_xy_dist)); + // ^^^ There seem to be some rounding errors, causing a branch to be a tiny bit further away from the model that it has to be. This can cause the tip to be slightly + // further away front the overhang (x/y wise) than optimal. + // This fixes it, and for every other part, 0.05mm will not be noticed. + return poly; + }; - constexpr auto three_quarters_sqd = 0.75 * 0.75; - const bool fast_relative_movement = max_speed_sqd > (radius * radius * three_quarters_sqd); + constexpr auto three_quarters_sqd = 0.75 * 0.75; + const bool fast_relative_movement = max_speed_sqd > (radius * radius * three_quarters_sqd); - // Ensure branch area will not overlap with model/collision. This can happen because of e.g. ovalization or increase_until_radius. - linear_inserts[idx] = generateArea(0); + // Ensure branch area will not overlap with model/collision. This can happen because of e.g. ovalization or increase_until_radius. + linear_inserts[idx] = generateArea(0); - if (fast_relative_movement || config.getRadius(*elem) - config.getCollisionRadius(*elem) > config.support_line_width) + if (fast_relative_movement || config.getRadius(*elem) - config.getCollisionRadius(*elem) > config.support_line_width) + { + // Simulate the path the nozzle will take on the outermost wall. + // If multiple parts exist, the outer line will not go all around the support part potentially causing support material to be printed mid air. + Polygons nozzle_path = linear_inserts[idx].offset(-config.support_line_width / 2); + if (nozzle_path.splitIntoParts(false).size() > 1) { - // Simulate the path the nozzle will take on the outermost wall. - // If multiple parts exist, the outer line will not go all around the support part potentially causing support material to be printed mid air. - Polygons nozzle_path = linear_inserts[idx].offset(-config.support_line_width / 2); + // Just try to make the area a tiny bit larger. + linear_inserts[idx] = generateArea(config.support_line_width / 2); + nozzle_path = linear_inserts[idx].offset(-config.support_line_width / 2); + + // if larger area did not fix the problem, all parts off the nozzle path that do not contain the center point are removed, hoping for the best if (nozzle_path.splitIntoParts(false).size() > 1) { - // Just try to make the area a tiny bit larger. - linear_inserts[idx] = generateArea(config.support_line_width / 2); - nozzle_path = linear_inserts[idx].offset(-config.support_line_width / 2); - - // if larger area did not fix the problem, all parts off the nozzle path that do not contain the center point are removed, hoping for the best - if (nozzle_path.splitIntoParts(false).size() > 1) + Polygons polygons_with_correct_center; + for (PolygonsPart part : nozzle_path.splitIntoParts(false)) { - Polygons polygons_with_correct_center; - for (PolygonsPart part : nozzle_path.splitIntoParts(false)) + if (part.inside(elem->result_on_layer, true)) { - if (part.inside(elem->result_on_layer, true)) + polygons_with_correct_center = polygons_with_correct_center.unionPolygons(part); + } + else + { + // Try a fuzzy inside as sometimes the point should be on the border, but is not because of rounding errors... + Point from = elem->result_on_layer; + PolygonUtils::moveInside(part, from, 0); + if (vSize2(elem->result_on_layer - from) < (FUDGE_LENGTH * FUDGE_LENGTH) / 4) { polygons_with_correct_center = polygons_with_correct_center.unionPolygons(part); } - else - { - // Try a fuzzy inside as sometimes the point should be on the border, but is not because of rounding errors... - Point from = elem->result_on_layer; - PolygonUtils::moveInside(part, from, 0); - if (vSize2(elem->result_on_layer - from) < (FUDGE_LENGTH * FUDGE_LENGTH) / 4) - { - polygons_with_correct_center = polygons_with_correct_center.unionPolygons(part); - } - } } - // Increase the area again, to ensure the nozzle path when calculated later is very similar to the one assumed above. - linear_inserts[idx] = polygons_with_correct_center.offset(config.support_line_width / 2).unionPolygons(); - linear_inserts[idx] = linear_inserts[idx].difference(volumes_.getCollision(0, linear_data[idx].first, parent_uses_min || elem->use_min_xy_dist)).unionPolygons(); } + // Increase the area again, to ensure the nozzle path when calculated later is very similar to the one assumed above. + linear_inserts[idx] = polygons_with_correct_center.offset(config.support_line_width / 2).unionPolygons(); + linear_inserts[idx] + = linear_inserts[idx].difference(volumes_.getCollision(0, linear_data[idx].first, parent_uses_min || elem->use_min_xy_dist)).unionPolygons(); } } + } - if (idx % progress_inserts_check_interval == 0) + if (idx % progress_inserts_check_interval == 0) + { { - { - std::lock_guard critical_section_progress(critical_sections); - progress_total += TREE_PROGRESS_GENERATE_BRANCH_AREAS / progress_report_steps; - Progress::messageProgress(Progress::Stage::SUPPORT, progress_total * progress_multiplier + progress_offset, TREE_PROGRESS_TOTAL); - } + std::lock_guard critical_section_progress(critical_sections); + progress_total += TREE_PROGRESS_GENERATE_BRANCH_AREAS / progress_report_steps; + Progress::messageProgress(Progress::Stage::SUPPORT, progress_total * progress_multiplier + progress_offset, TREE_PROGRESS_TOTAL); } } - ); + }); // Single threaded combining all elements to the right layers. Only copies data! for (const coord_t i : ranges::views::iota(0UL, linear_data.size())) @@ -1731,8 +1805,7 @@ void TreeSupport::smoothBranchAreas(std::vector> processing; processing.insert(processing.end(), layer_tree_polygons[layer_idx].begin(), layer_tree_polygons[layer_idx].end()); std::vector>> update_next(processing.size()); // With this a lock can be avoided. - cura::parallel_for - ( + cura::parallel_for( 0, processing.size(), [&](const size_t processing_idx) @@ -1746,10 +1819,13 @@ void TreeSupport::smoothBranchAreas(std::vectorresult_on_layer - parent->result_on_layer) - (config.getRadius(*data_pair.first) - config.getRadius(*parent))); + max_outer_wall_distance = std::max( + max_outer_wall_distance, + vSize(data_pair.first->result_on_layer - parent->result_on_layer) - (config.getRadius(*data_pair.first) - config.getRadius(*parent))); } } - max_outer_wall_distance += max_radius_change_per_layer; // As this change is a bit larger than what usually appears, lost radius can be slowly reclaimed over the layers. + max_outer_wall_distance + += max_radius_change_per_layer; // As this change is a bit larger than what usually appears, lost radius can be slowly reclaimed over the layers. if (do_something) { Polygons max_allowed_area = data_pair.second.offset(max_outer_wall_distance); @@ -1757,12 +1833,12 @@ void TreeSupport::smoothBranchAreas(std::vector(parent, layer_tree_polygons[layer_idx + 1][parent].intersection(max_allowed_area))); + update_next[processing_idx].emplace_back( + std::pair(parent, layer_tree_polygons[layer_idx + 1][parent].intersection(max_allowed_area))); } } } - } - ); + }); for (std::vector> data_vector : update_next) { @@ -1784,10 +1860,11 @@ void TreeSupport::smoothBranchAreas(std::vector> processing; processing.insert(processing.end(), layer_tree_polygons[layer_idx].begin(), layer_tree_polygons[layer_idx].end()); - std::vector> update_next(processing.size(), std::pair(nullptr, Polygons())); // With this a lock can be avoided. + std::vector> update_next( + processing.size(), + std::pair(nullptr, Polygons())); // With this a lock can be avoided. - cura::parallel_for - ( + cura::parallel_for( 0, processing.size(), [&](const size_t processing_idx) @@ -1821,8 +1898,7 @@ void TreeSupport::smoothBranchAreas(std::vector(data_pair.first, result); } } - } - ); + }); updated_last_iteration.clear(); for (std::pair data_pair : update_next) @@ -1839,22 +1915,21 @@ void TreeSupport::smoothBranchAreas(std::vector>& layer_tree_polygons, const std::vector>& linear_data, std::vector>>& dropped_down_areas, - const std::map& inverse_tree_order -) + const std::map& inverse_tree_order) { - cura::parallel_for - ( + cura::parallel_for( 0, linear_data.size(), [&](const size_t idx) { TreeSupportElement* elem = linear_data[idx].second; - bool non_gracious_model_contact = ! elem->to_model_gracious && ! inverse_tree_order.count(elem); // If an element has no child, it connects to whatever is below as no support further down for it will exist. + bool non_gracious_model_contact + = ! elem->to_model_gracious + && ! inverse_tree_order.count(elem); // If an element has no child, it connects to whatever is below as no support further down for it will exist. if (non_gracious_model_contact) { Polygons rest_support = layer_tree_polygons[linear_data[idx].first][elem].intersection(volumes_.getAccumulatedPlaceable0(linear_data[idx].first)); @@ -1864,8 +1939,7 @@ void TreeSupport::dropNonGraciousAreas dropped_down_areas[idx].emplace_back(linear_data[idx].first - counter, rest_support); } } - } - ); + }); } @@ -1873,8 +1947,8 @@ void TreeSupport::filterFloatingLines(std::vector& support_layer_stora { const auto t_start = std::chrono::high_resolution_clock::now(); - const coord_t closing_dist=config.support_line_width*config.support_wall_count; - const coord_t open_close_distance = config.fill_outline_gaps ? config.min_feature_size/ 2 - 5 : config.min_wall_line_width/ 2 - 5; // based on calculation in WallToolPath + const coord_t closing_dist = config.support_line_width * config.support_wall_count; + const coord_t open_close_distance = config.fill_outline_gaps ? config.min_feature_size / 2 - 5 : config.min_wall_line_width / 2 - 5; // based on calculation in WallToolPath const double small_area_length = INT2MM(static_cast(config.support_line_width) / 2); std::function reversePolygon = [&](Polygons& poly) @@ -1886,107 +1960,103 @@ void TreeSupport::filterFloatingLines(std::vector& support_layer_stora }; - std::vector support_holes(support_layer_storage.size(),Polygons()); - //Extract all holes as polygon objects - cura::parallel_for - ( - 0, - support_layer_storage.size(), - [&](const LayerIndex layer_idx) - { - - - support_layer_storage[layer_idx] = config.simplifier.polygon(PolygonUtils::unionManySmall(support_layer_storage[layer_idx].smooth(FUDGE_LENGTH))).offset(-open_close_distance).offset(open_close_distance * 2).offset(-open_close_distance); - support_layer_storage[layer_idx].removeSmallAreas(small_area_length * small_area_length, false); + std::vector support_holes(support_layer_storage.size(), Polygons()); + // Extract all holes as polygon objects + cura::parallel_for( + 0, + support_layer_storage.size(), + [&](const LayerIndex layer_idx) + { + support_layer_storage[layer_idx] = config.simplifier.polygon(PolygonUtils::unionManySmall(support_layer_storage[layer_idx].smooth(FUDGE_LENGTH))) + .offset(-open_close_distance) + .offset(open_close_distance * 2) + .offset(-open_close_distance); + support_layer_storage[layer_idx].removeSmallAreas(small_area_length * small_area_length, false); - std::vector parts = support_layer_storage[layer_idx].sortByNesting(); + std::vector parts = support_layer_storage[layer_idx].sortByNesting(); - if (parts.size() <= 1) - { - return; - } + if (parts.size() <= 1) + { + return; + } - Polygons holes_original; - for (const size_t idx : ranges::views::iota(1UL, parts.size())) - { - Polygons area = parts[idx]; - reversePolygon(area); - holes_original.add(area); - } - support_holes[layer_idx] = holes_original; + Polygons holes_original; + for (const size_t idx : ranges::views::iota(1UL, parts.size())) + { + Polygons area = parts[idx]; + reversePolygon(area); + holes_original.add(area); } - ); + support_holes[layer_idx] = holes_original; + }); const auto t_union = std::chrono::high_resolution_clock::now(); std::vector> holeparts(support_layer_storage.size()); - //Split all holes into parts - cura::parallel_for - ( - 0, - support_layer_storage.size(), - [&](const LayerIndex layer_idx) + // Split all holes into parts + cura::parallel_for( + 0, + support_layer_storage.size(), + [&](const LayerIndex layer_idx) + { + for (Polygons hole : support_holes[layer_idx].splitIntoParts()) { - for (Polygons hole:support_holes[layer_idx].splitIntoParts()) - { - holeparts[layer_idx].emplace_back(hole); - } + holeparts[layer_idx].emplace_back(hole); } - ); - std::vector>> hole_rest_map (holeparts.size()); - std::vector> holes_resting_outside (holeparts.size()); + }); + std::vector>> hole_rest_map(holeparts.size()); + std::vector> holes_resting_outside(holeparts.size()); - //Figure out which hole rests on which other hole - cura::parallel_for - ( - 1, - support_layer_storage.size(), - [&](const LayerIndex layer_idx) + // Figure out which hole rests on which other hole + cura::parallel_for( + 1, + support_layer_storage.size(), + [&](const LayerIndex layer_idx) + { + if (holeparts[layer_idx].empty()) { - if (holeparts[layer_idx].empty()) - { - return; - } + return; + } - Polygons outer_walls = - TreeSupportUtils::toPolylines(support_layer_storage[layer_idx - 1].getOutsidePolygons()).tubeShape(closing_dist,0);//.unionPolygons(volumes_.getCollision(0, layer_idx - 1, true).offset(-(config.support_line_width+config.xy_min_distance))); + Polygons outer_walls + = TreeSupportUtils::toPolylines(support_layer_storage[layer_idx - 1].getOutsidePolygons()) + .tubeShape(closing_dist, 0); //.unionPolygons(volumes_.getCollision(0, layer_idx - 1, true).offset(-(config.support_line_width+config.xy_min_distance))); - Polygons holes_below; + Polygons holes_below; - for (auto poly: holeparts[layer_idx - 1]) + for (auto poly : holeparts[layer_idx - 1]) + { + holes_below.add(poly); + } + + for (auto [idx, hole] : holeparts[layer_idx] | ranges::views::enumerate) + { + AABB hole_aabb = AABB(hole); + hole_aabb.expand(EPSILON); + if (! hole.intersection(PolygonUtils::clipPolygonWithAABB(outer_walls, hole_aabb)).empty()) { - holes_below.add(poly); + holes_resting_outside[layer_idx].emplace(idx); } - - for (auto [idx, hole] : holeparts[layer_idx] | ranges::views::enumerate) + else { - AABB hole_aabb = AABB(hole); - hole_aabb.expand(EPSILON); - if (!hole.intersection(PolygonUtils::clipPolygonWithAABB(outer_walls,hole_aabb)).empty()) - { - holes_resting_outside[layer_idx].emplace(idx); - } - else + for (auto [idx2, hole2] : holeparts[layer_idx - 1] | ranges::views::enumerate) { - for (auto [idx2, hole2] : holeparts[layer_idx - 1] | ranges::views::enumerate) + if (hole_aabb.hit(AABB(hole2)) + && ! hole.intersection(hole2).empty()) // TODO should technically be outline: Check if this is fine either way as it would save an offset { - - if (hole_aabb.hit(AABB(hole2)) && ! hole.intersection(hole2).empty() ) // TODO should technically be outline: Check if this is fine either way as it would save an offset - { - hole_rest_map[layer_idx][idx].emplace_back(idx2); - } + hole_rest_map[layer_idx][idx].emplace_back(idx2); } } } } - ); + }); const auto t_hole_rest_ordering = std::chrono::high_resolution_clock::now(); std::unordered_set removed_holes_by_idx; std::vector valid_holes(support_holes.size(), Polygons()); - //Check which holes have to be removed as they do not rest on anything. Only keep holes that have to be removed + // Check which holes have to be removed as they do not rest on anything. Only keep holes that have to be removed for (const size_t layer_idx : ranges::views::iota(1UL, support_holes.size())) { std::unordered_set next_removed_holes_by_idx; @@ -2000,7 +2070,8 @@ void TreeSupport::filterFloatingLines(std::vector& support_layer_stora } else { - if(hole_rest_map[layer_idx].contains(idx)){ + if (hole_rest_map[layer_idx].contains(idx)) + { for (size_t resting_idx : hole_rest_map[layer_idx][idx]) { if (! removed_holes_by_idx.contains(resting_idx)) @@ -2025,24 +2096,22 @@ void TreeSupport::filterFloatingLines(std::vector& support_layer_stora } const auto t_hole_removal_tagging = std::chrono::high_resolution_clock::now(); - //Check if holes are so close to each other that two lines will be printed directly next to each other, which is assumed stable (as otherwise the simulated support pattern will not work correctly) and remove all remaining, invalid holes - cura::parallel_for - ( - 1, - support_layer_storage.size(), - [&](const LayerIndex layer_idx) + // Check if holes are so close to each other that two lines will be printed directly next to each other, which is assumed stable (as otherwise the simulated support pattern + // will not work correctly) and remove all remaining, invalid holes + cura::parallel_for( + 1, + support_layer_storage.size(), + [&](const LayerIndex layer_idx) + { + if (holeparts[layer_idx].empty()) { - if (holeparts[layer_idx].empty()) - { - return; - } - - support_layer_storage[layer_idx] = support_layer_storage[layer_idx].getOutsidePolygons(); - reversePolygon(valid_holes[layer_idx]); - support_layer_storage[layer_idx].add(valid_holes[layer_idx]); + return; } - ); + support_layer_storage[layer_idx] = support_layer_storage[layer_idx].getOutsidePolygons(); + reversePolygon(valid_holes[layer_idx]); + support_layer_storage[layer_idx].add(valid_holes[layer_idx]); + }); const auto t_end = std::chrono::high_resolution_clock::now(); @@ -2052,19 +2121,24 @@ void TreeSupport::filterFloatingLines(std::vector& support_layer_stora const auto dur_hole_removal_tagging = 0.001 * std::chrono::duration_cast(t_hole_removal_tagging - t_hole_rest_ordering).count(); const auto dur_hole_removal = 0.001 * std::chrono::duration_cast(t_end - t_hole_removal_tagging).count(); - spdlog::debug("Time to union areas: {} ms Time to evaluate which hole rest on which other hole: {} ms Time to see which holes are not resting on anything valid: {} ms remove all holes that are invalid and not close enough to a valid hole: {} ms", dur_union,dur_hole_rest_ordering,dur_hole_removal_tagging, dur_hole_removal); - + spdlog::debug( + "Time to union areas: {} ms Time to evaluate which hole rest on which other hole: {} ms Time to see which holes are not resting on anything valid: {} ms remove all holes " + "that are invalid and not close enough to a valid hole: {} ms", + dur_union, + dur_hole_rest_ordering, + dur_hole_removal_tagging, + dur_hole_removal); } void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& support_layer_storage, std::vector& support_roof_storage, SliceDataStorage& storage) { InterfacePreference interface_pref = config.interface_preference; // InterfacePreference::SUPPORT_LINES_OVERWRITE_INTERFACE; - double progress_total = TREE_PROGRESS_PRECALC_AVO + TREE_PROGRESS_PRECALC_COLL + TREE_PROGRESS_GENERATE_NODES + TREE_PROGRESS_AREA_CALC + TREE_PROGRESS_GENERATE_BRANCH_AREAS + TREE_PROGRESS_SMOOTH_BRANCH_AREAS; + double progress_total = TREE_PROGRESS_PRECALC_AVO + TREE_PROGRESS_PRECALC_COLL + TREE_PROGRESS_GENERATE_NODES + TREE_PROGRESS_AREA_CALC + TREE_PROGRESS_GENERATE_BRANCH_AREAS + + TREE_PROGRESS_SMOOTH_BRANCH_AREAS; // Iterate over the generated circles in parallel and clean them up. Also add support floor. std::mutex critical_sections; - cura::parallel_for - ( + cura::parallel_for( 0, support_layer_storage.size(), [&](const LayerIndex layer_idx) @@ -2073,43 +2147,53 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor // Subtract support lines of the branches from the roof storage.support.supportLayers[layer_idx].support_roof = storage.support.supportLayers[layer_idx].support_roof.unionPolygons(support_roof_storage[layer_idx]); - if (!storage.support.supportLayers[layer_idx].support_roof.empty() && support_layer_storage[layer_idx].intersection(storage.support.supportLayers[layer_idx].support_roof).area() > 1) + if (! storage.support.supportLayers[layer_idx].support_roof.empty() + && support_layer_storage[layer_idx].intersection(storage.support.supportLayers[layer_idx].support_roof).area() > 1) { switch (interface_pref) { - case InterfacePreference::INTERFACE_AREA_OVERWRITES_SUPPORT: - support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(storage.support.supportLayers[layer_idx].support_roof); - break; - - case InterfacePreference::SUPPORT_AREA_OVERWRITES_INTERFACE: - storage.support.supportLayers[layer_idx].support_roof = storage.support.supportLayers[layer_idx].support_roof.difference(support_layer_storage[layer_idx]); - break; - - case InterfacePreference::INTERFACE_LINES_OVERWRITE_SUPPORT: - { - Polygons interface_lines = - TreeSupportUtils::generateSupportInfillLines(storage.support.supportLayers[layer_idx].support_roof, config, true, layer_idx, config.support_roof_line_distance, storage.support.cross_fill_provider, true) - .offsetPolyLine(config.support_roof_line_width / 2); - support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(interface_lines); - } + case InterfacePreference::INTERFACE_AREA_OVERWRITES_SUPPORT: + support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(storage.support.supportLayers[layer_idx].support_roof); break; - case InterfacePreference::SUPPORT_LINES_OVERWRITE_INTERFACE: - { - Polygons tree_lines; - tree_lines = - tree_lines.unionPolygons - ( - TreeSupportUtils::generateSupportInfillLines(support_layer_storage[layer_idx], config, false, layer_idx, config.support_line_distance, storage.support.cross_fill_provider, true) - .offsetPolyLine(config.support_line_width / 2) - ); - storage.support.supportLayers[layer_idx].support_roof = storage.support.supportLayers[layer_idx].support_roof.difference(tree_lines); - // Do not draw roof where the tree is. I prefer it this way as otherwise the roof may cut of a branch from its support below. - } + case InterfacePreference::SUPPORT_AREA_OVERWRITES_INTERFACE: + storage.support.supportLayers[layer_idx].support_roof = storage.support.supportLayers[layer_idx].support_roof.difference(support_layer_storage[layer_idx]); break; - case InterfacePreference::NOTHING: - break; + case InterfacePreference::INTERFACE_LINES_OVERWRITE_SUPPORT: + { + Polygons interface_lines = TreeSupportUtils::generateSupportInfillLines( + storage.support.supportLayers[layer_idx].support_roof, + config, + true, + layer_idx, + config.support_roof_line_distance, + storage.support.cross_fill_provider, + true) + .offsetPolyLine(config.support_roof_line_width / 2); + support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(interface_lines); + } + break; + + case InterfacePreference::SUPPORT_LINES_OVERWRITE_INTERFACE: + { + Polygons tree_lines; + tree_lines = tree_lines.unionPolygons(TreeSupportUtils::generateSupportInfillLines( + support_layer_storage[layer_idx], + config, + false, + layer_idx, + config.support_line_distance, + storage.support.cross_fill_provider, + true) + .offsetPolyLine(config.support_line_width / 2)); + storage.support.supportLayers[layer_idx].support_roof = storage.support.supportLayers[layer_idx].support_roof.difference(tree_lines); + // Do not draw roof where the tree is. I prefer it this way as otherwise the roof may cut of a branch from its support below. + } + break; + + case InterfacePreference::NOTHING: + break; } } @@ -2121,8 +2205,10 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor size_t layers_below = 0; while (layers_below <= config.support_bottom_layers) { - // One sample at 0 layers below, another at config.support_bottom_layers. In-between samples at config.performance_interface_skip_layers distance from each other. - const size_t sample_layer = static_cast(std::max(0, (static_cast(layer_idx) - static_cast(layers_below)) - static_cast(config.z_distance_bottom_layers))); + // One sample at 0 layers below, another at config.support_bottom_layers. In-between samples at config.performance_interface_skip_layers distance from each + // other. + const size_t sample_layer + = static_cast(std::max(0, (static_cast(layer_idx) - static_cast(layers_below)) - static_cast(config.z_distance_bottom_layers))); constexpr bool no_support = false; constexpr bool no_prime_tower = false; floor_layer.add(layer_outset.intersection(storage.getLayerOutlines(sample_layer, no_support, no_prime_tower))); @@ -2153,32 +2239,31 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor { std::lock_guard critical_section_storage(critical_sections); - if (!storage.support.supportLayers[layer_idx].support_infill_parts.empty() || !storage.support.supportLayers[layer_idx].support_roof.empty()) + if (! storage.support.supportLayers[layer_idx].support_infill_parts.empty() || ! storage.support.supportLayers[layer_idx].support_roof.empty()) { storage.support.layer_nr_max_filled_layer = std::max(storage.support.layer_nr_max_filled_layer, static_cast(layer_idx)); } } - } - ); + }); } void TreeSupport::drawAreas(std::vector>& move_bounds, SliceDataStorage& storage) { std::vector support_layer_storage(move_bounds.size()); std::vector support_roof_storage(move_bounds.size()); - std::map inverse_tree_order; // In the tree structure only the parents can be accessed. Inverse this to be able to access the children. - std::vector> linear_data; // All SupportElements are put into a layer independent storage to improve parallelization. Was added at a point in time where this function had performance issues. - // These were fixed by creating less initial points, but i do not see a good reason to remove a working performance optimization. + std::map + inverse_tree_order; // In the tree structure only the parents can be accessed. Inverse this to be able to access the children. + std::vector> + linear_data; // All SupportElements are put into a layer independent storage to improve parallelization. Was added at a point in time where this function had performance + // issues. These were fixed by creating less initial points, but i do not see a good reason to remove a working performance optimization. for (const auto layer_idx : ranges::views::iota(0UL, move_bounds.size())) { for (TreeSupportElement* elem : move_bounds[layer_idx]) { // (Check if) We either come from nowhere at the final layer or we had invalid parents 2. should never happen but just to be sure: - if - ( - (layer_idx > 0 && ((!inverse_tree_order.count(elem) && elem->target_height == layer_idx && config.min_dtt_to_model > 0 && !elem->to_buildplate) || - (inverse_tree_order.count(elem) && inverse_tree_order[elem]->result_on_layer == Point(-1, -1)))) - ) + if ((layer_idx > 0 + && ((! inverse_tree_order.count(elem) && elem->target_height == layer_idx && config.min_dtt_to_model > 0 && ! elem->to_buildplate) + || (inverse_tree_order.count(elem) && inverse_tree_order[elem]->result_on_layer == Point(-1, -1))))) { continue; } @@ -2204,7 +2289,8 @@ void TreeSupport::drawAreas(std::vector>& move_bou generateBranchAreas(linear_data, layer_tree_polygons, inverse_tree_order); const auto t_generate = std::chrono::high_resolution_clock::now(); - // In some edge-cases a branch may go through a hole, where the regular radius does not fit. This can result in an apparent jump in branch radius. As such this cases need to be caught and smoothed out. + // In some edge-cases a branch may go through a hole, where the regular radius does not fit. This can result in an apparent jump in branch radius. As such this cases need to be + // caught and smoothed out. smoothBranchAreas(layer_tree_polygons); const auto t_smooth = std::chrono::high_resolution_clock::now(); @@ -2223,19 +2309,15 @@ void TreeSupport::drawAreas(std::vector>& move_bou } // ensure all branch areas added as roof actually cause a roofline to generate. Else disable turning the branch to roof going down - cura::parallel_for - ( + cura::parallel_for( 0, layer_tree_polygons.size(), [&](const size_t layer_idx) { for (std::pair data_pair : layer_tree_polygons[layer_idx]) { - if - ( - data_pair.first->missing_roof_layers > data_pair.first->distance_to_top && - TreeSupportUtils::generateSupportInfillLines(data_pair.second, config, true, layer_idx, config.support_roof_line_distance, nullptr, true).empty() - ) + if (data_pair.first->missing_roof_layers > data_pair.first->distance_to_top + && TreeSupportUtils::generateSupportInfillLines(data_pair.second, config, true, layer_idx, config.support_roof_line_distance, nullptr, true).empty()) { std::vector to_disable_roofs; to_disable_roofs.emplace_back(data_pair.first); @@ -2254,8 +2336,7 @@ void TreeSupport::drawAreas(std::vector>& move_bou } } } - } - ); + }); // Single threaded combining all support areas to the right layers. // Only copies data! @@ -2263,15 +2344,13 @@ void TreeSupport::drawAreas(std::vector>& move_bou { for (std::pair data_pair : layer_tree_polygons[layer_idx]) { - ( - (data_pair.first->missing_roof_layers > data_pair.first->distance_to_top) ? support_roof_storage : support_layer_storage - )[layer_idx].add(data_pair.second); + ((data_pair.first->missing_roof_layers > data_pair.first->distance_to_top) ? support_roof_storage : support_layer_storage)[layer_idx].add(data_pair.second); } } for (const auto layer_idx : ranges::views::iota(0UL, additional_required_support_area.size())) { - if(support_layer_storage.size() > layer_idx) + if (support_layer_storage.size() > layer_idx) { support_layer_storage[layer_idx].add(additional_required_support_area[layer_idx]); } @@ -2289,7 +2368,14 @@ void TreeSupport::drawAreas(std::vector>& move_bou const auto dur_drop = 0.001 * std::chrono::duration_cast(t_drop - t_smooth).count(); const auto dur_filter = 0.001 * std::chrono::duration_cast(t_filter - t_drop).count(); const auto dur_finalize = 0.001 * std::chrono::duration_cast(t_end - t_filter).count(); - spdlog::info("Time used for drawing subfuctions: generateBranchAreas: {} ms smoothBranchAreas: {} ms dropNonGraciousAreas: {} ms filterFloatingLines: {} ms finalizeInterfaceAndSupportAreas {} ms", dur_gen_tips, dur_smooth, dur_drop, dur_filter, dur_finalize); + spdlog::info( + "Time used for drawing subfuctions: generateBranchAreas: {} ms smoothBranchAreas: {} ms dropNonGraciousAreas: {} ms filterFloatingLines: {} ms " + "finalizeInterfaceAndSupportAreas {} ms", + dur_gen_tips, + dur_smooth, + dur_drop, + dur_filter, + dur_finalize); } } // namespace cura diff --git a/src/bridge.cpp b/src/bridge.cpp index a395f7bd79..06ddbb6080 100644 --- a/src/bridge.cpp +++ b/src/bridge.cpp @@ -1,22 +1,30 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2018 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #include "bridge.h" -#include "sliceDataStorage.h" + #include "settings/types/Ratio.h" +#include "sliceDataStorage.h" #include "utils/AABB.h" #include "utils/polygon.h" namespace cura { -int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const SliceDataStorage& storage, const unsigned layer_nr, const unsigned bridge_layer, const SupportLayer* support_layer, Polygons& supported_regions) +int bridgeAngle( + const Settings& settings, + const Polygons& skin_outline, + const SliceDataStorage& storage, + const unsigned layer_nr, + const unsigned bridge_layer, + const SupportLayer* support_layer, + Polygons& supported_regions) { assert(! skin_outline.empty()); AABB boundary_box(skin_outline); - //To detect if we have a bridge, first calculate the intersection of the current layer with the previous layer. - // This gives us the islands that the layer rests on. + // To detect if we have a bridge, first calculate the intersection of the current layer with the previous layer. + // This gives us the islands that the layer rests on. Polygons islands; Polygons prev_layer_outline; // we also want the complete outline of the previous layer @@ -42,7 +50,7 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl } prev_layer_outline.add(solid_below); // not intersected with skin - if (!boundary_box.hit(prev_layer_part.boundaryBox)) + if (! boundary_box.hit(prev_layer_part.boundaryBox)) continue; islands.add(skin_outline.intersection(solid_below)); @@ -59,7 +67,7 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl // the model on one side but the remainder of the skin is above support would look like // a bridge because it would have two islands) - FIXME more work required here? - if (!support_layer->support_roof.empty()) + if (! support_layer->support_roof.empty()) { AABB support_roof_bb(support_layer->support_roof); if (boundary_box.hit(support_roof_bb)) @@ -67,7 +75,7 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl prev_layer_outline.add(support_layer->support_roof); // not intersected with skin Polygons supported_skin(skin_outline.intersection(support_layer->support_roof)); - if (!supported_skin.empty()) + if (! supported_skin.empty()) { supported_regions.add(supported_skin); } @@ -83,7 +91,7 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl prev_layer_outline.add(support_part.getInfillArea()); // not intersected with skin Polygons supported_skin(skin_outline.intersection(support_part.getInfillArea())); - if (!supported_skin.empty()) + if (! supported_skin.empty()) { supported_regions.add(supported_skin); } @@ -115,7 +123,8 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl Polygons skin_perimeter_lines; for (ConstPolygonRef poly : skin_outline) { - if (poly.empty()) continue; + if (poly.empty()) + continue; skin_perimeter_lines.add(poly); skin_perimeter_lines.back().emplace_back(poly.front()); } @@ -157,15 +166,15 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl return -1; } - //Next find the 2 largest islands that we rest on. + // Next find the 2 largest islands that we rest on. double area1 = 0; double area2 = 0; int idx1 = -1; int idx2 = -1; - for(unsigned int n=0; n area1) @@ -184,15 +193,14 @@ int bridgeAngle(const Settings& settings, const Polygons& skin_outline, const Sl idx2 = n; } } - + if (idx1 < 0 || idx2 < 0) return -1; - + Point center1 = islands[idx1].centerOfMass(); Point center2 = islands[idx2].centerOfMass(); return angle(center2 - center1); } -}//namespace cura - +} // namespace cura From b3fb6626654d2b384fd1b425a6d2cc5e7e348c56 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 15 Sep 2023 12:06:19 +0200 Subject: [PATCH 300/470] Plugins specify a verion-range, slots just a version. Not the other way around as we have now. This also adheres closer to the way we handle front-end plugins. Ideally you'd maybe want both of them to be ranges, but that's for the future. part of CURA-11035 Co-authored-by: Jelle Spijker --- conanfile.py | 2 +- include/plugins/exception.h | 6 +++--- include/plugins/metadata.h | 4 ++-- include/plugins/pluginproxy.h | 8 ++++---- include/plugins/slotproxy.h | 14 +++++++------- include/plugins/slots.h | 10 +++++----- include/plugins/validator.h | 4 ++-- src/plugins/converters.cpp | 4 ++-- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/conanfile.py b/conanfile.py index 7d4d5dc601..69154f284d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/cura_11035") # FIXME!: Put back to .../testing after merge! self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") diff --git a/include/plugins/exception.h b/include/plugins/exception.h index a1816c7754..f593c2d69b 100644 --- a/include/plugins/exception.h +++ b/include/plugins/exception.h @@ -28,13 +28,13 @@ class ValidatorException : public std::exception ValidatorException(const auto& validator, const slot_metadata& slot_info, const plugin_metadata& plugin_info) noexcept : msg_(fmt::format( - "Failed to validate plugin '{}-{}' running at [{}] for slot '{}', slot range '{}' incompatible with plugin slot version '{}'", + "Failed to validate plugin '{}-{}' running at [{}] for slot '{}', version '{}' incompatible with plugin specified slot-version-range '{}'.", plugin_info.plugin_name, plugin_info.plugin_version, plugin_info.peer, slot_info.slot_id, - slot_info.version_range, - plugin_info.slot_version)) + slot_info.version, + plugin_info.slot_version_range)) { } diff --git a/include/plugins/metadata.h b/include/plugins/metadata.h index fadc807d77..af3e210342 100644 --- a/include/plugins/metadata.h +++ b/include/plugins/metadata.h @@ -18,7 +18,7 @@ namespace cura::plugins struct plugin_metadata { - std::string slot_version; + std::string slot_version_range; std::string plugin_name; std::string plugin_version; std::string peer; @@ -28,7 +28,7 @@ struct plugin_metadata struct slot_metadata { plugins::v0::SlotID slot_id; - std::string_view version_range; + std::string_view version; std::string_view engine_uuid; }; diff --git a/include/plugins/pluginproxy.h b/include/plugins/pluginproxy.h index 102e76833f..2ff7b5c0c3 100644 --- a/include/plugins/pluginproxy.h +++ b/include/plugins/pluginproxy.h @@ -50,7 +50,7 @@ namespace cura::plugins * * Template arguments are: * SlotID - plugin slot ID - * SlotVersionRng - plugin version range + * SlotVersion - slot version used -- will be the only version available in the engine for that slot, since there is just the latest version of the slot a.t.m. * Stub - process stub type * ValidatorTp - validator type * RequestTp - gRPC convertible request type, or dummy -- if stub is a proper invoke-stub, this is enforced by the specialization of the invoke component @@ -58,7 +58,7 @@ namespace cura::plugins * * Class provides methods for validating the plugin, making requests and processing responses. */ -template +template class PluginProxy { // type aliases for easy use @@ -131,7 +131,7 @@ class PluginProxy spdlog::error(status.error_message()); throw exceptions::RemoteException(slot_info_, status.error_message()); } - if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version.empty()) + if (! plugin_info.plugin_name.empty() && ! plugin_info.slot_version_range.empty()) { plugin_info_.emplace(plugin_info); } @@ -340,7 +340,7 @@ class PluginProxy req_converter_type req_{}; ///< The Invoke request converter object. rsp_converter_type rsp_{}; ///< The Invoke response converter object. slot_metadata slot_info_{ .slot_id = SlotID, - .version_range = SlotVersionRng.value, + .version = SlotVersion.value, .engine_uuid = Application::getInstance().instance_uuid }; ///< Holds information about the plugin slot. std::optional plugin_info_{ std::optional(std::nullopt) }; ///< Optional object that holds the plugin metadata, set after handshake }; diff --git a/include/plugins/slotproxy.h b/include/plugins/slotproxy.h index 84ba7846c3..037db10a19 100644 --- a/include/plugins/slotproxy.h +++ b/include/plugins/slotproxy.h @@ -28,19 +28,19 @@ namespace cura::plugins * for communication with plugins assigned to the slot. It delegates plugin requests to the * corresponding PluginProxy object and provides a default behavior when no plugin is available. * - * @tparam Slot The plugin slot ID. - * @tparam Validator The type used for validating the plugin. + * @tparam SlotID The plugin slot ID. + * @tparam SlotVersion The version of the indicated slot. * @tparam Stub The process stub type. - * @tparam Prepare The prepare type. - * @tparam Request The gRPC convertible request type. - * @tparam Response The gRPC convertible response type. + * @tparam ValidatorTp The type used for validating the plugin. + * @tparam RequestTp The gRPC convertible request type. + * @tparam ResponseTp The gRPC convertible response type. * @tparam Default The default behavior when no plugin is available. */ -template +template class SlotProxy { Default default_process{}; - using value_type = PluginProxy; + using value_type = PluginProxy; std::optional plugin_{ std::nullopt }; public: diff --git a/include/plugins/slots.h b/include/plugins/slots.h index 5b99ab52b0..ed7c91a4e6 100644 --- a/include/plugins/slots.h +++ b/include/plugins/slots.h @@ -69,12 +69,12 @@ struct infill_generate_default */ template using slot_simplify_ - = SlotProxy; + = SlotProxy; template using slot_infill_generate_ = SlotProxy< v0::SlotID::INFILL_GENERATE, - "<=1.0.0", + "0.1.0-alpha", slots::infill::v0::generate::InfillGenerateService::Stub, Validator, infill_generate_request, @@ -91,7 +91,7 @@ using slot_infill_generate_ = SlotProxy< template using slot_postprocess_ = SlotProxy< v0::SlotID::POSTPROCESS_MODIFY, - "<=1.0.0", + "0.1.0-alpha", slots::postprocess::v0::modify::PostprocessModifyService::Stub, Validator, postprocess_request, @@ -100,12 +100,12 @@ using slot_postprocess_ = SlotProxy< template using slot_settings_broadcast_ - = SlotProxy; + = SlotProxy; template using slot_gcode_paths_modify_ = SlotProxy< v0::SlotID::GCODE_PATHS_MODIFY, - "<=1.0.0", + "0.1.0-alpha", slots::gcode_paths::v0::modify::GCodePathsModifyService::Stub, Validator, gcode_paths_modify_request, diff --git a/include/plugins/validator.h b/include/plugins/validator.h index 0d18c074a3..ffe9cbba8e 100644 --- a/include/plugins/validator.h +++ b/include/plugins/validator.h @@ -33,8 +33,8 @@ class Validator */ Validator(const slot_metadata& slot_info, const plugin_metadata& plugin_info) { - auto slot_range = semver::range::detail::range(slot_info.version_range); - auto slot_version = semver::from_string(plugin_info.slot_version); + auto slot_range = semver::range::detail::range(plugin_info.slot_version_range); + auto slot_version = semver::from_string(slot_info.version); valid_ = slot_range.satisfies(slot_version, include_prerelease_); }; diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 33e7d4882e..2ba03fe8c6 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -70,7 +70,7 @@ handshake_request::value_type handshake_request::operator()(const std::string& n { value_type message{}; message.set_slot_id(slot_info.slot_id); - message.set_version_range(slot_info.version_range.data()); + message.set_version(slot_info.version.data()); message.set_plugin_name(name); message.set_plugin_version(version); return message; @@ -78,7 +78,7 @@ handshake_request::value_type handshake_request::operator()(const std::string& n handshake_response::native_value_type handshake_response::operator()(const handshake_response::value_type& message, std::string_view peer) const { - return { .slot_version = message.slot_version(), + return { .slot_version_range = message.slot_version_range(), .plugin_name = message.plugin_name(), .plugin_version = message.plugin_version(), .peer = std::string{ peer }, From 12e9152dae56f7658319e4a144f19781d4bb7913 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 18 Sep 2023 16:45:05 +0200 Subject: [PATCH 301/470] Apply nozzle temperature when set in gcode header CURA-8889 --- src/gcodeExport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index a9bf55f7c1..caff200811 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -763,7 +763,7 @@ void GCodeExport::processInitialLayerTemperature(const SliceDataStorage& storage processInitialLayerBedTemperature(); - if (scene.current_mesh_group->settings.get("material_print_temp_prepend")) + if (scene.current_mesh_group->settings.get("material_print_temp_prepend") || (scene.current_mesh_group != scene.mesh_groups.begin())) { for (unsigned extruder_nr = 0; extruder_nr < num_extruders; extruder_nr++) { From 74456d083079cc4025c7d7d68507d6a0152e97f6 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 19 Sep 2023 12:36:39 +0200 Subject: [PATCH 302/470] Don't use auto when the type is not 'near'. Done as part of CURA-11019 --- src/FffGcodeWriter.cpp | 16 ++++++++-------- src/FffPolygonGenerator.cpp | 10 +++++----- src/LayerPlan.cpp | 4 ++-- src/TreeSupport.cpp | 4 ++-- src/bridge.cpp | 2 +- src/settings/PathConfigStorage.cpp | 2 +- src/sliceDataStorage.cpp | 8 ++++---- src/support.cpp | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 0d6ea404fd..d5cbd83648 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -106,7 +106,7 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep } size_t total_layers = 0; - for (auto& mesh_ptr : storage.meshes) + for (std::shared_ptr& mesh_ptr : storage.meshes) { auto& mesh = *mesh_ptr; size_t mesh_layer_num = mesh.layers.size(); @@ -270,7 +270,7 @@ void FffGcodeWriter::findLayerSeamsForSpiralize(SliceDataStorage& storage, size_ const std::vector& mesh_order = mesh_order_per_extruder[extruder_nr]; for (unsigned int mesh_idx : mesh_order) { - auto& mesh = *storage.meshes[mesh_idx]; + SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; // if this mesh has layer data for this layer process it if (! done_this_layer && mesh.layers.size() > layer_nr) { @@ -372,7 +372,7 @@ void FffGcodeWriter::setConfigRetractionAndWipe(SliceDataStorage& storage) ExtruderTrain& train = scene.extruders[extruder_index]; retractionAndWipeConfigFromSettings(train.settings, &storage.retraction_wipe_config_per_extruder[extruder_index]); } - for (auto& mesh : storage.meshes) + for (std::shared_ptr& mesh : storage.meshes) { retractionAndWipeConfigFromSettings(mesh->settings, &mesh->retraction_wipe_config); } @@ -916,7 +916,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn { z = storage.meshes[0]->layers[layer_nr].printZ; // stub default // find printZ of first actual printed mesh - for (const auto& mesh_ptr : storage.meshes) + for (const std::shared_ptr& mesh_ptr : storage.meshes) { const auto& mesh = *mesh_ptr; if (layer_nr >= static_cast(mesh.layers.size()) || mesh.settings.get("support_mesh") || mesh.settings.get("anti_overhang_mesh") @@ -953,7 +953,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn } coord_t max_inner_wall_width = 0; - for (const auto& mesh_ptr : storage.meshes) + for (const std::shared_ptr& mesh_ptr : storage.meshes) { const auto& mesh = *mesh_ptr; coord_t mesh_inner_wall_width = mesh.settings.get((mesh.settings.get("wall_line_count") > 1) ? "wall_line_width_x" : "wall_line_width_0"); @@ -1025,7 +1025,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn const std::vector& mesh_order = mesh_order_per_extruder[extruder_nr]; for (size_t mesh_idx : mesh_order) { - const auto& mesh = storage.meshes[mesh_idx]; + const std::shared_ptr& mesh = storage.meshes[mesh_idx]; const MeshPathConfigs& mesh_config = gcode_layer.configs_storage.mesh_configs[mesh_idx]; if (mesh->settings.get("magic_mesh_surface_mode") == ESurfaceMode::SURFACE && extruder_nr @@ -1385,7 +1385,7 @@ std::vector FffGcodeWriter::calculateMeshOrder(const SliceDataStorage& s std::vector::iterator mesh_group = Application::getInstance().current_slice->scene.current_mesh_group; for (unsigned int mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) { - const auto& mesh = *storage.meshes[mesh_idx]; + const SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; if (mesh.getExtruderIsUsed(extruder_nr)) { const Mesh& mesh_data = mesh_group->meshes[mesh_idx]; @@ -2263,7 +2263,7 @@ bool FffGcodeWriter::processInsets( Polygons outlines_below; AABB boundaryBox(part.outline); - for (const auto& mesh_ptr : storage.meshes) + for (const std::shared_ptr& mesh_ptr : storage.meshes) { const auto& m = *mesh_ptr; if (m.isPrinted()) diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp index edd5e48d6e..daff0196eb 100644 --- a/src/FffPolygonGenerator.cpp +++ b/src/FffPolygonGenerator.cpp @@ -276,7 +276,7 @@ bool FffPolygonGenerator::sliceModel(MeshGroup* meshgroup, TimeKeeper& timeKeepe // always make a new SliceMeshStorage, so that they have the same ordering / indexing as meshgroup.meshes storage.meshes.push_back(std::make_shared(&meshgroup->meshes[meshIdx], slicer->layers.size())); // new mesh in storage had settings from the Mesh - auto& meshStorage = *storage.meshes.back(); + SliceMeshStorage& meshStorage = *storage.meshes.back(); // only create layer parts for normal meshes const bool is_support_modifier = AreaSupport::handleSupportModifierMesh(storage, mesh.settings, slicer); @@ -347,7 +347,7 @@ void FffPolygonGenerator::slices2polygons(SliceDataStorage& storage, TimeKeeper& // compute layer count and remove first empty layers // there is no separate progress stage for removeEmptyFisrtLayer (TODO) unsigned int slice_layer_count = 0; - for (auto& mesh_ptr : storage.meshes) + for (std::shared_ptr& mesh_ptr : storage.meshes) { auto& mesh = *mesh_ptr; if (! mesh.settings.get("infill_mesh") && ! mesh.settings.get("anti_overhang_mesh")) @@ -433,7 +433,7 @@ void FffPolygonGenerator::slices2polygons(SliceDataStorage& storage, TimeKeeper& spdlog::debug("Meshes post-processing"); // meshes post processing - for (auto& mesh : storage.meshes) + for (std::shared_ptr& mesh : storage.meshes) { processDerivedWallsSkinInfill(*mesh); } @@ -742,7 +742,7 @@ bool FffPolygonGenerator::isEmptyLayer(SliceDataStorage& storage, const LayerInd return false; } } - for (auto& mesh_ptr : storage.meshes) + for (std::shared_ptr& mesh_ptr : storage.meshes) { auto& mesh = *mesh_ptr; if (layer_idx >= mesh.layers.size()) @@ -855,7 +855,7 @@ void FffPolygonGenerator::computePrintHeightStatistics(SliceDataStorage& storage max_print_height_per_extruder.resize(extruder_count, -(raft_layers + 1)); // Initialize all as -1 (or lower in case of raft). { // compute max_object_height_per_extruder // Height of the meshes themselves. - for (auto& mesh_ptr : storage.meshes) + for (std::shared_ptr& mesh_ptr : storage.meshes) { auto& mesh = *mesh_ptr; if (mesh.settings.get("anti_overhang_mesh") || mesh.settings.get("support_mesh")) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index b7d24b1b11..530ba6b63b 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -159,7 +159,7 @@ Polygons LayerPlan::computeCombBoundary(const CombBoundary boundary_type) } else { - for (const auto& mesh_ptr : storage.meshes) + for (const std::shared_ptr& mesh_ptr : storage.meshes) { const auto& mesh = *mesh_ptr; const SliceLayer& layer = mesh.layers[static_cast(layer_nr)]; @@ -1188,7 +1188,7 @@ void LayerPlan::addLinesByOptimizer( if (layer_nr >= 0) { // determine how much the skin/infill lines overlap the combing boundary - for (const auto& mesh : storage.meshes) + for (const std::shared_ptr& mesh : storage.meshes) { const coord_t overlap = std::max(mesh->settings.get("skin_overlap_mm"), mesh->settings.get("infill_overlap_mm")); if (overlap > dist) diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 9cc4c7d404..c226588ebe 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -39,7 +39,7 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) { size_t largest_printed_mesh_idx = 0; - for (const auto& mesh_ptr : storage.meshes) + for (const std::shared_ptr& mesh_ptr : storage.meshes) { const auto& mesh = *mesh_ptr; TreeSupportSettings::some_model_contains_thick_roof |= mesh.settings.get("support_roof_height") >= 2 * mesh.settings.get("layer_height"); @@ -52,7 +52,7 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) // Only one setting object is needed per group, as different settings in the same group may only occur in the tip, which uses the original settings objects from the meshes. for (auto [mesh_idx, mesh_ptr] : storage.meshes | ranges::views::enumerate) { - auto& mesh = *mesh_ptr; + SliceMeshStorage& mesh = *mesh_ptr; const bool non_supportable_mesh = mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh") || mesh.settings.get("support_mesh"); if (mesh.settings.get("support_structure") != ESupportStructure::TREE || ! mesh.settings.get("support_enable") || non_supportable_mesh) { diff --git a/src/bridge.cpp b/src/bridge.cpp index 06ddbb6080..75e42889e2 100644 --- a/src/bridge.cpp +++ b/src/bridge.cpp @@ -32,7 +32,7 @@ int bridgeAngle( const Ratio sparse_infill_max_density = settings.get("bridge_sparse_infill_max_density"); // include parts from all meshes - for (const auto& mesh_ptr : storage.meshes) + for (const std::shared_ptr& mesh_ptr : storage.meshes) { const auto& mesh = *mesh_ptr; if (mesh.isPrinted()) diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index 467b130f5c..f6e6d1b703 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -124,7 +124,7 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye } mesh_configs.reserve(storage.meshes.size()); - for (const auto& mesh_storage : storage.meshes) + for (const std::shared_ptr& mesh_storage : storage.meshes) { mesh_configs.emplace_back(*mesh_storage, layer_thickness, layer_nr, line_width_factor_per_extruder); } diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index c890783f8c..4533fbb8be 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -300,7 +300,7 @@ Polygons Polygons total; if (layer_nr >= 0) { - for (const auto& mesh : meshes) + for (const std::shared_ptr& mesh : meshes) { if (mesh->settings.get("infill_mesh") || mesh->settings.get("anti_overhang_mesh") || (extruder_nr != -1 && extruder_nr != int(mesh->settings.get("wall_0_extruder_nr").extruder_nr))) @@ -381,7 +381,7 @@ std::vector SliceDataStorage::getExtrudersUsed() const // support // support is presupposed to be present... - for (const auto& mesh : meshes) + for (const std::shared_ptr& mesh : meshes) { if (mesh->settings.get("support_enable") || mesh->settings.get("support_mesh")) { @@ -399,7 +399,7 @@ std::vector SliceDataStorage::getExtrudersUsed() const } // all meshes are presupposed to actually have content - for (const auto& mesh : meshes) + for (const std::shared_ptr& mesh : meshes) { for (unsigned int extruder_nr = 0; extruder_nr < ret.size(); extruder_nr++) { @@ -508,7 +508,7 @@ std::vector SliceDataStorage::getExtrudersUsed(const LayerIndex layer_nr) if (include_models) { - for (const auto& mesh : meshes) + for (const std::shared_ptr& mesh : meshes) { for (unsigned int extruder_nr = 0; extruder_nr < ret.size(); extruder_nr++) { diff --git a/src/support.cpp b/src/support.cpp index a55d21b53f..188f2b486d 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -599,7 +599,7 @@ Polygons AreaSupport::join(const SliceDataStorage& storage, const Polygons& supp void AreaSupport::generateOverhangAreas(SliceDataStorage& storage) { - for (auto& mesh_ptr : storage.meshes) + for (std::shared_ptr& mesh_ptr : storage.meshes) { auto& mesh = *mesh_ptr; if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) From 7f01c3a075d280907b08c5e6b73daf6ea9e107bd Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 19 Sep 2023 14:36:32 +0200 Subject: [PATCH 303/470] Fix min layer time for gradual flow Change ordering of back pressure compensation, gradual flow and minimum layer time gcode modification steps Ordering before commit: 1: back pressure compensation 2: minimum layer time 3: gradual flow Ordering after commit: 1: gradual flow 2: back pressure compensation 3: minimum layer time CURA-11020 --- include/LayerPlan.h | 5 +++ src/FffGcodeWriter.cpp | 1 + src/LayerPlan.cpp | 85 ++++++++++++++++++++++-------------------- 3 files changed, 51 insertions(+), 40 deletions(-) diff --git a/include/LayerPlan.h b/include/LayerPlan.h index 3eda752178..e9e7bde3f1 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -704,6 +704,11 @@ class LayerPlan : public NoCopy */ void moveInsideCombBoundary(const coord_t distance, const std::optional& part = std::nullopt); + /*! + * If enabled, apply the modify plugin to the layer-plan. + */ + void applyModifyPlugin(); + /*! * Apply back-pressure compensation to this layer-plan. * Since the total (filament) pressure in a feeder-system is not only dependent on the pressure that exists between the nozzle and the diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 648e9082ce..c66e6a7659 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1046,6 +1046,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn } } + gcode_layer.applyModifyPlugin(); gcode_layer.applyBackPressureCompensation(); return gcode_layer; } diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 600869daac..639a47f76a 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1852,46 +1852,6 @@ void LayerPlan::writeGCode(GCodeExport& gcode) { ExtruderPlan& extruder_plan = extruder_plans[extruder_plan_idx]; - scripta::log( - "extruder_plan_0", - extruder_plan.paths, - SectionType::NA, - layer_nr, - scripta::CellVDI{ "flow", &GCodePath::flow }, - scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, - scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, - scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, - scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, - scripta::CellVDI{ "retract", &GCodePath::retract }, - scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, - scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, - scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, - scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, - scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, - scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); - - extruder_plan.paths = slots::instance().modify(extruder_plan.paths, extruder_plan.extruder_nr, layer_nr); - - // Since the time/material estimates _may_ have changed during the plugin modify step we recalculate it - extruder_plan.computeNaiveTimeEstimates(gcode.getPositionXY()); - scripta::log( - "extruder_plan_1", - extruder_plan.paths, - SectionType::NA, - layer_nr, - scripta::CellVDI{ "flow", &GCodePath::flow }, - scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, - scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, - scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, - scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, - scripta::CellVDI{ "retract", &GCodePath::retract }, - scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, - scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, - scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, - scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, - scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, - scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); - const RetractionAndWipeConfig* retraction_config = current_mesh ? ¤t_mesh->retraction_wipe_config : &storage.retraction_wipe_config_per_extruder[extruder_plan.extruder_nr]; coord_t z_hop_height = retraction_config->retraction_config.zHop; @@ -2402,6 +2362,51 @@ bool LayerPlan::writePathWithCoasting( return true; } +void LayerPlan::applyModifyPlugin() +{ + for (auto& extruder_plan : extruder_plans) + { + scripta::log( + "extruder_plan_0", + extruder_plan.paths, + SectionType::NA, + layer_nr, + scripta::CellVDI{ "flow", &GCodePath::flow }, + scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, + scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, + scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, + scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, + scripta::CellVDI{ "retract", &GCodePath::retract }, + scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, + scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, + scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, + scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, + scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, + scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); + + extruder_plan.paths = slots::instance().modify(extruder_plan.paths, extruder_plan.extruder_nr, layer_nr); + + scripta::log( + "extruder_plan_1", + extruder_plan.paths, + SectionType::NA, + layer_nr, + scripta::CellVDI{ "flow", &GCodePath::flow }, + scripta::CellVDI{ "width_factor", &GCodePath::width_factor }, + scripta::CellVDI{ "spiralize", &GCodePath::spiralize }, + scripta::CellVDI{ "speed_factor", &GCodePath::speed_factor }, + scripta::CellVDI{ "speed_back_pressure_factor", &GCodePath::speed_back_pressure_factor }, + scripta::CellVDI{ "retract", &GCodePath::retract }, + scripta::CellVDI{ "unretract_before_last_travel_move", &GCodePath::unretract_before_last_travel_move }, + scripta::CellVDI{ "perform_z_hop", &GCodePath::perform_z_hop }, + scripta::CellVDI{ "perform_prime", &GCodePath::perform_prime }, + scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, + scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, + scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); + + } +} + void LayerPlan::applyBackPressureCompensation() { for (auto& extruder_plan : extruder_plans) From 8157ad44bf2ef62a970fe1b212a6a9ee3acca01f Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 19 Sep 2023 12:37:17 +0000 Subject: [PATCH 304/470] Applied clang-format. --- src/LayerPlan.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 639a47f76a..b2ff1d6273 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2403,7 +2403,6 @@ void LayerPlan::applyModifyPlugin() scripta::CellVDI{ "fan_speed", &GCodePath::getFanSpeed }, scripta::CellVDI{ "is_travel_path", &GCodePath::isTravelPath }, scripta::CellVDI{ "extrusion_mm3_per_mm", &GCodePath::getExtrusionMM3perMM }); - } } From cf0c484079e10b5cbe3b6fe6531a365c3dbe2ed9 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 20 Sep 2023 07:34:45 +0200 Subject: [PATCH 305/470] Use latest grpc definitions CURA-11035 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 69154f284d..7d4d5dc601 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/cura_11035") # FIXME!: Put back to .../testing after merge! + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From d5a099f84bc500b3e37676de60d201ffe1e44d14 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 20 Sep 2023 13:47:09 +0200 Subject: [PATCH 306/470] Start 5.5.x release branch. --- conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 7d4d5dc601..381b6e2366 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-alpha" + self.version = "5.5.0-beta.1" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) @@ -82,10 +82,10 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/5.3.0") + self.requires("arcus/(latest)@ultimaker/stable") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/stable") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From 3a849553c4952e6f8f959729fe90d285a7ab8d23 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 20 Sep 2023 14:58:40 +0200 Subject: [PATCH 307/470] use correct versions --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 381b6e2366..dea1860300 100644 --- a/conanfile.py +++ b/conanfile.py @@ -82,10 +82,10 @@ def build_requirements(self): def requirements(self): if self.options.enable_arcus: - self.requires("arcus/(latest)@ultimaker/stable") + self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/stable") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From b621644d96d4334f246c0475ef65cedf499fdf74 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 21 Sep 2023 15:38:05 +0200 Subject: [PATCH 308/470] Proof-of-concept 'true' support z-offset: half-layer heights. First see if the part of the support (interface only for now) that should (perhaps) be a bit lower if the support z gap is not a multiple of the layer height, can actually be lowered at all without upending the code too much. This turns out to be possible. Next is actually setting the proper gap height (or what's left of the gap after already dropping down to the layer that needs to be a fractional height.) Proof of concept mostly in the sense that the quality of the code added may not reflect our standards, and would also be missing functionality (for instance; what if we print without support-interface). part of CURA-11041, which is the proof-of-concept for CURA-10407 --- include/GCodePathConfig.h | 1 + include/LayerPlan.h | 19 ++-- include/pathPlanning/GCodePath.h | 1 + include/sliceDataStorage.h | 2 + src/FffGcodeWriter.cpp | 169 ++++++++++++++++--------------- src/LayerPlan.cpp | 41 ++++---- src/support.cpp | 3 +- 7 files changed, 130 insertions(+), 106 deletions(-) diff --git a/include/GCodePathConfig.h b/include/GCodePathConfig.h index 1ee2003195..1f0da38d60 100644 --- a/include/GCodePathConfig.h +++ b/include/GCodePathConfig.h @@ -18,6 +18,7 @@ namespace cura */ struct GCodePathConfig { + coord_t z_offset{}; PrintFeatureType type{}; //!< name of the feature type coord_t line_width{}; //!< width of the line extruded coord_t layer_thickness{}; //!< current layer height in micron diff --git a/include/LayerPlan.h b/include/LayerPlan.h index bd30920a04..24fc141b82 100644 --- a/include/LayerPlan.h +++ b/include/LayerPlan.h @@ -117,10 +117,11 @@ class LayerPlan : public NoCopy */ GCodePath* getLatestPathWithConfig( const GCodePathConfig& config, - SpaceFillType space_fill_type, + const coord_t z_offset, + const SpaceFillType space_fill_type, const Ratio flow = 1.0_r, const Ratio width_factor = 1.0_r, - bool spiralize = false, + const bool spiralize = false, const Ratio speed_factor = 1.0_r); public: @@ -281,7 +282,7 @@ class LayerPlan : public NoCopy * \param p The point to travel to. * \param force_retract Whether to force a retraction to occur. */ - GCodePath& addTravel(const Point p, const bool force_retract = false); + GCodePath& addTravel(const Point p, const bool force_retract = false, const coord_t z_offset = 0); /*! * Add a travel path to a certain point and retract if needed. @@ -291,7 +292,7 @@ class LayerPlan : public NoCopy * \param p The point to travel to * \param path (optional) The travel path to which to add the point \p p */ - GCodePath& addTravel_simple(Point p, GCodePath* path = nullptr); + GCodePath& addTravel_simple(const Point p, GCodePath* path = nullptr); /*! * Plan a prime blob at the current location. @@ -317,14 +318,14 @@ class LayerPlan : public NoCopy * \param fan_speed Fan speed override for this path. */ void addExtrusionMove( - Point p, + const Point p, const GCodePathConfig& config, - SpaceFillType space_fill_type, + const SpaceFillType space_fill_type, const Ratio& flow = 1.0_r, const Ratio width_factor = 1.0_r, - bool spiralize = false, - Ratio speed_factor = 1.0_r, - double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT); + const bool spiralize = false, + const Ratio speed_factor = 1.0_r, + const double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT); /*! * Add polygon to the gcode starting at vertex \p startIdx diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 7bbd56c709..ef59a8747d 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -29,6 +29,7 @@ namespace cura */ struct GCodePath { + coord_t z_offset{}; GCodePathConfig config{}; //!< The configuration settings of the path. std::shared_ptr mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; SpaceFillType space_fill_type{}; //!< The type of space filling of which this path is a part diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 9b0661ed36..067a0a60a3 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -212,6 +212,8 @@ class SupportLayer std::vector support_infill_parts; //!< a list of support infill parts Polygons support_bottom; //!< Piece of support below the support and above the model. This must not overlap with any of the support_infill_parts or support_roof. Polygons support_roof; //!< Piece of support above the support and below the model. This must not overlap with any of the support_infill_parts or support_bottom. + Polygons support_fractional_roof_top; //!< If the support distance is less than a multiple of the layer height, + // the first part of support just underneath the model needs to be printed at a fracional layer height. Polygons support_mesh_drop_down; //!< Areas from support meshes which should be supported by more support Polygons support_mesh; //!< Areas from support meshes which should NOT be supported by more support Polygons anti_overhang; //!< Areas where no overhang should be detected. diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 235f6f587e..359ea4fdf9 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3327,89 +3327,100 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay support_roof_line_distance *= roof_extruder.settings.get("initial_layer_line_width_factor"); } - Polygons infill_outline = support_layer.support_roof; - Polygons wall; - // make sure there is a wall if this is on the first layer - if (gcode_layer.getLayerNr() == 0) - { - wall = support_layer.support_roof.offset(-support_roof_line_width / 2); - infill_outline = wall.offset(-support_roof_line_width / 2); - } + const auto half_layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height") / 2; - Infill roof_computation( - pattern, - zig_zaggify_infill, - connect_polygons, - infill_outline, - gcode_layer.configs_storage.support_roof_config.getLineWidth(), - support_roof_line_distance, - support_roof_overlap, - infill_multiplier, - fill_angle, - gcode_layer.z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - Polygons roof_polygons; - std::vector roof_paths; - Polygons roof_lines; - roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); - if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) - { - return false; // We didn't create any support roof. - } - gcode_layer.setIsInside(false); // going to print stuff outside print object, i.e. support - if (gcode_layer.getLayerNr() == 0) - { - gcode_layer.addPolygonsByOptimizer(wall, gcode_layer.configs_storage.support_roof_config); - } - if (! roof_polygons.empty()) - { - constexpr bool force_comb_retract = false; - gcode_layer.addTravel(roof_polygons[0][0], force_comb_retract); - gcode_layer.addPolygonsByOptimizer(roof_polygons, gcode_layer.configs_storage.support_roof_config); - } - if (! roof_paths.empty()) + auto infill_outlines = { support_layer.support_roof.difference(support_layer.support_fractional_roof_top), support_layer.support_fractional_roof_top }; + auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! + bool generated_something = false; + for (auto infill_outline : infill_outlines) { - const GCodePathConfig& config = gcode_layer.configs_storage.support_roof_config; - constexpr bool retract_before_outer_wall = false; - constexpr coord_t wipe_dist = 0; - const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); + Polygons wall; + // make sure there is a wall if this is on the first layer + if (gcode_layer.getLayerNr() == 0) + { + wall = support_layer.support_roof.offset(-support_roof_line_width / 2); + infill_outline = wall.offset(-support_roof_line_width / 2); + } - InsetOrderOptimizer wall_orderer( - *this, - storage, - gcode_layer, - roof_extruder.settings, - roof_extruder_nr, - config, - config, - config, - config, - retract_before_outer_wall, - wipe_dist, - wipe_dist, - roof_extruder_nr, - roof_extruder_nr, - z_seam_config, - roof_paths); - wall_orderer.addToLayer(); + Infill roof_computation( + pattern, + zig_zaggify_infill, + connect_polygons, + infill_outline, + current_roof_config.getLineWidth(), + support_roof_line_distance, + support_roof_overlap, + infill_multiplier, + fill_angle, + gcode_layer.z + current_roof_config.z_offset, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + Polygons roof_polygons; + std::vector roof_paths; + Polygons roof_lines; + roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); + if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) + { + continue; // We didn't create any support roof. + } + generated_something = true; // We _did_ create at least some support roof. + gcode_layer.setIsInside(false); // going to print stuff outside print object, i.e. support + if (gcode_layer.getLayerNr() == 0) + { + gcode_layer.addPolygonsByOptimizer(wall, current_roof_config); + } + if (!roof_polygons.empty()) + { + constexpr bool force_comb_retract = false; + gcode_layer.addTravel(roof_polygons[0][0], force_comb_retract); + gcode_layer.addPolygonsByOptimizer(roof_polygons, current_roof_config); + } + if (!roof_paths.empty()) + { + const GCodePathConfig& config = current_roof_config; + constexpr bool retract_before_outer_wall = false; + constexpr coord_t wipe_dist = 0; + const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); + + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + roof_extruder.settings, + roof_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + roof_extruder_nr, + roof_extruder_nr, + z_seam_config, + roof_paths); + wall_orderer.addToLayer(); + } + gcode_layer.addLinesByOptimizer( + roof_lines, + gcode_layer.configs_storage.support_roof_config, + (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); + + current_roof_config.z_offset = -half_layer_height; + current_roof_config.flow /= 2.0; } - gcode_layer.addLinesByOptimizer( - roof_lines, - gcode_layer.configs_storage.support_roof_config, - (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); - return true; + return generated_something; } bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, LayerPlan& gcode_layer) const diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 4a283c147e..4642c8bfd1 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -38,19 +38,21 @@ constexpr int MINIMUM_SQUARED_LINE_LENGTH = MINIMUM_LINE_LENGTH * MINIMUM_LINE_L GCodePath* LayerPlan::getLatestPathWithConfig( const GCodePathConfig& config, - SpaceFillType space_fill_type, + const coord_t z_offset, + const SpaceFillType space_fill_type, const Ratio flow, const Ratio width_factor, - bool spiralize, + const bool spiralize, const Ratio speed_factor) { std::vector& paths = extruder_plans.back().paths; if (paths.size() > 0 && paths.back().config == config && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor - && paths.back().speed_factor == speed_factor && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between + && paths.back().speed_factor == speed_factor && paths.back().z_offset == z_offset && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between { return &paths.back(); } - paths.emplace_back(GCodePath{ .config = config, + paths.emplace_back(GCodePath{ .z_offset = z_offset, + .config = config, .mesh = current_mesh, .space_fill_type = space_fill_type, .flow = flow, @@ -326,14 +328,14 @@ std::optional> LayerPlan::getFirstTravelDestinationState( return ret; } -GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract) +GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract, const coord_t z_offset) { const GCodePathConfig& travel_config = configs_storage.travel_config_per_extruder[getExtruder()]; const RetractionConfig& retraction_config = current_mesh ? current_mesh->retraction_wipe_config.retraction_config : storage.retraction_wipe_config_per_extruder[getExtruder()].retraction_config; - GCodePath* path = getLatestPathWithConfig(travel_config, SpaceFillType::None); + GCodePath* path = getLatestPathWithConfig(travel_config, z_offset, SpaceFillType::None); bool combed = false; @@ -478,7 +480,7 @@ GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract) return ret; } -GCodePath& LayerPlan::addTravel_simple(Point p, GCodePath* path) +GCodePath& LayerPlan::addTravel_simple(const Point p, GCodePath* path) { bool is_first_travel_of_layer = ! static_cast(last_planned_position); if (is_first_travel_of_layer) @@ -488,7 +490,7 @@ GCodePath& LayerPlan::addTravel_simple(Point p, GCodePath* path) } if (path == nullptr) { - path = getLatestPathWithConfig(configs_storage.travel_config_per_extruder[getExtruder()], SpaceFillType::None); + path = getLatestPathWithConfig(configs_storage.travel_config_per_extruder[getExtruder()], 0, SpaceFillType::None); } path->points.push_back(p); last_planned_position = p; @@ -506,16 +508,16 @@ void LayerPlan::planPrime(const float& prime_blob_wipe_length) } void LayerPlan::addExtrusionMove( - Point p, + const Point p, const GCodePathConfig& config, - SpaceFillType space_fill_type, + const SpaceFillType space_fill_type, const Ratio& flow, const Ratio width_factor, - bool spiralize, - Ratio speed_factor, - double fan_speed) + const bool spiralize, + const Ratio speed_factor, + const double fan_speed) { - GCodePath* path = getLatestPathWithConfig(config, space_fill_type, flow, width_factor, spiralize, speed_factor); + GCodePath* path = getLatestPathWithConfig(config, config.z_offset, space_fill_type, flow, width_factor, spiralize, speed_factor); path->points.push_back(p); path->setFanSpeed(fan_speed); if (! static_cast(first_extrusion_acc_jerk)) @@ -537,7 +539,7 @@ void LayerPlan::addPolygon( { constexpr Ratio width_ratio = 1.0_r; // Not printed with variable line width. Point p0 = polygon[start_idx]; - addTravel(p0, always_retract); + addTravel(p0, always_retract, config.z_offset); const int direction = backwards ? -1 : 1; for (size_t point_idx = 1; point_idx < polygon.size(); point_idx++) { @@ -1250,7 +1252,7 @@ void LayerPlan::addLinesInGivenOrder( } else { - addTravel(start); + addTravel(start, false, config.z_offset); } Point p0 = start; @@ -1947,7 +1949,12 @@ void LayerPlan::writeGCode(GCodeExport& gcode) gcode.writeRetraction(retraction_config->retraction_config); } - if (! path.retract && path.config.isTravelPath() && path.points.size() == 1 && path.points[0] == gcode.getPositionXY() && z == gcode.getPositionZ()) + if (z > 0) + { + gcode.setZ(z + path.z_offset); + } + + if (! path.retract && path.config.isTravelPath() && path.points.size() == 1 && path.points[0] == gcode.getPositionXY() && (z + path.z_offset) == gcode.getPositionZ()) { // ignore travel moves to the current location to avoid needless change of acceleration/jerk continue; diff --git a/src/support.cpp b/src/support.cpp index 188f2b486d..b8de3c5247 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -1805,7 +1805,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh const double minimum_roof_area = mesh.settings.get("minimum_roof_area"); std::vector& support_layers = storage.support.supportLayers; - for (LayerIndex layer_idx = 0; layer_idx < static_cast(support_layers.size() - z_distance_top); layer_idx++) + for (LayerIndex layer_idx = static_cast(support_layers.size() - z_distance_top) - 1; layer_idx >= 0; --layer_idx) { const LayerIndex top_layer_idx_above{ std::min(LayerIndex{ support_layers.size() - 1 }, LayerIndex{ layer_idx + roof_layer_count + z_distance_top }) @@ -1818,6 +1818,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh Polygons roofs; generateSupportInterfaceLayer(global_support_areas_per_layer[layer_idx], mesh_outlines, roof_line_width, roof_outline_offset, minimum_roof_area, roofs); support_layers[layer_idx].support_roof.add(roofs); + support_layers[layer_idx].support_fractional_roof_top = roofs.difference(support_layers[layer_idx + 1].support_roof); scripta::log("support_interface_roofs", roofs, SectionType::SUPPORT, layer_idx); } From a07fb927de6ab53893db31c2af7c196d1c5ed8ae Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 21 Sep 2023 16:07:07 +0200 Subject: [PATCH 309/470] Proof-of-concept: fractional support z-distance. Instead of half-height layers in each area that could potentially be affected by non-layer-height modulo support z distance, actually calculate the proper z-offset that is needed for the fractional layer. Proof of concept mostly in the sense that the quality of the code added may not reflect our standards, and would also be missing functionality (for instance; what if we print without support-interface, or tree-support at all). part of CURA-11041, which is the proof-of-concept for CURA-10407 --- src/FffGcodeWriter.cpp | 12 +++++++----- src/support.cpp | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 359ea4fdf9..1af4378832 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2287,7 +2287,7 @@ bool FffGcodeWriter::processInsets( if (mesh_group_settings.get("support_enable")) { const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + 1; + const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height); // Previously '... +1', but now there is an extra fractional layer on top. const int support_layer_nr = gcode_layer.getLayerNr() - z_distance_top_layers; if (support_layer_nr > 0) @@ -2596,7 +2596,7 @@ void FffGcodeWriter::processTopBottom( { const coord_t layer_height = mesh_config.inset0_config.getLayerThickness(); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + 1; + const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height); // Previously '... +1', but now there is an extra fractional layer on top. support_layer_nr = layer_nr - z_distance_top_layers; } @@ -3327,7 +3327,9 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay support_roof_line_distance *= roof_extruder.settings.get("initial_layer_line_width_factor"); } - const auto half_layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height") / 2; + const auto layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); + const auto support_top_distance = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_top_distance"); + const coord_t leftover_support_distance = support_top_distance % layer_height; auto infill_outlines = { support_layer.support_roof.difference(support_layer.support_fractional_roof_top), support_layer.support_fractional_roof_top }; auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! @@ -3417,8 +3419,8 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay gcode_layer.configs_storage.support_roof_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); - current_roof_config.z_offset = -half_layer_height; - current_roof_config.flow /= 2.0; + current_roof_config.z_offset = -leftover_support_distance; + current_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); } return generated_something; } diff --git a/src/support.cpp b/src/support.cpp index b8de3c5247..ba1dc02a6f 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -794,7 +794,7 @@ void AreaSupport::generateOverhangAreasForMesh(SliceDataStorage& storage, SliceM // Don't generate overhang areas if the Z distance is higher than the objects we're generating support for. const coord_t layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + 1; // Support must always be 1 layer below overhang. + const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height); // Previously '... +1', but now there is an extra fractional layer on top. if (z_distance_top_layers + 1 > storage.print_layer_count) { return; @@ -1059,7 +1059,7 @@ void AreaSupport::generateSupportAreasForMesh( // early out const coord_t layer_thickness = mesh_group_settings.get("layer_height"); const coord_t z_distance_top = ((mesh.settings.get("support_roof_enable")) ? roof_settings : infill_settings).get("support_top_distance"); - const size_t layer_z_distance_top = round_up_divide(z_distance_top, layer_thickness) + 1; // support must always be 1 layer below overhang + const size_t layer_z_distance_top = round_up_divide(z_distance_top, layer_thickness); // Previously '... +1', but now there is an extra fractional layer on top. if (layer_z_distance_top + 1 > layer_count) { return; @@ -1805,7 +1805,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh const double minimum_roof_area = mesh.settings.get("minimum_roof_area"); std::vector& support_layers = storage.support.supportLayers; - for (LayerIndex layer_idx = static_cast(support_layers.size() - z_distance_top) - 1; layer_idx >= 0; --layer_idx) + for (LayerIndex layer_idx = static_cast(support_layers.size() - z_distance_top); layer_idx >= 0; --layer_idx) { const LayerIndex top_layer_idx_above{ std::min(LayerIndex{ support_layers.size() - 1 }, LayerIndex{ layer_idx + roof_layer_count + z_distance_top }) From 7bdbe9acc8137cbb23245768737d5da6e3d62f4a Mon Sep 17 00:00:00 2001 From: rburema Date: Thu, 21 Sep 2023 14:08:19 +0000 Subject: [PATCH 310/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 6 +++--- src/LayerPlan.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 1af4378832..866ab2ee8f 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3332,7 +3332,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay const coord_t leftover_support_distance = support_top_distance % layer_height; auto infill_outlines = { support_layer.support_roof.difference(support_layer.support_fractional_roof_top), support_layer.support_fractional_roof_top }; - auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! + auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! bool generated_something = false; for (auto infill_outline : infill_outlines) { @@ -3382,13 +3382,13 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay { gcode_layer.addPolygonsByOptimizer(wall, current_roof_config); } - if (!roof_polygons.empty()) + if (! roof_polygons.empty()) { constexpr bool force_comb_retract = false; gcode_layer.addTravel(roof_polygons[0][0], force_comb_retract); gcode_layer.addPolygonsByOptimizer(roof_polygons, current_roof_config); } - if (!roof_paths.empty()) + if (! roof_paths.empty()) { const GCodePathConfig& config = current_roof_config; constexpr bool retract_before_outer_wall = false; diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 4642c8bfd1..70a6152eb7 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -47,7 +47,8 @@ GCodePath* LayerPlan::getLatestPathWithConfig( { std::vector& paths = extruder_plans.back().paths; if (paths.size() > 0 && paths.back().config == config && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor - && paths.back().speed_factor == speed_factor && paths.back().z_offset == z_offset && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between + && paths.back().speed_factor == speed_factor && paths.back().z_offset == z_offset + && paths.back().mesh == current_mesh) // spiralize can only change when a travel path is in between { return &paths.back(); } From c6f5b9ae30c43f5b9faf59b1df427a275da77678 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 21 Sep 2023 16:51:29 +0200 Subject: [PATCH 311/470] Basically working prime tower without raft CURA-10993 --- src/FffGcodeWriter.cpp | 4 +- src/PrimeTower.cpp | 107 +++++++++++++++++++++-------------------- src/raft.cpp | 50 ++++++++++--------- 3 files changed, 86 insertions(+), 75 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 235f6f587e..0bc8b7a809 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -161,7 +161,9 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep } run_multiple_producers_ordered_consumer( - process_layer_starting_layer_nr, + // process_layer_starting_layer_nr, + -Raft::getTotalExtraLayers(), + // total_layers + Raft::getFillerLayerCount() - 1, total_layers, [&storage, total_layers, this](int layer_nr) { diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 3a4846c69c..b731011398 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -1,65 +1,69 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. -#include -#include +#include "PrimeTower.h" #include "Application.h" //To get settings. #include "ExtruderTrain.h" -#include "gcodeExport.h" -#include "infill.h" #include "LayerPlan.h" -#include "PrimeTower.h" #include "PrintFeature.h" -#include "raft.h" #include "Scene.h" #include "Slice.h" +#include "gcodeExport.h" +#include "infill.h" +#include "raft.h" #include "sliceDataStorage.h" -#define CIRCLE_RESOLUTION 32 //The number of vertices in each circle. +#include +#include + +#define CIRCLE_RESOLUTION 32 // The number of vertices in each circle. -namespace cura +namespace cura { PrimeTower::PrimeTower() -: wipe_from_middle(false) + : wipe_from_middle(false) { const Scene& scene = Application::getInstance().current_slice->scene; { EPlatformAdhesion adhesion_type = scene.current_mesh_group->settings.get("adhesion_type"); - //When we have multiple extruders sharing the same heater/nozzle, we expect that all the extruders have been + // When we have multiple extruders sharing the same heater/nozzle, we expect that all the extruders have been //'primed' by the print-start gcode script, but we don't know which one has been left at the tip of the nozzle - //and whether it needs 'purging' (before extruding a pure material) or not, so we need to prime (actually purge) - //each extruder before it is used for the model. This can done by the (per-extruder) brim lines or (per-extruder) - //skirt lines when they are used, but we need to do that inside the first prime-tower layer when they are not - //used (sacrifying for this purpose the usual single-extruder first layer, that would be better for prime-tower - //adhesion). - - multiple_extruders_on_first_layer = scene.current_mesh_group->settings.get("machine_extruders_share_nozzle") && ((adhesion_type != EPlatformAdhesion::SKIRT) && (adhesion_type != EPlatformAdhesion::BRIM)); + // and whether it needs 'purging' (before extruding a pure material) or not, so we need to prime (actually purge) + // each extruder before it is used for the model. This can done by the (per-extruder) brim lines or (per-extruder) + // skirt lines when they are used, but we need to do that inside the first prime-tower layer when they are not + // used (sacrifying for this purpose the usual single-extruder first layer, that would be better for prime-tower + // adhesion). + + multiple_extruders_on_first_layer = scene.current_mesh_group->settings.get("machine_extruders_share_nozzle") + && ((adhesion_type != EPlatformAdhesion::SKIRT) && (adhesion_type != EPlatformAdhesion::BRIM)); } - enabled = scene.current_mesh_group->settings.get("prime_tower_enable") - && scene.current_mesh_group->settings.get("prime_tower_min_volume") > 10 + enabled = scene.current_mesh_group->settings.get("prime_tower_enable") && scene.current_mesh_group->settings.get("prime_tower_min_volume") > 10 && scene.current_mesh_group->settings.get("prime_tower_size") > 10; - would_have_actual_tower = enabled; // Assume so for now. + would_have_actual_tower = enabled; // Assume so for now. extruder_count = scene.extruders.size(); extruder_order.resize(extruder_count); for (unsigned int extruder_nr = 0; extruder_nr < extruder_count; extruder_nr++) { - extruder_order[extruder_nr] = extruder_nr; //Start with default order, then sort. + extruder_order[extruder_nr] = extruder_nr; // Start with default order, then sort. } - //Sort from high adhesion to low adhesion. - const Scene* scene_pointer = &scene; //Communicate to lambda via pointer to prevent copy. - std::stable_sort(extruder_order.begin(), extruder_order.end(), [scene_pointer](const unsigned int& extruder_nr_a, const unsigned int& extruder_nr_b) -> bool - { - const Ratio adhesion_a = scene_pointer->extruders[extruder_nr_a].settings.get("material_adhesion_tendency"); - const Ratio adhesion_b = scene_pointer->extruders[extruder_nr_b].settings.get("material_adhesion_tendency"); - return adhesion_a < adhesion_b; - }); + // Sort from high adhesion to low adhesion. + const Scene* scene_pointer = &scene; // Communicate to lambda via pointer to prevent copy. + std::stable_sort( + extruder_order.begin(), + extruder_order.end(), + [scene_pointer](const unsigned int& extruder_nr_a, const unsigned int& extruder_nr_b) -> bool + { + const Ratio adhesion_a = scene_pointer->extruders[extruder_nr_a].settings.get("material_adhesion_tendency"); + const Ratio adhesion_b = scene_pointer->extruders[extruder_nr_b].settings.get("material_adhesion_tendency"); + return adhesion_a < adhesion_b; + }); } void PrimeTower::checkUsed(const SliceDataStorage& storage) @@ -78,7 +82,7 @@ void PrimeTower::checkUsed(const SliceDataStorage& storage) void PrimeTower::generateGroundpoly() { - if (!enabled) + if (! enabled) { return; } @@ -97,7 +101,8 @@ void PrimeTower::generateGroundpoly() void PrimeTower::generatePaths(const SliceDataStorage& storage) { - would_have_actual_tower = storage.max_print_height_second_to_last_extruder >= 0; //Maybe it turns out that we don't need a prime tower after all because there are no layer switches. + would_have_actual_tower + = storage.max_print_height_second_to_last_extruder >= 0; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. if (would_have_actual_tower && enabled) { generatePaths_denseInfill(); @@ -113,7 +118,7 @@ void PrimeTower::generatePaths_denseInfill() pattern_per_extruder.resize(extruder_count); pattern_per_extruder_layer0.resize(extruder_count); - coord_t cumulative_inset = 0; //Each tower shape is going to be printed inside the other. This is the inset we're doing for each extruder. + coord_t cumulative_inset = 0; // Each tower shape is going to be printed inside the other. This is the inset we're doing for each extruder. for (size_t extruder_nr : extruder_order) { const coord_t line_width = scene.extruders[extruder_nr].settings.get("prime_tower_line_width"); @@ -122,28 +127,28 @@ void PrimeTower::generatePaths_denseInfill() coord_t current_volume = 0; ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; - //Create the walls of the prime tower. + // Create the walls of the prime tower. unsigned int wall_nr = 0; for (; current_volume < required_volume; wall_nr++) { - //Create a new polygon with an offset from the outer polygon. + // Create a new polygon with an offset from the outer polygon. Polygons polygons = outer_poly.offset(-cumulative_inset - wall_nr * line_width - line_width / 2); pattern.polygons.add(polygons); current_volume += polygons.polygonLength() * line_width * layer_height * flow; - if (polygons.empty()) //Don't continue. We won't ever reach the required volume because it doesn't fit. + if (polygons.empty()) // Don't continue. We won't ever reach the required volume because it doesn't fit. { break; } } - //Only the most inside extruder needs to fill the inside of the prime tower - if (extruder_nr != extruder_order.back()) + // Only the most inside extruder needs to fill the inside of the prime tower + if (false /*extruder_nr != extruder_order.back()*/) { pattern_per_extruder_layer0 = pattern_per_extruder; } else { - //Generate the pattern for the first layer. + // Generate the pattern for the first layer. coord_t line_width_layer0 = line_width * scene.extruders[extruder_nr].settings.get("initial_layer_line_width_factor"); ExtrusionMoves& pattern_layer0 = pattern_per_extruder_layer0[extruder_nr]; @@ -151,7 +156,7 @@ void PrimeTower::generatePaths_denseInfill() // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the // first layer of the prime tower to not stick well. Polygons inset = outer_poly.offset(-cumulative_inset - line_width_layer0 / 2); - while (!inset.empty()) + while (! inset.empty()) { pattern_layer0.polygons.add(inset); inset = inset.offset(-line_width_layer0); @@ -183,7 +188,7 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la } const LayerIndex layer_nr = gcode_layer.getLayerNr(); - if (layer_nr < 0 || layer_nr > storage.max_print_height_second_to_last_extruder + 1) + if (/*layer_nr < 0 ||*/ layer_nr > storage.max_print_height_second_to_last_extruder + 1) { return; } @@ -207,7 +212,7 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la // post-wipe: if (post_wipe) { - //Make sure we wipe the old extruder on the prime tower. + // Make sure we wipe the old extruder on the prime tower. const Settings& previous_settings = Application::getInstance().current_slice->scene.extruders[prev_extruder].settings; const Point previous_nozzle_offset = Point(previous_settings.get("machine_nozzle_offset_x"), previous_settings.get("machine_nozzle_offset_y")); const Settings& new_settings = Application::getInstance().current_slice->scene.extruders[new_extruder].settings; @@ -220,9 +225,9 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t extruder_nr) const { - const ExtrusionMoves& pattern = (gcode_layer.getLayerNr() == -static_cast(Raft::getFillerLayerCount())) - ? pattern_per_extruder_layer0[extruder_nr] - : pattern_per_extruder[extruder_nr]; + const ExtrusionMoves& pattern + //= (gcode_layer.getLayerNr() == -static_cast(Raft::getFillerLayerCount())) ? pattern_per_extruder_layer0[extruder_nr] : pattern_per_extruder[extruder_nr]; + = (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) ? pattern_per_extruder_layer0[extruder_nr] : pattern_per_extruder[extruder_nr]; const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; @@ -234,7 +239,7 @@ void PrimeTower::subtractFromSupport(SliceDataStorage& storage) { const Polygons outside_polygon = outer_poly.getOutsidePolygons(); AABB outside_polygon_boundary_box(outside_polygon); - for(size_t layer = 0; layer <= (size_t)storage.max_print_height_second_to_last_extruder + 1 && layer < storage.support.supportLayers.size(); layer++) + for (size_t layer = 0; layer <= (size_t)storage.max_print_height_second_to_last_extruder + 1 && layer < storage.support.supportLayers.size(); layer++) { SupportLayer& support_layer = storage.support.supportLayers[layer]; // take the differences of the support infill parts and the prime tower area @@ -244,13 +249,13 @@ void PrimeTower::subtractFromSupport(SliceDataStorage& storage) void PrimeTower::gotoStartLocation(LayerPlan& gcode_layer, const int extruder_nr) const { - int current_start_location_idx = ((((extruder_nr + 1) * gcode_layer.getLayerNr()) % number_of_prime_tower_start_locations) - + number_of_prime_tower_start_locations) % number_of_prime_tower_start_locations; + int current_start_location_idx = ((((extruder_nr + 1) * gcode_layer.getLayerNr()) % number_of_prime_tower_start_locations) + number_of_prime_tower_start_locations) + % number_of_prime_tower_start_locations; const ClosestPolygonPoint wipe_location = prime_tower_start_locations[current_start_location_idx]; const ExtruderTrain& train = Application::getInstance().current_slice->scene.extruders[extruder_nr]; - const coord_t inward_dist = train.settings.get("machine_nozzle_size") * 3 / 2 ; + const coord_t inward_dist = train.settings.get("machine_nozzle_size") * 3 / 2; const coord_t start_dist = train.settings.get("machine_nozzle_size") * 2; const Point prime_end = PolygonUtils::moveInsideDiagonally(wipe_location, inward_dist); const Point outward_dir = wipe_location.location - prime_end; @@ -259,4 +264,4 @@ void PrimeTower::gotoStartLocation(LayerPlan& gcode_layer, const int extruder_nr gcode_layer.addTravel(prime_start); } -}//namespace cura +} // namespace cura diff --git a/src/raft.cpp b/src/raft.cpp index 96c81be90b..16134f55bc 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -1,17 +1,18 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. -#include +#include "raft.h" #include "Application.h" //To get settings. #include "ExtruderTrain.h" -#include "raft.h" #include "Slice.h" +#include "settings/EnumSettings.h" //For EPlatformAdhesion. #include "sliceDataStorage.h" #include "support.h" -#include "settings/EnumSettings.h" //For EPlatformAdhesion. #include "utils/math.h" +#include + namespace cura { @@ -21,24 +22,27 @@ void Raft::generate(SliceDataStorage& storage) const Settings& settings = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("raft_base_extruder_nr").settings; const coord_t distance = settings.get("raft_margin"); constexpr bool include_support = true; - constexpr bool dont_include_prime_tower = false; // Prime tower raft will be handled separately in 'storage.primeRaftOutline'; see below. + constexpr bool dont_include_prime_tower = false; // Prime tower raft will be handled separately in 'storage.primeRaftOutline'; see below. storage.raftOutline = storage.getLayerOutlines(0, include_support, dont_include_prime_tower).offset(distance, ClipperLib::jtRound); const coord_t shield_line_width_layer0 = settings.get("skirt_brim_line_width"); if (storage.draft_protection_shield.size() > 0) { - Polygons draft_shield_raft = storage.draft_protection_shield.offset(shield_line_width_layer0) // start half a line width outside shield - .difference(storage.draft_protection_shield.offset(-distance - shield_line_width_layer0 / 2, ClipperLib::jtRound)); // end distance inside shield + Polygons draft_shield_raft + = storage.draft_protection_shield + .offset(shield_line_width_layer0) // start half a line width outside shield + .difference(storage.draft_protection_shield.offset(-distance - shield_line_width_layer0 / 2, ClipperLib::jtRound)); // end distance inside shield storage.raftOutline = storage.raftOutline.unionPolygons(draft_shield_raft); } if (storage.oozeShield.size() > 0 && storage.oozeShield[0].size() > 0) { const Polygons& ooze_shield = storage.oozeShield[0]; - Polygons ooze_shield_raft = ooze_shield.offset(shield_line_width_layer0) // start half a line width outside shield + Polygons ooze_shield_raft = ooze_shield + .offset(shield_line_width_layer0) // start half a line width outside shield .difference(ooze_shield.offset(-distance - shield_line_width_layer0 / 2, ClipperLib::jtRound)); // end distance inside shield storage.raftOutline = storage.raftOutline.unionPolygons(ooze_shield_raft); } - if(settings.get("raft_remove_inside_corners")) + if (settings.get("raft_remove_inside_corners")) { storage.raftOutline.makeConvex(); } @@ -62,25 +66,25 @@ void Raft::generate(SliceDataStorage& storage) } } - storage.primeRaftOutline = storage.primeTower.outer_poly.offset(distance, ClipperLib::jtRound); - // NOTE: the raft doesn't take the prime tower brim into account, because it's (currently) not being printed when printing a raft - if (settings.get("raft_remove_inside_corners")) - { - storage.primeRaftOutline = storage.primeRaftOutline.unionPolygons(storage.raftOutline); - storage.primeRaftOutline.makeConvex(); - } - storage.primeRaftOutline = storage.primeRaftOutline.difference(storage.raftOutline); // In case of overlaps. + // storage.primeRaftOutline = storage.primeTower.outer_poly.offset(distance, ClipperLib::jtRound); + // NOTE: the raft doesn't take the prime tower brim into account, because it's (currently) not being printed when printing a raft + // if (settings.get("raft_remove_inside_corners")) + //{ + // storage.primeRaftOutline = storage.primeRaftOutline.unionPolygons(storage.raftOutline); + // storage.primeRaftOutline.makeConvex(); + // } + // storage.primeRaftOutline = storage.primeRaftOutline.difference(storage.raftOutline); // In case of overlaps. } coord_t Raft::getTotalThickness() { - const Settings& mesh_group_settings =Application::getInstance().current_slice->scene.current_mesh_group->settings; + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; const ExtruderTrain& base_train = mesh_group_settings.get("raft_base_extruder_nr"); const ExtruderTrain& interface_train = mesh_group_settings.get("raft_interface_extruder_nr"); const ExtruderTrain& surface_train = mesh_group_settings.get("raft_surface_extruder_nr"); return base_train.settings.get("raft_base_thickness") - + interface_train.settings.get("raft_interface_layers") * interface_train.settings.get("raft_interface_thickness") - + surface_train.settings.get("raft_surface_layers") * surface_train.settings.get("raft_surface_thickness"); + + interface_train.settings.get("raft_interface_layers") * interface_train.settings.get("raft_interface_thickness") + + surface_train.settings.get("raft_surface_layers") * surface_train.settings.get("raft_surface_thickness"); } coord_t Raft::getZdiffBetweenRaftAndLayer0() @@ -115,7 +119,7 @@ coord_t Raft::getFillerLayerHeight() size_t Raft::getTotalExtraLayers() { - const Settings& mesh_group_settings =Application::getInstance().current_slice->scene.current_mesh_group->settings; + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; const ExtruderTrain& base_train = mesh_group_settings.get("raft_base_extruder_nr"); const ExtruderTrain& interface_train = mesh_group_settings.get("raft_interface_extruder_nr"); const ExtruderTrain& surface_train = mesh_group_settings.get("raft_surface_extruder_nr"); @@ -127,4 +131,4 @@ size_t Raft::getTotalExtraLayers() } -}//namespace cura +} // namespace cura From f0e4ababa60dc5c78303c382460d1e56a0a04f7a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 21 Sep 2023 17:00:40 +0200 Subject: [PATCH 312/470] Add brim on prime tower without raft CURA-10993 --- src/PrimeTower.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index b731011398..d6ff7a3fcd 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -155,11 +155,16 @@ void PrimeTower::generatePaths_denseInfill() // Generate a concentric infill pattern in the form insets for the prime tower's first layer instead of using // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the // first layer of the prime tower to not stick well. - Polygons inset = outer_poly.offset(-cumulative_inset - line_width_layer0 / 2); - while (! inset.empty()) + Polygons inset = outer_poly.offset(-(-cumulative_inset - line_width_layer0 / 2)); + /*while (! inset.empty()) { pattern_layer0.polygons.add(inset); inset = inset.offset(-line_width_layer0); + }*/ + for (int i = 0; i < 15; ++i) + { + pattern_layer0.polygons.add(inset); + inset = inset.offset(line_width_layer0); } } cumulative_inset += wall_nr * line_width; @@ -225,14 +230,18 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t extruder_nr) const { - const ExtrusionMoves& pattern - //= (gcode_layer.getLayerNr() == -static_cast(Raft::getFillerLayerCount())) ? pattern_per_extruder_layer0[extruder_nr] : pattern_per_extruder[extruder_nr]; - = (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) ? pattern_per_extruder_layer0[extruder_nr] : pattern_per_extruder[extruder_nr]; - const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + + if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) + { + const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); + gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); + } } void PrimeTower::subtractFromSupport(SliceDataStorage& storage) From 22824f9d44fdea70471b0f64c4a3b95dd06b5d83 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 22 Sep 2023 09:23:23 +0200 Subject: [PATCH 313/470] Fixed missing prime tower hull on some layers CURA-10993 --- src/FffGcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 0bc8b7a809..520a8b42d2 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1346,7 +1346,7 @@ std::vector FffGcodeWriter::getUsedExtrudersOnLayerExcludingStartingExtr std::vector extruder_is_used_on_this_layer = storage.getExtrudersUsed(layer_nr); // The outermost prime tower extruder is always used if there is a prime tower, apart on layers with negative index (e.g. for the raft) - if (mesh_group_settings.get("prime_tower_enable") && layer_nr >= 0 && layer_nr <= storage.max_print_height_second_to_last_extruder) + if (mesh_group_settings.get("prime_tower_enable") && /*layer_nr >= 0 &&*/ layer_nr <= storage.max_print_height_second_to_last_extruder) { extruder_is_used_on_this_layer[storage.primeTower.extruder_order[0]] = true; } From cc01931e836a7d00ae2c6032d5d2e904af35fa8b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 22 Sep 2023 10:28:53 +0200 Subject: [PATCH 314/470] Higher brim for primer tower to make it stronger CURA-10993 --- src/PrimeTower.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index d6ff7a3fcd..316be75b3a 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -236,7 +236,8 @@ void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t ext gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); - if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) + // if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) + if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) { const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); From 16d1a84567072bb7f39b18b2171d7cfea9d0e1c9 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 22 Sep 2023 14:51:52 +0200 Subject: [PATCH 315/470] Fix crash in proof-of-concept code. part of CURA-11041 --- src/support.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support.cpp b/src/support.cpp index ba1dc02a6f..a4cf4a711e 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -1805,7 +1805,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh const double minimum_roof_area = mesh.settings.get("minimum_roof_area"); std::vector& support_layers = storage.support.supportLayers; - for (LayerIndex layer_idx = static_cast(support_layers.size() - z_distance_top); layer_idx >= 0; --layer_idx) + for (LayerIndex layer_idx = static_cast(support_layers.size() - z_distance_top) - 1; layer_idx >= 0; --layer_idx) { const LayerIndex top_layer_idx_above{ std::min(LayerIndex{ support_layers.size() - 1 }, LayerIndex{ layer_idx + roof_layer_count + z_distance_top }) From 3820d3b8ad8eb67195ef93c446324dcf7388aa0a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 22 Sep 2023 15:05:46 +0200 Subject: [PATCH 316/470] Proof-of-concept. Attempt to fix newly introduced small extrusions. done as part of CURA-11041 --- src/FffGcodeWriter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 866ab2ee8f..3746a9ada2 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3331,10 +3331,14 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay const auto support_top_distance = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_top_distance"); const coord_t leftover_support_distance = support_top_distance % layer_height; - auto infill_outlines = { support_layer.support_roof.difference(support_layer.support_fractional_roof_top), support_layer.support_fractional_roof_top }; + std::vector infill_outlines = + { + Simplify(roof_extruder.settings).polygon(support_layer.support_roof.difference(support_layer.support_fractional_roof_top)), + Simplify(roof_extruder.settings).polygon(support_layer.support_fractional_roof_top) + }; auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! bool generated_something = false; - for (auto infill_outline : infill_outlines) + for (auto& infill_outline : infill_outlines) { Polygons wall; // make sure there is a wall if this is on the first layer From 94d6007a7f7b6e4a11e2e8d77acad0e60a645c4a Mon Sep 17 00:00:00 2001 From: rburema Date: Fri, 22 Sep 2023 13:07:21 +0000 Subject: [PATCH 317/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 3746a9ada2..9361f1ff10 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3331,11 +3331,8 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay const auto support_top_distance = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_top_distance"); const coord_t leftover_support_distance = support_top_distance % layer_height; - std::vector infill_outlines = - { - Simplify(roof_extruder.settings).polygon(support_layer.support_roof.difference(support_layer.support_fractional_roof_top)), - Simplify(roof_extruder.settings).polygon(support_layer.support_fractional_roof_top) - }; + std::vector infill_outlines = { Simplify(roof_extruder.settings).polygon(support_layer.support_roof.difference(support_layer.support_fractional_roof_top)), + Simplify(roof_extruder.settings).polygon(support_layer.support_fractional_roof_top) }; auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! bool generated_something = false; for (auto& infill_outline : infill_outlines) From 48e83717de4465e7110003e48697f9d49bf3afc8 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 22 Sep 2023 16:42:38 +0200 Subject: [PATCH 318/470] Print prime tower during raft print CURA-10993 --- src/FffGcodeWriter.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 520a8b42d2..5554355ba3 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -143,21 +143,21 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep findLayerSeamsForSpiralize(storage, total_layers); } - int process_layer_starting_layer_nr = 0; + // int process_layer_starting_layer_nr = 0; const bool has_raft = scene.current_mesh_group->settings.get("adhesion_type") == EPlatformAdhesion::RAFT; if (has_raft) { processRaft(storage); // process filler layers to fill the airgap with helper object (support etc) so that they stick better to the raft. // only process the filler layers if there is anything to print in them. - for (bool extruder_is_used_in_filler_layers : storage.getExtrudersUsed(-1)) + /*for (bool extruder_is_used_in_filler_layers : storage.getExtrudersUsed(-1)) { if (extruder_is_used_in_filler_layers) { process_layer_starting_layer_nr = -Raft::getFillerLayerCount(); break; } - } + }*/ } run_multiple_producers_ordered_consumer( @@ -687,6 +687,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); + + setExtruder_addPrime(storage, gcode_layer, 0); } const coord_t interface_layer_height = interface_settings.get("raft_interface_thickness"); @@ -790,6 +792,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); + + setExtruder_addPrime(storage, gcode_layer, 0); } const coord_t surface_layer_height = surface_settings.get("raft_surface_thickness"); @@ -894,6 +898,8 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) } layer_plan_buffer.handle(gcode_layer, gcode); + + setExtruder_addPrime(storage, gcode_layer, 0); } } @@ -1014,7 +1020,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn // later in the print a prime tower is needed. // - prime tower is already printed this layer (only applicable for more than 2 extruders). // The setExtruder_addPrime takes care of this. - if (extruder_nr != extruder_order.front() || extruder_order.size() == 1) + if (extruder_nr != extruder_order.front() || (extruder_order.size() == 1 && layer_nr >= 0) || extruder_nr == 0) { setExtruder_addPrime(storage, gcode_layer, extruder_nr); } @@ -1045,7 +1051,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn // Always print a prime tower before switching extruder. Unless: // - The prime tower is already printed this layer (setExtruder_addPrime takes care of this). // - this is the last extruder of the layer, since the next layer will start with the same extruder. - if (extruder_nr != extruder_order.back()) + if (extruder_nr != extruder_order.back() && layer_nr >= 0) { setExtruder_addPrime(storage, gcode_layer, extruder_nr); } From e48316eba6edb6f07022bb5b0d69e04b1ac0dee5 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 25 Sep 2023 10:34:52 +0200 Subject: [PATCH 319/470] Better prime tower raft CURA-10993 --- src/FffGcodeWriter.cpp | 14 +++++++------- src/PrimeTower.cpp | 30 ++++++++++++++++++++---------- src/gcodeExport.cpp | 2 +- src/raft.cpp | 10 +++++++++- 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 5554355ba3..8f7d993811 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -143,28 +143,28 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep findLayerSeamsForSpiralize(storage, total_layers); } - // int process_layer_starting_layer_nr = 0; + int process_layer_starting_layer_nr = 0; const bool has_raft = scene.current_mesh_group->settings.get("adhesion_type") == EPlatformAdhesion::RAFT; if (has_raft) { processRaft(storage); // process filler layers to fill the airgap with helper object (support etc) so that they stick better to the raft. // only process the filler layers if there is anything to print in them. - /*for (bool extruder_is_used_in_filler_layers : storage.getExtrudersUsed(-1)) + for (bool extruder_is_used_in_filler_layers : storage.getExtrudersUsed(-1)) { if (extruder_is_used_in_filler_layers) { process_layer_starting_layer_nr = -Raft::getFillerLayerCount(); break; } - }*/ + } } run_multiple_producers_ordered_consumer( - // process_layer_starting_layer_nr, - -Raft::getTotalExtraLayers(), - // total_layers + Raft::getFillerLayerCount() - 1, - total_layers, + process_layer_starting_layer_nr, + //-Raft::getTotalExtraLayers(), + total_layers + Raft::getFillerLayerCount() - 1, + // total_layers, [&storage, total_layers, this](int layer_nr) { return &processLayer(storage, layer_nr, total_layers); diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 316be75b3a..9845eff054 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -149,22 +149,24 @@ void PrimeTower::generatePaths_denseInfill() else { // Generate the pattern for the first layer. - coord_t line_width_layer0 = line_width * scene.extruders[extruder_nr].settings.get("initial_layer_line_width_factor"); + const coord_t line_width_layer0 = scene.extruders[extruder_nr].settings.get("raft_base_line_width"); ExtrusionMoves& pattern_layer0 = pattern_per_extruder_layer0[extruder_nr]; // Generate a concentric infill pattern in the form insets for the prime tower's first layer instead of using // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the // first layer of the prime tower to not stick well. - Polygons inset = outer_poly.offset(-(-cumulative_inset - line_width_layer0 / 2)); - /*while (! inset.empty()) + Polygons inset = outer_poly.offset(-cumulative_inset - line_width_layer0 / 2); + while (! inset.empty()) { pattern_layer0.polygons.add(inset); inset = inset.offset(-line_width_layer0); - }*/ + } + + Polygons outset = outer_poly.offset(cumulative_inset + line_width_layer0 / 2); for (int i = 0; i < 15; ++i) { - pattern_layer0.polygons.add(inset); - inset = inset.offset(line_width_layer0); + pattern_layer0.polygons.add(outset); + outset = outset.offset(line_width_layer0); } } cumulative_inset += wall_nr * line_width; @@ -230,19 +232,27 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t extruder_nr) const { - const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + const GCodePathConfig& config + = gcode_layer.getLayerNr() < 0 ? gcode_layer.configs_storage.raft_base_config : gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); - gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); // if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) { + const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; + const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); } + else + { + const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + + const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); + gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + } } void PrimeTower::subtractFromSupport(SliceDataStorage& storage) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index caff200811..799ac84e0c 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -1498,7 +1498,7 @@ void GCodeExport::writeTemperatureCommand(const size_t extruder, const Temperatu *output_stream << " T" << extruder; } #ifdef ASSERT_INSANE_OUTPUT - assert(temperature >= 0); + // assert(temperature >= 0); #endif // ASSERT_INSANE_OUTPUT *output_stream << " S" << PrecisionedDouble{ 1, temperature } << new_line; if (extruder != current_extruder && always_write_active_tool) diff --git a/src/raft.cpp b/src/raft.cpp index 16134f55bc..384958afc4 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -113,7 +113,15 @@ coord_t Raft::getFillerLayerHeight() const coord_t normal_layer_height = mesh_group_settings.get("layer_height"); return normal_layer_height; } - return round_divide(getZdiffBetweenRaftAndLayer0(), getFillerLayerCount()); + + if (getFillerLayerCount() != 0) + { + return round_divide(getZdiffBetweenRaftAndLayer0(), getFillerLayerCount()); + } + else + { + return mesh_group_settings.get("layer_height"); + } } From 9bcfe21624ebe5ac0f3c4f6e9460bade96a0ba69 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 25 Sep 2023 13:49:16 +0200 Subject: [PATCH 320/470] Better prime tower raft and fixed supports into raft CURA-10993 --- include/PrimeTower.h | 1 + src/FffGcodeWriter.cpp | 4 +-- src/PrimeTower.cpp | 79 +++++++++++++++++++++++++++++++++++++----- src/gcodeExport.cpp | 2 +- 4 files changed, 74 insertions(+), 12 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index c0e50685bf..c2909295d8 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -41,6 +41,7 @@ class PrimeTower std::vector pattern_per_extruder; //!< For each extruder the pattern to print on all layers of the prime tower. std::vector pattern_per_extruder_layer0; //!< For each extruder the pattern to print on the first layer + std::vector pattern_per_extruder_layer_raft; //!< For each extruder the pattern to print on the raft layers public: bool enabled; //!< Whether the prime tower is enabled. diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 8f7d993811..bd29bcef24 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -163,8 +163,8 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep run_multiple_producers_ordered_consumer( process_layer_starting_layer_nr, //-Raft::getTotalExtraLayers(), - total_layers + Raft::getFillerLayerCount() - 1, - // total_layers, + // total_layers + Raft::getFillerLayerCount() - 1, + total_layers, [&storage, total_layers, this](int layer_nr) { return &processLayer(storage, layer_nr, total_layers); diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 9845eff054..b0bf9e853e 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -117,6 +117,7 @@ void PrimeTower::generatePaths_denseInfill() const coord_t layer_height = mesh_group_settings.get("layer_height"); pattern_per_extruder.resize(extruder_count); pattern_per_extruder_layer0.resize(extruder_count); + pattern_per_extruder_layer_raft.resize(extruder_count); coord_t cumulative_inset = 0; // Each tower shape is going to be printed inside the other. This is the inset we're doing for each extruder. for (size_t extruder_nr : extruder_order) @@ -150,7 +151,7 @@ void PrimeTower::generatePaths_denseInfill() { // Generate the pattern for the first layer. const coord_t line_width_layer0 = scene.extruders[extruder_nr].settings.get("raft_base_line_width"); - ExtrusionMoves& pattern_layer0 = pattern_per_extruder_layer0[extruder_nr]; + ExtrusionMoves& pattern_layer_raft = pattern_per_extruder_layer_raft[extruder_nr]; // Generate a concentric infill pattern in the form insets for the prime tower's first layer instead of using // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the @@ -158,16 +159,29 @@ void PrimeTower::generatePaths_denseInfill() Polygons inset = outer_poly.offset(-cumulative_inset - line_width_layer0 / 2); while (! inset.empty()) { - pattern_layer0.polygons.add(inset); + pattern_layer_raft.polygons.add(inset); inset = inset.offset(-line_width_layer0); } Polygons outset = outer_poly.offset(cumulative_inset + line_width_layer0 / 2); for (int i = 0; i < 15; ++i) { - pattern_layer0.polygons.add(outset); + pattern_layer_raft.polygons.add(outset); outset = outset.offset(line_width_layer0); } + + // Generate the pattern for the raft layers + ExtrusionMoves& pattern_layer0 = pattern_per_extruder_layer0[extruder_nr]; + + // Generate a concentric infill pattern in the form insets for the prime tower's first layer instead of using + // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the + // first layer of the prime tower to not stick well. + outset = outer_poly.offset(cumulative_inset + line_width / 2); + for (int i = 0; i < 15; ++i) + { + pattern_layer0.polygons.add(outset); + outset = outset.offset(line_width); + } } cumulative_inset += wall_nr * line_width; } @@ -235,24 +249,71 @@ void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t ext const GCodePathConfig& config = gcode_layer.getLayerNr() < 0 ? gcode_layer.configs_storage.raft_base_config : gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - - // if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) - if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) + if (gcode_layer.getLayerNr() == -Raft::getTotalExtraLayers() && extruder_nr == 0) { + // Specific case for first layer => very high adhesion const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; - const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); - gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); + const ExtrusionMoves& pattern_raft = pattern_per_extruder_layer_raft[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern_raft.polygons, config); + gcode_layer.addLinesByOptimizer(pattern_raft.lines, config, SpaceFillType::Lines); } else { const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + // Actual prime pattern + const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); + gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + + if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) + { + const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); + gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); + } + } + + /* + if (gcode_layer.getLayerNr() > -static_cast(Raft::getTotalExtraLayers())) + { + const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + + // Actual prime pattern const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + + if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) + { + const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); + gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); + } } +*/ + + // if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) + /*if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) + { + if (gcode_layer.getLayerNr() == -Raft::getTotalExtraLayers()) + { + const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; + + const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); + gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); + } + else + { + const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + + const ExtrusionMoves& pattern_raft = pattern_per_extruder_layer_raft[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern_raft.polygons, config); + gcode_layer.addLinesByOptimizer(pattern_raft.lines, config, SpaceFillType::Lines); + } + }*/ } void PrimeTower::subtractFromSupport(SliceDataStorage& storage) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index 799ac84e0c..caff200811 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -1498,7 +1498,7 @@ void GCodeExport::writeTemperatureCommand(const size_t extruder, const Temperatu *output_stream << " T" << extruder; } #ifdef ASSERT_INSANE_OUTPUT - // assert(temperature >= 0); + assert(temperature >= 0); #endif // ASSERT_INSANE_OUTPUT *output_stream << " S" << PrecisionedDouble{ 1, temperature } << new_line; if (extruder != current_extruder && always_write_active_tool) From 1038eda887fa9b5b3b0158bdd104b61b53e944d7 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Mon, 25 Sep 2023 11:49:57 +0000 Subject: [PATCH 321/470] Applied clang-format. --- include/PrimeTower.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index c2909295d8..4bca473177 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -1,15 +1,15 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef PRIME_TOWER_H #define PRIME_TOWER_H -#include - #include "utils/polygon.h" // Polygons #include "utils/polygonUtils.h" -namespace cura +#include + +namespace cura { class SliceDataStorage; @@ -73,7 +73,7 @@ class PrimeTower /*! * Generate the prime tower area to be used on each layer - * + * * Fills \ref PrimeTower::inner_poly and sets \ref PrimeTower::middle */ void generateGroundpoly(); @@ -85,7 +85,7 @@ class PrimeTower /*! * Add path plans for the prime tower to the \p gcode_layer - * + * * \param storage where to get settings from; where to get the maximum height of the prime tower from * \param[in,out] gcode_layer Where to get the current extruder from; where to store the generated layer paths * \param prev_extruder The previous extruder with which paths were planned; from which extruder a switch was made @@ -102,10 +102,9 @@ class PrimeTower void subtractFromSupport(SliceDataStorage& storage); private: - /*! * \see WipeTower::generatePaths - * + * * Generate the extrude paths for each extruder on even and odd layers * Fill the ground poly with dense infill. */ @@ -139,8 +138,6 @@ class PrimeTower }; - - -}//namespace cura +} // namespace cura #endif // PRIME_TOWER_H From 43955a199c60077b74012d9a47297c694e5c2d91 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 25 Sep 2023 13:53:00 +0200 Subject: [PATCH 322/470] Support brim printed only at layer 0 CURA-10968 --- src/FffGcodeWriter.cpp | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 235f6f587e..0721bd7628 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1232,24 +1232,28 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer + //support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. - const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - if (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr) + if (layer_nr == 0) { - total_line_count += storage.support_brim.size(); - Polygons support_brim_lines = storage.support_brim; - support_brim_lines.toPolylines(); - gcode_layer.addLinesByOptimizer( - support_brim_lines, - gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], - SpaceFillType::PolyLines, - enable_travel_optimization, - wipe_dist, - flow_ratio, - start_close_to, - fan_speed, - reverse_print_direction, - order_requirements = {}); + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; + if (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr) + { + total_line_count += storage.support_brim.size(); + Polygons support_brim_lines = storage.support_brim; + support_brim_lines.toPolylines(); + gcode_layer.addLinesByOptimizer( + support_brim_lines, + gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], + SpaceFillType::PolyLines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + start_close_to, + fan_speed, + reverse_print_direction, + order_requirements = {}); + } } } From 26c7522af035fc5e629f72b398be78f8541f0a1f Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Mon, 25 Sep 2023 11:53:42 +0000 Subject: [PATCH 323/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 0721bd7628..ef5d748533 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1232,7 +1232,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer - //support brim is only added in layer 0 + // support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. if (layer_nr == 0) { From e2203b07fd02668c1c7010c596ef84f6ff766b69 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 25 Sep 2023 13:55:28 +0200 Subject: [PATCH 324/470] Comment fix CURA-10968 --- src/FffGcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index ef5d748533..68591de295 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1232,7 +1232,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer - // support brim is only added in layer 0 + // Support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. if (layer_nr == 0) { From 321d564cda3865c4be12f8c29ccaeac9219a535f Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 25 Sep 2023 14:53:50 +0200 Subject: [PATCH 325/470] Group outer wall order For the gradual flow we do want to group the outer walls in order to limit the number of flow changes. CURA-11082 --- src/InsetOrderOptimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InsetOrderOptimizer.cpp b/src/InsetOrderOptimizer.cpp index 006296fc68..86305d27b5 100644 --- a/src/InsetOrderOptimizer.cpp +++ b/src/InsetOrderOptimizer.cpp @@ -93,7 +93,7 @@ bool InsetOrderOptimizer::addToLayer() constexpr bool detect_loops = false; constexpr Polygons* combing_boundary = nullptr; - constexpr bool group_outer_walls = false; + const auto group_outer_walls = false; // When we alternate walls, also alternate the direction at which the first wall starts in. // On even layers we start with normal direction, on odd layers with inverted direction. PathOrderOptimizer From ec8bcfc3ad346fa21dde94b188caa84e18fcae06 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 25 Sep 2023 15:05:24 +0200 Subject: [PATCH 326/470] Add setting to group outer walls CURA-11082 --- src/InsetOrderOptimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InsetOrderOptimizer.cpp b/src/InsetOrderOptimizer.cpp index 86305d27b5..05b1fa3f3f 100644 --- a/src/InsetOrderOptimizer.cpp +++ b/src/InsetOrderOptimizer.cpp @@ -93,7 +93,7 @@ bool InsetOrderOptimizer::addToLayer() constexpr bool detect_loops = false; constexpr Polygons* combing_boundary = nullptr; - const auto group_outer_walls = false; + const auto group_outer_walls = settings.get("group_outer_walls"); // When we alternate walls, also alternate the direction at which the first wall starts in. // On even layers we start with normal direction, on odd layers with inverted direction. PathOrderOptimizer From ec98763e4218ba9fd991d8396e1d4565d6116913 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 25 Sep 2023 16:45:49 +0200 Subject: [PATCH 327/470] Fix bad temperature crash CURA-10993 --- src/FffGcodeWriter.cpp | 12 ++++++------ src/PrimeTower.cpp | 40 ---------------------------------------- 2 files changed, 6 insertions(+), 46 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index bd29bcef24..7d96e81eb6 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -685,10 +685,10 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raftLines.clear(); } + setExtruder_addPrime(storage, gcode_layer, 0); + layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); - - setExtruder_addPrime(storage, gcode_layer, 0); } const coord_t interface_layer_height = interface_settings.get("raft_interface_thickness"); @@ -790,10 +790,10 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_lines.clear(); } + setExtruder_addPrime(storage, gcode_layer, 0); + layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); - - setExtruder_addPrime(storage, gcode_layer, 0); } const coord_t surface_layer_height = surface_settings.get("raft_surface_thickness"); @@ -897,9 +897,9 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_lines.clear(); } - layer_plan_buffer.handle(gcode_layer, gcode); - setExtruder_addPrime(storage, gcode_layer, 0); + + layer_plan_buffer.handle(gcode_layer, gcode); } } diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index b0bf9e853e..3818d8e3f8 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -274,46 +274,6 @@ void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t ext gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); } } - - /* - if (gcode_layer.getLayerNr() > -static_cast(Raft::getTotalExtraLayers())) - { - const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - - // Actual prime pattern - const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); - gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); - - if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) - { - const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); - gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); - } - } -*/ - - // if (gcode_layer.getLayerNr() == -static_cast(Raft::getTotalExtraLayers())) - /*if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) - { - if (gcode_layer.getLayerNr() == -Raft::getTotalExtraLayers()) - { - const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; - - const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); - gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); - } - else - { - const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - - const ExtrusionMoves& pattern_raft = pattern_per_extruder_layer_raft[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern_raft.polygons, config); - gcode_layer.addLinesByOptimizer(pattern_raft.lines, config, SpaceFillType::Lines); - } - }*/ } void PrimeTower::subtractFromSupport(SliceDataStorage& storage) From d78bb6de2d5e85d054b7b46051661a98e75cd602 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 26 Sep 2023 19:59:27 +0200 Subject: [PATCH 328/470] Add missing 'perform_prime' member-variable. Note that this needs the updated GRPC definitions as well! -- This caused that variable to always be (re)set to false, even when no plugin was present, due to the 'identity' conversion taking place. (Maybe we should stop that in general, since that implies that we copy the data even when no plugin is present.) In any case, even if it wouldn't have caused this particular bug, it's an oversight that should be fixed anyway. should fix CURA-11084 --- src/plugins/converters.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/converters.cpp b/src/plugins/converters.cpp index 6e93f34afd..72a8166de7 100644 --- a/src/plugins/converters.cpp +++ b/src/plugins/converters.cpp @@ -345,6 +345,7 @@ gcode_paths_modify_request::value_type gcode_path->set_retract(path.retract); gcode_path->set_unretract_before_last_travel_move(path.unretract_before_last_travel_move); gcode_path->set_perform_z_hop(path.perform_z_hop); + gcode_path->set_perform_prime(path.perform_prime); gcode_path->set_skip_agressive_merge_hint(path.skip_agressive_merge_hint); gcode_path->set_done(path.done); gcode_path->set_fan_speed(path.getFanSpeed()); @@ -458,6 +459,7 @@ gcode_paths_modify_response::native_value_type .retract = gcode_path_msg.retract(), .unretract_before_last_travel_move = gcode_path_msg.unretract_before_last_travel_move(), .perform_z_hop = gcode_path_msg.perform_z_hop(), + .perform_prime = gcode_path_msg.perform_prime(), .skip_agressive_merge_hint = gcode_path_msg.skip_agressive_merge_hint(), .done = gcode_path_msg.done(), .fan_speed = gcode_path_msg.fan_speed(), From b996cd013d083fb6ca3b19a8ad5ea0952e2fe0be Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 26 Sep 2023 21:15:38 +0200 Subject: [PATCH 329/470] Proof-of-concept. Fix partial-layer-height difference for (support) line-fill. Part of the partial layer-height support distance proof of concept: CURA-11041 --- src/FffGcodeWriter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 9361f1ff10..1fab3e3005 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3375,6 +3375,9 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) { + current_roof_config.z_offset = -leftover_support_distance; + current_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); + continue; // We didn't create any support roof. } generated_something = true; // We _did_ create at least some support roof. @@ -3417,7 +3420,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay } gcode_layer.addLinesByOptimizer( roof_lines, - gcode_layer.configs_storage.support_roof_config, + current_roof_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); current_roof_config.z_offset = -leftover_support_distance; From 185a2211d1ad1a95a28c046f7634bb23e9e2284d Mon Sep 17 00:00:00 2001 From: rburema Date: Tue, 26 Sep 2023 19:16:28 +0000 Subject: [PATCH 330/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 1fab3e3005..e497b08a1f 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3418,10 +3418,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay roof_paths); wall_orderer.addToLayer(); } - gcode_layer.addLinesByOptimizer( - roof_lines, - current_roof_config, - (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); + gcode_layer.addLinesByOptimizer(roof_lines, current_roof_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); current_roof_config.z_offset = -leftover_support_distance; current_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); From e9f015de3a91ddcdeefe9dacfd49495724134356 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 27 Sep 2023 15:36:29 +0200 Subject: [PATCH 331/470] Added a foot to prime tower to make it stronger CURA-10993 --- include/PrimeTower.h | 5 +- src/FffGcodeWriter.cpp | 6 +-- src/PrimeTower.cpp | 109 +++++++++++++++++++++-------------------- 3 files changed, 61 insertions(+), 59 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index 4bca473177..5bb8192a82 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -40,8 +40,7 @@ class PrimeTower const unsigned int number_of_prime_tower_start_locations = 21; //!< The required size of \ref PrimeTower::wipe_locations std::vector pattern_per_extruder; //!< For each extruder the pattern to print on all layers of the prime tower. - std::vector pattern_per_extruder_layer0; //!< For each extruder the pattern to print on the first layer - std::vector pattern_per_extruder_layer_raft; //!< For each extruder the pattern to print on the raft layers + std::vector pattern_extra_brim_per_layer; //!< For each layer with an extra brim, the pattern to be added public: bool enabled; //!< Whether the prime tower is enabled. @@ -102,6 +101,8 @@ class PrimeTower void subtractFromSupport(SliceDataStorage& storage); private: + ExtrusionMoves generatePaths_extraBrim(const Polygons &outer_poly, coord_t extra_radius, coord_t line_width, bool add_inset); + /*! * \see WipeTower::generatePaths * diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 7d96e81eb6..7585677793 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -685,7 +685,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raftLines.clear(); } - setExtruder_addPrime(storage, gcode_layer, 0); + setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); @@ -790,7 +790,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_lines.clear(); } - setExtruder_addPrime(storage, gcode_layer, 0); + setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); @@ -897,7 +897,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_lines.clear(); } - setExtruder_addPrime(storage, gcode_layer, 0); + setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); layer_plan_buffer.handle(gcode_layer, gcode); } diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 3818d8e3f8..472edc4054 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -110,14 +110,45 @@ void PrimeTower::generatePaths(const SliceDataStorage& storage) } } +PrimeTower::ExtrusionMoves PrimeTower::generatePaths_extraBrim(const Polygons& outer_poly, coord_t extra_radius, coord_t line_width, bool add_inset) +{ + const Scene& scene = Application::getInstance().current_slice->scene; + const Settings& mesh_group_settings = scene.current_mesh_group->settings; + const coord_t tower_size = mesh_group_settings.get("prime_tower_size"); + + ExtrusionMoves pattern; + + if (add_inset) + { + Polygons inset = outer_poly.offset(-line_width / 2); + while (! inset.empty()) + { + pattern.polygons.add(inset); + inset = inset.offset(-line_width); + } + } + + int circles = 0; + Polygons outset = outer_poly.offset(line_width / 2); + while (outset.max() - outset.min() < (tower_size + extra_radius * 2)) + { + pattern.polygons.add(outset); + outset = outset.offset(line_width); + circles++; + } + + return pattern; +} + void PrimeTower::generatePaths_denseInfill() { + constexpr coord_t brim_extra_radius = 20000; + constexpr coord_t brim_extra_height = 20000; + const Scene& scene = Application::getInstance().current_slice->scene; const Settings& mesh_group_settings = scene.current_mesh_group->settings; const coord_t layer_height = mesh_group_settings.get("layer_height"); pattern_per_extruder.resize(extruder_count); - pattern_per_extruder_layer0.resize(extruder_count); - pattern_per_extruder_layer_raft.resize(extruder_count); coord_t cumulative_inset = 0; // Each tower shape is going to be printed inside the other. This is the inset we're doing for each extruder. for (size_t extruder_nr : extruder_order) @@ -143,44 +174,19 @@ void PrimeTower::generatePaths_denseInfill() } // Only the most inside extruder needs to fill the inside of the prime tower - if (false /*extruder_nr != extruder_order.back()*/) - { - pattern_per_extruder_layer0 = pattern_per_extruder; - } - else + if (extruder_nr == extruder_order.front()) { // Generate the pattern for the first layer. const coord_t line_width_layer0 = scene.extruders[extruder_nr].settings.get("raft_base_line_width"); - ExtrusionMoves& pattern_layer_raft = pattern_per_extruder_layer_raft[extruder_nr]; - - // Generate a concentric infill pattern in the form insets for the prime tower's first layer instead of using - // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the - // first layer of the prime tower to not stick well. - Polygons inset = outer_poly.offset(-cumulative_inset - line_width_layer0 / 2); - while (! inset.empty()) - { - pattern_layer_raft.polygons.add(inset); - inset = inset.offset(-line_width_layer0); - } - - Polygons outset = outer_poly.offset(cumulative_inset + line_width_layer0 / 2); - for (int i = 0; i < 15; ++i) - { - pattern_layer_raft.polygons.add(outset); - outset = outset.offset(line_width_layer0); - } + ExtrusionMoves pattern_layer0 = generatePaths_extraBrim(outer_poly, brim_extra_radius, line_width_layer0, true); + pattern_extra_brim_per_layer.push_back(pattern_layer0); - // Generate the pattern for the raft layers - ExtrusionMoves& pattern_layer0 = pattern_per_extruder_layer0[extruder_nr]; - - // Generate a concentric infill pattern in the form insets for the prime tower's first layer instead of using - // the infill pattern because the infill pattern tries to connect polygons in different insets which causes the - // first layer of the prime tower to not stick well. - outset = outer_poly.offset(cumulative_inset + line_width / 2); - for (int i = 0; i < 15; ++i) + for (coord_t z = layer_height; z < brim_extra_height; z += layer_height) { - pattern_layer0.polygons.add(outset); - outset = outset.offset(line_width); + double brim_radius_factor = std::pow((1.0 - static_cast(z) / brim_extra_height), 4); + coord_t extra_radius = brim_extra_radius * brim_radius_factor; + ExtrusionMoves pattern = generatePaths_extraBrim(outer_poly, extra_radius, line_width, false); + pattern_extra_brim_per_layer.push_back(pattern); } } cumulative_inset += wall_nr * line_width; @@ -246,33 +252,28 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t extruder_nr) const { - const GCodePathConfig& config - = gcode_layer.getLayerNr() < 0 ? gcode_layer.configs_storage.raft_base_config : gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + LayerIndex absolute_layer_number = gcode_layer.getLayerNr() + Raft::getTotalExtraLayers(); + assert(absolute_layer_number >= 0); - if (gcode_layer.getLayerNr() == -Raft::getTotalExtraLayers() && extruder_nr == 0) - { - // Specific case for first layer => very high adhesion - const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; - - const ExtrusionMoves& pattern_raft = pattern_per_extruder_layer_raft[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern_raft.polygons, config); - gcode_layer.addLinesByOptimizer(pattern_raft.lines, config, SpaceFillType::Lines); - } - else + if (absolute_layer_number > 0) { + // Actual prime pattern const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - // Actual prime pattern const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + } - if (gcode_layer.getLayerNr() < 0 && extruder_nr == 0) - { - const ExtrusionMoves& pattern0 = pattern_per_extruder_layer0[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern0.polygons, config); - gcode_layer.addLinesByOptimizer(pattern0.lines, config, SpaceFillType::Lines); - } + if (absolute_layer_number < pattern_extra_brim_per_layer.size() && extruder_nr == extruder_order.front()) + { + // Specific case for first layer => very high adhesion + const GCodePathConfig& config + = absolute_layer_number == 0 ? gcode_layer.configs_storage.raft_base_config : gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + + const ExtrusionMoves& pattern = pattern_extra_brim_per_layer[absolute_layer_number]; + gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); + gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); } } From f832ec814da6d7d0e817460f65b4bfa74d13f5bb Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 29 Sep 2023 11:32:03 +0200 Subject: [PATCH 332/470] Comment fix CURA-10968 --- src/FffGcodeWriter.cpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 68591de295..9a404fa292 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1234,26 +1234,23 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer // Support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. - if (layer_nr == 0) + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; + if ((layer_nr == 0) && (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr)) { - const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - if (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr) - { - total_line_count += storage.support_brim.size(); - Polygons support_brim_lines = storage.support_brim; - support_brim_lines.toPolylines(); - gcode_layer.addLinesByOptimizer( - support_brim_lines, - gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], - SpaceFillType::PolyLines, - enable_travel_optimization, - wipe_dist, - flow_ratio, - start_close_to, - fan_speed, - reverse_print_direction, - order_requirements = {}); - } + total_line_count += storage.support_brim.size(); + Polygons support_brim_lines = storage.support_brim; + support_brim_lines.toPolylines(); + gcode_layer.addLinesByOptimizer( + support_brim_lines, + gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], + SpaceFillType::PolyLines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + start_close_to, + fan_speed, + reverse_print_direction, + order_requirements = {}); } } From f063b5ab7df6747b7c3092beec8ea90d042aa05b Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 3 Oct 2023 12:24:18 +0200 Subject: [PATCH 333/470] Reverted the changes done in CURA-9521 CURA-11109 --- include/FffGcodeWriter.h | 3 +-- include/infill.h | 7 ++----- src/FffGcodeWriter.cpp | 9 +++------ src/infill.cpp | 10 ++++------ 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 0e3dea645c..96f504c1e3 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -569,8 +569,7 @@ class FffGcodeWriter : public NoCopy const Ratio skin_density, const bool monotonic, bool& added_something, - double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, - const bool is_bridge_skin = false) const; + double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; /*! * see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to diff --git a/include/infill.h b/include/infill.h index 40ca7fbd59..289a0850bb 100644 --- a/include/infill.h +++ b/include/infill.h @@ -206,8 +206,7 @@ class Infill const std::shared_ptr& cross_fill_provider = nullptr, const std::shared_ptr& lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr, - const Polygons& prevent_small_exposed_to_air = Polygons(), - const bool is_bridge_skin = false); + const Polygons& prevent_small_exposed_to_air = Polygons()); /*! * Generate the wall toolpaths of an infill area. It will return the inner contour and set the inner-contour. @@ -219,7 +218,6 @@ class Infill * \param line_width [in] The optimum wall line width of the walls * \param infill_overlap [in] The overlap of the infill * \param settings [in] A settings storage to use for generating variable-width walls. - * \param is_bridge_skin [in] Setting to filter out the extra skin walls while bridging * \return The inner contour of the wall toolpaths */ static Polygons generateWallToolPaths( @@ -230,8 +228,7 @@ class Infill const coord_t infill_overlap, const Settings& settings, int layer_idx, - SectionType section_type, - const bool is_bridge_skin = false); + SectionType section_type); private: /*! diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 235f6f587e..2af62a6824 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2727,8 +2727,7 @@ void FffGcodeWriter::processTopBottom( skin_density, monotonic, added_something, - fan_speed, - is_bridge_skin); + fan_speed); } void FffGcodeWriter::processSkinPrintFeature( @@ -2745,8 +2744,7 @@ void FffGcodeWriter::processSkinPrintFeature( const Ratio skin_density, const bool monotonic, bool& added_something, - double fan_speed, - const bool is_bridge_skin) const + double fan_speed) const { Polygons skin_polygons; Polygons skin_lines; @@ -2806,8 +2804,7 @@ void FffGcodeWriter::processSkinPrintFeature( nullptr, nullptr, nullptr, - small_areas_on_surface ? Polygons() : exposed_to_air, - is_bridge_skin); + small_areas_on_surface ? Polygons() : exposed_to_air); // add paths if (! skin_polygons.empty() || ! skin_lines.empty() || ! skin_paths.empty()) diff --git a/src/infill.cpp b/src/infill.cpp index 9137aa66ca..6da3c25c4f 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -60,14 +60,13 @@ Polygons Infill::generateWallToolPaths( const coord_t infill_overlap, const Settings& settings, int layer_idx, - SectionType section_type, - const bool is_bridge_skin) + SectionType section_type) { outer_contour = outer_contour.offset(infill_overlap); scripta::log("infill_outer_contour", outer_contour, section_type, layer_idx, scripta::CellVDI{ "infill_overlap", infill_overlap }); Polygons inner_contour; - if ((wall_line_count > 0) && (! is_bridge_skin)) + if (wall_line_count > 0) { constexpr coord_t wall_0_inset = 0; // Don't apply any outer wall inset for these. That's just for the outer wall. WallToolPaths wall_toolpaths(outer_contour, line_width, wall_line_count, wall_0_inset, settings, layer_idx, section_type); @@ -91,15 +90,14 @@ void Infill::generate( const std::shared_ptr& cross_fill_provider, const std::shared_ptr& lightning_trees, const SliceMeshStorage* mesh, - const Polygons& prevent_small_exposed_to_air, - const bool is_bridge_skin) + const Polygons& prevent_small_exposed_to_air) { if (outer_contour.empty()) { return; } - inner_contour = generateWallToolPaths(toolpaths, outer_contour, wall_line_count, infill_line_width, infill_overlap, settings, layer_idx, section_type, is_bridge_skin); + inner_contour = generateWallToolPaths(toolpaths, outer_contour, wall_line_count, infill_line_width, infill_overlap, settings, layer_idx, section_type); scripta::log("infill_inner_contour_0", inner_contour, section_type, layer_idx); // It does not make sense to print a pattern in a small region. So the infill region From 873800b9a36cb736a5c21acfbbc1e436c9bbab87 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 3 Oct 2023 19:39:58 +0200 Subject: [PATCH 334/470] Use correct path config CURA-11119 CURA-11121 --- src/FffGcodeWriter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 235f6f587e..fd80cd7d04 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2833,10 +2833,10 @@ void FffGcodeWriter::processSkinPrintFeature( gcode_layer, mesh.settings, extruder_nr, - mesh_config.skin_config, - mesh_config.skin_config, - mesh_config.skin_config, - mesh_config.skin_config, + config, + config, + config, + config, retract_before_outer_wall, wipe_dist, wipe_dist, From a70793c1a98825020a66d3d72176ad5412cf5868 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 5 Oct 2023 09:54:12 +0200 Subject: [PATCH 335/470] Change seam position scoring to make it more consistent CURA-11100 --- include/PathOrderOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 93198fcd19..464810cefa 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -646,7 +646,7 @@ class PathOrderOptimizer // so the user has some control over where the seam will lie. // the divisor here may need adjusting to obtain the best results (TBD) - corner_shift = score_distance / 10; + corner_shift = score_distance / 50; } float score = score_distance; From 3bce9f8c2eb62b581cd18aa9c9a273616a3af439 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 5 Oct 2023 11:48:49 +0200 Subject: [PATCH 336/470] Remove unused variable boyscouting CURA-11110 --- src/skin.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/skin.cpp b/src/skin.cpp index 227591a8c4..28fc60c238 100644 --- a/src/skin.cpp +++ b/src/skin.cpp @@ -346,8 +346,6 @@ void SkinInfillAreaComputation::generateRoofingFillAndSkinFill(SliceLayerPart& p */ Polygons SkinInfillAreaComputation::generateFilledAreaAbove(SliceLayerPart& part, size_t roofing_layer_count) { - const size_t wall_idx = std::min(size_t(2), mesh.settings.get("wall_line_count")); - Polygons filled_area_above = getOutlineOnLayer(part, layer_nr + roofing_layer_count); if (! no_small_gaps_heuristic) { From 3787b2c73369052182ea2b359f372f38f5dc5fe5 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 5 Oct 2023 12:45:17 +0200 Subject: [PATCH 337/470] Use different config for roofing inner/outer walls Implementation is not fully desired since it has some downsides 1. When a layer-part is partially a roof the whole outer/inner wall uses the inner/outer wall roofing print-configuration 2. Some logic is duplicated, namely the function that calculates the `filled_area_above`. This function previously lived in `SkinInfillAreaComputation`. It's not logical to create a `SkinInfillAreaComputation` instance just to re-use this utility. Proposal to fix this is to move the logic of calculating the `filled_area_above` to a more central location, this will be done in a seperate ticket. 3. The `inset0_roofing_config` and `insetX_roofing_config` contain `line_width` properties. Changing the line-widths here doesn't actually change the line width. The line widths can only be changed through the `insetX_config` and `inset0_config` configs CURA-11110 --- include/settings/MeshPathConfigs.h | 2 + src/FffGcodeWriter.cpp | 96 +++++++++++++++++++++++++++++- src/settings/MeshPathConfigs.cpp | 26 ++++++++ 3 files changed, 122 insertions(+), 2 deletions(-) diff --git a/include/settings/MeshPathConfigs.h b/include/settings/MeshPathConfigs.h index 43457fbc8c..61c993b9a8 100644 --- a/include/settings/MeshPathConfigs.h +++ b/include/settings/MeshPathConfigs.h @@ -15,6 +15,8 @@ struct MeshPathConfigs { GCodePathConfig inset0_config{}; GCodePathConfig insetX_config{}; + GCodePathConfig inset0_roofing_config{}; + GCodePathConfig insetX_roofing_config{}; GCodePathConfig bridge_inset0_config{}; GCodePathConfig bridge_insetX_config{}; GCodePathConfig skin_config{}; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index fe5ebfcc08..5cde325a69 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -21,6 +21,8 @@ #include "utils/math.h" #include "utils/orderOptimizer.h" +#include +#include #include #include @@ -2392,6 +2394,96 @@ bool FffGcodeWriter::processInsets( } else { + // for layers that (partially) do not have any layers above we apply the roofing configuration + auto use_roofing_config = [&part, &mesh, &gcode_layer](){ + const auto getOutlineOnLayer = [mesh](const SliceLayerPart& part_here, const LayerIndex layer2_nr) -> Polygons + { + Polygons result; + if (layer2_nr >= static_cast(mesh.layers.size())) + { + return result; + } + const SliceLayer& layer2 = mesh.layers[layer2_nr]; + for (const SliceLayerPart& part2 : layer2.parts) + { + if (part_here.boundaryBox.hit(part2.boundaryBox)) + { + result.add(part2.outline); + } + } + return result; + }; + + const auto filled_area_above = [&getOutlineOnLayer, &part, &mesh, &gcode_layer]() -> Polygons + { + const size_t roofing_layer_count = std::min(mesh.settings.get("roofing_layer_count"), mesh.settings.get("top_layers")); + const bool no_small_gaps_heuristic = mesh.settings.get("skin_no_small_gaps_heuristic"); + const int layer_nr = gcode_layer.getLayerNr(); + auto filled_area_above = getOutlineOnLayer(part, layer_nr + roofing_layer_count); + if (! no_small_gaps_heuristic) + { + for (int layer_nr_above = layer_nr + 1; layer_nr_above < layer_nr + roofing_layer_count; layer_nr_above++) + { + Polygons outlines_above = getOutlineOnLayer(part, layer_nr_above); + filled_area_above = filled_area_above.intersection(outlines_above); + } + } + if (layer_nr > 0) + { + // if the skin has air below it then cutting it into regions could cause a region + // to be wholely or partly above air and it may not be printable so restrict + // the regions that have air above (the visible regions) to not include any area that + // has air below (fixes https://github.com/Ultimaker/Cura/issues/2656) + + // set air_below to the skin area for the current layer that has air below it + Polygons air_below = getOutlineOnLayer(part, layer_nr).difference(getOutlineOnLayer(part, layer_nr - 1)); + + if (! air_below.empty()) + { + // add the polygons that have air below to the no air above polygons + filled_area_above = filled_area_above.unionPolygons(air_below); + } + } + + return filled_area_above; + }(); + + if (filled_area_above.empty()) + { + return true; + } + + const auto point_view = ranges::views::transform([](auto extrusion_junction) { return extrusion_junction.p; }); + + for (const auto& path: part.wall_toolpaths) + { + for (const auto& wall: path) + { + for (const auto& p : wall | point_view) + { + if (!filled_area_above.inside(p)) + { + return true; + } + } + + for (const auto& window : wall | point_view | ranges::views::sliding(2)) + { + auto p0 = window[0]; + auto p1 = window[1]; + if (PolygonUtils::polygonCollidesWithLineSegment(filled_area_above, p0, p1)) + { + return true; + } + } + } + } + return false; + }(); + + const GCodePathConfig& inset0_config = use_roofing_config ? mesh_config.inset0_roofing_config : mesh_config.inset0_config; + const GCodePathConfig& insetX_config = use_roofing_config ? mesh_config.insetX_roofing_config : mesh_config.insetX_config; + // Main case: Optimize the insets with the InsetOrderOptimizer. const coord_t wall_x_wipe_dist = 0; const ZSeamConfig z_seam_config( @@ -2405,8 +2497,8 @@ bool FffGcodeWriter::processInsets( gcode_layer, mesh.settings, extruder_nr, - mesh_config.inset0_config, - mesh_config.insetX_config, + inset0_config, + insetX_config, mesh_config.bridge_inset0_config, mesh_config.bridge_insetX_config, mesh.settings.get("travel_retract_before_outer_wall"), diff --git a/src/settings/MeshPathConfigs.cpp b/src/settings/MeshPathConfigs.cpp index 942084a231..a89b444bd3 100644 --- a/src/settings/MeshPathConfigs.cpp +++ b/src/settings/MeshPathConfigs.cpp @@ -28,6 +28,32 @@ MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t lay .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x"), .acceleration = mesh.settings.get("acceleration_wall_x"), .jerk = mesh.settings.get("jerk_wall_x") } } + , inset0_roofing_config + { + .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("wall_0_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { + .speed = mesh.settings.get("speed_wall_0_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), + .jerk = mesh.settings.get("jerk_wall_0_roofing") + } + } + , insetX_roofing_config + { + .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("wall_x_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { + .speed = mesh.settings.get("speed_wall_x_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_x_roofing"), + .jerk = mesh.settings.get("jerk_wall_x_roofing") + } + } , bridge_inset0_config{ .type = PrintFeatureType::OuterWall, .line_width = static_cast( mesh.settings.get("wall_line_width_0") From 08dd09abf6ef354c5581fc68be8c2943ce3e06bd Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 5 Oct 2023 10:47:34 +0000 Subject: [PATCH 338/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 15 +++++++---- src/settings/MeshPathConfigs.cpp | 46 ++++++++++++++------------------ 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 5cde325a69..1c592da8ad 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2395,7 +2395,8 @@ bool FffGcodeWriter::processInsets( else { // for layers that (partially) do not have any layers above we apply the roofing configuration - auto use_roofing_config = [&part, &mesh, &gcode_layer](){ + auto use_roofing_config = [&part, &mesh, &gcode_layer]() + { const auto getOutlineOnLayer = [mesh](const SliceLayerPart& part_here, const LayerIndex layer2_nr) -> Polygons { Polygons result; @@ -2453,15 +2454,19 @@ bool FffGcodeWriter::processInsets( return true; } - const auto point_view = ranges::views::transform([](auto extrusion_junction) { return extrusion_junction.p; }); + const auto point_view = ranges::views::transform( + [](auto extrusion_junction) + { + return extrusion_junction.p; + }); - for (const auto& path: part.wall_toolpaths) + for (const auto& path : part.wall_toolpaths) { - for (const auto& wall: path) + for (const auto& wall : path) { for (const auto& p : wall | point_view) { - if (!filled_area_above.inside(p)) + if (! filled_area_above.inside(p)) { return true; } diff --git a/src/settings/MeshPathConfigs.cpp b/src/settings/MeshPathConfigs.cpp index a89b444bd3..aa71d89e07 100644 --- a/src/settings/MeshPathConfigs.cpp +++ b/src/settings/MeshPathConfigs.cpp @@ -28,32 +28,26 @@ MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t lay .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x"), .acceleration = mesh.settings.get("acceleration_wall_x"), .jerk = mesh.settings.get("jerk_wall_x") } } - , inset0_roofing_config - { - .type = PrintFeatureType::OuterWall, - .line_width = static_cast( - mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), - .layer_thickness = layer_thickness, - .flow = mesh.settings.get("wall_0_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), - .speed_derivatives = { - .speed = mesh.settings.get("speed_wall_0_roofing"), - .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), - .jerk = mesh.settings.get("jerk_wall_0_roofing") - } - } - , insetX_roofing_config - { - .type = PrintFeatureType::OuterWall, - .line_width = static_cast( - mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), - .layer_thickness = layer_thickness, - .flow = mesh.settings.get("wall_x_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), - .speed_derivatives = { - .speed = mesh.settings.get("speed_wall_x_roofing"), - .acceleration = mesh.settings.get("acceleration_wall_x_roofing"), - .jerk = mesh.settings.get("jerk_wall_x_roofing") - } - } + , inset0_roofing_config{ .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_0") + * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow + = mesh.settings.get("wall_0_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_wall_0_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), + .jerk = mesh.settings.get("jerk_wall_0_roofing") } } + , insetX_roofing_config{ .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_x") + * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow + = mesh.settings.get("wall_x_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_x_roofing"), + .jerk = mesh.settings.get("jerk_wall_x_roofing") } } , bridge_inset0_config{ .type = PrintFeatureType::OuterWall, .line_width = static_cast( mesh.settings.get("wall_line_width_0") From d24323d14ba1ed4f8d90e17cf35956ca8a575b48 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Thu, 5 Oct 2023 15:17:34 +0200 Subject: [PATCH 339/470] the length of brim is correctly calculated in case of no adhesion CURA-11097 --- src/FffGcodeWriter.cpp | 1 - src/SkirtBrim.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index fe5ebfcc08..300ea26147 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3050,7 +3050,6 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer } island_order_optimizer.optimize(); - const auto support_brim_line_count = infill_extruder.settings.get("support_brim_line_count"); const auto support_connect_zigzags = infill_extruder.settings.get("support_connect_zigzags"); const auto support_structure = infill_extruder.settings.get("support_structure"); const Point infill_origin; diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 6aed96d7fe..2c1c134d3c 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -668,7 +668,7 @@ void SkirtBrim::generateSupportBrim() storage.support_brim.add(brim_line); - const coord_t length = skirt_brim_length + storage.support_brim.polygonLength(); + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE)? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From 65ad30f6630b5d65e4e4905dae5c96eee57ac79b Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Thu, 5 Oct 2023 13:18:20 +0000 Subject: [PATCH 340/470] Applied clang-format. --- src/SkirtBrim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 2c1c134d3c..98992c67d9 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -668,7 +668,7 @@ void SkirtBrim::generateSupportBrim() storage.support_brim.add(brim_line); - const coord_t length = (adhesion_type == EPlatformAdhesion::NONE)? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length : skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From 54389a88290b86aacc9c162ca1e3339f6a0edd1a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 5 Oct 2023 17:18:08 +0200 Subject: [PATCH 341/470] Better version of the corner angle computation (to be optimized) CURA-11100 --- include/PathOrderOptimizer.h | 114 +++++++++++++++++------------------ src/FffGcodeWriter.cpp | 2 +- 2 files changed, 56 insertions(+), 60 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 464810cefa..b269b1e063 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -136,7 +136,7 @@ class PathOrderOptimizer * This reorders the \ref paths field and fills their starting vertices and * directions. */ - void optimize() + void optimize(bool precompute_start = true) { if(paths.empty()) { @@ -188,7 +188,7 @@ class PathOrderOptimizer //For some Z seam types the start position can be pre-computed. //This is faster since we don't need to re-compute the start position at each step then. - const bool precompute_start = seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; + precompute_start &= seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; if(precompute_start) { for(auto& path : paths) @@ -656,13 +656,13 @@ class PathOrderOptimizer case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER: if(corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. { - score -= (-corner_angle + 1.0) * corner_shift; + score += corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER: if(corner_angle > 0) // Indeed a convex corner? { - score -= (corner_angle + 1.0) * corner_shift; + score -= corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY: @@ -707,6 +707,43 @@ class PathOrderOptimizer return best_i; } + Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance) + { + assert(distance); + + const Point here_pos = (*path.converted)[here]; + int direction = distance > 0 ? 1 : -1; + distance = std::abs(distance); + + coord_t actual_distance = 0; + int actual_delta = 0; + + Point prev_pos = here_pos; + Point next_pos; + while(actual_distance < distance) + { + actual_delta += direction; + next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; + actual_distance += vSize(next_pos - prev_pos); + prev_pos = next_pos; + } + + if(actual_distance > distance) // Which is veeeery likely + { + prev_pos = (*path.converted)[(here + actual_delta -direction + path.converted->size()) % path.converted->size()]; + + Point vector = next_pos - prev_pos; + coord_t vector_size = vSize(vector); + Point unit_vector = (vector * 1000) / vector_size; + Point vector_delta = unit_vector * (vector_size - (actual_distance - distance)); + return prev_pos + vector_delta / 1000; + } + else + { + return next_pos; + } + } + /*! * Some models have very sharp corners, but also have a high resolution. If a sharp corner * consists of many points each point individual might have a shallow corner, but the @@ -722,68 +759,27 @@ class PathOrderOptimizer */ float cornerAngle(const OrderablePath& path, int i, const coord_t angle_query_distance = 100, const float fall_off_strength = 0.5) { - // If the edge length becomes too small we cannot accurately calculate the angle - // define a minimum edge length, so we don't get deviant values in the angle calculations - constexpr coord_t min_edge_length = 10; - constexpr coord_t min_edge_length2 = min_edge_length * min_edge_length; + static constexpr coord_t distance_step = 2000; + static constexpr coord_t max_distance = 5000; - const int offset_index = i % path.converted->size(); - Point here = (*path.converted)[offset_index]; + const Point here = (*path.converted)[i]; - const std::function find_neighbour_point = [&offset_index, &path](const int direction, const Point& here) - { - int offset_index_ = offset_index; - Point neighbour; - do - { - offset_index_ = (offset_index_ + path.converted->size() + direction) % path.converted->size(); - neighbour = (*path.converted)[offset_index_]; - } - while (vSize2(here - neighbour) < min_edge_length2 && offset_index_ != offset_index); // find previous point that is at least min_edge_length units away from here - return neighbour; - }; - - const std::function iterate_to_previous_point = [&find_neighbour_point](Point& previous_, Point& here_, Point& next_) - { - const auto dist = vSize(here_ - next_); - next_ = here_; - here_ = previous_; - previous_ = find_neighbour_point(-1, here_); - return dist; - }; - Point previous = find_neighbour_point(-1, here); + float angle = 0.0; + int computed_angles = 0; - const std::function iterate_to_next_point = [&find_neighbour_point](Point& previous_, Point& here_, Point& next_) + for(coord_t distance = distance_step ; distance <= max_distance ; distance += distance_step) { - const auto dist = vSize(here_ - previous_); - previous_ = here_; - here_ = next_; - next_ = find_neighbour_point(1, here_); - return dist; - }; - Point next = find_neighbour_point(1, here); + Point next = findNeighbourPoint(path, i, distance); + Point previous = findNeighbourPoint(path, i, -distance); - float corner_angle = LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; - - for (const auto& iterate_func : {iterate_to_previous_point, iterate_to_next_point}) - { - Point next_ = next; - Point here_ = here; - Point previous_ = previous; - for - ( - coord_t distance_to_query = iterate_func(previous_, here_, next_); - distance_to_query < angle_query_distance && here_ != here; - distance_to_query += iterate_func(previous_, here_, next_) - ) - { - // angles further away from the query point are weighted less - const float angle_weight = 1.0 - pow(distance_to_query / angle_query_distance, fall_off_strength); - corner_angle += (LinearAlg2D::getAngleLeft(previous_, here_, next_) - M_PI) * angle_weight; - } + angle += LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; + computed_angles++; } - return corner_angle / M_PI; // Limit angle between -1 and 1. + angle /= computed_angles; + angle /= M_PI; + + return angle; } /*! diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index fe5ebfcc08..07f961484e 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1493,7 +1493,7 @@ void FffGcodeWriter::addMeshLayerToGCode( { part_order_optimizer.addPolygon(&part); } - part_order_optimizer.optimize(); + part_order_optimizer.optimize(false); for (const PathOrdering& path : part_order_optimizer.paths) { addMeshPartToGCode(storage, mesh, extruder_nr, mesh_config, *path.vertices, gcode_layer); From 317dab031139972d9f07b2b6d11b9a2252c5409e Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Thu, 5 Oct 2023 15:18:51 +0000 Subject: [PATCH 342/470] Applied clang-format. --- include/PathOrderOptimizer.h | 302 +++++++++++++++++++---------------- 1 file changed, 160 insertions(+), 142 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index b269b1e063..939baf6b21 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -4,9 +4,6 @@ #ifndef PATHORDEROPTIMIZER_H #define PATHORDEROPTIMIZER_H -#include -#include - #include "InsetOrderOptimizer.h" // for makeOrderIncludeTransitive #include "PathOrdering.h" #include "pathPlanning/CombPath.h" //To calculate the combing distance if we want to use combing. @@ -16,12 +13,16 @@ #include "utils/linearAlg2D.h" //To find the angle of corners to hide seams. #include "utils/polygonUtils.h" #include "utils/views/dfs.h" -#include -#include + #include #include -#include #include +#include +#include +#include +#include + +#include namespace cura { @@ -99,10 +100,17 @@ class PathOrderOptimizer * it into a polygon. * \param combing_boundary Boundary to avoid when making travel moves. */ - PathOrderOptimizer(const Point start_point, const ZSeamConfig seam_config = ZSeamConfig(), const bool detect_loops = false, const Polygons* combing_boundary = nullptr, const bool reverse_direction = false, const std::unordered_multimap& order_requirements = no_order_requirements, const bool group_outer_walls = false) + PathOrderOptimizer( + const Point start_point, + const ZSeamConfig seam_config = ZSeamConfig(), + const bool detect_loops = false, + const Polygons* combing_boundary = nullptr, + const bool reverse_direction = false, + const std::unordered_multimap& order_requirements = no_order_requirements, + const bool group_outer_walls = false) : start_point(start_point) , seam_config(seam_config) - , combing_boundary((combing_boundary != nullptr && !combing_boundary->empty()) ? combing_boundary : nullptr) + , combing_boundary((combing_boundary != nullptr && ! combing_boundary->empty()) ? combing_boundary : nullptr) , detect_loops(detect_loops) , reverse_direction(reverse_direction) , order_requirements(&order_requirements) @@ -138,70 +146,70 @@ class PathOrderOptimizer */ void optimize(bool precompute_start = true) { - if(paths.empty()) + if (paths.empty()) { return; } - //Get the vertex data and store it in the paths. - for(auto& path : paths) + // Get the vertex data and store it in the paths. + for (auto& path : paths) { path.converted = path.getVertexData(); vertices_to_paths.emplace(path.vertices, &path); } - //If necessary, check polylines to see if they are actually polygons. - if(detect_loops) + // If necessary, check polylines to see if they are actually polygons. + if (detect_loops) { - for(auto& path : paths) + for (auto& path : paths) { - if(!path.is_closed) + if (! path.is_closed) { - //If we want to detect chains, first check if some of the polylines are secretly polygons. - path.is_closed = isLoopingPolyline(path); //If it is, we'll set the seam position correctly later. + // If we want to detect chains, first check if some of the polylines are secretly polygons. + path.is_closed = isLoopingPolyline(path); // If it is, we'll set the seam position correctly later. } } } - - //Add all vertices to a bucket grid so that we can find nearby endpoints quickly. + + // Add all vertices to a bucket grid so that we can find nearby endpoints quickly. const coord_t snap_radius = 10_mu; // 0.01mm grid cells. Chaining only needs to consider polylines which are next to each other. SparsePointGridInclusive line_bucket_grid(snap_radius); - for(const auto& [i, path]: paths | ranges::views::enumerate) + for (const auto& [i, path] : paths | ranges::views::enumerate) { if (path.converted->empty()) { continue; } - if(path.is_closed) + if (path.is_closed) { - for(const Point& point : *path.converted) + for (const Point& point : *path.converted) { - line_bucket_grid.insert(point, i); //Store by index so that we can also mark them down in the `picked` vector. + line_bucket_grid.insert(point, i); // Store by index so that we can also mark them down in the `picked` vector. } } - else //For polylines, only insert the endpoints. Those are the only places we can start from so the only relevant vertices to be near to. + else // For polylines, only insert the endpoints. Those are the only places we can start from so the only relevant vertices to be near to. { line_bucket_grid.insert(path.converted->front(), i); line_bucket_grid.insert(path.converted->back(), i); } } - //For some Z seam types the start position can be pre-computed. - //This is faster since we don't need to re-compute the start position at each step then. + // For some Z seam types the start position can be pre-computed. + // This is faster since we don't need to re-compute the start position at each step then. precompute_start &= seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; - if(precompute_start) + if (precompute_start) { - for(auto& path : paths) + for (auto& path : paths) { - if(!path.is_closed || path.converted->empty()) + if (! path.is_closed || path.converted->empty()) { - continue; //Can't pre-compute the seam for open polylines since they're at the endpoint nearest to the current position. + continue; // Can't pre-compute the seam for open polylines since they're at the endpoint nearest to the current position. } path.start_vertex = findStartLocation(path, seam_config.pos); } } - std::vector optimized_order; //To store our result in. At the end we'll std::swap. + std::vector optimized_order; // To store our result in. At the end we'll std::swap. if (order_requirements->empty()) { @@ -213,9 +221,9 @@ class PathOrderOptimizer } - if(reverse_direction && order_requirements->empty()) + if (reverse_direction && order_requirements->empty()) { - std::vector reversed = reverseOrderPaths(optimized_order); //Reverse-insert the optimized order, to invert the ordering. + std::vector reversed = reverseOrderPaths(optimized_order); // Reverse-insert the optimized order, to invert the ordering. std::swap(reversed, paths); } else @@ -225,6 +233,7 @@ class PathOrderOptimizer combing_grid.reset(); } + protected: /*! * If \ref detect_loops is enabled, endpoints of polylines that are closer @@ -276,18 +285,24 @@ class PathOrderOptimizer std::vector getOptimizedOrder(SparsePointGridInclusive line_bucket_grid, size_t snap_radius) { - std::vector optimized_order; //To store our result in. + std::vector optimized_order; // To store our result in. Point current_position = start_point; - std::unordered_map picked(paths.size()); //Fixed size boolean flag for whether each path is already in the optimized vector. + std::unordered_map picked(paths.size()); // Fixed size boolean flag for whether each path is already in the optimized vector. - auto isPicked = [&picked](OrderablePath* c) { return picked[c]; }; - auto notPicked = [&picked](OrderablePath* c) { return !picked[c]; }; + auto isPicked = [&picked](OrderablePath* c) + { + return picked[c]; + }; + auto notPicked = [&picked](OrderablePath* c) + { + return ! picked[c]; + }; - while(optimized_order.size() < paths.size()) + while (optimized_order.size() < paths.size()) { - //Use bucket grid to find paths within snap_radius + // Use bucket grid to find paths within snap_radius std::vector nearby_candidates; for (const auto i : line_bucket_grid.getNearbyVals(current_position, snap_radius)) { @@ -296,14 +311,14 @@ class PathOrderOptimizer std::vector available_candidates; available_candidates.reserve(nearby_candidates.size()); - for(auto candidate : nearby_candidates | ranges::views::filter(notPicked)) + for (auto candidate : nearby_candidates | ranges::views::filter(notPicked)) { available_candidates.push_back(candidate); } - if(available_candidates.empty()) // We need to broaden our search through all candidates + if (available_candidates.empty()) // We need to broaden our search through all candidates { - for(auto path : paths | ranges::views::addressof | ranges::views::filter(notPicked)) + for (auto path : paths | ranges::views::addressof | ranges::views::filter(notPicked)) { available_candidates.push_back(path); } @@ -315,15 +330,15 @@ class PathOrderOptimizer optimized_order.push_back(*best_path); picked[best_path] = true; - if(!best_path->converted->empty()) //If all paths were empty, the best path is still empty. We don't upate the current position then. + if (! best_path->converted->empty()) // If all paths were empty, the best path is still empty. We don't upate the current position then. { - if(best_path->is_closed) + if (best_path->is_closed) { - current_position = (*best_path->converted)[best_path->start_vertex]; //We end where we started. + current_position = (*best_path->converted)[best_path->start_vertex]; // We end where we started. } else { - //Pick the other end from where we started. + // Pick the other end from where we started. current_position = best_path->start_vertex == 0 ? best_path->converted->back() : best_path->converted->front(); } } @@ -332,9 +347,10 @@ class PathOrderOptimizer return optimized_order; } - std::vector getOptimizerOrderWithConstraints(SparsePointGridInclusive line_bucket_grid, size_t snap_radius, const std::unordered_multimap& order_requirements) + std::vector + getOptimizerOrderWithConstraints(SparsePointGridInclusive line_bucket_grid, size_t snap_radius, const std::unordered_multimap& order_requirements) { - std::vector optimized_order; //To store our result in. + std::vector optimized_order; // To store our result in. // initialize the roots set with all possible nodes std::unordered_set roots; @@ -358,8 +374,8 @@ class PathOrderOptimizer std::unordered_set visited; Point current_position = start_point; - std::function(const Path, const std::unordered_multimap&)> get_neighbours = - [current_position, this](const Path current_node, const std::unordered_multimap& graph) + std::function(const Path, const std::unordered_multimap&)> get_neighbours + = [current_position, this](const Path current_node, const std::unordered_multimap& graph) { std::vector order; // Output order to traverse neighbors @@ -382,13 +398,13 @@ class PathOrderOptimizer // update local_current_position auto path = vertices_to_paths[best_candidate]; - if(path->is_closed) + if (path->is_closed) { - local_current_position = (*path->converted)[path->start_vertex]; //We end where we started. + local_current_position = (*path->converted)[path->start_vertex]; // We end where we started. } else { - //Pick the other end from where we started. + // Pick the other end from where we started. local_current_position = path->start_vertex == 0 ? path->converted->back() : path->converted->front(); } } @@ -396,34 +412,33 @@ class PathOrderOptimizer return order; }; - const std::function handle_node = - [¤t_position, &optimized_order, this] - (const Path current_node, const std::nullptr_t _state) + const std::function handle_node + = [¤t_position, &optimized_order, this](const Path current_node, const std::nullptr_t _state) + { + // We should make map from node <-> path for this stuff + for (auto& path : paths) { - // We should make map from node <-> path for this stuff - for (auto& path : paths) + if (path.vertices == current_node) { - if (path.vertices == current_node) + if (path.is_closed) { - if(path.is_closed) - { - current_position = (*path.converted)[path.start_vertex]; //We end where we started. - } - else - { - //Pick the other end from where we started. - current_position = path.start_vertex == 0 ? path.converted->back() : path.converted->front(); - } - - // Add to optimized order - optimized_order.push_back(path); - - break; + current_position = (*path.converted)[path.start_vertex]; // We end where we started. } + else + { + // Pick the other end from where we started. + current_position = path.start_vertex == 0 ? path.converted->back() : path.converted->front(); + } + + // Add to optimized order + optimized_order.push_back(path); + + break; } + } - return nullptr; - }; + return nullptr; + }; if (group_outer_walls) { @@ -482,7 +497,7 @@ class PathOrderOptimizer } else { - while (!roots.empty()) + while (! roots.empty()) { Path root = findClosestPathVertices(current_position, roots); roots.erase(root); @@ -497,13 +512,13 @@ class PathOrderOptimizer std::vector reverseOrderPaths(std::vector pathsOrderPaths) { std::vector reversed; - //Don't replace with swap, assign or insert. They require functions that we can't implement for all template arguments for Path. + // Don't replace with swap, assign or insert. They require functions that we can't implement for all template arguments for Path. reversed.reserve(pathsOrderPaths.size()); - for(auto& path: pathsOrderPaths | ranges::views::reverse) + for (auto& path : pathsOrderPaths | ranges::views::reverse) { reversed.push_back(path); - reversed.back().backwards = !reversed.back().backwards; - if(!reversed.back().is_closed) + reversed.back().backwards = ! reversed.back().backwards; + if (! reversed.back().is_closed) { reversed.back().start_vertex = reversed.back().converted->size() - 1 - reversed.back().start_vertex; } @@ -530,33 +545,35 @@ class PathOrderOptimizer coord_t best_distance2 = std::numeric_limits::max(); OrderablePath* best_candidate = 0; - for(OrderablePath* path : candidate_paths) + for (OrderablePath* path : candidate_paths) { - if(path->converted->empty()) //No vertices in the path. Can't find the start position then or really plan it in. Put that at the end. + if (path->converted->empty()) // No vertices in the path. Can't find the start position then or really plan it in. Put that at the end. { - if(best_distance2 == std::numeric_limits::max()) + if (best_distance2 == std::numeric_limits::max()) { best_candidate = path; } continue; } - const bool precompute_start = seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; - if(!path->is_closed || !precompute_start) //Find the start location unless we've already precomputed it. + const bool precompute_start + = seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; + if (! path->is_closed || ! precompute_start) // Find the start location unless we've already precomputed it. { path->start_vertex = findStartLocation(*path, start_position); - if(!path->is_closed) //Open polylines start at vertex 0 or vertex N-1. Indicate that they should be reversed if they start at N-1. + if (! path->is_closed) // Open polylines start at vertex 0 or vertex N-1. Indicate that they should be reversed if they start at N-1. { path->backwards = path->start_vertex > 0; } } const Point candidate_position = (*path->converted)[path->start_vertex]; coord_t distance2 = getDirectDistance(start_position, candidate_position); - if(distance2 < best_distance2 && combing_boundary) //If direct distance is longer than best combing distance, the combing distance can never be better, so only compute combing if necessary. + if (distance2 < best_distance2 + && combing_boundary) // If direct distance is longer than best combing distance, the combing distance can never be better, so only compute combing if necessary. { distance2 = getCombingDistance(start_position, candidate_position); } - if(distance2 < best_distance2) //Closer than the best candidate so far. + if (distance2 < best_distance2) // Closer than the best candidate so far. { best_candidate = path; best_distance2 = distance2; @@ -589,30 +606,31 @@ class PathOrderOptimizer * applicable. * \param is_closed Whether the polygon is closed (a polygon) or not * (a polyline). If the path is not closed, it will choose between the two - * endpoints rather than + * endpoints rather than * \return An index to a vertex in that path where printing must start. */ size_t findStartLocation(const OrderablePath& path, const Point& target_pos) { - if(!path.is_closed) + if (! path.is_closed) { - //For polylines, the seam settings are not applicable. Simply choose the position closest to target_pos then. - const coord_t back_distance = (combing_boundary == nullptr) - ? getDirectDistance(path.converted->back(), target_pos) - : getCombingDistance(path.converted->back(), target_pos); - if(back_distance < getDirectDistance(path.converted->front(), target_pos) || (combing_boundary && back_distance < getCombingDistance(path.converted->front(), target_pos))) //Lazy or: Only compute combing distance if direct distance is closer. + // For polylines, the seam settings are not applicable. Simply choose the position closest to target_pos then. + const coord_t back_distance + = (combing_boundary == nullptr) ? getDirectDistance(path.converted->back(), target_pos) : getCombingDistance(path.converted->back(), target_pos); + if (back_distance < getDirectDistance(path.converted->front(), target_pos) + || (combing_boundary + && back_distance < getCombingDistance(path.converted->front(), target_pos))) // Lazy or: Only compute combing distance if direct distance is closer. { - return path.converted->size() - 1; //Back end is closer. + return path.converted->size() - 1; // Back end is closer. } else { - return 0; //Front end is closer. + return 0; // Front end is closer. } } - //Rest of the function only deals with (closed) polygons. We need to be able to find the seam location of those polygons. + // Rest of the function only deals with (closed) polygons. We need to be able to find the seam location of those polygons. - if(seam_config.type == EZSeamType::RANDOM) + if (seam_config.type == EZSeamType::RANDOM) { size_t vert = getRandomPointInPolygon(*path.converted); return vert; @@ -620,14 +638,14 @@ class PathOrderOptimizer size_t best_i; float best_score = std::numeric_limits::infinity(); - for(const auto& [i, here]: **path.converted | ranges::views::enumerate) + for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - //For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. - //For SHARPEST_CORNER, use a fixed starting score of 0. - const coord_t distance = (combing_boundary == nullptr) - ? getDirectDistance(here, target_pos) - : getCombingDistance(here, target_pos); - const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) ? MM2INT(10) : vSize2(here - target_pos); + // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. + // For SHARPEST_CORNER, use a fixed starting score of 0. + const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); + const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) + ? MM2INT(10) + : vSize2(here - target_pos); float corner_angle = cornerAngle(path, i); // angles < 0 are concave (left turning) @@ -650,30 +668,30 @@ class PathOrderOptimizer } float score = score_distance; - switch(seam_config.corner_pref) + switch (seam_config.corner_pref) { default: case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER: - if(corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. + if (corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. { score += corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER: - if(corner_angle > 0) // Indeed a convex corner? + if (corner_angle > 0) // Indeed a convex corner? { score -= corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY: - score -= std::abs(corner_angle) * corner_shift; //Still give sharper corners more advantage. + score -= std::abs(corner_angle) * corner_shift; // Still give sharper corners more advantage. break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE: break; - case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_WEIGHTED: //Give sharper corners some advantage, but sharper concave corners even more. + case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_WEIGHTED: // Give sharper corners some advantage, but sharper concave corners even more. { float score_corner = std::abs(corner_angle) * corner_shift; - if(corner_angle < 0) //Concave corner. + if (corner_angle < 0) // Concave corner. { score_corner *= 2; } @@ -683,7 +701,7 @@ class PathOrderOptimizer } constexpr float EPSILON = 25.0; - if(std::abs(best_score - score) <= EPSILON) + if (std::abs(best_score - score) <= EPSILON) { // add breaker for two candidate starting location with similar score // if we don't do this then we (can) get an un-even seam @@ -691,13 +709,13 @@ class PathOrderOptimizer // if x-coord for both points are equal then break ties by // favouring points with lower y-coord const Point& best_point = (*path.converted)[best_i]; - if(std::abs(here.Y - best_point.Y) <= EPSILON ? best_point.X < here.X : best_point.Y < here.Y) + if (std::abs(here.Y - best_point.Y) <= EPSILON ? best_point.X < here.X : best_point.Y < here.Y) { best_score = std::min(best_score, score); best_i = i; } } - else if(score < best_score) + else if (score < best_score) { best_i = i; best_score = score; @@ -720,7 +738,7 @@ class PathOrderOptimizer Point prev_pos = here_pos; Point next_pos; - while(actual_distance < distance) + while (actual_distance < distance) { actual_delta += direction; next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; @@ -728,9 +746,9 @@ class PathOrderOptimizer prev_pos = next_pos; } - if(actual_distance > distance) // Which is veeeery likely + if (actual_distance > distance) // Which is veeeery likely { - prev_pos = (*path.converted)[(here + actual_delta -direction + path.converted->size()) % path.converted->size()]; + prev_pos = (*path.converted)[(here + actual_delta - direction + path.converted->size()) % path.converted->size()]; Point vector = next_pos - prev_pos; coord_t vector_size = vSize(vector); @@ -745,18 +763,18 @@ class PathOrderOptimizer } /*! - * Some models have very sharp corners, but also have a high resolution. If a sharp corner - * consists of many points each point individual might have a shallow corner, but the - * collective angle of all nearby points is greater. To counter this the cornerAngle is - * calculated from all points within angle_query_distance of the query point. Angles closer - * to the current point are weighted more towards the total angle then points further away. - * The formula for the angle weight is: 1 - (distance_to_query / angle_query_distance)^fall_off_strength - * \param path The vertex data of a path - * \param i index of the query point - * \param angle_query_distance query range (default to 0.1mm) - * \param fall_off_strength fall of strength of the angle weight - * \return sum of angles of all points p in range i - angle_query_distance < p < i + angle_query_distance - */ + * Some models have very sharp corners, but also have a high resolution. If a sharp corner + * consists of many points each point individual might have a shallow corner, but the + * collective angle of all nearby points is greater. To counter this the cornerAngle is + * calculated from all points within angle_query_distance of the query point. Angles closer + * to the current point are weighted more towards the total angle then points further away. + * The formula for the angle weight is: 1 - (distance_to_query / angle_query_distance)^fall_off_strength + * \param path The vertex data of a path + * \param i index of the query point + * \param angle_query_distance query range (default to 0.1mm) + * \param fall_off_strength fall of strength of the angle weight + * \return sum of angles of all points p in range i - angle_query_distance < p < i + angle_query_distance + */ float cornerAngle(const OrderablePath& path, int i, const coord_t angle_query_distance = 100, const float fall_off_strength = 0.5) { static constexpr coord_t distance_step = 2000; @@ -767,7 +785,7 @@ class PathOrderOptimizer float angle = 0.0; int computed_angles = 0; - for(coord_t distance = distance_step ; distance <= max_distance ; distance += distance_step) + for (coord_t distance = distance_step; distance <= max_distance; distance += distance_step) { Point next = findNeighbourPoint(path, i, distance); Point previous = findNeighbourPoint(path, i, -distance); @@ -806,11 +824,11 @@ class PathOrderOptimizer */ coord_t getCombingDistance(const Point& a, const Point& b) { - if(!PolygonUtils::polygonCollidesWithLineSegment(*combing_boundary, a, b)) + if (! PolygonUtils::polygonCollidesWithLineSegment(*combing_boundary, a, b)) { - return getDirectDistance(a, b); //No collision with any line. Just compute the direct distance then. + return getDirectDistance(a, b); // No collision with any line. Just compute the direct distance then. } - if(paths.size() > 100) + if (paths.size() > 100) { /* If we have many paths to optimize the order for, this combing calculation can become very expensive. Instead, penalize travels @@ -818,13 +836,13 @@ class PathOrderOptimizer return getDirectDistance(a, b) * 5; } - if(combing_grid == nullptr) + if (combing_grid == nullptr) { - constexpr coord_t grid_size = 2000; //2mm grid cells. Smaller will use more memory, but reduce chance of unnecessary collision checks. + constexpr coord_t grid_size = 2000; // 2mm grid cells. Smaller will use more memory, but reduce chance of unnecessary collision checks. combing_grid = PolygonUtils::createLocToLineGrid(*combing_boundary, grid_size); } - CombPath comb_path; //Output variable. + CombPath comb_path; // Output variable. constexpr coord_t rounding_error = -25; constexpr coord_t tiny_travel_threshold = 0; constexpr bool fail_on_unavoidable_obstacles = false; @@ -832,12 +850,12 @@ class PathOrderOptimizer coord_t sum = 0; Point last_point = a; - for(const Point& point : comb_path) + for (const Point& point : comb_path) { sum += vSize(point - last_point); last_point = point; } - return sum * sum; //Squared distance, for fair comparison with direct distance. + return sum * sum; // Squared distance, for fair comparison with direct distance. } /*! @@ -852,7 +870,7 @@ class PathOrderOptimizer bool isLoopingPolyline(const OrderablePath& path) { - if(path.converted->empty()) + if (path.converted->empty()) { return false; } @@ -863,6 +881,6 @@ class PathOrderOptimizer template const std::unordered_multimap PathOrderOptimizer::no_order_requirements; -} //namespace cura +} // namespace cura -#endif //PATHORDEROPTIMIZER_H +#endif // PATHORDEROPTIMIZER_H From 9dbcdf80ea06fbdee18769fce327e4a524170e83 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 6 Oct 2023 10:54:26 +0200 Subject: [PATCH 343/470] comment for adding if statement CURA-11097 --- src/SkirtBrim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 98992c67d9..1731714763 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -667,8 +667,8 @@ void SkirtBrim::generateSupportBrim() } storage.support_brim.add(brim_line); - - const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length : skirt_brim_length + storage.support_brim.polygonLength(); + // In case of adhesion::NONE length of support brim is only the length of the brims formed for the support + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From 27e3c92f3e786a30db78e37e6a1480d3e4c0f743 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Fri, 6 Oct 2023 08:56:34 +0000 Subject: [PATCH 344/470] Applied clang-format. --- src/SkirtBrim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 1731714763..94761b0717 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -668,7 +668,7 @@ void SkirtBrim::generateSupportBrim() storage.support_brim.add(brim_line); // In case of adhesion::NONE length of support brim is only the length of the brims formed for the support - const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length : skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From a383339eae365892aa7d3cf7db3c1ddbdf537cfb Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 6 Oct 2023 13:07:14 +0200 Subject: [PATCH 345/470] Clean and optimized new corner angle computation algorithm CURA-11100 --- include/PathOrderOptimizer.h | 136 ++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 58 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 939baf6b21..108b49b61a 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -636,18 +636,35 @@ class PathOrderOptimizer return vert; } + //Precompute segments lengths because we are going to need them multiple times + std::vector segments_sizes(path.converted->size()); + coord_t total_length = 0; + for(const auto& [i, here]: **path.converted | ranges::views::enumerate) + { + const Point &next = (*path.converted)[(i + 1) % path.converted->size()]; + coord_t segment_size = vSize(next - here); + segments_sizes[i] = segment_size; + total_length += segment_size; + } + size_t best_i; float best_score = std::numeric_limits::infinity(); for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. - // For SHARPEST_CORNER, use a fixed starting score of 0. - const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); - const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) - ? MM2INT(10) - : vSize2(here - target_pos); + if(i == path.converted->size() - 1) + { + //The path is closed so the last point is the same as the first, don't process it twice + continue; + } - float corner_angle = cornerAngle(path, i); + //For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. + //For SHARPEST_CORNER, use a fixed starting score of 0. + const coord_t distance = (combing_boundary == nullptr) + ? getDirectDistance(here, target_pos) + : getCombingDistance(here, target_pos); + const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) ? MM2INT(10) : vSize2(here - target_pos); + + float corner_angle = cornerAngle(path, i, segments_sizes, total_length); // angles < 0 are concave (left turning) // angles > 0 are convex (right turning) @@ -725,79 +742,82 @@ class PathOrderOptimizer return best_i; } - Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance) + /*! + * Finds a neighbour point on the path, located before or after the given reference point. The neighbour point + * is computed by travelling on the path and stopping when the distance has been reached, For example: + * |------|---------|------|--------------*---| + * H A B C N D + * In this case, H is the start point of the path and ABCD are the actual following points of the path. + * The neighbour point N is found by reaching point D then going a bit backward on the previous segment. + * This approach gets rid of the mesh actual resolution and gives a neighbour point that is on the path + * at a given physical distance. + * \param path The vertex data of a path + * \param here The starting point index + * \param distance The distance we want to travel on the path, which may be positive to go forward + * or negative to go backward + * \param segments_sizes The pre-computed sizes of the segments + * \return The position of the path a the given distance from the reference point + */ + static Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance, const std::vector &segments_sizes) { - assert(distance); - - const Point here_pos = (*path.converted)[here]; - int direction = distance > 0 ? 1 : -1; + const int direction = distance > 0 ? 1 : -1; + const int size_delta = distance > 0 ? -1 : 0; distance = std::abs(distance); - coord_t actual_distance = 0; + // Travel on the path until we reach the distance int actual_delta = 0; - - Point prev_pos = here_pos; - Point next_pos; - while (actual_distance < distance) + coord_t travelled_distance = 0; + coord_t segment_size = 0; + while(travelled_distance < distance) { actual_delta += direction; - next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; - actual_distance += vSize(next_pos - prev_pos); - prev_pos = next_pos; + segment_size = segments_sizes[(here + actual_delta + size_delta + path.converted->size()) % path.converted->size()]; + travelled_distance += segment_size; } - if (actual_distance > distance) // Which is veeeery likely + const Point &next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; + + if(travelled_distance > distance) [[likely]] { - prev_pos = (*path.converted)[(here + actual_delta - direction + path.converted->size()) % path.converted->size()]; + // We have overtaken the required distance, go backward on the last segment + int prev = (here + actual_delta -direction + path.converted->size()) % path.converted->size(); + const Point &prev_pos = (*path.converted)[prev]; - Point vector = next_pos - prev_pos; - coord_t vector_size = vSize(vector); - Point unit_vector = (vector * 1000) / vector_size; - Point vector_delta = unit_vector * (vector_size - (actual_distance - distance)); + const Point vector = next_pos - prev_pos; + const Point unit_vector = (vector * 1000) / segment_size; + const Point vector_delta = unit_vector * (segment_size - (travelled_distance - distance)); return prev_pos + vector_delta / 1000; } else { + // Luckily, the required distance stops exactly on an existing point return next_pos; } } /*! - * Some models have very sharp corners, but also have a high resolution. If a sharp corner - * consists of many points each point individual might have a shallow corner, but the - * collective angle of all nearby points is greater. To counter this the cornerAngle is - * calculated from all points within angle_query_distance of the query point. Angles closer - * to the current point are weighted more towards the total angle then points further away. - * The formula for the angle weight is: 1 - (distance_to_query / angle_query_distance)^fall_off_strength - * \param path The vertex data of a path - * \param i index of the query point - * \param angle_query_distance query range (default to 0.1mm) - * \param fall_off_strength fall of strength of the angle weight - * \return sum of angles of all points p in range i - angle_query_distance < p < i + angle_query_distance - */ - float cornerAngle(const OrderablePath& path, int i, const coord_t angle_query_distance = 100, const float fall_off_strength = 0.5) + * Some models have very sharp corners, but also have a high resolution. If a sharp corner + * consists of many points each point individual might have a shallow corner, but the + * collective angle of all nearby points is greater. To counter this the cornerAngle is + * calculated from two points within angle_query_distance of the query point, no matter + * what segment this leads us to + * \param path The vertex data of a path + * \param i index of the query point + * \param segments_sizes The pre-computed sizes of the segments + * \param total_length The path total length + * \param angle_query_distance query range (default to 1mm) + * \return angle between the reference point and the two sibling points, weighed to [-1.0 ; 1.0] + */ + static float cornerAngle(const OrderablePath& path, int i, const std::vector &segments_sizes, coord_t total_length, const coord_t angle_query_distance = 1000) { - static constexpr coord_t distance_step = 2000; - static constexpr coord_t max_distance = 5000; - - const Point here = (*path.converted)[i]; - - float angle = 0.0; - int computed_angles = 0; - - for (coord_t distance = distance_step; distance <= max_distance; distance += distance_step) - { - Point next = findNeighbourPoint(path, i, distance); - Point previous = findNeighbourPoint(path, i, -distance); - - angle += LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; - computed_angles++; - } + const coord_t bounded_distance = std::min(angle_query_distance, total_length / 2); + const Point &here = (*path.converted)[i]; + const Point next = findNeighbourPoint(path, i, bounded_distance, segments_sizes); + const Point previous = findNeighbourPoint(path, i, -bounded_distance, segments_sizes); - angle /= computed_angles; - angle /= M_PI; + float angle = LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; - return angle; + return angle / M_PI; } /*! From 6311be84cfdccd3ba9c7815b7a325c86866a65e1 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Fri, 6 Oct 2023 11:12:44 +0000 Subject: [PATCH 346/470] Applied clang-format. --- include/PathOrderOptimizer.h | 62 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 108b49b61a..d8d6d9ca17 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -636,12 +636,12 @@ class PathOrderOptimizer return vert; } - //Precompute segments lengths because we are going to need them multiple times + // Precompute segments lengths because we are going to need them multiple times std::vector segments_sizes(path.converted->size()); coord_t total_length = 0; - for(const auto& [i, here]: **path.converted | ranges::views::enumerate) + for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - const Point &next = (*path.converted)[(i + 1) % path.converted->size()]; + const Point& next = (*path.converted)[(i + 1) % path.converted->size()]; coord_t segment_size = vSize(next - here); segments_sizes[i] = segment_size; total_length += segment_size; @@ -651,18 +651,18 @@ class PathOrderOptimizer float best_score = std::numeric_limits::infinity(); for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - if(i == path.converted->size() - 1) + if (i == path.converted->size() - 1) { - //The path is closed so the last point is the same as the first, don't process it twice + // The path is closed so the last point is the same as the first, don't process it twice continue; } - //For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. - //For SHARPEST_CORNER, use a fixed starting score of 0. - const coord_t distance = (combing_boundary == nullptr) - ? getDirectDistance(here, target_pos) - : getCombingDistance(here, target_pos); - const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) ? MM2INT(10) : vSize2(here - target_pos); + // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. + // For SHARPEST_CORNER, use a fixed starting score of 0. + const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); + const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) + ? MM2INT(10) + : vSize2(here - target_pos); float corner_angle = cornerAngle(path, i, segments_sizes, total_length); // angles < 0 are concave (left turning) @@ -758,7 +758,7 @@ class PathOrderOptimizer * \param segments_sizes The pre-computed sizes of the segments * \return The position of the path a the given distance from the reference point */ - static Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance, const std::vector &segments_sizes) + static Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance, const std::vector& segments_sizes) { const int direction = distance > 0 ? 1 : -1; const int size_delta = distance > 0 ? -1 : 0; @@ -768,20 +768,20 @@ class PathOrderOptimizer int actual_delta = 0; coord_t travelled_distance = 0; coord_t segment_size = 0; - while(travelled_distance < distance) + while (travelled_distance < distance) { actual_delta += direction; segment_size = segments_sizes[(here + actual_delta + size_delta + path.converted->size()) % path.converted->size()]; travelled_distance += segment_size; } - const Point &next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; + const Point& next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; - if(travelled_distance > distance) [[likely]] + if (travelled_distance > distance) [[likely]] { // We have overtaken the required distance, go backward on the last segment - int prev = (here + actual_delta -direction + path.converted->size()) % path.converted->size(); - const Point &prev_pos = (*path.converted)[prev]; + int prev = (here + actual_delta - direction + path.converted->size()) % path.converted->size(); + const Point& prev_pos = (*path.converted)[prev]; const Point vector = next_pos - prev_pos; const Point unit_vector = (vector * 1000) / segment_size; @@ -796,22 +796,22 @@ class PathOrderOptimizer } /*! - * Some models have very sharp corners, but also have a high resolution. If a sharp corner - * consists of many points each point individual might have a shallow corner, but the - * collective angle of all nearby points is greater. To counter this the cornerAngle is - * calculated from two points within angle_query_distance of the query point, no matter - * what segment this leads us to - * \param path The vertex data of a path - * \param i index of the query point - * \param segments_sizes The pre-computed sizes of the segments - * \param total_length The path total length - * \param angle_query_distance query range (default to 1mm) - * \return angle between the reference point and the two sibling points, weighed to [-1.0 ; 1.0] - */ - static float cornerAngle(const OrderablePath& path, int i, const std::vector &segments_sizes, coord_t total_length, const coord_t angle_query_distance = 1000) + * Some models have very sharp corners, but also have a high resolution. If a sharp corner + * consists of many points each point individual might have a shallow corner, but the + * collective angle of all nearby points is greater. To counter this the cornerAngle is + * calculated from two points within angle_query_distance of the query point, no matter + * what segment this leads us to + * \param path The vertex data of a path + * \param i index of the query point + * \param segments_sizes The pre-computed sizes of the segments + * \param total_length The path total length + * \param angle_query_distance query range (default to 1mm) + * \return angle between the reference point and the two sibling points, weighed to [-1.0 ; 1.0] + */ + static float cornerAngle(const OrderablePath& path, int i, const std::vector& segments_sizes, coord_t total_length, const coord_t angle_query_distance = 1000) { const coord_t bounded_distance = std::min(angle_query_distance, total_length / 2); - const Point &here = (*path.converted)[i]; + const Point& here = (*path.converted)[i]; const Point next = findNeighbourPoint(path, i, bounded_distance, segments_sizes); const Point previous = findNeighbourPoint(path, i, -bounded_distance, segments_sizes); From c562a43aab7fb36007d7cbaa15b1471cfac37576 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 10:38:33 +0200 Subject: [PATCH 347/470] Removed debug output --- src/SkeletalTrapezoidationGraph.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/SkeletalTrapezoidationGraph.cpp b/src/SkeletalTrapezoidationGraph.cpp index ed8cc1035d..4657b8ee97 100644 --- a/src/SkeletalTrapezoidationGraph.cpp +++ b/src/SkeletalTrapezoidationGraph.cpp @@ -3,17 +3,18 @@ #include "SkeletalTrapezoidationGraph.h" -#include +#include "utils/linearAlg2D.h" +#include "utils/macros.h" #include -#include "utils/linearAlg2D.h" -#include "utils/macros.h" +#include namespace cura { -STHalfEdge::STHalfEdge(SkeletalTrapezoidationEdge data) : HalfEdge(data) +STHalfEdge::STHalfEdge(SkeletalTrapezoidationEdge data) + : HalfEdge(data) { } @@ -131,7 +132,8 @@ STHalfEdge* STHalfEdge::getNextUnconnected() return result->twin; } -STHalfEdgeNode::STHalfEdgeNode(SkeletalTrapezoidationJoint data, Point p) : HalfEdgeNode(data, p) +STHalfEdgeNode::STHalfEdgeNode(SkeletalTrapezoidationJoint data, Point p) + : HalfEdgeNode(data, p) { } @@ -223,7 +225,10 @@ void SkeletalTrapezoidationGraph::collapseSmallEdges(coord_t snap_dist) } }; - auto should_collapse = [snap_dist](node_t* a, node_t* b) { return shorterThen(a->p - b->p, snap_dist); }; + auto should_collapse = [snap_dist](node_t* a, node_t* b) + { + return shorterThen(a->p - b->p, snap_dist); + }; for (auto edge_it = edges.begin(); edge_it != edges.end();) { @@ -253,10 +258,6 @@ void SkeletalTrapezoidationGraph::collapseSmallEdges(coord_t snap_dist) { edge_from_3->from = quad_mid->from; edge_from_3->twin->to = quad_mid->from; - if (count > 50) - { - std::cerr << edge_from_3->from->p << " - " << edge_from_3->to->p << '\n'; - } if (++count > 1000) { break; From 00b71215d5d80f81a9b9ae4b5531beb593e4bd96 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 10:52:13 +0200 Subject: [PATCH 348/470] Fixed some edge-cases with new angle calculation CURA-11100 --- include/PathOrderOptimizer.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index d8d6d9ca17..ab58d30651 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -689,16 +689,12 @@ class PathOrderOptimizer { default: case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER: - if (corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. - { - score += corner_angle * corner_shift; - } + // Give advantage to concave corners. More advantage for sharper corners. + score += corner_angle * corner_shift; break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER: - if (corner_angle > 0) // Indeed a convex corner? - { - score -= corner_angle * corner_shift; - } + // Give advantage to convex corners. More advantage for sharper corners. + score -= corner_angle * corner_shift; break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY: score -= std::abs(corner_angle) * corner_shift; // Still give sharper corners more advantage. @@ -717,7 +713,7 @@ class PathOrderOptimizer } } - constexpr float EPSILON = 25.0; + constexpr float EPSILON = 5.0; if (std::abs(best_score - score) <= EPSILON) { // add breaker for two candidate starting location with similar score From edd9b398369e06a4b90a6b5de9532febcfc11954 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 15:26:34 +0200 Subject: [PATCH 349/470] Minor optimization CURA-11100 Co-authored-by: Casper Lamboo --- include/PathOrderOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index ab58d30651..ce11a18b12 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -642,7 +642,7 @@ class PathOrderOptimizer for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { const Point& next = (*path.converted)[(i + 1) % path.converted->size()]; - coord_t segment_size = vSize(next - here); + const coord_t segment_size = vSize(next - here); segments_sizes[i] = segment_size; total_length += segment_size; } From 0c757cb7aabc8a4cba0948e009d3848dd4d47138 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 15:44:51 +0200 Subject: [PATCH 350/470] Applied code suggestion by @casperlamboo CURA-11100 --- include/PathOrderOptimizer.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index ce11a18b12..506e624927 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -649,14 +650,8 @@ class PathOrderOptimizer size_t best_i; float best_score = std::numeric_limits::infinity(); - for (const auto& [i, here] : **path.converted | ranges::views::enumerate) + for (const auto& [i, here] : **path.converted | ranges::views::drop_last(1) | ranges::views::enumerate) { - if (i == path.converted->size() - 1) - { - // The path is closed so the last point is the same as the first, don't process it twice - continue; - } - // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. // For SHARPEST_CORNER, use a fixed starting score of 0. const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); From 47cc9ba3419b519ea29d48b847139b5deb8a3221 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Mon, 9 Oct 2023 13:45:37 +0000 Subject: [PATCH 351/470] Applied clang-format. --- include/PathOrderOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 506e624927..ae7591db45 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -17,10 +17,10 @@ #include #include #include +#include #include #include #include -#include #include #include From b3ff78c015312b6155cddafa9fb1f62fe037ad9b Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 10:40:09 +0200 Subject: [PATCH 352/470] pin gRPC defs to 0.1.0-beta.1 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index dea1860300..841ec2d936 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/0.1.0-beta.1") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From 0503a4c7a2e554bf8f2e9cb3e0e3824df0a54fa8 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 10:40:52 +0200 Subject: [PATCH 353/470] set version to 5.5.0-beta.2 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 841ec2d936..2556e86c45 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-beta.1" + self.version = "5.5.0-beta.2" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From 9cf7083257b9f9911ee45b76c7bab22b5e95eb4e Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 10:42:59 +0200 Subject: [PATCH 354/470] set version to 5.6.0-alpha --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 2556e86c45..27c205dc58 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-beta.2" + self.version = "5.6.0-alpha" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From ae608cdaf5c6516a10c67c4c4b54416eece04107 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 11:05:34 +0200 Subject: [PATCH 355/470] loosen deps version --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 2556e86c45..383f5631f9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/0.1.0-beta.1") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From 5f3a1f4cfb5c22d370a8a194eb6c0c7cc6a38632 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 10 Oct 2023 17:02:47 +0200 Subject: [PATCH 356/470] Basically working parameterizable prime tower with base CURA-10783 --- include/PrimeTower.h | 7 ++- include/SkirtBrim.h | 9 ---- src/FffGcodeWriter.cpp | 14 ----- src/PrimeTower.cpp | 109 ++++++++++++++++++++++++++------------- src/SkirtBrim.cpp | 49 ++---------------- src/raft.cpp | 16 +++--- src/sliceDataStorage.cpp | 9 +++- 7 files changed, 97 insertions(+), 116 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index 5bb8192a82..fe29030ee2 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -40,13 +40,14 @@ class PrimeTower const unsigned int number_of_prime_tower_start_locations = 21; //!< The required size of \ref PrimeTower::wipe_locations std::vector pattern_per_extruder; //!< For each extruder the pattern to print on all layers of the prime tower. - std::vector pattern_extra_brim_per_layer; //!< For each layer with an extra brim, the pattern to be added + std::vector> pattern_extra_brim_per_layer; //!< For each layer of each extruder with an extra brim, the pattern to be added public: bool enabled; //!< Whether the prime tower is enabled. bool would_have_actual_tower; //!< Whether there is an actual tower. bool multiple_extruders_on_first_layer; //!< Whether multiple extruders are allowed on the first layer of the prime tower (e.g. when a raft is there) Polygons outer_poly; //!< The outline of the outermost prime tower. + Polygons footprint; //!< The outline of the prime tower on layer 0 /* * In which order, from outside to inside, will we be printing the prime @@ -101,7 +102,9 @@ class PrimeTower void subtractFromSupport(SliceDataStorage& storage); private: - ExtrusionMoves generatePaths_extraBrim(const Polygons &outer_poly, coord_t extra_radius, coord_t line_width, bool add_inset); + ExtrusionMoves generatePaths_base(const Polygons &outer_poly, coord_t extra_radius, coord_t line_width); + + ExtrusionMoves generatePaths_inset(const Polygons &outer_poly, coord_t line_width, coord_t initial_inset); /*! * \see WipeTower::generatePaths diff --git a/include/SkirtBrim.h b/include/SkirtBrim.h index aefbd5bdd6..05f10a17e4 100644 --- a/include/SkirtBrim.h +++ b/include/SkirtBrim.h @@ -118,15 +118,6 @@ class SkirtBrim */ std::vector generateBrimOffsetPlan(std::vector& starting_outlines); - /*! - * In case that the models have skirt 'adhesion', but the prime tower has a brim, the covered areas are different. - * - * Since the output of this function will need to be handled differently than the rest of the adhesion lines, have a separate function. - * Specifically, for skirt an additional 'approximate convex hull' is applied to the initial 'covered area', which is detrimental to brim. - * \return An ordered list of offsets of the prime-tower to perform in the order in which they are to be performed. - */ - std::vector generatePrimeTowerBrimForSkirtAdhesionOffsetPlan(); - /*! * Generate the primary skirt/brim of the one skirt_brim_extruder or of all extruders simultaneously. * diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 71ebbdef42..f8dabab971 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -164,8 +164,6 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep run_multiple_producers_ordered_consumer( process_layer_starting_layer_nr, - //-Raft::getTotalExtraLayers(), - // total_layers + Raft::getFillerLayerCount() - 1, total_layers, [&storage, total_layers, this](int layer_nr) { @@ -687,8 +685,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raftLines.clear(); } - setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); - layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); } @@ -735,11 +731,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) std::vector raft_outline_paths; const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. - if (storage.primeRaftOutline.area() > 0) - { - raft_outline_paths.emplace_back(storage.primeRaftOutline.offset(-small_offset)); - raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. - } raft_outline_paths.emplace_back(storage.raftOutline.offset(-small_offset)); raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. const coord_t infill_outline_width = gcode_layer.configs_storage.raft_interface_config.getLineWidth(); @@ -841,11 +832,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) std::vector raft_outline_paths; const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. - if (storage.primeRaftOutline.area() > 0) - { - raft_outline_paths.emplace_back(storage.primeRaftOutline.offset(-small_offset)); - raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. - } raft_outline_paths.emplace_back(storage.raftOutline.offset(-small_offset)); raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. const coord_t infill_outline_width = gcode_layer.configs_storage.raft_interface_config.getLineWidth(); diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 472edc4054..49de8b3db1 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -97,6 +97,18 @@ void PrimeTower::generateGroundpoly() middle = Point(x - tower_size / 2, y + tower_size / 2); post_wipe_point = Point(x - tower_size / 2, y + tower_size / 2); + + const bool base_enabled = mesh_group_settings.get("prime_tower_brim_enable"); + const coord_t base_extra_radius = mesh_group_settings.get("prime_tower_base_size"); + const coord_t base_height = mesh_group_settings.get("prime_tower_base_height"); + if (base_enabled && base_extra_radius > 0 && base_height > 0) + { + footprint = outer_poly.offset(base_extra_radius); + } + else + { + footprint = outer_poly; + } } void PrimeTower::generatePaths(const SliceDataStorage& storage) @@ -110,7 +122,7 @@ void PrimeTower::generatePaths(const SliceDataStorage& storage) } } -PrimeTower::ExtrusionMoves PrimeTower::generatePaths_extraBrim(const Polygons& outer_poly, coord_t extra_radius, coord_t line_width, bool add_inset) +PrimeTower::ExtrusionMoves PrimeTower::generatePaths_base(const Polygons& outer_poly, coord_t extra_radius, coord_t line_width) { const Scene& scene = Application::getInstance().current_slice->scene; const Settings& mesh_group_settings = scene.current_mesh_group->settings; @@ -118,16 +130,6 @@ PrimeTower::ExtrusionMoves PrimeTower::generatePaths_extraBrim(const Polygons& o ExtrusionMoves pattern; - if (add_inset) - { - Polygons inset = outer_poly.offset(-line_width / 2); - while (! inset.empty()) - { - pattern.polygons.add(inset); - inset = inset.offset(-line_width); - } - } - int circles = 0; Polygons outset = outer_poly.offset(line_width / 2); while (outset.max() - outset.min() < (tower_size + extra_radius * 2)) @@ -140,15 +142,34 @@ PrimeTower::ExtrusionMoves PrimeTower::generatePaths_extraBrim(const Polygons& o return pattern; } -void PrimeTower::generatePaths_denseInfill() +PrimeTower::ExtrusionMoves PrimeTower::generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset) { - constexpr coord_t brim_extra_radius = 20000; - constexpr coord_t brim_extra_height = 20000; + const Scene& scene = Application::getInstance().current_slice->scene; + const Settings& mesh_group_settings = scene.current_mesh_group->settings; + + ExtrusionMoves pattern; + + Polygons inset = outer_poly.offset(-(initial_inset + line_width / 2)); + while (! inset.empty()) + { + pattern.polygons.add(inset); + inset = inset.offset(-line_width); + } + + return pattern; +} +void PrimeTower::generatePaths_denseInfill() +{ const Scene& scene = Application::getInstance().current_slice->scene; const Settings& mesh_group_settings = scene.current_mesh_group->settings; const coord_t layer_height = mesh_group_settings.get("layer_height"); + const bool base_enabled = mesh_group_settings.get("prime_tower_brim_enable"); + const coord_t base_extra_radius = scene.settings.get("prime_tower_base_size"); + const coord_t base_height = scene.settings.get("prime_tower_base_height"); + const int magnitude = scene.settings.get("prime_tower_base_curve_magnitude"); pattern_per_extruder.resize(extruder_count); + pattern_extra_brim_per_layer.resize(extruder_count); coord_t cumulative_inset = 0; // Each tower shape is going to be printed inside the other. This is the inset we're doing for each extruder. for (size_t extruder_nr : extruder_order) @@ -173,23 +194,33 @@ void PrimeTower::generatePaths_denseInfill() } } - // Only the most inside extruder needs to fill the inside of the prime tower - if (extruder_nr == extruder_order.front()) + // The most outside extruder is used for the base + if (base_enabled && extruder_nr == extruder_order.front()) { - // Generate the pattern for the first layer. - const coord_t line_width_layer0 = scene.extruders[extruder_nr].settings.get("raft_base_line_width"); - ExtrusionMoves pattern_layer0 = generatePaths_extraBrim(outer_poly, brim_extra_radius, line_width_layer0, true); - pattern_extra_brim_per_layer.push_back(pattern_layer0); - - for (coord_t z = layer_height; z < brim_extra_height; z += layer_height) + for (coord_t z = 0; z < base_height; z += layer_height) { - double brim_radius_factor = std::pow((1.0 - static_cast(z) / brim_extra_height), 4); - coord_t extra_radius = brim_extra_radius * brim_radius_factor; - ExtrusionMoves pattern = generatePaths_extraBrim(outer_poly, extra_radius, line_width, false); - pattern_extra_brim_per_layer.push_back(pattern); + double brim_radius_factor = std::pow((1.0 - static_cast(z) / base_height), magnitude); + coord_t extra_radius = base_extra_radius * brim_radius_factor; + ExtrusionMoves pattern = generatePaths_base(outer_poly, extra_radius, line_width); + if (pattern.polygons.empty() && pattern.lines.empty()) + { + break; + } + pattern_extra_brim_per_layer[extruder_nr].push_back(pattern); } } + cumulative_inset += wall_nr * line_width; + + // Only the most inside extruder needs to fill the inside of the prime tower + if (extruder_nr == extruder_order.back()) + { + ExtrusionMoves pattern = generatePaths_inset(outer_poly, line_width, cumulative_inset); + if (! pattern.polygons.empty() || ! pattern.lines.empty()) + { + pattern_extra_brim_per_layer[extruder_nr].push_back(pattern); + } + } } } @@ -215,7 +246,7 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la } const LayerIndex layer_nr = gcode_layer.getLayerNr(); - if (/*layer_nr < 0 ||*/ layer_nr > storage.max_print_height_second_to_last_extruder + 1) + if (layer_nr > storage.max_print_height_second_to_last_extruder + 1) { return; } @@ -252,26 +283,30 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t extruder_nr) const { - LayerIndex absolute_layer_number = gcode_layer.getLayerNr() + Raft::getTotalExtraLayers(); - assert(absolute_layer_number >= 0); + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; + const ExtruderTrain& base_train = mesh_group_settings.get("raft_base_extruder_nr"); + const bool adhesion_raft = base_train.settings.get("adhesion_type") == EPlatformAdhesion::RAFT; + LayerIndex absolute_layer_number = gcode_layer.getLayerNr(); + if (adhesion_raft) + { + absolute_layer_number += Raft::getTotalExtraLayers(); + } - if (absolute_layer_number > 0) + if (! adhesion_raft || absolute_layer_number > 0) { // Actual prime pattern const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); } - if (absolute_layer_number < pattern_extra_brim_per_layer.size() && extruder_nr == extruder_order.front()) + const std::vector& pattern_extra_brim = pattern_extra_brim_per_layer[extruder_nr]; + if (absolute_layer_number < pattern_extra_brim.size()) { - // Specific case for first layer => very high adhesion - const GCodePathConfig& config - = absolute_layer_number == 0 ? gcode_layer.configs_storage.raft_base_config : gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - - const ExtrusionMoves& pattern = pattern_extra_brim_per_layer[absolute_layer_number]; + // Extra rings for stronger base + const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; + const ExtrusionMoves& pattern = pattern_extra_brim[absolute_layer_number]; gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); } diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 94761b0717..2ec4d932c2 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -110,39 +110,15 @@ std::vector SkirtBrim::generateBrimOffsetPlan(std::vector SkirtBrim::generatePrimeTowerBrimForSkirtAdhesionOffsetPlan() -{ - std::vector prime_brim_offsets; - - const Settings& global_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - const bool prime_tower_brim_enable = global_settings.get("prime_tower_brim_enable"); - if (adhesion_type == EPlatformAdhesion::SKIRT && prime_tower_brim_enable && storage.primeTower.enabled) - { - const int extruder_nr = storage.primeTower.extruder_order[0]; - const ExtruderTrain& extruder = extruders[extruder_nr]; - int line_count = extruder.settings.get("brim_line_count"); - coord_t gap = extruder.settings.get("brim_gap"); - for (int line_idx = 0; line_idx < line_count; line_idx++) - { - const bool is_last = line_idx == line_count - 1; - coord_t offset = gap + line_widths[extruder_nr] / 2 + line_widths[extruder_nr] * line_idx; - prime_brim_offsets.emplace_back(&storage.primeTower.outer_poly, external_polys_only[extruder_nr], offset, offset, line_idx, extruder_nr, is_last); - } - } - - std::sort(prime_brim_offsets.begin(), prime_brim_offsets.end(), OffsetSorter); - return prime_brim_offsets; -} - void SkirtBrim::generate() { std::vector starting_outlines(extruder_count); std::vector all_brim_offsets = generateBrimOffsetPlan(starting_outlines); - std::vector prime_brim_offsets_for_skirt = generatePrimeTowerBrimForSkirtAdhesionOffsetPlan(); constexpr LayerIndex layer_nr = 0; constexpr bool include_support = true; - Polygons covered_area = storage.getLayerOutlines(layer_nr, include_support, /*include_prime_tower*/ true, /*external_polys_only*/ false); + const bool include_prime_tower = adhesion_type == EPlatformAdhesion::SKIRT; + Polygons covered_area = storage.getLayerOutlines(layer_nr, include_support, include_prime_tower, /*external_polys_only*/ false); std::vector allowed_areas_per_extruder(extruder_count); for (int extruder_nr = 0; extruder_nr < extruder_count; extruder_nr++) @@ -161,14 +137,6 @@ void SkirtBrim::generate() } } - // Note that the brim generated here for the prime-tower is _only_ when the rest if the model uses skirt. - // If everything uses brim to begin with, _including_ the prime-tower, it's not generated here, but along the rest. - if (! prime_brim_offsets_for_skirt.empty()) - { - // Note that his ignores the returned lengths: Less 'correct' in a sense, will be predictable for the user. - generatePrimaryBrim(prime_brim_offsets_for_skirt, covered_area, allowed_areas_per_extruder); - } - // Apply 'approximate convex hull' if the adhesion is skirt _after_ any skirt but also prime-tower-brim adhesion. // Otherwise, the now expanded convex hull covered areas will mess with that brim. Fortunately this does not mess // with the other area calculation above, since they are either itself a simple/convex shape or relevant for brim. @@ -406,12 +374,7 @@ Polygons SkirtBrim::getFirstLayerOutline(const int extruder_nr /* = -1 */) if (skirt_around_prime_tower_brim) { - const int prime_tower_brim_extruder_nr = storage.primeTower.extruder_order[0]; - const ExtruderTrain& prime_tower_brim_extruder = extruders[prime_tower_brim_extruder_nr]; - int line_count = prime_tower_brim_extruder.settings.get("brim_line_count"); - coord_t tower_gap = prime_tower_brim_extruder.settings.get("brim_gap"); - coord_t brim_width = tower_gap + line_count * line_widths[prime_tower_brim_extruder_nr]; - first_layer_outline = first_layer_outline.unionPolygons(storage.primeTower.outer_poly.offset(brim_width)); + first_layer_outline = first_layer_outline.unionPolygons(storage.primeTower.footprint); } Polygons shields; @@ -435,7 +398,7 @@ Polygons SkirtBrim::getFirstLayerOutline(const int extruder_nr /* = -1 */) else { // add brim underneath support by removing support where there's brim around the model constexpr bool include_support = false; // Include manually below. - constexpr bool include_prime_tower = false; // Include manually below. + constexpr bool include_prime_tower = false; // Not included. constexpr bool external_outlines_only = false; // Remove manually below. first_layer_outline = storage.getLayerOutlines(layer_nr, include_support, include_prime_tower, external_outlines_only, extruder_nr); first_layer_outline = first_layer_outline.unionPolygons(); // To guard against overlapping outlines, which would produce holes according to the even-odd rule. @@ -480,10 +443,6 @@ Polygons SkirtBrim::getFirstLayerOutline(const int extruder_nr /* = -1 */) first_layer_outline.add(support_layer.support_bottom); first_layer_outline.add(support_layer.support_roof); } - if (storage.primeTower.enabled && global_settings.get("prime_tower_brim_enable") && (extruder_nr == -1 || int(storage.primeTower.extruder_order[0]) == extruder_nr)) - { - first_layer_outline.add(storage.primeTower.outer_poly); // don't remove parts of the prime tower, but make a brim for it - } } constexpr coord_t join_distance = 20; first_layer_outline = first_layer_outline.offset(join_distance).offset(-join_distance); // merge adjacent models into single polygon diff --git a/src/raft.cpp b/src/raft.cpp index 384958afc4..bee9cc643b 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -66,14 +66,14 @@ void Raft::generate(SliceDataStorage& storage) } } - // storage.primeRaftOutline = storage.primeTower.outer_poly.offset(distance, ClipperLib::jtRound); - // NOTE: the raft doesn't take the prime tower brim into account, because it's (currently) not being printed when printing a raft - // if (settings.get("raft_remove_inside_corners")) - //{ - // storage.primeRaftOutline = storage.primeRaftOutline.unionPolygons(storage.raftOutline); - // storage.primeRaftOutline.makeConvex(); - // } - // storage.primeRaftOutline = storage.primeRaftOutline.difference(storage.raftOutline); // In case of overlaps. + const coord_t prime_tower_distance = settings.get("prime_tower_base_size"); + storage.primeRaftOutline = storage.primeTower.outer_poly.offset(prime_tower_distance, ClipperLib::jtRound); + if (settings.get("raft_remove_inside_corners")) + { + storage.primeRaftOutline = storage.primeRaftOutline.unionPolygons(storage.raftOutline); + storage.primeRaftOutline.makeConvex(); + } + storage.primeRaftOutline = storage.primeRaftOutline.difference(storage.raftOutline); // In case of overlaps. } coord_t Raft::getTotalThickness() diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 4533fbb8be..e5ba324ccb 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -333,7 +333,14 @@ Polygons { if (primeTower.enabled) { - total.add(primeTower.outer_poly); + if (layer_nr == 0) + { + total.add(primeTower.footprint); + } + else + { + total.add(primeTower.outer_poly); + } } } return total; From 1f8df4ce8be6663901d5c2bb2697455fae12a80e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 10 Oct 2023 17:03:15 +0200 Subject: [PATCH 357/470] Fix dark floating-point bug --- src/LayerPlanBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlanBuffer.cpp b/src/LayerPlanBuffer.cpp index 6551543bdc..b5bede2665 100644 --- a/src/LayerPlanBuffer.cpp +++ b/src/LayerPlanBuffer.cpp @@ -429,7 +429,7 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex return; } - assert((time_window >= 0 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); + assert((time_window >= -0.001 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); // ,layer change . // : ,precool command ,layer change . From 90f8a8f59b09dfc96049c206ecb705f781b21726 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Tue, 10 Oct 2023 15:04:01 +0000 Subject: [PATCH 358/470] Applied clang-format. --- include/PrimeTower.h | 4 +-- include/SkirtBrim.h | 82 +++++++++++++++++++++----------------------- 2 files changed, 41 insertions(+), 45 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index fe29030ee2..bdbc36bc0e 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -102,9 +102,9 @@ class PrimeTower void subtractFromSupport(SliceDataStorage& storage); private: - ExtrusionMoves generatePaths_base(const Polygons &outer_poly, coord_t extra_radius, coord_t line_width); + ExtrusionMoves generatePaths_base(const Polygons& outer_poly, coord_t extra_radius, coord_t line_width); - ExtrusionMoves generatePaths_inset(const Polygons &outer_poly, coord_t line_width, coord_t initial_inset); + ExtrusionMoves generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset); /*! * \see WipeTower::generatePaths diff --git a/include/SkirtBrim.h b/include/SkirtBrim.h index 05f10a17e4..fa41df0999 100644 --- a/include/SkirtBrim.h +++ b/include/SkirtBrim.h @@ -1,17 +1,17 @@ -//Copyright (c) 2023 UltiMaker -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef SKIRT_BRIM_H #define SKIRT_BRIM_H -#include "utils/Coord_t.h" #include "ExtruderTrain.h" #include "settings/EnumSettings.h" #include "sliceDataStorage.h" +#include "utils/Coord_t.h" #include -namespace cura +namespace cura { class Polygons; @@ -27,26 +27,25 @@ class SkirtBrim */ struct Offset { - Offset - ( + Offset( const std::variant& reference_outline_or_index, const bool external_only, const coord_t offset_value, const coord_t total_offset, const size_t inset_idx, const int extruder_nr, - const bool is_last - ) : - reference_outline_or_index(reference_outline_or_index), - external_only(external_only), - offset_value(offset_value), - total_offset(total_offset), - inset_idx(inset_idx), - extruder_nr(extruder_nr), - is_last(is_last) - {} - - std::variant reference_outline_or_index; + const bool is_last) + : reference_outline_or_index(reference_outline_or_index) + , external_only(external_only) + , offset_value(offset_value) + , total_offset(total_offset) + , inset_idx(inset_idx) + , extruder_nr(extruder_nr) + , is_last(is_last) + { + } + + std::variant reference_outline_or_index; bool external_only; //!< Wether to only offset outward from the reference polygons coord_t offset_value; //!< Distance by which to offset from the reference coord_t total_offset; //!< Total distance from the model @@ -58,15 +57,12 @@ class SkirtBrim /*! * Defines an order on offsets (potentially from different extruders) based on how far the offset is from the original outline. */ - static inline const auto OffsetSorter - { - [](const Offset& a, const Offset& b) - { - // Use extruder_nr in case both extruders have the same offset settings. - return a.total_offset != b.total_offset ? a.total_offset < b.total_offset : a.extruder_nr < b.extruder_nr; - } - }; - + static inline const auto OffsetSorter{ [](const Offset& a, const Offset& b) + { + // Use extruder_nr in case both extruders have the same offset settings. + return a.total_offset != b.total_offset ? a.total_offset < b.total_offset : a.extruder_nr < b.extruder_nr; + } }; + SliceDataStorage& storage; //!< Where to retrieve settings and store brim lines. const EPlatformAdhesion adhesion_type; //!< Whether we are generating brim, skirt, or raft const bool has_ooze_shield; //!< Whether the meshgroup has an ooze shield @@ -85,17 +81,17 @@ class SkirtBrim public: /*! * Precomputes some values used in several functions when calling \ref generate - * + * * \param storage Storage containing the parts at the first layer. */ SkirtBrim(SliceDataStorage& storage); /*! * Generate skirt or brim (depending on parameters). - * + * * When \p distance > 0 and \p count == 1 a skirt is generated, which has * slightly different configuration. Otherwise, a brim is generated. - * + * * \param storage Storage containing the parts at the first layer. * \param first_layer_outline The outline to generate skirt or brim around. * \param distance The distance of the first outset from the parts at the first @@ -108,7 +104,7 @@ class SkirtBrim private: /*! * Plan the offsets which we will be going to perform and put them in the right order. - * + * * In order for brims of different materials to grow toward the middle, * we need to perform the offsets alternatingly. * We therefore first create all planned Offset objects, @@ -120,7 +116,7 @@ class SkirtBrim /*! * Generate the primary skirt/brim of the one skirt_brim_extruder or of all extruders simultaneously. - * + * * \param[in,out] all_brim_offsets The offsets to perform. Adjusted when the minimal length constraint isn't met yet. * \param[in,out] covered_area The area of the first layer covered by model or generated brim lines. * \param[in,out] allowed_areas_per_extruder The difference between the machine bed area (offsetted by the nozzle offset) and the covered_area. @@ -130,9 +126,9 @@ class SkirtBrim /*! * Generate the brim inside the ooze shield and draft shield - * + * * \warning Adjusts brim_covered_area - * + * * \param storage Storage containing the parts at the first layer. * \param[in,out] brim_covered_area The area that was covered with brim before (in) and after (out) adding the shield brims * \param[in,out] allowed_areas_per_extruder The difference between the machine areas and the \p covered_area @@ -154,10 +150,10 @@ class SkirtBrim /*! * The disallowed area around the internal holes of parts with other parts inside which would get an external brim. - * + * * In order to prevent the external_only brim of a part inside another part to overlap with the internal holes of the outer part, * we generate a disallowed area around those internal hole polygons. - * + * * \param outline The full layer outlines * \param extruder_nr The extruder for which to compute disallowed areas * \return The disallowed areas @@ -166,9 +162,9 @@ class SkirtBrim /*! * Generate a brim line with offset parameters given by \p offset from the \p starting_outlines and store it in the \ref storage. - * + * * \warning Has side effects on \p covered_area, \p allowed_areas_per_extruder and \p total_length - * + * * \param offset The parameters with which to perform the offset * \param[in,out] covered_area The total area covered by the brims (and models) on the first layer. * \param[in,out] allowed_areas_per_extruder The difference between the machine areas and the \p covered_area @@ -179,11 +175,11 @@ class SkirtBrim /*! * Generate a skirt of extruders which don't yet comply with the minimum length requirement. - * + * * This skirt goes directly adjacent to all primary brims. - * + * * The skirt is stored in storage.skirt_brim. - * + * * \param[in,out] covered_area The total area covered by the brims (and models) on the first layer. * \param[in,out] allowed_areas_per_extruder The difference between the machine areas and the \p covered_area * \param[in,out] total_length The total length of the brim lines for each extruder. @@ -196,6 +192,6 @@ class SkirtBrim */ void generateSupportBrim(); }; -}//namespace cura +} // namespace cura -#endif //SKIRT_BRIM_H +#endif // SKIRT_BRIM_H From de2c993285915c9c2baf067fd807c97e0910f398 Mon Sep 17 00:00:00 2001 From: Remco Burema <41987080+rburema@users.noreply.github.com> Date: Wed, 11 Oct 2023 12:09:26 +0200 Subject: [PATCH 359/470] Fix comment to be technically correct. belatedly part of CURA-11041 Co-authored-by: Casper Lamboo --- include/sliceDataStorage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 067a0a60a3..4c424a2b09 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -212,7 +212,7 @@ class SupportLayer std::vector support_infill_parts; //!< a list of support infill parts Polygons support_bottom; //!< Piece of support below the support and above the model. This must not overlap with any of the support_infill_parts or support_roof. Polygons support_roof; //!< Piece of support above the support and below the model. This must not overlap with any of the support_infill_parts or support_bottom. - Polygons support_fractional_roof_top; //!< If the support distance is less than a multiple of the layer height, + Polygons support_fractional_roof_top; //!< If the support distance is not exactly a multiple of the layer height, // the first part of support just underneath the model needs to be printed at a fracional layer height. Polygons support_mesh_drop_down; //!< Areas from support meshes which should be supported by more support Polygons support_mesh; //!< Areas from support meshes which should NOT be supported by more support From 2dada4ceabe4c600ba3fad0caad640a8329c3ee6 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 12 Oct 2023 15:41:32 +0200 Subject: [PATCH 360/470] Properly handle overlapping brims/rafts CURA-10783 --- include/PrimeTower.h | 21 ++- include/sliceDataStorage.h | 2 - src/FffGcodeWriter.cpp | 252 ++++++++++++++++++------------------ src/FffPolygonGenerator.cpp | 4 +- src/PrimeTower.cpp | 77 +++++------ src/SkirtBrim.cpp | 15 ++- src/TreeModelVolumes.cpp | 2 +- src/raft.cpp | 10 -- src/sliceDataStorage.cpp | 9 +- 9 files changed, 196 insertions(+), 196 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index bdbc36bc0e..9133d3007a 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -4,6 +4,7 @@ #ifndef PRIME_TOWER_H #define PRIME_TOWER_H +#include "settings/types/LayerIndex.h" #include "utils/polygon.h" // Polygons #include "utils/polygonUtils.h" @@ -42,12 +43,20 @@ class PrimeTower std::vector pattern_per_extruder; //!< For each extruder the pattern to print on all layers of the prime tower. std::vector> pattern_extra_brim_per_layer; //!< For each layer of each extruder with an extra brim, the pattern to be added + Polygons outer_poly; //!< The outline of the outermost prime tower. + + struct BasePolygon + { + Polygons polygons; + size_t extra_rings; + }; + + std::vector outer_poly_base; //!< The outline of the prime tower for layers having a base + public: bool enabled; //!< Whether the prime tower is enabled. bool would_have_actual_tower; //!< Whether there is an actual tower. bool multiple_extruders_on_first_layer; //!< Whether multiple extruders are allowed on the first layer of the prime tower (e.g. when a raft is there) - Polygons outer_poly; //!< The outline of the outermost prime tower. - Polygons footprint; //!< The outline of the prime tower on layer 0 /* * In which order, from outside to inside, will we be printing the prime @@ -101,10 +110,14 @@ class PrimeTower */ void subtractFromSupport(SliceDataStorage& storage); + const Polygons &getOuterPoly(const LayerIndex &layer_nr) const; + + const Polygons &getGroundPoly() const; + private: - ExtrusionMoves generatePaths_base(const Polygons& outer_poly, coord_t extra_radius, coord_t line_width); + static ExtrusionMoves generatePaths_base(const Polygons &inset, size_t rings, coord_t line_width); - ExtrusionMoves generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset); + static ExtrusionMoves generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset); /*! * \see WipeTower::generatePaths diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 9b0661ed36..c3313e801a 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -333,8 +333,6 @@ class SliceDataStorage : public NoCopy std::vector skirt_brim[MAX_EXTRUDERS]; //!< Skirt/brim polygons per extruder, ordered from inner to outer polygons. Polygons support_brim; //!< brim lines for support, going from the edge of the support inward. \note Not ordered by inset. Polygons raftOutline; // Storage for the outline of the raft. Will be filled with lines when the GCode is generated. - Polygons primeRaftOutline; // ... the raft underneath the prime-tower will have to be printed first, if there is one. (When the raft has top layers with a different extruder - // for example.) int max_print_height_second_to_last_extruder; //!< Used in multi-extrusion: the layer number beyond which all models are printed with the same extruder std::vector max_print_height_per_extruder; //!< For each extruder the highest layer number at which it is used. diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index f8dabab971..0deaaff908 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -621,69 +621,65 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const coord_t max_resolution = base_settings.get("meshfix_maximum_resolution"); const coord_t max_deviation = base_settings.get("meshfix_maximum_deviation"); - std::vector raft_outline_paths; - if (storage.primeRaftOutline.area() > 0) + Polygons raft_outline_path = storage.raftOutline; + if (storage.primeTower.enabled) { - raft_outline_paths.emplace_back(storage.primeRaftOutline); + raft_outline_path = raft_outline_path.unionPolygons(storage.primeTower.getOuterPoly(layer_nr)); } - raft_outline_paths.emplace_back(storage.raftOutline); - for (const Polygons& raft_outline_path : raft_outline_paths) + Infill infill_comp( + EFillMethod::LINES, + zig_zaggify_infill, + connect_polygons, + raft_outline_path, + gcode_layer.configs_storage.raft_base_config.getLineWidth(), + line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + std::vector raft_paths; + infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); + if (! raft_paths.empty()) { - Infill infill_comp( - EFillMethod::LINES, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - gcode_layer.configs_storage.raft_base_config.getLineWidth(), - line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - std::vector raft_paths; - infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); - if (! raft_paths.empty()) - { - const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; - const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); - InsetOrderOptimizer wall_orderer( - *this, - storage, - gcode_layer, - base_settings, - base_extruder_nr, - config, - config, - config, - config, - retract_before_outer_wall, - wipe_dist, - wipe_dist, - base_extruder_nr, - base_extruder_nr, - z_seam_config, - raft_paths); - wall_orderer.addToLayer(); - } - gcode_layer.addLinesByOptimizer(raftLines, gcode_layer.configs_storage.raft_base_config, SpaceFillType::Lines); - - raft_polygons.clear(); - raftLines.clear(); + const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; + const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + base_settings, + base_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + base_extruder_nr, + base_extruder_nr, + z_seam_config, + raft_paths); + wall_orderer.addToLayer(); } + gcode_layer.addLinesByOptimizer(raftLines, gcode_layer.configs_storage.raft_base_config, SpaceFillType::Lines); + + raft_polygons.clear(); + raftLines.clear(); layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); @@ -728,11 +724,11 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) Application::getInstance().communication->sendLayerComplete(layer_nr, z, interface_layer_height); - std::vector raft_outline_paths; + Polygons raft_outline_path; const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. - raft_outline_paths.emplace_back(storage.raftOutline.offset(-small_offset)); - raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. + raft_outline_path = storage.raftOutline.offset(-small_offset); + raft_outline_path = Simplify(interface_settings).polygon(raft_outline_path); // Remove those micron-movements. const coord_t infill_outline_width = gcode_layer.configs_storage.raft_interface_config.getLineWidth(); Polygons raft_lines; AngleDegrees fill_angle = (num_surface_layers + num_interface_layers - raft_interface_layer) % 2 ? 45 : 135; // 90 degrees rotated from the first top layer. @@ -749,40 +745,42 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) constexpr int zag_skip_count = 0; constexpr coord_t pocket_size = 0; - for (const Polygons& raft_outline_path : raft_outline_paths) + if (storage.primeTower.enabled) { - Infill infill_comp( - EFillMethod::ZIG_ZAG, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - infill_outline_width, - interface_line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - interface_max_resolution, - interface_max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - std::vector raft_paths; // Should remain empty, since we have no walls. - infill_comp.generate(raft_paths, raft_polygons, raft_lines, interface_settings, layer_nr, SectionType::ADHESION); - gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_interface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); - - raft_polygons.clear(); - raft_lines.clear(); + raft_outline_path = raft_outline_path.difference(storage.primeTower.getOuterPoly(layer_nr)); } + Infill infill_comp( + EFillMethod::ZIG_ZAG, + zig_zaggify_infill, + connect_polygons, + raft_outline_path, + infill_outline_width, + interface_line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + interface_max_resolution, + interface_max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + std::vector raft_paths; // Should remain empty, since we have no walls. + infill_comp.generate(raft_paths, raft_polygons, raft_lines, interface_settings, layer_nr, SectionType::ADHESION); + gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_interface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); + + raft_polygons.clear(); + raft_lines.clear(); + setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); layer_plan_buffer.handle(gcode_layer, gcode); @@ -829,11 +827,11 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) Application::getInstance().communication->sendLayerComplete(layer_nr, z, surface_layer_height); - std::vector raft_outline_paths; + Polygons raft_outline_path; const coord_t small_offset = gcode_layer.configs_storage.raft_interface_config.getLineWidth() / 2; // Do this manually because of micron-movement created in corners when insetting a polygon that was offset with round joint type. - raft_outline_paths.emplace_back(storage.raftOutline.offset(-small_offset)); - raft_outline_paths.back() = Simplify(interface_settings).polygon(raft_outline_paths.back()); // Remove those micron-movements. + raft_outline_path = storage.raftOutline.offset(-small_offset); + raft_outline_path = Simplify(interface_settings).polygon(raft_outline_path); // Remove those micron-movements. const coord_t infill_outline_width = gcode_layer.configs_storage.raft_interface_config.getLineWidth(); Polygons raft_lines; AngleDegrees fill_angle @@ -851,40 +849,42 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) constexpr size_t zag_skip_count = 0; constexpr coord_t pocket_size = 0; - for (const Polygons& raft_outline_path : raft_outline_paths) + if (storage.primeTower.enabled) { - Infill infill_comp( - EFillMethod::ZIG_ZAG, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - infill_outline_width, - surface_line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - surface_max_resolution, - surface_max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - std::vector raft_paths; // Should remain empty, since we have no walls. - infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); - gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); - - raft_polygons.clear(); - raft_lines.clear(); + raft_outline_path = raft_outline_path.difference(storage.primeTower.getOuterPoly(layer_nr)); } + Infill infill_comp( + EFillMethod::ZIG_ZAG, + zig_zaggify_infill, + connect_polygons, + raft_outline_path, + infill_outline_width, + surface_line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + surface_max_resolution, + surface_max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + std::vector raft_paths; // Should remain empty, since we have no walls. + infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); + gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); + + raft_polygons.clear(); + raft_lines.clear(); + setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); layer_plan_buffer.handle(gcode_layer, gcode); diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp index daff0196eb..640a563284 100644 --- a/src/FffPolygonGenerator.cpp +++ b/src/FffPolygonGenerator.cpp @@ -985,7 +985,7 @@ void FffPolygonGenerator::processOozeShield(SliceDataStorage& storage) } for (LayerIndex layer_nr = 0; layer_nr <= storage.max_print_height_second_to_last_extruder; layer_nr++) { - storage.oozeShield[layer_nr] = storage.oozeShield[layer_nr].difference(storage.primeTower.outer_poly.offset(max_line_width / 2)); + storage.oozeShield[layer_nr] = storage.oozeShield[layer_nr].difference(storage.primeTower.getOuterPoly(layer_nr).offset(max_line_width / 2)); } } } @@ -1035,7 +1035,7 @@ void FffPolygonGenerator::processDraftShield(SliceDataStorage& storage) max_line_width = std::max(max_line_width, extruders[extruder_nr].settings.get("skirt_brim_line_width")); } } - storage.draft_protection_shield = storage.draft_protection_shield.difference(storage.primeTower.outer_poly.offset(max_line_width / 2)); + storage.draft_protection_shield = storage.draft_protection_shield.difference(storage.primeTower.getGroundPoly().offset(max_line_width / 2)); } } diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 49de8b3db1..39c6ae3fe2 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -87,7 +87,8 @@ void PrimeTower::generateGroundpoly() return; } - const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; + const Scene& scene = Application::getInstance().current_slice->scene; + const Settings& mesh_group_settings = scene.current_mesh_group->settings; const coord_t tower_size = mesh_group_settings.get("prime_tower_size"); const coord_t x = mesh_group_settings.get("prime_tower_position_x"); @@ -97,18 +98,6 @@ void PrimeTower::generateGroundpoly() middle = Point(x - tower_size / 2, y + tower_size / 2); post_wipe_point = Point(x - tower_size / 2, y + tower_size / 2); - - const bool base_enabled = mesh_group_settings.get("prime_tower_brim_enable"); - const coord_t base_extra_radius = mesh_group_settings.get("prime_tower_base_size"); - const coord_t base_height = mesh_group_settings.get("prime_tower_base_height"); - if (base_enabled && base_extra_radius > 0 && base_height > 0) - { - footprint = outer_poly.offset(base_extra_radius); - } - else - { - footprint = outer_poly; - } } void PrimeTower::generatePaths(const SliceDataStorage& storage) @@ -122,21 +111,15 @@ void PrimeTower::generatePaths(const SliceDataStorage& storage) } } -PrimeTower::ExtrusionMoves PrimeTower::generatePaths_base(const Polygons& outer_poly, coord_t extra_radius, coord_t line_width) +PrimeTower::ExtrusionMoves PrimeTower::generatePaths_base(const Polygons& inset, size_t rings, coord_t line_width) { - const Scene& scene = Application::getInstance().current_slice->scene; - const Settings& mesh_group_settings = scene.current_mesh_group->settings; - const coord_t tower_size = mesh_group_settings.get("prime_tower_size"); - ExtrusionMoves pattern; - int circles = 0; - Polygons outset = outer_poly.offset(line_width / 2); - while (outset.max() - outset.min() < (tower_size + extra_radius * 2)) + Polygons path = inset.offset(line_width / 2); + for (size_t ring = 0; ring < rings; ++ring) { - pattern.polygons.add(outset); - outset = outset.offset(line_width); - circles++; + pattern.polygons.add(path); + path = path.offset(line_width); } return pattern; @@ -167,7 +150,9 @@ void PrimeTower::generatePaths_denseInfill() const bool base_enabled = mesh_group_settings.get("prime_tower_brim_enable"); const coord_t base_extra_radius = scene.settings.get("prime_tower_base_size"); const coord_t base_height = scene.settings.get("prime_tower_base_height"); - const int magnitude = scene.settings.get("prime_tower_base_curve_magnitude"); + const int base_curve_magnitude = mesh_group_settings.get("prime_tower_base_curve_magnitude"); + const coord_t line_width = scene.extruders[extruder_order.front()].settings.get("prime_tower_line_width"); + pattern_per_extruder.resize(extruder_count); pattern_extra_brim_per_layer.resize(extruder_count); @@ -195,18 +180,21 @@ void PrimeTower::generatePaths_denseInfill() } // The most outside extruder is used for the base - if (base_enabled && extruder_nr == extruder_order.front()) + if (extruder_nr == extruder_order.front() && base_enabled && base_extra_radius > 0 && base_height > 0) { for (coord_t z = 0; z < base_height; z += layer_height) { - double brim_radius_factor = std::pow((1.0 - static_cast(z) / base_height), magnitude); + double brim_radius_factor = std::pow((1.0 - static_cast(z) / base_height), base_curve_magnitude); coord_t extra_radius = base_extra_radius * brim_radius_factor; - ExtrusionMoves pattern = generatePaths_base(outer_poly, extra_radius, line_width); - if (pattern.polygons.empty() && pattern.lines.empty()) + size_t extra_rings = extra_radius / line_width; + if (extra_rings == 0) { break; } - pattern_extra_brim_per_layer[extruder_nr].push_back(pattern); + extra_radius = line_width * extra_rings; + outer_poly_base.push_back(outer_poly.offset(extra_radius)); + + pattern_extra_brim_per_layer[extruder_nr].push_back(generatePaths_base(outer_poly, extra_rings, line_width)); } } @@ -283,14 +271,9 @@ void PrimeTower::addToGcode(const SliceDataStorage& storage, LayerPlan& gcode_la void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t extruder_nr) const { - const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - const ExtruderTrain& base_train = mesh_group_settings.get("raft_base_extruder_nr"); - const bool adhesion_raft = base_train.settings.get("adhesion_type") == EPlatformAdhesion::RAFT; - LayerIndex absolute_layer_number = gcode_layer.getLayerNr(); - if (adhesion_raft) - { - absolute_layer_number += Raft::getTotalExtraLayers(); - } + const size_t raft_total_extra_layers = Raft::getTotalExtraLayers(); + const bool adhesion_raft = raft_total_extra_layers > 0; + LayerIndex absolute_layer_number = gcode_layer.getLayerNr() + raft_total_extra_layers; if (! adhesion_raft || absolute_layer_number > 0) { @@ -324,6 +307,24 @@ void PrimeTower::subtractFromSupport(SliceDataStorage& storage) } } +const Polygons& PrimeTower::getOuterPoly(const LayerIndex& layer_nr) const +{ + const LayerIndex absolute_layer_nr = layer_nr + Raft::getTotalExtraLayers(); + if (absolute_layer_nr < outer_poly_base.size()) + { + return outer_poly_base[absolute_layer_nr]; + } + else + { + return outer_poly; + } +} + +const Polygons& PrimeTower::getGroundPoly() const +{ + return getOuterPoly(-Raft::getTotalExtraLayers()); +} + void PrimeTower::gotoStartLocation(LayerPlan& gcode_layer, const int extruder_nr) const { int current_start_location_idx = ((((extruder_nr + 1) * gcode_layer.getLayerNr()) % number_of_prime_tower_start_locations) + number_of_prime_tower_start_locations) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 2ec4d932c2..522e0994f5 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -118,6 +118,7 @@ void SkirtBrim::generate() constexpr LayerIndex layer_nr = 0; constexpr bool include_support = true; const bool include_prime_tower = adhesion_type == EPlatformAdhesion::SKIRT; + const bool has_prime_tower = storage.primeTower.enabled; Polygons covered_area = storage.getLayerOutlines(layer_nr, include_support, include_prime_tower, /*external_polys_only*/ false); std::vector allowed_areas_per_extruder(extruder_count); @@ -135,6 +136,11 @@ void SkirtBrim::generate() // so that the brim lines don't overlap with the holes by half the line width allowed_areas_per_extruder[extruder_nr] = allowed_areas_per_extruder[extruder_nr].difference(getInternalHoleExclusionArea(covered_area, extruder_nr)); } + + if (has_prime_tower) + { + allowed_areas_per_extruder[extruder_nr] = allowed_areas_per_extruder[extruder_nr].difference(storage.primeTower.getGroundPoly()); + } } // Apply 'approximate convex hull' if the adhesion is skirt _after_ any skirt but also prime-tower-brim adhesion. @@ -344,12 +350,12 @@ Polygons SkirtBrim::getFirstLayerOutline(const int extruder_nr /* = -1 */) const int primary_line_count = line_count[reference_extruder_nr]; const bool external_only = adhesion_type == EPlatformAdhesion::SKIRT || external_polys_only[reference_extruder_nr]; // Whether to include holes or not. Skirt doesn't have any holes. + const bool has_prime_tower = storage.primeTower.enabled; const LayerIndex layer_nr = 0; if (adhesion_type == EPlatformAdhesion::SKIRT) { constexpr bool include_support = true; - const bool skirt_around_prime_tower_brim = storage.primeTower.enabled && global_settings.get("prime_tower_brim_enable"); - const bool include_prime_tower = ! skirt_around_prime_tower_brim; // include manually otherwise + const bool include_prime_tower = ! has_prime_tower; // include manually otherwise first_layer_outline = Polygons(); int skirt_height = 0; @@ -371,10 +377,9 @@ Polygons SkirtBrim::getFirstLayerOutline(const int extruder_nr /* = -1 */) } } - - if (skirt_around_prime_tower_brim) + if (has_prime_tower) { - first_layer_outline = first_layer_outline.unionPolygons(storage.primeTower.footprint); + first_layer_outline = first_layer_outline.unionPolygons(storage.primeTower.getGroundPoly()); } Polygons shields; diff --git a/src/TreeModelVolumes.cpp b/src/TreeModelVolumes.cpp index 6ddcef2c93..aea31de82c 100644 --- a/src/TreeModelVolumes.cpp +++ b/src/TreeModelVolumes.cpp @@ -150,7 +150,7 @@ TreeModelVolumes::TreeModelVolumes( if (storage.primeTower.enabled) { - anti_overhang_[layer_idx].add(storage.primeTower.outer_poly); + anti_overhang_[layer_idx].add(storage.primeTower.getGroundPoly()); } anti_overhang_[layer_idx] = anti_overhang_[layer_idx].unionPolygons(); }); diff --git a/src/raft.cpp b/src/raft.cpp index bee9cc643b..af8daafde0 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -8,7 +8,6 @@ #include "Slice.h" #include "settings/EnumSettings.h" //For EPlatformAdhesion. #include "sliceDataStorage.h" -#include "support.h" #include "utils/math.h" #include @@ -65,15 +64,6 @@ void Raft::generate(SliceDataStorage& storage) return; } } - - const coord_t prime_tower_distance = settings.get("prime_tower_base_size"); - storage.primeRaftOutline = storage.primeTower.outer_poly.offset(prime_tower_distance, ClipperLib::jtRound); - if (settings.get("raft_remove_inside_corners")) - { - storage.primeRaftOutline = storage.primeRaftOutline.unionPolygons(storage.raftOutline); - storage.primeRaftOutline.makeConvex(); - } - storage.primeRaftOutline = storage.primeRaftOutline.difference(storage.raftOutline); // In case of overlaps. } coord_t Raft::getTotalThickness() diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index e5ba324ccb..c560a2b675 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -333,14 +333,7 @@ Polygons { if (primeTower.enabled) { - if (layer_nr == 0) - { - total.add(primeTower.footprint); - } - else - { - total.add(primeTower.outer_poly); - } + total.add(primeTower.getOuterPoly(layer_nr)); } } return total; From 23080f9069ad7046a43643fb391d1f121fbe0d1b Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Thu, 12 Oct 2023 13:44:20 +0000 Subject: [PATCH 361/470] Applied clang-format. --- include/PrimeTower.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index 9133d3007a..63a84a254f 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -110,12 +110,12 @@ class PrimeTower */ void subtractFromSupport(SliceDataStorage& storage); - const Polygons &getOuterPoly(const LayerIndex &layer_nr) const; + const Polygons& getOuterPoly(const LayerIndex& layer_nr) const; - const Polygons &getGroundPoly() const; + const Polygons& getGroundPoly() const; private: - static ExtrusionMoves generatePaths_base(const Polygons &inset, size_t rings, coord_t line_width); + static ExtrusionMoves generatePaths_base(const Polygons& inset, size_t rings, coord_t line_width); static ExtrusionMoves generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset); From 01c239b7dc965d98f06c1009e70c8741184d1fd6 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 07:43:29 +0200 Subject: [PATCH 362/470] Fixed prime tower overlapping support CURA-10783 --- src/PrimeTower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 39c6ae3fe2..5166fe5bc1 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -297,10 +297,10 @@ void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t ext void PrimeTower::subtractFromSupport(SliceDataStorage& storage) { - const Polygons outside_polygon = outer_poly.getOutsidePolygons(); - AABB outside_polygon_boundary_box(outside_polygon); for (size_t layer = 0; layer <= (size_t)storage.max_print_height_second_to_last_extruder + 1 && layer < storage.support.supportLayers.size(); layer++) { + const Polygons outside_polygon = getOuterPoly(layer).getOutsidePolygons(); + AABB outside_polygon_boundary_box(outside_polygon); SupportLayer& support_layer = storage.support.supportLayers[layer]; // take the differences of the support infill parts and the prime tower area support_layer.excludeAreasFromSupportInfillAreas(outside_polygon, outside_polygon_boundary_box); From c874b2b3cd38384fe8bb2443ad451e3c82e3a8e3 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 10:54:08 +0200 Subject: [PATCH 363/470] Code documentation and cleaning CURA-10783 --- include/PrimeTower.h | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index 63a84a254f..2201ce7544 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -41,17 +41,10 @@ class PrimeTower const unsigned int number_of_prime_tower_start_locations = 21; //!< The required size of \ref PrimeTower::wipe_locations std::vector pattern_per_extruder; //!< For each extruder the pattern to print on all layers of the prime tower. - std::vector> pattern_extra_brim_per_layer; //!< For each layer of each extruder with an extra brim, the pattern to be added + std::vector> pattern_extra_brim_per_layer; //!< For each layer of each extruder, the extra pattern to be added for adhesion and/or strength Polygons outer_poly; //!< The outline of the outermost prime tower. - - struct BasePolygon - { - Polygons polygons; - size_t extra_rings; - }; - - std::vector outer_poly_base; //!< The outline of the prime tower for layers having a base + std::vector outer_poly_base; //!< The outline of the layers having extra width for the base public: bool enabled; //!< Whether the prime tower is enabled. @@ -110,17 +103,46 @@ class PrimeTower */ void subtractFromSupport(SliceDataStorage& storage); + /*! + * Get the outer polygon for the given layer, which may be the priming polygon only, or a larger polygon for layers with a base + * + * \param[in] layer_nr The index of the layer + * \return The outer polygon for the prime tower at the given layer + */ const Polygons& getOuterPoly(const LayerIndex& layer_nr) const; + /*! + * Get the outer polygon for the very first layer, which may be the priming polygon only, or a larger polygon if there is a base + */ const Polygons& getGroundPoly() const; private: + /*! + * \see PrimeTower::generatePaths + * + * Generate extra rings around the actual prime rings for a stronger base + * + * \param inset The inner circle of the rings to start generating the rings from + * \param rings The number of rings to add + * \param line_width The actual line width to distance the rings from each other + * \return The generated rings paths + */ static ExtrusionMoves generatePaths_base(const Polygons& inset, size_t rings, coord_t line_width); + /*! + * \see PrimeTower::generatePaths + * + * Generate extra rings inside the given circle for a better adhesion on the first layer + * + * \param outer_poly The outer polygon to start generating the rings from + * \param line_width The actual line width to distance the rings from each other + * \param initial_inset The inset distance to be added to the first generated ring + * \return The generated rings paths + */ static ExtrusionMoves generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset); /*! - * \see WipeTower::generatePaths + * \see PrimeTower::generatePaths * * Generate the extrude paths for each extruder on even and odd layers * Fill the ground poly with dense infill. From 0400d0a03fe2ccf534650f3938f1b7c0fc270715 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 11:01:23 +0200 Subject: [PATCH 364/470] Revert dirty fix which does not seem necessary anymore CURA-10783 --- src/LayerPlanBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlanBuffer.cpp b/src/LayerPlanBuffer.cpp index b5bede2665..6551543bdc 100644 --- a/src/LayerPlanBuffer.cpp +++ b/src/LayerPlanBuffer.cpp @@ -429,7 +429,7 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex return; } - assert((time_window >= -0.001 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); + assert((time_window >= 0 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); // ,layer change . // : ,precool command ,layer change . From 466a1cbfca6ffef0c0a400847bb2dd6e1cceec07 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 11:38:18 +0200 Subject: [PATCH 365/470] More code documentation CURA-10783 --- src/FffGcodeWriter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 0deaaff908..8c16b8d8bc 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -624,6 +624,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) Polygons raft_outline_path = storage.raftOutline; if (storage.primeTower.enabled) { + // Base layer is shared with prime tower base raft_outline_path = raft_outline_path.unionPolygons(storage.primeTower.getOuterPoly(layer_nr)); } @@ -747,6 +748,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) if (storage.primeTower.enabled) { + // Interface layer excludes prime tower base raft_outline_path = raft_outline_path.difference(storage.primeTower.getOuterPoly(layer_nr)); } @@ -851,6 +853,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) if (storage.primeTower.enabled) { + // Surface layers exclude prime tower base raft_outline_path = raft_outline_path.difference(storage.primeTower.getOuterPoly(layer_nr)); } From 9eab6b4f413dc76e1eab21bc5315214f172f1097 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 11:38:46 +0200 Subject: [PATCH 366/470] Removed useless dirty fix CURA-10783 --- src/raft.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/raft.cpp b/src/raft.cpp index af8daafde0..665cc833f5 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -104,14 +104,7 @@ coord_t Raft::getFillerLayerHeight() return normal_layer_height; } - if (getFillerLayerCount() != 0) - { - return round_divide(getZdiffBetweenRaftAndLayer0(), getFillerLayerCount()); - } - else - { - return mesh_group_settings.get("layer_height"); - } + return round_divide(getZdiffBetweenRaftAndLayer0(), getFillerLayerCount()); } From ae0dcd24b522b1d4984c23fbff33b97c2d2a1e20 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 13:51:02 +0200 Subject: [PATCH 367/470] Re-set dirty crash fix CURA-10783 --- src/LayerPlanBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlanBuffer.cpp b/src/LayerPlanBuffer.cpp index 6551543bdc..b5bede2665 100644 --- a/src/LayerPlanBuffer.cpp +++ b/src/LayerPlanBuffer.cpp @@ -429,7 +429,7 @@ void LayerPlanBuffer::insertFinalPrintTempCommand(std::vector& ex return; } - assert((time_window >= 0 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); + assert((time_window >= -0.001 || last_extruder_plan.estimates.material == 0) && "Time window should always be positive if we actually extrude"); // ,layer change . // : ,precool command ,layer change . From 9e958a99e1e33fc559a776754450342b2cad723f Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Oct 2023 14:39:25 +0200 Subject: [PATCH 368/470] Force prime tower base for raft CURA-10783 --- src/PrimeTower.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 5166fe5bc1..fa291fedc4 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -149,7 +149,8 @@ void PrimeTower::generatePaths_denseInfill() const coord_t layer_height = mesh_group_settings.get("layer_height"); const bool base_enabled = mesh_group_settings.get("prime_tower_brim_enable"); const coord_t base_extra_radius = scene.settings.get("prime_tower_base_size"); - const coord_t base_height = scene.settings.get("prime_tower_base_height"); + const bool has_raft = mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT; + const coord_t base_height = std::max(scene.settings.get("prime_tower_base_height"), has_raft ? layer_height : 0); const int base_curve_magnitude = mesh_group_settings.get("prime_tower_base_curve_magnitude"); const coord_t line_width = scene.extruders[extruder_order.front()].settings.get("prime_tower_line_width"); @@ -180,7 +181,7 @@ void PrimeTower::generatePaths_denseInfill() } // The most outside extruder is used for the base - if (extruder_nr == extruder_order.front() && base_enabled && base_extra_radius > 0 && base_height > 0) + if (extruder_nr == extruder_order.front() && (base_enabled || has_raft) && base_extra_radius > 0 && base_height > 0) { for (coord_t z = 0; z < base_height; z += layer_height) { From ad1aa1972ad9e33d86f66baee47478cb6e68d9c7 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Tue, 3 Oct 2023 12:24:18 +0200 Subject: [PATCH 369/470] Reverted the changes done in CURA-9521 CURA-11109 --- include/FffGcodeWriter.h | 3 +-- include/infill.h | 7 ++----- src/FffGcodeWriter.cpp | 9 +++------ src/infill.cpp | 10 ++++------ 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 0e3dea645c..96f504c1e3 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -569,8 +569,7 @@ class FffGcodeWriter : public NoCopy const Ratio skin_density, const bool monotonic, bool& added_something, - double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT, - const bool is_bridge_skin = false) const; + double fan_speed = GCodePathConfig::FAN_SPEED_DEFAULT) const; /*! * see if we can avoid printing a lines or zig zag style skin part in multiple segments by moving to diff --git a/include/infill.h b/include/infill.h index 40ca7fbd59..289a0850bb 100644 --- a/include/infill.h +++ b/include/infill.h @@ -206,8 +206,7 @@ class Infill const std::shared_ptr& cross_fill_provider = nullptr, const std::shared_ptr& lightning_layer = nullptr, const SliceMeshStorage* mesh = nullptr, - const Polygons& prevent_small_exposed_to_air = Polygons(), - const bool is_bridge_skin = false); + const Polygons& prevent_small_exposed_to_air = Polygons()); /*! * Generate the wall toolpaths of an infill area. It will return the inner contour and set the inner-contour. @@ -219,7 +218,6 @@ class Infill * \param line_width [in] The optimum wall line width of the walls * \param infill_overlap [in] The overlap of the infill * \param settings [in] A settings storage to use for generating variable-width walls. - * \param is_bridge_skin [in] Setting to filter out the extra skin walls while bridging * \return The inner contour of the wall toolpaths */ static Polygons generateWallToolPaths( @@ -230,8 +228,7 @@ class Infill const coord_t infill_overlap, const Settings& settings, int layer_idx, - SectionType section_type, - const bool is_bridge_skin = false); + SectionType section_type); private: /*! diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index e497b08a1f..55925dce5e 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2727,8 +2727,7 @@ void FffGcodeWriter::processTopBottom( skin_density, monotonic, added_something, - fan_speed, - is_bridge_skin); + fan_speed); } void FffGcodeWriter::processSkinPrintFeature( @@ -2745,8 +2744,7 @@ void FffGcodeWriter::processSkinPrintFeature( const Ratio skin_density, const bool monotonic, bool& added_something, - double fan_speed, - const bool is_bridge_skin) const + double fan_speed) const { Polygons skin_polygons; Polygons skin_lines; @@ -2806,8 +2804,7 @@ void FffGcodeWriter::processSkinPrintFeature( nullptr, nullptr, nullptr, - small_areas_on_surface ? Polygons() : exposed_to_air, - is_bridge_skin); + small_areas_on_surface ? Polygons() : exposed_to_air); // add paths if (! skin_polygons.empty() || ! skin_lines.empty() || ! skin_paths.empty()) diff --git a/src/infill.cpp b/src/infill.cpp index 9137aa66ca..6da3c25c4f 100644 --- a/src/infill.cpp +++ b/src/infill.cpp @@ -60,14 +60,13 @@ Polygons Infill::generateWallToolPaths( const coord_t infill_overlap, const Settings& settings, int layer_idx, - SectionType section_type, - const bool is_bridge_skin) + SectionType section_type) { outer_contour = outer_contour.offset(infill_overlap); scripta::log("infill_outer_contour", outer_contour, section_type, layer_idx, scripta::CellVDI{ "infill_overlap", infill_overlap }); Polygons inner_contour; - if ((wall_line_count > 0) && (! is_bridge_skin)) + if (wall_line_count > 0) { constexpr coord_t wall_0_inset = 0; // Don't apply any outer wall inset for these. That's just for the outer wall. WallToolPaths wall_toolpaths(outer_contour, line_width, wall_line_count, wall_0_inset, settings, layer_idx, section_type); @@ -91,15 +90,14 @@ void Infill::generate( const std::shared_ptr& cross_fill_provider, const std::shared_ptr& lightning_trees, const SliceMeshStorage* mesh, - const Polygons& prevent_small_exposed_to_air, - const bool is_bridge_skin) + const Polygons& prevent_small_exposed_to_air) { if (outer_contour.empty()) { return; } - inner_contour = generateWallToolPaths(toolpaths, outer_contour, wall_line_count, infill_line_width, infill_overlap, settings, layer_idx, section_type, is_bridge_skin); + inner_contour = generateWallToolPaths(toolpaths, outer_contour, wall_line_count, infill_line_width, infill_overlap, settings, layer_idx, section_type); scripta::log("infill_inner_contour_0", inner_contour, section_type, layer_idx); // It does not make sense to print a pattern in a small region. So the infill region From 88e0f4c9bb8dc755f0209da71c432b974a63fde6 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 25 Sep 2023 13:53:00 +0200 Subject: [PATCH 370/470] Support brim printed only at layer 0 CURA-10968 --- src/FffGcodeWriter.cpp | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 55925dce5e..a0ba973c15 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1232,24 +1232,28 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer + //support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. - const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - if (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr) + if (layer_nr == 0) { - total_line_count += storage.support_brim.size(); - Polygons support_brim_lines = storage.support_brim; - support_brim_lines.toPolylines(); - gcode_layer.addLinesByOptimizer( - support_brim_lines, - gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], - SpaceFillType::PolyLines, - enable_travel_optimization, - wipe_dist, - flow_ratio, - start_close_to, - fan_speed, - reverse_print_direction, - order_requirements = {}); + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; + if (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr) + { + total_line_count += storage.support_brim.size(); + Polygons support_brim_lines = storage.support_brim; + support_brim_lines.toPolylines(); + gcode_layer.addLinesByOptimizer( + support_brim_lines, + gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], + SpaceFillType::PolyLines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + start_close_to, + fan_speed, + reverse_print_direction, + order_requirements = {}); + } } } From 54e4592ba6d80740eb917b9df8077a1bcf6c34c7 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Mon, 25 Sep 2023 11:53:42 +0000 Subject: [PATCH 371/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index a0ba973c15..eab1cb7b29 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1232,7 +1232,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer - //support brim is only added in layer 0 + // support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. if (layer_nr == 0) { From 7a3aa045a9e87d835c450c38db67fd307af84d9e Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 25 Sep 2023 13:55:28 +0200 Subject: [PATCH 372/470] Comment fix CURA-10968 --- src/FffGcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index eab1cb7b29..fe08adf389 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1232,7 +1232,7 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer - // support brim is only added in layer 0 + // Support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. if (layer_nr == 0) { From ff858f3f80d6fdd515b7e3cbce33bb272e480170 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 29 Sep 2023 11:32:03 +0200 Subject: [PATCH 373/470] Comment fix CURA-10968 --- src/FffGcodeWriter.cpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index fe08adf389..50429e303b 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1234,26 +1234,23 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan // Add the support brim after the skirt_brim to gcode_layer // Support brim is only added in layer 0 // For support brim we don't care about the order, because support doesn't need to be accurate. - if (layer_nr == 0) + const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; + if ((layer_nr == 0) && (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr)) { - const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; - if (extruder_nr == mesh_group_settings.get("support_extruder_nr_layer_0").extruder_nr) - { - total_line_count += storage.support_brim.size(); - Polygons support_brim_lines = storage.support_brim; - support_brim_lines.toPolylines(); - gcode_layer.addLinesByOptimizer( - support_brim_lines, - gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], - SpaceFillType::PolyLines, - enable_travel_optimization, - wipe_dist, - flow_ratio, - start_close_to, - fan_speed, - reverse_print_direction, - order_requirements = {}); - } + total_line_count += storage.support_brim.size(); + Polygons support_brim_lines = storage.support_brim; + support_brim_lines.toPolylines(); + gcode_layer.addLinesByOptimizer( + support_brim_lines, + gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr], + SpaceFillType::PolyLines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + start_close_to, + fan_speed, + reverse_print_direction, + order_requirements = {}); } } From 0b18634a5e858e00ba026b9eadcb404e724ef14f Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 3 Oct 2023 19:39:58 +0200 Subject: [PATCH 374/470] Use correct path config CURA-11119 CURA-11121 --- src/FffGcodeWriter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 50429e303b..6ac183f0f2 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2831,10 +2831,10 @@ void FffGcodeWriter::processSkinPrintFeature( gcode_layer, mesh.settings, extruder_nr, - mesh_config.skin_config, - mesh_config.skin_config, - mesh_config.skin_config, - mesh_config.skin_config, + config, + config, + config, + config, retract_before_outer_wall, wipe_dist, wipe_dist, From 09bbf91171c218df592f2cbe6dd8f3e71857987c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 5 Oct 2023 09:54:12 +0200 Subject: [PATCH 375/470] Change seam position scoring to make it more consistent CURA-11100 --- include/PathOrderOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 93198fcd19..464810cefa 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -646,7 +646,7 @@ class PathOrderOptimizer // so the user has some control over where the seam will lie. // the divisor here may need adjusting to obtain the best results (TBD) - corner_shift = score_distance / 10; + corner_shift = score_distance / 50; } float score = score_distance; From 69ff2c953a3e724843c950cf95a1ca7889822b4b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 5 Oct 2023 17:18:08 +0200 Subject: [PATCH 376/470] Better version of the corner angle computation (to be optimized) CURA-11100 --- include/PathOrderOptimizer.h | 114 +++++++++++++++++------------------ src/FffGcodeWriter.cpp | 2 +- 2 files changed, 56 insertions(+), 60 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 464810cefa..b269b1e063 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -136,7 +136,7 @@ class PathOrderOptimizer * This reorders the \ref paths field and fills their starting vertices and * directions. */ - void optimize() + void optimize(bool precompute_start = true) { if(paths.empty()) { @@ -188,7 +188,7 @@ class PathOrderOptimizer //For some Z seam types the start position can be pre-computed. //This is faster since we don't need to re-compute the start position at each step then. - const bool precompute_start = seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; + precompute_start &= seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; if(precompute_start) { for(auto& path : paths) @@ -656,13 +656,13 @@ class PathOrderOptimizer case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER: if(corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. { - score -= (-corner_angle + 1.0) * corner_shift; + score += corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER: if(corner_angle > 0) // Indeed a convex corner? { - score -= (corner_angle + 1.0) * corner_shift; + score -= corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY: @@ -707,6 +707,43 @@ class PathOrderOptimizer return best_i; } + Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance) + { + assert(distance); + + const Point here_pos = (*path.converted)[here]; + int direction = distance > 0 ? 1 : -1; + distance = std::abs(distance); + + coord_t actual_distance = 0; + int actual_delta = 0; + + Point prev_pos = here_pos; + Point next_pos; + while(actual_distance < distance) + { + actual_delta += direction; + next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; + actual_distance += vSize(next_pos - prev_pos); + prev_pos = next_pos; + } + + if(actual_distance > distance) // Which is veeeery likely + { + prev_pos = (*path.converted)[(here + actual_delta -direction + path.converted->size()) % path.converted->size()]; + + Point vector = next_pos - prev_pos; + coord_t vector_size = vSize(vector); + Point unit_vector = (vector * 1000) / vector_size; + Point vector_delta = unit_vector * (vector_size - (actual_distance - distance)); + return prev_pos + vector_delta / 1000; + } + else + { + return next_pos; + } + } + /*! * Some models have very sharp corners, but also have a high resolution. If a sharp corner * consists of many points each point individual might have a shallow corner, but the @@ -722,68 +759,27 @@ class PathOrderOptimizer */ float cornerAngle(const OrderablePath& path, int i, const coord_t angle_query_distance = 100, const float fall_off_strength = 0.5) { - // If the edge length becomes too small we cannot accurately calculate the angle - // define a minimum edge length, so we don't get deviant values in the angle calculations - constexpr coord_t min_edge_length = 10; - constexpr coord_t min_edge_length2 = min_edge_length * min_edge_length; + static constexpr coord_t distance_step = 2000; + static constexpr coord_t max_distance = 5000; - const int offset_index = i % path.converted->size(); - Point here = (*path.converted)[offset_index]; + const Point here = (*path.converted)[i]; - const std::function find_neighbour_point = [&offset_index, &path](const int direction, const Point& here) - { - int offset_index_ = offset_index; - Point neighbour; - do - { - offset_index_ = (offset_index_ + path.converted->size() + direction) % path.converted->size(); - neighbour = (*path.converted)[offset_index_]; - } - while (vSize2(here - neighbour) < min_edge_length2 && offset_index_ != offset_index); // find previous point that is at least min_edge_length units away from here - return neighbour; - }; - - const std::function iterate_to_previous_point = [&find_neighbour_point](Point& previous_, Point& here_, Point& next_) - { - const auto dist = vSize(here_ - next_); - next_ = here_; - here_ = previous_; - previous_ = find_neighbour_point(-1, here_); - return dist; - }; - Point previous = find_neighbour_point(-1, here); + float angle = 0.0; + int computed_angles = 0; - const std::function iterate_to_next_point = [&find_neighbour_point](Point& previous_, Point& here_, Point& next_) + for(coord_t distance = distance_step ; distance <= max_distance ; distance += distance_step) { - const auto dist = vSize(here_ - previous_); - previous_ = here_; - here_ = next_; - next_ = find_neighbour_point(1, here_); - return dist; - }; - Point next = find_neighbour_point(1, here); + Point next = findNeighbourPoint(path, i, distance); + Point previous = findNeighbourPoint(path, i, -distance); - float corner_angle = LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; - - for (const auto& iterate_func : {iterate_to_previous_point, iterate_to_next_point}) - { - Point next_ = next; - Point here_ = here; - Point previous_ = previous; - for - ( - coord_t distance_to_query = iterate_func(previous_, here_, next_); - distance_to_query < angle_query_distance && here_ != here; - distance_to_query += iterate_func(previous_, here_, next_) - ) - { - // angles further away from the query point are weighted less - const float angle_weight = 1.0 - pow(distance_to_query / angle_query_distance, fall_off_strength); - corner_angle += (LinearAlg2D::getAngleLeft(previous_, here_, next_) - M_PI) * angle_weight; - } + angle += LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; + computed_angles++; } - return corner_angle / M_PI; // Limit angle between -1 and 1. + angle /= computed_angles; + angle /= M_PI; + + return angle; } /*! diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 6ac183f0f2..aedd5d439b 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1493,7 +1493,7 @@ void FffGcodeWriter::addMeshLayerToGCode( { part_order_optimizer.addPolygon(&part); } - part_order_optimizer.optimize(); + part_order_optimizer.optimize(false); for (const PathOrdering& path : part_order_optimizer.paths) { addMeshPartToGCode(storage, mesh, extruder_nr, mesh_config, *path.vertices, gcode_layer); From 82282725e5894dd3e776e37feba8e56e00ca8c2c Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Thu, 5 Oct 2023 15:18:51 +0000 Subject: [PATCH 377/470] Applied clang-format. --- include/PathOrderOptimizer.h | 302 +++++++++++++++++++---------------- 1 file changed, 160 insertions(+), 142 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index b269b1e063..939baf6b21 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -4,9 +4,6 @@ #ifndef PATHORDEROPTIMIZER_H #define PATHORDEROPTIMIZER_H -#include -#include - #include "InsetOrderOptimizer.h" // for makeOrderIncludeTransitive #include "PathOrdering.h" #include "pathPlanning/CombPath.h" //To calculate the combing distance if we want to use combing. @@ -16,12 +13,16 @@ #include "utils/linearAlg2D.h" //To find the angle of corners to hide seams. #include "utils/polygonUtils.h" #include "utils/views/dfs.h" -#include -#include + #include #include -#include #include +#include +#include +#include +#include + +#include namespace cura { @@ -99,10 +100,17 @@ class PathOrderOptimizer * it into a polygon. * \param combing_boundary Boundary to avoid when making travel moves. */ - PathOrderOptimizer(const Point start_point, const ZSeamConfig seam_config = ZSeamConfig(), const bool detect_loops = false, const Polygons* combing_boundary = nullptr, const bool reverse_direction = false, const std::unordered_multimap& order_requirements = no_order_requirements, const bool group_outer_walls = false) + PathOrderOptimizer( + const Point start_point, + const ZSeamConfig seam_config = ZSeamConfig(), + const bool detect_loops = false, + const Polygons* combing_boundary = nullptr, + const bool reverse_direction = false, + const std::unordered_multimap& order_requirements = no_order_requirements, + const bool group_outer_walls = false) : start_point(start_point) , seam_config(seam_config) - , combing_boundary((combing_boundary != nullptr && !combing_boundary->empty()) ? combing_boundary : nullptr) + , combing_boundary((combing_boundary != nullptr && ! combing_boundary->empty()) ? combing_boundary : nullptr) , detect_loops(detect_loops) , reverse_direction(reverse_direction) , order_requirements(&order_requirements) @@ -138,70 +146,70 @@ class PathOrderOptimizer */ void optimize(bool precompute_start = true) { - if(paths.empty()) + if (paths.empty()) { return; } - //Get the vertex data and store it in the paths. - for(auto& path : paths) + // Get the vertex data and store it in the paths. + for (auto& path : paths) { path.converted = path.getVertexData(); vertices_to_paths.emplace(path.vertices, &path); } - //If necessary, check polylines to see if they are actually polygons. - if(detect_loops) + // If necessary, check polylines to see if they are actually polygons. + if (detect_loops) { - for(auto& path : paths) + for (auto& path : paths) { - if(!path.is_closed) + if (! path.is_closed) { - //If we want to detect chains, first check if some of the polylines are secretly polygons. - path.is_closed = isLoopingPolyline(path); //If it is, we'll set the seam position correctly later. + // If we want to detect chains, first check if some of the polylines are secretly polygons. + path.is_closed = isLoopingPolyline(path); // If it is, we'll set the seam position correctly later. } } } - - //Add all vertices to a bucket grid so that we can find nearby endpoints quickly. + + // Add all vertices to a bucket grid so that we can find nearby endpoints quickly. const coord_t snap_radius = 10_mu; // 0.01mm grid cells. Chaining only needs to consider polylines which are next to each other. SparsePointGridInclusive line_bucket_grid(snap_radius); - for(const auto& [i, path]: paths | ranges::views::enumerate) + for (const auto& [i, path] : paths | ranges::views::enumerate) { if (path.converted->empty()) { continue; } - if(path.is_closed) + if (path.is_closed) { - for(const Point& point : *path.converted) + for (const Point& point : *path.converted) { - line_bucket_grid.insert(point, i); //Store by index so that we can also mark them down in the `picked` vector. + line_bucket_grid.insert(point, i); // Store by index so that we can also mark them down in the `picked` vector. } } - else //For polylines, only insert the endpoints. Those are the only places we can start from so the only relevant vertices to be near to. + else // For polylines, only insert the endpoints. Those are the only places we can start from so the only relevant vertices to be near to. { line_bucket_grid.insert(path.converted->front(), i); line_bucket_grid.insert(path.converted->back(), i); } } - //For some Z seam types the start position can be pre-computed. - //This is faster since we don't need to re-compute the start position at each step then. + // For some Z seam types the start position can be pre-computed. + // This is faster since we don't need to re-compute the start position at each step then. precompute_start &= seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; - if(precompute_start) + if (precompute_start) { - for(auto& path : paths) + for (auto& path : paths) { - if(!path.is_closed || path.converted->empty()) + if (! path.is_closed || path.converted->empty()) { - continue; //Can't pre-compute the seam for open polylines since they're at the endpoint nearest to the current position. + continue; // Can't pre-compute the seam for open polylines since they're at the endpoint nearest to the current position. } path.start_vertex = findStartLocation(path, seam_config.pos); } } - std::vector optimized_order; //To store our result in. At the end we'll std::swap. + std::vector optimized_order; // To store our result in. At the end we'll std::swap. if (order_requirements->empty()) { @@ -213,9 +221,9 @@ class PathOrderOptimizer } - if(reverse_direction && order_requirements->empty()) + if (reverse_direction && order_requirements->empty()) { - std::vector reversed = reverseOrderPaths(optimized_order); //Reverse-insert the optimized order, to invert the ordering. + std::vector reversed = reverseOrderPaths(optimized_order); // Reverse-insert the optimized order, to invert the ordering. std::swap(reversed, paths); } else @@ -225,6 +233,7 @@ class PathOrderOptimizer combing_grid.reset(); } + protected: /*! * If \ref detect_loops is enabled, endpoints of polylines that are closer @@ -276,18 +285,24 @@ class PathOrderOptimizer std::vector getOptimizedOrder(SparsePointGridInclusive line_bucket_grid, size_t snap_radius) { - std::vector optimized_order; //To store our result in. + std::vector optimized_order; // To store our result in. Point current_position = start_point; - std::unordered_map picked(paths.size()); //Fixed size boolean flag for whether each path is already in the optimized vector. + std::unordered_map picked(paths.size()); // Fixed size boolean flag for whether each path is already in the optimized vector. - auto isPicked = [&picked](OrderablePath* c) { return picked[c]; }; - auto notPicked = [&picked](OrderablePath* c) { return !picked[c]; }; + auto isPicked = [&picked](OrderablePath* c) + { + return picked[c]; + }; + auto notPicked = [&picked](OrderablePath* c) + { + return ! picked[c]; + }; - while(optimized_order.size() < paths.size()) + while (optimized_order.size() < paths.size()) { - //Use bucket grid to find paths within snap_radius + // Use bucket grid to find paths within snap_radius std::vector nearby_candidates; for (const auto i : line_bucket_grid.getNearbyVals(current_position, snap_radius)) { @@ -296,14 +311,14 @@ class PathOrderOptimizer std::vector available_candidates; available_candidates.reserve(nearby_candidates.size()); - for(auto candidate : nearby_candidates | ranges::views::filter(notPicked)) + for (auto candidate : nearby_candidates | ranges::views::filter(notPicked)) { available_candidates.push_back(candidate); } - if(available_candidates.empty()) // We need to broaden our search through all candidates + if (available_candidates.empty()) // We need to broaden our search through all candidates { - for(auto path : paths | ranges::views::addressof | ranges::views::filter(notPicked)) + for (auto path : paths | ranges::views::addressof | ranges::views::filter(notPicked)) { available_candidates.push_back(path); } @@ -315,15 +330,15 @@ class PathOrderOptimizer optimized_order.push_back(*best_path); picked[best_path] = true; - if(!best_path->converted->empty()) //If all paths were empty, the best path is still empty. We don't upate the current position then. + if (! best_path->converted->empty()) // If all paths were empty, the best path is still empty. We don't upate the current position then. { - if(best_path->is_closed) + if (best_path->is_closed) { - current_position = (*best_path->converted)[best_path->start_vertex]; //We end where we started. + current_position = (*best_path->converted)[best_path->start_vertex]; // We end where we started. } else { - //Pick the other end from where we started. + // Pick the other end from where we started. current_position = best_path->start_vertex == 0 ? best_path->converted->back() : best_path->converted->front(); } } @@ -332,9 +347,10 @@ class PathOrderOptimizer return optimized_order; } - std::vector getOptimizerOrderWithConstraints(SparsePointGridInclusive line_bucket_grid, size_t snap_radius, const std::unordered_multimap& order_requirements) + std::vector + getOptimizerOrderWithConstraints(SparsePointGridInclusive line_bucket_grid, size_t snap_radius, const std::unordered_multimap& order_requirements) { - std::vector optimized_order; //To store our result in. + std::vector optimized_order; // To store our result in. // initialize the roots set with all possible nodes std::unordered_set roots; @@ -358,8 +374,8 @@ class PathOrderOptimizer std::unordered_set visited; Point current_position = start_point; - std::function(const Path, const std::unordered_multimap&)> get_neighbours = - [current_position, this](const Path current_node, const std::unordered_multimap& graph) + std::function(const Path, const std::unordered_multimap&)> get_neighbours + = [current_position, this](const Path current_node, const std::unordered_multimap& graph) { std::vector order; // Output order to traverse neighbors @@ -382,13 +398,13 @@ class PathOrderOptimizer // update local_current_position auto path = vertices_to_paths[best_candidate]; - if(path->is_closed) + if (path->is_closed) { - local_current_position = (*path->converted)[path->start_vertex]; //We end where we started. + local_current_position = (*path->converted)[path->start_vertex]; // We end where we started. } else { - //Pick the other end from where we started. + // Pick the other end from where we started. local_current_position = path->start_vertex == 0 ? path->converted->back() : path->converted->front(); } } @@ -396,34 +412,33 @@ class PathOrderOptimizer return order; }; - const std::function handle_node = - [¤t_position, &optimized_order, this] - (const Path current_node, const std::nullptr_t _state) + const std::function handle_node + = [¤t_position, &optimized_order, this](const Path current_node, const std::nullptr_t _state) + { + // We should make map from node <-> path for this stuff + for (auto& path : paths) { - // We should make map from node <-> path for this stuff - for (auto& path : paths) + if (path.vertices == current_node) { - if (path.vertices == current_node) + if (path.is_closed) { - if(path.is_closed) - { - current_position = (*path.converted)[path.start_vertex]; //We end where we started. - } - else - { - //Pick the other end from where we started. - current_position = path.start_vertex == 0 ? path.converted->back() : path.converted->front(); - } - - // Add to optimized order - optimized_order.push_back(path); - - break; + current_position = (*path.converted)[path.start_vertex]; // We end where we started. } + else + { + // Pick the other end from where we started. + current_position = path.start_vertex == 0 ? path.converted->back() : path.converted->front(); + } + + // Add to optimized order + optimized_order.push_back(path); + + break; } + } - return nullptr; - }; + return nullptr; + }; if (group_outer_walls) { @@ -482,7 +497,7 @@ class PathOrderOptimizer } else { - while (!roots.empty()) + while (! roots.empty()) { Path root = findClosestPathVertices(current_position, roots); roots.erase(root); @@ -497,13 +512,13 @@ class PathOrderOptimizer std::vector reverseOrderPaths(std::vector pathsOrderPaths) { std::vector reversed; - //Don't replace with swap, assign or insert. They require functions that we can't implement for all template arguments for Path. + // Don't replace with swap, assign or insert. They require functions that we can't implement for all template arguments for Path. reversed.reserve(pathsOrderPaths.size()); - for(auto& path: pathsOrderPaths | ranges::views::reverse) + for (auto& path : pathsOrderPaths | ranges::views::reverse) { reversed.push_back(path); - reversed.back().backwards = !reversed.back().backwards; - if(!reversed.back().is_closed) + reversed.back().backwards = ! reversed.back().backwards; + if (! reversed.back().is_closed) { reversed.back().start_vertex = reversed.back().converted->size() - 1 - reversed.back().start_vertex; } @@ -530,33 +545,35 @@ class PathOrderOptimizer coord_t best_distance2 = std::numeric_limits::max(); OrderablePath* best_candidate = 0; - for(OrderablePath* path : candidate_paths) + for (OrderablePath* path : candidate_paths) { - if(path->converted->empty()) //No vertices in the path. Can't find the start position then or really plan it in. Put that at the end. + if (path->converted->empty()) // No vertices in the path. Can't find the start position then or really plan it in. Put that at the end. { - if(best_distance2 == std::numeric_limits::max()) + if (best_distance2 == std::numeric_limits::max()) { best_candidate = path; } continue; } - const bool precompute_start = seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; - if(!path->is_closed || !precompute_start) //Find the start location unless we've already precomputed it. + const bool precompute_start + = seam_config.type == EZSeamType::RANDOM || seam_config.type == EZSeamType::USER_SPECIFIED || seam_config.type == EZSeamType::SHARPEST_CORNER; + if (! path->is_closed || ! precompute_start) // Find the start location unless we've already precomputed it. { path->start_vertex = findStartLocation(*path, start_position); - if(!path->is_closed) //Open polylines start at vertex 0 or vertex N-1. Indicate that they should be reversed if they start at N-1. + if (! path->is_closed) // Open polylines start at vertex 0 or vertex N-1. Indicate that they should be reversed if they start at N-1. { path->backwards = path->start_vertex > 0; } } const Point candidate_position = (*path->converted)[path->start_vertex]; coord_t distance2 = getDirectDistance(start_position, candidate_position); - if(distance2 < best_distance2 && combing_boundary) //If direct distance is longer than best combing distance, the combing distance can never be better, so only compute combing if necessary. + if (distance2 < best_distance2 + && combing_boundary) // If direct distance is longer than best combing distance, the combing distance can never be better, so only compute combing if necessary. { distance2 = getCombingDistance(start_position, candidate_position); } - if(distance2 < best_distance2) //Closer than the best candidate so far. + if (distance2 < best_distance2) // Closer than the best candidate so far. { best_candidate = path; best_distance2 = distance2; @@ -589,30 +606,31 @@ class PathOrderOptimizer * applicable. * \param is_closed Whether the polygon is closed (a polygon) or not * (a polyline). If the path is not closed, it will choose between the two - * endpoints rather than + * endpoints rather than * \return An index to a vertex in that path where printing must start. */ size_t findStartLocation(const OrderablePath& path, const Point& target_pos) { - if(!path.is_closed) + if (! path.is_closed) { - //For polylines, the seam settings are not applicable. Simply choose the position closest to target_pos then. - const coord_t back_distance = (combing_boundary == nullptr) - ? getDirectDistance(path.converted->back(), target_pos) - : getCombingDistance(path.converted->back(), target_pos); - if(back_distance < getDirectDistance(path.converted->front(), target_pos) || (combing_boundary && back_distance < getCombingDistance(path.converted->front(), target_pos))) //Lazy or: Only compute combing distance if direct distance is closer. + // For polylines, the seam settings are not applicable. Simply choose the position closest to target_pos then. + const coord_t back_distance + = (combing_boundary == nullptr) ? getDirectDistance(path.converted->back(), target_pos) : getCombingDistance(path.converted->back(), target_pos); + if (back_distance < getDirectDistance(path.converted->front(), target_pos) + || (combing_boundary + && back_distance < getCombingDistance(path.converted->front(), target_pos))) // Lazy or: Only compute combing distance if direct distance is closer. { - return path.converted->size() - 1; //Back end is closer. + return path.converted->size() - 1; // Back end is closer. } else { - return 0; //Front end is closer. + return 0; // Front end is closer. } } - //Rest of the function only deals with (closed) polygons. We need to be able to find the seam location of those polygons. + // Rest of the function only deals with (closed) polygons. We need to be able to find the seam location of those polygons. - if(seam_config.type == EZSeamType::RANDOM) + if (seam_config.type == EZSeamType::RANDOM) { size_t vert = getRandomPointInPolygon(*path.converted); return vert; @@ -620,14 +638,14 @@ class PathOrderOptimizer size_t best_i; float best_score = std::numeric_limits::infinity(); - for(const auto& [i, here]: **path.converted | ranges::views::enumerate) + for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - //For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. - //For SHARPEST_CORNER, use a fixed starting score of 0. - const coord_t distance = (combing_boundary == nullptr) - ? getDirectDistance(here, target_pos) - : getCombingDistance(here, target_pos); - const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) ? MM2INT(10) : vSize2(here - target_pos); + // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. + // For SHARPEST_CORNER, use a fixed starting score of 0. + const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); + const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) + ? MM2INT(10) + : vSize2(here - target_pos); float corner_angle = cornerAngle(path, i); // angles < 0 are concave (left turning) @@ -650,30 +668,30 @@ class PathOrderOptimizer } float score = score_distance; - switch(seam_config.corner_pref) + switch (seam_config.corner_pref) { default: case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER: - if(corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. + if (corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. { score += corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER: - if(corner_angle > 0) // Indeed a convex corner? + if (corner_angle > 0) // Indeed a convex corner? { score -= corner_angle * corner_shift; } break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY: - score -= std::abs(corner_angle) * corner_shift; //Still give sharper corners more advantage. + score -= std::abs(corner_angle) * corner_shift; // Still give sharper corners more advantage. break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE: break; - case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_WEIGHTED: //Give sharper corners some advantage, but sharper concave corners even more. + case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_WEIGHTED: // Give sharper corners some advantage, but sharper concave corners even more. { float score_corner = std::abs(corner_angle) * corner_shift; - if(corner_angle < 0) //Concave corner. + if (corner_angle < 0) // Concave corner. { score_corner *= 2; } @@ -683,7 +701,7 @@ class PathOrderOptimizer } constexpr float EPSILON = 25.0; - if(std::abs(best_score - score) <= EPSILON) + if (std::abs(best_score - score) <= EPSILON) { // add breaker for two candidate starting location with similar score // if we don't do this then we (can) get an un-even seam @@ -691,13 +709,13 @@ class PathOrderOptimizer // if x-coord for both points are equal then break ties by // favouring points with lower y-coord const Point& best_point = (*path.converted)[best_i]; - if(std::abs(here.Y - best_point.Y) <= EPSILON ? best_point.X < here.X : best_point.Y < here.Y) + if (std::abs(here.Y - best_point.Y) <= EPSILON ? best_point.X < here.X : best_point.Y < here.Y) { best_score = std::min(best_score, score); best_i = i; } } - else if(score < best_score) + else if (score < best_score) { best_i = i; best_score = score; @@ -720,7 +738,7 @@ class PathOrderOptimizer Point prev_pos = here_pos; Point next_pos; - while(actual_distance < distance) + while (actual_distance < distance) { actual_delta += direction; next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; @@ -728,9 +746,9 @@ class PathOrderOptimizer prev_pos = next_pos; } - if(actual_distance > distance) // Which is veeeery likely + if (actual_distance > distance) // Which is veeeery likely { - prev_pos = (*path.converted)[(here + actual_delta -direction + path.converted->size()) % path.converted->size()]; + prev_pos = (*path.converted)[(here + actual_delta - direction + path.converted->size()) % path.converted->size()]; Point vector = next_pos - prev_pos; coord_t vector_size = vSize(vector); @@ -745,18 +763,18 @@ class PathOrderOptimizer } /*! - * Some models have very sharp corners, but also have a high resolution. If a sharp corner - * consists of many points each point individual might have a shallow corner, but the - * collective angle of all nearby points is greater. To counter this the cornerAngle is - * calculated from all points within angle_query_distance of the query point. Angles closer - * to the current point are weighted more towards the total angle then points further away. - * The formula for the angle weight is: 1 - (distance_to_query / angle_query_distance)^fall_off_strength - * \param path The vertex data of a path - * \param i index of the query point - * \param angle_query_distance query range (default to 0.1mm) - * \param fall_off_strength fall of strength of the angle weight - * \return sum of angles of all points p in range i - angle_query_distance < p < i + angle_query_distance - */ + * Some models have very sharp corners, but also have a high resolution. If a sharp corner + * consists of many points each point individual might have a shallow corner, but the + * collective angle of all nearby points is greater. To counter this the cornerAngle is + * calculated from all points within angle_query_distance of the query point. Angles closer + * to the current point are weighted more towards the total angle then points further away. + * The formula for the angle weight is: 1 - (distance_to_query / angle_query_distance)^fall_off_strength + * \param path The vertex data of a path + * \param i index of the query point + * \param angle_query_distance query range (default to 0.1mm) + * \param fall_off_strength fall of strength of the angle weight + * \return sum of angles of all points p in range i - angle_query_distance < p < i + angle_query_distance + */ float cornerAngle(const OrderablePath& path, int i, const coord_t angle_query_distance = 100, const float fall_off_strength = 0.5) { static constexpr coord_t distance_step = 2000; @@ -767,7 +785,7 @@ class PathOrderOptimizer float angle = 0.0; int computed_angles = 0; - for(coord_t distance = distance_step ; distance <= max_distance ; distance += distance_step) + for (coord_t distance = distance_step; distance <= max_distance; distance += distance_step) { Point next = findNeighbourPoint(path, i, distance); Point previous = findNeighbourPoint(path, i, -distance); @@ -806,11 +824,11 @@ class PathOrderOptimizer */ coord_t getCombingDistance(const Point& a, const Point& b) { - if(!PolygonUtils::polygonCollidesWithLineSegment(*combing_boundary, a, b)) + if (! PolygonUtils::polygonCollidesWithLineSegment(*combing_boundary, a, b)) { - return getDirectDistance(a, b); //No collision with any line. Just compute the direct distance then. + return getDirectDistance(a, b); // No collision with any line. Just compute the direct distance then. } - if(paths.size() > 100) + if (paths.size() > 100) { /* If we have many paths to optimize the order for, this combing calculation can become very expensive. Instead, penalize travels @@ -818,13 +836,13 @@ class PathOrderOptimizer return getDirectDistance(a, b) * 5; } - if(combing_grid == nullptr) + if (combing_grid == nullptr) { - constexpr coord_t grid_size = 2000; //2mm grid cells. Smaller will use more memory, but reduce chance of unnecessary collision checks. + constexpr coord_t grid_size = 2000; // 2mm grid cells. Smaller will use more memory, but reduce chance of unnecessary collision checks. combing_grid = PolygonUtils::createLocToLineGrid(*combing_boundary, grid_size); } - CombPath comb_path; //Output variable. + CombPath comb_path; // Output variable. constexpr coord_t rounding_error = -25; constexpr coord_t tiny_travel_threshold = 0; constexpr bool fail_on_unavoidable_obstacles = false; @@ -832,12 +850,12 @@ class PathOrderOptimizer coord_t sum = 0; Point last_point = a; - for(const Point& point : comb_path) + for (const Point& point : comb_path) { sum += vSize(point - last_point); last_point = point; } - return sum * sum; //Squared distance, for fair comparison with direct distance. + return sum * sum; // Squared distance, for fair comparison with direct distance. } /*! @@ -852,7 +870,7 @@ class PathOrderOptimizer bool isLoopingPolyline(const OrderablePath& path) { - if(path.converted->empty()) + if (path.converted->empty()) { return false; } @@ -863,6 +881,6 @@ class PathOrderOptimizer template const std::unordered_multimap PathOrderOptimizer::no_order_requirements; -} //namespace cura +} // namespace cura -#endif //PATHORDEROPTIMIZER_H +#endif // PATHORDEROPTIMIZER_H From 9311a7fa06f505d51da42d1af33e0d86f632a806 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 6 Oct 2023 13:07:14 +0200 Subject: [PATCH 378/470] Clean and optimized new corner angle computation algorithm CURA-11100 --- include/PathOrderOptimizer.h | 136 ++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 58 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 939baf6b21..108b49b61a 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -636,18 +636,35 @@ class PathOrderOptimizer return vert; } + //Precompute segments lengths because we are going to need them multiple times + std::vector segments_sizes(path.converted->size()); + coord_t total_length = 0; + for(const auto& [i, here]: **path.converted | ranges::views::enumerate) + { + const Point &next = (*path.converted)[(i + 1) % path.converted->size()]; + coord_t segment_size = vSize(next - here); + segments_sizes[i] = segment_size; + total_length += segment_size; + } + size_t best_i; float best_score = std::numeric_limits::infinity(); for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. - // For SHARPEST_CORNER, use a fixed starting score of 0. - const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); - const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) - ? MM2INT(10) - : vSize2(here - target_pos); + if(i == path.converted->size() - 1) + { + //The path is closed so the last point is the same as the first, don't process it twice + continue; + } - float corner_angle = cornerAngle(path, i); + //For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. + //For SHARPEST_CORNER, use a fixed starting score of 0. + const coord_t distance = (combing_boundary == nullptr) + ? getDirectDistance(here, target_pos) + : getCombingDistance(here, target_pos); + const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) ? MM2INT(10) : vSize2(here - target_pos); + + float corner_angle = cornerAngle(path, i, segments_sizes, total_length); // angles < 0 are concave (left turning) // angles > 0 are convex (right turning) @@ -725,79 +742,82 @@ class PathOrderOptimizer return best_i; } - Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance) + /*! + * Finds a neighbour point on the path, located before or after the given reference point. The neighbour point + * is computed by travelling on the path and stopping when the distance has been reached, For example: + * |------|---------|------|--------------*---| + * H A B C N D + * In this case, H is the start point of the path and ABCD are the actual following points of the path. + * The neighbour point N is found by reaching point D then going a bit backward on the previous segment. + * This approach gets rid of the mesh actual resolution and gives a neighbour point that is on the path + * at a given physical distance. + * \param path The vertex data of a path + * \param here The starting point index + * \param distance The distance we want to travel on the path, which may be positive to go forward + * or negative to go backward + * \param segments_sizes The pre-computed sizes of the segments + * \return The position of the path a the given distance from the reference point + */ + static Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance, const std::vector &segments_sizes) { - assert(distance); - - const Point here_pos = (*path.converted)[here]; - int direction = distance > 0 ? 1 : -1; + const int direction = distance > 0 ? 1 : -1; + const int size_delta = distance > 0 ? -1 : 0; distance = std::abs(distance); - coord_t actual_distance = 0; + // Travel on the path until we reach the distance int actual_delta = 0; - - Point prev_pos = here_pos; - Point next_pos; - while (actual_distance < distance) + coord_t travelled_distance = 0; + coord_t segment_size = 0; + while(travelled_distance < distance) { actual_delta += direction; - next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; - actual_distance += vSize(next_pos - prev_pos); - prev_pos = next_pos; + segment_size = segments_sizes[(here + actual_delta + size_delta + path.converted->size()) % path.converted->size()]; + travelled_distance += segment_size; } - if (actual_distance > distance) // Which is veeeery likely + const Point &next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; + + if(travelled_distance > distance) [[likely]] { - prev_pos = (*path.converted)[(here + actual_delta - direction + path.converted->size()) % path.converted->size()]; + // We have overtaken the required distance, go backward on the last segment + int prev = (here + actual_delta -direction + path.converted->size()) % path.converted->size(); + const Point &prev_pos = (*path.converted)[prev]; - Point vector = next_pos - prev_pos; - coord_t vector_size = vSize(vector); - Point unit_vector = (vector * 1000) / vector_size; - Point vector_delta = unit_vector * (vector_size - (actual_distance - distance)); + const Point vector = next_pos - prev_pos; + const Point unit_vector = (vector * 1000) / segment_size; + const Point vector_delta = unit_vector * (segment_size - (travelled_distance - distance)); return prev_pos + vector_delta / 1000; } else { + // Luckily, the required distance stops exactly on an existing point return next_pos; } } /*! - * Some models have very sharp corners, but also have a high resolution. If a sharp corner - * consists of many points each point individual might have a shallow corner, but the - * collective angle of all nearby points is greater. To counter this the cornerAngle is - * calculated from all points within angle_query_distance of the query point. Angles closer - * to the current point are weighted more towards the total angle then points further away. - * The formula for the angle weight is: 1 - (distance_to_query / angle_query_distance)^fall_off_strength - * \param path The vertex data of a path - * \param i index of the query point - * \param angle_query_distance query range (default to 0.1mm) - * \param fall_off_strength fall of strength of the angle weight - * \return sum of angles of all points p in range i - angle_query_distance < p < i + angle_query_distance - */ - float cornerAngle(const OrderablePath& path, int i, const coord_t angle_query_distance = 100, const float fall_off_strength = 0.5) + * Some models have very sharp corners, but also have a high resolution. If a sharp corner + * consists of many points each point individual might have a shallow corner, but the + * collective angle of all nearby points is greater. To counter this the cornerAngle is + * calculated from two points within angle_query_distance of the query point, no matter + * what segment this leads us to + * \param path The vertex data of a path + * \param i index of the query point + * \param segments_sizes The pre-computed sizes of the segments + * \param total_length The path total length + * \param angle_query_distance query range (default to 1mm) + * \return angle between the reference point and the two sibling points, weighed to [-1.0 ; 1.0] + */ + static float cornerAngle(const OrderablePath& path, int i, const std::vector &segments_sizes, coord_t total_length, const coord_t angle_query_distance = 1000) { - static constexpr coord_t distance_step = 2000; - static constexpr coord_t max_distance = 5000; - - const Point here = (*path.converted)[i]; - - float angle = 0.0; - int computed_angles = 0; - - for (coord_t distance = distance_step; distance <= max_distance; distance += distance_step) - { - Point next = findNeighbourPoint(path, i, distance); - Point previous = findNeighbourPoint(path, i, -distance); - - angle += LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; - computed_angles++; - } + const coord_t bounded_distance = std::min(angle_query_distance, total_length / 2); + const Point &here = (*path.converted)[i]; + const Point next = findNeighbourPoint(path, i, bounded_distance, segments_sizes); + const Point previous = findNeighbourPoint(path, i, -bounded_distance, segments_sizes); - angle /= computed_angles; - angle /= M_PI; + float angle = LinearAlg2D::getAngleLeft(previous, here, next) - M_PI; - return angle; + return angle / M_PI; } /*! From 55c43275b86220ab88fe3aeb3e61b4d56e26d8cc Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Fri, 6 Oct 2023 11:12:44 +0000 Subject: [PATCH 379/470] Applied clang-format. --- include/PathOrderOptimizer.h | 62 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 108b49b61a..d8d6d9ca17 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -636,12 +636,12 @@ class PathOrderOptimizer return vert; } - //Precompute segments lengths because we are going to need them multiple times + // Precompute segments lengths because we are going to need them multiple times std::vector segments_sizes(path.converted->size()); coord_t total_length = 0; - for(const auto& [i, here]: **path.converted | ranges::views::enumerate) + for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - const Point &next = (*path.converted)[(i + 1) % path.converted->size()]; + const Point& next = (*path.converted)[(i + 1) % path.converted->size()]; coord_t segment_size = vSize(next - here); segments_sizes[i] = segment_size; total_length += segment_size; @@ -651,18 +651,18 @@ class PathOrderOptimizer float best_score = std::numeric_limits::infinity(); for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { - if(i == path.converted->size() - 1) + if (i == path.converted->size() - 1) { - //The path is closed so the last point is the same as the first, don't process it twice + // The path is closed so the last point is the same as the first, don't process it twice continue; } - //For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. - //For SHARPEST_CORNER, use a fixed starting score of 0. - const coord_t distance = (combing_boundary == nullptr) - ? getDirectDistance(here, target_pos) - : getCombingDistance(here, target_pos); - const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) ? MM2INT(10) : vSize2(here - target_pos); + // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. + // For SHARPEST_CORNER, use a fixed starting score of 0. + const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); + const float score_distance = (seam_config.type == EZSeamType::SHARPEST_CORNER && seam_config.corner_pref != EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE) + ? MM2INT(10) + : vSize2(here - target_pos); float corner_angle = cornerAngle(path, i, segments_sizes, total_length); // angles < 0 are concave (left turning) @@ -758,7 +758,7 @@ class PathOrderOptimizer * \param segments_sizes The pre-computed sizes of the segments * \return The position of the path a the given distance from the reference point */ - static Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance, const std::vector &segments_sizes) + static Point findNeighbourPoint(const OrderablePath& path, int here, coord_t distance, const std::vector& segments_sizes) { const int direction = distance > 0 ? 1 : -1; const int size_delta = distance > 0 ? -1 : 0; @@ -768,20 +768,20 @@ class PathOrderOptimizer int actual_delta = 0; coord_t travelled_distance = 0; coord_t segment_size = 0; - while(travelled_distance < distance) + while (travelled_distance < distance) { actual_delta += direction; segment_size = segments_sizes[(here + actual_delta + size_delta + path.converted->size()) % path.converted->size()]; travelled_distance += segment_size; } - const Point &next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; + const Point& next_pos = (*path.converted)[(here + actual_delta + path.converted->size()) % path.converted->size()]; - if(travelled_distance > distance) [[likely]] + if (travelled_distance > distance) [[likely]] { // We have overtaken the required distance, go backward on the last segment - int prev = (here + actual_delta -direction + path.converted->size()) % path.converted->size(); - const Point &prev_pos = (*path.converted)[prev]; + int prev = (here + actual_delta - direction + path.converted->size()) % path.converted->size(); + const Point& prev_pos = (*path.converted)[prev]; const Point vector = next_pos - prev_pos; const Point unit_vector = (vector * 1000) / segment_size; @@ -796,22 +796,22 @@ class PathOrderOptimizer } /*! - * Some models have very sharp corners, but also have a high resolution. If a sharp corner - * consists of many points each point individual might have a shallow corner, but the - * collective angle of all nearby points is greater. To counter this the cornerAngle is - * calculated from two points within angle_query_distance of the query point, no matter - * what segment this leads us to - * \param path The vertex data of a path - * \param i index of the query point - * \param segments_sizes The pre-computed sizes of the segments - * \param total_length The path total length - * \param angle_query_distance query range (default to 1mm) - * \return angle between the reference point and the two sibling points, weighed to [-1.0 ; 1.0] - */ - static float cornerAngle(const OrderablePath& path, int i, const std::vector &segments_sizes, coord_t total_length, const coord_t angle_query_distance = 1000) + * Some models have very sharp corners, but also have a high resolution. If a sharp corner + * consists of many points each point individual might have a shallow corner, but the + * collective angle of all nearby points is greater. To counter this the cornerAngle is + * calculated from two points within angle_query_distance of the query point, no matter + * what segment this leads us to + * \param path The vertex data of a path + * \param i index of the query point + * \param segments_sizes The pre-computed sizes of the segments + * \param total_length The path total length + * \param angle_query_distance query range (default to 1mm) + * \return angle between the reference point and the two sibling points, weighed to [-1.0 ; 1.0] + */ + static float cornerAngle(const OrderablePath& path, int i, const std::vector& segments_sizes, coord_t total_length, const coord_t angle_query_distance = 1000) { const coord_t bounded_distance = std::min(angle_query_distance, total_length / 2); - const Point &here = (*path.converted)[i]; + const Point& here = (*path.converted)[i]; const Point next = findNeighbourPoint(path, i, bounded_distance, segments_sizes); const Point previous = findNeighbourPoint(path, i, -bounded_distance, segments_sizes); From 57a0daec11b3b5e76af7df4c500c35e39b672b3b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 10:38:33 +0200 Subject: [PATCH 380/470] Removed debug output --- src/SkeletalTrapezoidationGraph.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/SkeletalTrapezoidationGraph.cpp b/src/SkeletalTrapezoidationGraph.cpp index ed8cc1035d..4657b8ee97 100644 --- a/src/SkeletalTrapezoidationGraph.cpp +++ b/src/SkeletalTrapezoidationGraph.cpp @@ -3,17 +3,18 @@ #include "SkeletalTrapezoidationGraph.h" -#include +#include "utils/linearAlg2D.h" +#include "utils/macros.h" #include -#include "utils/linearAlg2D.h" -#include "utils/macros.h" +#include namespace cura { -STHalfEdge::STHalfEdge(SkeletalTrapezoidationEdge data) : HalfEdge(data) +STHalfEdge::STHalfEdge(SkeletalTrapezoidationEdge data) + : HalfEdge(data) { } @@ -131,7 +132,8 @@ STHalfEdge* STHalfEdge::getNextUnconnected() return result->twin; } -STHalfEdgeNode::STHalfEdgeNode(SkeletalTrapezoidationJoint data, Point p) : HalfEdgeNode(data, p) +STHalfEdgeNode::STHalfEdgeNode(SkeletalTrapezoidationJoint data, Point p) + : HalfEdgeNode(data, p) { } @@ -223,7 +225,10 @@ void SkeletalTrapezoidationGraph::collapseSmallEdges(coord_t snap_dist) } }; - auto should_collapse = [snap_dist](node_t* a, node_t* b) { return shorterThen(a->p - b->p, snap_dist); }; + auto should_collapse = [snap_dist](node_t* a, node_t* b) + { + return shorterThen(a->p - b->p, snap_dist); + }; for (auto edge_it = edges.begin(); edge_it != edges.end();) { @@ -253,10 +258,6 @@ void SkeletalTrapezoidationGraph::collapseSmallEdges(coord_t snap_dist) { edge_from_3->from = quad_mid->from; edge_from_3->twin->to = quad_mid->from; - if (count > 50) - { - std::cerr << edge_from_3->from->p << " - " << edge_from_3->to->p << '\n'; - } if (++count > 1000) { break; From 26ea92b20a383b9f4dcfba7f432a66923d11dd9c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 10:52:13 +0200 Subject: [PATCH 381/470] Fixed some edge-cases with new angle calculation CURA-11100 --- include/PathOrderOptimizer.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index d8d6d9ca17..ab58d30651 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -689,16 +689,12 @@ class PathOrderOptimizer { default: case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_INNER: - if (corner_angle < 0) // Indeed a concave corner? Give it some advantage over other corners. More advantage for sharper corners. - { - score += corner_angle * corner_shift; - } + // Give advantage to concave corners. More advantage for sharper corners. + score += corner_angle * corner_shift; break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_OUTER: - if (corner_angle > 0) // Indeed a convex corner? - { - score -= corner_angle * corner_shift; - } + // Give advantage to convex corners. More advantage for sharper corners. + score -= corner_angle * corner_shift; break; case EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_ANY: score -= std::abs(corner_angle) * corner_shift; // Still give sharper corners more advantage. @@ -717,7 +713,7 @@ class PathOrderOptimizer } } - constexpr float EPSILON = 25.0; + constexpr float EPSILON = 5.0; if (std::abs(best_score - score) <= EPSILON) { // add breaker for two candidate starting location with similar score From 31399b138dfd827ee31ac38b23e9e7c8d2afe4cc Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 5 Oct 2023 11:48:49 +0200 Subject: [PATCH 382/470] Remove unused variable boyscouting CURA-11110 --- src/skin.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/skin.cpp b/src/skin.cpp index 227591a8c4..28fc60c238 100644 --- a/src/skin.cpp +++ b/src/skin.cpp @@ -346,8 +346,6 @@ void SkinInfillAreaComputation::generateRoofingFillAndSkinFill(SliceLayerPart& p */ Polygons SkinInfillAreaComputation::generateFilledAreaAbove(SliceLayerPart& part, size_t roofing_layer_count) { - const size_t wall_idx = std::min(size_t(2), mesh.settings.get("wall_line_count")); - Polygons filled_area_above = getOutlineOnLayer(part, layer_nr + roofing_layer_count); if (! no_small_gaps_heuristic) { From e44da002c65a2ed90a1d961c836a4a48158d28fd Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 5 Oct 2023 12:45:17 +0200 Subject: [PATCH 383/470] Use different config for roofing inner/outer walls Implementation is not fully desired since it has some downsides 1. When a layer-part is partially a roof the whole outer/inner wall uses the inner/outer wall roofing print-configuration 2. Some logic is duplicated, namely the function that calculates the `filled_area_above`. This function previously lived in `SkinInfillAreaComputation`. It's not logical to create a `SkinInfillAreaComputation` instance just to re-use this utility. Proposal to fix this is to move the logic of calculating the `filled_area_above` to a more central location, this will be done in a seperate ticket. 3. The `inset0_roofing_config` and `insetX_roofing_config` contain `line_width` properties. Changing the line-widths here doesn't actually change the line width. The line widths can only be changed through the `insetX_config` and `inset0_config` configs CURA-11110 --- include/settings/MeshPathConfigs.h | 2 + src/FffGcodeWriter.cpp | 96 +++++++++++++++++++++++++++++- src/settings/MeshPathConfigs.cpp | 26 ++++++++ 3 files changed, 122 insertions(+), 2 deletions(-) diff --git a/include/settings/MeshPathConfigs.h b/include/settings/MeshPathConfigs.h index 43457fbc8c..61c993b9a8 100644 --- a/include/settings/MeshPathConfigs.h +++ b/include/settings/MeshPathConfigs.h @@ -15,6 +15,8 @@ struct MeshPathConfigs { GCodePathConfig inset0_config{}; GCodePathConfig insetX_config{}; + GCodePathConfig inset0_roofing_config{}; + GCodePathConfig insetX_roofing_config{}; GCodePathConfig bridge_inset0_config{}; GCodePathConfig bridge_insetX_config{}; GCodePathConfig skin_config{}; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index aedd5d439b..c3750c3b18 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -21,6 +21,8 @@ #include "utils/math.h" #include "utils/orderOptimizer.h" +#include +#include #include #include @@ -2392,6 +2394,96 @@ bool FffGcodeWriter::processInsets( } else { + // for layers that (partially) do not have any layers above we apply the roofing configuration + auto use_roofing_config = [&part, &mesh, &gcode_layer](){ + const auto getOutlineOnLayer = [mesh](const SliceLayerPart& part_here, const LayerIndex layer2_nr) -> Polygons + { + Polygons result; + if (layer2_nr >= static_cast(mesh.layers.size())) + { + return result; + } + const SliceLayer& layer2 = mesh.layers[layer2_nr]; + for (const SliceLayerPart& part2 : layer2.parts) + { + if (part_here.boundaryBox.hit(part2.boundaryBox)) + { + result.add(part2.outline); + } + } + return result; + }; + + const auto filled_area_above = [&getOutlineOnLayer, &part, &mesh, &gcode_layer]() -> Polygons + { + const size_t roofing_layer_count = std::min(mesh.settings.get("roofing_layer_count"), mesh.settings.get("top_layers")); + const bool no_small_gaps_heuristic = mesh.settings.get("skin_no_small_gaps_heuristic"); + const int layer_nr = gcode_layer.getLayerNr(); + auto filled_area_above = getOutlineOnLayer(part, layer_nr + roofing_layer_count); + if (! no_small_gaps_heuristic) + { + for (int layer_nr_above = layer_nr + 1; layer_nr_above < layer_nr + roofing_layer_count; layer_nr_above++) + { + Polygons outlines_above = getOutlineOnLayer(part, layer_nr_above); + filled_area_above = filled_area_above.intersection(outlines_above); + } + } + if (layer_nr > 0) + { + // if the skin has air below it then cutting it into regions could cause a region + // to be wholely or partly above air and it may not be printable so restrict + // the regions that have air above (the visible regions) to not include any area that + // has air below (fixes https://github.com/Ultimaker/Cura/issues/2656) + + // set air_below to the skin area for the current layer that has air below it + Polygons air_below = getOutlineOnLayer(part, layer_nr).difference(getOutlineOnLayer(part, layer_nr - 1)); + + if (! air_below.empty()) + { + // add the polygons that have air below to the no air above polygons + filled_area_above = filled_area_above.unionPolygons(air_below); + } + } + + return filled_area_above; + }(); + + if (filled_area_above.empty()) + { + return true; + } + + const auto point_view = ranges::views::transform([](auto extrusion_junction) { return extrusion_junction.p; }); + + for (const auto& path: part.wall_toolpaths) + { + for (const auto& wall: path) + { + for (const auto& p : wall | point_view) + { + if (!filled_area_above.inside(p)) + { + return true; + } + } + + for (const auto& window : wall | point_view | ranges::views::sliding(2)) + { + auto p0 = window[0]; + auto p1 = window[1]; + if (PolygonUtils::polygonCollidesWithLineSegment(filled_area_above, p0, p1)) + { + return true; + } + } + } + } + return false; + }(); + + const GCodePathConfig& inset0_config = use_roofing_config ? mesh_config.inset0_roofing_config : mesh_config.inset0_config; + const GCodePathConfig& insetX_config = use_roofing_config ? mesh_config.insetX_roofing_config : mesh_config.insetX_config; + // Main case: Optimize the insets with the InsetOrderOptimizer. const coord_t wall_x_wipe_dist = 0; const ZSeamConfig z_seam_config( @@ -2405,8 +2497,8 @@ bool FffGcodeWriter::processInsets( gcode_layer, mesh.settings, extruder_nr, - mesh_config.inset0_config, - mesh_config.insetX_config, + inset0_config, + insetX_config, mesh_config.bridge_inset0_config, mesh_config.bridge_insetX_config, mesh.settings.get("travel_retract_before_outer_wall"), diff --git a/src/settings/MeshPathConfigs.cpp b/src/settings/MeshPathConfigs.cpp index 942084a231..a89b444bd3 100644 --- a/src/settings/MeshPathConfigs.cpp +++ b/src/settings/MeshPathConfigs.cpp @@ -28,6 +28,32 @@ MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t lay .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x"), .acceleration = mesh.settings.get("acceleration_wall_x"), .jerk = mesh.settings.get("jerk_wall_x") } } + , inset0_roofing_config + { + .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("wall_0_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { + .speed = mesh.settings.get("speed_wall_0_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), + .jerk = mesh.settings.get("jerk_wall_0_roofing") + } + } + , insetX_roofing_config + { + .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow = mesh.settings.get("wall_x_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { + .speed = mesh.settings.get("speed_wall_x_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_x_roofing"), + .jerk = mesh.settings.get("jerk_wall_x_roofing") + } + } , bridge_inset0_config{ .type = PrintFeatureType::OuterWall, .line_width = static_cast( mesh.settings.get("wall_line_width_0") From 5a815f6ea769cbbf39d0fc21a1eeffe7c64e3e42 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 5 Oct 2023 10:47:34 +0000 Subject: [PATCH 384/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 15 +++++++---- src/settings/MeshPathConfigs.cpp | 46 ++++++++++++++------------------ 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index c3750c3b18..7d15063a22 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2395,7 +2395,8 @@ bool FffGcodeWriter::processInsets( else { // for layers that (partially) do not have any layers above we apply the roofing configuration - auto use_roofing_config = [&part, &mesh, &gcode_layer](){ + auto use_roofing_config = [&part, &mesh, &gcode_layer]() + { const auto getOutlineOnLayer = [mesh](const SliceLayerPart& part_here, const LayerIndex layer2_nr) -> Polygons { Polygons result; @@ -2453,15 +2454,19 @@ bool FffGcodeWriter::processInsets( return true; } - const auto point_view = ranges::views::transform([](auto extrusion_junction) { return extrusion_junction.p; }); + const auto point_view = ranges::views::transform( + [](auto extrusion_junction) + { + return extrusion_junction.p; + }); - for (const auto& path: part.wall_toolpaths) + for (const auto& path : part.wall_toolpaths) { - for (const auto& wall: path) + for (const auto& wall : path) { for (const auto& p : wall | point_view) { - if (!filled_area_above.inside(p)) + if (! filled_area_above.inside(p)) { return true; } diff --git a/src/settings/MeshPathConfigs.cpp b/src/settings/MeshPathConfigs.cpp index a89b444bd3..aa71d89e07 100644 --- a/src/settings/MeshPathConfigs.cpp +++ b/src/settings/MeshPathConfigs.cpp @@ -28,32 +28,26 @@ MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t lay .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x"), .acceleration = mesh.settings.get("acceleration_wall_x"), .jerk = mesh.settings.get("jerk_wall_x") } } - , inset0_roofing_config - { - .type = PrintFeatureType::OuterWall, - .line_width = static_cast( - mesh.settings.get("wall_line_width_0") * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), - .layer_thickness = layer_thickness, - .flow = mesh.settings.get("wall_0_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), - .speed_derivatives = { - .speed = mesh.settings.get("speed_wall_0_roofing"), - .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), - .jerk = mesh.settings.get("jerk_wall_0_roofing") - } - } - , insetX_roofing_config - { - .type = PrintFeatureType::OuterWall, - .line_width = static_cast( - mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), - .layer_thickness = layer_thickness, - .flow = mesh.settings.get("wall_x_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), - .speed_derivatives = { - .speed = mesh.settings.get("speed_wall_x_roofing"), - .acceleration = mesh.settings.get("acceleration_wall_x_roofing"), - .jerk = mesh.settings.get("jerk_wall_x_roofing") - } - } + , inset0_roofing_config{ .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_0") + * line_width_factor_per_extruder[mesh.settings.get("wall_0_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow + = mesh.settings.get("wall_0_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_0_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_wall_0_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), + .jerk = mesh.settings.get("jerk_wall_0_roofing") } } + , insetX_roofing_config{ .type = PrintFeatureType::OuterWall, + .line_width = static_cast( + mesh.settings.get("wall_line_width_x") + * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), + .layer_thickness = layer_thickness, + .flow + = mesh.settings.get("wall_x_material_flow_roofing") * (layer_nr == 0 ? mesh.settings.get("wall_x_material_flow_layer_0") : Ratio{ 1.0 }), + .speed_derivatives = { .speed = mesh.settings.get("speed_wall_x_roofing"), + .acceleration = mesh.settings.get("acceleration_wall_x_roofing"), + .jerk = mesh.settings.get("jerk_wall_x_roofing") } } , bridge_inset0_config{ .type = PrintFeatureType::OuterWall, .line_width = static_cast( mesh.settings.get("wall_line_width_0") From 0a91c6544fa68d942c14b9f9c8f995bf2e93f130 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Thu, 5 Oct 2023 15:17:34 +0200 Subject: [PATCH 385/470] the length of brim is correctly calculated in case of no adhesion CURA-11097 --- src/FffGcodeWriter.cpp | 1 - src/SkirtBrim.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 7d15063a22..3534122248 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3147,7 +3147,6 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer } island_order_optimizer.optimize(); - const auto support_brim_line_count = infill_extruder.settings.get("support_brim_line_count"); const auto support_connect_zigzags = infill_extruder.settings.get("support_connect_zigzags"); const auto support_structure = infill_extruder.settings.get("support_structure"); const Point infill_origin; diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 6aed96d7fe..2c1c134d3c 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -668,7 +668,7 @@ void SkirtBrim::generateSupportBrim() storage.support_brim.add(brim_line); - const coord_t length = skirt_brim_length + storage.support_brim.polygonLength(); + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE)? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From 3f811919eb9625a6b24f235203dbc06c711b2af9 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Thu, 5 Oct 2023 13:18:20 +0000 Subject: [PATCH 386/470] Applied clang-format. --- src/SkirtBrim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 2c1c134d3c..98992c67d9 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -668,7 +668,7 @@ void SkirtBrim::generateSupportBrim() storage.support_brim.add(brim_line); - const coord_t length = (adhesion_type == EPlatformAdhesion::NONE)? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length : skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From edfd1ce608135f220ce0cd199d3ec77417d84058 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 6 Oct 2023 10:54:26 +0200 Subject: [PATCH 387/470] comment for adding if statement CURA-11097 --- src/SkirtBrim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 98992c67d9..1731714763 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -667,8 +667,8 @@ void SkirtBrim::generateSupportBrim() } storage.support_brim.add(brim_line); - - const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length : skirt_brim_length + storage.support_brim.polygonLength(); + // In case of adhesion::NONE length of support brim is only the length of the brims formed for the support + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From 1be41240e9718e37a732ebde45a8b0e242025ee5 Mon Sep 17 00:00:00 2001 From: saumyaj3 Date: Fri, 6 Oct 2023 08:56:34 +0000 Subject: [PATCH 388/470] Applied clang-format. --- src/SkirtBrim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 1731714763..94761b0717 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -668,7 +668,7 @@ void SkirtBrim::generateSupportBrim() storage.support_brim.add(brim_line); // In case of adhesion::NONE length of support brim is only the length of the brims formed for the support - const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length: skirt_brim_length + storage.support_brim.polygonLength(); + const coord_t length = (adhesion_type == EPlatformAdhesion::NONE) ? skirt_brim_length : skirt_brim_length + storage.support_brim.polygonLength(); if (skirt_brim_number + 1 >= line_count && length > 0 && length < minimal_length) // Make brim or skirt have more lines when total length is too small. { line_count++; From 77028a968349074d5a1a3e14d2bb6f6931a90c3e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 15:26:34 +0200 Subject: [PATCH 389/470] Minor optimization CURA-11100 Co-authored-by: Casper Lamboo --- include/PathOrderOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index ab58d30651..ce11a18b12 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -642,7 +642,7 @@ class PathOrderOptimizer for (const auto& [i, here] : **path.converted | ranges::views::enumerate) { const Point& next = (*path.converted)[(i + 1) % path.converted->size()]; - coord_t segment_size = vSize(next - here); + const coord_t segment_size = vSize(next - here); segments_sizes[i] = segment_size; total_length += segment_size; } From 784ecfc5b21673caf498e7b3af4266e4f783831b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 9 Oct 2023 15:44:51 +0200 Subject: [PATCH 390/470] Applied code suggestion by @casperlamboo CURA-11100 --- include/PathOrderOptimizer.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index ce11a18b12..506e624927 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -649,14 +650,8 @@ class PathOrderOptimizer size_t best_i; float best_score = std::numeric_limits::infinity(); - for (const auto& [i, here] : **path.converted | ranges::views::enumerate) + for (const auto& [i, here] : **path.converted | ranges::views::drop_last(1) | ranges::views::enumerate) { - if (i == path.converted->size() - 1) - { - // The path is closed so the last point is the same as the first, don't process it twice - continue; - } - // For most seam types, the shortest distance matters. Not for SHARPEST_CORNER though. // For SHARPEST_CORNER, use a fixed starting score of 0. const coord_t distance = (combing_boundary == nullptr) ? getDirectDistance(here, target_pos) : getCombingDistance(here, target_pos); From 948f860bd13e31473190bc34fc1880e2a1d8232e Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Mon, 9 Oct 2023 13:45:37 +0000 Subject: [PATCH 391/470] Applied clang-format. --- include/PathOrderOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 506e624927..ae7591db45 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -17,10 +17,10 @@ #include #include #include +#include #include #include #include -#include #include #include From a96e603c50d1d14c8efcd75cb3f4ec652cb54196 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 10:40:09 +0200 Subject: [PATCH 392/470] pin gRPC defs to 0.1.0-beta.1 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index dea1860300..841ec2d936 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/0.1.0-beta.1") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From 6c20ccd6a9538411fcb220c4813ab8ade3be5207 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 10:40:52 +0200 Subject: [PATCH 393/470] set version to 5.5.0-beta.2 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 841ec2d936..2556e86c45 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-beta.1" + self.version = "5.5.0-beta.2" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From 9ab698b750974212ec9bd68c5e5b107ea37b46a7 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 10:42:59 +0200 Subject: [PATCH 394/470] set version to 5.6.0-alpha --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 2556e86c45..27c205dc58 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-beta.2" + self.version = "5.6.0-alpha" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From 81883c036b0a0e1c620ac26ce847787980388797 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Oct 2023 11:05:34 +0200 Subject: [PATCH 395/470] loosen deps version --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 27c205dc58..b498c3b84d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/0.1.0-beta.1") + self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From ab538dc676bb351446f10ccb07dffbfb6af4a5b3 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 13 Oct 2023 15:50:39 +0200 Subject: [PATCH 396/470] Small refactor. done as part of CURA-10407 --- src/support.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/support.cpp b/src/support.cpp index a4cf4a711e..2c2ddb9fa3 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -686,28 +686,26 @@ void AreaSupport::generateSupportAreas(SliceDataStorage& storage) } } - for (LayerIndex layer_idx = 0; layer_idx < storage.print_layer_count; layer_idx++) + for (Polygons& support_areas : global_support_areas_per_layer) { - Polygons& support_areas = global_support_areas_per_layer[layer_idx]; support_areas = support_areas.unionPolygons(); } // handle support interface - for (unsigned int mesh_idx = 0; mesh_idx < storage.meshes.size(); mesh_idx++) + for (auto& mesh : storage.meshes) { - SliceMeshStorage& mesh = *storage.meshes[mesh_idx]; - if (mesh.settings.get("infill_mesh") || mesh.settings.get("anti_overhang_mesh")) + if (mesh->settings.get("infill_mesh") || mesh->settings.get("anti_overhang_mesh")) { continue; } - if (mesh.settings.get("support_roof_enable")) + if (mesh->settings.get("support_roof_enable")) { - generateSupportRoof(storage, mesh, global_support_areas_per_layer); + generateSupportRoof(storage, *mesh, global_support_areas_per_layer); } - if (mesh.settings.get("support_bottom_enable")) + if (mesh->settings.get("support_bottom_enable")) { - generateSupportBottom(storage, mesh, global_support_areas_per_layer); + generateSupportBottom(storage, *mesh, global_support_areas_per_layer); } } From 8c3740ddad305c434558401e459222175c9de6b0 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 13 Oct 2023 16:02:19 +0200 Subject: [PATCH 397/470] Support-infill can has fractional layers + refactor spike-code for roofs. - Move code outside of the gcode-writer. For example, z-offset is now calulated in the settings themselves. - Other than support roofs, support infill now also is fractional layer 'aware'. this is the 'main' commit for CURA-10407 -- splitting this into different commits would've been a bit more hassle than it's worth, as several of the changes are closely related --- include/FffGcodeWriter.h | 4 +- include/SupportInfillPart.h | 3 +- include/settings/PathConfigStorage.h | 2 + include/sliceDataStorage.h | 5 +- src/FffGcodeWriter.cpp | 188 +++++++++++++-------------- src/SupportInfillPart.cpp | 3 +- src/settings/PathConfigStorage.cpp | 15 +++ src/support.cpp | 36 ++--- 8 files changed, 134 insertions(+), 122 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 96f504c1e3..e46f2b471c 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -634,10 +634,12 @@ class FffGcodeWriter : public NoCopy * layer. * * \param[in] storage Where the slice data is stored. + * \param[in] support_roof_outlines which polygons to generate roofs for -- originally split-up because of fractional (layer-height) layers + * \param[in] current_roof_config config to be used -- most importantly, support has slightly different configs for fractional (layer-height) layers * \param gcodeLayer The initial planning of the g-code of the layer. * \return Whether any support skin was added to the layer plan. */ - bool addSupportRoofsToGCode(const SliceDataStorage& storage, LayerPlan& gcodeLayer) const; + bool addSupportRoofsToGCode(const SliceDataStorage& storage, const Polygons& support_roof_outlines, const GCodePathConfig& current_roof_config, LayerPlan& gcode_layer) const; /*! * Add the support bottoms to the layer plan \p gcodeLayer of the current diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 2a1849ab55..8e00845ac5 100644 --- a/include/SupportInfillPart.h +++ b/include/SupportInfillPart.h @@ -34,8 +34,9 @@ class SupportInfillPart std::vector wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx. coord_t custom_line_distance; + bool use_fractional_config; - SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, int inset_count_to_generate = 0, coord_t custom_line_distance = 0 ); + SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0 ); const Polygons& getInfillArea() const; }; diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index e7bd54773a..4ba5bf2837 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -48,7 +48,9 @@ class PathConfigStorage std::vector prime_tower_config_per_extruder; //!< Configuration for the prime tower per extruder. std::vector support_infill_config; //!< The config used to print the normal support, rather than the support interface + std::vector support_fractional_infill_config; //!< The config used to print the normal support on fractional layer-height parts. GCodePathConfig support_roof_config; //!< The config used to print the dense roofs of support. + GCodePathConfig support_fractional_roof_config; //!< The config used to print the dense roofs of support on fractional layer-height parts. GCodePathConfig support_bottom_config; //!< The config to use to print the dense bottoms of support std::vector mesh_configs; //!< For each meash the config for all its feature types diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 4c424a2b09..80b825211a 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -212,8 +212,9 @@ class SupportLayer std::vector support_infill_parts; //!< a list of support infill parts Polygons support_bottom; //!< Piece of support below the support and above the model. This must not overlap with any of the support_infill_parts or support_roof. Polygons support_roof; //!< Piece of support above the support and below the model. This must not overlap with any of the support_infill_parts or support_bottom. - Polygons support_fractional_roof_top; //!< If the support distance is not exactly a multiple of the layer height, - // the first part of support just underneath the model needs to be printed at a fracional layer height. + // NOTE: This is _all_ of the support_roof, and as such, overlaps with support_fractional_roof! + Polygons support_fractional_roof; //!< If the support distance is not exactly a multiple of the layer height, + // the first part of support just underneath the model needs to be printed at a fracional layer height. Polygons support_mesh_drop_down; //!< Areas from support meshes which should be supported by more support Polygons support_mesh; //!< Areas from support meshes which should NOT be supported by more support Polygons anti_overhang; //!< Areas where no overhang should be detected. diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 3534122248..2d74becd90 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3064,7 +3064,8 @@ bool FffGcodeWriter::addSupportToGCode(const SliceDataStorage& storage, LayerPla } if (extruder_nr == support_roof_extruder_nr) { - support_added |= addSupportRoofsToGCode(storage, gcode_layer); + support_added |= addSupportRoofsToGCode(storage, support_layer.support_roof.difference(support_layer.support_fractional_roof), gcode_layer.configs_storage.support_roof_config, gcode_layer); + support_added |= addSupportRoofsToGCode(storage, support_layer.support_fractional_roof, gcode_layer.configs_storage.support_fractional_roof_config, gcode_layer); } if (extruder_nr == support_bottom_extruder_nr) { @@ -3160,6 +3161,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer for (const PathOrdering& path : island_order_optimizer.paths) { const SupportInfillPart& part = *path.vertices; + const auto& configs = part.use_fractional_config ? gcode_layer.configs_storage.support_fractional_infill_config : gcode_layer.configs_storage.support_infill_config; // always process the wall overlap if walls are generated const int current_support_infill_overlap = (part.inset_count_to_generate > 0) ? default_support_infill_overlap : 0; @@ -3169,7 +3171,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer if (! wall_toolpaths.empty()) { - const GCodePathConfig& config = gcode_layer.configs_storage.support_infill_config[0]; + const GCodePathConfig& config = configs[0]; constexpr bool retract_before_outer_wall = false; constexpr coord_t wipe_dist = 0; const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); @@ -3223,7 +3225,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer { support_line_distance_here /= 2; } - const Polygons& area = part.infill_area_per_combine_per_density[density_idx][combine_idx]; + const Polygons& area = Simplify(infill_extruder.settings).polygon(part.infill_area_per_combine_per_density[density_idx][combine_idx]); constexpr size_t wall_count = 0; // Walls are generated somewhere else, so their layers aren't vertically combined. const coord_t small_area_width = 0; @@ -3239,7 +3241,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer current_support_infill_overlap - (density_idx == max_density_idx ? 0 : wall_line_count * support_line_width), infill_multiplier, support_infill_angle, - gcode_layer.z, + gcode_layer.z + configs[combine_idx].z_offset, support_shift, max_resolution, max_deviation, @@ -3303,7 +3305,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer gcode_layer.addPolygonsByOptimizer( support_polygons, - gcode_layer.configs_storage.support_infill_config[combine_idx], + configs[combine_idx], z_seam_config, wall_0_wipe_dist, spiralize, @@ -3324,7 +3326,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer gcode_layer.addLinesByOptimizer( support_lines, - gcode_layer.configs_storage.support_infill_config[combine_idx], + configs[combine_idx], (support_pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines, enable_travel_optimization, wipe_dist, @@ -3340,7 +3342,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer // If not, the pattern may still generate gap filling (if it's connected infill or zigzag). We still want to print those. if (wall_line_count == 0 || ! wall_toolpaths_here.empty()) { - const GCodePathConfig& config = gcode_layer.configs_storage.support_infill_config[0]; + const GCodePathConfig& config = configs[0]; constexpr bool retract_before_outer_wall = false; constexpr coord_t wipe_dist = 0; constexpr coord_t simplify_curvature = 0; @@ -3375,7 +3377,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer } -bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, LayerPlan& gcode_layer) const +bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, const Polygons& support_roof_outlines, const GCodePathConfig& current_roof_config, LayerPlan& gcode_layer) const { const SupportLayer& support_layer = storage.support.supportLayers[std::max(LayerIndex{ 0 }, gcode_layer.getLayerNr())]; @@ -3421,103 +3423,87 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay support_roof_line_distance *= roof_extruder.settings.get("initial_layer_line_width_factor"); } - const auto layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); - const auto support_top_distance = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_top_distance"); - const coord_t leftover_support_distance = support_top_distance % layer_height; - - std::vector infill_outlines = { Simplify(roof_extruder.settings).polygon(support_layer.support_roof.difference(support_layer.support_fractional_roof_top)), - Simplify(roof_extruder.settings).polygon(support_layer.support_fractional_roof_top) }; - auto current_roof_config = gcode_layer.configs_storage.support_roof_config; // copy! - bool generated_something = false; - for (auto& infill_outline : infill_outlines) + Polygons infill_outline = support_roof_outlines; + Polygons wall; + // make sure there is a wall if this is on the first layer + if (gcode_layer.getLayerNr() == 0) { - Polygons wall; - // make sure there is a wall if this is on the first layer - if (gcode_layer.getLayerNr() == 0) - { - wall = support_layer.support_roof.offset(-support_roof_line_width / 2); - infill_outline = wall.offset(-support_roof_line_width / 2); - } - - Infill roof_computation( - pattern, - zig_zaggify_infill, - connect_polygons, - infill_outline, - current_roof_config.getLineWidth(), - support_roof_line_distance, - support_roof_overlap, - infill_multiplier, - fill_angle, - gcode_layer.z + current_roof_config.z_offset, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - Polygons roof_polygons; - std::vector roof_paths; - Polygons roof_lines; - roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); - if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) - { - current_roof_config.z_offset = -leftover_support_distance; - current_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); - - continue; // We didn't create any support roof. - } - generated_something = true; // We _did_ create at least some support roof. - gcode_layer.setIsInside(false); // going to print stuff outside print object, i.e. support - if (gcode_layer.getLayerNr() == 0) - { - gcode_layer.addPolygonsByOptimizer(wall, current_roof_config); - } - if (! roof_polygons.empty()) - { - constexpr bool force_comb_retract = false; - gcode_layer.addTravel(roof_polygons[0][0], force_comb_retract); - gcode_layer.addPolygonsByOptimizer(roof_polygons, current_roof_config); - } - if (! roof_paths.empty()) - { - const GCodePathConfig& config = current_roof_config; - constexpr bool retract_before_outer_wall = false; - constexpr coord_t wipe_dist = 0; - const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); + wall = support_layer.support_roof.offset(-support_roof_line_width / 2); + infill_outline = wall.offset(-support_roof_line_width / 2); + } + infill_outline = Simplify(roof_extruder.settings).polygon(infill_outline); - InsetOrderOptimizer wall_orderer( - *this, - storage, - gcode_layer, - roof_extruder.settings, - roof_extruder_nr, - config, - config, - config, - config, - retract_before_outer_wall, - wipe_dist, - wipe_dist, - roof_extruder_nr, - roof_extruder_nr, - z_seam_config, - roof_paths); - wall_orderer.addToLayer(); - } - gcode_layer.addLinesByOptimizer(roof_lines, current_roof_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); + Infill roof_computation( + pattern, + zig_zaggify_infill, + connect_polygons, + infill_outline, + current_roof_config.getLineWidth(), + support_roof_line_distance, + support_roof_overlap, + infill_multiplier, + fill_angle, + gcode_layer.z + current_roof_config.z_offset, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + Polygons roof_polygons; + std::vector roof_paths; + Polygons roof_lines; + roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT); + if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty())) + { + return false; // We didn't create any support roof. + } + gcode_layer.setIsInside(false); // going to print stuff outside print object, i.e. support + if (gcode_layer.getLayerNr() == 0) + { + gcode_layer.addPolygonsByOptimizer(wall, current_roof_config); + } + if (! roof_polygons.empty()) + { + constexpr bool force_comb_retract = false; + gcode_layer.addTravel(roof_polygons[0][0], force_comb_retract); + gcode_layer.addPolygonsByOptimizer(roof_polygons, current_roof_config); + } + if (! roof_paths.empty()) + { + const GCodePathConfig& config = current_roof_config; + constexpr bool retract_before_outer_wall = false; + constexpr coord_t wipe_dist = 0; + const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); - current_roof_config.z_offset = -leftover_support_distance; - current_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + roof_extruder.settings, + roof_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + roof_extruder_nr, + roof_extruder_nr, + z_seam_config, + roof_paths); + wall_orderer.addToLayer(); } - return generated_something; + gcode_layer.addLinesByOptimizer(roof_lines, current_roof_config, (pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines); + return true; } bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, LayerPlan& gcode_layer) const diff --git a/src/SupportInfillPart.cpp b/src/SupportInfillPart.cpp index 76344af468..fbc7c66096 100644 --- a/src/SupportInfillPart.cpp +++ b/src/SupportInfillPart.cpp @@ -7,12 +7,13 @@ using namespace cura; -SupportInfillPart::SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, int inset_count_to_generate, coord_t custom_line_distance) +SupportInfillPart::SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate, coord_t custom_line_distance) : outline(outline) , outline_boundary_box(outline) , support_line_width(support_line_width) , inset_count_to_generate(inset_count_to_generate) , custom_line_distance(custom_line_distance) +, use_fractional_config(use_fractional_config) { infill_area_per_combine_per_density.clear(); } diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp index f6e6d1b703..2ecf94eb70 100644 --- a/src/settings/PathConfigStorage.cpp +++ b/src/settings/PathConfigStorage.cpp @@ -150,6 +150,21 @@ PathConfigStorage::PathConfigStorage(const SliceDataStorage& storage, const Laye { handleInitialLayerSpeedup(storage, layer_nr, initial_speedup_layer_count); } + + const auto layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); + const auto support_top_distance = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("support_top_distance"); + const coord_t leftover_support_distance = support_top_distance % layer_height; + + support_fractional_infill_config = support_infill_config; // copy + for (auto& config : support_fractional_infill_config) + { + config.z_offset = -leftover_support_distance; + config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); + } + + support_fractional_roof_config = support_roof_config; // copy + support_fractional_roof_config.z_offset = -leftover_support_distance; + support_fractional_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height); } void MeshPathConfigs::smoothAllSpeeds(const SpeedDerivatives& first_layer_config, const LayerIndex layer_nr, const LayerIndex max_speed_layer) diff --git a/src/support.cpp b/src/support.cpp index 2c2ddb9fa3..46246f0f2c 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -106,7 +106,6 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( { // The first layer will be printed with a grid pattern wall_line_count_this_layer++; } - assert(storage.support.supportLayers[layer_nr].support_infill_parts.empty() && "support infill part list is supposed to be uninitialized"); const Polygons& global_support_areas = global_support_areas_per_layer[layer_nr]; if (global_support_areas.size() == 0 || layer_nr < min_layer || layer_nr > max_layer) @@ -116,19 +115,26 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( continue; } - std::vector support_islands = global_support_areas.splitIntoParts(); - for (const PolygonsPart& island_outline : support_islands) + const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; + const auto all_support_areas_in_layer = { global_support_areas.intersection(global_support_areas_above), global_support_areas.difference(global_support_areas_above) }; + bool use_fractional_config = false; + for (auto& support_areas : all_support_areas_in_layer) { - coord_t support_line_width_here = support_line_width; - if (layer_nr == 0 && mesh_group_settings.get("adhesion_type") != EPlatformAdhesion::RAFT) + std::vector support_islands = support_areas.splitIntoParts(); + for (const PolygonsPart& island_outline : support_islands) { - support_line_width_here *= infill_extruder.settings.get("initial_layer_line_width_factor"); - } - // We don't generate insets and infill area for the parts yet because later the skirt/brim and prime - // tower will remove themselves from the support, so the outlines of the parts can be changed. - SupportInfillPart support_infill_part(island_outline, support_line_width_here, wall_line_count_this_layer); + coord_t support_line_width_here = support_line_width; + if (layer_nr == 0 && mesh_group_settings.get("adhesion_type") != EPlatformAdhesion::RAFT) + { + support_line_width_here *= infill_extruder.settings.get("initial_layer_line_width_factor"); + } + // We don't generate insets and infill area for the parts yet because later the skirt/brim and prime + // tower will remove themselves from the support, so the outlines of the parts can be changed. + SupportInfillPart support_infill_part(island_outline, support_line_width_here, use_fractional_config, wall_line_count_this_layer); - storage.support.supportLayers[layer_nr].support_infill_parts.push_back(support_infill_part); + storage.support.supportLayers[layer_nr].support_infill_parts.push_back(support_infill_part); + } + use_fractional_config = true; } } } @@ -1816,16 +1822,14 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh Polygons roofs; generateSupportInterfaceLayer(global_support_areas_per_layer[layer_idx], mesh_outlines, roof_line_width, roof_outline_offset, minimum_roof_area, roofs); support_layers[layer_idx].support_roof.add(roofs); - support_layers[layer_idx].support_fractional_roof_top = roofs.difference(support_layers[layer_idx + 1].support_roof); + support_layers[layer_idx].support_fractional_roof.add(roofs.difference(support_layers[layer_idx + 1].support_roof)); scripta::log("support_interface_roofs", roofs, SectionType::SUPPORT, layer_idx); } // Remove support in between the support roof and the model. Subtracts the roof polygons from the support polygons on the layers above it. for (auto [layer_idx, support_layer] : support_layers | ranges::views::enumerate | ranges::views::drop(1) | ranges::views::drop_last(z_distance_top)) { - Polygons roof = support_layer.support_roof; - - if (roof.empty()) + if (support_layer.support_roof.empty()) { continue; } @@ -1834,7 +1838,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh int upper = std::min(static_cast(layer_idx + roof_layer_count + z_distance_top + 5), static_cast(global_support_areas_per_layer.size()) - 1); for (Polygons& global_support : global_support_areas_per_layer | ranges::views::slice(lower, upper)) { - global_support = global_support.difference(roof); + global_support = global_support.difference(support_layer.support_roof); } } } From 830c56a1179f6690c8694fa67fcb33e4f8cc18fa Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 13 Oct 2023 16:17:09 +0200 Subject: [PATCH 398/470] Fractional(-support)-layers: Prevent nozzle from impacting build-plate. part of CURA-10407 --- src/support.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/support.cpp b/src/support.cpp index 46246f0f2c..23fa7e66c6 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -115,7 +115,7 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( continue; } - const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; + const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; const auto all_support_areas_in_layer = { global_support_areas.intersection(global_support_areas_above), global_support_areas.difference(global_support_areas_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) @@ -1822,7 +1822,10 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh Polygons roofs; generateSupportInterfaceLayer(global_support_areas_per_layer[layer_idx], mesh_outlines, roof_line_width, roof_outline_offset, minimum_roof_area, roofs); support_layers[layer_idx].support_roof.add(roofs); - support_layers[layer_idx].support_fractional_roof.add(roofs.difference(support_layers[layer_idx + 1].support_roof)); + if (layer_idx > 0) + { + support_layers[layer_idx].support_fractional_roof.add(roofs.difference(support_layers[layer_idx + 1].support_roof)); + } scripta::log("support_interface_roofs", roofs, SectionType::SUPPORT, layer_idx); } From 06a0157abfc38a0850537820f74e3724f7ad6c1d Mon Sep 17 00:00:00 2001 From: rburema Date: Fri, 13 Oct 2023 14:18:03 +0000 Subject: [PATCH 399/470] Applied clang-format. --- include/SupportInfillPart.h | 18 +++++++++--------- src/FffGcodeWriter.cpp | 12 ++++++++++-- src/SupportInfillPart.cpp | 13 +++++++------ src/support.cpp | 3 ++- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 8e00845ac5..45ff44e4e2 100644 --- a/include/SupportInfillPart.h +++ b/include/SupportInfillPart.h @@ -4,12 +4,12 @@ #ifndef SUPPORT_INFILL_PART_H #define SUPPORT_INFILL_PART_H -#include - #include "utils/AABB.h" #include "utils/ExtrusionLine.h" #include "utils/polygon.h" +#include + namespace cura { @@ -25,18 +25,18 @@ namespace cura class SupportInfillPart { public: - PolygonsPart outline; //!< The outline of the support infill area - AABB outline_boundary_box; //!< The boundary box for the infill area - coord_t support_line_width; //!< The support line width - int inset_count_to_generate; //!< The number of insets need to be generated from the outline. This is not the actual insets that will be generated. - std::vector> infill_area_per_combine_per_density; //!< a list of separated sub-areas which requires different infill densities and combined thicknesses - // for infill_areas[x][n], x means the density level and n means the thickness + PolygonsPart outline; //!< The outline of the support infill area + AABB outline_boundary_box; //!< The boundary box for the infill area + coord_t support_line_width; //!< The support line width + int inset_count_to_generate; //!< The number of insets need to be generated from the outline. This is not the actual insets that will be generated. + std::vector> infill_area_per_combine_per_density; //!< a list of separated sub-areas which requires different infill densities and combined thicknesses + // for infill_areas[x][n], x means the density level and n means the thickness std::vector wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx. coord_t custom_line_distance; bool use_fractional_config; - SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0 ); + SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0); const Polygons& getInfillArea() const; }; diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 2d74becd90..e7adca9412 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3064,7 +3064,11 @@ bool FffGcodeWriter::addSupportToGCode(const SliceDataStorage& storage, LayerPla } if (extruder_nr == support_roof_extruder_nr) { - support_added |= addSupportRoofsToGCode(storage, support_layer.support_roof.difference(support_layer.support_fractional_roof), gcode_layer.configs_storage.support_roof_config, gcode_layer); + support_added |= addSupportRoofsToGCode( + storage, + support_layer.support_roof.difference(support_layer.support_fractional_roof), + gcode_layer.configs_storage.support_roof_config, + gcode_layer); support_added |= addSupportRoofsToGCode(storage, support_layer.support_fractional_roof, gcode_layer.configs_storage.support_fractional_roof_config, gcode_layer); } if (extruder_nr == support_bottom_extruder_nr) @@ -3377,7 +3381,11 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer } -bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, const Polygons& support_roof_outlines, const GCodePathConfig& current_roof_config, LayerPlan& gcode_layer) const +bool FffGcodeWriter::addSupportRoofsToGCode( + const SliceDataStorage& storage, + const Polygons& support_roof_outlines, + const GCodePathConfig& current_roof_config, + LayerPlan& gcode_layer) const { const SupportLayer& support_layer = storage.support.supportLayers[std::max(LayerIndex{ 0 }, gcode_layer.getLayerNr())]; diff --git a/src/SupportInfillPart.cpp b/src/SupportInfillPart.cpp index fbc7c66096..ae0b8cf7c1 100644 --- a/src/SupportInfillPart.cpp +++ b/src/SupportInfillPart.cpp @@ -2,18 +2,19 @@ // CuraEngine is released under the terms of the AGPLv3 or higher. #include "SupportInfillPart.h" + #include "support.h" using namespace cura; SupportInfillPart::SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate, coord_t custom_line_distance) -: outline(outline) -, outline_boundary_box(outline) -, support_line_width(support_line_width) -, inset_count_to_generate(inset_count_to_generate) -, custom_line_distance(custom_line_distance) -, use_fractional_config(use_fractional_config) + : outline(outline) + , outline_boundary_box(outline) + , support_line_width(support_line_width) + , inset_count_to_generate(inset_count_to_generate) + , custom_line_distance(custom_line_distance) + , use_fractional_config(use_fractional_config) { infill_area_per_combine_per_density.clear(); } diff --git a/src/support.cpp b/src/support.cpp index 23fa7e66c6..5db9c9932e 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -115,7 +115,8 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( continue; } - const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; + const Polygons& global_support_areas_above + = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; const auto all_support_areas_in_layer = { global_support_areas.intersection(global_support_areas_above), global_support_areas.difference(global_support_areas_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) From 4682128777e104805e295d5c1a0aa2428a3b8410 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 13 Oct 2023 21:21:41 +0200 Subject: [PATCH 400/470] Fix unit-test. done for CURA-10407 --- tests/LayerPlanTest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/LayerPlanTest.cpp b/tests/LayerPlanTest.cpp index b583005053..e7428f421c 100644 --- a/tests/LayerPlanTest.cpp +++ b/tests/LayerPlanTest.cpp @@ -169,6 +169,7 @@ class LayerPlanTest : public testing::Test settings->add("support_roof_extruder_nr", "0"); settings->add("support_roof_line_width", "0.404"); settings->add("support_roof_material_flow", "104"); + settings->add("support_top_distance", "200"); settings->add("wall_line_count", "3"); settings->add("wall_line_width_x", "0.3"); settings->add("wall_line_width_0", "0.301"); From 115f0b98e582764561b2a50180e15c39be46da5f Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 16 Oct 2023 11:04:56 +0200 Subject: [PATCH 401/470] Fix roofing visualisation bug CURA-11140 --- src/settings/MeshPathConfigs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/MeshPathConfigs.cpp b/src/settings/MeshPathConfigs.cpp index aa71d89e07..d91595ce37 100644 --- a/src/settings/MeshPathConfigs.cpp +++ b/src/settings/MeshPathConfigs.cpp @@ -38,7 +38,7 @@ MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t lay .speed_derivatives = { .speed = mesh.settings.get("speed_wall_0_roofing"), .acceleration = mesh.settings.get("acceleration_wall_0_roofing"), .jerk = mesh.settings.get("jerk_wall_0_roofing") } } - , insetX_roofing_config{ .type = PrintFeatureType::OuterWall, + , insetX_roofing_config{ .type = PrintFeatureType::InnerWall, .line_width = static_cast( mesh.settings.get("wall_line_width_x") * line_width_factor_per_extruder[mesh.settings.get("wall_x_extruder_nr").extruder_nr]), From 3bea2989ad1c0b2cb4e8a5cec651fbba6bbacb28 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 17 Oct 2023 15:52:37 +0200 Subject: [PATCH 402/470] Introduce fractional roof-top layer-heigths in tree-support. Add fractional support-roof and split non-interface support according to layers above. Might refactor the (now) duplicated code (fragments) later if feasible. part of CURA-10407 --- src/TreeSupport.cpp | 11 +++++++++-- src/TreeSupportTipGenerator.cpp | 30 ++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index c226588ebe..eb4509bad6 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2226,9 +2226,16 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(floor_layer.offset(10)); // Subtract the support floor from the normal support. } - for (PolygonsPart part : support_layer_storage[layer_idx].splitIntoParts(true)) // Convert every part into a PolygonsPart for the support. + const Polygons support_layer_storage_above = (layer_idx + 1) >= support_layer_storage.size() || layer_idx <= 0 ? Polygons() : support_layer_storage[layer_idx + 1].offset(config.maximum_move_distance); + const auto all_support_areas_in_layer = { support_layer_storage[layer_idx].intersection(support_layer_storage_above), support_layer_storage[layer_idx].difference(support_layer_storage_above) }; + bool use_fractional_config = false; + for (auto& support_areas : all_support_areas_in_layer) { - storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, config.support_wall_count); + for (auto& part : support_areas.splitIntoParts(true)) // Convert every part into a PolygonsPart for the support. + { + storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, config.support_wall_count); + } + use_fractional_config = true; } { diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 99677f9c09..91ec303194 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1164,9 +1164,20 @@ void TreeSupportTipGenerator::generateTips( { if (use_fake_roof) { - for (auto part : support_roof_drawn[layer_idx].splitIntoParts()) + const Polygons support_roof_drawn_above = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance);; + const auto all_support_areas_in_layer = { support_roof_drawn[layer_idx].intersection(support_roof_drawn_above), support_roof_drawn[layer_idx].difference(support_roof_drawn_above)}; + bool use_fractional_config = false; + for (auto& support_areas : all_support_areas_in_layer) { - storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, 0, support_roof_line_distance); + for (const auto& part : support_areas.splitIntoParts()) + { + if (part.area() < config.min_feature_size * config.min_feature_size) + { + continue; + } + storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, 0, support_roof_line_distance); + } + use_fractional_config = true; } placed_support_lines_support_areas[layer_idx].add(TreeSupportUtils::generateSupportInfillLines( support_roof_drawn[layer_idx], @@ -1186,6 +1197,21 @@ void TreeSupportTipGenerator::generateTips( } }); + cura::parallel_for( + 1, + mesh.overhang_areas.size() - z_distance_delta, + [&](const LayerIndex layer_idx) + { + if (layer_idx > 0) + { + storage.support.supportLayers[layer_idx].support_fractional_roof.add( + storage.support.supportLayers[layer_idx].support_roof.difference( + storage.support.supportLayers[layer_idx + 1].support_roof + ) + ); + } + }); + removeUselessAddedPoints(new_tips, storage, additional_support_areas); for (auto [layer_idx, tips_on_layer] : new_tips | ranges::views::enumerate) From ab39a7738099ea6d9d44984d8b1cb2eacbf59cb4 Mon Sep 17 00:00:00 2001 From: rburema Date: Tue, 17 Oct 2023 14:01:46 +0000 Subject: [PATCH 403/470] Applied clang-format. --- src/TreeSupport.cpp | 6 ++++-- src/TreeSupportTipGenerator.cpp | 15 ++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index eb4509bad6..0c9a145cc3 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2226,8 +2226,10 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(floor_layer.offset(10)); // Subtract the support floor from the normal support. } - const Polygons support_layer_storage_above = (layer_idx + 1) >= support_layer_storage.size() || layer_idx <= 0 ? Polygons() : support_layer_storage[layer_idx + 1].offset(config.maximum_move_distance); - const auto all_support_areas_in_layer = { support_layer_storage[layer_idx].intersection(support_layer_storage_above), support_layer_storage[layer_idx].difference(support_layer_storage_above) }; + const Polygons support_layer_storage_above + = (layer_idx + 1) >= support_layer_storage.size() || layer_idx <= 0 ? Polygons() : support_layer_storage[layer_idx + 1].offset(config.maximum_move_distance); + const auto all_support_areas_in_layer + = { support_layer_storage[layer_idx].intersection(support_layer_storage_above), support_layer_storage[layer_idx].difference(support_layer_storage_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) { diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 91ec303194..110acd0436 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1164,8 +1164,11 @@ void TreeSupportTipGenerator::generateTips( { if (use_fake_roof) { - const Polygons support_roof_drawn_above = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance);; - const auto all_support_areas_in_layer = { support_roof_drawn[layer_idx].intersection(support_roof_drawn_above), support_roof_drawn[layer_idx].difference(support_roof_drawn_above)}; + const Polygons support_roof_drawn_above + = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance); + ; + const auto all_support_areas_in_layer + = { support_roof_drawn[layer_idx].intersection(support_roof_drawn_above), support_roof_drawn[layer_idx].difference(support_roof_drawn_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) { @@ -1175,7 +1178,8 @@ void TreeSupportTipGenerator::generateTips( { continue; } - storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, 0, support_roof_line_distance); + storage.support.supportLayers[layer_idx] + .support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, 0, support_roof_line_distance); } use_fractional_config = true; } @@ -1205,10 +1209,7 @@ void TreeSupportTipGenerator::generateTips( if (layer_idx > 0) { storage.support.supportLayers[layer_idx].support_fractional_roof.add( - storage.support.supportLayers[layer_idx].support_roof.difference( - storage.support.supportLayers[layer_idx + 1].support_roof - ) - ); + storage.support.supportLayers[layer_idx].support_roof.difference(storage.support.supportLayers[layer_idx + 1].support_roof)); } }); From e1e90a44fdfcdd575c246919e2484d111fcaf0cd Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 17 Oct 2023 17:50:53 +0200 Subject: [PATCH 404/470] Print lower fractional layer heights before full ones, pt 1. Take care of the ordering before it gets to all the order optimizers. part of CURA-10407 --- src/FffGcodeWriter.cpp | 5 ++++- src/TreeSupport.cpp | 2 +- src/TreeSupportTipGenerator.cpp | 2 +- src/support.cpp | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index e7adca9412..d232cc5d7c 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3058,6 +3058,10 @@ bool FffGcodeWriter::addSupportToGCode(const SliceDataStorage& storage, LayerPla return support_added; } + if (extruder_nr == support_roof_extruder_nr) + { + support_added |= addSupportRoofsToGCode(storage, support_layer.support_fractional_roof, gcode_layer.configs_storage.support_fractional_roof_config, gcode_layer); + } if (extruder_nr == support_infill_extruder_nr) { support_added |= processSupportInfill(storage, gcode_layer); @@ -3069,7 +3073,6 @@ bool FffGcodeWriter::addSupportToGCode(const SliceDataStorage& storage, LayerPla support_layer.support_roof.difference(support_layer.support_fractional_roof), gcode_layer.configs_storage.support_roof_config, gcode_layer); - support_added |= addSupportRoofsToGCode(storage, support_layer.support_fractional_roof, gcode_layer.configs_storage.support_fractional_roof_config, gcode_layer); } if (extruder_nr == support_bottom_extruder_nr) { diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 0c9a145cc3..f1a0504461 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2229,7 +2229,7 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor const Polygons support_layer_storage_above = (layer_idx + 1) >= support_layer_storage.size() || layer_idx <= 0 ? Polygons() : support_layer_storage[layer_idx + 1].offset(config.maximum_move_distance); const auto all_support_areas_in_layer - = { support_layer_storage[layer_idx].intersection(support_layer_storage_above), support_layer_storage[layer_idx].difference(support_layer_storage_above) }; + = { support_layer_storage[layer_idx].difference(support_layer_storage_above), support_layer_storage[layer_idx].intersection(support_layer_storage_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) { diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 110acd0436..2b4d9db870 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1168,7 +1168,7 @@ void TreeSupportTipGenerator::generateTips( = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance); ; const auto all_support_areas_in_layer - = { support_roof_drawn[layer_idx].intersection(support_roof_drawn_above), support_roof_drawn[layer_idx].difference(support_roof_drawn_above) }; + = { support_roof_drawn[layer_idx].difference(support_roof_drawn_above), support_roof_drawn[layer_idx].intersection(support_roof_drawn_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) { diff --git a/src/support.cpp b/src/support.cpp index 5db9c9932e..ce5c8b5e9b 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -117,7 +117,7 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; - const auto all_support_areas_in_layer = { global_support_areas.intersection(global_support_areas_above), global_support_areas.difference(global_support_areas_above) }; + const auto all_support_areas_in_layer = { global_support_areas.difference(global_support_areas_above), global_support_areas.intersection(global_support_areas_above) }; bool use_fractional_config = false; for (auto& support_areas : all_support_areas_in_layer) { From f61991bbf0c4528eb9992a82d8361f4f1d0dd957 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 17 Oct 2023 17:51:41 +0200 Subject: [PATCH 405/470] Remove debug code and typos. while working on CURA-10407 --- src/TreeSupportTipGenerator.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 2b4d9db870..908544513d 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1166,7 +1166,6 @@ void TreeSupportTipGenerator::generateTips( { const Polygons support_roof_drawn_above = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance); - ; const auto all_support_areas_in_layer = { support_roof_drawn[layer_idx].difference(support_roof_drawn_above), support_roof_drawn[layer_idx].intersection(support_roof_drawn_above) }; bool use_fractional_config = false; @@ -1174,10 +1173,6 @@ void TreeSupportTipGenerator::generateTips( { for (const auto& part : support_areas.splitIntoParts()) { - if (part.area() < config.min_feature_size * config.min_feature_size) - { - continue; - } storage.support.supportLayers[layer_idx] .support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, 0, support_roof_line_distance); } From 774cc0f1176e5ab6a207623221dc1b74bb6dba00 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 17 Oct 2023 18:09:00 +0200 Subject: [PATCH 406/470] Fix flip-around of boolean. Refactor in prep for consolidation. There's some code duplication that needs to be consolidated, so refactor the 'copy' (or original rather) so it's like the others and can be easily combined into one funciton. While that was being done, found that the booleans weren't flipped after the order of the input array was changed. (In order to print the lower bits _first_, _then_ the 'normal' support. part of CURA-10407 --- src/TreeSupport.cpp | 4 ++-- src/TreeSupportTipGenerator.cpp | 4 ++-- src/support.cpp | 26 ++++++++++++-------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index f1a0504461..8d228ffa71 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2230,14 +2230,14 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor = (layer_idx + 1) >= support_layer_storage.size() || layer_idx <= 0 ? Polygons() : support_layer_storage[layer_idx + 1].offset(config.maximum_move_distance); const auto all_support_areas_in_layer = { support_layer_storage[layer_idx].difference(support_layer_storage_above), support_layer_storage[layer_idx].intersection(support_layer_storage_above) }; - bool use_fractional_config = false; + bool use_fractional_config = true; for (auto& support_areas : all_support_areas_in_layer) { for (auto& part : support_areas.splitIntoParts(true)) // Convert every part into a PolygonsPart for the support. { storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, config.support_wall_count); } - use_fractional_config = true; + use_fractional_config = false; } { diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 908544513d..7d669396c9 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1168,7 +1168,7 @@ void TreeSupportTipGenerator::generateTips( = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance); const auto all_support_areas_in_layer = { support_roof_drawn[layer_idx].difference(support_roof_drawn_above), support_roof_drawn[layer_idx].intersection(support_roof_drawn_above) }; - bool use_fractional_config = false; + bool use_fractional_config = true; for (auto& support_areas : all_support_areas_in_layer) { for (const auto& part : support_areas.splitIntoParts()) @@ -1176,7 +1176,7 @@ void TreeSupportTipGenerator::generateTips( storage.support.supportLayers[layer_idx] .support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, 0, support_roof_line_distance); } - use_fractional_config = true; + use_fractional_config = false; } placed_support_lines_support_areas[layer_idx].add(TreeSupportUtils::generateSupportInfillLines( support_roof_drawn[layer_idx], diff --git a/src/support.cpp b/src/support.cpp index ce5c8b5e9b..973b3528e7 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -115,27 +115,25 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( continue; } + coord_t support_line_width_here = support_line_width; + if (layer_nr == 0 && mesh_group_settings.get("adhesion_type") != EPlatformAdhesion::RAFT) + { + support_line_width_here *= infill_extruder.settings.get("initial_layer_line_width_factor"); + } + // We don't generate insets and infill area for the parts yet because later the skirt/brim and prime + // tower will remove themselves from the support, so the outlines of the parts can be changed. + const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; const auto all_support_areas_in_layer = { global_support_areas.difference(global_support_areas_above), global_support_areas.intersection(global_support_areas_above) }; - bool use_fractional_config = false; + bool use_fractional_config = true; for (auto& support_areas : all_support_areas_in_layer) { - std::vector support_islands = support_areas.splitIntoParts(); - for (const PolygonsPart& island_outline : support_islands) + for (const PolygonsPart& island_outline : support_areas.splitIntoParts()) { - coord_t support_line_width_here = support_line_width; - if (layer_nr == 0 && mesh_group_settings.get("adhesion_type") != EPlatformAdhesion::RAFT) - { - support_line_width_here *= infill_extruder.settings.get("initial_layer_line_width_factor"); - } - // We don't generate insets and infill area for the parts yet because later the skirt/brim and prime - // tower will remove themselves from the support, so the outlines of the parts can be changed. - SupportInfillPart support_infill_part(island_outline, support_line_width_here, use_fractional_config, wall_line_count_this_layer); - - storage.support.supportLayers[layer_nr].support_infill_parts.push_back(support_infill_part); + storage.support.supportLayers[layer_nr].support_infill_parts.emplace_back(island_outline, support_line_width_here, use_fractional_config, wall_line_count_this_layer); } - use_fractional_config = true; + use_fractional_config = false; } } } From 7c02094b0f16fc0dac9a1bbbb55e32c729d428e8 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 17 Oct 2023 18:52:28 +0200 Subject: [PATCH 407/470] Consolidate duplicated code into 'fillInfillParts'. done as part of CURA-10407 --- include/sliceDataStorage.h | 11 +++++++++++ src/TreeSupport.cpp | 15 ++------------- src/TreeSupportTipGenerator.cpp | 15 +-------------- src/sliceDataStorage.cpp | 16 ++++++++++++++++ src/support.cpp | 14 +------------- 5 files changed, 31 insertions(+), 40 deletions(-) diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 80b825211a..81d14f24a7 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -226,6 +226,17 @@ class SupportLayer * \param exclude_polygons_boundary_box The boundary box for the polygons to exclude */ void excludeAreasFromSupportInfillAreas(const Polygons& exclude_polygons, const AABB& exclude_polygons_boundary_box); + + /* Fill up the infill parts for the support with the given support polygons. The support polygons will be split into parts. This also takes into account fractional-height support layers. + * + * \param layer_nr Current layer index. + * \param support_fill_per_layer All of the (infill) support (since the layer above might be needed). + * \param support_line_width Line width of the support extrusions. + * \param wall_line_count Wall-line count around the fill. + * \param grow_layer_above (optional, default to 0) In cases where support shrinks per layer up, an appropriate offset may be nescesary. + * \param unionAll (optional, default to false) Wether to 'union all' for the split into parts bit. + */ + void fillInfillParts(const LayerIndex layer_nr, const std::vector& support_fill_per_layer, const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above = 0, const bool unionAll = false); }; class SupportStorage diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 8d228ffa71..7c4fcda0a7 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2226,19 +2226,8 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(floor_layer.offset(10)); // Subtract the support floor from the normal support. } - const Polygons support_layer_storage_above - = (layer_idx + 1) >= support_layer_storage.size() || layer_idx <= 0 ? Polygons() : support_layer_storage[layer_idx + 1].offset(config.maximum_move_distance); - const auto all_support_areas_in_layer - = { support_layer_storage[layer_idx].difference(support_layer_storage_above), support_layer_storage[layer_idx].intersection(support_layer_storage_above) }; - bool use_fractional_config = true; - for (auto& support_areas : all_support_areas_in_layer) - { - for (auto& part : support_areas.splitIntoParts(true)) // Convert every part into a PolygonsPart for the support. - { - storage.support.supportLayers[layer_idx].support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, config.support_wall_count); - } - use_fractional_config = false; - } + constexpr bool convert_every_part = true; // Convert every part into a PolygonsPart for the support. + storage.support.supportLayers[layer_idx].fillInfillParts(layer_idx, support_layer_storage, config.support_line_width, config.support_wall_count, config.maximum_move_distance, convert_every_part); { std::lock_guard critical_section_progress(critical_sections); diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 7d669396c9..552f229dd6 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1164,20 +1164,7 @@ void TreeSupportTipGenerator::generateTips( { if (use_fake_roof) { - const Polygons support_roof_drawn_above - = (layer_idx + 1) >= support_roof_drawn.size() || layer_idx <= 0 ? Polygons() : support_roof_drawn[layer_idx + 1].offset(config.maximum_move_distance); - const auto all_support_areas_in_layer - = { support_roof_drawn[layer_idx].difference(support_roof_drawn_above), support_roof_drawn[layer_idx].intersection(support_roof_drawn_above) }; - bool use_fractional_config = true; - for (auto& support_areas : all_support_areas_in_layer) - { - for (const auto& part : support_areas.splitIntoParts()) - { - storage.support.supportLayers[layer_idx] - .support_infill_parts.emplace_back(part, config.support_line_width, use_fractional_config, 0, support_roof_line_distance); - } - use_fractional_config = false; - } + storage.support.supportLayers[layer_idx].fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, support_roof_line_distance, config.maximum_move_distance); placed_support_lines_support_areas[layer_idx].add(TreeSupportUtils::generateSupportInfillLines( support_roof_drawn[layer_idx], config, diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 4533fbb8be..61c6ff1689 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -705,4 +705,20 @@ void SupportLayer::excludeAreasFromSupportInfillAreas(const Polygons& exclude_po } } +void SupportLayer::fillInfillParts(const LayerIndex layer_nr, const std::vector& support_fill_per_layer, const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above /*has default 0*/, const bool unionAll /*has default false*/) +{ + const Polygons& support_this_layer = support_fill_per_layer[layer_nr]; + const Polygons& support_layer_above = (layer_nr + 1) >= support_fill_per_layer.size() || layer_nr <= 0 ? Polygons() : support_fill_per_layer[layer_nr + 1].offset(grow_layer_above); + const auto all_support_areas_in_layer = { support_this_layer.difference(support_layer_above), support_this_layer.intersection(support_layer_above) }; + bool use_fractional_config = true; + for (auto& support_areas : all_support_areas_in_layer) + { + for (const PolygonsPart& island_outline : support_areas.splitIntoParts(unionAll)) + { + support_infill_parts.emplace_back(island_outline, support_line_width, use_fractional_config, wall_line_count); + } + use_fractional_config = false; + } +} + } // namespace cura diff --git a/src/support.cpp b/src/support.cpp index 973b3528e7..a0b049fe04 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -122,19 +122,7 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts( } // We don't generate insets and infill area for the parts yet because later the skirt/brim and prime // tower will remove themselves from the support, so the outlines of the parts can be changed. - - const Polygons& global_support_areas_above - = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1]; - const auto all_support_areas_in_layer = { global_support_areas.difference(global_support_areas_above), global_support_areas.intersection(global_support_areas_above) }; - bool use_fractional_config = true; - for (auto& support_areas : all_support_areas_in_layer) - { - for (const PolygonsPart& island_outline : support_areas.splitIntoParts()) - { - storage.support.supportLayers[layer_nr].support_infill_parts.emplace_back(island_outline, support_line_width_here, use_fractional_config, wall_line_count_this_layer); - } - use_fractional_config = false; - } + storage.support.supportLayers[layer_nr].fillInfillParts(layer_nr, global_support_areas_per_layer, support_line_width_here, wall_line_count_this_layer); } } From bd1b63430edd92a5f8f6815a4d3d219fe70351fb Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 17 Oct 2023 19:22:21 +0200 Subject: [PATCH 408/470] Print lower fractional layer heights before full ones, pt 2. Take care of the order optimizer w.r.t. partially fractional-height support-layers. part of CURA-10407 --- src/FffGcodeWriter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index d232cc5d7c..2350305217 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -21,6 +21,7 @@ #include "utils/math.h" #include "utils/orderOptimizer.h" +#include #include #include #include @@ -3148,11 +3149,13 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer const auto zag_skip_count = infill_extruder.settings.get("support_zag_skip_count"); // create a list of outlines and use PathOrderOptimizer to optimize the travel move + PathOrderOptimizer island_order_optimizer_initial(gcode_layer.getLastPlannedPositionOrStartingPosition()); PathOrderOptimizer island_order_optimizer(gcode_layer.getLastPlannedPositionOrStartingPosition()); for (const SupportInfillPart& part : support_layer.support_infill_parts) { - island_order_optimizer.addPolygon(&part); + (part.use_fractional_config ? island_order_optimizer_initial : island_order_optimizer).addPolygon(&part); } + island_order_optimizer_initial.optimize(); island_order_optimizer.optimize(); const auto support_connect_zigzags = infill_extruder.settings.get("support_connect_zigzags"); @@ -3165,7 +3168,7 @@ bool FffGcodeWriter::processSupportInfill(const SliceDataStorage& storage, Layer bool need_travel_to_end_of_last_spiral = true; // Print the thicker infill lines first. (double or more layer thickness, infill combined with previous layers) - for (const PathOrdering& path : island_order_optimizer.paths) + for (const PathOrdering& path : ranges::views::concat(island_order_optimizer_initial.paths, island_order_optimizer.paths)) { const SupportInfillPart& part = *path.vertices; const auto& configs = part.use_fractional_config ? gcode_layer.configs_storage.support_fractional_infill_config : gcode_layer.configs_storage.support_infill_config; From 42b3a7115585e5efbfb27c5cb9c27ac9d256c53b Mon Sep 17 00:00:00 2001 From: rburema Date: Tue, 17 Oct 2023 17:25:07 +0000 Subject: [PATCH 409/470] Applied clang-format. --- include/sliceDataStorage.h | 13 ++++++++++--- src/TreeSupport.cpp | 5 +++-- src/TreeSupportTipGenerator.cpp | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 81d14f24a7..dd99d8d197 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -227,16 +227,23 @@ class SupportLayer */ void excludeAreasFromSupportInfillAreas(const Polygons& exclude_polygons, const AABB& exclude_polygons_boundary_box); - /* Fill up the infill parts for the support with the given support polygons. The support polygons will be split into parts. This also takes into account fractional-height support layers. + /* Fill up the infill parts for the support with the given support polygons. The support polygons will be split into parts. This also takes into account fractional-height + * support layers. * * \param layer_nr Current layer index. * \param support_fill_per_layer All of the (infill) support (since the layer above might be needed). * \param support_line_width Line width of the support extrusions. * \param wall_line_count Wall-line count around the fill. * \param grow_layer_above (optional, default to 0) In cases where support shrinks per layer up, an appropriate offset may be nescesary. - * \param unionAll (optional, default to false) Wether to 'union all' for the split into parts bit. + * \param unionAll (optional, default to false) Wether to 'union all' for the split into parts bit. */ - void fillInfillParts(const LayerIndex layer_nr, const std::vector& support_fill_per_layer, const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above = 0, const bool unionAll = false); + void fillInfillParts( + const LayerIndex layer_nr, + const std::vector& support_fill_per_layer, + const coord_t support_line_width, + const coord_t wall_line_count, + const coord_t grow_layer_above = 0, + const bool unionAll = false); }; class SupportStorage diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 7c4fcda0a7..9ce458d7f7 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -2226,8 +2226,9 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor support_layer_storage[layer_idx] = support_layer_storage[layer_idx].difference(floor_layer.offset(10)); // Subtract the support floor from the normal support. } - constexpr bool convert_every_part = true; // Convert every part into a PolygonsPart for the support. - storage.support.supportLayers[layer_idx].fillInfillParts(layer_idx, support_layer_storage, config.support_line_width, config.support_wall_count, config.maximum_move_distance, convert_every_part); + constexpr bool convert_every_part = true; // Convert every part into a PolygonsPart for the support. + storage.support.supportLayers[layer_idx] + .fillInfillParts(layer_idx, support_layer_storage, config.support_line_width, config.support_wall_count, config.maximum_move_distance, convert_every_part); { std::lock_guard critical_section_progress(critical_sections); diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 552f229dd6..d362052739 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1164,7 +1164,8 @@ void TreeSupportTipGenerator::generateTips( { if (use_fake_roof) { - storage.support.supportLayers[layer_idx].fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, support_roof_line_distance, config.maximum_move_distance); + storage.support.supportLayers[layer_idx] + .fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, support_roof_line_distance, config.maximum_move_distance); placed_support_lines_support_areas[layer_idx].add(TreeSupportUtils::generateSupportInfillLines( support_roof_drawn[layer_idx], config, From 9e1e888d4e6d7f49b9db2e55ea79504fb5527fdb Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 18 Oct 2023 13:13:49 +0200 Subject: [PATCH 410/470] Code cleaning/readability CURA-10783 --- .clang-format | 6 +++--- include/PrimeTower.h | 15 ++++++++++----- include/SkirtBrim.h | 4 ++-- src/PrimeTower.cpp | 20 ++++++++++---------- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.clang-format b/.clang-format index 5d90caa166..e5f6fc2257 100644 --- a/.clang-format +++ b/.clang-format @@ -59,11 +59,11 @@ ForEachMacros: IncludeBlocks: Regroup IncludeCategories: - Priority: 2 - Regex: ^<(scripta|spdlog|range|fmt|Arcus|agrpc|grpc|boost)/ + Regex: '^<(scripta|spdlog|range|fmt|Arcus|agrpc|grpc|boost)/.*' - Priority: 3 - Regex: ^(<|"(gtest|gmock|isl|json)/) + Regex: '^((<|")(gtest|gmock|isl|json)/)' - Priority: 1 - Regex: .* + Regex: '^<.*' IncludeIsMainRegex: (Test)?$ IndentCaseLabels: false IndentWidth: 4 diff --git a/include/PrimeTower.h b/include/PrimeTower.h index 2201ce7544..0ae2350b6a 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -4,11 +4,12 @@ #ifndef PRIME_TOWER_H #define PRIME_TOWER_H +#include + #include "settings/types/LayerIndex.h" #include "utils/polygon.h" // Polygons #include "utils/polygonUtils.h" -#include namespace cura { @@ -30,7 +31,11 @@ class PrimeTower Polygons polygons; Polygons lines; }; - unsigned int extruder_count; //!< Number of extruders + + using MovesByExtruder = std::vector; + using MovesByLayer = std::vector; + + size_t extruder_count; //!< Number of extruders bool wipe_from_middle; //!< Whether to wipe on the inside of the hollow prime tower Point middle; //!< The middle of the prime tower @@ -40,8 +45,8 @@ class PrimeTower std::vector prime_tower_start_locations; //!< The differernt locations where to pre-wipe the active nozzle const unsigned int number_of_prime_tower_start_locations = 21; //!< The required size of \ref PrimeTower::wipe_locations - std::vector pattern_per_extruder; //!< For each extruder the pattern to print on all layers of the prime tower. - std::vector> pattern_extra_brim_per_layer; //!< For each layer of each extruder, the extra pattern to be added for adhesion and/or strength + MovesByExtruder prime_moves; //!< For each extruder, the moves to be processed for actual priming. + MovesByLayer base_extra_moves; //!< For each layer and each extruder, the extra moves to be processed for better adhesion/strength Polygons outer_poly; //!< The outline of the outermost prime tower. std::vector outer_poly_base; //!< The outline of the layers having extra width for the base @@ -58,7 +63,7 @@ class PrimeTower * This is the spatial order from outside to inside. This is NOT the actual * order in time in which they are printed. */ - std::vector extruder_order; + std::vector extruder_order; /*! * \brief Creates a prime tower instance that will determine where and how diff --git a/include/SkirtBrim.h b/include/SkirtBrim.h index fa41df0999..896e4aac45 100644 --- a/include/SkirtBrim.h +++ b/include/SkirtBrim.h @@ -4,13 +4,13 @@ #ifndef SKIRT_BRIM_H #define SKIRT_BRIM_H +#include + #include "ExtruderTrain.h" #include "settings/EnumSettings.h" #include "sliceDataStorage.h" #include "utils/Coord_t.h" -#include - namespace cura { diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index fa291fedc4..a9c1461cf1 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -3,6 +3,9 @@ #include "PrimeTower.h" +#include +#include + #include "Application.h" //To get settings. #include "ExtruderTrain.h" #include "LayerPlan.h" @@ -14,9 +17,6 @@ #include "raft.h" #include "sliceDataStorage.h" -#include -#include - #define CIRCLE_RESOLUTION 32 // The number of vertices in each circle. @@ -154,8 +154,8 @@ void PrimeTower::generatePaths_denseInfill() const int base_curve_magnitude = mesh_group_settings.get("prime_tower_base_curve_magnitude"); const coord_t line_width = scene.extruders[extruder_order.front()].settings.get("prime_tower_line_width"); - pattern_per_extruder.resize(extruder_count); - pattern_extra_brim_per_layer.resize(extruder_count); + prime_moves.resize(extruder_count); + base_extra_moves.resize(extruder_count); coord_t cumulative_inset = 0; // Each tower shape is going to be printed inside the other. This is the inset we're doing for each extruder. for (size_t extruder_nr : extruder_order) @@ -164,7 +164,7 @@ void PrimeTower::generatePaths_denseInfill() const coord_t required_volume = MM3_2INT(scene.extruders[extruder_nr].settings.get("prime_tower_min_volume")); const Ratio flow = scene.extruders[extruder_nr].settings.get("prime_tower_flow"); coord_t current_volume = 0; - ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; + ExtrusionMoves& pattern = prime_moves[extruder_nr]; // Create the walls of the prime tower. unsigned int wall_nr = 0; @@ -195,7 +195,7 @@ void PrimeTower::generatePaths_denseInfill() extra_radius = line_width * extra_rings; outer_poly_base.push_back(outer_poly.offset(extra_radius)); - pattern_extra_brim_per_layer[extruder_nr].push_back(generatePaths_base(outer_poly, extra_rings, line_width)); + base_extra_moves[extruder_nr].push_back(generatePaths_base(outer_poly, extra_rings, line_width)); } } @@ -207,7 +207,7 @@ void PrimeTower::generatePaths_denseInfill() ExtrusionMoves pattern = generatePaths_inset(outer_poly, line_width, cumulative_inset); if (! pattern.polygons.empty() || ! pattern.lines.empty()) { - pattern_extra_brim_per_layer[extruder_nr].push_back(pattern); + base_extra_moves[extruder_nr].push_back(pattern); } } } @@ -280,12 +280,12 @@ void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t ext { // Actual prime pattern const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - const ExtrusionMoves& pattern = pattern_per_extruder[extruder_nr]; + const ExtrusionMoves& pattern = prime_moves[extruder_nr]; gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); } - const std::vector& pattern_extra_brim = pattern_extra_brim_per_layer[extruder_nr]; + const std::vector& pattern_extra_brim = base_extra_moves[extruder_nr]; if (absolute_layer_number < pattern_extra_brim.size()) { // Extra rings for stronger base From e58f31c3cfbe331dfa1910e913e05642ba5932a7 Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Wed, 18 Oct 2023 11:14:33 +0000 Subject: [PATCH 411/470] Applied clang-format. --- include/sliceDataStorage.h | 8 ++++---- src/FffGcodeWriter.cpp | 24 ++++++++++++------------ src/FffPolygonGenerator.cpp | 4 ++-- src/LayerPlanBuffer.cpp | 4 ++-- src/SkirtBrim.cpp | 4 ++-- src/TreeModelVolumes.cpp | 10 +++++----- src/raft.cpp | 4 ++-- src/sliceDataStorage.cpp | 4 ++-- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index c3313e801a..6a362522ef 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -4,6 +4,10 @@ #ifndef SLICE_DATA_STORAGE_H #define SLICE_DATA_STORAGE_H +#include +#include +#include + #include "PrimeTower.h" #include "RetractionConfig.h" #include "SupportInfillPart.h" @@ -18,10 +22,6 @@ #include "utils/NoCopy.h" #include "utils/polygon.h" -#include -#include -#include - // libArachne #include "utils/ExtrusionLine.h" diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 78a541c00e..db904f0e3a 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3,6 +3,18 @@ #include "FffGcodeWriter.h" +#include +#include // numeric_limits +#include +#include +#include +#include + +#include +#include +#include +#include + #include "Application.h" #include "ExtruderTrain.h" #include "FffProcessor.h" @@ -21,18 +33,6 @@ #include "utils/math.h" #include "utils/orderOptimizer.h" -#include -#include -#include -#include - -#include -#include // numeric_limits -#include -#include -#include -#include - namespace cura { diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp index 640a563284..3b1a5e4c38 100644 --- a/src/FffPolygonGenerator.cpp +++ b/src/FffPolygonGenerator.cpp @@ -1,14 +1,14 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include - #include #include #include // ifstream.good() #include // multimap (ordered map allowing duplicate keys) #include +#include + // Code smell: Order of the includes is important here, probably due to some forward declarations which might be masking some undefined behaviours // clang-format off #include "Application.h" diff --git a/src/LayerPlanBuffer.cpp b/src/LayerPlanBuffer.cpp index b5bede2665..d5a033a136 100644 --- a/src/LayerPlanBuffer.cpp +++ b/src/LayerPlanBuffer.cpp @@ -3,6 +3,8 @@ #include "LayerPlanBuffer.h" +#include + #include "Application.h" //To flush g-code through the communication channel. #include "ExtruderTrain.h" #include "FffProcessor.h" @@ -11,8 +13,6 @@ #include "communication/Communication.h" //To flush g-code through the communication channel. #include "gcodeExport.h" -#include - namespace cura { diff --git a/src/SkirtBrim.cpp b/src/SkirtBrim.cpp index 522e0994f5..4b77b449d3 100644 --- a/src/SkirtBrim.cpp +++ b/src/SkirtBrim.cpp @@ -3,6 +3,8 @@ #include "SkirtBrim.h" +#include + #include "Application.h" #include "ExtruderTrain.h" #include "Slice.h" @@ -13,8 +15,6 @@ #include "utils/PolylineStitcher.h" #include "utils/Simplify.h" //Simplifying the brim/skirt at every inset. -#include - namespace cura { diff --git a/src/TreeModelVolumes.cpp b/src/TreeModelVolumes.cpp index aea31de82c..4604967baf 100644 --- a/src/TreeModelVolumes.cpp +++ b/src/TreeModelVolumes.cpp @@ -3,6 +3,11 @@ #include "TreeModelVolumes.h" +#include +#include +#include +#include + #include "TreeSupport.h" #include "TreeSupportEnums.h" #include "progress/Progress.h" @@ -10,11 +15,6 @@ #include "utils/ThreadPool.h" #include "utils/algorithm.h" -#include -#include -#include -#include - namespace cura { diff --git a/src/raft.cpp b/src/raft.cpp index 665cc833f5..e13836b43f 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -3,6 +3,8 @@ #include "raft.h" +#include + #include "Application.h" //To get settings. #include "ExtruderTrain.h" #include "Slice.h" @@ -10,8 +12,6 @@ #include "sliceDataStorage.h" #include "utils/math.h" -#include - namespace cura { diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index c560a2b675..b9b978d557 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -3,6 +3,8 @@ #include "sliceDataStorage.h" +#include + #include "Application.h" //To get settings. #include "ExtruderTrain.h" #include "FffProcessor.h" //To create a mesh group with if none is provided. @@ -14,8 +16,6 @@ #include "raft.h" #include "utils/math.h" //For PI. -#include - namespace cura { From 87fbc0aca0dfd1a90eee2d36c20ef98aa7b62460 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 19 Oct 2023 10:15:45 +0200 Subject: [PATCH 412/470] Moved and optimized generic geometric methods --- include/PrimeTower.h | 32 +--- include/utils/polygonUtils.h | 330 ++++++++++++++++++++++------------- src/PrimeTower.cpp | 53 ++---- src/utils/polygonUtils.cpp | 44 ++++- 4 files changed, 251 insertions(+), 208 deletions(-) diff --git a/include/PrimeTower.h b/include/PrimeTower.h index 0ae2350b6a..a493cfb3be 100644 --- a/include/PrimeTower.h +++ b/include/PrimeTower.h @@ -26,13 +26,7 @@ class LayerPlan; class PrimeTower { private: - struct ExtrusionMoves - { - Polygons polygons; - Polygons lines; - }; - - using MovesByExtruder = std::vector; + using MovesByExtruder = std::vector; using MovesByLayer = std::vector; size_t extruder_count; //!< Number of extruders @@ -122,30 +116,6 @@ class PrimeTower const Polygons& getGroundPoly() const; private: - /*! - * \see PrimeTower::generatePaths - * - * Generate extra rings around the actual prime rings for a stronger base - * - * \param inset The inner circle of the rings to start generating the rings from - * \param rings The number of rings to add - * \param line_width The actual line width to distance the rings from each other - * \return The generated rings paths - */ - static ExtrusionMoves generatePaths_base(const Polygons& inset, size_t rings, coord_t line_width); - - /*! - * \see PrimeTower::generatePaths - * - * Generate extra rings inside the given circle for a better adhesion on the first layer - * - * \param outer_poly The outer polygon to start generating the rings from - * \param line_width The actual line width to distance the rings from each other - * \param initial_inset The inset distance to be added to the first generated ring - * \return The generated rings paths - */ - static ExtrusionMoves generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset); - /*! * \see PrimeTower::generatePaths * diff --git a/include/utils/polygonUtils.h b/include/utils/polygonUtils.h index 13786e71c7..c4ea2c2db6 100644 --- a/include/utils/polygonUtils.h +++ b/include/utils/polygonUtils.h @@ -1,20 +1,20 @@ -//Copyright (c) 2021 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2021 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef UTILS_POLYGON_UTILS_H #define UTILS_POLYGON_UTILS_H #include // function #include -#include #include // unique_ptr +#include -#include "polygon.h" -#include "SparsePointGridInclusive.h" -#include "SparseLineGrid.h" #include "PolygonsPointIndex.h" +#include "SparseLineGrid.h" +#include "SparsePointGridInclusive.h" +#include "polygon.h" -namespace cura +namespace cura { /*! @@ -26,10 +26,23 @@ struct ClosestPolygonPoint ConstPolygonPointer poly; //!< Polygon in which the result was found (or nullptr if no result was found) unsigned int poly_idx; //!< The index of the polygon in some Polygons where ClosestPolygonPoint::poly can be found unsigned int point_idx; //!< Index to the first point in the polygon of the line segment on which the result was found - ClosestPolygonPoint(Point p, int pos, ConstPolygonRef poly) : location(p), poly(poly), poly_idx(NO_INDEX), point_idx(pos) {}; - ClosestPolygonPoint(Point p, int pos, ConstPolygonRef poly, int poly_idx) : location(p), poly(poly), poly_idx(poly_idx), point_idx(pos) {}; - ClosestPolygonPoint(ConstPolygonRef poly) : poly(poly), poly_idx(NO_INDEX), point_idx(NO_INDEX) {}; - ClosestPolygonPoint() : poly_idx(NO_INDEX), point_idx(NO_INDEX) {}; + ClosestPolygonPoint(Point p, int pos, ConstPolygonRef poly) + : location(p) + , poly(poly) + , poly_idx(NO_INDEX) + , point_idx(pos){}; + ClosestPolygonPoint(Point p, int pos, ConstPolygonRef poly, int poly_idx) + : location(p) + , poly(poly) + , poly_idx(poly_idx) + , point_idx(pos){}; + ClosestPolygonPoint(ConstPolygonRef poly) + : poly(poly) + , poly_idx(NO_INDEX) + , point_idx(NO_INDEX){}; + ClosestPolygonPoint() + : poly_idx(NO_INDEX) + , point_idx(NO_INDEX){}; Point p() const { // conformity with other classes return location; @@ -50,7 +63,7 @@ struct ClosestPolygonPoint namespace std { -template <> +template<> struct hash { size_t operator()(const cura::ClosestPolygonPoint& cpp) const @@ -58,12 +71,12 @@ struct hash return std::hash()(cpp.p()); } }; -}//namespace std +} // namespace std namespace std { -template +template struct hash> { size_t operator()(const std::pair& pair) const @@ -71,7 +84,7 @@ struct hash> return 31 * std::hash()(pair.first) + 59 * std::hash()(pair.second); } }; -}//namespace std +} // namespace std namespace cura @@ -88,18 +101,18 @@ struct GivenDistPoint typedef SparseLineGrid LocToLineGrid; -class PolygonUtils +class PolygonUtils { public: static const std::function no_penalty_function; //!< Function always returning zero /*! * compute the length of a segment of a polygon - * + * * if \p end == \p start then the full polygon is taken - * + * * \warning assumes that start and end lie on the same polygon! - * + * * \param start The start vertex of the segment * \param end the end vertex of the segment * \return the total length of all the line segments in between the two vertices. @@ -108,12 +121,12 @@ class PolygonUtils /*! * Generate evenly spread out dots along a segment of a polygon - * + * * Start at a distance from \p start and end at a distance from \p end, * unless \p end == \p start; then that point is in the result - * + * * \warning Assumes that start and end lie on the same polygon! - * + * * \param start The start vertex of the segment * \param end the end vertex of the segment * \param n_dots number of dots to spread out @@ -131,48 +144,54 @@ class PolygonUtils /*! * Whether a polygon intersects with a line-segment. If true, the closest collision point to 'b' is stored in the result. */ - static bool lineSegmentPolygonsIntersection(const Point& a, const Point& b, const Polygons& current_outlines, const LocToLineGrid& outline_locator, Point& result, const coord_t within_max_dist); + static bool lineSegmentPolygonsIntersection( + const Point& a, + const Point& b, + const Polygons& current_outlines, + const LocToLineGrid& outline_locator, + Point& result, + const coord_t within_max_dist); /*! * Get the normal of a boundary point, pointing outward. * Only the direction is set. * Nothing is said about the length of the vector returned. - * + * * \param poly The polygon. * \param point_idx The index of the point in the polygon. */ static Point getVertexInwardNormal(ConstPolygonRef poly, unsigned int point_idx); /*! - * Get a point from the \p poly with a given \p offset. - * - * \param poly The polygon. - * \param point_idx The index of the point in the polygon. - * \param offset The distance the point has to be moved outward from the polygon. - * \return A point at the given distance inward from the point on the boundary polygon. - */ + * Get a point from the \p poly with a given \p offset. + * + * \param poly The polygon. + * \param point_idx The index of the point in the polygon. + * \param offset The distance the point has to be moved outward from the polygon. + * \return A point at the given distance inward from the point on the boundary polygon. + */ static Point getBoundaryPointWithOffset(ConstPolygonRef poly, unsigned int point_idx, int64_t offset); /*! * Move a point away from the boundary by looking at the boundary normal of the nearest vert. - * + * * \param point_on_boundary The object holding the point on the boundary along with the information of which line segment the point is on. * \param offset The distance the point has to be moved inward from the polygon. */ static Point moveInsideDiagonally(ClosestPolygonPoint point_on_boundary, int64_t inset); /*! - * Moves the point \p from onto the nearest polygon or leaves the point as-is, when the comb boundary is not within the root of \p max_dist2 distance. - * Given a \p distance more than zero, the point will end up inside, and conversely outside. - * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. - * When the point is in/outside by less than \p distance, \p from is moved to the correct place. - * - * \param polygons The polygons onto which to move the point - * \param from[in,out] The point to move. - * \param distance The distance by which to move the point. - * \param max_dist2 The squared maximal allowed distance from the point to the nearest polygon. - * \return The index to the polygon onto which we have moved the point. - */ + * Moves the point \p from onto the nearest polygon or leaves the point as-is, when the comb boundary is not within the root of \p max_dist2 distance. + * Given a \p distance more than zero, the point will end up inside, and conversely outside. + * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. + * When the point is in/outside by less than \p distance, \p from is moved to the correct place. + * + * \param polygons The polygons onto which to move the point + * \param from[in,out] The point to move. + * \param distance The distance by which to move the point. + * \param max_dist2 The squared maximal allowed distance from the point to the nearest polygon. + * \return The index to the polygon onto which we have moved the point. + */ static unsigned int moveInside(const Polygons& polygons, Point& from, int distance = 0, int64_t max_dist2 = std::numeric_limits::max()); /** @@ -198,11 +217,11 @@ class PolygonUtils * Given a \p distance more than zero, the point will end up inside, and conversely outside. * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. * When the point is in/outside by less than \p distance, \p from is moved to the correct place. - * + * * \warning If \p loc_to_line_grid is used, it's best to have all and only \p polygons in there. * If \p from is not closest to \p polygons this function may * return a ClosestPolygonPoint on a polygon in \p loc_to_line_grid which is not in \p polygons. - * + * * \param polygons The polygons onto which to move the point * \param from[in,out] The point to move. * \param distance The distance by which to move the point. @@ -212,18 +231,25 @@ class PolygonUtils * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. * \return The point on the polygon closest to \p from */ - static ClosestPolygonPoint moveInside2(const Polygons& polygons, Point& from, const int distance = 0, const int64_t max_dist2 = std::numeric_limits::max(), const Polygons* loc_to_line_polygons = nullptr, const LocToLineGrid* loc_to_line_grid = nullptr, const std::function& penalty_function = no_penalty_function); + static ClosestPolygonPoint moveInside2( + const Polygons& polygons, + Point& from, + const int distance = 0, + const int64_t max_dist2 = std::numeric_limits::max(), + const Polygons* loc_to_line_polygons = nullptr, + const LocToLineGrid* loc_to_line_grid = nullptr, + const std::function& penalty_function = no_penalty_function); /*! * Moves the point \p from onto the nearest segment of \p polygon or leaves the point as-is, when the comb boundary is not within the root of \p max_dist2 distance. * Given a \p distance more than zero, the point will end up inside, and conversely outside. * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. * When the point is in/outside by less than \p distance, \p from is moved to the correct place. - * + * * \warning When a \p loc_to_line is given this function only considers nearby elements. * Even when the penalty function favours elements farther away. * Also using the \p loc_to_line_grid automatically considers \p all_polygons - * + * * \param loc_to_line_polygons All polygons which are present in the \p loc_to_line_grid of which \p polygon is an element * \param polygon The polygon onto which to move the point * \param from[in,out] The point to move. @@ -233,16 +259,23 @@ class PolygonUtils * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. * \return The point on the polygon closest to \p from */ - static ClosestPolygonPoint moveInside2(const Polygons& loc_to_line_polygons, ConstPolygonRef polygon, Point& from, const int distance = 0, const int64_t max_dist2 = std::numeric_limits::max(), const LocToLineGrid* loc_to_line_grid = nullptr, const std::function& penalty_function = no_penalty_function); + static ClosestPolygonPoint moveInside2( + const Polygons& loc_to_line_polygons, + ConstPolygonRef polygon, + Point& from, + const int distance = 0, + const int64_t max_dist2 = std::numeric_limits::max(), + const LocToLineGrid* loc_to_line_grid = nullptr, + const std::function& penalty_function = no_penalty_function); /*! * The opposite of moveInside. - * + * * Moves the point \p from onto the nearest polygon or leaves the point as-is, when the comb boundary is not within \p distance. * Given a \p distance more than zero, the point will end up outside, and conversely inside. * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. * When the point is in/outside by less than \p distance, \p from is moved to the correct place. - * + * * \param polygons The polygons onto which to move the point * \param from[in,out] The point to move. * \param distance The distance by which to move the point. @@ -251,23 +284,23 @@ class PolygonUtils * \return The index to the polygon onto which we have moved the point. */ static unsigned int moveOutside(const Polygons& polygons, Point& from, int distance = 0, int64_t max_dist2 = std::numeric_limits::max()); - + /*! * Compute a point at a distance from a point on the boundary in orthogonal direction to the boundary. * Given a \p distance more than zero, the point will end up inside, and conversely outside. - * + * * \param cpp The object holding the point on the boundary along with the information of which line segment the point is on. * \param distance The distance by which to move the point. * \return A point at a \p distance from the point in \p cpp orthogonal to the boundary there. */ static Point moveInside(const ClosestPolygonPoint& cpp, const int distance); - + /*! * The opposite of moveInside. - * + * * Compute a point at a distance from a point on the boundary in orthogonal direction to the boundary. * Given a \p distance more than zero, the point will end up outside, and conversely inside. - * + * * \param cpp The object holding the point on the boundary along with the information of which line segment the point is on. * \param distance The distance by which to move the point. * \return A point at a \p distance from the point in \p cpp orthogonal to the boundary there. @@ -279,15 +312,15 @@ class PolygonUtils * Given a \p distance more than zero, the point will end up inside, and conversely outside. * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. * When the point is in/outside by less than \p distance, \p from is moved to the correct place. - * + * * \warning May give false positives. - * Some checking is done to make sure we end up inside the polygon, + * Some checking is done to make sure we end up inside the polygon, * but it might still be the case that we end up outside: * when the closest point on the boundary is very close to another polygon - * + * * \warning When using a \p loc_to_line_grid which contains more polygons than just \p polygons, * the results is only correct if \p from is already closest to \p polygons, rather than other polygons in the \p loc_to_line_grid. - * + * * \param polygons The polygons onto which to move the point * \param from[in,out] The point to move. * \param preferred_dist_inside The preferred distance from the boundary to the point @@ -297,22 +330,29 @@ class PolygonUtils * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. * \return The point on the polygon closest to \p from */ - static ClosestPolygonPoint ensureInsideOrOutside(const Polygons& polygons, Point& from, int preferred_dist_inside, int64_t max_dist2 = std::numeric_limits::max(), const Polygons* loc_to_line_polygons = nullptr, const LocToLineGrid* loc_to_line_grid = nullptr, const std::function& penalty_function = no_penalty_function); + static ClosestPolygonPoint ensureInsideOrOutside( + const Polygons& polygons, + Point& from, + int preferred_dist_inside, + int64_t max_dist2 = std::numeric_limits::max(), + const Polygons* loc_to_line_polygons = nullptr, + const LocToLineGrid* loc_to_line_grid = nullptr, + const std::function& penalty_function = no_penalty_function); /*! * Moves the point \p from onto the nearest polygon or leaves the point as-is, when the comb boundary is not within \p distance. * Given a \p distance more than zero, the point will end up inside, and conversely outside. * When the point is already in/outside by more than \p distance, \p from is unaltered, but the polygon is returned. * When the point is in/outside by less than \p distance, \p from is moved to the correct place. - * + * * \warning May give false positives. - * Some checking is done to make sure we end up inside the polygon, + * Some checking is done to make sure we end up inside the polygon, * but it might still be the case that we end up outside: * when the closest point on the boundary is very close to another polygon - * + * * \warning When using a \p loc_to_line_grid which contains more polygons than just \p polygons, * the results is only correct if \p from is already closest to \p polygons, rather than other polygons in the \p loc_to_line_grid. - * + * * \param polygons The polygons onto which to move the point * \param from[in,out] The point to move. * \param closest_polygon_point The point on \p polygons closest to \p from @@ -322,49 +362,56 @@ class PolygonUtils * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. * \return The point on the polygon closest to \p from */ - static ClosestPolygonPoint ensureInsideOrOutside(const Polygons& polygons, Point& from, const ClosestPolygonPoint& closest_polygon_point, int preferred_dist_inside, const Polygons* loc_to_line_polygons = nullptr, const LocToLineGrid* loc_to_line_grid = nullptr, const std::function& penalty_function = no_penalty_function); + static ClosestPolygonPoint ensureInsideOrOutside( + const Polygons& polygons, + Point& from, + const ClosestPolygonPoint& closest_polygon_point, + int preferred_dist_inside, + const Polygons* loc_to_line_polygons = nullptr, + const LocToLineGrid* loc_to_line_grid = nullptr, + const std::function& penalty_function = no_penalty_function); /*! - * - * \warning Assumes \p poly1_result and \p poly2_result have their pos and poly fields initialized! - */ + * + * \warning Assumes \p poly1_result and \p poly2_result have their pos and poly fields initialized! + */ static void walkToNearestSmallestConnection(ClosestPolygonPoint& poly1_result, ClosestPolygonPoint& poly2_result); /*! - * Find the nearest closest point on a polygon from a given index. - * - * \param from The point from which to get the smallest distance. - * \param polygon The polygon on which to find the point with the smallest distance. - * \param start_idx The index of the point in the polygon from which to start looking. - * \return The nearest point from \p start_idx going along the \p polygon (in both directions) with a locally minimal distance to \p from. - */ + * Find the nearest closest point on a polygon from a given index. + * + * \param from The point from which to get the smallest distance. + * \param polygon The polygon on which to find the point with the smallest distance. + * \param start_idx The index of the point in the polygon from which to start looking. + * \return The nearest point from \p start_idx going along the \p polygon (in both directions) with a locally minimal distance to \p from. + */ static ClosestPolygonPoint findNearestClosest(Point from, ConstPolygonRef polygon, int start_idx); /*! - * Find the nearest closest point on a polygon from a given index walking in one direction along the polygon. - * - * \param from The point from which to get the smallest distance. - * \param polygon The polygon on which to find the point with the smallest distance. - * \param start_idx The index of the point in the polygon from which to start looking. - * \param direction The direction to walk: 1 for walking along the \p polygon, -1 for walking in opposite direction - * \return The nearest point from \p start_idx going along the \p polygon with a locally minimal distance to \p from. - */ + * Find the nearest closest point on a polygon from a given index walking in one direction along the polygon. + * + * \param from The point from which to get the smallest distance. + * \param polygon The polygon on which to find the point with the smallest distance. + * \param start_idx The index of the point in the polygon from which to start looking. + * \param direction The direction to walk: 1 for walking along the \p polygon, -1 for walking in opposite direction + * \return The nearest point from \p start_idx going along the \p polygon with a locally minimal distance to \p from. + */ static ClosestPolygonPoint findNearestClosest(const Point from, ConstPolygonRef polygon, int start_idx, int direction); /*! * Find the point closest to \p from in all polygons in \p polygons. - * + * * \note The penalty term is applied to the *squared* distance score - * + * * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. */ static ClosestPolygonPoint findClosest(Point from, const Polygons& polygons, const std::function& penalty_function = no_penalty_function); - + /*! * Find the point closest to \p from in the polygon \p polygon. - * + * * \note The penalty term is applied to the *squared* distance score - * + * * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. */ static ClosestPolygonPoint findClosest(Point from, ConstPolygonRef polygon, const std::function& penalty_function = no_penalty_function); @@ -387,9 +434,9 @@ class PolygonUtils /*! * Create a SparsePointGridInclusive mapping from locations to line segments occurring in the \p polygons - * + * * \warning The caller of this function is responsible for deleting the returned object - * + * * \param polygons The polygons for which to create the mapping * \param square_size The cell size used to bundle line segments (also used to chop up lines so that multiple cells contain the same long line) * \return A bucket grid mapping spatial locations to poly-point indices into \p polygons @@ -398,57 +445,63 @@ class PolygonUtils /*! * Find the line segment closest to a given point \p from within a cell-block of a size defined in the SparsePointGridInclusive \p loc_to_line - * + * * \note The penalty term is applied to the *squared* distance score. * Note also that almost only nearby points are considered even when the penalty function would favour points farther away. - * + * * \param from The location to find a polygon edge close to * \param polygons The polygons for which the \p loc_to_line has been built up - * \param loc_to_line A SparsePointGridInclusive mapping locations to starting vertices of line segmetns of the \p polygons + * \param loc_to_line A SparsePointGridInclusive mapping locations to starting vertices of line segmetns of the \p polygons * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. * \return The nearest point on the polygon if the polygon was within a distance equal to the cell_size of the SparsePointGridInclusive */ - static std::optional findClose(Point from, const Polygons& polygons, const LocToLineGrid& loc_to_line, const std::function& penalty_function = no_penalty_function); + static std::optional + findClose(Point from, const Polygons& polygons, const LocToLineGrid& loc_to_line, const std::function& penalty_function = no_penalty_function); /*! * Find the line segment closest to any point on \p from within cell-blocks of a size defined in the SparsePointGridInclusive \p destination_loc_to_line - * + * * \note The penalty term is applied to the *squared* distance score. * Note also that almost only nearby points are considered even when the penalty function would favour points farther away. - * + * * \param from The polygon for which to find a polygon edge close to * \param destination The polygons for which the \p destination_loc_to_line has been built up - * \param destination_loc_to_line A SparsePointGridInclusive mapping locations to starting vertices of line segments of the \p destination + * \param destination_loc_to_line A SparsePointGridInclusive mapping locations to starting vertices of line segments of the \p destination * \param penalty_function A function returning a penalty term on the squared distance score of a candidate point. - * \return A collection of near crossing from the \p from polygon to the \p destination polygon. Each element in the sollection is a pair with as first a cpp in the \p from polygon and as second a cpp in the \p destination polygon. + * \return A collection of near crossing from the \p from polygon to the \p destination polygon. Each element in the sollection is a pair with as first a cpp in the \p from + * polygon and as second a cpp in the \p destination polygon. */ - static std::vector> findClose(ConstPolygonRef from, const Polygons& destination, const LocToLineGrid& destination_loc_to_line, const std::function& penalty_function = no_penalty_function); + static std::vector> findClose( + ConstPolygonRef from, + const Polygons& destination, + const LocToLineGrid& destination_loc_to_line, + const std::function& penalty_function = no_penalty_function); /*! * Checks whether a given line segment collides with polygons as given in a loc_to_line grid. - * + * * If the line segment doesn't intersect with any edge of the polygon, but * merely touches it, a collision is also reported. For instance, a * collision is reported when the an endpoint of the line is exactly on the * polygon, and when the line coincides with an edge. - * + * * \param[in] from The start point * \param[in] to The end point - * \param[in] loc_to_line A SparsePointGridInclusive mapping locations to starting vertices of line segmetns of the \p polygons + * \param[in] loc_to_line A SparsePointGridInclusive mapping locations to starting vertices of line segmetns of the \p polygons * \param[out] collision_result (optional) The polygons segment intersecting with the line segment * \return whether the line segment collides with the boundary of the polygons */ static bool polygonCollidesWithLineSegment(const Point from, const Point to, const LocToLineGrid& loc_to_line, PolygonsPointIndex* collision_result = nullptr); /*! - * Find the next point (going along the direction of the polygon) with a distance \p dist from the point \p from within the \p poly. - * Returns whether another point could be found within the \p poly which can be found before encountering the point at index \p start_idx. - * The point \p from and the polygon \p poly are assumed to lie on the same plane. - * - * \param from The point from whitch to find a point on the polygon satisfying the conditions - * \param start_idx the index of the prev poly point on the poly. - * \param poly_start_idx The index of the point in the polygon which is to be handled as the start of the polygon. No point further than this point will be the result. - */ + * Find the next point (going along the direction of the polygon) with a distance \p dist from the point \p from within the \p poly. + * Returns whether another point could be found within the \p poly which can be found before encountering the point at index \p start_idx. + * The point \p from and the polygon \p poly are assumed to lie on the same plane. + * + * \param from The point from whitch to find a point on the polygon satisfying the conditions + * \param start_idx the index of the prev poly point on the poly. + * \param poly_start_idx The index of the point in the polygon which is to be handled as the start of the polygon. No point further than this point will be the result. + */ static bool getNextPointWithDistance(Point from, int64_t dist, ConstPolygonRef poly, int start_idx, int poly_start_idx, GivenDistPoint& result); /*! @@ -458,10 +511,10 @@ class PolygonUtils /*! * Get the point on a polygon which intersects a line parallel to a line going through the starting point and through another point. - * + * * Note that the looking direction \p forward doesn't neccesarily determine on which side of the line we cross a parallel line. * Depending on the geometry of the polygon the next intersection may be left or right of the input line. - * + * * \param start The starting point of the search and the starting point of the line * \param line_to The end point of the line * \param dist The distance from the parallel line to the line defined by the previous two parameters @@ -474,12 +527,12 @@ class PolygonUtils * Checks whether a given line segment collides with a given polygon(s). * The transformed_startPoint and transformed_endPoint should have the same * Y coordinate. - * + * * If the line segment doesn't intersect with any edge of the polygon, but * merely touches it, a collision is also reported. For instance, a * collision is reported when the an endpoint of the line is exactly on the * polygon, and when the line coincides with an edge. - * + * * \param poly The polygon * \param transformed_startPoint The start point transformed such that it is * on the same horizontal line as the end point @@ -494,12 +547,12 @@ class PolygonUtils /*! * Checks whether a given line segment collides with a given polygon(s). - * + * * If the line segment doesn't intersect with any edge of the polygon, but * merely touches it, a collision is also reported. For instance, a * collision is reported when the an endpoint of the line is exactly on the * polygon, and when the line coincides with an edge. - * + * * \param poly The polygon * \param startPoint The start point * \param endPoint The end point @@ -512,12 +565,12 @@ class PolygonUtils * Checks whether a given line segment collides with a given polygon(s). * The transformed_startPoint and transformed_endPoint should have the same * Y coordinate. - * + * * If the line segment doesn't intersect with any edge of the polygon, but * merely touches it, a collision is also reported. For instance, a * collision is reported when the an endpoint of the line is exactly on the * polygon, and when the line coincides with an edge. - * + * * \param poly The polygon * \param transformed_startPoint The start point transformed such that it is * on the same horizontal line as the end point @@ -532,12 +585,12 @@ class PolygonUtils /*! * Checks whether a given line segment collides with a given polygon(s). - * + * * If the line segment doesn't intersect with any edge of the polygon, but * merely touches it, a collision is also reported. For instance, a * collision is reported when the an endpoint of the line is exactly on the * polygon, and when the line coincides with an edge. - * + * * \param poly The polygon * \param startPoint The start point * \param endPoint The end point @@ -573,7 +626,11 @@ class PolygonUtils * \param[in] possible_adjacent_polys The vector of polygons we are testing. * \param[in] max_gap Polygons must be closer together than this distance to be considered adjacent. */ - static void findAdjacentPolygons(std::vector& adjacent_poly_indices, const ConstPolygonRef& poly, const std::vector& possible_adjacent_polys, const coord_t max_gap); + static void findAdjacentPolygons( + std::vector& adjacent_poly_indices, + const ConstPolygonRef& poly, + const std::vector& possible_adjacent_polys, + const coord_t max_gap); /*! * Calculate the Hamming Distance between two polygons relative to their own @@ -619,10 +676,31 @@ class PolygonUtils */ static Polygons clipPolygonWithAABB(const Polygons& src, const AABB& aabb); + /*! + * Generate a few outset polygons around the given base, according to the given line width + * + * \param inner_poly The inner polygon to start generating the outset from + * \param count The number of outer polygons to add + * \param line_width The actual line width to distance the polygons from each other (and from the base) + * \return The generated outset polygons + */ + static Polygons generateOutset(const Polygons& inner_poly, size_t count, coord_t line_width); + + /*! + * Generate inset polygons inside the given base, until there is no space left, according to the given line width + * + * \param outer_poly The outer polygon to start generating the inset from + * \param line_width The actual line width to distance the polygons from each other (and from the base) + * \param initial_inset The inset distance to be added to the first generated polygon + * \return The generated inset polygons + */ + static Polygons generateInset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset = 0); + private: /*! - * Helper function for PolygonUtils::moveInside2: moves a point \p from which was moved onto \p closest_polygon_point towards inside/outside when it's not already inside/outside by enough distance. - * + * Helper function for PolygonUtils::moveInside2: moves a point \p from which was moved onto \p closest_polygon_point towards inside/outside when it's not already + * inside/outside by enough distance. + * * \param closest_polygon_point The ClosestPolygonPoint we have to move inside * \param distance The distance by which to move the point. * \param from[in,out] The point to move. @@ -633,6 +711,6 @@ class PolygonUtils }; -}//namespace cura +} // namespace cura -#endif//POLYGON_OPTIMIZER_H +#endif // POLYGON_OPTIMIZER_H diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index a9c1461cf1..7374d836a7 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -111,37 +111,6 @@ void PrimeTower::generatePaths(const SliceDataStorage& storage) } } -PrimeTower::ExtrusionMoves PrimeTower::generatePaths_base(const Polygons& inset, size_t rings, coord_t line_width) -{ - ExtrusionMoves pattern; - - Polygons path = inset.offset(line_width / 2); - for (size_t ring = 0; ring < rings; ++ring) - { - pattern.polygons.add(path); - path = path.offset(line_width); - } - - return pattern; -} - -PrimeTower::ExtrusionMoves PrimeTower::generatePaths_inset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset) -{ - const Scene& scene = Application::getInstance().current_slice->scene; - const Settings& mesh_group_settings = scene.current_mesh_group->settings; - - ExtrusionMoves pattern; - - Polygons inset = outer_poly.offset(-(initial_inset + line_width / 2)); - while (! inset.empty()) - { - pattern.polygons.add(inset); - inset = inset.offset(-line_width); - } - - return pattern; -} - void PrimeTower::generatePaths_denseInfill() { const Scene& scene = Application::getInstance().current_slice->scene; @@ -164,7 +133,7 @@ void PrimeTower::generatePaths_denseInfill() const coord_t required_volume = MM3_2INT(scene.extruders[extruder_nr].settings.get("prime_tower_min_volume")); const Ratio flow = scene.extruders[extruder_nr].settings.get("prime_tower_flow"); coord_t current_volume = 0; - ExtrusionMoves& pattern = prime_moves[extruder_nr]; + Polygons& pattern = prime_moves[extruder_nr]; // Create the walls of the prime tower. unsigned int wall_nr = 0; @@ -172,7 +141,7 @@ void PrimeTower::generatePaths_denseInfill() { // Create a new polygon with an offset from the outer polygon. Polygons polygons = outer_poly.offset(-cumulative_inset - wall_nr * line_width - line_width / 2); - pattern.polygons.add(polygons); + pattern.add(polygons); current_volume += polygons.polygonLength() * line_width * layer_height * flow; if (polygons.empty()) // Don't continue. We won't ever reach the required volume because it doesn't fit. { @@ -195,7 +164,7 @@ void PrimeTower::generatePaths_denseInfill() extra_radius = line_width * extra_rings; outer_poly_base.push_back(outer_poly.offset(extra_radius)); - base_extra_moves[extruder_nr].push_back(generatePaths_base(outer_poly, extra_rings, line_width)); + base_extra_moves[extruder_nr].push_back(PolygonUtils::generateOutset(outer_poly, extra_rings, line_width)); } } @@ -204,8 +173,8 @@ void PrimeTower::generatePaths_denseInfill() // Only the most inside extruder needs to fill the inside of the prime tower if (extruder_nr == extruder_order.back()) { - ExtrusionMoves pattern = generatePaths_inset(outer_poly, line_width, cumulative_inset); - if (! pattern.polygons.empty() || ! pattern.lines.empty()) + Polygons pattern = PolygonUtils::generateInset(outer_poly, line_width, cumulative_inset); + if (! pattern.empty()) { base_extra_moves[extruder_nr].push_back(pattern); } @@ -280,19 +249,17 @@ void PrimeTower::addToGcode_denseInfill(LayerPlan& gcode_layer, const size_t ext { // Actual prime pattern const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - const ExtrusionMoves& pattern = prime_moves[extruder_nr]; - gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); - gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + const Polygons& pattern = prime_moves[extruder_nr]; + gcode_layer.addPolygonsByOptimizer(pattern, config); } - const std::vector& pattern_extra_brim = base_extra_moves[extruder_nr]; + const std::vector& pattern_extra_brim = base_extra_moves[extruder_nr]; if (absolute_layer_number < pattern_extra_brim.size()) { // Extra rings for stronger base const GCodePathConfig& config = gcode_layer.configs_storage.prime_tower_config_per_extruder[extruder_nr]; - const ExtrusionMoves& pattern = pattern_extra_brim[absolute_layer_number]; - gcode_layer.addPolygonsByOptimizer(pattern.polygons, config); - gcode_layer.addLinesByOptimizer(pattern.lines, config, SpaceFillType::Lines); + const Polygons& pattern = pattern_extra_brim[absolute_layer_number]; + gcode_layer.addPolygonsByOptimizer(pattern, config); } } diff --git a/src/utils/polygonUtils.cpp b/src/utils/polygonUtils.cpp index 0a8f627d53..d1f4debe21 100644 --- a/src/utils/polygonUtils.cpp +++ b/src/utils/polygonUtils.cpp @@ -3,22 +3,22 @@ #include "utils/polygonUtils.h" -#include "infill.h" -#include "utils/SparsePointGridInclusive.h" -#include "utils/linearAlg2D.h" - -#include - #include #include #include #include +#include + +#include "infill.h" +#include "utils/SparsePointGridInclusive.h" +#include "utils/linearAlg2D.h" + #ifdef DEBUG +#include + #include "utils/AABB.h" #include "utils/SVG.h" - -#include #endif namespace cura @@ -1607,4 +1607,32 @@ Polygons PolygonUtils::clipPolygonWithAABB(const Polygons& src, const AABB& aabb return out; } +Polygons PolygonUtils::generateOutset(const Polygons& inner_poly, size_t count, coord_t line_width) +{ + Polygons outset; + + Polygons current_outset; + for (size_t index = 0; index < count; ++index) + { + current_outset = index == 0 ? inner_poly.offset(line_width / 2) : current_outset.offset(line_width); + outset.add(current_outset); + } + + return outset; +} + +Polygons PolygonUtils::generateInset(const Polygons& outer_poly, coord_t line_width, coord_t initial_inset) +{ + Polygons inset; + + Polygons current_inset = outer_poly.offset(-(initial_inset + line_width / 2)); + while (! current_inset.empty()) + { + inset.add(current_inset); + current_inset = current_inset.offset(-line_width); + } + + return inset; +} + } // namespace cura From 3a7f8c336f7317075870e85d0af0962be72b96ae Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 23 Oct 2023 11:26:39 +0200 Subject: [PATCH 413/470] Moved target machine name to end of header CURA-11158 --- src/gcodeExport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index caff200811..2ef08a0474 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -266,7 +266,6 @@ std::string GCodeExport::getFileHeader( break; default: prefix << ";FLAVOR:" << flavorToString(flavor) << new_line; - prefix << ";TARGET_MACHINE.NAME:" << transliterate(machine_name) << new_line; prefix << ";TIME:" << ((print_time) ? static_cast(*print_time) : 6666) << new_line; if (flavor == EGCodeFlavor::ULTIGCODE) { @@ -309,6 +308,7 @@ std::string GCodeExport::getFileHeader( prefix << ";MAXX:" << INT2MM(total_bounding_box.max.x) << new_line; prefix << ";MAXY:" << INT2MM(total_bounding_box.max.y) << new_line; prefix << ";MAXZ:" << INT2MM(total_bounding_box.max.z) << new_line; + prefix << ";TARGET_MACHINE.NAME:" << transliterate(machine_name) << new_line; } return prefix.str(); From 21ee7634cb7293337d3d1d0239d3b91a96863c3c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 23 Oct 2023 11:32:35 +0200 Subject: [PATCH 414/470] Update unit-tests accordingly CURA-11158 --- tests/GCodeExportTest.cpp | 66 ++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/tests/GCodeExportTest.cpp b/tests/GCodeExportTest.cpp index 134a48b503..3fb07c9be9 100644 --- a/tests/GCodeExportTest.cpp +++ b/tests/GCodeExportTest.cpp @@ -2,6 +2,7 @@ // CuraEngine is released under the terms of the AGPLv3 or higher #include "gcodeExport.h" // The unit under test. + #include "Application.h" // To set up a slice with settings. #include "RetractionConfig.h" // For extruder switch tests. #include "Slice.h" // To set up a slice with settings. @@ -9,6 +10,7 @@ #include "arcus/MockCommunication.h" // To prevent calls to any missing Communication class. #include "utils/Coord_t.h" #include "utils/Date.h" // To check the Griffin header. + #include // NOLINTBEGIN(*-magic-numbers) @@ -101,12 +103,13 @@ TEST_F(GCodeExportTest, CommentMultiLine) "You can honestly say\n" "You made on that day\n" "A Chilean chinchilla's chin chilly"); - EXPECT_EQ(std::string(";If you catch a chinchilla in Chile\n" - ";And cut off its beard, willy-nilly\n" - ";You can honestly say\n" - ";You made on that day\n" - ";A Chilean chinchilla's chin chilly\n"), - output.str()) + EXPECT_EQ( + std::string(";If you catch a chinchilla in Chile\n" + ";And cut off its beard, willy-nilly\n" + ";You can honestly say\n" + ";You made on that day\n" + ";A Chilean chinchilla's chin chilly\n"), + output.str()) << "Each line must be preceded by a semicolon."; } @@ -115,10 +118,11 @@ TEST_F(GCodeExportTest, CommentMultiple) gcode.writeComment("Thunderbolt and lightning"); gcode.writeComment("Very very frightening me"); gcode.writeComment(" - Galileo (1638)"); - EXPECT_EQ(std::string(";Thunderbolt and lightning\n" - ";Very very frightening me\n" - "; - Galileo (1638)\n"), - output.str()) + EXPECT_EQ( + std::string(";Thunderbolt and lightning\n" + ";Very very frightening me\n" + "; - Galileo (1638)\n"), + output.str()) << "Semicolon before each line, and newline in between."; } @@ -328,9 +332,10 @@ TEST_F(GCodeExportTest, HeaderUltiGCode) std::string result = gcode.getFileHeader(extruder_is_used, &print_time, filament_used); - EXPECT_EQ(result, - ";FLAVOR:UltiGCode\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n;TIME:1337\n;MATERIAL:100\n;MATERIAL2:200\n;NOZZLE_DIAMETER:0.4\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;" - "MAXY:1\n;MAXZ:1\n"); + EXPECT_EQ( + result, + ";FLAVOR:UltiGCode\n;TIME:1337\n;MATERIAL:100\n;MATERIAL2:200\n;NOZZLE_DIAMETER:0.4\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;" + "MAXY:1\n;MAXZ:1\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n"); } TEST_F(GCodeExportTest, HeaderRepRap) @@ -347,9 +352,10 @@ TEST_F(GCodeExportTest, HeaderRepRap) std::string result = gcode.getFileHeader(extruder_is_used, &print_time, filament_used); - EXPECT_EQ(result, - ";FLAVOR:RepRap\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n;TIME:1337\n;Filament used: 0.02m, 0.05m\n;Layer height: " - "0.123\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;MAXY:1\n;MAXZ:1\n"); + EXPECT_EQ( + result, + ";FLAVOR:RepRap\n;TIME:1337\n;Filament used: 0.02m, 0.05m\n;Layer height: " + "0.123\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;MAXY:1\n;MAXZ:1\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n"); } TEST_F(GCodeExportTest, HeaderMarlin) @@ -366,9 +372,10 @@ TEST_F(GCodeExportTest, HeaderMarlin) std::string result = gcode.getFileHeader(extruder_is_used, &print_time, filament_used); - EXPECT_EQ(result, - ";FLAVOR:Marlin\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n;TIME:1337\n;Filament used: 0.02m, 0.05m\n;Layer height: " - "0.123\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;MAXY:1\n;MAXZ:1\n"); + EXPECT_EQ( + result, + ";FLAVOR:Marlin\n;TIME:1337\n;Filament used: 0.02m, 0.05m\n;Layer height: " + "0.123\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;MAXY:1\n;MAXZ:1\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n"); } TEST_F(GCodeExportTest, HeaderMarlinVolumetric) @@ -383,9 +390,10 @@ TEST_F(GCodeExportTest, HeaderMarlinVolumetric) std::string result = gcode.getFileHeader(extruder_is_used, &print_time, filament_used); - EXPECT_EQ(result, - ";FLAVOR:Marlin(Volumetric)\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n;TIME:1337\n;Filament used: 100mm3, 200mm3\n;Layer height: " - "0.123\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;MAXY:1\n;MAXZ:1\n"); + EXPECT_EQ( + result, + ";FLAVOR:Marlin(Volumetric)\n;TIME:1337\n;Filament used: 100mm3, 200mm3\n;Layer height: " + "0.123\n;MINX:0\n;MINY:0\n;MINZ:0\n;MAXX:1\n;MAXY:1\n;MAXZ:1\n;TARGET_MACHINE.NAME:Your favourite 3D printer\n"); } /* @@ -405,8 +413,9 @@ TEST_F(GCodeExportTest, EVsMmVolumetric) "area of the filament to convert the volume to a length."; constexpr double mm_input = 33.0; - EXPECT_EQ(gcode.mmToE(mm_input), mm_input * filament_area) << "Since the input mm is linear but the E output must be volumetric, we need to multiply by the cross-sectional area to convert " - "length to volume."; + EXPECT_EQ(gcode.mmToE(mm_input), mm_input * filament_area) + << "Since the input mm is linear but the E output must be volumetric, we need to multiply by the cross-sectional area to convert " + "length to volume."; constexpr double e_input = 100.0; EXPECT_EQ(gcode.eToMm3(e_input, 0), e_input) << "Since the E is volumetric and mm3 is also volumetric, the output needs to be the same."; @@ -431,8 +440,9 @@ TEST_F(GCodeExportTest, EVsMmLinear) } constexpr double mm3_input = 33.0; - EXPECT_EQ(gcode.mm3ToE(mm3_input), mm3_input / filament_area) << "Since the input mm3 is volumetric but the E output must be linear, we need to divide by the cross-sectional area to convert " - "volume to length."; + EXPECT_EQ(gcode.mm3ToE(mm3_input), mm3_input / filament_area) + << "Since the input mm3 is volumetric but the E output must be linear, we need to divide by the cross-sectional area to convert " + "volume to length."; constexpr double e_input = 100.0; EXPECT_EQ(gcode.eToMm3(e_input, 0), e_input * filament_area) << "Since the input E is linear but the output must be volumetric, we " @@ -492,7 +502,7 @@ TEST_F(GCodeExportTest, WriteZHopStartCustomSpeed) Application::getInstance().current_slice->scene.extruders[gcode.current_extruder].settings.add("speed_z_hop", "1"); // 60mm/min. gcode.current_layer_z = 2000; constexpr coord_t hop_height = 3000; - constexpr Velocity speed { 4.0 }; // 240 mm/min. + constexpr Velocity speed{ 4.0 }; // 240 mm/min. gcode.writeZhopStart(hop_height, speed); EXPECT_EQ(std::string("G1 F240 Z5\n"), output.str()) << "Custom provided speed should be used."; } @@ -520,7 +530,7 @@ TEST_F(GCodeExportTest, WriteZHopEndCustomSpeed) Application::getInstance().current_slice->scene.extruders[gcode.current_extruder].settings.add("speed_z_hop", "1"); gcode.current_layer_z = 2000; gcode.is_z_hopped = 3000; - constexpr Velocity speed { 4.0 }; // 240 mm/min. + constexpr Velocity speed{ 4.0 }; // 240 mm/min. gcode.writeZhopEnd(speed); EXPECT_EQ(std::string("G1 F240 Z2\n"), output.str()) << "Custom provided speed should be used."; } From 7bc776566b8272796e04d5a363d8c5f4d75950b7 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 23 Oct 2023 18:12:59 +0200 Subject: [PATCH 415/470] Extruder is explicitely set for evry part of raft. CURA-11205 --- src/FffGcodeWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 777bf12978..ec0e28c326 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -725,6 +725,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) gcode_layer.setIsInside(true); current_extruder_nr = interface_extruder_nr; + gcode_layer.setExtruder(current_extruder_nr); Application::getInstance().communication->sendLayerComplete(layer_nr, z, interface_layer_height); @@ -829,7 +830,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) // make sure that we are using the correct extruder to print raft current_extruder_nr = surface_extruder_nr; - + gcode_layer.setExtruder(current_extruder_nr); Application::getInstance().communication->sendLayerComplete(layer_nr, z, surface_layer_height); std::vector raft_outline_paths; From f11ed7c34c52cea64c804cada44b4d8533ed2caf Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 24 Oct 2023 16:23:07 +0200 Subject: [PATCH 416/470] Base curve magnitude is now a float CURA-10783 --- src/PrimeTower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 7374d836a7..3883822adc 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -120,7 +120,7 @@ void PrimeTower::generatePaths_denseInfill() const coord_t base_extra_radius = scene.settings.get("prime_tower_base_size"); const bool has_raft = mesh_group_settings.get("adhesion_type") == EPlatformAdhesion::RAFT; const coord_t base_height = std::max(scene.settings.get("prime_tower_base_height"), has_raft ? layer_height : 0); - const int base_curve_magnitude = mesh_group_settings.get("prime_tower_base_curve_magnitude"); + const double base_curve_magnitude = mesh_group_settings.get("prime_tower_base_curve_magnitude"); const coord_t line_width = scene.extruders[extruder_order.front()].settings.get("prime_tower_line_width"); prime_moves.resize(extruder_count); From e78f42c19bb46e314432f3e074dbdfa0e7f03976 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Tue, 24 Oct 2023 22:14:11 +0200 Subject: [PATCH 417/470] Fix slice in fractional support The code was attempting to access an index that was out of bounds of the array. Add guards to prevent this access. CURA-11041 --- src/support.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support.cpp b/src/support.cpp index a0b049fe04..09a8fb1de3 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -1809,7 +1809,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh Polygons roofs; generateSupportInterfaceLayer(global_support_areas_per_layer[layer_idx], mesh_outlines, roof_line_width, roof_outline_offset, minimum_roof_area, roofs); support_layers[layer_idx].support_roof.add(roofs); - if (layer_idx > 0) + if (layer_idx > 0 && layer_idx < support_layers.size() - 1) { support_layers[layer_idx].support_fractional_roof.add(roofs.difference(support_layers[layer_idx + 1].support_roof)); } From 131cae1f4a49d0ec4086bbae90659492b62be671 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 24 Oct 2023 20:14:53 +0000 Subject: [PATCH 418/470] Applied clang-format. --- src/sliceDataStorage.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 61c6ff1689..b178075a26 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -705,10 +705,17 @@ void SupportLayer::excludeAreasFromSupportInfillAreas(const Polygons& exclude_po } } -void SupportLayer::fillInfillParts(const LayerIndex layer_nr, const std::vector& support_fill_per_layer, const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above /*has default 0*/, const bool unionAll /*has default false*/) +void SupportLayer::fillInfillParts( + const LayerIndex layer_nr, + const std::vector& support_fill_per_layer, + const coord_t support_line_width, + const coord_t wall_line_count, + const coord_t grow_layer_above /*has default 0*/, + const bool unionAll /*has default false*/) { const Polygons& support_this_layer = support_fill_per_layer[layer_nr]; - const Polygons& support_layer_above = (layer_nr + 1) >= support_fill_per_layer.size() || layer_nr <= 0 ? Polygons() : support_fill_per_layer[layer_nr + 1].offset(grow_layer_above); + const Polygons& support_layer_above + = (layer_nr + 1) >= support_fill_per_layer.size() || layer_nr <= 0 ? Polygons() : support_fill_per_layer[layer_nr + 1].offset(grow_layer_above); const auto all_support_areas_in_layer = { support_this_layer.difference(support_layer_above), support_this_layer.intersection(support_layer_above) }; bool use_fractional_config = true; for (auto& support_areas : all_support_areas_in_layer) From 3493ae63097e8fe9a0f4664a2df07818633c704a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 25 Oct 2023 10:13:21 +0200 Subject: [PATCH 419/470] Set version to 5.5.0 Contributes to CURA-11218 --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 383f5631f9..7dc2e8b0c8 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.5.0-beta.2" + self.version = "5.5.0" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) @@ -85,7 +85,7 @@ def requirements(self): self.requires("arcus/5.3.0") self.requires("asio-grpc/2.6.0") self.requires("grpc/1.50.1") - self.requires("curaengine_grpc_definitions/(latest)@ultimaker/testing") + self.requires("curaengine_grpc_definitions/0.1.0") self.requires("clipper/6.4.2") self.requires("boost/1.82.0") self.requires("rapidjson/1.1.0") From 1609f0e97096d2877d299ce040c33e317b3e5fe7 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 25 Oct 2023 15:35:36 +0200 Subject: [PATCH 420/470] Fix possible crash --- src/LayerPlan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 70a6152eb7..254c40d06a 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -2079,7 +2079,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode) // Prevent the final travel(s) from resetting to the 'previous' layer height. gcode.setZ(final_travel_z); } - for (unsigned int point_idx = 0; point_idx < path.points.size() - 1; point_idx++) + for (size_t point_idx = 0; point_idx + 1 < path.points.size(); point_idx++) { gcode.writeTravel(path.points[point_idx], speed); } From 98fc849b147d9603e3310a7511168dcc6dc9f176 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 25 Oct 2023 22:55:51 +0200 Subject: [PATCH 421/470] (From code review.) Small refactors and add documentation. done as part of CURA-10407 --- include/GCodePathConfig.h | 2 +- include/LayerPlan.h | 7 ++++--- include/SupportInfillPart.h | 2 +- include/pathPlanning/GCodePath.h | 2 +- src/LayerPlan.cpp | 12 ++++++------ 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/GCodePathConfig.h b/include/GCodePathConfig.h index 1f0da38d60..4531b650aa 100644 --- a/include/GCodePathConfig.h +++ b/include/GCodePathConfig.h @@ -18,7 +18,7 @@ namespace cura */ struct GCodePathConfig { - coord_t z_offset{}; + coord_t z_offset{}; // wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx. coord_t custom_line_distance; - bool use_fractional_config; + bool use_fractional_config; //!< Request to use the configuration used to fill a partial layer height here, instead of the normal full layer height configuration. SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0); diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index ef59a8747d..639e67bb85 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -29,7 +29,7 @@ namespace cura */ struct GCodePath { - coord_t z_offset{}; + coord_t z_offset{}; // mesh; //!< Which mesh this path belongs to, if any. If it's not part of any mesh, the mesh should be nullptr; SpaceFillType space_fill_type{}; //!< The type of space filling of which this path is a part diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 254c40d06a..0da4344f6a 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -38,8 +38,8 @@ constexpr int MINIMUM_SQUARED_LINE_LENGTH = MINIMUM_LINE_LENGTH * MINIMUM_LINE_L GCodePath* LayerPlan::getLatestPathWithConfig( const GCodePathConfig& config, - const coord_t z_offset, const SpaceFillType space_fill_type, + const coord_t z_offset, const Ratio flow, const Ratio width_factor, const bool spiralize, @@ -329,14 +329,14 @@ std::optional> LayerPlan::getFirstTravelDestinationState( return ret; } -GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract, const coord_t z_offset) +GCodePath& LayerPlan::addTravel(const Point& p, const bool force_retract, const coord_t z_offset) { const GCodePathConfig& travel_config = configs_storage.travel_config_per_extruder[getExtruder()]; const RetractionConfig& retraction_config = current_mesh ? current_mesh->retraction_wipe_config.retraction_config : storage.retraction_wipe_config_per_extruder[getExtruder()].retraction_config; - GCodePath* path = getLatestPathWithConfig(travel_config, z_offset, SpaceFillType::None); + GCodePath* path = getLatestPathWithConfig(travel_config, SpaceFillType::None, z_offset); bool combed = false; @@ -481,7 +481,7 @@ GCodePath& LayerPlan::addTravel(const Point p, const bool force_retract, const c return ret; } -GCodePath& LayerPlan::addTravel_simple(const Point p, GCodePath* path) +GCodePath& LayerPlan::addTravel_simple(const Point& p, GCodePath* path) { bool is_first_travel_of_layer = ! static_cast(last_planned_position); if (is_first_travel_of_layer) @@ -491,7 +491,7 @@ GCodePath& LayerPlan::addTravel_simple(const Point p, GCodePath* path) } if (path == nullptr) { - path = getLatestPathWithConfig(configs_storage.travel_config_per_extruder[getExtruder()], 0, SpaceFillType::None); + path = getLatestPathWithConfig(configs_storage.travel_config_per_extruder[getExtruder()], SpaceFillType::None); } path->points.push_back(p); last_planned_position = p; @@ -518,7 +518,7 @@ void LayerPlan::addExtrusionMove( const Ratio speed_factor, const double fan_speed) { - GCodePath* path = getLatestPathWithConfig(config, config.z_offset, space_fill_type, flow, width_factor, spiralize, speed_factor); + GCodePath* path = getLatestPathWithConfig(config, space_fill_type, config.z_offset, flow, width_factor, spiralize, speed_factor); path->points.push_back(p); path->setFanSpeed(fan_speed); if (! static_cast(first_extrusion_acc_jerk)) From 78fcc88b5518e42750e8fcb0567d3fdf37f4ae7d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 25 Oct 2023 23:21:40 +0200 Subject: [PATCH 422/470] Correct for support-gap equal to exact layer-height multiple. part of CURA-10407 --- src/FffGcodeWriter.cpp | 4 ++-- src/support.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 9ea700bb36..58424f79fb 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2289,7 +2289,7 @@ bool FffGcodeWriter::processInsets( if (mesh_group_settings.get("support_enable")) { const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height); // Previously '... +1', but now there is an extra fractional layer on top. + const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + (z_distance_top % layer_height == 0) ? 1 : 0; const int support_layer_nr = gcode_layer.getLayerNr() - z_distance_top_layers; if (support_layer_nr > 0) @@ -2693,7 +2693,7 @@ void FffGcodeWriter::processTopBottom( { const coord_t layer_height = mesh_config.inset0_config.getLayerThickness(); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height); // Previously '... +1', but now there is an extra fractional layer on top. + const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + (z_distance_top % layer_height == 0) ? 1 : 0; support_layer_nr = layer_nr - z_distance_top_layers; } diff --git a/src/support.cpp b/src/support.cpp index 09a8fb1de3..4f57ce44ee 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -785,7 +785,7 @@ void AreaSupport::generateOverhangAreasForMesh(SliceDataStorage& storage, SliceM // Don't generate overhang areas if the Z distance is higher than the objects we're generating support for. const coord_t layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height); // Previously '... +1', but now there is an extra fractional layer on top. + const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + (z_distance_top % layer_height == 0) ? 1 : 0; if (z_distance_top_layers + 1 > storage.print_layer_count) { return; @@ -1050,7 +1050,7 @@ void AreaSupport::generateSupportAreasForMesh( // early out const coord_t layer_thickness = mesh_group_settings.get("layer_height"); const coord_t z_distance_top = ((mesh.settings.get("support_roof_enable")) ? roof_settings : infill_settings).get("support_top_distance"); - const size_t layer_z_distance_top = round_up_divide(z_distance_top, layer_thickness); // Previously '... +1', but now there is an extra fractional layer on top. + const size_t layer_z_distance_top = round_up_divide(z_distance_top, layer_thickness) + (z_distance_top % layer_thickness == 0) ? 1 : 0; if (layer_z_distance_top + 1 > layer_count) { return; From 54edc02f5e7458738a7a712eee91cd4aa11d61ba Mon Sep 17 00:00:00 2001 From: rburema Date: Wed, 25 Oct 2023 21:22:30 +0000 Subject: [PATCH 423/470] Applied clang-format. --- include/FffGcodeWriter.h | 6 +++--- include/SupportInfillPart.h | 4 ++-- include/pathPlanning/GCodePath.h | 6 +++--- include/settings/PathConfigStorage.h | 4 ++-- src/LayerPlan.cpp | 18 ++++++++--------- src/TreeSupport.cpp | 28 +++++++++++++------------- src/TreeSupportTipGenerator.cpp | 22 ++++++++++---------- src/support.cpp | 30 ++++++++++++++-------------- 8 files changed, 59 insertions(+), 59 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index e46f2b471c..7e5908e136 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -4,6 +4,9 @@ #ifndef GCODE_WRITER_H #define GCODE_WRITER_H +#include +#include + #include "FanSpeedLayerTime.h" #include "LayerPlanBuffer.h" #include "gcodeExport.h" @@ -12,9 +15,6 @@ #include "utils/ExtrusionLine.h" //Processing variable-width paths. #include "utils/NoCopy.h" -#include -#include - namespace cura { diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 70de71aecc..1767847cb7 100644 --- a/include/SupportInfillPart.h +++ b/include/SupportInfillPart.h @@ -4,12 +4,12 @@ #ifndef SUPPORT_INFILL_PART_H #define SUPPORT_INFILL_PART_H +#include + #include "utils/AABB.h" #include "utils/ExtrusionLine.h" #include "utils/polygon.h" -#include - namespace cura { diff --git a/include/pathPlanning/GCodePath.h b/include/pathPlanning/GCodePath.h index 639e67bb85..da4efd30aa 100644 --- a/include/pathPlanning/GCodePath.h +++ b/include/pathPlanning/GCodePath.h @@ -4,6 +4,9 @@ #ifndef PATH_PLANNING_G_CODE_PATH_H #define PATH_PLANNING_G_CODE_PATH_H +#include +#include + #include "GCodePathConfig.h" #include "SpaceFillType.h" #include "TimeMaterialEstimates.h" @@ -11,9 +14,6 @@ #include "sliceDataStorage.h" #include "utils/IntPoint.h" -#include -#include - namespace cura { diff --git a/include/settings/PathConfigStorage.h b/include/settings/PathConfigStorage.h index 4ba5bf2837..feafea23bf 100644 --- a/include/settings/PathConfigStorage.h +++ b/include/settings/PathConfigStorage.h @@ -4,14 +4,14 @@ #ifndef SETTINGS_PATH_CONFIGS_H #define SETTINGS_PATH_CONFIGS_H +#include + #include "GCodePathConfig.h" #include "pathPlanning/SpeedDerivatives.h" #include "settings/MeshPathConfigs.h" #include "settings/types/LayerIndex.h" #include "utils/Coord_t.h" -#include - namespace cura { diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index 0da4344f6a..52305a9521 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -3,6 +3,15 @@ #include "LayerPlan.h" +#include +#include +#include +#include + +#include +#include +#include + #include "Application.h" //To communicate layer view data. #include "ExtruderTrain.h" #include "PathOrderMonotonic.h" //Monotonic ordering of skin lines. @@ -20,15 +29,6 @@ #include "utils/polygonUtils.h" #include "utils/section_type.h" -#include -#include -#include - -#include -#include -#include -#include - namespace cura { diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 9ce458d7f7..bf876ec582 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -3,6 +3,20 @@ #include "TreeSupport.h" +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + #include "Application.h" //To get settings. #include "TreeSupportTipGenerator.h" #include "TreeSupportUtils.h" @@ -18,20 +32,6 @@ #include "utils/polygonUtils.h" //For moveInside. #include "utils/section_type.h" -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - namespace cura { diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index d362052739..094a819544 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -3,6 +3,17 @@ #include "TreeSupportTipGenerator.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include + #include "Application.h" //To get settings. #include "TreeSupportUtils.h" #include "infill/SierpinskiFillProvider.h" @@ -13,17 +24,6 @@ #include "utils/math.h" //For round_up_divide and PI. #include "utils/polygonUtils.h" //For moveInside. -#include -#include -#include -#include -#include - -#include -#include -#include -#include - namespace cura { diff --git a/src/support.cpp b/src/support.cpp index 4f57ce44ee..1a641c208e 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -3,6 +3,21 @@ #include "support.h" +#include // sqrt, round +#include +#include // ifstream.good() +#include // pair + +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "Application.h" //To get settings. #include "BoostInterface.hpp" #include "ExtruderTrain.h" @@ -24,21 +39,6 @@ #include "utils/math.h" #include "utils/views/get.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include // sqrt, round -#include -#include // ifstream.good() -#include // pair - namespace cura { From 4a09451702b7c130583719067da49b6981fbf3ef Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 26 Oct 2023 14:35:54 +0200 Subject: [PATCH 424/470] Really correct support z-gap for all heights now hopefully. part of CURA-10407 --- src/FffGcodeWriter.cpp | 4 ++-- src/support.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 58424f79fb..4605960d39 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2289,7 +2289,7 @@ bool FffGcodeWriter::processInsets( if (mesh_group_settings.get("support_enable")) { const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + (z_distance_top % layer_height == 0) ? 1 : 0; + const size_t z_distance_top_layers = (z_distance_top / layer_height) + 1; const int support_layer_nr = gcode_layer.getLayerNr() - z_distance_top_layers; if (support_layer_nr > 0) @@ -2693,7 +2693,7 @@ void FffGcodeWriter::processTopBottom( { const coord_t layer_height = mesh_config.inset0_config.getLayerThickness(); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + (z_distance_top % layer_height == 0) ? 1 : 0; + const size_t z_distance_top_layers = (z_distance_top / layer_height) + 1; support_layer_nr = layer_nr - z_distance_top_layers; } diff --git a/src/support.cpp b/src/support.cpp index 1a641c208e..6bae947fa2 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -785,7 +785,7 @@ void AreaSupport::generateOverhangAreasForMesh(SliceDataStorage& storage, SliceM // Don't generate overhang areas if the Z distance is higher than the objects we're generating support for. const coord_t layer_height = Application::getInstance().current_slice->scene.current_mesh_group->settings.get("layer_height"); const coord_t z_distance_top = mesh.settings.get("support_top_distance"); - const size_t z_distance_top_layers = round_up_divide(z_distance_top, layer_height) + (z_distance_top % layer_height == 0) ? 1 : 0; + const size_t z_distance_top_layers = (z_distance_top / layer_height) + 1; if (z_distance_top_layers + 1 > storage.print_layer_count) { return; @@ -1050,7 +1050,7 @@ void AreaSupport::generateSupportAreasForMesh( // early out const coord_t layer_thickness = mesh_group_settings.get("layer_height"); const coord_t z_distance_top = ((mesh.settings.get("support_roof_enable")) ? roof_settings : infill_settings).get("support_top_distance"); - const size_t layer_z_distance_top = round_up_divide(z_distance_top, layer_thickness) + (z_distance_top % layer_thickness == 0) ? 1 : 0; + const size_t layer_z_distance_top = (z_distance_top / layer_thickness) + 1; if (layer_z_distance_top + 1 > layer_count) { return; From c35eebd528636b5e5d2214afd5868a18560d2186 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 27 Oct 2023 12:25:45 +0200 Subject: [PATCH 425/470] Handle specific prime tower raft line spacing CURA-11233 --- src/FffGcodeWriter.cpp | 129 ++++++++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 54 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index d35b38d169..44c98715dd 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -611,6 +611,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const size_t wall_line_count = base_settings.get("raft_base_wall_count"); const coord_t small_area_width = 0; // A raft never has a small region due to the large horizontal expansion. const coord_t line_spacing = base_settings.get("raft_base_line_spacing"); + const coord_t line_spacing_prime_tower = base_settings.get("prime_tower_raft_base_line_spacing"); const Point& infill_origin = Point(); constexpr bool skip_stitching = false; constexpr bool connected_zigzags = false; @@ -621,66 +622,86 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const coord_t max_resolution = base_settings.get("meshfix_maximum_resolution"); const coord_t max_deviation = base_settings.get("meshfix_maximum_deviation"); - Polygons raft_outline_path = storage.raftOutline; + struct ParameterizedRaftPath + { + coord_t line_spacing; + Polygons outline; + }; + + std::vector raft_outline_paths; + raft_outline_paths.emplace_back(ParameterizedRaftPath{ line_spacing, storage.raftOutline }); if (storage.primeTower.enabled) { - // Base layer is shared with prime tower base - raft_outline_path = raft_outline_path.unionPolygons(storage.primeTower.getOuterPoly(layer_nr)); + const Polygons& raft_outline_prime_tower = storage.primeTower.getOuterPoly(layer_nr); + if (line_spacing_prime_tower == line_spacing) + { + // Base layer is shared with prime tower base + raft_outline_paths.front().outline = raft_outline_paths.front().outline.unionPolygons(raft_outline_prime_tower); + } + else + { + // Prime tower has a different line spacing, print them separately + raft_outline_paths.front().outline = raft_outline_paths.front().outline.difference(raft_outline_prime_tower); + raft_outline_paths.emplace_back(ParameterizedRaftPath{ line_spacing_prime_tower, raft_outline_prime_tower }); + } } - Infill infill_comp( - EFillMethod::LINES, - zig_zaggify_infill, - connect_polygons, - raft_outline_path, - gcode_layer.configs_storage.raft_base_config.getLineWidth(), - line_spacing, - fill_overlap, - infill_multiplier, - fill_angle, - z, - extra_infill_shift, - max_resolution, - max_deviation, - wall_line_count, - small_area_width, - infill_origin, - skip_stitching, - fill_gaps, - connected_zigzags, - use_endpieces, - skip_some_zags, - zag_skip_count, - pocket_size); - std::vector raft_paths; - infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); - if (! raft_paths.empty()) + for (const ParameterizedRaftPath& raft_outline_path : raft_outline_paths) { - const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; - const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); - InsetOrderOptimizer wall_orderer( - *this, - storage, - gcode_layer, - base_settings, - base_extruder_nr, - config, - config, - config, - config, - retract_before_outer_wall, - wipe_dist, - wipe_dist, - base_extruder_nr, - base_extruder_nr, - z_seam_config, - raft_paths); - wall_orderer.addToLayer(); - } - gcode_layer.addLinesByOptimizer(raftLines, gcode_layer.configs_storage.raft_base_config, SpaceFillType::Lines); + Infill infill_comp( + EFillMethod::LINES, + zig_zaggify_infill, + connect_polygons, + raft_outline_path.outline, + gcode_layer.configs_storage.raft_base_config.getLineWidth(), + raft_outline_path.line_spacing, + fill_overlap, + infill_multiplier, + fill_angle, + z, + extra_infill_shift, + max_resolution, + max_deviation, + wall_line_count, + small_area_width, + infill_origin, + skip_stitching, + fill_gaps, + connected_zigzags, + use_endpieces, + skip_some_zags, + zag_skip_count, + pocket_size); + std::vector raft_paths; + infill_comp.generate(raft_paths, raft_polygons, raftLines, base_settings, layer_nr, SectionType::ADHESION); + if (! raft_paths.empty()) + { + const GCodePathConfig& config = gcode_layer.configs_storage.raft_base_config; + const ZSeamConfig z_seam_config(EZSeamType::SHORTEST, gcode_layer.getLastPlannedPositionOrStartingPosition(), EZSeamCornerPrefType::Z_SEAM_CORNER_PREF_NONE, false); + InsetOrderOptimizer wall_orderer( + *this, + storage, + gcode_layer, + base_settings, + base_extruder_nr, + config, + config, + config, + config, + retract_before_outer_wall, + wipe_dist, + wipe_dist, + base_extruder_nr, + base_extruder_nr, + z_seam_config, + raft_paths); + wall_orderer.addToLayer(); + } + gcode_layer.addLinesByOptimizer(raftLines, gcode_layer.configs_storage.raft_base_config, SpaceFillType::Lines); - raft_polygons.clear(); - raftLines.clear(); + raft_polygons.clear(); + raftLines.clear(); + } layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); From ba8d5c2eeecbf84ab0ef86b24eb938c1b5f6973c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 27 Oct 2023 15:25:27 +0200 Subject: [PATCH 426/470] Better management of extruder change during raft printing CURA-10783 --- src/FffGcodeWriter.cpp | 48 ++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index d35b38d169..3a39aed4a1 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -556,6 +556,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) const size_t base_extruder_nr = mesh_group_settings.get("raft_base_extruder_nr").extruder_nr; const size_t interface_extruder_nr = mesh_group_settings.get("raft_interface_extruder_nr").extruder_nr; const size_t surface_extruder_nr = mesh_group_settings.get("raft_surface_extruder_nr").extruder_nr; + const size_t prime_tower_extruder_nr = storage.primeTower.extruder_order.front(); coord_t z = 0; const LayerIndex initial_raft_layer_nr = -Raft::getTotalExtraLayers(); @@ -597,8 +598,6 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) = *new LayerPlan(storage, layer_nr, z, layer_height, base_extruder_nr, fan_speed_layer_time_settings_per_extruder_raft_base, comb_offset, line_width, avoid_distance); gcode_layer.setIsInside(true); - gcode_layer.setExtruder(base_extruder_nr); - Application::getInstance().communication->sendLayerComplete(layer_nr, z, layer_height); Polygons raftLines; @@ -696,6 +695,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) for (LayerIndex raft_interface_layer = 1; static_cast(raft_interface_layer) <= num_interface_layers; ++raft_interface_layer) { // raft interface layer + bool prime_tower_added_on_this_layer = ! storage.primeTower.enabled; const LayerIndex layer_nr = initial_raft_layer_nr + raft_interface_layer; z += interface_layer_height; @@ -719,10 +719,19 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) comb_offset, interface_line_width, interface_avoid_distance); - gcode_layer.setIsInside(true); - current_extruder_nr = interface_extruder_nr; - gcode_layer.setExtruder(current_extruder_nr); + if (! prime_tower_added_on_this_layer && current_extruder_nr == prime_tower_extruder_nr) + { + addPrimeTower(storage, gcode_layer, current_extruder_nr); + prime_tower_added_on_this_layer = true; + } + + gcode_layer.setIsInside(true); + if (interface_extruder_nr != current_extruder_nr) + { + setExtruder_addPrime(storage, gcode_layer, interface_extruder_nr); + current_extruder_nr = interface_extruder_nr; + } Application::getInstance().communication->sendLayerComplete(layer_nr, z, interface_layer_height); @@ -784,7 +793,11 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_polygons.clear(); raft_lines.clear(); - setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); + if (! prime_tower_added_on_this_layer) + { + setExtruder_addPrime(storage, gcode_layer, prime_tower_extruder_nr); + current_extruder_nr = prime_tower_extruder_nr; + } layer_plan_buffer.handle(gcode_layer, gcode); last_planned_position = gcode_layer.getLastPlannedPositionOrStartingPosition(); @@ -800,6 +813,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) for (LayerIndex raft_surface_layer = 1; static_cast(raft_surface_layer) <= num_surface_layers; raft_surface_layer++) { // raft surface layers + bool prime_tower_added_on_this_layer = ! storage.primeTower.enabled; const LayerIndex layer_nr = initial_raft_layer_nr + 1 + num_interface_layers + raft_surface_layer - 1; // +1: 1 base layer z += surface_layer_height; @@ -823,11 +837,21 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) comb_offset, surface_line_width, surface_avoid_distance); + + if (! prime_tower_added_on_this_layer && current_extruder_nr == prime_tower_extruder_nr) + { + addPrimeTower(storage, gcode_layer, current_extruder_nr); + prime_tower_added_on_this_layer = true; + } + gcode_layer.setIsInside(true); // make sure that we are using the correct extruder to print raft - current_extruder_nr = surface_extruder_nr; - gcode_layer.setExtruder(current_extruder_nr); + if (current_extruder_nr != surface_extruder_nr) + { + setExtruder_addPrime(storage, gcode_layer, surface_extruder_nr); + current_extruder_nr = surface_extruder_nr; + } Application::getInstance().communication->sendLayerComplete(layer_nr, z, surface_layer_height); Polygons raft_outline_path; @@ -889,7 +913,11 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) raft_polygons.clear(); raft_lines.clear(); - setExtruder_addPrime(storage, gcode_layer, storage.primeTower.extruder_order.front()); + if (! prime_tower_added_on_this_layer) + { + setExtruder_addPrime(storage, gcode_layer, prime_tower_extruder_nr); + current_extruder_nr = prime_tower_extruder_nr; + } layer_plan_buffer.handle(gcode_layer, gcode); } @@ -3620,8 +3648,6 @@ bool FffGcodeWriter::addSupportBottomsToGCode(const SliceDataStorage& storage, L void FffGcodeWriter::setExtruder_addPrime(const SliceDataStorage& storage, LayerPlan& gcode_layer, const size_t extruder_nr) const { - const size_t outermost_prime_tower_extruder = storage.primeTower.extruder_order[0]; - const size_t previous_extruder = gcode_layer.getExtruder(); const bool extruder_changed = gcode_layer.setExtruder(extruder_nr); From ea0436eef5093967832cbaec052a19c30cac132c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 31 Oct 2023 20:24:27 +0100 Subject: [PATCH 427/470] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index b498c3b84d..b3e464843a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.6.0-alpha" + self.version = "5.6.0-beta.1" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From 13a059ec1b33d7a920a3d41c477659b413511f92 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 2 Nov 2023 16:49:22 +0100 Subject: [PATCH 428/470] Detailed timing logging for layer export CURA-11255 --- include/FffGcodeWriter.h | 11 +++++-- include/LayerPlanBuffer.h | 9 +++--- include/progress/Progress.h | 46 ++++++++++++++------------ include/utils/gettime.h | 61 ++++++++++++++--------------------- src/FffGcodeWriter.cpp | 42 ++++++++++++++++-------- src/MeshGroup.cpp | 15 ++++++--- src/Scene.cpp | 13 +++++--- src/progress/Progress.cpp | 64 ++++++++++++++++++++++--------------- src/slicer.cpp | 18 +++++------ src/utils/gettime.cpp | 24 ++++++++++---- 10 files changed, 175 insertions(+), 128 deletions(-) diff --git a/include/FffGcodeWriter.h b/include/FffGcodeWriter.h index 7e5908e136..d63547692e 100644 --- a/include/FffGcodeWriter.h +++ b/include/FffGcodeWriter.h @@ -14,6 +14,7 @@ #include "settings/PathConfigStorage.h" //For the MeshPathConfigs subclass. #include "utils/ExtrusionLine.h" //Processing variable-width paths. #include "utils/NoCopy.h" +#include "utils/gettime.h" namespace cura { @@ -25,7 +26,6 @@ class SliceDataStorage; class SliceMeshStorage; class SliceLayer; class SliceLayerPart; -class TimeKeeper; /*! * Secondary stage in Fused Filament Fabrication processing: The generated polygons are used in the gcode generation. @@ -139,6 +139,13 @@ class FffGcodeWriter : public NoCopy void writeGCode(SliceDataStorage& storage, TimeKeeper& timeKeeper); private: + struct ProcessLayerResult + { + LayerPlan* layer_plan; + double total_elapsed_time; + TimeKeeper::RegisteredTimes stages_times; + }; + /*! * \brief Set the FffGcodeWriter::fan_speed_layer_time_settings by * retrieving all settings from the global/per-meshgroup settings. @@ -210,7 +217,7 @@ class FffGcodeWriter : public NoCopy * \param total_layers The total number of layers. * \return The layer plans */ - LayerPlan& processLayer(const SliceDataStorage& storage, LayerIndex layer_nr, const size_t total_layers) const; + ProcessLayerResult processLayer(const SliceDataStorage& storage, LayerIndex layer_nr, const size_t total_layers) const; /*! * This function checks whether prime blob should happen for any extruder on the first layer. diff --git a/include/LayerPlanBuffer.h b/include/LayerPlanBuffer.h index 8898137b87..2b1ce8cefc 100644 --- a/include/LayerPlanBuffer.h +++ b/include/LayerPlanBuffer.h @@ -4,6 +4,9 @@ #ifndef LAYER_PLAN_BUFFER_H #define LAYER_PLAN_BUFFER_H +#include +#include + #include "ExtruderPlan.h" #include "LayerPlan.h" #include "Preheat.h" @@ -11,9 +14,6 @@ #include "settings/Settings.h" #include "settings/types/Duration.h" -#include -#include - namespace cura { @@ -36,7 +36,6 @@ class GCodeExport; class LayerPlanBuffer { friend class LayerPlan; - friend class LayerPlanBuffer; GCodeExport& gcode; Preheat preheat_config; //!< the nozzle and material temperature settings for each extruder train. @@ -215,4 +214,4 @@ class LayerPlanBuffer } // namespace cura -#endif // LAYER_PLAN_BUFFER_H \ No newline at end of file +#endif // LAYER_PLAN_BUFFER_H diff --git a/include/progress/Progress.h b/include/progress/Progress.h index 6b9c83d532..4a513d94a2 100644 --- a/include/progress/Progress.h +++ b/include/progress/Progress.h @@ -1,58 +1,62 @@ -//Copyright (c) 2018 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2018 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef PROGRESS_H #define PROGRESS_H #include +#include "utils/gettime.h" + namespace cura { -class TimeKeeper; +struct LayerIndex; #define N_PROGRESS_STAGES 7 /*! * Class for handling the progress bar and the progress logging. - * + * * The progress bar is based on a single slicing of a rather large model which needs some complex support; * the relative timing of each stage is currently based on that of the slicing of dragon_65_tilted_large.stl */ -class Progress +class Progress { public: /*! - * The stage in the whole slicing process + * The stage in the whole slicing process */ enum class Stage : unsigned int { - START = 0, - SLICING = 1, - PARTS = 2, - INSET_SKIN = 3, - SUPPORT = 4, - EXPORT = 5, - FINISH = 6 + START = 0, + SLICING = 1, + PARTS = 2, + INSET_SKIN = 3, + SUPPORT = 4, + EXPORT = 5, + FINISH = 6 }; + private: - static double times [N_PROGRESS_STAGES]; //!< Time estimates per stage + static double times[N_PROGRESS_STAGES]; //!< Time estimates per stage static std::string names[N_PROGRESS_STAGES]; //!< name of each stage - static double accumulated_times [N_PROGRESS_STAGES]; //!< Time past before each stage + static double accumulated_times[N_PROGRESS_STAGES]; //!< Time past before each stage static double total_timing; //!< An estimate of the total time /*! * Give an estimate between 0 and 1 of how far the process is. - * + * * \param stage The current stage of processing * \param stage_process How far we currently are in the \p stage * \return An estimate of the overall progress. */ static float calcOverallProgress(Stage stage, float stage_progress); + public: static void init(); //!< Initialize some values needed in a fast computation of the progress /*! * Message progress over the CommandSocket and to the terminal (if the command line arg '-p' is provided). - * + * * \param stage The current stage of processing * \param progress_in_stage Any number giving the progress within the stage * \param progress_in_stage_max The maximal value of \p progress_in_stage @@ -60,13 +64,15 @@ class Progress static void messageProgress(Stage stage, int progress_in_stage, int progress_in_stage_max); /*! * Message the progress stage over the command socket. - * + * * \param stage The current stage * \param timeKeeper The stapwatch keeping track of the timings for each stage (optional) */ static void messageProgressStage(Stage stage, TimeKeeper* timeKeeper); + + static void messageProgressLayer(LayerIndex layer_nr, size_t total_layers, double total_time, const TimeKeeper::RegisteredTimes& stages); }; -} // name space cura -#endif//PROGRESS_H +} // namespace cura +#endif // PROGRESS_H diff --git a/include/utils/gettime.h b/include/utils/gettime.h index 319f5d750c..0f011360ad 100644 --- a/include/utils/gettime.h +++ b/include/utils/gettime.h @@ -4,55 +4,42 @@ #ifndef GETTIME_H #define GETTIME_H -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN 1 -#include -#else -#ifdef USE_CPU_TIME -#include -#endif - -#include -#include -#include -#endif +#include +#include +#include + +#include namespace cura { -static inline double getTime() -{ -#ifdef _WIN32 - return double(GetTickCount()) / 1000.0; -#else // not __WIN32 -#if USE_CPU_TIME // Use cpu usage time if available, otherwise wall clock time - struct rusage usage; -#ifdef DEBUG - int ret = getrusage(RUSAGE_SELF, &usage); - assert(ret == 0); - ((void)ret); -#else - getrusage(RUSAGE_SELF, &usage); -#endif - double user_time = double(usage.ru_utime.tv_sec) + double(usage.ru_utime.tv_usec) / 1000000.0; - double sys_time = double(usage.ru_stime.tv_sec) + double(usage.ru_stime.tv_usec) / 1000000.0; - return user_time + sys_time; -#else // not USE_CPU_TIME - struct timeval tv; - gettimeofday(&tv, nullptr); - return double(tv.tv_sec) + double(tv.tv_usec) / 1000000.0; -#endif // USE_CPU_TIME -#endif // __WIN32 -} class TimeKeeper { +public: + struct RegisteredTime + { + std::string stage; + double duration; + }; + + using RegisteredTimes = std::vector; + private: - double startTime; + spdlog::stopwatch watch; + double start_time; + RegisteredTimes registered_times; public: TimeKeeper(); double restart(); + + void registerTime(const std::string& stage, double threshold = 0.01); + + const RegisteredTimes& getRegisteredTimes() const + { + return registered_times; + } }; } // namespace cura diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index b99161c1a2..a42d12889d 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -7,6 +7,7 @@ #include // numeric_limits #include #include +#include #include #include @@ -168,15 +169,15 @@ void FffGcodeWriter::writeGCode(SliceDataStorage& storage, TimeKeeper& time_keep total_layers, [&storage, total_layers, this](int layer_nr) { - return &processLayer(storage, layer_nr, total_layers); + return std::make_optional(processLayer(storage, layer_nr, total_layers)); }, - [this, total_layers](LayerPlan* gcode_layer) + [this, total_layers](std::optional result_opt) { - Progress::messageProgress(Progress::Stage::EXPORT, std::max(LayerIndex{ 0 }, gcode_layer->getLayerNr()) + 1, total_layers); - layer_plan_buffer.handle(*gcode_layer, gcode); + const ProcessLayerResult& result = result_opt.value(); + Progress::messageProgressLayer(result.layer_plan->getLayerNr(), total_layers, result.total_elapsed_time, result.stages_times); + layer_plan_buffer.handle(*result.layer_plan, gcode); }); - layer_plan_buffer.flush(); Progress::messageProgressStage(Progress::Stage::FINISH, &time_keeper); @@ -945,9 +946,11 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) } } -LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIndex layer_nr, const size_t total_layers) const +FffGcodeWriter::ProcessLayerResult FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIndex layer_nr, const size_t total_layers) const { spdlog::debug("GcodeWriter processing layer {} of {}", layer_nr, total_layers); + TimeKeeper time_keeper; + spdlog::stopwatch timer_total; const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings; coord_t layer_thickness = mesh_group_settings.get("layer_height"); @@ -1032,6 +1035,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn comb_offset_from_outlines, first_outer_wall_line_width, avoid_distance); + time_keeper.registerTime("Init"); if (include_helper_parts) { @@ -1040,11 +1044,15 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn if (storage.skirt_brim[extruder_nr].size() > 0) { processSkirtBrim(storage, gcode_layer, extruder_nr, layer_nr); + time_keeper.registerTime("Skirt/brim"); } // handle shield(s) first in a layer so that chances are higher that the other nozzle is wiped (for the ooze shield) processOozeShield(storage, gcode_layer); + time_keeper.registerTime("Ooze shield"); + processDraftShield(storage, gcode_layer); + time_keeper.registerTime("Draft shield"); } const size_t support_roof_extruder_nr = mesh_group_settings.get("support_roof_extruder_nr").extruder_nr; @@ -1065,10 +1073,12 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn if (extruder_nr != extruder_order.front() || (extruder_order.size() == 1 && layer_nr >= 0) || extruder_nr == 0) { setExtruder_addPrime(storage, gcode_layer, extruder_nr); + time_keeper.registerTime("Prime tower pre"); } if (include_helper_parts && (extruder_nr == support_infill_extruder_nr || extruder_nr == support_roof_extruder_nr || extruder_nr == support_bottom_extruder_nr)) { addSupportToGCode(storage, gcode_layer, extruder_nr); + time_keeper.registerTime("Supports"); } if (layer_nr >= 0) { @@ -1088,6 +1098,7 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn { addMeshLayerToGCode(storage, mesh, extruder_nr, mesh_config, gcode_layer); } + time_keeper.registerTime(fmt::format("Mesh {}", mesh_idx)); } } // Always print a prime tower before switching extruder. Unless: @@ -1096,12 +1107,17 @@ LayerPlan& FffGcodeWriter::processLayer(const SliceDataStorage& storage, LayerIn if (extruder_nr != extruder_order.back() && layer_nr >= 0) { setExtruder_addPrime(storage, gcode_layer, extruder_nr); + time_keeper.registerTime("Prime tower post"); } } gcode_layer.applyModifyPlugin(); + time_keeper.registerTime("Modify plugin"); + gcode_layer.applyBackPressureCompensation(); - return gcode_layer; + time_keeper.registerTime("Back pressure comp."); + + return { &gcode_layer, timer_total.elapsed().count(), time_keeper.getRegisteredTimes() }; } bool FffGcodeWriter::getExtruderNeedPrimeBlobDuringFirstLayer(const SliceDataStorage& storage, const size_t extruder_nr) const @@ -2036,8 +2052,8 @@ bool FffGcodeWriter::processSingleLayerInfill( else // So walls_generated must be true. { std::vector* start_paths = &wall_tool_paths[rand() % wall_tool_paths.size()]; - while (start_paths->empty() || (*start_paths)[0].empty()) // We know for sure (because walls_generated) that one of them is not empty. So randomise until we hit it. - // Should almost always be very quick. + while (start_paths->empty() || (*start_paths)[0].empty()) // We know for sure (because walls_generated) that one of them is not empty. So randomise until we hit + // it. Should almost always be very quick. { start_paths = &wall_tool_paths[rand() % wall_tool_paths.size()]; } @@ -2169,8 +2185,8 @@ bool FffGcodeWriter::partitionInfillBySkinAbove( } else // this layer is the 1st layer above the layer whose infill we're printing { - // add this layer's skin region without subtracting the overlap but still make a gap between this skin region and what has been accumulated so far - // we do this so that these skin region edges will definitely have infill walls below them + // add this layer's skin region without subtracting the overlap but still make a gap between this skin region and what has been accumulated so + // far we do this so that these skin region edges will definitely have infill walls below them // looking from the side, if the combined regions so far look like this... // @@ -2201,8 +2217,8 @@ bool FffGcodeWriter::partitionInfillBySkinAbove( } } - // the shrink/expand here is to remove regions of infill below skin that are narrower than the width of the infill walls otherwise the infill walls could merge and form a - // bump + // the shrink/expand here is to remove regions of infill below skin that are narrower than the width of the infill walls otherwise the infill walls could merge and form + // a bump infill_below_skin = skin_above_combined.intersection(part.infill_area_per_combine_per_density.back().front()).offset(-infill_line_width).offset(infill_line_width); constexpr bool remove_small_holes_from_infill_below_skin = true; diff --git a/src/MeshGroup.cpp b/src/MeshGroup.cpp index 1516e64190..84ef4d4923 100644 --- a/src/MeshGroup.cpp +++ b/src/MeshGroup.cpp @@ -1,6 +1,8 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include "MeshGroup.h" + #include #include #include @@ -10,7 +12,6 @@ #include #include -#include "MeshGroup.h" #include "settings/types/Ratio.h" //For the shrinkage percentage and scale factor. #include "utils/FMatrix4x3.h" //To transform the input meshes for shrinkage compensation and to align in command line mode. #include "utils/floatpoint.h" //To accept incoming meshes with floating point vertices. @@ -48,7 +49,8 @@ Point3 MeshGroup::min() const Point3 ret(std::numeric_limits::max(), std::numeric_limits::max(), std::numeric_limits::max()); for (const Mesh& mesh : meshes) { - if (mesh.settings.get("infill_mesh") || mesh.settings.get("cutting_mesh") || mesh.settings.get("anti_overhang_mesh")) // Don't count pieces that are not printed. + if (mesh.settings.get("infill_mesh") || mesh.settings.get("cutting_mesh") + || mesh.settings.get("anti_overhang_mesh")) // Don't count pieces that are not printed. { continue; } @@ -69,7 +71,8 @@ Point3 MeshGroup::max() const Point3 ret(std::numeric_limits::min(), std::numeric_limits::min(), std::numeric_limits::min()); for (const Mesh& mesh : meshes) { - if (mesh.settings.get("infill_mesh") || mesh.settings.get("cutting_mesh") || mesh.settings.get("anti_overhang_mesh")) // Don't count pieces that are not printed. + if (mesh.settings.get("infill_mesh") || mesh.settings.get("cutting_mesh") + || mesh.settings.get("anti_overhang_mesh")) // Don't count pieces that are not printed. { continue; } @@ -112,7 +115,9 @@ void MeshGroup::finalize() } mesh.translate(mesh_offset + meshgroup_offset); } - scaleFromBottom(settings.get("material_shrinkage_percentage_xy"), settings.get("material_shrinkage_percentage_z")); // Compensate for the shrinkage of the material. + scaleFromBottom( + settings.get("material_shrinkage_percentage_xy"), + settings.get("material_shrinkage_percentage_z")); // Compensate for the shrinkage of the material. for (const auto& [idx, mesh] : meshes | ranges::views::enumerate) { scripta::log(fmt::format("mesh_{}", idx), mesh, SectionType::NA); @@ -285,7 +290,7 @@ bool loadMeshIntoMeshGroup(MeshGroup* meshgroup, const char* filename, const FMa if (loadMeshSTL(&mesh, filename, transformation)) // Load it! If successful... { meshgroup->meshes.push_back(mesh); - spdlog::info("loading '{}' took {:3} seconds", filename, load_timer.restart()); + spdlog::info("loading '{}' took {:03.3f} seconds", filename, load_timer.restart()); return true; } } diff --git a/src/Scene.cpp b/src/Scene.cpp index ff4baf9adc..ac50185b6d 100644 --- a/src/Scene.cpp +++ b/src/Scene.cpp @@ -1,11 +1,12 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include "Scene.h" + #include #include "Application.h" #include "FffProcessor.h" //To start a slice. -#include "Scene.h" #include "communication/Communication.h" //To flush g-code and layer view when we're done. #include "progress/Progress.h" #include "sliceDataStorage.h" @@ -13,7 +14,9 @@ namespace cura { -Scene::Scene(const size_t num_mesh_groups) : mesh_groups(num_mesh_groups), current_mesh_group(mesh_groups.begin()) +Scene::Scene(const size_t num_mesh_groups) + : mesh_groups(num_mesh_groups) + , current_mesh_group(mesh_groups.begin()) { for (MeshGroup& mesh_group : mesh_groups) { @@ -78,7 +81,7 @@ void Scene::processMeshGroup(MeshGroup& mesh_group) if (empty) { Progress::messageProgress(Progress::Stage::FINISH, 1, 1); // 100% on this meshgroup - spdlog::info("Total time elapsed {:3}s.", time_keeper_total.restart()); + spdlog::info("Total time elapsed {:03.3f}s", time_keeper_total.restart()); return; } @@ -94,7 +97,7 @@ void Scene::processMeshGroup(MeshGroup& mesh_group) Progress::messageProgress(Progress::Stage::FINISH, 1, 1); // 100% on this meshgroup Application::getInstance().communication->flushGCode(); Application::getInstance().communication->sendOptimizedLayerData(); - spdlog::info("Total time elapsed {:3}s.\n", time_keeper_total.restart()); + spdlog::info("Total time elapsed {:03.3f}s\n", time_keeper_total.restart()); } -} // namespace cura \ No newline at end of file +} // namespace cura diff --git a/src/progress/Progress.cpp b/src/progress/Progress.cpp index 62687044c6..fb3331bc02 100644 --- a/src/progress/Progress.cpp +++ b/src/progress/Progress.cpp @@ -1,49 +1,40 @@ // Copyright (c) 2022 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher +#include "progress/Progress.h" + #include #include #include "Application.h" //To get the communication channel to send progress through. #include "communication/Communication.h" //To send progress through the communication channel. -#include "progress/Progress.h" #include "utils/gettime.h" namespace cura { double Progress::times[] = { - 0.0, // START = 0, - 5.269, // SLICING = 1, - 1.533, // PARTS = 2, + 0.0, // START = 0, + 5.269, // SLICING = 1, + 1.533, // PARTS = 2, 71.811, // INSET_SKIN = 3 - 51.009, // SUPPORT = 4, - 154.62, // EXPORT = 5, - 0.1 // FINISH = 6 -}; -std::string Progress::names [] = -{ - "start", - "slice", - "layerparts", - "inset+skin", - "support", - "export", - "process" + 51.009, // SUPPORT = 4, + 154.62, // EXPORT = 5, + 0.1 // FINISH = 6 }; +std::string Progress::names[] = { "start", "slice", "layerparts", "inset+skin", "support", "export", "process" }; -double Progress::accumulated_times [N_PROGRESS_STAGES] = {-1}; +double Progress::accumulated_times[N_PROGRESS_STAGES] = { -1 }; double Progress::total_timing = -1; float Progress::calcOverallProgress(Stage stage, float stage_progress) { assert(stage_progress <= 1.0); assert(stage_progress >= 0.0); - return ( accumulated_times[(int)stage] + stage_progress * times[(int)stage] ) / total_timing; + return (accumulated_times[(int)stage] + stage_progress * times[(int)stage]) / total_timing; } - void Progress::init() { double accumulated_time = 0; @@ -59,8 +50,6 @@ void Progress::messageProgress(Progress::Stage stage, int progress_in_stage, int { float percentage = calcOverallProgress(stage, float(progress_in_stage) / float(progress_in_stage_max)); Application::getInstance().communication->sendProgress(percentage); - - // logProgress(names[(int)stage].c_str(), progress_in_stage, progress_in_stage_max, percentage); FIXME: use different sink } void Progress::messageProgressStage(Progress::Stage stage, TimeKeeper* time_keeper) @@ -69,13 +58,13 @@ void Progress::messageProgressStage(Progress::Stage stage, TimeKeeper* time_keep { if ((int)stage > 0) { - spdlog::info("Progress: {} accomplished in {:3}s", names[(int)stage - 1], time_keeper->restart()); + spdlog::info("Progress: {} accomplished in {:03.3f}s", names[(int)stage - 1], time_keeper->restart()); } else { time_keeper->restart(); } - + if ((int)stage < (int)Stage::FINISH) { spdlog::info("Starting {}...", names[(int)stage]); @@ -83,4 +72,29 @@ void Progress::messageProgressStage(Progress::Stage stage, TimeKeeper* time_keep } } -}// namespace cura \ No newline at end of file +void Progress::messageProgressLayer(LayerIndex layer_nr, size_t total_layers, double total_time, const TimeKeeper::RegisteredTimes& stages) +{ + messageProgress(Stage::EXPORT, std::max(layer_nr.value, LayerIndex::value_type(0)) + 1, total_layers); + + spdlog::info("+---- Layer export [{}] accomplished in {:03.3f}s", layer_nr.value, total_time); + + size_t padding = 0; + auto iterator_max_size = std::max_element( + stages.begin(), + stages.end(), + [](const TimeKeeper::RegisteredTime& time1, const TimeKeeper::RegisteredTime& time2) + { + return time1.stage.size() < time2.stage.size(); + }); + if (iterator_max_size != stages.end()) + { + padding = iterator_max_size->stage.size(); + + for (const TimeKeeper::RegisteredTime& time : stages) + { + spdlog::info("| *{}:{} {:03.3f}s", time.stage, std::string(padding - time.stage.size(), ' '), time.duration); + } + } +} + +} // namespace cura diff --git a/src/slicer.cpp b/src/slicer.cpp index 6b1ac7ea4d..f5127833bc 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -3,6 +3,13 @@ #include "slicer.h" +#include // remove_if +#include +#include + +#include +#include + #include "Application.h" #include "Slice.h" #include "plugins/slots.h" @@ -15,13 +22,6 @@ #include "utils/gettime.h" #include "utils/section_type.h" -#include -#include - -#include // remove_if -#include -#include - namespace cura { @@ -825,11 +825,11 @@ Slicer::Slicer(Mesh* i_mesh, const coord_t thickness, const size_t slice_layer_c buildSegments(*mesh, zbbox, slicing_tolerance, layers); - spdlog::info("Slice of mesh took {:3} seconds", slice_timer.restart()); + spdlog::info("Slice of mesh took {:03.3f} seconds", slice_timer.restart()); makePolygons(*i_mesh, slicing_tolerance, layers); scripta::log("sliced_polygons", layers, SectionType::NA); - spdlog::info("Make polygons took {:3} seconds", slice_timer.restart()); + spdlog::info("Make polygons took {:03.3f} seconds", slice_timer.restart()); } void Slicer::buildSegments(const Mesh& mesh, const std::vector>& zbbox, const SlicingTolerance& slicing_tolerance, std::vector& layers) diff --git a/src/utils/gettime.cpp b/src/utils/gettime.cpp index bfd665abaa..a7d8303857 100644 --- a/src/utils/gettime.cpp +++ b/src/utils/gettime.cpp @@ -1,21 +1,31 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #include "utils/gettime.h" +#include + namespace cura { - + TimeKeeper::TimeKeeper() { - restart(); } double TimeKeeper::restart() { - double ret = getTime() - startTime; - startTime = getTime(); + double ret = watch.elapsed().count(); + watch.reset(); return ret; } -}//namespace cura \ No newline at end of file +void TimeKeeper::registerTime(const std::string& stage, double threshold) +{ + double duration = restart(); + if (duration >= threshold) + { + registered_times.emplace_back(RegisteredTime{ stage, duration }); + } +} + +} // namespace cura From a58cb53efd3dd441c083218ad27ad073ccc36af2 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 2 Nov 2023 17:56:38 +0100 Subject: [PATCH 429/470] Allow scripta to construct layermap with raft See: https://github.com/Ultimaker/Scripta/pull/7 --- src/slicer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/slicer.cpp b/src/slicer.cpp index 6b1ac7ea4d..62e8e3d57d 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -819,7 +819,15 @@ Slicer::Slicer(Mesh* i_mesh, const coord_t thickness, const size_t slice_layer_c TimeKeeper slice_timer; layers = buildLayersWithHeight(slice_layer_count, slicing_tolerance, initial_layer_thickness, thickness, use_variable_layer_heights, adaptive_layers); - scripta::setAll(layers); + scripta::setAll(layers, + static_cast(mesh->settings.get("adhesion_type")), + mesh->settings.get("raft_surface_layers"), + mesh->settings.get("raft_surface_thickness"), + mesh->settings.get("raft_interface_layers"), + mesh->settings.get("raft_interface_thickness"), + mesh->settings.get("raft_base_thickness"), + mesh->settings.get("raft_airgap"), + mesh->settings.get("layer_0_z_overlap")); std::vector> zbbox = buildZHeightsForFaces(*mesh); From db79053f1166ab383a5beb71c8d9b41c64ccc36c Mon Sep 17 00:00:00 2001 From: wawanbreton Date: Fri, 3 Nov 2023 11:00:24 +0000 Subject: [PATCH 430/470] Applied clang-format. --- src/slicer.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/slicer.cpp b/src/slicer.cpp index 485a1d5ed5..2758d133f0 100644 --- a/src/slicer.cpp +++ b/src/slicer.cpp @@ -819,15 +819,16 @@ Slicer::Slicer(Mesh* i_mesh, const coord_t thickness, const size_t slice_layer_c TimeKeeper slice_timer; layers = buildLayersWithHeight(slice_layer_count, slicing_tolerance, initial_layer_thickness, thickness, use_variable_layer_heights, adaptive_layers); - scripta::setAll(layers, - static_cast(mesh->settings.get("adhesion_type")), - mesh->settings.get("raft_surface_layers"), - mesh->settings.get("raft_surface_thickness"), - mesh->settings.get("raft_interface_layers"), - mesh->settings.get("raft_interface_thickness"), - mesh->settings.get("raft_base_thickness"), - mesh->settings.get("raft_airgap"), - mesh->settings.get("layer_0_z_overlap")); + scripta::setAll( + layers, + static_cast(mesh->settings.get("adhesion_type")), + mesh->settings.get("raft_surface_layers"), + mesh->settings.get("raft_surface_thickness"), + mesh->settings.get("raft_interface_layers"), + mesh->settings.get("raft_interface_thickness"), + mesh->settings.get("raft_base_thickness"), + mesh->settings.get("raft_airgap"), + mesh->settings.get("layer_0_z_overlap")); std::vector> zbbox = buildZHeightsForFaces(*mesh); From bca565bdfe97ebc874989f362c24bb3f879dc2cd Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 7 Nov 2023 10:54:47 +0100 Subject: [PATCH 431/470] Time report improvements CURA-11255 --- include/progress/Progress.h | 14 ++++++++++- src/progress/Progress.cpp | 50 +++++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/include/progress/Progress.h b/include/progress/Progress.h index 4a513d94a2..619632a1f0 100644 --- a/include/progress/Progress.h +++ b/include/progress/Progress.h @@ -43,6 +43,7 @@ class Progress static std::string names[N_PROGRESS_STAGES]; //!< name of each stage static double accumulated_times[N_PROGRESS_STAGES]; //!< Time past before each stage static double total_timing; //!< An estimate of the total time + static std::optional first_skipped_layer; //!< The index of the layer for which we skipped time reporting /*! * Give an estimate between 0 and 1 of how far the process is. * @@ -62,6 +63,7 @@ class Progress * \param progress_in_stage_max The maximal value of \p progress_in_stage */ static void messageProgress(Stage stage, int progress_in_stage, int progress_in_stage_max); + /*! * Message the progress stage over the command socket. * @@ -70,7 +72,17 @@ class Progress */ static void messageProgressStage(Stage stage, TimeKeeper* timeKeeper); - static void messageProgressLayer(LayerIndex layer_nr, size_t total_layers, double total_time, const TimeKeeper::RegisteredTimes& stages); + /*! + * Message the layer progress over the command socket and into logging output. + * + * \param layer_nr The processed layer number + * \param total_layers The total number of layers to be processed + * \param total_time The total layer processing time, in seconds + * \param stage The detailed stages time reporting for this layer + * \param skip_threshold The time threshold under which we consider that the full layer time reporting should be skipped + * because it is not relevant + */ + static void messageProgressLayer(LayerIndex layer_nr, size_t total_layers, double total_time, const TimeKeeper::RegisteredTimes& stages, double skip_threshold = 0.1); }; diff --git a/src/progress/Progress.cpp b/src/progress/Progress.cpp index fb3331bc02..85194808b0 100644 --- a/src/progress/Progress.cpp +++ b/src/progress/Progress.cpp @@ -5,6 +5,7 @@ #include +#include #include #include "Application.h" //To get the communication channel to send progress through. @@ -27,6 +28,7 @@ std::string Progress::names[] = { "start", "slice", "layerparts", "inset+skin", double Progress::accumulated_times[N_PROGRESS_STAGES] = { -1 }; double Progress::total_timing = -1; +std::optional Progress::first_skipped_layer{}; float Progress::calcOverallProgress(Stage stage, float stage_progress) { @@ -72,27 +74,43 @@ void Progress::messageProgressStage(Progress::Stage stage, TimeKeeper* time_keep } } -void Progress::messageProgressLayer(LayerIndex layer_nr, size_t total_layers, double total_time, const TimeKeeper::RegisteredTimes& stages) +void Progress::messageProgressLayer(LayerIndex layer_nr, size_t total_layers, double total_time, const TimeKeeper::RegisteredTimes& stages, double skip_threshold) { - messageProgress(Stage::EXPORT, std::max(layer_nr.value, LayerIndex::value_type(0)) + 1, total_layers); - - spdlog::info("+---- Layer export [{}] accomplished in {:03.3f}s", layer_nr.value, total_time); - - size_t padding = 0; - auto iterator_max_size = std::max_element( - stages.begin(), - stages.end(), - [](const TimeKeeper::RegisteredTime& time1, const TimeKeeper::RegisteredTime& time2) + if (total_time < skip_threshold) + { + if (! first_skipped_layer) { - return time1.stage.size() < time2.stage.size(); - }); - if (iterator_max_size != stages.end()) + first_skipped_layer = layer_nr; + } + } + else { - padding = iterator_max_size->stage.size(); + if (first_skipped_layer) + { + spdlog::info("Skipped time reporting for layers [{}...{}]", first_skipped_layer.value().value, layer_nr.value); + first_skipped_layer.reset(); + } + + messageProgress(Stage::EXPORT, std::max(layer_nr.value, LayerIndex::value_type(0)) + 1, total_layers); - for (const TimeKeeper::RegisteredTime& time : stages) + spdlog::info("┌ Layer export [{}] accomplished in {:03.3f}s", layer_nr.value, total_time); + + size_t padding = 0; + auto iterator_max_size = std::max_element( + stages.begin(), + stages.end(), + [](const TimeKeeper::RegisteredTime& time1, const TimeKeeper::RegisteredTime& time2) + { + return time1.stage.size() < time2.stage.size(); + }); + if (iterator_max_size != stages.end()) { - spdlog::info("| *{}:{} {:03.3f}s", time.stage, std::string(padding - time.stage.size(), ' '), time.duration); + padding = iterator_max_size->stage.size(); + + for (auto [index, time] : stages | ranges::view::enumerate) + { + spdlog::info("{}── {}:{} {:03.3f}s", index < stages.size() - 1 ? "├" : "â””", time.stage, std::string(padding - time.stage.size(), ' '), time.duration); + } } } } From c07a0a170867b3c90dcb88c6800927d1afcce041 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 7 Nov 2023 12:32:17 +0100 Subject: [PATCH 432/470] Fix unit test --- tests/integration/SlicePhaseTest.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/integration/SlicePhaseTest.cpp b/tests/integration/SlicePhaseTest.cpp index 34e46dc809..75d66899b8 100644 --- a/tests/integration/SlicePhaseTest.cpp +++ b/tests/integration/SlicePhaseTest.cpp @@ -1,6 +1,10 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include + +#include + #include "Application.h" // To set up a slice with settings. #include "Slice.h" // To set up a scene to slice. #include "slicer.h" // Starts the slicing phase that we want to test. @@ -8,8 +12,6 @@ #include "utils/FMatrix4x3.h" // To load STL files. #include "utils/polygon.h" // Creating polygons to compare to sliced layers. #include "utils/polygonUtils.h" // Comparing similarity of polygons. -#include -#include namespace cura { @@ -35,6 +37,13 @@ class SlicePhaseTest : public testing::Test scene.settings.add("slicing_tolerance", "middle"); scene.settings.add("layer_height_0", "0.2"); scene.settings.add("layer_height", "0.1"); + scene.settings.add("layer_0_z_overlap", "0.0"); + scene.settings.add("raft_airgap", "0.0"); + scene.settings.add("raft_base_thickness", "0.2"); + scene.settings.add("raft_interface_thickness", "0.2"); + scene.settings.add("raft_interface_layers", "1"); + scene.settings.add("raft_surface_thickness", "0.2"); + scene.settings.add("raft_surface_layers", "1"); scene.settings.add("magic_mesh_surface_mode", "normal"); scene.settings.add("meshfix_extensive_stitching", "false"); scene.settings.add("meshfix_keep_open_polygons", "false"); @@ -51,6 +60,7 @@ class SlicePhaseTest : public testing::Test scene.settings.add("anti_overhang_mesh", "false"); scene.settings.add("cutting_mesh", "false"); scene.settings.add("infill_mesh", "false"); + scene.settings.add("adhesion_type", "none"); } }; @@ -121,7 +131,8 @@ TEST_F(SlicePhaseTest, Cylinder1000) const FMatrix4x3 transformation; // Path to cylinder1000.stl is relative to CMAKE_CURRENT_SOURCE_DIR/tests. - ASSERT_TRUE(loadMeshIntoMeshGroup(&mesh_group, std::filesystem::path(__FILE__).parent_path().append("resources/cylinder1000.stl").string().c_str(), transformation, scene.settings)); + ASSERT_TRUE( + loadMeshIntoMeshGroup(&mesh_group, std::filesystem::path(__FILE__).parent_path().append("resources/cylinder1000.stl").string().c_str(), transformation, scene.settings)); EXPECT_EQ(mesh_group.meshes.size(), 1); Mesh& cylinder_mesh = mesh_group.meshes[0]; @@ -162,4 +173,4 @@ TEST_F(SlicePhaseTest, Cylinder1000) } } -} // namespace cura \ No newline at end of file +} // namespace cura From 3cfce8350ba204f0229a85907ca575e1522089d6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 8 Nov 2023 10:13:43 +0100 Subject: [PATCH 433/470] Add missing include `optional` --- src/progress/Progress.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/progress/Progress.cpp b/src/progress/Progress.cpp index 85194808b0..d0c3e9203a 100644 --- a/src/progress/Progress.cpp +++ b/src/progress/Progress.cpp @@ -1,9 +1,10 @@ -// Copyright (c) 2022 Ultimaker B.V. +// Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher #include "progress/Progress.h" #include +#include #include #include From 138d6cdefcce91b4bc5fa8e379ec322b756c2eb9 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 8 Nov 2023 10:14:31 +0100 Subject: [PATCH 434/470] Use correct namespace for `ranges::views` --- src/progress/Progress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/progress/Progress.cpp b/src/progress/Progress.cpp index d0c3e9203a..6af743785d 100644 --- a/src/progress/Progress.cpp +++ b/src/progress/Progress.cpp @@ -108,7 +108,7 @@ void Progress::messageProgressLayer(LayerIndex layer_nr, size_t total_layers, do { padding = iterator_max_size->stage.size(); - for (auto [index, time] : stages | ranges::view::enumerate) + for (auto [index, time] : stages | ranges::views::enumerate) { spdlog::info("{}── {}:{} {:03.3f}s", index < stages.size() - 1 ? "├" : "â””", time.stage, std::string(padding - time.stage.size(), ' '), time.duration); } From eeb93cfaa3bd7466a4b519206cc3e51423dd13a6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 8 Nov 2023 10:47:28 +0100 Subject: [PATCH 435/470] Refactor Progress class and improve type safety This refactor cleans up the Progress class and enhances type safety. It replaces raw C-style arrays with std::array, which guarantees type safety and prevents out-of-bound access. The type of several variables and methods has also been changed from int and float to size_t and double to increase precision. --- include/progress/Progress.h | 26 +++++++++++++++++------- src/progress/Progress.cpp | 40 +++++++++++++------------------------ 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/include/progress/Progress.h b/include/progress/Progress.h index 619632a1f0..ae829867bb 100644 --- a/include/progress/Progress.h +++ b/include/progress/Progress.h @@ -1,10 +1,13 @@ -// Copyright (c) 2018 Ultimaker B.V. -// CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher #ifndef PROGRESS_H #define PROGRESS_H +#include #include +#include +#include #include "utils/gettime.h" @@ -13,7 +16,7 @@ namespace cura struct LayerIndex; -#define N_PROGRESS_STAGES 7 +static constexpr size_t N_PROGRESS_STAGES = 7; /*! * Class for handling the progress bar and the progress logging. @@ -39,9 +42,18 @@ class Progress }; private: - static double times[N_PROGRESS_STAGES]; //!< Time estimates per stage - static std::string names[N_PROGRESS_STAGES]; //!< name of each stage - static double accumulated_times[N_PROGRESS_STAGES]; //!< Time past before each stage + static constexpr std::array times{ + 0.0, // START = 0, + 5.269, // SLICING = 1, + 1.533, // PARTS = 2, + 71.811, // INSET_SKIN = 3 + 51.009, // SUPPORT = 4, + 154.62, // EXPORT = 5, + 0.1 // FINISH = 6 + }; + + static constexpr std::array names{ "start", "slice", "layerparts", "inset+skin", "support", "export", "process" }; + static std::array accumulated_times; //!< Time past before each stage static double total_timing; //!< An estimate of the total time static std::optional first_skipped_layer; //!< The index of the layer for which we skipped time reporting /*! @@ -51,7 +63,7 @@ class Progress * \param stage_process How far we currently are in the \p stage * \return An estimate of the overall progress. */ - static float calcOverallProgress(Stage stage, float stage_progress); + static double calcOverallProgress(Stage stage, double stage_progress); public: static void init(); //!< Initialize some values needed in a fast computation of the progress diff --git a/src/progress/Progress.cpp b/src/progress/Progress.cpp index 6af743785d..be6a688813 100644 --- a/src/progress/Progress.cpp +++ b/src/progress/Progress.cpp @@ -15,62 +15,50 @@ namespace cura { - -double Progress::times[] = { - 0.0, // START = 0, - 5.269, // SLICING = 1, - 1.533, // PARTS = 2, - 71.811, // INSET_SKIN = 3 - 51.009, // SUPPORT = 4, - 154.62, // EXPORT = 5, - 0.1 // FINISH = 6 -}; -std::string Progress::names[] = { "start", "slice", "layerparts", "inset+skin", "support", "export", "process" }; - -double Progress::accumulated_times[N_PROGRESS_STAGES] = { -1 }; +std::array Progress::accumulated_times = { -1 }; double Progress::total_timing = -1; std::optional Progress::first_skipped_layer{}; -float Progress::calcOverallProgress(Stage stage, float stage_progress) +double Progress::calcOverallProgress(Stage stage, double stage_progress) { assert(stage_progress <= 1.0); assert(stage_progress >= 0.0); - return (accumulated_times[(int)stage] + stage_progress * times[(int)stage]) / total_timing; + return (accumulated_times.at(static_cast(stage)) + stage_progress * times.at(static_cast(stage))) / total_timing; } void Progress::init() { double accumulated_time = 0; - for (int stage = 0; stage < N_PROGRESS_STAGES; stage++) + for (size_t stage = 0; stage < N_PROGRESS_STAGES; stage++) { - accumulated_times[(int)stage] = accumulated_time; - accumulated_time += times[(int)stage]; + accumulated_times.at(static_cast(stage)) = accumulated_time; + accumulated_time += times.at(static_cast(stage)); } total_timing = accumulated_time; } void Progress::messageProgress(Progress::Stage stage, int progress_in_stage, int progress_in_stage_max) { - float percentage = calcOverallProgress(stage, float(progress_in_stage) / float(progress_in_stage_max)); - Application::getInstance().communication->sendProgress(percentage); + double percentage = calcOverallProgress(stage, static_cast(progress_in_stage / static_cast(progress_in_stage_max))); + Application::getInstance().communication->sendProgress(static_cast(percentage)); } void Progress::messageProgressStage(Progress::Stage stage, TimeKeeper* time_keeper) { - if (time_keeper) + if (time_keeper != nullptr) { - if ((int)stage > 0) + if (static_cast(stage) > 0) { - spdlog::info("Progress: {} accomplished in {:03.3f}s", names[(int)stage - 1], time_keeper->restart()); + spdlog::info("Progress: {} accomplished in {:03.3f}s", names.at(static_cast(stage) - 1), time_keeper->restart()); } else { time_keeper->restart(); } - if ((int)stage < (int)Stage::FINISH) + if (static_cast(stage) < static_cast(Stage::FINISH)) { - spdlog::info("Starting {}...", names[(int)stage]); + spdlog::info("Starting {}...", names.at(static_cast(stage))); } } } @@ -108,7 +96,7 @@ void Progress::messageProgressLayer(LayerIndex layer_nr, size_t total_layers, do { padding = iterator_max_size->stage.size(); - for (auto [index, time] : stages | ranges::views::enumerate) + for (const auto& [index, time] : stages | ranges::views::enumerate) { spdlog::info("{}── {}:{} {:03.3f}s", index < stages.size() - 1 ? "├" : "â””", time.stage, std::string(padding - time.stage.size(), ' '), time.duration); } From 0c3e9d0c492d15068f8afe9aa2743e5e068e7cbd Mon Sep 17 00:00:00 2001 From: jellespijker Date: Wed, 8 Nov 2023 11:22:57 +0000 Subject: [PATCH 436/470] Applied clang-format. --- include/progress/Progress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/progress/Progress.h b/include/progress/Progress.h index ae829867bb..c1e20cc6c7 100644 --- a/include/progress/Progress.h +++ b/include/progress/Progress.h @@ -5,9 +5,9 @@ #define PROGRESS_H #include +#include #include #include -#include #include "utils/gettime.h" From 961e1007f25a1365b913fc4b02fe0199534f0d5d Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 8 Nov 2023 14:59:55 +0100 Subject: [PATCH 437/470] Fix prime tower when only raft has multi-material CURA-11291 --- src/PrimeTower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 3883822adc..f8fac03b10 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -103,7 +103,7 @@ void PrimeTower::generateGroundpoly() void PrimeTower::generatePaths(const SliceDataStorage& storage) { would_have_actual_tower - = storage.max_print_height_second_to_last_extruder >= 0; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. + = storage.max_print_height_second_to_last_extruder >= -Raft::getTotalExtraLayers() + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. if (would_have_actual_tower && enabled) { generatePaths_denseInfill(); From 103a8bab4b68d57b48e4bfb25c2e64ebe1c38204 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Wed, 8 Nov 2023 14:00:35 +0000 Subject: [PATCH 438/470] Applied clang-format. --- src/PrimeTower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index f8fac03b10..8b4ddba358 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -102,8 +102,8 @@ void PrimeTower::generateGroundpoly() void PrimeTower::generatePaths(const SliceDataStorage& storage) { - would_have_actual_tower - = storage.max_print_height_second_to_last_extruder >= -Raft::getTotalExtraLayers() + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. + would_have_actual_tower = storage.max_print_height_second_to_last_extruder + >= -Raft::getTotalExtraLayers() + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. if (would_have_actual_tower && enabled) { generatePaths_denseInfill(); From 67b8052d3dd704ed184d28fe3b163d91ed1dcbdf Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 8 Nov 2023 15:23:13 +0100 Subject: [PATCH 439/470] Fix weird sign-issue CURA-11291 --- src/PrimeTower.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 8b4ddba358..71fc15635e 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -102,8 +102,9 @@ void PrimeTower::generateGroundpoly() void PrimeTower::generatePaths(const SliceDataStorage& storage) { - would_have_actual_tower = storage.max_print_height_second_to_last_extruder - >= -Raft::getTotalExtraLayers() + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. + const int raft_total_extra_layers = Raft::getTotalExtraLayers(); + would_have_actual_tower + = storage.max_print_height_second_to_last_extruder >= -raft_total_extra_layers + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. if (would_have_actual_tower && enabled) { generatePaths_denseInfill(); From 7dd21fe878058f9cab8e8489e9e38cb978f53dd2 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Wed, 8 Nov 2023 14:23:56 +0000 Subject: [PATCH 440/470] Applied clang-format. --- src/PrimeTower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 71fc15635e..8890ff7b13 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -103,8 +103,8 @@ void PrimeTower::generateGroundpoly() void PrimeTower::generatePaths(const SliceDataStorage& storage) { const int raft_total_extra_layers = Raft::getTotalExtraLayers(); - would_have_actual_tower - = storage.max_print_height_second_to_last_extruder >= -raft_total_extra_layers + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. + would_have_actual_tower = storage.max_print_height_second_to_last_extruder + >= -raft_total_extra_layers + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. if (would_have_actual_tower && enabled) { generatePaths_denseInfill(); From d5097479ba10903be9c7f2f9a6fb5bdb6f7bd277 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 9 Nov 2023 14:24:17 +0100 Subject: [PATCH 441/470] Fix possibly wrong disallowed areas computation CURA-11293 --- src/sliceDataStorage.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index fbd4a5d1a9..2d45da94f2 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -560,9 +560,14 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const Polygons disallowed_areas = mesh_group_settings.get("machine_disallowed_areas"); disallowed_areas = disallowed_areas.unionPolygons(); // union overlapping disallowed areas - for (PolygonRef poly : disallowed_areas) - for (Point& p : poly) - p = Point(machine_size.max.x / 2 + p.X, machine_size.max.y / 2 - p.Y); // apparently the frontend stores the disallowed areas in a different coordinate system + + // The disallowed areas are always expressed in buildplate-centered coordinates + if (! mesh_group_settings.get("machine_center_is_zero")) + { + for (PolygonRef poly : disallowed_areas) + for (Point& p : poly) + p = Point(machine_size.max.x / 2 + p.X, machine_size.max.y / 2 - p.Y); + } std::vector extruder_is_used = getExtrudersUsed(); From 5f3b59aea5ab78b7552c7c61ed14865f3f79b6a0 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 9 Nov 2023 15:50:57 +0100 Subject: [PATCH 442/470] Update src/sliceDataStorage.cpp Co-authored-by: Casper Lamboo --- src/sliceDataStorage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 2d45da94f2..026aa9b9ea 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -565,8 +565,12 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const if (! mesh_group_settings.get("machine_center_is_zero")) { for (PolygonRef poly : disallowed_areas) + { for (Point& p : poly) + { p = Point(machine_size.max.x / 2 + p.X, machine_size.max.y / 2 - p.Y); + } + } } std::vector extruder_is_used = getExtrudersUsed(); From 52ee9bc8d827724a36b1fd47f10c534bba1a9300 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 9 Nov 2023 16:30:41 +0100 Subject: [PATCH 443/470] Better code documentation CURA-11293 --- src/sliceDataStorage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 026aa9b9ea..0dddecb5b7 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -561,7 +561,8 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const Polygons disallowed_areas = mesh_group_settings.get("machine_disallowed_areas"); disallowed_areas = disallowed_areas.unionPolygons(); // union overlapping disallowed areas - // The disallowed areas are always expressed in buildplate-centered coordinates + // The disallowed areas are expressed in buildplate-centered coordinates, but the models + // may be expressed in front-left-centered coordinantes, so in this case we need to translate them if (! mesh_group_settings.get("machine_center_is_zero")) { for (PolygonRef poly : disallowed_areas) From 723f66e01ab7aa405d1abae0daeb0a3fd9d07221 Mon Sep 17 00:00:00 2001 From: Remco Burema <41987080+rburema@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:34:16 +0100 Subject: [PATCH 444/470] Should be '+0' instead. To align with the behaviour before the raft fix. CURA-11291 --- src/PrimeTower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrimeTower.cpp b/src/PrimeTower.cpp index 8890ff7b13..d2761327eb 100644 --- a/src/PrimeTower.cpp +++ b/src/PrimeTower.cpp @@ -104,7 +104,7 @@ void PrimeTower::generatePaths(const SliceDataStorage& storage) { const int raft_total_extra_layers = Raft::getTotalExtraLayers(); would_have_actual_tower = storage.max_print_height_second_to_last_extruder - >= -raft_total_extra_layers + 1; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. + >= -raft_total_extra_layers; // Maybe it turns out that we don't need a prime tower after all because there are no layer switches. if (would_have_actual_tower && enabled) { generatePaths_denseInfill(); From fdffc4f77e126d10b62836c9d138b75089f0e0ad Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 13 Nov 2023 10:47:07 +0100 Subject: [PATCH 445/470] Add extruder start/end gcode duration settings CURA-11099 --- src/gcodeExport.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index 2ef08a0474..a3efbe2a52 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -1254,8 +1254,8 @@ void GCodeExport::startExtruder(const size_t new_extruder) assert(getCurrentExtrudedVolume() == 0.0 && "Just after an extruder switch we haven't extruded anything yet!"); resetExtrusionValue(); // zero the E value on the new extruder, just to be sure - const std::string start_code = Application::getInstance().current_slice->scene.extruders[new_extruder].settings.get("machine_extruder_start_code"); - + const auto extruder_settings = Application::getInstance().current_slice->scene.extruders[new_extruder].settings; + const auto start_code = extruder_settings.get("machine_extruder_start_code"); if (! start_code.empty()) { if (relative_extrusion) @@ -1271,6 +1271,9 @@ void GCodeExport::startExtruder(const size_t new_extruder) } } + const auto start_code_duration = extruder_settings.get("machine_extruder_start_code_duration"); + estimateCalculator.addTime(start_code_duration); + Application::getInstance().communication->setExtruderForSend(Application::getInstance().current_slice->scene.extruders[new_extruder]); Application::getInstance().communication->sendCurrentPosition(getPositionXY()); @@ -1302,7 +1305,7 @@ void GCodeExport::switchExtruder(size_t new_extruder, const RetractionConfig& re resetExtrusionValue(); // zero the E value on the old extruder, so that the current_e_value is registered on the old extruder - const std::string end_code = old_extruder_settings.get("machine_extruder_end_code"); + const auto end_code = old_extruder_settings.get("machine_extruder_end_code"); if (! end_code.empty()) { @@ -1319,6 +1322,9 @@ void GCodeExport::switchExtruder(size_t new_extruder, const RetractionConfig& re } } + const auto end_code_duration = old_extruder_settings.get("machine_extruder_end_code_duration"); + estimateCalculator.addTime(end_code_duration); + startExtruder(new_extruder); } From df83ec631562e80e443a22fba26bab4fd151efa2 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Mon, 13 Nov 2023 09:47:52 +0000 Subject: [PATCH 446/470] Applied clang-format. --- src/gcodeExport.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp index a3efbe2a52..629f7b824b 100644 --- a/src/gcodeExport.cpp +++ b/src/gcodeExport.cpp @@ -3,6 +3,13 @@ #include "gcodeExport.h" +#include +#include +#include +#include + +#include + #include "Application.h" //To send layer view data. #include "ExtruderTrain.h" #include "PrintFeature.h" @@ -14,13 +21,6 @@ #include "utils/Date.h" #include "utils/string.h" // MMtoStream, PrecisionedDouble -#include - -#include -#include -#include -#include - namespace cura { From a875046e28fb18b3c87f59f4d6260e5cfe129e53 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 14 Nov 2023 15:45:51 +0100 Subject: [PATCH 447/470] Fix unit-tests. There's still a failure happening _sometimes_ (sigh) but that isn't related to the current ticket as far as I can see. part of CURA-11099 --- tests/GCodeExportTest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/GCodeExportTest.cpp b/tests/GCodeExportTest.cpp index 3fb07c9be9..0fd1bdba28 100644 --- a/tests/GCodeExportTest.cpp +++ b/tests/GCodeExportTest.cpp @@ -459,14 +459,21 @@ TEST_F(GCodeExportTest, SwitchExtruderSimple) scene.extruders.emplace_back(0, nullptr); ExtruderTrain& train1 = scene.extruders.back(); + train1.settings.add("machine_extruder_start_code", ";FIRST EXTRUDER START G-CODE!"); train1.settings.add("machine_extruder_end_code", ";FIRST EXTRUDER END G-CODE!"); + train1.settings.add("machine_extruder_start_code_duration", "0.0"); + train1.settings.add("machine_extruder_end_code_duration", "0.0"); train1.settings.add("machine_firmware_retract", "True"); train1.settings.add("retraction_enable", "True"); + scene.extruders.emplace_back(1, nullptr); ExtruderTrain& train2 = scene.extruders.back(); + train2.settings.add("machine_extruder_start_code", ";SECOND EXTRUDER START G-CODE!"); train2.settings.add("machine_extruder_end_code", ";SECOND EXTRUDER END G-CODE!"); + train2.settings.add("machine_extruder_start_code_duration", "0.0"); + train2.settings.add("machine_extruder_end_code_duration", "0.0"); train2.settings.add("machine_firmware_retract", "True"); train2.settings.add("retraction_enable", "True"); From bad8af44b1129f2a4f52b645c62c1c8db24f6818 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 15 Nov 2023 13:59:01 +0100 Subject: [PATCH 448/470] set version to 5.7.0-alpha Contribute to CURA-10831 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index b3e464843a..6221b6c38a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CuraEngineConan(ConanFile): def set_version(self): if not self.version: - self.version = "5.6.0-beta.1" + self.version = "5.7.0-alpha" def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) From 80cb837ec97f8cbcab144bc4611485a685a4931d Mon Sep 17 00:00:00 2001 From: Thomas Rahm <67757218+ThomasRahm@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:34:13 +0100 Subject: [PATCH 449/470] Fix tree support fake roof for large areas --- include/sliceDataStorage.h | 3 ++- src/TreeSupportTipGenerator.cpp | 2 +- src/sliceDataStorage.cpp | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 6db1cd605a..56a3e264c6 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -243,7 +243,8 @@ class SupportLayer const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above = 0, - const bool unionAll = false); + const bool unionAll = false, + const coord_t custom_line_distance = 0); }; class SupportStorage diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 094a819544..8227a3b001 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1165,7 +1165,7 @@ void TreeSupportTipGenerator::generateTips( if (use_fake_roof) { storage.support.supportLayers[layer_idx] - .fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, support_roof_line_distance, config.maximum_move_distance); + .fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, 0, config.maximum_move_distance, false, support_roof_line_distance); placed_support_lines_support_areas[layer_idx].add(TreeSupportUtils::generateSupportInfillLines( support_roof_drawn[layer_idx], config, diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 0dddecb5b7..03cd345f01 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -721,7 +721,8 @@ void SupportLayer::fillInfillParts( const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above /*has default 0*/, - const bool unionAll /*has default false*/) + const bool unionAll /*has default false*/, + const coord_t custom_line_distance /*has default 0*/) { const Polygons& support_this_layer = support_fill_per_layer[layer_nr]; const Polygons& support_layer_above @@ -732,7 +733,7 @@ void SupportLayer::fillInfillParts( { for (const PolygonsPart& island_outline : support_areas.splitIntoParts(unionAll)) { - support_infill_parts.emplace_back(island_outline, support_line_width, use_fractional_config, wall_line_count); + support_infill_parts.emplace_back(island_outline, support_line_width, use_fractional_config, wall_line_count, custom_line_distance); } use_fractional_config = false; } From f0b9c259f68b2fa423f38bc8eea6d630e142db9e Mon Sep 17 00:00:00 2001 From: Thomas Rahm <67757218+ThomasRahm@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:40:16 +0100 Subject: [PATCH 450/470] Add documentation for the new parameter introduced in previous commit. Also added documentation for the custom_line_distance variable of SupportInfillPart --- include/SupportInfillPart.h | 2 +- include/sliceDataStorage.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 1767847cb7..7b1c94c8f0 100644 --- a/include/SupportInfillPart.h +++ b/include/SupportInfillPart.h @@ -33,7 +33,7 @@ class SupportInfillPart // for infill_areas[x][n], x means the density level and n means the thickness std::vector wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx. - coord_t custom_line_distance; + coord_t custom_line_distance;//!< The distance between support infill lines. 0 means use the default line distance instead. bool use_fractional_config; //!< Request to use the configuration used to fill a partial layer height here, instead of the normal full layer height configuration. SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0); diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 56a3e264c6..e4cef05de3 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -236,6 +236,7 @@ class SupportLayer * \param wall_line_count Wall-line count around the fill. * \param grow_layer_above (optional, default to 0) In cases where support shrinks per layer up, an appropriate offset may be nescesary. * \param unionAll (optional, default to false) Wether to 'union all' for the split into parts bit. + * \param custom_line_distance (optional, default to 0) Distance between lines of the infill pattern. custom_line_distance of 0 means use the default instead. */ void fillInfillParts( const LayerIndex layer_nr, From 8f4caaff8732ad27877bbfbf34e9c18372bd9034 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 20 Nov 2023 15:26:52 +0100 Subject: [PATCH 451/470] Add SVG writer for voronoi diagrams CURA-11361 --- include/utils/SVG.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/include/utils/SVG.h b/include/utils/SVG.h index c4418ef86f..2a4d4cbe55 100644 --- a/include/utils/SVG.h +++ b/include/utils/SVG.h @@ -4,6 +4,9 @@ #ifndef SVG_H #define SVG_H +#include + +#include #include // for file output #include "AABB.h" @@ -188,6 +191,34 @@ class SVG : NoCopy */ void writeCoordinateGrid(const coord_t grid_size = MM2INT(1), const Color color = Color::BLACK, const float stroke_width = 0.1, const float font_size = 10) const; + /*! + * Draws the provided Voronoi diagram. + * + * @tparam T numeric type + * @param voronoi The Voronoi diagram to draw. + * @param color The colour to draw the diagram with. + * @param stroke_width The width of the lines. + */ + template + void writeVoronoiDiagram(const boost::polygon::voronoi_diagram& voronoi_diagram, const Color color = Color::BLACK, const float stroke_width = 0.1) const { + for (const auto& edge: voronoi_diagram.edges()) + { + if (!edge.is_finite()) + { + continue; + } + + const auto& v0 = edge.vertex0(); + const auto& v1 = edge.vertex1(); + + if (v0 == nullptr || v1 == nullptr) + { + continue; + } + + writeLine(Point(v0->x(), v0->y()), Point(v1->x(), v1->y()), color, stroke_width); + } + } }; template From 6b6dd0f8d32d1429ecd408ff585c421deb88a917 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 20 Nov 2023 15:43:33 +0100 Subject: [PATCH 452/470] Add polygon wkt reading/writing CURA-11361 --- include/utils/polygon.h | 15 ++++++++++ src/utils/polygon.cpp | 64 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 6 deletions(-) diff --git a/include/utils/polygon.h b/include/utils/polygon.h index 5d9c4c737c..9f32b5fa72 100644 --- a/include/utils/polygon.h +++ b/include/utils/polygon.h @@ -1509,6 +1509,21 @@ class Polygons } Polygons offset(const std::vector& offset_dists) const; + + /*! + * @brief Export the polygon to a WKT string + * + * @param stream The stream to write to + */ + void writeWkt(std::ostream& stream) const; + + /*! + * @brief Import the polygon from a WKT string + * + * @param wkt The WKT string to read from + * @return Polygons The polygons read from the stream + */ + static Polygons fromWkt(const std::string& wkt); }; /*! diff --git a/src/utils/polygon.cpp b/src/utils/polygon.cpp index 5c8884a6ad..d89381078b 100644 --- a/src/utils/polygon.cpp +++ b/src/utils/polygon.cpp @@ -3,18 +3,21 @@ #include "utils/polygon.h" -#include #include -#include -#include +#include +#include +#include +#include +#include +#include #include - -#include "utils/linearAlg2D.h" // pointLiesOnTheRightOfLine +#include +#include #include "utils/ListPolyIt.h" - #include "utils/PolylineStitcher.h" +#include "utils/linearAlg2D.h" // pointLiesOnTheRightOfLine namespace cura { @@ -775,6 +778,55 @@ Polygons Polygons::toPolygons(ClipperLib::PolyTree& poly_tree) return ret; } +Polygons Polygons::fromWkt(const std::string& wkt) +{ + typedef boost::geometry::model::d2::point_xy point_type; + typedef boost::geometry::model::polygon polygon_type; + + polygon_type poly; + boost::geometry::read_wkt(wkt, poly); + + Polygons ret; + + Polygon outer; + for (const auto& point: poly.outer()) + { + outer.add(Point(point.x(), point.y())); + } + ret.add(outer); + + for (const auto& hole: poly.inners()) + { + Polygon inner; + for (const auto& point: hole) + { + inner.add(Point(point.x(), point.y())); + } + ret.add(inner); + } + + return ret; +} + +void Polygons::writeWkt(std::ostream& stream) const +{ + stream << "POLYGON ("; + const auto paths_str = paths + | ranges::views::transform([](const auto& path) { + const auto path_str + = path + | ranges::views::transform([](const auto& point) { return fmt::format("{} {}", point.X, point.Y); }) + | ranges::views::join(ranges::views::c_str(", ")) + | ranges::to(); + return "(" + path_str + ")"; + }) + | ranges::views::join(ranges::views::c_str(" ")) + | ranges::to(); + + stream << paths_str; + stream << ")"; +} + bool ConstPolygonRef::smooth_corner_complex(const Point p1, ListPolyIt& p0_it, ListPolyIt& p2_it, const int64_t shortcut_length) { // walk away from the corner until the shortcut > shortcut_length or it would smooth a piece inward From 30c0e14696c150abe809bc83d4b1401f3783dbbc Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 20 Nov 2023 19:51:25 +0100 Subject: [PATCH 453/470] Add unit tests CURA-11362 --- CMakeLists.txt | 2 +- src/WallsComputation.cpp | 59 + tests/CMakeLists.txt | 1 + tests/ReadTestSettings.cpp | 43 + tests/ReadTestSettings.h | 13 + tests/VoronoiCrashTest.cpp | 137 ++ .../voronoi_crash_resources/settings_001.txt | 637 ++++++++++ .../voronoi_crash_resources/settings_002.txt | 1090 ++++++++++++++++ .../voronoi_crash_resources/settings_003.txt | 1091 ++++++++++++++++ .../voronoi_crash_resources/settings_004.txt | 1091 ++++++++++++++++ .../voronoi_crash_resources/settings_005.txt | 1092 ++++++++++++++++ .../voronoi_crash_resources/settings_006.txt | 1092 ++++++++++++++++ .../voronoi_crash_resources/settings_007.txt | 1092 ++++++++++++++++ .../voronoi_crash_resources/settings_008.txt | 1114 +++++++++++++++++ .../voronoi_crash_resources/settings_009.txt | 1114 +++++++++++++++++ .../voronoi_crash_resources/settings_010.txt | 1114 +++++++++++++++++ .../voronoi_crash_resources/settings_011.txt | 1089 ++++++++++++++++ .../slice_polygon_001.wkt | 1 + .../slice_polygon_002.wkt | 1 + .../slice_polygon_003.wkt | 1 + .../slice_polygon_004.wkt | 1 + .../slice_polygon_005.wkt | 1 + .../slice_polygon_006.wkt | 1 + .../slice_polygon_007.wkt | 1 + .../slice_polygon_008.wkt | 1 + .../slice_polygon_009.wkt | 1 + .../slice_polygon_010.wkt | 1 + .../slice_polygon_011.wkt | 1 + 28 files changed, 11881 insertions(+), 1 deletion(-) create mode 100644 tests/ReadTestSettings.cpp create mode 100644 tests/ReadTestSettings.h create mode 100644 tests/VoronoiCrashTest.cpp create mode 100644 tests/voronoi_crash_resources/settings_001.txt create mode 100644 tests/voronoi_crash_resources/settings_002.txt create mode 100644 tests/voronoi_crash_resources/settings_003.txt create mode 100644 tests/voronoi_crash_resources/settings_004.txt create mode 100644 tests/voronoi_crash_resources/settings_005.txt create mode 100644 tests/voronoi_crash_resources/settings_006.txt create mode 100644 tests/voronoi_crash_resources/settings_007.txt create mode 100644 tests/voronoi_crash_resources/settings_008.txt create mode 100644 tests/voronoi_crash_resources/settings_009.txt create mode 100644 tests/voronoi_crash_resources/settings_010.txt create mode 100644 tests/voronoi_crash_resources/settings_011.txt create mode 100644 tests/voronoi_crash_resources/slice_polygon_001.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_002.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_003.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_004.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_005.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_006.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_007.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_008.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_009.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_010.wkt create mode 100644 tests/voronoi_crash_resources/slice_polygon_011.wkt diff --git a/CMakeLists.txt b/CMakeLists.txt index 27fcdf5bd8..8c2aabc528 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,7 +244,7 @@ target_compile_definitions(CuraEngine PRIVATE VERSION=\"${CURA_ENGINE_VERSION}\" # Compiling the test environment. if (ENABLE_TESTING OR ENABLE_BENCHMARKS) - set(TESTS_HELPERS_SRC tests/ReadTestPolygons.cpp) + set(TESTS_HELPERS_SRC tests/ReadTestPolygons.cpp tests/ReadTestSettings.cpp) set(TESTS_SRC_ARCUS) if (ENABLE_ARCUS) diff --git a/src/WallsComputation.cpp b/src/WallsComputation.cpp index 09dfa368ed..76d55accc4 100644 --- a/src/WallsComputation.cpp +++ b/src/WallsComputation.cpp @@ -1,6 +1,15 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include +#include + +#include +#include +#include +#include +#include + #include "WallsComputation.h" #include "Application.h" #include "ExtruderTrain.h" @@ -84,6 +93,56 @@ void WallsComputation::generateWalls(SliceLayerPart* part, SectionType section_t */ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) { + // TODO remove this block before merging PR! + // This code exists to generate the test wkt, and setting files + { + std::ofstream SettingsFile("settings.txt"); + SettingsFile.clear(); + for (auto [key, value]: settings.getFlattendSettings()) + { + if (value == "") + { + continue; + } + SettingsFile << key << "=" << value << std::endl; + } + SettingsFile.close(); + + std::ofstream PolygonFile("slice_polygon.wkt"); + PolygonFile.clear(); + + std::vector multi_polygons; + for (const auto& part : layer->parts) + { + multi_polygons.push_back(part.outline); + } + + PolygonFile << "MULTIPOLYGON ("; + const auto paths_str + = multi_polygons + | ranges::views::transform([](const auto& path) { + const auto path_str + = path + | ranges::views::transform([](const auto& path) { + const auto path_str + = path + | ranges::views::transform([](const auto& point) { return fmt::format("{} {}", point.X, point.Y); }) + | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); + return "(" + path_str + ")"; + }) + | ranges::views::join(ranges::views::c_str(" ")) + | ranges::to(); + return "(" + path_str + ")"; + }) + | ranges::views::join(ranges::views::c_str(", ")) + | ranges::to(); + + PolygonFile << paths_str; + PolygonFile << ")"; + + PolygonFile.close(); + } + for(SliceLayerPart& part : layer->parts) { generateWalls(&part, section); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1e36893cee..92543609e6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,6 +14,7 @@ set(TESTS_SRC_BASE PathOrderMonotonicTest TimeEstimateCalculatorTest WallsComputationTest + VoronoiCrashTest ) set(TESTS_SRC_INTEGRATION diff --git a/tests/ReadTestSettings.cpp b/tests/ReadTestSettings.cpp new file mode 100644 index 0000000000..8c384e5053 --- /dev/null +++ b/tests/ReadTestSettings.cpp @@ -0,0 +1,43 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher. + +#include "ReadTestSettings.h" +#include +#include + +namespace cura +{ + +bool readTestSettings(const std::string& filename, Settings& settings) +{ + spdlog::info("filename: {}", filename); + + FILE* handle = std::fopen(filename.c_str(), "r"); + if (! handle) + { + spdlog::error("Failed to open file: {}", filename); + return false; + } + + while (true) + { + char key[100]; + char value[100]; + + int read = std::fscanf(handle, "%[a-zA-Z0-9_]=%[][a-zA-Z0-9_-.,:()/; ]\n", key, value); + + if (read == EOF) + { + break; + } + else if (read <= 0) + { + return false; + } + + settings.add(std::string(key), std::string(value)); + } + + return true; +} +} // namespace cura \ No newline at end of file diff --git a/tests/ReadTestSettings.h b/tests/ReadTestSettings.h new file mode 100644 index 0000000000..63f8d6d6fd --- /dev/null +++ b/tests/ReadTestSettings.h @@ -0,0 +1,13 @@ + +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher. + + +#include "settings/Settings.h" +#include +#include + +namespace cura +{ +bool readTestSettings(const std::string& filename, Settings& settings_out); +} \ No newline at end of file diff --git a/tests/VoronoiCrashTest.cpp b/tests/VoronoiCrashTest.cpp new file mode 100644 index 0000000000..d7cb2fdff6 --- /dev/null +++ b/tests/VoronoiCrashTest.cpp @@ -0,0 +1,137 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#include +#include +#include +#include + +#include "WallsComputation.h" //Unit under test. +#include "ReadTestSettings.h" +#include "settings/Settings.h" //Settings to generate walls with. +#include "sliceDataStorage.h" //Sl +#include "utils/polygon.h" //To create example polygons. + +#include +#include +#include +#include + +#include +#include + +namespace cura +{ + +class VoronoiCrashTest : public testing::TestWithParam> +{ +public: +}; + +std::vector multiPolygonsFromWkt(const std::string& wkt) +{ + typedef boost::geometry::model::d2::point_xy point_type; + typedef boost::geometry::model::polygon polygon_type; + typedef boost::geometry::model::multi_polygon multi_polygon_type; + + multi_polygon_type boost_polygons {}; + boost::geometry::read_wkt(wkt, boost_polygons); + + std::vector polygons; + + for (const auto& boost_polygon: boost_polygons) + { + Polygons polygon; + + Polygon outer; + for (const auto& point: boost_polygon.outer()) + { + outer.add(Point(point.x(), point.y())); + } + polygon.add(outer); + + for (const auto& hole: boost_polygon.inners()) + { + Polygon inner; + for (const auto& point: hole) + { + inner.add(Point(point.x(), point.y())); + } + polygon.add(inner); + } + + polygons.push_back(polygon); + } + return polygons; +} + +/*! + * + */ +TEST_P(VoronoiCrashTest, SectionsTest) +{ + const auto params = GetParam(); + const std::string polygon_file = std::get<0>(params); + const std::string setting_file = std::get<1>(params); + + spdlog::info("Testing polygon: {}", polygon_file); + spdlog::info("Testing with settings: {}", setting_file); + + std::ifstream file(polygon_file); + std::ostringstream ss; + ss << file.rdbuf(); + const auto shapes = multiPolygonsFromWkt(ss.str()); + + Settings settings; + auto read_settings = readTestSettings(setting_file, settings); + ASSERT_TRUE(read_settings); + + size_t wall_count = settings.get("wall_line_count"); + spdlog::info("wall_count: {}", wall_count); + + SliceLayer layer; + for (const Polygons& shape : shapes) + { + layer.parts.emplace_back(); + SliceLayerPart& part = layer.parts.back(); + part.outline.add(shape); + } + + LayerIndex layer_idx(100); + WallsComputation walls_computation(settings, layer_idx); + + walls_computation.generateWalls(&layer, SectionType::WALL); +} + + +const std::vector polygon_filenames = { + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_001.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_002.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_003.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_004.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_005.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_006.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_007.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_008.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_009.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_010.wkt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_011.wkt").string(), +}; + +const std::vector setting_filenames = { + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_001.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_002.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_003.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_004.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_005.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_006.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_007.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_008.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_009.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_010.txt").string(), + std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_011.txt").string(), +}; + +INSTANTIATE_TEST_SUITE_P(TestCrashingPolygons, VoronoiCrashTest, testing::Combine(testing::ValuesIn(polygon_filenames), testing::ValuesIn(setting_filenames))); + +} // namespace cura \ No newline at end of file diff --git a/tests/voronoi_crash_resources/settings_001.txt b/tests/voronoi_crash_resources/settings_001.txt new file mode 100644 index 0000000000..0626051682 --- /dev/null +++ b/tests/voronoi_crash_resources/settings_001.txt @@ -0,0 +1,637 @@ +wall_x_material_flow_roofing=97 +interlocking_depth=2 +machine_nozzle_size=0.4 +quality_changes_name=empty +raft_interface_line_width=1.2 +small_skin_on_surface=False +speed_support=96.0 +bridge_fan_speed_3=0 +ironing_inset=0.38 +meshfix_fluid_motion_small_distance=0.01 +jerk_wall_x=12.5 +cool_min_layer_time_fan_speed_max=11 +raft_fan_speed=0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +ooze_shield_dist=2 +interlocking_beam_layer_count=2 +raft_base_acceleration=300 +wall_extruder_nr=-1 +connect_infill_polygons=False +small_feature_speed_factor_0=50 +roofing_line_width=0.4 +material_break_retracted_position=-50 +material_initial_print_temperature=250 +jerk_skirt_brim=12.5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_line_width=0.3 +ooze_shield_enabled=False +retraction_min_travel=1.6 +acceleration_layer_0=300 +retraction_retract_speed=5 +support_bottom_line_distance=2.5 +support_interface_wall_count=2 +material_shrinkage_percentage=100.0 +raft_interface_jerk=12.5 +material_bed_temperature=95 +support_tree_rest_preference=graceful +prime_tower_min_volume=6 +sub_div_rad_add=0.4 +speed_wall_0_roofing=45 +bottom_skin_preshrink=0 +min_feature_size=0.1 +brim_replaces_support=True +support_interface_skip_height=0.2 +prime_tower_wipe_enabled=True +gantry_height=320 +material_surface_energy=70 +bridge_skin_material_flow=97 +clean_between_layers=False +skin_angles=[] +machine_steps_per_mm_z=50 +minimum_support_area=0.1 +roofing_monotonic=True +skin_overlap_mm=0.0 +small_feature_max_length=0.0 +bottom_thickness=1.0 +jerk_wall=12.5 +bridge_skin_support_threshold=50 +machine_extruder_count=2 +jerk_support_roof=12.5 +wall_0_material_flow_roofing=97 +skirt_gap=3 +meshfix=0 +acceleration_skirt_brim=300 +nozzle_offsetting_for_disallowed_areas=False +z_seam_position=backright +raft_surface_speed=55 +support_interface_height=0.4 +support_tower_roof_angle=0 +extruder_prime_pos_z=0 +roofing_angles=[] +jerk_ironing=12.5 +infill_wipe_dist=0 +speed_wall_x_roofing=65 +machine_max_feedrate_e=45 +prime_tower_line_width=1 +jerk_wall_x_roofing=12.5 +acceleration_wall_0_roofing=300 +material_extrusion_cool_down_speed=0.7 +wall_transition_angle=10 +infill_support_enabled=False +cool_fan_speed_0=0 +blackmagic=0 +support_brim_line_count=3 +adhesion_type=raft +brim_line_count=13 +support_roof_line_distance=0.25773195876288657 +support_interface_enable=True +bridge_skin_density_3=100 +center_object=False +skirt_brim_line_width=0.4 +cool_fan_full_layer=1 +raft_interface_layers=2 +adaptive_layer_height_variation=0.1 +hole_xy_offset_max_diameter=0 +raft_airgap=0.3 +wall_distribution_count=1 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +top_skin_preshrink=0 +minimum_roof_area=1.0 +machine_max_jerk_z=0.4 +support_tree_angle=50 +infill_material_flow=97 +support_structure=normal +wall_transition_filter_distance=100 +raft_interface_fan_speed=0.0 +material_break_preparation_retracted_position=-16 +infill_mesh=False +layer_height=0.2 +meshfix_extensive_stitching=False +magic_fuzzy_skin_thickness=0.3 +bottom_layers=5 +infill_multiplier=1 +support_skip_zag_per_mm=20 +support_interface_line_width=0.4 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +resolution=0 +speed_print=120.0 +optimize_wall_printing_order=True +line_width=0.4 +machine_minimum_feedrate=0.0 +raft_base_speed=5 +support_angle=50 +ironing_pattern=zigzag +layer_0_z_overlap=0.15 +speed_travel=250.0 +wall_line_width=0.4 +support_brim_enable=False +cool_fan_full_at_height=0 +acceleration_print_layer_0=300 +machine_extruders_share_heater=False +speed_wall_0=45 +cool_lift_head=False +raft_interface_acceleration=300 +raft_surface_fan_speed=0 +machine_center_is_zero=True +extruders_enabled_count=2 +speed_ironing=36.666666666666664 +default_material_bed_temperature=95 +wall_0_material_flow=97 +meshfix_maximum_extrusion_area_deviation=50000 +retraction_speed=5 +material_print_temp_prepend=True +dual=0 +support_bottom_enable=False +wall_line_count=2 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=12.0 +roofing_material_flow=97 +machine_width=410 +machine_max_feedrate_x=299792458000 +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=85 +switch_extruder_prime_speed=5 +wall_x_extruder_nr=-1 +min_bead_width=0.4 +roofing_layer_count=2 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +wipe_retraction_amount=0.75 +material_break_temperature=50 +speed_roofing=55 +material_standby_temperature=180 +brim_outside_only=True +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +retraction_enable=True +support_line_distance=2.5 +support_zag_skip_count=8 +material_type=empty +bridge_wall_speed=96.0 +support_bottom_offset=0 +layer_height_0=0.2 +support_initial_layer_line_distance=2.5 +support_z_distance=0.25 +meshfix_union_all=True +support_bottom_wall_count=2 +layer_start_x=0.0 +machine_min_cool_heat_time_window=15 +top_bottom_thickness=1.0 +wipe_retraction_retract_speed=5 +multiple_mesh_overlap=0 +acceleration_print=300 +support_bottom_pattern=lines +acceleration_travel_enabled=True +min_even_wall_line_width=0.4 +material_print_temperature=260 +interlocking_boundary_avoidance=2 +wall_0_material_flow_layer_0=110.00000000000001 +quality_name=Fast +speed_topbottom=55 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +group_outer_walls=True +wall_line_width_x=0.4 +jerk_support=12.5 +raft_base_thickness=0.8 +support_top_distance=0.25 +retraction_hop_after_extruder_switch=True +roofing_extruder_nr=-1 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +support_mesh=False +support_roof_pattern=lines +jerk_support_interface=12.5 +prime_tower_flow=97 +acceleration_ironing=300 +wall_x_material_flow_layer_0=95.0 +speed_print_layer_0=30 +top_skin_expand_distance=0.8 +mesh_position_z=0 +infill_overlap_mm=0.0 +conical_overhang_angle=50 +inset_direction=inside_out +remove_empty_first_layers=True +jerk_topbottom=12.5 +prime_tower_size=20 +wipe_retraction_enable=True +day=Mon +wipe_hop_amount=0.4 +support_join_distance=2.0 +meshfix_fluid_motion_shift_distance=0.1 +cool_min_layer_time=6 +switch_extruder_extra_prime_amount=0 +coasting_min_volume=0.8 +raft_surface_thickness=0.2 +prime_tower_enable=False +top_bottom=0 +cool_fan_speed=0 +material_anti_ooze_retraction_speed=5 +support_conical_enabled=False +brim_smart_ordering=True +interlocking_orientation=22.5 +min_skin_width_for_expansion=6.123233995736766e-17 +wall_x_material_flow=97 +xy_offset=0 +brim_inside_margin=2.5 +roofing_pattern=lines +cooling=0 +jerk_travel_layer_0=12.5 +infill_sparse_thickness=0.2 +ironing_line_spacing=0.1 +bridge_fan_speed=100 +support_material_flow=97 +support_tree_max_diameter=25 +hole_xy_offset=0 +material_anti_ooze_retracted_position=-4 +jerk_print_layer_0=12.5 +ironing_enabled=False +acceleration_travel=5000 +raft_base_extruder_nr=0 +acceleration_wall=300 +support_bottom_material_flow=97 +acceleration_wall_x=300 +flow_rate_extrusion_offset_factor=100 +carve_multiple_volumes=True +gradual_infill_steps=0 +machine_show_variants=False +acceleration_wall_x_roofing=300 +material_break_speed=25 +machine_max_jerk_xy=20.0 +cutting_mesh=False +infill_sparse_density=20 +support_roof_wall_count=2 +infill_extruder_nr=-1 +support=0 +infill_mesh_order=0 +retraction_prime_speed=5 +z_seam_type=sharpest_corner +ironing_only_highest_layer=False +raft_remove_inside_corners=False +acceleration_topbottom=300 +machine_settings=0 +travel_retract_before_outer_wall=False +machine_height=320 +prime_tower_base_size=10 +wipe_retraction_prime_speed=5 +wipe_pause=0 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=300 +material_alternate_walls=False +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +retraction_extra_prime_amount=0 +print_bed_temperature=95 +lightning_infill_support_angle=40 +support_interface_material_flow=97 +infill_overlap=0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=0.5 +machine_nozzle_temp_enabled=True +skirt_brim_speed=30 +support_bottom_distance=0.125 +machine_steps_per_mm_e=1600 +material_crystallinity=False +wall_thickness=0.8 +machine_acceleration=3000 +prime_tower_base_height=6 +fill_outline_gaps=True +top_layers=5 +support_offset=0.7 +material_flow=97 +mold_roof_height=0.5 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=95 +default_material_print_temperature=260 +speed_slowdown_layers=1 +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +support_xy_overrides_z=z_overrides_xy +acceleration_wall_0=300 +small_skin_width=0.8 +support_infill_angles=[] +shell=0 +support_meshes_present=False +raft_interface_speed=30.0 +travel_avoid_distance=3 +meshfix_maximum_resolution=0.6 +wipe_repeat_count=5 +magic_fuzzy_skin_enabled=False +jerk_enabled=True +support_xy_distance_overhang=0.15 +material_flush_purge_length=60 +machine_nozzle_heat_up_speed=3.5 +raft_interface_line_spacing=1.4 +retraction_extrusion_window=0 +support_fan_enable=False +adaptive_layer_height_threshold=0.2 +lightning_infill_overhang_angle=40 +support_conical_min_width=10 +adaptive_layer_height_variation_step=0.01 +raft_surface_jerk=12.5 +infill_support_angle=40 +cool_fan_speed_max=100 +cool_fan_enabled=False +wall_overhang_angle=90 +cool_min_speed=9 +wipe_retraction_speed=5 +retraction_amount=0.75 +acceleration_support_interface=300 +speed_z_hop=10 +lightning_infill_prune_angle=40 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +min_wall_line_width=0.4 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +raft_acceleration=300 +material_is_support_material=False +machine_max_acceleration_z=100 +support_wall_count=0 +mesh_rotation_matrix=[] +skin_edge_support_thickness=0.8 +support_bottom_stair_step_min_slope=10.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +conical_overhang_hole_size=0 +jerk_travel_enabled=True +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=2 +extruder_prime_pos_abs=True +material_adhesion_tendency=0 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=55 +support_extruder_nr=0 +extruder_prime_pos_y=0 +support_type=everywhere +skin_edge_support_layers=4 +cool_fan_speed_min=0 +wipe_move_distance=20 +top_bottom_pattern_0=lines +alternate_extra_perimeter=False +support_roof_enable=True +skin_material_flow_layer_0=95 +wall_0_inset=0 +relative_extrusion=False +mold_width=5 +adhesion_extruder_nr=0 +small_hole_max_size=0 +material=0 +material_bed_temp_prepend=True +infill_before_walls=False +zig_zaggify_support=True +wipe_hop_enable=True +bridge_skin_material_flow_3=97 +bridge_fan_speed_2=50.0 +support_interface_pattern=lines +initial_bottom_layers=5 +wall_line_width_0=0.4 +support_tree_top_rate=30 +cross_infill_pocket_size=2.0 +interlocking_enable=False +support_bottom_line_width=0.6 +draft_shield_height=10 +z_seam_x=205.0 +machine_always_write_active_tool=False +retraction_combing_max_distance=25.0 +skin_line_width=0.4 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +bottom_skin_expand_distance=0.8 +bridge_skin_speed_2=55 +print_sequence=all_at_once +skin_overlap=0 +speed_infill=120.0 +material_shrinkage_percentage_z=100.0 +material_guid=88c8919c-6a09-471a-b7b6-e801263d862d +infill_pattern=lines +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +support_xy_distance=0.2 +speed_wall=96.0 +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=True +switch_extruder_retraction_speeds=5 +machine_firmware_retract=False +speed_equalize_flow_width_factor=0 +acceleration_travel_layer_0=5000 +wipe_brush_pos_x=100 +machine_nozzle_id=1XA +machine_heated_build_volume=True +support_conical_angle=30 +initial_layer_line_width_factor=100.0 +raft_base_line_spacing=2.8 +max_extrusion_before_wipe=10 +speed_support_infill=96.0 +support_tree_limit_branch_reach=True +support_extruder_nr_layer_0=0 +meshfix_maximum_travel_resolution=0.8 +retraction_hop_enabled=True +raft_surface_extruder_nr=0 +switch_extruder_retraction_speed=5 +acceleration_roofing=300 +meshfix_fluid_motion_angle=15 +top_thickness=1.0 +acceleration_enabled=True +support_roof_extruder_nr=0 +jerk_print=12.5 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.4 +wall_0_extruder_nr=-1 +infill_line_distance=2.0 +minimum_bottom_area=1.0 +support_pattern=lines +support_tree_min_height_to_model=3 +support_interface_offset=0 +meshfix_keep_open_polygons=False +skin_monotonic=True +machine_max_acceleration_y=9000 +retraction_hop=0.4 +jerk_wall_0=12.5 +support_infill_extruder_nr=0 +speed_prime_tower=30.0 +infill=0 +coasting_speed=90 +brim_width=5 +skin_preshrink=0 +magic_spiralize=False +raft_interface_thickness=0.3 +jerk_prime_tower=12.5 +skin_outline_count=0 +support_interface_priority=interface_area_overwrite_support_area +machine_steps_per_mm_x=50 +prime_tower_position_x=138.8 +bridge_wall_min_length=1.6 +experimental=0 +z_seam_relative=False +wipe_retraction_extra_prime_amount=0 +infill_offset_x=0 +material_shrinkage_percentage_xy=100.0 +bridge_wall_material_flow=97 +support_bottom_density=24 +skin_material_flow=92.14999999999999 +support_tree_branch_reach_limit=30 +date=20-11-2023 +wipe_hop_speed=10 +zig_zaggify_infill=True +material_name=empty +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +meshfix_union_all_remove_holes=False +wall_material_flow=97 +retraction_combing=off +material_flow_layer_0=100 +initial_extruder_nr=0 +z_seam_corner=z_seam_corner_none +machine_head_with_fans_polygon=[] +raft_base_line_width=1.4 +bridge_skin_density=100 +ironing_flow=10.0 +draft_shield_enabled=False +infill_angles=[] +travel_avoid_supports=False +acceleration_infill=300 +support_skip_some_zags=False +material_end_of_filament_purge_speed=0.5 +machine_max_jerk_e=5.0 +raft_margin=3 +support_interface_angles=[] +support_roof_height=1.015 +smooth_spiralized_contours=True +xy_offset_layer_0=0 +support_roof_offset=0 +acceleration_support_roof=300 +material_print_temp_wait=True +support_roof_angles=[] +machine_gcode_flavor=Griffin +wall_overhang_speed_factor=100 +jerk_support_infill=12.5 +wall_0_wipe_dist=0 +jerk_wall_0_roofing=12.5 +retract_at_layer_change=False +wall_transition_length=0.4 +speed_travel_layer_0=250.0 +conical_overhang_enabled=False +travel=0 +jerk_roofing=12.5 +machine_shape=rectangular +material_bed_temp_wait=True +machine_depth=320 +ironing_monotonic=False +mesh_position_y=0 +infill_randomize_start_location=False +raft_base_jerk=12.5 +speed_wall_x=65 +time=17:54:18 +machine_buildplate_type=glass +machine_nozzle_head_distance=3 +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.04 +platform_adhesion=0 +prime_tower_raft_base_line_spacing=1.4 +support_bottom_stair_step_width=5.0 +material_flush_purge_speed=0.5 +material_break_preparation_temperature=260 +wall_transition_filter_deviation=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +travel_avoid_other_parts=False +support_tree_angle_slow=33.333333333333336 +support_bottom_angles=[] +speed_support_roof=55 +skin_no_small_gaps_heuristic=False +raft_surface_acceleration=300 +machine_extruders_share_nozzle=False +support_bottom_height=0.4 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +machine_scale_fan_speed_zero_to_one=False +infill_enable_travel_optimization=True +speed_layer_0=30 +jerk_travel=12.5 +alternate_carve_order=True +support_roof_material_flow=97 +machine_max_feedrate_y=299792458000 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +material_brand=empty_brand +prime_blob_enable=False +support_tree_tip_diameter=0.6 +speed_support_bottom=55 +bridge_skin_density_2=100 +support_tower_diameter=3.0 +mold_angle=40 +raft_speed=15 +acceleration_support=300 +jerk_layer_0=12.5 +cool_min_temperature=250 +slicing_tolerance=middle +machine_heat_zone_length=16 +magic_mesh_surface_mode=normal +top_bottom_extruder_nr=-1 +retraction_hop_after_extruder_switch_height=0.4 +acceleration_prime_tower=300 +jerk_infill=12.5 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +bridge_wall_coast=0 +material_id=empty_material +retraction_count_max=100 +skirt_line_count=1 +support_interface_density=100 +coasting_enable=False +support_bottom_extruder_nr=0 +bridge_enable_more_layers=True +command_line_settings=0 +skirt_brim_extruder_nr=0 +mesh_position_x=0 +prime_tower_position_y=118.80000000000001 +expand_skins_expand_distance=0.8 +support_enable=True +skirt_height=3 +machine_endstop_positive_direction_y=False +z_seam_y=160.0 +bridge_skin_material_flow_2=97 +speed_support_interface=55 +machine_max_acceleration_x=9000 +gradual_support_infill_steps=0 +skirt_brim_minimal_length=500 +raft_surface_layers=2 +raft_surface_line_width=0.4 +support_mesh_drop_down=True +support_roof_density=97 +machine_max_feedrate_z=299792458000 +material_print_temperature_layer_0=260 +bridge_settings_enabled=True +raft_base_fan_speed=0 +skirt_brim_material_flow=97 +bridge_skin_speed=55 +machine_nozzle_cool_down_speed=0.8 +material_final_print_temperature=250 +travel_speed=500 +speed=0 +print_temperature=210 +support_bottom_stair_step_height=0 +jerk_support_bottom=12.5 +acceleration_support_infill=300 +brim_gap=0 +infill_offset_y=0 +mold_enabled=False +support_use_towers=False +support_roof_line_width=0.25 +max_skin_angle_for_expansion=90 +bridge_sparse_infill_max_density=50 +draft_shield_height_limitation=full +top_bottom_pattern=lines +machine_max_acceleration_e=10000 +draft_shield_dist=10 +anti_overhang_mesh=False +gradual_support_infill_step_height=0.8 +raft_jerk=12.5 \ No newline at end of file diff --git a/tests/voronoi_crash_resources/settings_002.txt b/tests/voronoi_crash_resources/settings_002.txt new file mode 100644 index 0000000000..2da8498c4c --- /dev/null +++ b/tests/voronoi_crash_resources/settings_002.txt @@ -0,0 +1,1090 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=25.0 +support_roof_material_flow=100 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_extruder_nr=0 +support_bottom_height=0.8 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.0 +machine_depth=235 +adhesion_type=raft +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +machine_heated_build_volume=False +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +time=18:43:21 +machine_buildplate_type=glass +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=235 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=0.2 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=cubic +support_structure=normal +clean_between_layers=False +speed_prime_tower=25.0 +speed_wall_x=25.0 +support_bottom_stair_step_height=0 +draft_shield_enabled=False +support_roof_height=0.8 +raft_surface_line_spacing=0.4 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=50 +machine_max_jerk_e=5 +raft_margin=5 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=8.0 +travel_avoid_supports=True +acceleration_infill=500 +acceleration_support_roof=500 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.24 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +acceleration_support_infill=500 +brim_gap=0 +machine_max_acceleration_y=500 +meshfix_maximum_deviation=0.025 +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.12 +conical_overhang_angle=50 +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=50 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=4.898587196589413e-17 +raft_interface_line_width=0.8 +machine_height=250 +travel_retract_before_outer_wall=True +jerk_support_interface=8 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.8 +material_print_temp_prepend=True +support_bottom_line_distance=2.4000240002400024 +jerk_support_bottom=8 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0.2 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=0 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=8 +support_roof_pattern=grid +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +experimental=0 +bridge_wall_min_length=1 +prime_tower_position_x=227.79999999999998 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=500 +interlocking_orientation=22.5 +jerk_support=8 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +retraction_extrusion_window=10 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +speed_wall=25.0 +support_xy_distance=0.8 +infill_wipe_dist=0.0 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=205.79999999999998 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +machine_max_feedrate_z=10 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +top_bottom_extruder_nr=-1 +retraction_hop=0.2 +jerk_wall_0=8 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=10 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=210 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=False +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +material_type=empty +support_zag_skip_count=10 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=10.0 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=0 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=500 +travel_speed=150.0 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +support_z_distance=0.2 +meshfix_union_all=True +z_seam_corner=z_seam_corner_weighted +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +acceleration_support=500 +jerk_layer_0=8 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.04 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=2 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=10 +infill_line_distance=6.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +material_bed_temperature=50 +support_tree_rest_preference=graceful +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=25.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=500 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +anti_overhang_mesh=False +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +bridge_skin_material_flow_2=100 +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=25.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=off +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=0 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=30.0 +jerk_wall=8 +interlocking_beam_layer_count=2 +support_interface_material_flow=100 +infill_overlap=30.0 +print_bed_temperature=50 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=25.0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=4 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +raft_base_fan_speed=0 +bridge_settings_enabled=True +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +retraction_hop_after_extruder_switch_height=0.2 +acceleration_prime_tower=500 +machine_max_feedrate_y=500 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=33.333 +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=8 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.8 +acceleration_enabled=False +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=117.5 +retraction_combing_max_distance=30 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +raft_interface_thickness=0.30000000000000004 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +support_bottom_line_width=0.4 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=everywhere +jerk_travel_layer_0=8 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=50 +skirt_line_count=3 +material_id=empty_material +retraction_count_max=100 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=8 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=50.0 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=back +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=18.75 +support_angle=45 +machine_max_feedrate_x=500 +machine_width=235 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=grid +acceleration_print=500 +material_flush_purge_speed=0.5 +minimum_interface_area=10 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=8 +bridge_wall_coast=100 +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=True +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.2 +speed_travel=150.0 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +machine_max_acceleration_e=5000 +roofing_layer_count=0 +skin_preshrink=0.8 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=True +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=25 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=True +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=500 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +speed_support=25.0 +retraction_min_travel=1.5 +ooze_shield_enabled=False +support_line_width=0.4 +jerk_roofing=8 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=2 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=45 +machine_max_jerk_z=0.4 +cool_min_layer_time=10 +speed_z_hop=5 +xy_offset_layer_0=0 +jerk_support_roof=8 +machine_extruder_count=1 +material_final_print_temperature=210 +jerk_travel=8 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.1 +support_interface_height=0.8 +support_brim_enable=True +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +acceleration_travel=500 +support_bottom_material_flow=100 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=500 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=8 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +speed_support_bottom=25.0 +support_roof_material_flow=100 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_bottom_height=0.8 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.0 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +support_infill_sparse_thickness=0.2 +skin_overlap=10.0 +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=200 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=235 +support_xy_distance=0.8 +speed_wall=25.0 +skin_edge_support_layers=0 +speed_topbottom=25.0 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=25.0 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +connect_skin_polygons=False +infill_pattern=cubic +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=0 +skin_edge_support_thickness=0 +support_roof_height=0.8 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=45 +travel_avoid_supports=True +acceleration_infill=500 +skin_outline_count=1 +jerk_prime_tower=8 +machine_nozzle_id=unknown +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=500 +brim_gap=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=4 +support_interface_pattern=grid +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_x_material_flow=100 +min_skin_width_for_expansion=4.898587196589413e-17 +cross_infill_pocket_size=12.0 +support_tree_top_rate=30 +wall_line_width_0=0.4 +acceleration_travel=500 +support_bottom_material_flow=100 +acceleration_wall=500 +ironing_enabled=True +wipe_pause=0 +wipe_retraction_prime_speed=45 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=500 +meshfix=0 +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0.2 +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +wipe_retraction_amount=5 +material_break_temperature=50 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=5 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +prime_tower_line_width=0.4 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +skin_line_width=0.4 +speed_wall_x=25.0 +raft_base_jerk=8 +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.4 +raft_acceleration=500 +raft_base_thickness=0.24 +jerk_support=8 +wall_line_width_x=0.4 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=8 +retraction_hop=0.5 +support_tree_tip_diameter=0.8 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=10 +support_fan_enable=False +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +infill_wipe_dist=0.0 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +retraction_combing_max_distance=30 +z_seam_x=117.5 +infill_line_distance=12.0 +minimum_bottom_area=10 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +retraction_prime_speed=45 +z_seam_type=back +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=200 +support_bottom_stair_step_height=0 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=180 +xy_offset_layer_0=0 +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +support_zag_skip_count=10 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +material_print_temperature=200 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=8 +top_skin_preshrink=0.8 +retraction_hop_enabled=True +acceleration_roofing=500 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=100.0 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_weighted +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=150.0 +support_angle=45 +raft_base_speed=18.75 +jerk_support_interface=8 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=10 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=8 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=500 +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +retraction_retract_speed=45 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=25.0 +infill=0 +support_tree_rest_preference=graceful +coasting_speed=90 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=25.0 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +acceleration_support=500 +retraction_hop_after_extruder_switch_height=0.5 +machine_extruder_end_pos_abs=False +jerk_layer_0=8 +cool_min_temperature=200 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=0.8 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=5 +wipe_retraction_speed=45 +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=30.0 +jerk_wall=8 +extruder_nr=0 +support_interface_material_flow=100 +infill_overlap=30.0 +lightning_infill_support_angle=40 +support_bottom_line_distance=2.4000240002400024 +raft_interface_jerk=8 +support_interface_wall_count=0 +support_roof_enable=True +alternate_extra_perimeter=False +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.25 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=10 +top_layers=4 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.38 +inset_direction=inside_out +support_roof_pattern=grid +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=45 +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +infill_before_walls=False +material=0 +brim_width=8.0 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +acceleration_print=500 +support_bottom_pattern=grid +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=500 +machine_settings=0 +skirt_line_count=3 +retraction_count_max=100 +jerk_travel_layer_0=8 +mold_enabled=False +support_brim_enable=True +support_interface_height=0.8 +meshfix_maximum_travel_resolution=0.25 +mold_roof_height=0.5 +jerk_ironing=8 +speed_z_hop=5 +wipe_hop_enable=True +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +acceleration_prime_tower=500 +jerk_support_roof=8 +machine_endstop_positive_direction_y=False +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.30000000000000004 +skin_material_flow_layer_0=100 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=50.0 +retraction_min_travel=1.5 +support_line_width=0.4 +jerk_roofing=8 +roofing_line_width=0.4 +support_initial_layer_line_distance=2.0 +meshfix_union_all=True +support_z_distance=0.2 +support_bottom_line_width=0.4 +acceleration_wall_x=500 +skin_material_flow=100 +support_bottom_density=33.333 +small_hole_max_size=0 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=200 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=0.8 +raft_interface_line_width=0.8 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=2 +minimum_interface_area=10 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=8 +bridge_wall_material_flow=50 +support_interface_enable=True +bridge_skin_density_3=80 +min_feature_size=0.1 +infill_sparse_thickness=0.2 +command_line_settings=0 +raft_margin=5 +material_end_of_filament_purge_speed=0.5 +speed_support=25.0 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=8 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=8 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=0.5 +wipe_retraction_enable=True +cool_min_layer_time=10 +top_thickness=0.8 +jerk_support_bottom=8 +conical_overhang_hole_size=0 +material_final_print_temperature=200 +infill_material_flow=100 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=True +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_003.txt b/tests/voronoi_crash_resources/settings_003.txt new file mode 100644 index 0000000000..00353b70cf --- /dev/null +++ b/tests/voronoi_crash_resources/settings_003.txt @@ -0,0 +1,1091 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.42 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.36 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=concentric +top_skin_expand_distance=1.2000000000000002 +raft_interface_acceleration=500 +expand_skins_expand_distance=1.2000000000000002 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=25.0 +support_roof_material_flow=95.0 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_extruder_nr=0 +support_bottom_height=0.96 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.12 +retraction_enable=True +support_line_distance=0 +machine_depth=235 +adhesion_type=skirt +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=3 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +machine_heated_build_volume=False +speed_travel_layer_0=100.0 +raft_surface_line_width=0.42 +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.84 +raft_jerk=8 +time=18:49:06 +machine_buildplate_type=glass +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=7 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=235 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=0.2 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=cubic +support_structure=tree +clean_between_layers=False +speed_prime_tower=25.0 +speed_wall_x=25.0 +support_bottom_stair_step_height=0 +draft_shield_enabled=False +support_roof_height=0.96 +raft_surface_line_spacing=0.42 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.12 +material_bed_temperature_layer_0=65 +machine_max_jerk_e=5 +raft_margin=15 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=8.0 +travel_avoid_supports=True +acceleration_infill=500 +acceleration_support_roof=500 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.144 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +acceleration_support_infill=500 +brim_gap=0 +machine_max_acceleration_y=500 +meshfix_maximum_deviation=0.025 +quality_changes_name=GG_Best_Dragon_1 +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.12 +conical_overhang_angle=50 +brim_line_count=20 +support_roof_line_distance=2.5200252002520025 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=50 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.42 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=5.143516556418883e-17 +raft_interface_line_width=0.84 +machine_height=250 +travel_retract_before_outer_wall=True +jerk_support_interface=12.0 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.84 +material_print_temp_prepend=True +support_bottom_line_distance=2.5200252002520025 +jerk_support_bottom=12.0 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.12 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.0 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=1.2000000000000002 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=-1 +support_top_distance=0.24 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.42 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=12.0 +support_roof_pattern=grid +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +experimental=0 +bridge_wall_min_length=2.24 +prime_tower_position_x=223.58 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=500 +interlocking_orientation=22.5 +jerk_support=12.0 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +retraction_extrusion_window=10 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=3 +speed_wall=25.0 +support_xy_distance=0.84 +infill_wipe_dist=0.0 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=12.0 +adaptive_layer_height_variation_step=0.04 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=201.58 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=1.2000000000000002 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +machine_max_feedrate_z=10 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +top_bottom_extruder_nr=-1 +retraction_hop=0.2 +jerk_wall_0=8 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=10 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=210 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=True +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +material_type=empty +support_zag_skip_count=0 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=10.0 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=1.2000000000000002 +raft_interface_jerk=12.0 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=-1 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=500 +travel_speed=150.0 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +support_z_distance=0.24 +meshfix_union_all=True +z_seam_corner=z_seam_corner_weighted +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +acceleration_support=500 +jerk_layer_0=8 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.04 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=2 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=10 +infill_line_distance=6.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +material_bed_temperature=60 +support_tree_rest_preference=buildplate +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=25.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=500 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.84 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +anti_overhang_mesh=False +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +bridge_skin_material_flow_2=100 +top_skin_preshrink=1.2000000000000002 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=95.0 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=25.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=noskin +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=1 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=33.333333333333336 +jerk_wall=8 +interlocking_beam_layer_count=2 +support_interface_material_flow=95.0 +infill_overlap=30.0 +print_bed_temperature=60 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=25.0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=7 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +raft_base_fan_speed=0 +bridge_settings_enabled=False +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.04 +material_flush_purge_length=60 +skirt_gap=10.0 +retraction_hop_after_extruder_switch_height=0.2 +acceleration_prime_tower=500 +machine_max_feedrate_y=500 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=33.333 +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=grid +initial_bottom_layers=7 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=8 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.84 +acceleration_enabled=True +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=117.5 +retraction_combing_max_distance=30 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=0 +raft_interface_thickness=0.18 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.12 +support_initial_layer_line_distance=0 +support_bottom_line_width=0.42 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=buildplate +jerk_travel_layer_0=8 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=50 +skirt_line_count=3 +material_id=empty_material +retraction_count_max=100 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=8 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=50.0 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=back +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=18.75 +support_angle=40 +machine_max_feedrate_x=500 +machine_width=235 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=grid +acceleration_print=500 +material_flush_purge_speed=0.5 +minimum_interface_area=10 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=8 +bridge_wall_coast=100 +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=True +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.12 +speed_travel=150.0 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +machine_max_acceleration_e=5000 +roofing_layer_count=0 +skin_preshrink=1.2000000000000002 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=True +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=25 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=500 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +speed_support=25.0 +retraction_min_travel=1.5 +ooze_shield_enabled=False +support_line_width=0.42 +jerk_roofing=8 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=50 +machine_max_jerk_z=0.4 +cool_min_layer_time=10 +speed_z_hop=5 +xy_offset_layer_0=0 +jerk_support_roof=12.0 +machine_extruder_count=1 +material_final_print_temperature=210 +jerk_travel=8 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.2 +support_interface_height=0.96 +support_brim_enable=True +support_interface_skip_height=0.12 +jerk_support_infill=12.0 +wall_overhang_speed_factor=100 +acceleration_travel=500 +support_bottom_material_flow=95.0 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=500 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=8 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.42 +jerk_infill=12.0 +mesh_position_y=0 +cool_fan_full_at_height=0.36 +layer_0_z_overlap=0.15 +support_pattern=concentric +top_skin_expand_distance=0.84 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.84 +support_skip_zag_per_mm=20 +speed_support_bottom=25.0 +support_roof_material_flow=95.0 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_bottom_height=0.96 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.12 +retraction_enable=True +support_line_distance=0 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +support_infill_sparse_thickness=0.12 +skin_overlap=30.0 +speed_travel_layer_0=35 +raft_surface_line_width=0.42 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.84 +raft_jerk=12.0 +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=205.0 +support_tree_min_height_to_model=3 +bottom_layers=7 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.42 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=0 +support_xy_distance=0.84 +speed_wall=25.0 +skin_edge_support_layers=0 +speed_topbottom=25.0 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=25.0 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0.126 +connect_skin_polygons=True +infill_pattern=cubic +wall_0_material_flow=95.0 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=1 +skin_edge_support_thickness=0 +support_roof_height=0.96 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=45 +travel_avoid_supports=True +acceleration_infill=500 +skin_outline_count=0 +jerk_prime_tower=12.0 +machine_nozzle_id=unknown +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=500 +brim_gap=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=7 +support_interface_pattern=grid +support_xy_distance_overhang=0.42 +retract_at_layer_change=False +wall_transition_length=0.42 +wall_x_material_flow=95.0 +min_skin_width_for_expansion=5.143516556418883e-17 +cross_infill_pocket_size=5.04 +support_tree_top_rate=30 +wall_line_width_0=0.42 +acceleration_travel=500 +support_bottom_material_flow=95.0 +acceleration_wall=500 +ironing_enabled=False +wipe_pause=0 +wipe_retraction_prime_speed=45 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=500 +meshfix=0 +material_flow=95.0 +support_offset=0.0 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0 +machine_steps_per_mm_e=1600 +wall_thickness=1.26 +wipe_retraction_amount=5 +material_break_temperature=50 +support_top_distance=0.24 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=5 +infill_line_width=0.42 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=20 +support_roof_line_distance=2.5200252002520025 +prime_tower_line_width=0.42 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.42 +skin_line_width=0.38 +speed_wall_x=30 +raft_base_jerk=12.0 +gradual_support_infill_steps=0 +skirt_brim_material_flow=95.0 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.42 +raft_acceleration=500 +raft_base_thickness=0.144 +jerk_support=12.0 +wall_line_width_x=0.42 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=12.0 +retraction_hop=0.2 +support_tree_tip_diameter=0.84 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=10 +support_fan_enable=False +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=3 +infill_wipe_dist=0.0 +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +retraction_combing_max_distance=30 +z_seam_x=0.0 +infill_line_distance=5.04 +minimum_bottom_area=10 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=95.0 +bottom_skin_preshrink=0.84 +sub_div_rad_add=0.42 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=12.0 +retraction_prime_speed=45 +z_seam_type=sharpest_corner +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=215.0 +support_bottom_stair_step_height=0 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=180 +xy_offset_layer_0=0 +acceleration_print_layer_0=500 +z_seam_relative=True +fill_outline_gaps=True +support_zag_skip_count=0 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +material_print_temperature=205.0 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=12.0 +top_skin_preshrink=0.84 +retraction_hop_enabled=False +acceleration_roofing=500 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=100.0 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_inner +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=150.0 +support_angle=40 +raft_base_speed=18.75 +jerk_support_interface=12.0 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=25.0 +skirt_brim_line_width=0.42 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=12.0 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=500 +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +retraction_retract_speed=45 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=205.0 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=95.0 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=25.0 +infill=0 +support_tree_rest_preference=buildplate +coasting_speed=90 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=25.0 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=12.0 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +acceleration_support=500 +retraction_hop_after_extruder_switch_height=0.2 +machine_extruder_end_pos_abs=False +jerk_layer_0=12.0 +cool_min_temperature=205.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.84 +small_feature_max_length=0.0 +skin_overlap_mm=0.12 +support_material_flow=95.0 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=0.84 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=5 +wipe_retraction_speed=45 +skirt_brim_speed=30 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.84 +support_tree_branch_diameter_angle=7 +wall_material_flow=95.0 +material_flow_layer_0=100 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=33.333333333333336 +jerk_wall=12.0 +extruder_nr=0 +support_interface_material_flow=95.0 +infill_overlap=30.0 +lightning_infill_support_angle=40 +support_bottom_line_distance=2.5200252002520025 +raft_interface_jerk=12.0 +support_interface_wall_count=0 +support_roof_enable=True +alternate_extra_perimeter=False +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.25 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=10 +top_layers=7 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.381 +inset_direction=outside_in +support_roof_pattern=grid +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=50 +support_interface_skip_height=0.12 +jerk_support_infill=12.0 +wall_overhang_speed_factor=100 +infill_before_walls=False +material=0 +brim_width=8.0 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +acceleration_print=500 +support_bottom_pattern=grid +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=500 +machine_settings=0 +skirt_line_count=2 +retraction_count_max=100 +jerk_travel_layer_0=12.0 +mold_enabled=False +support_brim_enable=True +support_interface_height=0.96 +meshfix_maximum_travel_resolution=0.25 +mold_roof_height=0.5 +jerk_ironing=12.0 +speed_z_hop=5 +wipe_hop_enable=False +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.04 +material_flush_purge_length=60 +skirt_gap=10.0 +acceleration_prime_tower=500 +jerk_support_roof=12.0 +machine_endstop_positive_direction_y=False +acceleration_wall_0=500 +shell=0 +small_skin_width=0.76 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=0 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.18 +skin_material_flow_layer_0=100 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=60 +retraction_min_travel=1.5 +support_line_width=0.42 +jerk_roofing=12.0 +roofing_line_width=0.38 +support_initial_layer_line_distance=0 +meshfix_union_all=True +support_z_distance=0.24 +support_bottom_line_width=0.42 +acceleration_wall_x=500 +skin_material_flow=95.0 +support_bottom_density=33.333 +small_hole_max_size=0 +raft_surface_line_spacing=0.42 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=200 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=0.84 +raft_interface_line_width=0.84 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=0 +minimum_interface_area=10 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=12.0 +bridge_wall_material_flow=50 +support_interface_enable=True +bridge_skin_density_3=80 +min_feature_size=0.105 +infill_sparse_thickness=0.12 +command_line_settings=0 +raft_margin=15 +material_end_of_filament_purge_speed=0.5 +speed_support=25.0 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=12.0 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=12.0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=0.2 +wipe_retraction_enable=True +cool_min_layer_time=10 +top_thickness=0.84 +jerk_support_bottom=12.0 +conical_overhang_hole_size=0 +material_final_print_temperature=205.0 +infill_material_flow=95.0 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=True +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_004.txt b/tests/voronoi_crash_resources/settings_004.txt new file mode 100644 index 0000000000..c601d4e1cf --- /dev/null +++ b/tests/voronoi_crash_resources/settings_004.txt @@ -0,0 +1,1091 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.4 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=1.2000000000000002 +raft_interface_acceleration=350 +expand_skins_expand_distance=1.2000000000000002 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=20 +support_roof_material_flow=100 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_extruder_nr=0 +support_bottom_height=0.8 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.1 +retraction_enable=True +support_line_distance=2.0 +machine_depth=225 +adhesion_type=brim +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=3 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +machine_heated_build_volume=False +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +time=18:50:45 +machine_buildplate_type=glass +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=8 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=225 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=0.2 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=cubic +support_structure=normal +clean_between_layers=False +speed_prime_tower=25.0 +speed_wall_x=25.0 +support_bottom_stair_step_height=0 +draft_shield_enabled=False +support_roof_height=0.8 +raft_surface_line_spacing=0.4 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.1 +material_bed_temperature_layer_0=70 +machine_max_jerk_e=5 +raft_margin=15 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=8.0 +travel_avoid_supports=True +acceleration_infill=500 +acceleration_support_roof=350 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.24 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +acceleration_support_infill=350 +brim_gap=0 +machine_max_acceleration_y=500 +meshfix_maximum_deviation=0.025 +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.12 +conical_overhang_angle=50 +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=60 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=4.898587196589413e-17 +raft_interface_line_width=0.8 +machine_height=250 +travel_retract_before_outer_wall=True +jerk_support_interface=8 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.8 +material_print_temp_prepend=True +support_bottom_line_distance=2.4000240002400024 +jerk_support_bottom=8 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.1 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0.2 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=1.2000000000000002 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=-1 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=8 +support_roof_pattern=grid +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=350 +experimental=0 +bridge_wall_min_length=2.2 +prime_tower_position_x=213.12 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=500 +interlocking_orientation=22.5 +jerk_support=8 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=350 +retraction_extrusion_window=10 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=350 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +speed_wall=25.0 +support_xy_distance=0.8 +infill_wipe_dist=0.0 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=191.12 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=1.2000000000000002 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +machine_max_feedrate_z=10 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=22.5 +speed_layer_0=20.0 +jerk_print=8 +top_bottom_extruder_nr=-1 +retraction_hop=0.2 +jerk_wall_0=8 +raft_interface_speed=16.875 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=10 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=210 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=False +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +material_type=empty +support_zag_skip_count=10 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=10.0 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=1.2000000000000002 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=-1 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=500 +travel_speed=150.0 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +support_z_distance=0.2 +meshfix_union_all=True +z_seam_corner=z_seam_corner_weighted +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +acceleration_support=350 +jerk_layer_0=8 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.04 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=1 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=10 +infill_line_distance=6.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +material_bed_temperature=55 +support_tree_rest_preference=graceful +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +machine_disallowed_areas=[] +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=25.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=500 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +anti_overhang_mesh=False +wall_0_material_flow_layer_0=100 +speed_support_interface=20 +machine_max_acceleration_x=500 +bridge_skin_material_flow_2=100 +top_skin_preshrink=1.2000000000000002 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=25.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=noskin +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=0 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=8 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=20 +support_tree_angle_slow=36.666666666666664 +jerk_wall=8 +interlocking_beam_layer_count=2 +support_interface_material_flow=100 +infill_overlap=30.0 +print_bed_temperature=55 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=30 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=8 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +raft_base_fan_speed=0 +bridge_settings_enabled=False +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +retraction_hop_after_extruder_switch_height=0.2 +acceleration_prime_tower=500 +machine_max_feedrate_y=500 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=33.333 +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=grid +initial_bottom_layers=8 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=8 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.8 +acceleration_enabled=False +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=112.5 +retraction_combing_max_distance=30 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +raft_interface_thickness=0.15000000000000002 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +support_bottom_line_width=0.4 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=everywhere +jerk_travel_layer_0=8 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=50 +skirt_line_count=3 +material_id=empty_material +retraction_count_max=100 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=8 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=50.0 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=back +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=16.875 +support_angle=55 +machine_max_feedrate_x=500 +machine_width=225 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=grid +acceleration_print=500 +material_flush_purge_speed=0.5 +minimum_interface_area=10 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=8 +bridge_wall_coast=100 +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=True +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.1 +speed_travel=150.0 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +machine_max_acceleration_e=5000 +roofing_layer_count=0 +skin_preshrink=1.2000000000000002 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=True +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=25 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=500 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=350 +speed_support=30 +retraction_min_travel=1.5 +ooze_shield_enabled=False +support_line_width=0.4 +jerk_roofing=8 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=2 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=55 +machine_max_jerk_z=0.4 +cool_min_layer_time=10 +speed_z_hop=5 +xy_offset_layer_0=0 +jerk_support_roof=8 +machine_extruder_count=1 +material_final_print_temperature=210 +jerk_travel=8 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.2 +support_interface_height=0.8 +support_brim_enable=True +support_interface_skip_height=0.1 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +acceleration_travel=500 +support_bottom_material_flow=100 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=500 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=8 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=350 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.4 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=2.4 +raft_interface_acceleration=350 +expand_skins_expand_distance=2.4 +support_skip_zag_per_mm=20 +speed_support_bottom=20 +support_roof_material_flow=100 +travel_avoid_other_parts=True +speed_ironing=13.333333333333334 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=3 +support_bottom_height=0.8 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.1 +retraction_enable=True +support_line_distance=2.0 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=6 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +support_infill_sparse_thickness=0.1 +skin_overlap=10.0 +speed_travel_layer_0=90 +raft_surface_line_width=0.4 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=12 +support_brim_width=4 +top_bottom_thickness=1.2 +raft_jerk=8 +center_object=False +speed_print=45 +travel=0 +material_print_temperature_layer_0=200 +support_tree_min_height_to_model=3 +bottom_layers=8 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=225 +support_xy_distance=0.8 +speed_wall=22.5 +skin_edge_support_layers=0 +speed_topbottom=20 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=30 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0 +connect_skin_polygons=False +infill_pattern=lines +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=0 +skin_edge_support_thickness=0 +support_roof_height=0.8 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=25 +travel_avoid_supports=True +acceleration_infill=350 +skin_outline_count=1 +jerk_prime_tower=8 +machine_nozzle_id=unknown +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=350 +brim_gap=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=8 +support_interface_pattern=grid +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_x_material_flow=100 +min_skin_width_for_expansion=4.898587196589413e-17 +cross_infill_pocket_size=0.40404040404040403 +support_tree_top_rate=30 +wall_line_width_0=0.4 +acceleration_travel=500 +support_bottom_material_flow=100 +acceleration_wall=350 +ironing_enabled=False +wipe_pause=0 +wipe_retraction_prime_speed=25 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=350 +meshfix=0 +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0.2 +machine_steps_per_mm_e=1600 +wall_thickness=1.2000000000000002 +wipe_retraction_amount=6.5 +material_break_temperature=50 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=5 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=15 +support_roof_line_distance=2.4000240002400024 +prime_tower_line_width=0.4 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +skin_line_width=0.4 +speed_wall_x=35 +raft_base_jerk=8 +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=350 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.4 +raft_acceleration=350 +raft_base_thickness=0.24 +jerk_support=8 +wall_line_width_x=0.4 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=8 +retraction_hop=0.2 +support_tree_tip_diameter=0.8 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=350 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=10 +support_fan_enable=False +raft_base_acceleration=350 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +infill_wipe_dist=0.0 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +retraction_combing_max_distance=60 +z_seam_x=112.5 +infill_line_distance=0.40404040404040403 +minimum_bottom_area=10 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=350 +prime_tower_flow=100 +bottom_skin_preshrink=2.4 +sub_div_rad_add=0.4 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=22.5 +speed_layer_0=20.0 +jerk_print=8 +retraction_prime_speed=25 +z_seam_type=back +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=190 +support_bottom_stair_step_height=0 +speed_roofing=20 +brim_outside_only=True +material_standby_temperature=175 +xy_offset_layer_0=0 +acceleration_print_layer_0=350 +z_seam_relative=False +fill_outline_gaps=False +support_zag_skip_count=10 +raft_interface_speed=16.875 +travel_avoid_distance=0.638 +material_print_temperature=190 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=8 +top_skin_preshrink=2.4 +retraction_hop_enabled=False +acceleration_roofing=350 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=120 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_weighted +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=100 +support_angle=55 +raft_base_speed=16.875 +jerk_support_interface=8 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=99 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=8 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=350 +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +retraction_retract_speed=25 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=190 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=20 +infill=0 +support_tree_rest_preference=graceful +coasting_speed=90 +bridge_skin_speed_3=12 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=30 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=101 +speed_print_layer_0=20 +acceleration_support=350 +retraction_hop_after_extruder_switch_height=0.2 +machine_extruder_end_pos_abs=False +jerk_layer_0=8 +cool_min_temperature=190 +mold_angle=40 +raft_speed=22.5 +roofing_monotonic=True +bottom_thickness=1.2 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=101 +speed_support_interface=20 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=2.4 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=6.5 +wipe_retraction_speed=25 +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +wall_material_flow=100 +material_flow_layer_0=101 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=8 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=20 +support_tree_angle_slow=36.666666666666664 +jerk_wall=8 +extruder_nr=0 +support_interface_material_flow=100 +infill_overlap=30.0 +lightning_infill_support_angle=40 +support_bottom_line_distance=2.4000240002400024 +raft_interface_jerk=8 +support_interface_wall_count=0 +support_roof_enable=True +alternate_extra_perimeter=False +bridge_wall_speed=15.0 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.25 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=12 +top_layers=8 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.38 +inset_direction=inside_out +support_roof_pattern=grid +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=55 +support_interface_skip_height=0.1 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +infill_before_walls=False +material=0 +brim_width=8.0 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +acceleration_print=350 +support_bottom_pattern=grid +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=350 +machine_settings=0 +skirt_line_count=3 +retraction_count_max=100 +jerk_travel_layer_0=10 +mold_enabled=False +support_brim_enable=True +support_interface_height=0.8 +meshfix_maximum_travel_resolution=0.25 +mold_roof_height=0.5 +jerk_ironing=8 +speed_z_hop=5 +wipe_hop_enable=False +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +acceleration_prime_tower=350 +jerk_support_roof=8 +machine_endstop_positive_direction_y=False +acceleration_wall_0=350 +shell=0 +small_skin_width=0.8 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=350 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.15000000000000002 +skin_material_flow_layer_0=101 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=40 +retraction_min_travel=1.5 +support_line_width=0.4 +jerk_roofing=8 +roofing_line_width=0.4 +support_initial_layer_line_distance=2.0 +meshfix_union_all=True +support_z_distance=0.2 +support_bottom_line_width=0.4 +acceleration_wall_x=350 +skin_material_flow=100 +support_bottom_density=33.333 +small_hole_max_size=0 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=200 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=2.4 +raft_interface_line_width=0.8 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=2 +minimum_interface_area=10 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=10 +bridge_wall_material_flow=50 +support_interface_enable=True +bridge_skin_density_3=80 +min_feature_size=0.1 +infill_sparse_thickness=0.1 +command_line_settings=0 +raft_margin=15 +material_end_of_filament_purge_speed=0.5 +speed_support=30 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=8 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=8 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=0.2 +wipe_retraction_enable=True +cool_min_layer_time=8 +top_thickness=1.2 +jerk_support_bottom=8 +conical_overhang_hole_size=0 +material_final_print_temperature=190 +infill_material_flow=100 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=True +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_005.txt b/tests/voronoi_crash_resources/settings_005.txt new file mode 100644 index 0000000000..366cdd5c24 --- /dev/null +++ b/tests/voronoi_crash_resources/settings_005.txt @@ -0,0 +1,1092 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=25.0 +support_roof_material_flow=100 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_extruder_nr=0 +support_bottom_height=0.8 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.0 +machine_depth=300 +adhesion_type=raft +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +machine_heated_build_volume=False +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +time=18:54:59 +machine_buildplate_type=glass +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=300 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=0.2 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=cubic +support_structure=normal +clean_between_layers=False +speed_prime_tower=25.0 +speed_wall_x=25.0 +support_bottom_stair_step_height=0 +draft_shield_enabled=False +support_roof_height=0.8 +raft_surface_line_spacing=0.4 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=55 +machine_max_jerk_e=5 +raft_margin=5.0 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=3 +travel_avoid_supports=True +acceleration_infill=500 +acceleration_support_roof=500 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.24 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +acceleration_support_infill=500 +brim_gap=0 +machine_max_acceleration_y=500 +meshfix_maximum_deviation=0.025 +quality_changes_name=empty +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.12 +conical_overhang_angle=50 +brim_line_count=8 +support_roof_line_distance=2.4000240002400024 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=60 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=4.898587196589413e-17 +raft_interface_line_width=0.8 +machine_height=340 +travel_retract_before_outer_wall=True +jerk_support_interface=8 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.8 +material_print_temp_prepend=False +support_bottom_line_distance=2.4000240002400024 +jerk_support_bottom=8 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=0 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=8 +support_roof_pattern=grid +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +experimental=0 +bridge_wall_min_length=2.2 +prime_tower_position_x=292.8 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=500 +interlocking_orientation=22.5 +jerk_support=8 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +retraction_extrusion_window=10 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +speed_wall=25.0 +support_xy_distance=0.8 +infill_wipe_dist=0.0 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=270.8 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +machine_max_feedrate_z=10 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +top_bottom_extruder_nr=-1 +retraction_hop=0.2 +jerk_wall_0=8 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=10 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=210 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=True +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +material_type=empty +support_zag_skip_count=10 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=10.0 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=0 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=500 +travel_speed=150.0 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=False +material=0 +infill_before_walls=False +support_z_distance=0.2 +meshfix_union_all=True +z_seam_corner=z_seam_corner_weighted +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +acceleration_support=500 +jerk_layer_0=8 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.04 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=2 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=10 +infill_line_distance=6.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +material_bed_temperature=55 +support_tree_rest_preference=buildplate +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +machine_disallowed_areas=[] +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=25.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=500 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +anti_overhang_mesh=False +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +bridge_skin_material_flow_2=100 +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=25.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=noskin +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=0 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=43.333333333333336 +jerk_wall=8 +interlocking_beam_layer_count=2 +support_interface_material_flow=100 +infill_overlap=30.0 +print_bed_temperature=55 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=25.0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=4 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +raft_base_fan_speed=0 +bridge_settings_enabled=False +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +retraction_hop_after_extruder_switch_height=0.2 +acceleration_prime_tower=500 +machine_max_feedrate_y=500 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=33.333 +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=8 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.8 +acceleration_enabled=False +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=150.0 +retraction_combing_max_distance=30 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +raft_interface_thickness=0.30000000000000004 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +support_bottom_line_width=0.4 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=buildplate +jerk_travel_layer_0=8 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=50 +skirt_line_count=3 +material_id=empty_material +retraction_count_max=100 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=8 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=50.0 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=back +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=18.75 +support_angle=65.0 +machine_max_feedrate_x=500 +machine_width=300 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=grid +acceleration_print=500 +material_flush_purge_speed=0.5 +minimum_interface_area=10 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=8 +bridge_wall_coast=100 +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=True +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.2 +speed_travel=150.0 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +machine_max_acceleration_e=5000 +roofing_layer_count=0 +skin_preshrink=0.8 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=True +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=25 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=500 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +speed_support=25.0 +retraction_min_travel=1.5 +ooze_shield_enabled=False +support_line_width=0.4 +jerk_roofing=8 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=2 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=65.0 +machine_max_jerk_z=0.4 +cool_min_layer_time=10 +speed_z_hop=5 +xy_offset_layer_0=0 +jerk_support_roof=8 +machine_extruder_count=1 +material_final_print_temperature=210 +jerk_travel=8 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.2 +support_interface_height=0.8 +support_brim_enable=True +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +acceleration_travel=500 +support_bottom_material_flow=100 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=500 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=8 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +speed_support_bottom=25.0 +support_roof_material_flow=100 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_bottom_height=0.8 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.0 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +support_infill_sparse_thickness=0.2 +skin_overlap=10.0 +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=203.0 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=300 +support_xy_distance=0.8 +speed_wall=25.0 +skin_edge_support_layers=0 +speed_topbottom=25.0 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=25.0 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +connect_skin_polygons=False +infill_pattern=cubic +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=0 +skin_edge_support_thickness=0 +support_roof_height=0.8 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=25 +travel_avoid_supports=True +acceleration_infill=500 +skin_outline_count=1 +jerk_prime_tower=8 +machine_nozzle_id=unknown +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=500 +brim_gap=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=4 +support_interface_pattern=grid +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_x_material_flow=100 +min_skin_width_for_expansion=4.898587196589413e-17 +cross_infill_pocket_size=17.142857142857142 +support_tree_top_rate=30 +wall_line_width_0=0.4 +acceleration_travel=500 +support_bottom_material_flow=100 +acceleration_wall=500 +ironing_enabled=False +wipe_pause=0 +wipe_retraction_prime_speed=25 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=500 +meshfix=0 +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0 +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +wipe_retraction_amount=6.5 +material_break_temperature=50 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=5 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=8 +support_roof_line_distance=2.4000240002400024 +prime_tower_line_width=0.4 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +skin_line_width=0.4 +speed_wall_x=25.0 +raft_base_jerk=8 +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.4 +raft_acceleration=500 +raft_base_thickness=0.24 +jerk_support=8 +wall_line_width_x=0.4 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=8 +retraction_hop=0.2 +support_tree_tip_diameter=0.8 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=10 +support_fan_enable=False +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +infill_wipe_dist=0.0 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +retraction_combing_max_distance=30 +z_seam_x=150.0 +infill_line_distance=17.142857142857142 +minimum_bottom_area=10 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +retraction_prime_speed=25 +z_seam_type=back +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=203.0 +support_bottom_stair_step_height=0 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=175 +xy_offset_layer_0=0 +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +support_zag_skip_count=10 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +material_print_temperature=203.0 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=8 +top_skin_preshrink=0.8 +retraction_hop_enabled=False +acceleration_roofing=500 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=100.0 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_weighted +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=150.0 +support_angle=65.0 +raft_base_speed=18.75 +jerk_support_interface=8 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=7 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=8 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=500 +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +retraction_retract_speed=25 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=203.0 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=25.0 +infill=0 +support_tree_rest_preference=buildplate +coasting_speed=90 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=25.0 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +acceleration_support=500 +retraction_hop_after_extruder_switch_height=0.2 +machine_extruder_end_pos_abs=False +jerk_layer_0=8 +cool_min_temperature=203.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=0.8 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=6.5 +wipe_retraction_speed=25 +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=43.333333333333336 +jerk_wall=8 +extruder_nr=0 +support_interface_material_flow=100 +infill_overlap=30.0 +lightning_infill_support_angle=40 +support_bottom_line_distance=2.4000240002400024 +raft_interface_jerk=8 +support_interface_wall_count=0 +support_roof_enable=True +alternate_extra_perimeter=False +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.25 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=10 +top_layers=4 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.38 +inset_direction=inside_out +support_roof_pattern=grid +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=65.0 +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +infill_before_walls=False +material=0 +brim_width=3 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +acceleration_print=500 +support_bottom_pattern=grid +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=500 +machine_settings=0 +skirt_line_count=3 +retraction_count_max=100 +jerk_travel_layer_0=8 +mold_enabled=False +support_brim_enable=True +support_interface_height=0.8 +meshfix_maximum_travel_resolution=0.25 +mold_roof_height=0.5 +jerk_ironing=8 +speed_z_hop=5 +wipe_hop_enable=False +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +acceleration_prime_tower=500 +jerk_support_roof=8 +machine_endstop_positive_direction_y=False +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.30000000000000004 +skin_material_flow_layer_0=100 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=50.0 +retraction_min_travel=1.5 +support_line_width=0.4 +jerk_roofing=8 +roofing_line_width=0.4 +support_initial_layer_line_distance=2.0 +meshfix_union_all=True +support_z_distance=0.2 +support_bottom_line_width=0.4 +acceleration_wall_x=500 +skin_material_flow=100 +support_bottom_density=33.333 +small_hole_max_size=0 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=200 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=0.8 +raft_interface_line_width=0.8 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=2 +minimum_interface_area=10 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=8 +bridge_wall_material_flow=50 +support_interface_enable=True +bridge_skin_density_3=80 +min_feature_size=0.1 +infill_sparse_thickness=0.2 +command_line_settings=0 +raft_margin=5.0 +material_end_of_filament_purge_speed=0.5 +speed_support=25.0 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=8 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=8 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=0.2 +wipe_retraction_enable=True +cool_min_layer_time=10 +top_thickness=0.8 +jerk_support_bottom=8 +conical_overhang_hole_size=0 +material_final_print_temperature=203.0 +infill_material_flow=100 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=True +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_006.txt b/tests/voronoi_crash_resources/settings_006.txt new file mode 100644 index 0000000000..7fff40c135 --- /dev/null +++ b/tests/voronoi_crash_resources/settings_006.txt @@ -0,0 +1,1092 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=grid +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=25.0 +support_roof_material_flow=100 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_extruder_nr=0 +support_bottom_height=0.8 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=0 +machine_depth=220 +adhesion_type=skirt +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +machine_heated_build_volume=False +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +time=18:56:12 +machine_buildplate_type=glass +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=220 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=0.2 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=cubic +support_structure=tree +clean_between_layers=False +speed_prime_tower=25.0 +speed_wall_x=25.0 +support_bottom_stair_step_height=0 +draft_shield_enabled=False +support_roof_height=0.8 +raft_surface_line_spacing=0.4 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +machine_max_jerk_e=5 +raft_margin=15 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=8.0 +travel_avoid_supports=True +acceleration_infill=500 +acceleration_support_roof=500 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.24 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +acceleration_support_infill=500 +brim_gap=0 +machine_max_acceleration_y=500 +meshfix_maximum_deviation=0.025 +quality_changes_name=empty +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.12 +conical_overhang_angle=50 +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=60 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=4.898587196589413e-17 +raft_interface_line_width=0.8 +machine_height=250 +travel_retract_before_outer_wall=True +jerk_support_interface=8 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.8 +material_print_temp_prepend=False +support_bottom_line_distance=2.4000240002400024 +jerk_support_bottom=8 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.0 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0.2 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=-1 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=8 +support_roof_pattern=grid +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +experimental=0 +bridge_wall_min_length=2.2 +prime_tower_position_x=208.6 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=500 +interlocking_orientation=22.5 +jerk_support=8 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +retraction_extrusion_window=10 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +speed_wall=25.0 +support_xy_distance=0.8 +infill_wipe_dist=0.0 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=186.6 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +machine_max_feedrate_z=10 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +top_bottom_extruder_nr=-1 +retraction_hop=0.2 +jerk_wall_0=8 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=10 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=210 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=True +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +material_type=empty +support_zag_skip_count=0 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=10.0 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=-1 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=500 +travel_speed=150.0 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=False +material=0 +infill_before_walls=False +support_z_distance=0.2 +meshfix_union_all=True +z_seam_corner=z_seam_corner_weighted +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +acceleration_support=500 +jerk_layer_0=8 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.04 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=2 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=10 +infill_line_distance=6.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +material_bed_temperature=60 +support_tree_rest_preference=graceful +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +machine_disallowed_areas=[] +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=25.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=500 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +anti_overhang_mesh=False +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +bridge_skin_material_flow_2=100 +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=25.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=noskin +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=1 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=40.0 +jerk_wall=8 +interlocking_beam_layer_count=2 +support_interface_material_flow=100 +infill_overlap=30.0 +print_bed_temperature=60 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=25.0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=4 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +raft_base_fan_speed=0 +bridge_settings_enabled=False +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +retraction_hop_after_extruder_switch_height=0.2 +acceleration_prime_tower=500 +machine_max_feedrate_y=500 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=33.333 +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=8 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.8 +acceleration_enabled=False +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=110.0 +retraction_combing_max_distance=30 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=0 +raft_interface_thickness=0.30000000000000004 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.2 +support_initial_layer_line_distance=0 +support_bottom_line_width=0.4 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=everywhere +jerk_travel_layer_0=8 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=50 +skirt_line_count=3 +material_id=empty_material +retraction_count_max=100 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=8 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=50.0 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=back +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=18.75 +support_angle=60.0 +machine_max_feedrate_x=500 +machine_width=220 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=grid +acceleration_print=500 +material_flush_purge_speed=0.5 +minimum_interface_area=10 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=8 +bridge_wall_coast=100 +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=True +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.2 +speed_travel=150.0 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +machine_max_acceleration_e=5000 +roofing_layer_count=0 +skin_preshrink=0.8 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=True +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=25 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=500 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +speed_support=25.0 +retraction_min_travel=1.5 +ooze_shield_enabled=False +support_line_width=0.4 +jerk_roofing=8 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=60.0 +machine_max_jerk_z=0.4 +cool_min_layer_time=10 +speed_z_hop=5 +xy_offset_layer_0=0 +jerk_support_roof=8 +machine_extruder_count=1 +material_final_print_temperature=210 +jerk_travel=8 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.2 +support_interface_height=0.8 +support_brim_enable=True +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +acceleration_travel=500 +support_bottom_material_flow=100 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=500 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=8 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +layer_0_z_overlap=0.15 +support_pattern=grid +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +speed_support_bottom=25.0 +support_roof_material_flow=100 +travel_avoid_other_parts=True +speed_ironing=16.666666666666668 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_bottom_height=0.8 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=0 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +support_infill_sparse_thickness=0.2 +skin_overlap=10.0 +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=12.5 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +center_object=False +speed_print=50.0 +travel=0 +material_print_temperature_layer_0=200 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=220 +support_xy_distance=0.8 +speed_wall=25.0 +skin_edge_support_layers=0 +speed_topbottom=25.0 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=25.0 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +connect_skin_polygons=False +infill_pattern=cubic +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=1 +skin_edge_support_thickness=0 +support_roof_height=0.8 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=25 +travel_avoid_supports=True +acceleration_infill=500 +skin_outline_count=1 +jerk_prime_tower=8 +machine_nozzle_id=unknown +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=500 +brim_gap=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=4 +support_interface_pattern=grid +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_x_material_flow=100 +min_skin_width_for_expansion=4.898587196589413e-17 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +wall_line_width_0=0.4 +acceleration_travel=500 +support_bottom_material_flow=100 +acceleration_wall=500 +ironing_enabled=False +wipe_pause=0 +wipe_retraction_prime_speed=25 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=500 +meshfix=0 +material_flow=100 +support_offset=0.0 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0.2 +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +wipe_retraction_amount=6.5 +material_break_temperature=50 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=5 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +prime_tower_line_width=0.4 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +skin_line_width=0.4 +speed_wall_x=25.0 +raft_base_jerk=8 +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=12.5 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.4 +raft_acceleration=500 +raft_base_thickness=0.24 +jerk_support=8 +wall_line_width_x=0.4 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=8 +retraction_hop=0.2 +support_tree_tip_diameter=0.8 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=10 +support_fan_enable=False +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +infill_wipe_dist=0.0 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +retraction_combing_max_distance=30 +z_seam_x=110.0 +infill_line_distance=6.0 +minimum_bottom_area=10 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=25.0 +speed_layer_0=20.0 +jerk_print=8 +retraction_prime_speed=25 +z_seam_type=back +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=200 +support_bottom_stair_step_height=0 +speed_roofing=25.0 +brim_outside_only=True +material_standby_temperature=175 +xy_offset_layer_0=0 +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +support_zag_skip_count=0 +raft_interface_speed=18.75 +travel_avoid_distance=0.625 +material_print_temperature=200 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=8 +top_skin_preshrink=0.8 +retraction_hop_enabled=False +acceleration_roofing=500 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=100.0 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_weighted +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=150.0 +support_angle=60.0 +raft_base_speed=18.75 +jerk_support_interface=8 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=20 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=8 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=500 +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +retraction_retract_speed=25 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=25.0 +infill=0 +support_tree_rest_preference=graceful +coasting_speed=90 +bridge_skin_speed_3=12.5 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=25.0 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +acceleration_support=500 +retraction_hop_after_extruder_switch_height=0.2 +machine_extruder_end_pos_abs=False +jerk_layer_0=8 +cool_min_temperature=200 +mold_angle=40 +raft_speed=25.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=100 +speed_support_interface=25.0 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=0.8 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=6.5 +wipe_retraction_speed=25 +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=25.0 +support_tree_angle_slow=40.0 +jerk_wall=8 +extruder_nr=0 +support_interface_material_flow=100 +infill_overlap=30.0 +lightning_infill_support_angle=40 +support_bottom_line_distance=2.4000240002400024 +raft_interface_jerk=8 +support_interface_wall_count=0 +support_roof_enable=True +alternate_extra_perimeter=False +bridge_wall_speed=12.5 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.25 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=10 +top_layers=4 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.38 +inset_direction=inside_out +support_roof_pattern=grid +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=60.0 +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +infill_before_walls=False +material=0 +brim_width=8.0 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +acceleration_print=500 +support_bottom_pattern=grid +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=500 +machine_settings=0 +skirt_line_count=3 +retraction_count_max=100 +jerk_travel_layer_0=8 +mold_enabled=False +support_brim_enable=True +support_interface_height=0.8 +meshfix_maximum_travel_resolution=0.25 +mold_roof_height=0.5 +jerk_ironing=8 +speed_z_hop=5 +wipe_hop_enable=False +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +acceleration_prime_tower=500 +jerk_support_roof=8 +machine_endstop_positive_direction_y=False +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=0 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.30000000000000004 +skin_material_flow_layer_0=100 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=50.0 +retraction_min_travel=1.5 +support_line_width=0.4 +jerk_roofing=8 +roofing_line_width=0.4 +support_initial_layer_line_distance=0 +meshfix_union_all=True +support_z_distance=0.2 +support_bottom_line_width=0.4 +acceleration_wall_x=500 +skin_material_flow=100 +support_bottom_density=33.333 +small_hole_max_size=0 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=200 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=0.8 +raft_interface_line_width=0.8 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=0 +minimum_interface_area=10 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=8 +bridge_wall_material_flow=50 +support_interface_enable=True +bridge_skin_density_3=80 +min_feature_size=0.1 +infill_sparse_thickness=0.2 +command_line_settings=0 +raft_margin=15 +material_end_of_filament_purge_speed=0.5 +speed_support=25.0 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=8 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=8 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=0.2 +wipe_retraction_enable=True +cool_min_layer_time=10 +top_thickness=0.8 +jerk_support_bottom=8 +conical_overhang_hole_size=0 +material_final_print_temperature=200 +infill_material_flow=100 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=True +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_007.txt b/tests/voronoi_crash_resources/settings_007.txt new file mode 100644 index 0000000000..2a63b6dbd9 --- /dev/null +++ b/tests/voronoi_crash_resources/settings_007.txt @@ -0,0 +1,1092 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=40.0 +support_roof_material_flow=100 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=26.666666666666668 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_extruder_nr=0 +support_bottom_height=0.8 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.0 +machine_depth=220 +adhesion_type=skirt +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +machine_heated_build_volume=False +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +bridge_skin_speed_2=20.0 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +time=19:00:31 +machine_buildplate_type=glass +center_object=False +speed_print=80.0 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=220 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=0.2 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=cubic +support_structure=normal +clean_between_layers=False +speed_prime_tower=40.0 +speed_wall_x=40.0 +support_bottom_stair_step_height=0 +draft_shield_enabled=False +support_roof_height=0.8 +raft_surface_line_spacing=0.4 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +machine_max_jerk_e=5 +raft_margin=15 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=8.0 +travel_avoid_supports=True +acceleration_infill=500 +acceleration_support_roof=500 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.24 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +acceleration_support_infill=500 +brim_gap=0 +machine_max_acceleration_y=500 +meshfix_maximum_deviation=0.025 +quality_changes_name=empty +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.12 +conical_overhang_angle=50 +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=60 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=4.898587196589413e-17 +raft_interface_line_width=0.8 +machine_height=305.0 +travel_retract_before_outer_wall=True +jerk_support_interface=8 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.8 +material_print_temp_prepend=True +support_bottom_line_distance=2.4000240002400024 +jerk_support_bottom=8 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0.2 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=-1 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=5 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=8 +support_roof_pattern=grid +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=20.0 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +experimental=0 +bridge_wall_min_length=2.2 +prime_tower_position_x=207.79999999999998 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=500 +interlocking_orientation=22.5 +jerk_support=8 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +retraction_extrusion_window=10 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +speed_wall=40.0 +support_xy_distance=0.8 +infill_wipe_dist=0.0 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=185.79999999999998 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +machine_max_feedrate_z=10 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=40.0 +speed_layer_0=20.0 +jerk_print=8 +top_bottom_extruder_nr=-1 +retraction_hop=0.2 +jerk_wall_0=8 +raft_interface_speed=30.0 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=10 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=210 +speed_roofing=40.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=False +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +material_type=empty +support_zag_skip_count=10 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=10.0 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=-1 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=500 +travel_speed=200.0 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +support_z_distance=0.2 +meshfix_union_all=True +z_seam_corner=z_seam_corner_weighted +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +acceleration_support=500 +jerk_layer_0=8 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.04 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=2 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=10 +infill_line_distance=6.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +material_bed_temperature=60 +support_tree_rest_preference=graceful +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=20.0 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +machine_disallowed_areas=[] +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=40.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=500 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +mold_angle=40 +raft_speed=40.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +anti_overhang_mesh=False +wall_0_material_flow_layer_0=100 +speed_support_interface=40.0 +machine_max_acceleration_x=500 +bridge_skin_material_flow_2=100 +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=40.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=noskin +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=0 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=40.0 +support_tree_angle_slow=30.0 +jerk_wall=8 +interlocking_beam_layer_count=2 +support_interface_material_flow=100 +infill_overlap=30.0 +print_bed_temperature=60 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=40.0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=4 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +raft_base_fan_speed=0 +bridge_settings_enabled=False +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +retraction_hop_after_extruder_switch_height=0.2 +acceleration_prime_tower=500 +machine_max_feedrate_y=500 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=33.333 +bridge_wall_speed=20.0 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=8 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.8 +acceleration_enabled=False +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=110.0 +retraction_combing_max_distance=30 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +raft_interface_thickness=0.30000000000000004 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +support_bottom_line_width=0.4 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=everywhere +jerk_travel_layer_0=8 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=50 +skirt_line_count=3 +material_id=empty_material +retraction_count_max=100 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=8 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=80.0 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=back +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=30.0 +support_angle=45 +machine_max_feedrate_x=500 +machine_width=220 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=grid +acceleration_print=500 +material_flush_purge_speed=0.5 +minimum_interface_area=10 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=8 +bridge_wall_coast=100 +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=True +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.2 +speed_travel=200.0 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +machine_max_acceleration_e=5000 +roofing_layer_count=0 +skin_preshrink=0.8 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=True +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=25 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=500 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +speed_support=40.0 +retraction_min_travel=1.5 +ooze_shield_enabled=False +support_line_width=0.4 +jerk_roofing=8 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=2 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=45 +machine_max_jerk_z=0.4 +cool_min_layer_time=10 +speed_z_hop=5 +xy_offset_layer_0=0 +jerk_support_roof=8 +machine_extruder_count=1 +material_final_print_temperature=210 +jerk_travel=8 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.2 +support_interface_height=0.8 +support_brim_enable=True +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +acceleration_travel=500 +support_bottom_material_flow=100 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=500 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=8 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=500 +support_interface_line_width=0.4 +jerk_infill=8 +mesh_position_y=0 +cool_fan_full_at_height=0.6000000000000001 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=500 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +speed_support_bottom=40.0 +support_roof_material_flow=100 +travel_avoid_other_parts=True +speed_ironing=26.666666666666668 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=4 +support_bottom_height=0.8 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.0 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=10 +wall_0_wipe_dist=0.0 +support_infill_sparse_thickness=0.2 +skin_overlap=10.0 +speed_travel_layer_0=100.0 +raft_surface_line_width=0.4 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=20.0 +support_brim_width=4 +top_bottom_thickness=0.8 +raft_jerk=8 +center_object=False +speed_print=80.0 +travel=0 +material_print_temperature_layer_0=225.0 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=False +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=220 +support_xy_distance=0.8 +speed_wall=40.0 +skin_edge_support_layers=0 +speed_topbottom=40.0 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=40.0 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +connect_skin_polygons=False +infill_pattern=cubic +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=0 +skin_edge_support_thickness=0 +support_roof_height=0.8 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=45 +travel_avoid_supports=True +acceleration_infill=500 +skin_outline_count=1 +jerk_prime_tower=8 +machine_nozzle_id=unknown +acceleration_travel_layer_0=500 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=500 +brim_gap=0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=4 +support_interface_pattern=grid +support_xy_distance_overhang=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_x_material_flow=100 +min_skin_width_for_expansion=4.898587196589413e-17 +cross_infill_pocket_size=6.0 +support_tree_top_rate=30 +wall_line_width_0=0.4 +acceleration_travel=500 +support_bottom_material_flow=100 +acceleration_wall=500 +ironing_enabled=False +wipe_pause=0 +wipe_retraction_prime_speed=45 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=500 +meshfix=0 +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0.2 +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +wipe_retraction_amount=5 +material_break_temperature=50 +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=5 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=20 +support_roof_line_distance=2.4000240002400024 +prime_tower_line_width=0.4 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +skin_line_width=0.4 +speed_wall_x=40.0 +raft_base_jerk=8 +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=20.0 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=500 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.4 +raft_acceleration=500 +raft_base_thickness=0.24 +jerk_support=8 +wall_line_width_x=0.4 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=8 +retraction_hop=0.2 +support_tree_tip_diameter=0.8 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=500 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=10 +support_fan_enable=False +raft_base_acceleration=500 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +infill_wipe_dist=0.0 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +material_guid=a55a7c05-b00d-42fc-953e-95b01860e05c +retraction_combing_max_distance=30 +z_seam_x=110.0 +infill_line_distance=6.0 +minimum_bottom_area=10 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=500 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=33.333 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=40.0 +speed_layer_0=20.0 +jerk_print=8 +retraction_prime_speed=45 +z_seam_type=back +support_bottom_enable=True +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=225.0 +support_bottom_stair_step_height=0 +speed_roofing=40.0 +brim_outside_only=True +material_standby_temperature=180.0 +xy_offset_layer_0=0 +acceleration_print_layer_0=500 +z_seam_relative=False +fill_outline_gaps=False +support_zag_skip_count=10 +raft_interface_speed=30.0 +travel_avoid_distance=0.625 +material_print_temperature=225.0 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=8 +top_skin_preshrink=0.8 +retraction_hop_enabled=False +acceleration_roofing=500 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=100.0 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_weighted +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=200.0 +support_angle=45 +raft_base_speed=30.0 +jerk_support_interface=8 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=20 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=8 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=500 +support_roof_offset=0.0 +support_interface_density=33.333 +coasting_enable=False +retraction_retract_speed=45 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=225.0 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=40.0 +infill=0 +support_tree_rest_preference=graceful +coasting_speed=90 +bridge_skin_speed_3=20.0 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=40.0 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=8 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +acceleration_support=500 +retraction_hop_after_extruder_switch_height=0.2 +machine_extruder_end_pos_abs=False +jerk_layer_0=8 +cool_min_temperature=225.0 +mold_angle=40 +raft_speed=40.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=100 +speed_support_interface=40.0 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=0.8 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=5 +wipe_retraction_speed=45 +skirt_brim_speed=20.0 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=10 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=40.0 +support_tree_angle_slow=30.0 +jerk_wall=8 +extruder_nr=0 +support_interface_material_flow=100 +infill_overlap=30.0 +lightning_infill_support_angle=40 +support_bottom_line_distance=2.4000240002400024 +raft_interface_jerk=8 +support_interface_wall_count=0 +support_roof_enable=True +alternate_extra_perimeter=False +bridge_wall_speed=20.0 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.25 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=10 +top_layers=4 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.38 +inset_direction=inside_out +support_roof_pattern=grid +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=45 +support_interface_skip_height=0.2 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +infill_before_walls=False +material=0 +brim_width=8.0 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +acceleration_print=500 +support_bottom_pattern=grid +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=500 +machine_settings=0 +skirt_line_count=3 +retraction_count_max=100 +jerk_travel_layer_0=8 +mold_enabled=False +support_brim_enable=True +support_interface_height=0.8 +meshfix_maximum_travel_resolution=0.25 +mold_roof_height=0.5 +jerk_ironing=8 +speed_z_hop=5 +wipe_hop_enable=False +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=10.0 +acceleration_prime_tower=500 +jerk_support_roof=8 +machine_endstop_positive_direction_y=False +acceleration_wall_0=500 +shell=0 +small_skin_width=0.8 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=500 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.30000000000000004 +skin_material_flow_layer_0=100 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=80.0 +retraction_min_travel=1.5 +support_line_width=0.4 +jerk_roofing=8 +roofing_line_width=0.4 +support_initial_layer_line_distance=2.0 +meshfix_union_all=True +support_z_distance=0.2 +support_bottom_line_width=0.4 +acceleration_wall_x=500 +skin_material_flow=100 +support_bottom_density=33.333 +small_hole_max_size=0 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=225.0 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=0.8 +raft_interface_line_width=0.8 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=2 +minimum_interface_area=10 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=8 +bridge_wall_material_flow=50 +support_interface_enable=True +bridge_skin_density_3=80 +min_feature_size=0.1 +infill_sparse_thickness=0.2 +command_line_settings=0 +raft_margin=15 +material_end_of_filament_purge_speed=0.5 +speed_support=40.0 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=8 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=8 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=0.2 +wipe_retraction_enable=True +cool_min_layer_time=10 +top_thickness=0.8 +jerk_support_bottom=8 +conical_overhang_hole_size=0 +material_final_print_temperature=225.0 +infill_material_flow=100 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=True +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_008.txt b/tests/voronoi_crash_resources/settings_008.txt new file mode 100644 index 0000000000..4c0a14ef71 --- /dev/null +++ b/tests/voronoi_crash_resources/settings_008.txt @@ -0,0 +1,1114 @@ +initial_extruder_nr=0 +date=02-06-2023 +print_temperature=200 +material_name=empty +draft_shield_height_limitation=full +prime_tower_wipe_enabled=True +top_bottom_pattern=lines +connect_infill_polygons=False +xy_offset=-0.015 +raft_base_jerk=20 +machine_heated_build_volume=True +resolution=0 +machine_endstop_positive_direction_y=False +raft_fan_speed=0 +machine_nozzle_head_distance=3 +speed_z_hop=10 +support_bottom_wall_count=1 +jerk_skirt_brim=20 +meshfix_union_all_remove_holes=False +support_tree_tip_diameter=0.8 +support_roof_line_width=0.4 +material_shrinkage_percentage_xy=100.2 +support_tree_min_height_to_model=3 +acceleration_layer_0=1000 +machine_nozzle_heat_up_speed=1.4 +material_flush_purge_length=60 +raft_interface_line_spacing=0.8 +support_xy_distance_overhang=0.2 +bridge_skin_material_flow_2=95.0 +coasting_enable=False +prime_blob_enable=False +roofing_layer_count=1 +brim_inside_margin=2.5 +interlocking_depth=2 +skirt_gap=3 +mold_roof_height=0.5 +machine_max_acceleration_e=10000 +magic_mesh_surface_mode=normal +small_hole_max_size=0 +machine_gcode_flavor=Griffin +top_bottom_thickness=1 +acceleration_infill=3500 +travel_avoid_supports=False +gradual_infill_steps=0 +max_skin_angle_for_expansion=90 +infill_offset_y=0 +switch_extruder_retraction_speeds=20 +machine_firmware_retract=False +infill_offset_x=0 +expand_skins_expand_distance=0.8 +bottom_skin_preshrink=0.8 +center_object=False +support_use_towers=True +adaptive_layer_height_variation=0.1 +raft_interface_layers=1 +support_bottom_pattern=zigzag +xy_offset_layer_0=-0.095 +skin_angles=[] +wipe_hop_speed=10 +raft_interface_thickness=0.22499999999999998 +skirt_line_count=1 +prime_tower_size=20 +extruders_enabled_count=2 +smooth_spiralized_contours=True +time=15:31:27 +machine_buildplate_type=glass +mesh_position_y=0 +jerk_print=20 +machine_max_feedrate_y=300 +infill_randomize_start_location=False +acceleration_prime_tower=2000 +acceleration_wall_x=1500 +carve_multiple_volumes=True +flow_rate_extrusion_offset_factor=100 +speed_support_roof=35 +retraction_extra_prime_amount=0 +jerk_topbottom=20 +remove_empty_first_layers=True +wall_transition_angle=10 +support_extruder_nr=0 +z_seam_position=back +material_id=empty_material +retraction_count_max=25 +inset_direction=outside_in +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +meshfix_maximum_deviation=0.04 +mold_width=5 +adhesion_extruder_nr=-1 +brim_smart_ordering=True +raft_interface_acceleration=3500 +support_roof_material_flow=95.0 +cool_min_layer_time_fan_speed_max=11 +quality_changes_name=empty +machine_nozzle_size=0.4 +hole_xy_offset_max_diameter=0 +material_break_speed=25 +speed_print=35 +speed_slowdown_layers=1 +default_material_print_temperature=200 +jerk_support_interface=20 +support_tree_branch_reach_limit=30 +support_bottom_stair_step_min_slope=10.0 +bottom_thickness=1 +infill_material_flow=100 +infill_angles=[ ] +skirt_height=3 +sub_div_rad_add=0.4 +speed_layer_0=14.999999999999998 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=300 +switch_extruder_retraction_amount=8 +skirt_brim_speed=14.999999999999998 +raft_surface_line_width=0.4 +roofing_pattern=lines +jerk_ironing=20 +machine_shape=rectangular +slicing_tolerance=middle +raft_interface_fan_speed=50.0 +wipe_retraction_amount=6.5 +material_break_temperature=50 +print_bed_temperature=60 +lightning_infill_support_angle=40 +acceleration_support_interface=1000 +wipe_retraction_extra_prime_amount=0 +skirt_brim_extruder_nr=-1 +material_print_temperature_layer_0=200 +cool_fan_full_at_height=0.2 +machine_disallowed_areas=[] +z_seam_relative=False +support_structure=tree +infill_sparse_thickness=0.15 +cool_min_speed=4 +wall_transition_filter_distance=100 +conical_overhang_enabled=False +support_xy_distance=0.7 +speed_wall=30 +speed_wall_x=30 +material_bed_temp_wait=True +retraction_min_travel=5 +coasting_speed=90 +material_print_temp_prepend=True +support_bottom_line_width=0.4 +support_interface_extruder_nr=0 +support_tower_maximum_supported_diameter=3.0 +nozzle_disallowed_areas=[] +brim_replaces_support=True +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +wipe_brush_pos_x=100 +acceleration_travel_layer_0=1428.5714285714287 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=110.0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +acceleration_support_infill=2000 +brim_gap=0 +machine_acceleration=3000 +raft_surface_fan_speed=100 +switch_extruder_prime_speed=15 +min_bead_width=0.34 +wall_x_extruder_nr=-1 +lightning_infill_prune_angle=40 +bridge_skin_material_flow_3=95.0 +initial_bottom_layers=7 +bridge_fan_speed_2=50 +support_interface_pattern=zigzag +bottom_skin_expand_distance=0.8 +raft_base_extruder_nr=0 +acceleration_wall=1500 +ironing_enabled=False +acceleration_travel=5000 +support_bottom_material_flow=95.0 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +switch_extruder_retraction_speed=20 +retraction_hop_enabled=True +bridge_wall_material_flow=100 +bridge_skin_speed_2=20 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=20 +connect_skin_polygons=False +infill_pattern=triangles +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +support_bottom_distance=0.15 +material_crystallinity=False +raft_surface_acceleration=3500 +jerk_wall=20 +dual=0 +support_bottom_enable=False +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +support_xy_overrides_z=z_overrides_xy +support_brim_width=1.2000000000000002 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=165.0 +retraction_combing_max_distance=15 +machine_steps_per_mm_z=50 +interlocking_beam_layer_count=2 +infill_mesh_order=0 +support=0 +min_wall_line_width=0.34 +top_layers=7 +machine_max_jerk_z=0.4 +support_tree_angle=60 +alternate_carve_order=True +initial_layer_line_width_factor=100.0 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +machine_max_feedrate_x=300 +machine_width=330 +acceleration_support=2000 +raft_base_speed=15 +support_angle=60 +platform_adhesion=0 +support_bottom_stair_step_width=5.0 +material_alternate_walls=False +acceleration_support_bottom=1000 +material_end_of_filament_purge_length=20 +material_break_preparation_speed=2 +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +infill_multiplier=1 +prime_tower_enable=False +top_bottom=0 +support_roof_density=100 +machine_max_feedrate_z=40 +bridge_wall_coast=0 +support_roof_wall_count=1 +infill_extruder_nr=-1 +infill_sparse_density=20 +magic_spiralize=False +machine_show_variants=False +layer_height=0.15 +material_break_preparation_retracted_position=-16 +infill_mesh=False +speed_ironing=13.333333333333334 +command_line_settings=0 +wall_0_inset=0 +relative_extrusion=False +infill_wipe_dist=0 +print_sequence=all_at_once +skin_overlap=10 +speed_infill=35 +support_offset=0.0 +material_flow=100 +travel_speed=150 +speed=0 +cool_fan_speed_min=50 +wipe_move_distance=20 +wall_overhang_speed_factor=100 +jerk_support_infill=20 +material_adhesion_tendency=10 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +wall_line_width=0.4 +interlocking_boundary_avoidance=2 +material_print_temperature=200 +min_even_wall_line_width=0.34 +support_meshes_present=False +raft_interface_speed=25.0 +travel_avoid_distance=3 +z_seam_y=240 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +small_feature_speed_factor_0=50 +speed_travel_layer_0=150 +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +support_interface_height=0.3 +interlocking_orientation=22.5 +support_mesh_drop_down=True +skin_no_small_gaps_heuristic=False +ironing_line_spacing=0.1 +material_bed_temp_prepend=True +infill_before_walls=True +material=0 +support_interface_skip_height=0.15 +blackmagic=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=50 +bridge_enable_more_layers=False +speed_topbottom=20 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +support_infill_rate=0 +layer_start_y=228.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +adaptive_layer_height_enabled=False +support_connect_zigzags=True +ooze_shield_enabled=False +support_line_width=0.4 +roofing_line_width=0.4 +support_interface_material_flow=95.0 +infill_overlap=0 +wipe_retraction_speed=45 +retraction_amount=6.5 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +jerk_support_bottom=20 +top_thickness=1 +acceleration_enabled=True +support_roof_extruder_nr=0 +machine_center_is_zero=False +machine_scale_fan_speed_zero_to_one=False +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +layer_start_x=330.0 +machine_min_cool_heat_time_window=15 +lightning_infill_overhang_angle=40 +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +jerk_infill=20 +material_final_print_temperature=185 +layer_height_0=0.2 +support_initial_layer_line_distance=0 +machine_name=Ultimaker S5 +bridge_wall_min_length=2.1 +prime_tower_position_x=299.2 +experimental=0 +zig_zaggify_infill=True +retraction_retract_speed=45 +cool_fan_speed_max=100 +cool_fan_enabled=True +wall_overhang_angle=90 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +brim_width=3 +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_wipe_dist=0.2 +ironing_only_highest_layer=False +raft_remove_inside_corners=False +machine_max_feedrate_e=45 +prime_tower_line_width=0.4 +wall_line_width_x=0.4 +jerk_support=20 +machine_nozzle_cool_down_speed=0.8 +skin_line_width=0.4 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +gradual_support_infill_steps=0 +draft_shield_enabled=False +minimum_interface_area=1.0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +conical_overhang_angle=50 +mesh_position_z=0 +infill_overlap_mm=0.0 +wall_line_width_0=0.4 +interlocking_enable=False +support_tree_top_rate=10 +cross_infill_pocket_size=6.0 +material_end_of_filament_purge_speed=0.5 +machine_max_jerk_e=5.0 +raft_margin=15 +acceleration_support_roof=1000 +support_roof_offset=0.0 +wipe_retraction_prime_speed=45 +wipe_pause=0 +machine_settings=0 +acceleration_topbottom=1000 +jerk_travel=20 +acceleration_wall_0=1500 +support_infill_angles=[ ] +shell=0 +small_skin_width=0.8 +top_skin_expand_distance=0.8 +speed_print_layer_0=14.999999999999998 +wall_x_material_flow_layer_0=95.0 +speed_travel=150 +layer_0_z_overlap=0.125 +ironing_pattern=zigzag +support_type=everywhere +skin_edge_support_layers=4 +ooze_shield_dist=2 +ironing_inset=0.38 +bridge_fan_speed_3=50 +speed_support=23 +fill_outline_gaps=True +material_type=empty +support_zag_skip_count=0 +support_interface_line_width=0.4 +support_tree_angle_slow=40.0 +support_skip_zag_per_mm=20 +support_bottom_angles=[ ] +support_tree_limit_branch_reach=True +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=23 +default_material_bed_temperature=60 +raft_jerk=20 +acceleration_print=3500 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +raft_base_fan_speed=0 +bridge_settings_enabled=True +material_no_load_move_factor=0.940860215 +raft_surface_line_spacing=0.4 +support_roof_height=0.3 +material_bed_temperature_layer_0=60 +support_infill_sparse_thickness=0.15 +wall_extruder_nr=-1 +raft_base_acceleration=3500 +wall_0_extruder_nr=-1 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=20 +gradual_infill_step_height=1.5 +prime_tower_brim_enable=False +minimum_roof_area=1.0 +support_bottom_density=100 +skin_material_flow=95.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +support_roof_angles=[ ] +material_print_temp_wait=True +bridge_skin_density=80 +raft_base_line_width=0.8 +jerk_roofing=20 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +bridge_skin_speed=20 +skirt_brim_material_flow=100 +retraction_enable=True +support_line_distance=0 +bridge_skin_material_flow=95.0 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +retract_at_layer_change=False +wall_transition_length=0.4 +wipe_hop_amount=2 +support_join_distance=2.0 +material_shrinkage_percentage_z=100.1 +support_roof_line_distance=0.4 +brim_line_count=8 +support_mesh=False +support_roof_pattern=zigzag +speed_roofing=20 +support_bottom_stair_step_height=0.3 +brim_outside_only=True +material_standby_temperature=100 +raft_speed=15 +mold_angle=40 +retraction_combing=no_outer_surfaces +material_flow_layer_0=100 +wall_material_flow=100 +raft_surface_thickness=0.15 +cool_fan_speed=50 +coasting_min_volume=0.8 +optimize_wall_printing_order=True +line_width=0.4 +machine_minimum_feedrate=0.0 +skin_edge_support_thickness=0.6 +support_wall_count=1 +machine_max_acceleration_z=100 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +bridge_skin_density_3=100 +support_interface_enable=False +prime_tower_position_y=209.2 +mesh_position_x=0 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +gradual_support_infill_step_height=0.6 +top_skin_preshrink=0.8 +raft_airgap=0.25 +wall_distribution_count=1 +jerk_wall_0=20 +retraction_hop=2 +support_bottom_extruder_nr=0 +retraction_speed=45 +extruder_prime_pos_y=0 +flow_rate_max_extrusion_offset=0 +material_diameter=2.85 +support_z_distance=0.3 +meshfix_union_all=True +infill_support_angle=40 +jerk_prime_tower=20 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +support_pattern=zigzag +prime_tower_min_volume=6 +support_tree_rest_preference=graceful +material_bed_temperature=60 +support_interface_wall_count=1 +material_shrinkage_percentage=100.2 +raft_interface_jerk=20 +roofing_monotonic=True +support_interface_angles=[ ] +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +machine_head_with_fans_polygon=[[-41.4, -45.8], [-41.4, 36.0], [63.3, 36.0], [63.3, -45.8]] +z_seam_corner=z_seam_corner_none +nozzle_offsetting_for_disallowed_areas=False +meshfix=0 +acceleration_skirt_brim=1000 +machine_max_acceleration_y=9000 +meshfix_keep_open_polygons=False +skin_monotonic=False +support_interface_offset=0.0 +adhesion_type=brim +z_seam_type=sharpest_corner +retraction_prime_speed=15 +wall_x_material_flow=100 +min_skin_width_for_expansion=6.429395695523605e-17 +clean_between_layers=False +skin_preshrink=0.8 +speed_support_interface=35 +machine_max_acceleration_x=9000 +bridge_wall_speed=20 +support_bottom_offset=0.0 +support_roof_enable=False +alternate_extra_perimeter=False +speed_prime_tower=20 +support_infill_extruder_nr=0 +infill=0 +jerk_wall_x=20 +material_flush_purge_speed=0.5 +skin_material_flow_layer_0=90.0 +top_bottom_pattern_0=lines +bridge_fan_speed=100 +support_material_flow=100 +support_tree_max_diameter=25 +support_conical_angle=30 +support_enable=True +cool_min_layer_time=6 +day=Fri +wipe_retraction_enable=True +support_skip_some_zags=False +machine_steps_per_mm_x=50 +top_bottom_extruder_nr=-1 +ironing_flow=10.0 +support_bottom_line_distance=0.4 +roofing_extruder_nr=-1 +raft_base_thickness=0.3 +retraction_hop_after_extruder_switch=True +support_top_distance=0.3 +bridge_skin_support_threshold=50 +prime_tower_flow=100 +acceleration_ironing=1000 +roofing_material_flow=100 +support_fan_enable=False +retraction_extrusion_window=1 +support_tower_roof_angle=65 +extruder_prime_pos_z=0 +retraction_hop_after_extruder_switch_height=2 +raft_interface_line_width=0.6000000000000001 +gantry_height=55 +material_surface_energy=100 +machine_extruder_count=2 +jerk_support_roof=20 +minimum_bottom_area=1.0 +infill_line_distance=6.0 +infill_enable_travel_optimization=False +machine_height=300 +travel_retract_before_outer_wall=False +raft_surface_speed=35 +cooling=0 +machine_extruders_share_nozzle=False +raft_acceleration=3500 +support_bottom_height=0.3 +acceleration_travel_enabled=False +travel=0 +bottom_layers=7 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +min_feature_size=0.1 +quality_name=Normal +wall_0_material_flow_layer_0=110.00000000000001 +anti_overhang_mesh=False +support_interface_density=100 +ironing_monotonic=False +mold_enabled=False +jerk_travel_layer_0=20.0 +wipe_hop_enable=True +zig_zaggify_support=True +machine_depth=240 +skirt_brim_line_width=0.4 +cool_fan_full_layer=2 +bridge_sparse_infill_max_density=0 +roofing_angles=[] +material_initial_print_temperature=190 +material_break_retracted_position=-50 +machine_heat_zone_length=16 +adaptive_layer_height_threshold=0.2 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +cool_min_temperature=190 +jerk_layer_0=20 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +speed_support_bottom=35 +material_extrusion_cool_down_speed=0.7 +support_brim_enable=True +minimum_support_area=0.0 +prime_tower_wipe_enabled=True +acceleration_wall_x=1500 +machine_extruder_start_pos_abs=True +top_bottom_pattern=lines +xy_offset=-0.015 +machine_nozzle_offset_y=0 +raft_base_jerk=20 +resolution=0 +switch_extruder_retraction_speeds=20 +machine_endstop_positive_direction_y=False +raft_fan_speed=0 +machine_nozzle_head_distance=3 +speed_z_hop=10 +support_bottom_wall_count=1 +jerk_skirt_brim=20 +meshfix_union_all_remove_holes=False +support_tree_tip_diameter=0.8 +connect_infill_polygons=False +support_roof_line_width=0.4 +support_tree_min_height_to_model=3 +acceleration_layer_0=1000 +machine_nozzle_heat_up_speed=1.6 +material_flush_purge_length=60 +raft_interface_line_spacing=0.8 +support_xy_distance_overhang=0.2 +bridge_skin_material_flow_2=95.0 +coasting_enable=False +prime_blob_enable=False +roofing_layer_count=1 +jerk_topbottom=20 +brim_inside_margin=2.5 +skirt_gap=3 +mold_roof_height=0.5 +mold_width=5 +magic_mesh_surface_mode=normal +small_hole_max_size=0 +top_bottom_thickness=1 +acceleration_infill=3500 +travel_avoid_supports=False +gradual_infill_steps=0 +max_skin_angle_for_expansion=90 +small_feature_speed_factor=50 +infill_offset_y=0 +infill_offset_x=0 +expand_skins_expand_distance=0.8 +bottom_skin_preshrink=0.8 +center_object=False +support_use_towers=True +raft_interface_layers=1 +support_bottom_pattern=zigzag +xy_offset_layer_0=-0.095 +skin_angles=[] +wipe_hop_speed=10 +raft_interface_thickness=0.22499999999999998 +skirt_line_count=1 +mesh_position_y=0 +jerk_print=20 +infill_randomize_start_location=False +acceleration_prime_tower=2000 +speed_support_roof=35 +retraction_extra_prime_amount=0 +skin_outline_count=1 +jerk_prime_tower=20 +wall_transition_angle=10 +z_seam_position=back +retraction_count_max=25 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +support_roof_material_flow=95.0 +retraction_prime_speed=45 +z_seam_type=sharpest_corner +cool_min_layer_time_fan_speed_max=11 +machine_nozzle_size=0.4 +hole_xy_offset_max_diameter=0 +support_bottom_stair_step_min_slope=10.0 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=7200 +skirt_brim_speed=17.249999999999996 +switch_extruder_retraction_amount=16 +conical_overhang_angle=50 +infill_overlap_mm=0.0 +mesh_position_z=0 +skin_monotonic=False +meshfix_keep_open_polygons=False +sub_div_rad_add=0.4 +machine_extruder_end_pos_x=330 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=1000 +z_seam_relative=False +wipe_retraction_extra_prime_amount=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=100 +blackmagic=0 +slicing_tolerance=middle +machine_extruder_end_pos_y=237 +material_break_preparation_retracted_position=-16 +infill_sparse_thickness=0.15 +support_xy_distance=0.7 +speed_wall=45 +speed_wall_x=45 +retraction_min_travel=0.8 +support_bottom_line_width=0.4 +brim_replaces_support=True +acceleration_travel_layer_0=1428.5714285714287 +machine_nozzle_id=AA 0.4 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=110.0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +acceleration_support_infill=2000 +brim_gap=0 +raft_interface_acceleration=3500 +raft_surface_fan_speed=100 +lightning_infill_prune_angle=40 +bridge_skin_material_flow_3=95.0 +initial_bottom_layers=7 +bridge_fan_speed_2=100 +support_interface_pattern=zigzag +bottom_skin_expand_distance=0.8 +wipe_hop_enable=True +zig_zaggify_support=True +material_alternate_walls=False +material_end_of_filament_purge_length=20 +acceleration_support_bottom=1000 +material_break_preparation_speed=50 +acceleration_wall=1500 +ironing_enabled=False +acceleration_travel=5000 +support_bottom_material_flow=95.0 +support_roof_angles=[ ] +acceleration_roofing=1000 +switch_extruder_retraction_speed=20 +retraction_hop_enabled=True +bridge_wall_material_flow=100 +bridge_skin_speed_2=35 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +min_odd_wall_line_width=0.34 +top_thickness=1 +default_material_print_temperature=200 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=35 +connect_skin_polygons=False +infill_pattern=triangles +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +support_bottom_distance=0.15 +material_crystallinity=False +raft_surface_acceleration=3500 +jerk_wall=20 +dual=0 +support_bottom_enable=False +min_infill_area=0 +machine_nozzle_tip_outer_diameter=1.0 +support_xy_overrides_z=z_overrides_xy +support_brim_width=1.2000000000000002 +z_seam_x=165.0 +retraction_combing_max_distance=15 +machine_steps_per_mm_z=50 +support=0 +min_wall_line_width=0.34 +top_bottom=0 +support_roof_density=100 +top_layers=7 +support_tree_angle=60 +initial_layer_line_width_factor=100.0 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +jerk_wall_0=20 +retraction_hop=2 +raft_base_speed=15 +support_angle=60 +platform_adhesion=0 +support_bottom_stair_step_width=5.0 +infill_multiplier=1 +raft_interface_fan_speed=50.0 +wall_transition_filter_distance=100 +bridge_wall_coast=0 +jerk_support_interface=20 +support_roof_wall_count=1 +infill_sparse_density=20 +speed_ironing=23.333333333333332 +command_line_settings=0 +infill_wipe_dist=0 +skin_overlap=15 +speed_infill=70 +machine_nozzle_offset_x=0 +support_offset=0.0 +material_flow=100 +speed=0 +cool_fan_speed_min=100 +wipe_move_distance=20 +optimize_wall_printing_order=True +line_width=0.4 +switch_extruder_prime_speed=20 +min_bead_width=0.34 +wall_overhang_speed_factor=100 +jerk_support_infill=20 +material_adhesion_tendency=0 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +wall_line_width=0.4 +material_print_temperature=200 +min_even_wall_line_width=0.34 +raft_interface_speed=25.0 +travel_avoid_distance=3 +z_seam_y=240 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +small_feature_speed_factor_0=50 +conical_overhang_enabled=False +speed_travel_layer_0=150 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +roofing_pattern=lines +support_interface_material_flow=95.0 +infill_overlap=0 +extruder_nr=0 +support_interface_height=0.3 +support_skip_some_zags=False +skin_no_small_gaps_heuristic=False +speed_support=23 +ironing_inset=0.38 +bridge_fan_speed_3=100 +bridge_enable_more_layers=False +speed_topbottom=35 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +gradual_support_infill_step_height=0.6 +magic_fuzzy_skin_enabled=False +roofing_line_width=0.4 +jerk_infill=20 +speed_print=70 +support_bottom_offset=0.0 +bridge_wall_speed=35 +support_initial_layer_line_distance=0 +experimental=0 +zig_zaggify_infill=True +retraction_retract_speed=45 +layer_start_y=228.0 +extruder_prime_pos_x=-3 +wall_0_inset=0 +brim_width=7 +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_wipe_dist=0.2 +brim_line_count=18 +support_roof_line_distance=0.4 +prime_tower_line_width=0.4 +skin_overlap_mm=0.06 +small_feature_max_length=0.0 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +support_wall_count=1 +skin_edge_support_thickness=0.6 +wall_line_width_x=0.4 +jerk_support=20 +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +machine_nozzle_cool_down_speed=0.75 +skin_line_width=0.4 +machine_extruder_start_pos_x=330 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +gradual_support_infill_steps=0 +infill_angles=[ ] +minimum_interface_area=1.0 +raft_interface_line_width=0.6000000000000001 +material_surface_energy=100 +support_fan_enable=False +retraction_extrusion_window=1 +machine_extruder_start_pos_y=237 +support_infill_angles=[ ] +small_skin_width=0.8 +shell=0 +wall_line_width_0=0.4 +support_tree_top_rate=10 +cross_infill_pocket_size=6.0 +material_end_of_filament_purge_speed=0.5 +raft_margin=15 +material_break_preparation_temperature=210 +wall_transition_filter_deviation=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +acceleration_support_roof=1000 +support_roof_offset=0.0 +raft_surface_line_width=0.4 +wipe_retraction_prime_speed=45 +wipe_pause=0 +machine_settings=0 +acceleration_topbottom=1000 +jerk_travel=20 +acceleration_wall_0=1500 +cool_fan_speed_max=100 +cool_fan_enabled=True +wall_overhang_angle=90 +acceleration_ironing=1000 +prime_tower_flow=100 +top_skin_expand_distance=0.8 +speed_print_layer_0=17.249999999999996 +wall_x_material_flow_layer_0=95.0 +speed_travel=150 +layer_0_z_overlap=0.125 +ironing_pattern=zigzag +skin_edge_support_layers=4 +ironing_line_spacing=0.1 +speed_roofing=35 +brim_outside_only=True +material_standby_temperature=100 +support_bottom_stair_step_height=0.3 +fill_outline_gaps=True +support_zag_skip_count=0 +machine_endstop_positive_direction_x=False +material_final_print_temperature=185 +support_interface_line_width=0.4 +support_tree_angle_slow=40.0 +support_skip_zag_per_mm=20 +support_bottom_angles=[ ] +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=23 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=2.85 +raft_jerk=20 +raft_base_acceleration=3500 +acceleration_print=3500 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +bridge_fan_speed=100 +support_tree_max_diameter=25 +support_material_flow=100 +material_no_load_move_factor=0.91 +raft_surface_line_spacing=0.4 +support_roof_height=0.3 +support_infill_sparse_thickness=0.15 +machine_extruder_cooling_fan_number=0 +minimum_roof_area=1.0 +material_print_temperature_layer_0=200 +raft_base_fan_speed=0 +machine_steps_per_mm_x=50 +support_tree_branch_reach_limit=30 +support_bottom_density=100 +skin_material_flow=95.0 +support_conical_min_width=5.0 +support_line_width=0.4 +bridge_skin_density=80 +raft_base_line_width=0.8 +jerk_roofing=20 +raft_speed=15 +mold_angle=40 +material_break_speed=25 +speed_wall_0=23 +cool_lift_head=False +retraction_enable=True +support_line_distance=0 +bridge_skin_material_flow=95.0 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +retract_at_layer_change=False +wall_transition_length=0.4 +wipe_hop_amount=2 +support_join_distance=2.0 +material_guid=506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 +inset_direction=outside_in +support_roof_pattern=zigzag +bridge_skin_speed=35 +skirt_brim_material_flow=100 +raft_surface_thickness=0.15 +cool_fan_speed=100 +coasting_min_volume=0.8 +conical_overhang_hole_size=0 +jerk_support_bottom=20 +cool_min_speed=5 +wall_x_material_flow=100 +min_skin_width_for_expansion=6.429395695523605e-17 +meshfix=0 +acceleration_skirt_brim=1000 +support_interface_offset=0.0 +mesh_position_x=0 +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +z_seam_corner=z_seam_corner_none +bottom_thickness=1 +support_interface_wall_count=1 +raft_interface_jerk=20 +roofing_monotonic=True +support_interface_angles=[ ] +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.25 +wall_distribution_count=1 +retraction_speed=45 +extruder_prime_pos_y=6 +material=0 +infill_before_walls=True +support_z_distance=0.3 +meshfix_union_all=True +raft_surface_jerk=20 +infill_support_angle=40 +support_pattern=zigzag +clean_between_layers=False +skin_preshrink=0.8 +support_roof_enable=False +alternate_extra_perimeter=False +minimum_support_area=0.0 +lightning_infill_overhang_angle=40 +support_tree_rest_preference=graceful +coasting_speed=90 +speed_prime_tower=35 +infill=0 +jerk_wall_x=20 +mold_enabled=False +jerk_travel_layer_0=20.0 +infill_material_flow=100 +ironing_monotonic=False +extruder_prime_pos_z=2 +support_tower_roof_angle=65 +meshfix_maximum_deviation=0.04 +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +cool_fan_full_at_height=0.2 +support_brim_enable=True +minimum_bottom_area=1.0 +infill_line_distance=6.0 +jerk_support_roof=20 +meshfix_maximum_travel_resolution=0.8 +support_bottom_height=0.3 +raft_acceleration=3500 +ironing_flow=10.0 +support_bottom_line_distance=0.4 +raft_base_thickness=0.3 +retraction_hop_after_extruder_switch=True +support_top_distance=0.3 +top_bottom_pattern_0=lines +skin_material_flow_layer_0=90.0 +lightning_infill_support_angle=40 +machine_extruder_end_pos_abs=True +retraction_hop_after_extruder_switch_height=2 +acceleration_support=2000 +support_conical_angle=30 +speed_layer_0=17.249999999999996 +infill_enable_travel_optimization=False +raft_surface_speed=35 +cooling=0 +min_feature_size=0.1 +travel=0 +support_connect_zigzags=True +bottom_layers=7 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +material_flush_purge_speed=0.5 +wipe_retraction_speed=45 +retraction_amount=6.5 +material_break_retracted_position=-50 +material_initial_print_temperature=190 +support_tower_maximum_supported_diameter=3.0 +jerk_ironing=20 +roofing_angles=[] +bridge_skin_density_3=100 +support_interface_enable=False +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +roofing_material_flow=100 +support_interface_skip_height=0.15 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +bridge_sparse_infill_max_density=0 +skirt_brim_line_width=0.4 +cool_fan_full_layer=2 +gradual_infill_step_height=1.5 +machine_heat_zone_length=16 +support_interface_density=100 +support_infill_rate=0 +speed_support_interface=35 +cool_min_layer_time=6 +wipe_retraction_enable=True +support_tree_limit_branch_reach=True +wall_0_material_flow_layer_0=110.00000000000001 +cool_min_temperature=190 +jerk_layer_0=20 +switch_extruder_extra_prime_amount=0 +ironing_only_highest_layer=False +speed_support_bottom=35 +material_extrusion_cool_down_speed=0.7 +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_009.txt b/tests/voronoi_crash_resources/settings_009.txt new file mode 100644 index 0000000000..d18eb80b4c --- /dev/null +++ b/tests/voronoi_crash_resources/settings_009.txt @@ -0,0 +1,1114 @@ +initial_extruder_nr=0 +date=02-06-2023 +print_temperature=200 +material_name=empty +draft_shield_height_limitation=full +prime_tower_wipe_enabled=True +top_bottom_pattern=lines +connect_infill_polygons=False +xy_offset=-0.015 +raft_base_jerk=20 +machine_heated_build_volume=True +resolution=0 +machine_endstop_positive_direction_y=False +raft_fan_speed=0 +machine_nozzle_head_distance=3 +speed_z_hop=10 +support_bottom_wall_count=1 +jerk_skirt_brim=20 +meshfix_union_all_remove_holes=False +support_tree_tip_diameter=0.8 +support_roof_line_width=0.4 +material_shrinkage_percentage_xy=100.2 +support_tree_min_height_to_model=3 +acceleration_layer_0=1000 +machine_nozzle_heat_up_speed=1.4 +material_flush_purge_length=60 +raft_interface_line_spacing=0.8 +support_xy_distance_overhang=0.2 +bridge_skin_material_flow_2=95.0 +coasting_enable=False +prime_blob_enable=False +roofing_layer_count=1 +brim_inside_margin=2.5 +interlocking_depth=2 +skirt_gap=3 +mold_roof_height=0.5 +machine_max_acceleration_e=10000 +magic_mesh_surface_mode=normal +small_hole_max_size=0 +machine_gcode_flavor=Griffin +top_bottom_thickness=1 +acceleration_infill=3500 +travel_avoid_supports=False +gradual_infill_steps=0 +max_skin_angle_for_expansion=90 +infill_offset_y=0 +switch_extruder_retraction_speeds=20 +machine_firmware_retract=False +infill_offset_x=0 +expand_skins_expand_distance=0.8 +bottom_skin_preshrink=0.8 +center_object=False +support_use_towers=True +adaptive_layer_height_variation=0.1 +raft_interface_layers=1 +support_bottom_pattern=zigzag +xy_offset_layer_0=-0.095 +skin_angles=[] +wipe_hop_speed=10 +raft_interface_thickness=0.22499999999999998 +skirt_line_count=1 +prime_tower_size=20 +extruders_enabled_count=2 +smooth_spiralized_contours=True +time=15:42:02 +machine_buildplate_type=glass +mesh_position_y=0 +jerk_print=20 +machine_max_feedrate_y=300 +infill_randomize_start_location=False +acceleration_prime_tower=2000 +acceleration_wall_x=1500 +carve_multiple_volumes=True +flow_rate_extrusion_offset_factor=100 +speed_support_roof=35 +retraction_extra_prime_amount=0 +jerk_topbottom=20 +remove_empty_first_layers=True +wall_transition_angle=10 +support_extruder_nr=0 +z_seam_position=back +material_id=empty_material +retraction_count_max=25 +inset_direction=outside_in +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +meshfix_maximum_deviation=0.04 +mold_width=5 +adhesion_extruder_nr=-1 +brim_smart_ordering=True +raft_interface_acceleration=3500 +support_roof_material_flow=95.0 +cool_min_layer_time_fan_speed_max=11 +quality_changes_name=empty +machine_nozzle_size=0.4 +hole_xy_offset_max_diameter=0 +material_break_speed=25 +speed_print=35 +speed_slowdown_layers=1 +default_material_print_temperature=200 +jerk_support_interface=20 +support_tree_branch_reach_limit=30 +support_bottom_stair_step_min_slope=10.0 +bottom_thickness=1 +infill_material_flow=100 +infill_angles=[ ] +skirt_height=3 +sub_div_rad_add=0.4 +speed_layer_0=14.999999999999998 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=300 +switch_extruder_retraction_amount=8 +skirt_brim_speed=14.999999999999998 +raft_surface_line_width=0.4 +roofing_pattern=lines +jerk_ironing=20 +machine_shape=rectangular +slicing_tolerance=middle +raft_interface_fan_speed=50.0 +wipe_retraction_amount=6.5 +material_break_temperature=50 +print_bed_temperature=60 +lightning_infill_support_angle=40 +acceleration_support_interface=1000 +wipe_retraction_extra_prime_amount=0 +skirt_brim_extruder_nr=-1 +material_print_temperature_layer_0=200 +cool_fan_full_at_height=0.2 +machine_disallowed_areas=[] +z_seam_relative=False +support_structure=tree +infill_sparse_thickness=0.15 +cool_min_speed=4 +wall_transition_filter_distance=100 +conical_overhang_enabled=False +support_xy_distance=0.7 +speed_wall=30 +speed_wall_x=30 +material_bed_temp_wait=True +retraction_min_travel=5 +coasting_speed=90 +material_print_temp_prepend=True +support_bottom_line_width=0.4 +support_interface_extruder_nr=0 +support_tower_maximum_supported_diameter=3.0 +nozzle_disallowed_areas=[] +brim_replaces_support=True +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +wipe_brush_pos_x=100 +acceleration_travel_layer_0=1428.5714285714287 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=110.0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +acceleration_support_infill=2000 +brim_gap=0 +machine_acceleration=3000 +raft_surface_fan_speed=100 +switch_extruder_prime_speed=15 +min_bead_width=0.34 +wall_x_extruder_nr=-1 +lightning_infill_prune_angle=40 +bridge_skin_material_flow_3=95.0 +initial_bottom_layers=7 +bridge_fan_speed_2=50 +support_interface_pattern=zigzag +bottom_skin_expand_distance=0.8 +raft_base_extruder_nr=0 +acceleration_wall=1500 +ironing_enabled=False +acceleration_travel=5000 +support_bottom_material_flow=95.0 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +switch_extruder_retraction_speed=20 +retraction_hop_enabled=True +bridge_wall_material_flow=100 +bridge_skin_speed_2=20 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=20 +connect_skin_polygons=False +infill_pattern=triangles +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +support_bottom_distance=0.15 +material_crystallinity=False +raft_surface_acceleration=3500 +jerk_wall=20 +dual=0 +support_bottom_enable=False +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +support_xy_overrides_z=z_overrides_xy +support_brim_width=1.2000000000000002 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=165.0 +retraction_combing_max_distance=15 +machine_steps_per_mm_z=50 +interlocking_beam_layer_count=2 +infill_mesh_order=0 +support=0 +min_wall_line_width=0.34 +top_layers=7 +machine_max_jerk_z=0.4 +support_tree_angle=60 +alternate_carve_order=True +initial_layer_line_width_factor=100.0 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +machine_max_feedrate_x=300 +machine_width=330 +acceleration_support=2000 +raft_base_speed=15 +support_angle=60 +platform_adhesion=0 +support_bottom_stair_step_width=5.0 +material_alternate_walls=False +acceleration_support_bottom=1000 +material_end_of_filament_purge_length=20 +material_break_preparation_speed=2 +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +infill_multiplier=1 +prime_tower_enable=False +top_bottom=0 +support_roof_density=100 +machine_max_feedrate_z=40 +bridge_wall_coast=0 +support_roof_wall_count=1 +infill_extruder_nr=-1 +infill_sparse_density=20 +magic_spiralize=False +machine_show_variants=False +layer_height=0.15 +material_break_preparation_retracted_position=-16 +infill_mesh=False +speed_ironing=13.333333333333334 +command_line_settings=0 +wall_0_inset=0 +relative_extrusion=False +infill_wipe_dist=0 +print_sequence=all_at_once +skin_overlap=10 +speed_infill=35 +support_offset=0.0 +material_flow=100 +travel_speed=150 +speed=0 +cool_fan_speed_min=50 +wipe_move_distance=20 +wall_overhang_speed_factor=100 +jerk_support_infill=20 +material_adhesion_tendency=10 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +wall_line_width=0.4 +interlocking_boundary_avoidance=2 +material_print_temperature=200 +min_even_wall_line_width=0.34 +support_meshes_present=False +raft_interface_speed=25.0 +travel_avoid_distance=3 +z_seam_y=240 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +small_feature_speed_factor_0=50 +speed_travel_layer_0=150 +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +support_interface_height=0.3 +interlocking_orientation=22.5 +support_mesh_drop_down=True +skin_no_small_gaps_heuristic=False +ironing_line_spacing=0.1 +material_bed_temp_prepend=True +infill_before_walls=True +material=0 +support_interface_skip_height=0.15 +blackmagic=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=50 +bridge_enable_more_layers=False +speed_topbottom=20 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +support_infill_rate=0 +layer_start_y=228.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +adaptive_layer_height_enabled=False +support_connect_zigzags=True +ooze_shield_enabled=False +support_line_width=0.4 +roofing_line_width=0.4 +support_interface_material_flow=95.0 +infill_overlap=0 +wipe_retraction_speed=45 +retraction_amount=6.5 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +jerk_support_bottom=20 +top_thickness=1 +acceleration_enabled=True +support_roof_extruder_nr=0 +machine_center_is_zero=False +machine_scale_fan_speed_zero_to_one=False +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +layer_start_x=330.0 +machine_min_cool_heat_time_window=15 +lightning_infill_overhang_angle=40 +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +jerk_infill=20 +material_final_print_temperature=185 +layer_height_0=0.2 +support_initial_layer_line_distance=0 +machine_name=Ultimaker S5 +bridge_wall_min_length=2.1 +prime_tower_position_x=299.2 +experimental=0 +zig_zaggify_infill=True +retraction_retract_speed=45 +cool_fan_speed_max=100 +cool_fan_enabled=True +wall_overhang_angle=90 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +brim_width=3 +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_wipe_dist=0.2 +ironing_only_highest_layer=False +raft_remove_inside_corners=False +machine_max_feedrate_e=45 +prime_tower_line_width=0.4 +wall_line_width_x=0.4 +jerk_support=20 +machine_nozzle_cool_down_speed=0.8 +skin_line_width=0.4 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +gradual_support_infill_steps=0 +draft_shield_enabled=False +minimum_interface_area=1.0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +conical_overhang_angle=50 +mesh_position_z=0 +infill_overlap_mm=0.0 +wall_line_width_0=0.4 +interlocking_enable=False +support_tree_top_rate=10 +cross_infill_pocket_size=6.0 +material_end_of_filament_purge_speed=0.5 +machine_max_jerk_e=5.0 +raft_margin=15 +acceleration_support_roof=1000 +support_roof_offset=0.0 +wipe_retraction_prime_speed=45 +wipe_pause=0 +machine_settings=0 +acceleration_topbottom=1000 +jerk_travel=20 +acceleration_wall_0=1500 +support_infill_angles=[ ] +shell=0 +small_skin_width=0.8 +top_skin_expand_distance=0.8 +speed_print_layer_0=14.999999999999998 +wall_x_material_flow_layer_0=95.0 +speed_travel=150 +layer_0_z_overlap=0.125 +ironing_pattern=zigzag +support_type=everywhere +skin_edge_support_layers=4 +ooze_shield_dist=2 +ironing_inset=0.38 +bridge_fan_speed_3=50 +speed_support=23 +fill_outline_gaps=True +material_type=empty +support_zag_skip_count=0 +support_interface_line_width=0.4 +support_tree_angle_slow=40.0 +support_skip_zag_per_mm=20 +support_bottom_angles=[ ] +support_tree_limit_branch_reach=True +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=23 +default_material_bed_temperature=60 +raft_jerk=20 +acceleration_print=3500 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +raft_base_fan_speed=0 +bridge_settings_enabled=True +material_no_load_move_factor=0.940860215 +raft_surface_line_spacing=0.4 +support_roof_height=0.3 +material_bed_temperature_layer_0=60 +support_infill_sparse_thickness=0.15 +wall_extruder_nr=-1 +raft_base_acceleration=3500 +wall_0_extruder_nr=-1 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=20 +gradual_infill_step_height=1.5 +prime_tower_brim_enable=False +minimum_roof_area=1.0 +support_bottom_density=100 +skin_material_flow=95.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +support_roof_angles=[ ] +material_print_temp_wait=True +bridge_skin_density=80 +raft_base_line_width=0.8 +jerk_roofing=20 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +bridge_skin_speed=20 +skirt_brim_material_flow=100 +retraction_enable=True +support_line_distance=0 +bridge_skin_material_flow=95.0 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +retract_at_layer_change=False +wall_transition_length=0.4 +wipe_hop_amount=2 +support_join_distance=2.0 +material_shrinkage_percentage_z=100.1 +support_roof_line_distance=0.4 +brim_line_count=8 +support_mesh=False +support_roof_pattern=zigzag +speed_roofing=20 +support_bottom_stair_step_height=0.3 +brim_outside_only=True +material_standby_temperature=100 +raft_speed=15 +mold_angle=40 +retraction_combing=no_outer_surfaces +material_flow_layer_0=100 +wall_material_flow=100 +raft_surface_thickness=0.15 +cool_fan_speed=50 +coasting_min_volume=0.8 +optimize_wall_printing_order=True +line_width=0.4 +machine_minimum_feedrate=0.0 +skin_edge_support_thickness=0.6 +support_wall_count=1 +machine_max_acceleration_z=100 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +bridge_skin_density_3=100 +support_interface_enable=False +prime_tower_position_y=209.2 +mesh_position_x=0 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +gradual_support_infill_step_height=0.6 +top_skin_preshrink=0.8 +raft_airgap=0.25 +wall_distribution_count=1 +jerk_wall_0=20 +retraction_hop=2 +support_bottom_extruder_nr=0 +retraction_speed=45 +extruder_prime_pos_y=0 +flow_rate_max_extrusion_offset=0 +material_diameter=2.85 +support_z_distance=0.3 +meshfix_union_all=True +infill_support_angle=40 +jerk_prime_tower=20 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +support_pattern=zigzag +prime_tower_min_volume=6 +support_tree_rest_preference=graceful +material_bed_temperature=60 +support_interface_wall_count=1 +material_shrinkage_percentage=100.2 +raft_interface_jerk=20 +roofing_monotonic=True +support_interface_angles=[ ] +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +machine_head_with_fans_polygon=[[-41.4, -45.8], [-41.4, 36.0], [63.3, 36.0], [63.3, -45.8]] +z_seam_corner=z_seam_corner_none +nozzle_offsetting_for_disallowed_areas=False +meshfix=0 +acceleration_skirt_brim=1000 +machine_max_acceleration_y=9000 +meshfix_keep_open_polygons=False +skin_monotonic=False +support_interface_offset=0.0 +adhesion_type=brim +z_seam_type=sharpest_corner +retraction_prime_speed=15 +wall_x_material_flow=100 +min_skin_width_for_expansion=6.429395695523605e-17 +clean_between_layers=False +skin_preshrink=0.8 +speed_support_interface=35 +machine_max_acceleration_x=9000 +bridge_wall_speed=20 +support_bottom_offset=0.0 +support_roof_enable=False +alternate_extra_perimeter=False +speed_prime_tower=20 +support_infill_extruder_nr=0 +infill=0 +jerk_wall_x=20 +material_flush_purge_speed=0.5 +skin_material_flow_layer_0=90.0 +top_bottom_pattern_0=lines +bridge_fan_speed=100 +support_material_flow=100 +support_tree_max_diameter=25 +support_conical_angle=30 +support_enable=True +cool_min_layer_time=6 +day=Fri +wipe_retraction_enable=True +support_skip_some_zags=False +machine_steps_per_mm_x=50 +top_bottom_extruder_nr=-1 +ironing_flow=10.0 +support_bottom_line_distance=0.4 +roofing_extruder_nr=-1 +raft_base_thickness=0.3 +retraction_hop_after_extruder_switch=True +support_top_distance=0.3 +bridge_skin_support_threshold=50 +prime_tower_flow=100 +acceleration_ironing=1000 +roofing_material_flow=100 +support_fan_enable=False +retraction_extrusion_window=1 +support_tower_roof_angle=65 +extruder_prime_pos_z=0 +retraction_hop_after_extruder_switch_height=2 +raft_interface_line_width=0.6000000000000001 +gantry_height=55 +material_surface_energy=100 +machine_extruder_count=2 +jerk_support_roof=20 +minimum_bottom_area=1.0 +infill_line_distance=6.0 +infill_enable_travel_optimization=False +machine_height=300 +travel_retract_before_outer_wall=False +raft_surface_speed=35 +cooling=0 +machine_extruders_share_nozzle=False +raft_acceleration=3500 +support_bottom_height=0.3 +acceleration_travel_enabled=False +travel=0 +bottom_layers=7 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +min_feature_size=0.1 +quality_name=Normal +wall_0_material_flow_layer_0=110.00000000000001 +anti_overhang_mesh=False +support_interface_density=100 +ironing_monotonic=False +mold_enabled=False +jerk_travel_layer_0=20.0 +wipe_hop_enable=True +zig_zaggify_support=True +machine_depth=240 +skirt_brim_line_width=0.4 +cool_fan_full_layer=2 +bridge_sparse_infill_max_density=0 +roofing_angles=[] +material_initial_print_temperature=190 +material_break_retracted_position=-50 +machine_heat_zone_length=16 +adaptive_layer_height_threshold=0.2 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +cool_min_temperature=190 +jerk_layer_0=20 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +speed_support_bottom=35 +material_extrusion_cool_down_speed=0.7 +support_brim_enable=True +minimum_support_area=0.0 +prime_tower_wipe_enabled=True +acceleration_wall_x=1500 +machine_extruder_start_pos_abs=True +top_bottom_pattern=lines +xy_offset=-0.015 +machine_nozzle_offset_y=0 +raft_base_jerk=20 +resolution=0 +switch_extruder_retraction_speeds=20 +machine_endstop_positive_direction_y=False +raft_fan_speed=0 +machine_nozzle_head_distance=3 +speed_z_hop=10 +support_bottom_wall_count=1 +jerk_skirt_brim=20 +meshfix_union_all_remove_holes=False +support_tree_tip_diameter=0.8 +connect_infill_polygons=False +support_roof_line_width=0.4 +support_tree_min_height_to_model=3 +acceleration_layer_0=1000 +machine_nozzle_heat_up_speed=1.6 +material_flush_purge_length=60 +raft_interface_line_spacing=0.8 +support_xy_distance_overhang=0.2 +bridge_skin_material_flow_2=95.0 +coasting_enable=False +prime_blob_enable=False +roofing_layer_count=1 +jerk_topbottom=20 +brim_inside_margin=2.5 +skirt_gap=3 +mold_roof_height=0.5 +mold_width=5 +magic_mesh_surface_mode=normal +small_hole_max_size=0 +top_bottom_thickness=1 +acceleration_infill=3500 +travel_avoid_supports=False +gradual_infill_steps=0 +max_skin_angle_for_expansion=90 +small_feature_speed_factor=50 +infill_offset_y=0 +infill_offset_x=0 +expand_skins_expand_distance=0.8 +bottom_skin_preshrink=0.8 +center_object=False +support_use_towers=True +raft_interface_layers=1 +support_bottom_pattern=zigzag +xy_offset_layer_0=-0.095 +skin_angles=[] +wipe_hop_speed=10 +raft_interface_thickness=0.22499999999999998 +skirt_line_count=1 +mesh_position_y=0 +jerk_print=20 +infill_randomize_start_location=False +acceleration_prime_tower=2000 +speed_support_roof=35 +retraction_extra_prime_amount=0 +skin_outline_count=1 +jerk_prime_tower=20 +wall_transition_angle=10 +z_seam_position=back +retraction_count_max=25 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +support_roof_material_flow=95.0 +retraction_prime_speed=45 +z_seam_type=sharpest_corner +cool_min_layer_time_fan_speed_max=11 +machine_nozzle_size=0.4 +hole_xy_offset_max_diameter=0 +support_bottom_stair_step_min_slope=10.0 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=7200 +skirt_brim_speed=17.249999999999996 +switch_extruder_retraction_amount=16 +conical_overhang_angle=50 +infill_overlap_mm=0.0 +mesh_position_z=0 +skin_monotonic=False +meshfix_keep_open_polygons=False +sub_div_rad_add=0.4 +machine_extruder_end_pos_x=330 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=1000 +z_seam_relative=False +wipe_retraction_extra_prime_amount=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=100 +blackmagic=0 +slicing_tolerance=middle +machine_extruder_end_pos_y=237 +material_break_preparation_retracted_position=-16 +infill_sparse_thickness=0.15 +support_xy_distance=0.7 +speed_wall=45 +speed_wall_x=45 +retraction_min_travel=0.8 +support_bottom_line_width=0.4 +brim_replaces_support=True +acceleration_travel_layer_0=1428.5714285714287 +machine_nozzle_id=AA 0.4 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=110.0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +acceleration_support_infill=2000 +brim_gap=0 +raft_interface_acceleration=3500 +raft_surface_fan_speed=100 +lightning_infill_prune_angle=40 +bridge_skin_material_flow_3=95.0 +initial_bottom_layers=7 +bridge_fan_speed_2=100 +support_interface_pattern=zigzag +bottom_skin_expand_distance=0.8 +wipe_hop_enable=True +zig_zaggify_support=True +material_alternate_walls=False +material_end_of_filament_purge_length=20 +acceleration_support_bottom=1000 +material_break_preparation_speed=50 +acceleration_wall=1500 +ironing_enabled=False +acceleration_travel=5000 +support_bottom_material_flow=95.0 +support_roof_angles=[ ] +acceleration_roofing=1000 +switch_extruder_retraction_speed=20 +retraction_hop_enabled=True +bridge_wall_material_flow=100 +bridge_skin_speed_2=35 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +min_odd_wall_line_width=0.34 +top_thickness=1 +default_material_print_temperature=200 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=35 +connect_skin_polygons=False +infill_pattern=triangles +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +support_bottom_distance=0.15 +material_crystallinity=False +raft_surface_acceleration=3500 +jerk_wall=20 +dual=0 +support_bottom_enable=False +min_infill_area=0 +machine_nozzle_tip_outer_diameter=1.0 +support_xy_overrides_z=z_overrides_xy +support_brim_width=1.2000000000000002 +z_seam_x=165.0 +retraction_combing_max_distance=15 +machine_steps_per_mm_z=50 +support=0 +min_wall_line_width=0.34 +top_bottom=0 +support_roof_density=100 +top_layers=7 +support_tree_angle=60 +initial_layer_line_width_factor=100.0 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +jerk_wall_0=20 +retraction_hop=2 +raft_base_speed=15 +support_angle=60 +platform_adhesion=0 +support_bottom_stair_step_width=5.0 +infill_multiplier=1 +raft_interface_fan_speed=50.0 +wall_transition_filter_distance=100 +bridge_wall_coast=0 +jerk_support_interface=20 +support_roof_wall_count=1 +infill_sparse_density=20 +speed_ironing=23.333333333333332 +command_line_settings=0 +infill_wipe_dist=0 +skin_overlap=15 +speed_infill=70 +machine_nozzle_offset_x=0 +support_offset=0.0 +material_flow=100 +speed=0 +cool_fan_speed_min=100 +wipe_move_distance=20 +optimize_wall_printing_order=True +line_width=0.4 +switch_extruder_prime_speed=20 +min_bead_width=0.34 +wall_overhang_speed_factor=100 +jerk_support_infill=20 +material_adhesion_tendency=0 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +wall_line_width=0.4 +material_print_temperature=200 +min_even_wall_line_width=0.34 +raft_interface_speed=25.0 +travel_avoid_distance=3 +z_seam_y=240 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +small_feature_speed_factor_0=50 +conical_overhang_enabled=False +speed_travel_layer_0=150 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +roofing_pattern=lines +support_interface_material_flow=95.0 +infill_overlap=0 +extruder_nr=0 +support_interface_height=0.3 +support_skip_some_zags=False +skin_no_small_gaps_heuristic=False +speed_support=23 +ironing_inset=0.38 +bridge_fan_speed_3=100 +bridge_enable_more_layers=False +speed_topbottom=35 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +gradual_support_infill_step_height=0.6 +magic_fuzzy_skin_enabled=False +roofing_line_width=0.4 +jerk_infill=20 +speed_print=70 +support_bottom_offset=0.0 +bridge_wall_speed=35 +support_initial_layer_line_distance=0 +experimental=0 +zig_zaggify_infill=True +retraction_retract_speed=45 +layer_start_y=228.0 +extruder_prime_pos_x=-3 +wall_0_inset=0 +brim_width=7 +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_wipe_dist=0.2 +brim_line_count=18 +support_roof_line_distance=0.4 +prime_tower_line_width=0.4 +skin_overlap_mm=0.06 +small_feature_max_length=0.0 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +support_wall_count=1 +skin_edge_support_thickness=0.6 +wall_line_width_x=0.4 +jerk_support=20 +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +machine_nozzle_cool_down_speed=0.75 +skin_line_width=0.4 +machine_extruder_start_pos_x=330 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +gradual_support_infill_steps=0 +infill_angles=[ ] +minimum_interface_area=1.0 +raft_interface_line_width=0.6000000000000001 +material_surface_energy=100 +support_fan_enable=False +retraction_extrusion_window=1 +machine_extruder_start_pos_y=237 +support_infill_angles=[ ] +small_skin_width=0.8 +shell=0 +wall_line_width_0=0.4 +support_tree_top_rate=10 +cross_infill_pocket_size=6.0 +material_end_of_filament_purge_speed=0.5 +raft_margin=15 +material_break_preparation_temperature=210 +wall_transition_filter_deviation=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +acceleration_support_roof=1000 +support_roof_offset=0.0 +raft_surface_line_width=0.4 +wipe_retraction_prime_speed=45 +wipe_pause=0 +machine_settings=0 +acceleration_topbottom=1000 +jerk_travel=20 +acceleration_wall_0=1500 +cool_fan_speed_max=100 +cool_fan_enabled=True +wall_overhang_angle=90 +acceleration_ironing=1000 +prime_tower_flow=100 +top_skin_expand_distance=0.8 +speed_print_layer_0=17.249999999999996 +wall_x_material_flow_layer_0=95.0 +speed_travel=150 +layer_0_z_overlap=0.125 +ironing_pattern=zigzag +skin_edge_support_layers=4 +ironing_line_spacing=0.1 +speed_roofing=35 +brim_outside_only=True +material_standby_temperature=100 +support_bottom_stair_step_height=0.3 +fill_outline_gaps=True +support_zag_skip_count=0 +machine_endstop_positive_direction_x=False +material_final_print_temperature=185 +support_interface_line_width=0.4 +support_tree_angle_slow=40.0 +support_skip_zag_per_mm=20 +support_bottom_angles=[ ] +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=23 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=2.85 +raft_jerk=20 +raft_base_acceleration=3500 +acceleration_print=3500 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +bridge_fan_speed=100 +support_tree_max_diameter=25 +support_material_flow=100 +material_no_load_move_factor=0.91 +raft_surface_line_spacing=0.4 +support_roof_height=0.3 +support_infill_sparse_thickness=0.15 +machine_extruder_cooling_fan_number=0 +minimum_roof_area=1.0 +material_print_temperature_layer_0=200 +raft_base_fan_speed=0 +machine_steps_per_mm_x=50 +support_tree_branch_reach_limit=30 +support_bottom_density=100 +skin_material_flow=95.0 +support_conical_min_width=5.0 +support_line_width=0.4 +bridge_skin_density=80 +raft_base_line_width=0.8 +jerk_roofing=20 +raft_speed=15 +mold_angle=40 +material_break_speed=25 +speed_wall_0=23 +cool_lift_head=False +retraction_enable=True +support_line_distance=0 +bridge_skin_material_flow=95.0 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +retract_at_layer_change=False +wall_transition_length=0.4 +wipe_hop_amount=2 +support_join_distance=2.0 +material_guid=506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 +inset_direction=outside_in +support_roof_pattern=zigzag +bridge_skin_speed=35 +skirt_brim_material_flow=100 +raft_surface_thickness=0.15 +cool_fan_speed=100 +coasting_min_volume=0.8 +conical_overhang_hole_size=0 +jerk_support_bottom=20 +cool_min_speed=5 +wall_x_material_flow=100 +min_skin_width_for_expansion=6.429395695523605e-17 +meshfix=0 +acceleration_skirt_brim=1000 +support_interface_offset=0.0 +mesh_position_x=0 +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +z_seam_corner=z_seam_corner_none +bottom_thickness=1 +support_interface_wall_count=1 +raft_interface_jerk=20 +roofing_monotonic=True +support_interface_angles=[ ] +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.25 +wall_distribution_count=1 +retraction_speed=45 +extruder_prime_pos_y=6 +material=0 +infill_before_walls=True +support_z_distance=0.3 +meshfix_union_all=True +raft_surface_jerk=20 +infill_support_angle=40 +support_pattern=zigzag +clean_between_layers=False +skin_preshrink=0.8 +support_roof_enable=False +alternate_extra_perimeter=False +minimum_support_area=0.0 +lightning_infill_overhang_angle=40 +support_tree_rest_preference=graceful +coasting_speed=90 +speed_prime_tower=35 +infill=0 +jerk_wall_x=20 +mold_enabled=False +jerk_travel_layer_0=20.0 +infill_material_flow=100 +ironing_monotonic=False +extruder_prime_pos_z=2 +support_tower_roof_angle=65 +meshfix_maximum_deviation=0.04 +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +cool_fan_full_at_height=0.2 +support_brim_enable=True +minimum_bottom_area=1.0 +infill_line_distance=6.0 +jerk_support_roof=20 +meshfix_maximum_travel_resolution=0.8 +support_bottom_height=0.3 +raft_acceleration=3500 +ironing_flow=10.0 +support_bottom_line_distance=0.4 +raft_base_thickness=0.3 +retraction_hop_after_extruder_switch=True +support_top_distance=0.3 +top_bottom_pattern_0=lines +skin_material_flow_layer_0=90.0 +lightning_infill_support_angle=40 +machine_extruder_end_pos_abs=True +retraction_hop_after_extruder_switch_height=2 +acceleration_support=2000 +support_conical_angle=30 +speed_layer_0=17.249999999999996 +infill_enable_travel_optimization=False +raft_surface_speed=35 +cooling=0 +min_feature_size=0.1 +travel=0 +support_connect_zigzags=True +bottom_layers=7 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +material_flush_purge_speed=0.5 +wipe_retraction_speed=45 +retraction_amount=6.5 +material_break_retracted_position=-50 +material_initial_print_temperature=190 +support_tower_maximum_supported_diameter=3.0 +jerk_ironing=20 +roofing_angles=[] +bridge_skin_density_3=100 +support_interface_enable=False +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +roofing_material_flow=100 +support_interface_skip_height=0.15 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +bridge_sparse_infill_max_density=0 +skirt_brim_line_width=0.4 +cool_fan_full_layer=2 +gradual_infill_step_height=1.5 +machine_heat_zone_length=16 +support_interface_density=100 +support_infill_rate=0 +speed_support_interface=35 +cool_min_layer_time=6 +wipe_retraction_enable=True +support_tree_limit_branch_reach=True +wall_0_material_flow_layer_0=110.00000000000001 +cool_min_temperature=190 +jerk_layer_0=20 +switch_extruder_extra_prime_amount=0 +ironing_only_highest_layer=False +speed_support_bottom=35 +material_extrusion_cool_down_speed=0.7 +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_010.txt b/tests/voronoi_crash_resources/settings_010.txt new file mode 100644 index 0000000000..3843da798c --- /dev/null +++ b/tests/voronoi_crash_resources/settings_010.txt @@ -0,0 +1,1114 @@ +initial_extruder_nr=0 +date=02-06-2023 +print_temperature=200 +material_name=empty +draft_shield_height_limitation=full +prime_tower_wipe_enabled=True +top_bottom_pattern=lines +connect_infill_polygons=False +xy_offset=-0.015 +raft_base_jerk=20 +machine_heated_build_volume=True +resolution=0 +machine_endstop_positive_direction_y=False +raft_fan_speed=0 +machine_nozzle_head_distance=3 +speed_z_hop=10 +support_bottom_wall_count=1 +jerk_skirt_brim=20 +meshfix_union_all_remove_holes=False +support_tree_tip_diameter=0.8 +support_roof_line_width=0.4 +material_shrinkage_percentage_xy=100.2 +support_tree_min_height_to_model=3 +acceleration_layer_0=1000 +machine_nozzle_heat_up_speed=1.4 +material_flush_purge_length=60 +raft_interface_line_spacing=0.8 +support_xy_distance_overhang=0.2 +bridge_skin_material_flow_2=95.0 +coasting_enable=False +prime_blob_enable=False +roofing_layer_count=1 +brim_inside_margin=2.5 +interlocking_depth=2 +skirt_gap=3 +mold_roof_height=0.5 +machine_max_acceleration_e=10000 +magic_mesh_surface_mode=normal +small_hole_max_size=0 +machine_gcode_flavor=Griffin +top_bottom_thickness=1 +acceleration_infill=3500 +travel_avoid_supports=False +gradual_infill_steps=0 +max_skin_angle_for_expansion=90 +infill_offset_y=0 +switch_extruder_retraction_speeds=20 +machine_firmware_retract=False +infill_offset_x=0 +expand_skins_expand_distance=0.8 +bottom_skin_preshrink=0.8 +center_object=False +support_use_towers=True +adaptive_layer_height_variation=0.1 +raft_interface_layers=1 +support_bottom_pattern=zigzag +xy_offset_layer_0=-0.095 +skin_angles=[] +wipe_hop_speed=10 +raft_interface_thickness=0.22499999999999998 +skirt_line_count=1 +prime_tower_size=20 +extruders_enabled_count=2 +smooth_spiralized_contours=True +time=15:50:07 +machine_buildplate_type=glass +mesh_position_y=0 +jerk_print=20 +machine_max_feedrate_y=300 +infill_randomize_start_location=False +acceleration_prime_tower=2000 +acceleration_wall_x=1500 +carve_multiple_volumes=True +flow_rate_extrusion_offset_factor=100 +speed_support_roof=35 +retraction_extra_prime_amount=0 +jerk_topbottom=20 +remove_empty_first_layers=True +wall_transition_angle=10 +support_extruder_nr=0 +z_seam_position=back +material_id=empty_material +retraction_count_max=25 +inset_direction=outside_in +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +meshfix_maximum_deviation=0.04 +mold_width=5 +adhesion_extruder_nr=-1 +brim_smart_ordering=True +raft_interface_acceleration=3500 +support_roof_material_flow=95.0 +cool_min_layer_time_fan_speed_max=11 +quality_changes_name=empty +machine_nozzle_size=0.4 +hole_xy_offset_max_diameter=0 +material_break_speed=25 +speed_print=35 +speed_slowdown_layers=1 +default_material_print_temperature=200 +jerk_support_interface=20 +support_tree_branch_reach_limit=30 +support_bottom_stair_step_min_slope=10.0 +bottom_thickness=1 +infill_material_flow=100 +infill_angles=[ ] +skirt_height=3 +sub_div_rad_add=0.4 +speed_layer_0=14.999999999999998 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=300 +switch_extruder_retraction_amount=8 +skirt_brim_speed=14.999999999999998 +raft_surface_line_width=0.4 +roofing_pattern=lines +jerk_ironing=20 +machine_shape=rectangular +slicing_tolerance=middle +raft_interface_fan_speed=50.0 +wipe_retraction_amount=6.5 +material_break_temperature=50 +print_bed_temperature=60 +lightning_infill_support_angle=40 +acceleration_support_interface=1000 +wipe_retraction_extra_prime_amount=0 +skirt_brim_extruder_nr=-1 +material_print_temperature_layer_0=200 +cool_fan_full_at_height=0.2 +machine_disallowed_areas=[] +z_seam_relative=False +support_structure=tree +infill_sparse_thickness=0.15 +cool_min_speed=4 +wall_transition_filter_distance=100 +conical_overhang_enabled=False +support_xy_distance=0.7 +speed_wall=30 +speed_wall_x=30 +material_bed_temp_wait=True +retraction_min_travel=5 +coasting_speed=90 +material_print_temp_prepend=True +support_bottom_line_width=0.4 +support_interface_extruder_nr=0 +support_tower_maximum_supported_diameter=3.0 +nozzle_disallowed_areas=[] +brim_replaces_support=True +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +wipe_brush_pos_x=100 +acceleration_travel_layer_0=1428.5714285714287 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=110.0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +acceleration_support_infill=2000 +brim_gap=0 +machine_acceleration=3000 +raft_surface_fan_speed=100 +switch_extruder_prime_speed=15 +min_bead_width=0.34 +wall_x_extruder_nr=-1 +lightning_infill_prune_angle=40 +bridge_skin_material_flow_3=95.0 +initial_bottom_layers=7 +bridge_fan_speed_2=50 +support_interface_pattern=zigzag +bottom_skin_expand_distance=0.8 +raft_base_extruder_nr=0 +acceleration_wall=1500 +ironing_enabled=False +acceleration_travel=5000 +support_bottom_material_flow=95.0 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +switch_extruder_retraction_speed=20 +retraction_hop_enabled=True +bridge_wall_material_flow=100 +bridge_skin_speed_2=20 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=20 +connect_skin_polygons=False +infill_pattern=triangles +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +support_bottom_distance=0.15 +material_crystallinity=False +raft_surface_acceleration=3500 +jerk_wall=20 +dual=0 +support_bottom_enable=False +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +support_xy_overrides_z=z_overrides_xy +support_brim_width=1.2000000000000002 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=165.0 +retraction_combing_max_distance=15 +machine_steps_per_mm_z=50 +interlocking_beam_layer_count=2 +infill_mesh_order=0 +support=0 +min_wall_line_width=0.34 +top_layers=7 +machine_max_jerk_z=0.4 +support_tree_angle=60 +alternate_carve_order=True +initial_layer_line_width_factor=100.0 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +machine_max_feedrate_x=300 +machine_width=330 +acceleration_support=2000 +raft_base_speed=15 +support_angle=60 +platform_adhesion=0 +support_bottom_stair_step_width=5.0 +material_alternate_walls=False +acceleration_support_bottom=1000 +material_end_of_filament_purge_length=20 +material_break_preparation_speed=2 +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +infill_multiplier=1 +prime_tower_enable=False +top_bottom=0 +support_roof_density=100 +machine_max_feedrate_z=40 +bridge_wall_coast=0 +support_roof_wall_count=1 +infill_extruder_nr=-1 +infill_sparse_density=20 +magic_spiralize=False +machine_show_variants=False +layer_height=0.15 +material_break_preparation_retracted_position=-16 +infill_mesh=False +speed_ironing=13.333333333333334 +command_line_settings=0 +wall_0_inset=0 +relative_extrusion=False +infill_wipe_dist=0 +print_sequence=all_at_once +skin_overlap=10 +speed_infill=35 +support_offset=0.0 +material_flow=100 +travel_speed=150 +speed=0 +cool_fan_speed_min=50 +wipe_move_distance=20 +wall_overhang_speed_factor=100 +jerk_support_infill=20 +material_adhesion_tendency=10 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +wall_line_width=0.4 +interlocking_boundary_avoidance=2 +material_print_temperature=200 +min_even_wall_line_width=0.34 +support_meshes_present=False +raft_interface_speed=25.0 +travel_avoid_distance=3 +z_seam_y=240 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +small_feature_speed_factor_0=50 +speed_travel_layer_0=150 +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +support_interface_height=0.3 +interlocking_orientation=22.5 +support_mesh_drop_down=True +skin_no_small_gaps_heuristic=False +ironing_line_spacing=0.1 +material_bed_temp_prepend=True +infill_before_walls=True +material=0 +support_interface_skip_height=0.15 +blackmagic=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=50 +bridge_enable_more_layers=False +speed_topbottom=20 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +support_infill_rate=0 +layer_start_y=228.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +adaptive_layer_height_enabled=False +support_connect_zigzags=True +ooze_shield_enabled=False +support_line_width=0.4 +roofing_line_width=0.4 +support_interface_material_flow=95.0 +infill_overlap=0 +wipe_retraction_speed=45 +retraction_amount=6.5 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +jerk_support_bottom=20 +top_thickness=1 +acceleration_enabled=True +support_roof_extruder_nr=0 +machine_center_is_zero=False +machine_scale_fan_speed_zero_to_one=False +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +layer_start_x=330.0 +machine_min_cool_heat_time_window=15 +lightning_infill_overhang_angle=40 +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +jerk_infill=20 +material_final_print_temperature=185 +layer_height_0=0.2 +support_initial_layer_line_distance=0 +machine_name=Ultimaker S5 +bridge_wall_min_length=2.1 +prime_tower_position_x=299.2 +experimental=0 +zig_zaggify_infill=True +retraction_retract_speed=45 +cool_fan_speed_max=100 +cool_fan_enabled=True +wall_overhang_angle=90 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +brim_width=3 +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_wipe_dist=0.2 +ironing_only_highest_layer=False +raft_remove_inside_corners=False +machine_max_feedrate_e=45 +prime_tower_line_width=0.4 +wall_line_width_x=0.4 +jerk_support=20 +machine_nozzle_cool_down_speed=0.8 +skin_line_width=0.4 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +gradual_support_infill_steps=0 +draft_shield_enabled=False +minimum_interface_area=1.0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +conical_overhang_angle=50 +mesh_position_z=0 +infill_overlap_mm=0.0 +wall_line_width_0=0.4 +interlocking_enable=False +support_tree_top_rate=10 +cross_infill_pocket_size=6.0 +material_end_of_filament_purge_speed=0.5 +machine_max_jerk_e=5.0 +raft_margin=15 +acceleration_support_roof=1000 +support_roof_offset=0.0 +wipe_retraction_prime_speed=45 +wipe_pause=0 +machine_settings=0 +acceleration_topbottom=1000 +jerk_travel=20 +acceleration_wall_0=1500 +support_infill_angles=[ ] +shell=0 +small_skin_width=0.8 +top_skin_expand_distance=0.8 +speed_print_layer_0=14.999999999999998 +wall_x_material_flow_layer_0=95.0 +speed_travel=150 +layer_0_z_overlap=0.125 +ironing_pattern=zigzag +support_type=everywhere +skin_edge_support_layers=4 +ooze_shield_dist=2 +ironing_inset=0.38 +bridge_fan_speed_3=50 +speed_support=23 +fill_outline_gaps=True +material_type=empty +support_zag_skip_count=0 +support_interface_line_width=0.4 +support_tree_angle_slow=40.0 +support_skip_zag_per_mm=20 +support_bottom_angles=[ ] +support_tree_limit_branch_reach=True +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=23 +default_material_bed_temperature=60 +raft_jerk=20 +acceleration_print=3500 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +raft_base_fan_speed=0 +bridge_settings_enabled=True +material_no_load_move_factor=0.940860215 +raft_surface_line_spacing=0.4 +support_roof_height=0.3 +material_bed_temperature_layer_0=60 +support_infill_sparse_thickness=0.15 +wall_extruder_nr=-1 +raft_base_acceleration=3500 +wall_0_extruder_nr=-1 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=20 +gradual_infill_step_height=1.5 +prime_tower_brim_enable=False +minimum_roof_area=1.0 +support_bottom_density=100 +skin_material_flow=95.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +support_roof_angles=[ ] +material_print_temp_wait=True +bridge_skin_density=80 +raft_base_line_width=0.8 +jerk_roofing=20 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +bridge_skin_speed=20 +skirt_brim_material_flow=100 +retraction_enable=True +support_line_distance=0 +bridge_skin_material_flow=95.0 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +retract_at_layer_change=False +wall_transition_length=0.4 +wipe_hop_amount=2 +support_join_distance=2.0 +material_shrinkage_percentage_z=100.1 +support_roof_line_distance=0.4 +brim_line_count=8 +support_mesh=False +support_roof_pattern=zigzag +speed_roofing=20 +support_bottom_stair_step_height=0.3 +brim_outside_only=True +material_standby_temperature=100 +raft_speed=15 +mold_angle=40 +retraction_combing=no_outer_surfaces +material_flow_layer_0=100 +wall_material_flow=100 +raft_surface_thickness=0.15 +cool_fan_speed=50 +coasting_min_volume=0.8 +optimize_wall_printing_order=True +line_width=0.4 +machine_minimum_feedrate=0.0 +skin_edge_support_thickness=0.6 +support_wall_count=1 +machine_max_acceleration_z=100 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +bridge_skin_density_3=100 +support_interface_enable=False +prime_tower_position_y=209.2 +mesh_position_x=0 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +gradual_support_infill_step_height=0.6 +top_skin_preshrink=0.8 +raft_airgap=0.25 +wall_distribution_count=1 +jerk_wall_0=20 +retraction_hop=2 +support_bottom_extruder_nr=0 +retraction_speed=45 +extruder_prime_pos_y=0 +flow_rate_max_extrusion_offset=0 +material_diameter=2.85 +support_z_distance=0.3 +meshfix_union_all=True +infill_support_angle=40 +jerk_prime_tower=20 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +support_pattern=zigzag +prime_tower_min_volume=6 +support_tree_rest_preference=graceful +material_bed_temperature=60 +support_interface_wall_count=1 +material_shrinkage_percentage=100.2 +raft_interface_jerk=20 +roofing_monotonic=True +support_interface_angles=[ ] +small_feature_max_length=0.0 +skin_overlap_mm=0.04 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +machine_head_with_fans_polygon=[[-41.4, -45.8], [-41.4, 36.0], [63.3, 36.0], [63.3, -45.8]] +z_seam_corner=z_seam_corner_none +nozzle_offsetting_for_disallowed_areas=False +meshfix=0 +acceleration_skirt_brim=1000 +machine_max_acceleration_y=9000 +meshfix_keep_open_polygons=False +skin_monotonic=False +support_interface_offset=0.0 +adhesion_type=brim +z_seam_type=sharpest_corner +retraction_prime_speed=15 +wall_x_material_flow=100 +min_skin_width_for_expansion=6.429395695523605e-17 +clean_between_layers=False +skin_preshrink=0.8 +speed_support_interface=35 +machine_max_acceleration_x=9000 +bridge_wall_speed=20 +support_bottom_offset=0.0 +support_roof_enable=False +alternate_extra_perimeter=False +speed_prime_tower=20 +support_infill_extruder_nr=0 +infill=0 +jerk_wall_x=20 +material_flush_purge_speed=0.5 +skin_material_flow_layer_0=90.0 +top_bottom_pattern_0=lines +bridge_fan_speed=100 +support_material_flow=100 +support_tree_max_diameter=25 +support_conical_angle=30 +support_enable=True +cool_min_layer_time=6 +day=Fri +wipe_retraction_enable=True +support_skip_some_zags=False +machine_steps_per_mm_x=50 +top_bottom_extruder_nr=-1 +ironing_flow=10.0 +support_bottom_line_distance=0.4 +roofing_extruder_nr=-1 +raft_base_thickness=0.3 +retraction_hop_after_extruder_switch=True +support_top_distance=0.3 +bridge_skin_support_threshold=50 +prime_tower_flow=100 +acceleration_ironing=1000 +roofing_material_flow=100 +support_fan_enable=False +retraction_extrusion_window=1 +support_tower_roof_angle=65 +extruder_prime_pos_z=0 +retraction_hop_after_extruder_switch_height=2 +raft_interface_line_width=0.6000000000000001 +gantry_height=55 +material_surface_energy=100 +machine_extruder_count=2 +jerk_support_roof=20 +minimum_bottom_area=1.0 +infill_line_distance=6.0 +infill_enable_travel_optimization=False +machine_height=300 +travel_retract_before_outer_wall=False +raft_surface_speed=35 +cooling=0 +machine_extruders_share_nozzle=False +raft_acceleration=3500 +support_bottom_height=0.3 +acceleration_travel_enabled=False +travel=0 +bottom_layers=7 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +min_feature_size=0.1 +quality_name=Normal +wall_0_material_flow_layer_0=110.00000000000001 +anti_overhang_mesh=False +support_interface_density=100 +ironing_monotonic=False +mold_enabled=False +jerk_travel_layer_0=20.0 +wipe_hop_enable=True +zig_zaggify_support=True +machine_depth=240 +skirt_brim_line_width=0.4 +cool_fan_full_layer=2 +bridge_sparse_infill_max_density=0 +roofing_angles=[] +material_initial_print_temperature=190 +material_break_retracted_position=-50 +machine_heat_zone_length=16 +adaptive_layer_height_threshold=0.2 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +cool_min_temperature=190 +jerk_layer_0=20 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +speed_support_bottom=35 +material_extrusion_cool_down_speed=0.7 +support_brim_enable=True +minimum_support_area=0.0 +prime_tower_wipe_enabled=True +acceleration_wall_x=1500 +machine_extruder_start_pos_abs=True +top_bottom_pattern=lines +xy_offset=-0.015 +machine_nozzle_offset_y=0 +raft_base_jerk=20 +resolution=0 +switch_extruder_retraction_speeds=20 +machine_endstop_positive_direction_y=False +raft_fan_speed=0 +machine_nozzle_head_distance=3 +speed_z_hop=10 +support_bottom_wall_count=1 +jerk_skirt_brim=20 +meshfix_union_all_remove_holes=False +support_tree_tip_diameter=0.8 +connect_infill_polygons=False +support_roof_line_width=0.4 +support_tree_min_height_to_model=3 +acceleration_layer_0=1000 +machine_nozzle_heat_up_speed=1.6 +material_flush_purge_length=60 +raft_interface_line_spacing=0.8 +support_xy_distance_overhang=0.2 +bridge_skin_material_flow_2=95.0 +coasting_enable=False +prime_blob_enable=False +roofing_layer_count=1 +jerk_topbottom=20 +brim_inside_margin=2.5 +skirt_gap=3 +mold_roof_height=0.5 +mold_width=5 +magic_mesh_surface_mode=normal +small_hole_max_size=0 +top_bottom_thickness=1 +acceleration_infill=3500 +travel_avoid_supports=False +gradual_infill_steps=0 +max_skin_angle_for_expansion=90 +small_feature_speed_factor=50 +infill_offset_y=0 +infill_offset_x=0 +expand_skins_expand_distance=0.8 +bottom_skin_preshrink=0.8 +center_object=False +support_use_towers=True +raft_interface_layers=1 +support_bottom_pattern=zigzag +xy_offset_layer_0=-0.095 +skin_angles=[] +wipe_hop_speed=10 +raft_interface_thickness=0.22499999999999998 +skirt_line_count=1 +mesh_position_y=0 +jerk_print=20 +infill_randomize_start_location=False +acceleration_prime_tower=2000 +speed_support_roof=35 +retraction_extra_prime_amount=0 +skin_outline_count=1 +jerk_prime_tower=20 +wall_transition_angle=10 +z_seam_position=back +retraction_count_max=25 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +support_roof_material_flow=95.0 +retraction_prime_speed=45 +z_seam_type=sharpest_corner +cool_min_layer_time_fan_speed_max=11 +machine_nozzle_size=0.4 +hole_xy_offset_max_diameter=0 +support_bottom_stair_step_min_slope=10.0 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=7200 +skirt_brim_speed=17.249999999999996 +switch_extruder_retraction_amount=16 +conical_overhang_angle=50 +infill_overlap_mm=0.0 +mesh_position_z=0 +skin_monotonic=False +meshfix_keep_open_polygons=False +sub_div_rad_add=0.4 +machine_extruder_end_pos_x=330 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=1000 +z_seam_relative=False +wipe_retraction_extra_prime_amount=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=100 +blackmagic=0 +slicing_tolerance=middle +machine_extruder_end_pos_y=237 +material_break_preparation_retracted_position=-16 +infill_sparse_thickness=0.15 +support_xy_distance=0.7 +speed_wall=45 +speed_wall_x=45 +retraction_min_travel=0.8 +support_bottom_line_width=0.4 +brim_replaces_support=True +acceleration_travel_layer_0=1428.5714285714287 +machine_nozzle_id=AA 0.4 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=110.0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +acceleration_support_infill=2000 +brim_gap=0 +raft_interface_acceleration=3500 +raft_surface_fan_speed=100 +lightning_infill_prune_angle=40 +bridge_skin_material_flow_3=95.0 +initial_bottom_layers=7 +bridge_fan_speed_2=100 +support_interface_pattern=zigzag +bottom_skin_expand_distance=0.8 +wipe_hop_enable=True +zig_zaggify_support=True +material_alternate_walls=False +material_end_of_filament_purge_length=20 +acceleration_support_bottom=1000 +material_break_preparation_speed=50 +acceleration_wall=1500 +ironing_enabled=False +acceleration_travel=5000 +support_bottom_material_flow=95.0 +support_roof_angles=[ ] +acceleration_roofing=1000 +switch_extruder_retraction_speed=20 +retraction_hop_enabled=True +bridge_wall_material_flow=100 +bridge_skin_speed_2=35 +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +min_odd_wall_line_width=0.34 +top_thickness=1 +default_material_print_temperature=200 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=35 +connect_skin_polygons=False +infill_pattern=triangles +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +support_bottom_distance=0.15 +material_crystallinity=False +raft_surface_acceleration=3500 +jerk_wall=20 +dual=0 +support_bottom_enable=False +min_infill_area=0 +machine_nozzle_tip_outer_diameter=1.0 +support_xy_overrides_z=z_overrides_xy +support_brim_width=1.2000000000000002 +z_seam_x=165.0 +retraction_combing_max_distance=15 +machine_steps_per_mm_z=50 +support=0 +min_wall_line_width=0.34 +top_bottom=0 +support_roof_density=100 +top_layers=7 +support_tree_angle=60 +initial_layer_line_width_factor=100.0 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +jerk_wall_0=20 +retraction_hop=2 +raft_base_speed=15 +support_angle=60 +platform_adhesion=0 +support_bottom_stair_step_width=5.0 +infill_multiplier=1 +raft_interface_fan_speed=50.0 +wall_transition_filter_distance=100 +bridge_wall_coast=0 +jerk_support_interface=20 +support_roof_wall_count=1 +infill_sparse_density=20 +speed_ironing=23.333333333333332 +command_line_settings=0 +infill_wipe_dist=0 +skin_overlap=15 +speed_infill=70 +machine_nozzle_offset_x=0 +support_offset=0.0 +material_flow=100 +speed=0 +cool_fan_speed_min=100 +wipe_move_distance=20 +optimize_wall_printing_order=True +line_width=0.4 +switch_extruder_prime_speed=20 +min_bead_width=0.34 +wall_overhang_speed_factor=100 +jerk_support_infill=20 +material_adhesion_tendency=0 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +wall_line_width=0.4 +material_print_temperature=200 +min_even_wall_line_width=0.34 +raft_interface_speed=25.0 +travel_avoid_distance=3 +z_seam_y=240 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +small_feature_speed_factor_0=50 +conical_overhang_enabled=False +speed_travel_layer_0=150 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +roofing_pattern=lines +support_interface_material_flow=95.0 +infill_overlap=0 +extruder_nr=0 +support_interface_height=0.3 +support_skip_some_zags=False +skin_no_small_gaps_heuristic=False +speed_support=23 +ironing_inset=0.38 +bridge_fan_speed_3=100 +bridge_enable_more_layers=False +speed_topbottom=35 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +gradual_support_infill_step_height=0.6 +magic_fuzzy_skin_enabled=False +roofing_line_width=0.4 +jerk_infill=20 +speed_print=70 +support_bottom_offset=0.0 +bridge_wall_speed=35 +support_initial_layer_line_distance=0 +experimental=0 +zig_zaggify_infill=True +retraction_retract_speed=45 +layer_start_y=228.0 +extruder_prime_pos_x=-3 +wall_0_inset=0 +brim_width=7 +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_wipe_dist=0.2 +brim_line_count=18 +support_roof_line_distance=0.4 +prime_tower_line_width=0.4 +skin_overlap_mm=0.06 +small_feature_max_length=0.0 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +support_wall_count=1 +skin_edge_support_thickness=0.6 +wall_line_width_x=0.4 +jerk_support=20 +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +machine_nozzle_cool_down_speed=0.75 +skin_line_width=0.4 +machine_extruder_start_pos_x=330 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +gradual_support_infill_steps=0 +infill_angles=[ ] +minimum_interface_area=1.0 +raft_interface_line_width=0.6000000000000001 +material_surface_energy=100 +support_fan_enable=False +retraction_extrusion_window=1 +machine_extruder_start_pos_y=237 +support_infill_angles=[ ] +small_skin_width=0.8 +shell=0 +wall_line_width_0=0.4 +support_tree_top_rate=10 +cross_infill_pocket_size=6.0 +material_end_of_filament_purge_speed=0.5 +raft_margin=15 +material_break_preparation_temperature=210 +wall_transition_filter_deviation=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +acceleration_support_roof=1000 +support_roof_offset=0.0 +raft_surface_line_width=0.4 +wipe_retraction_prime_speed=45 +wipe_pause=0 +machine_settings=0 +acceleration_topbottom=1000 +jerk_travel=20 +acceleration_wall_0=1500 +cool_fan_speed_max=100 +cool_fan_enabled=True +wall_overhang_angle=90 +acceleration_ironing=1000 +prime_tower_flow=100 +top_skin_expand_distance=0.8 +speed_print_layer_0=17.249999999999996 +wall_x_material_flow_layer_0=95.0 +speed_travel=150 +layer_0_z_overlap=0.125 +ironing_pattern=zigzag +skin_edge_support_layers=4 +ironing_line_spacing=0.1 +speed_roofing=35 +brim_outside_only=True +material_standby_temperature=100 +support_bottom_stair_step_height=0.3 +fill_outline_gaps=True +support_zag_skip_count=0 +machine_endstop_positive_direction_x=False +material_final_print_temperature=185 +support_interface_line_width=0.4 +support_tree_angle_slow=40.0 +support_skip_zag_per_mm=20 +support_bottom_angles=[ ] +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=23 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=2.85 +raft_jerk=20 +raft_base_acceleration=3500 +acceleration_print=3500 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +bridge_fan_speed=100 +support_tree_max_diameter=25 +support_material_flow=100 +material_no_load_move_factor=0.91 +raft_surface_line_spacing=0.4 +support_roof_height=0.3 +support_infill_sparse_thickness=0.15 +machine_extruder_cooling_fan_number=0 +minimum_roof_area=1.0 +material_print_temperature_layer_0=200 +raft_base_fan_speed=0 +machine_steps_per_mm_x=50 +support_tree_branch_reach_limit=30 +support_bottom_density=100 +skin_material_flow=95.0 +support_conical_min_width=5.0 +support_line_width=0.4 +bridge_skin_density=80 +raft_base_line_width=0.8 +jerk_roofing=20 +raft_speed=15 +mold_angle=40 +material_break_speed=25 +speed_wall_0=23 +cool_lift_head=False +retraction_enable=True +support_line_distance=0 +bridge_skin_material_flow=95.0 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +retract_at_layer_change=False +wall_transition_length=0.4 +wipe_hop_amount=2 +support_join_distance=2.0 +material_guid=506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 +inset_direction=outside_in +support_roof_pattern=zigzag +bridge_skin_speed=35 +skirt_brim_material_flow=100 +raft_surface_thickness=0.15 +cool_fan_speed=100 +coasting_min_volume=0.8 +conical_overhang_hole_size=0 +jerk_support_bottom=20 +cool_min_speed=5 +wall_x_material_flow=100 +min_skin_width_for_expansion=6.429395695523605e-17 +meshfix=0 +acceleration_skirt_brim=1000 +support_interface_offset=0.0 +mesh_position_x=0 +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +z_seam_corner=z_seam_corner_none +bottom_thickness=1 +support_interface_wall_count=1 +raft_interface_jerk=20 +roofing_monotonic=True +support_interface_angles=[ ] +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.25 +wall_distribution_count=1 +retraction_speed=45 +extruder_prime_pos_y=6 +material=0 +infill_before_walls=True +support_z_distance=0.3 +meshfix_union_all=True +raft_surface_jerk=20 +infill_support_angle=40 +support_pattern=zigzag +clean_between_layers=False +skin_preshrink=0.8 +support_roof_enable=False +alternate_extra_perimeter=False +minimum_support_area=0.0 +lightning_infill_overhang_angle=40 +support_tree_rest_preference=graceful +coasting_speed=90 +speed_prime_tower=35 +infill=0 +jerk_wall_x=20 +mold_enabled=False +jerk_travel_layer_0=20.0 +infill_material_flow=100 +ironing_monotonic=False +extruder_prime_pos_z=2 +support_tower_roof_angle=65 +meshfix_maximum_deviation=0.04 +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +cool_fan_full_at_height=0.2 +support_brim_enable=True +minimum_bottom_area=1.0 +infill_line_distance=6.0 +jerk_support_roof=20 +meshfix_maximum_travel_resolution=0.8 +support_bottom_height=0.3 +raft_acceleration=3500 +ironing_flow=10.0 +support_bottom_line_distance=0.4 +raft_base_thickness=0.3 +retraction_hop_after_extruder_switch=True +support_top_distance=0.3 +top_bottom_pattern_0=lines +skin_material_flow_layer_0=90.0 +lightning_infill_support_angle=40 +machine_extruder_end_pos_abs=True +retraction_hop_after_extruder_switch_height=2 +acceleration_support=2000 +support_conical_angle=30 +speed_layer_0=17.249999999999996 +infill_enable_travel_optimization=False +raft_surface_speed=35 +cooling=0 +min_feature_size=0.1 +travel=0 +support_connect_zigzags=True +bottom_layers=7 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +material_flush_purge_speed=0.5 +wipe_retraction_speed=45 +retraction_amount=6.5 +material_break_retracted_position=-50 +material_initial_print_temperature=190 +support_tower_maximum_supported_diameter=3.0 +jerk_ironing=20 +roofing_angles=[] +bridge_skin_density_3=100 +support_interface_enable=False +retraction_hop_only_when_collides=True +machine_feeder_wheel_diameter=10.0 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +roofing_material_flow=100 +support_interface_skip_height=0.15 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +bridge_sparse_infill_max_density=0 +skirt_brim_line_width=0.4 +cool_fan_full_layer=2 +gradual_infill_step_height=1.5 +machine_heat_zone_length=16 +support_interface_density=100 +support_infill_rate=0 +speed_support_interface=35 +cool_min_layer_time=6 +wipe_retraction_enable=True +support_tree_limit_branch_reach=True +wall_0_material_flow_layer_0=110.00000000000001 +cool_min_temperature=190 +jerk_layer_0=20 +switch_extruder_extra_prime_amount=0 +ironing_only_highest_layer=False +speed_support_bottom=35 +material_extrusion_cool_down_speed=0.7 +extruder_nr=0 +meshfix_fluid_motion_enabled=True +meshfix_fluid_motion_small_distance=0.01 +meshfix_fluid_motion_shift_distance=0.1 +meshfix_fluid_motion_angle=15 diff --git a/tests/voronoi_crash_resources/settings_011.txt b/tests/voronoi_crash_resources/settings_011.txt new file mode 100644 index 0000000000..7b90f1f8a8 --- /dev/null +++ b/tests/voronoi_crash_resources/settings_011.txt @@ -0,0 +1,1089 @@ +initial_extruder_nr=0 +date=31-05-2023 +print_temperature=210 +material_name=empty +cooling=0 +machine_extruders_share_nozzle=False +max_skin_angle_for_expansion=90 +acceleration_layer_0=3000 +support_interface_line_width=0.4 +jerk_infill=20 +mesh_position_y=0 +cool_fan_full_at_height=0.3 +roofing_extruder_nr=-1 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=3000 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +machine_shape=rectangular +speed_support_bottom=40.0 +support_roof_material_flow=100 +draft_shield_dist=10 +travel_avoid_other_parts=True +speed_ironing=20.0 +machine_show_variants=False +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=2 +support_extruder_nr=0 +support_bottom_height=1 +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.6666666666666665 +machine_depth=255 +adhesion_type=brim +bridge_skin_density_2=75 +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=1.0 +wall_0_wipe_dist=0.2 +machine_heated_build_volume=False +speed_travel_layer_0=60.0 +raft_surface_line_width=0.4 +bridge_skin_speed_2=15.0 +support_brim_width=1.2000000000000002 +top_bottom_thickness=0.8 +raft_jerk=20 +time=17:02:46 +machine_buildplate_type=glass +center_object=False +speed_print=60 +travel=0 +material_print_temperature_layer_0=210 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +raft_surface_fan_speed=0 +brim_replaces_support=True +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=255 +skin_line_width=0.4 +support_join_distance=2.0 +wipe_hop_amount=1 +support_interface_offset=0.0 +support_tree_limit_branch_reach=True +connect_skin_polygons=False +infill_pattern=grid +support_structure=normal +clean_between_layers=False +speed_prime_tower=60 +speed_wall_x=60.0 +support_bottom_stair_step_height=0.3 +draft_shield_enabled=False +support_roof_height=1 +raft_surface_line_spacing=0.4 +day=Wed +wipe_retraction_enable=True +ironing_line_spacing=0.1 +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +machine_max_jerk_e=5.0 +raft_margin=15 +machine_scale_fan_speed_zero_to_one=False +wall_x_material_flow=100 +cool_fan_speed=100.0 +infill=0 +retraction_speed=25 +brim_width=8.0 +travel_avoid_supports=False +acceleration_infill=3000 +acceleration_support_roof=3000 +minimum_polygon_circumference=1.0 +raft_base_thickness=0.36 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +acceleration_support_infill=3000 +brim_gap=0 +machine_max_acceleration_y=9000 +meshfix_maximum_deviation=0.025 +quality_changes_name=empty +machine_nozzle_size=0.4 +mesh_position_z=0 +infill_overlap_mm=0.04 +conical_overhang_angle=50 +brim_line_count=20 +support_roof_line_distance=0.4 +retraction_extra_prime_amount=0 +small_hole_max_size=0 +switch_extruder_extra_prime_amount=0 +ironing_pattern=zigzag +infill_enable_travel_optimization=False +default_material_bed_temperature=60 +retraction_hop_only_when_collides=False +support_xy_distance_overhang=0.2 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_overhang_angle=90 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +min_skin_width_for_expansion=4.898587196589413e-17 +raft_interface_line_width=0.8 +machine_height=265 +travel_retract_before_outer_wall=False +jerk_support_interface=20 +support_tower_diameter=3.0 +support_tree_tip_diameter=0.8 +material_print_temp_prepend=True +support_bottom_line_distance=0.4 +jerk_support_bottom=20 +material_print_temp_wait=True +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=3000 +meshfix=0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3000 +carve_multiple_volumes=False +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +support_bottom_distance=0.1 +material_crystallinity=False +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +mold_width=5 +adhesion_extruder_nr=-1 +support_top_distance=0.1 +retraction_hop_after_extruder_switch=True +wall_0_inset=0 +relative_extrusion=False +wipe_hop_speed=10 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +magic_fuzzy_skin_outside_only=False +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +raft_base_jerk=20 +support_roof_pattern=concentric +support_mesh=False +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=15.0 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +coasting_min_volume=0.8 +raft_surface_acceleration=3000 +experimental=0 +bridge_wall_min_length=2.1 +prime_tower_position_x=239.79999999999998 +hole_xy_offset_max_diameter=0 +wall_line_width=0.4 +raft_acceleration=3000 +interlocking_orientation=22.5 +jerk_support=20 +wall_line_width_x=0.4 +min_infill_area=0 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=3000 +retraction_extrusion_window=6.5 +support_fan_enable=False +wall_extruder_nr=-1 +raft_base_acceleration=3000 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +speed_wall=30.0 +support_xy_distance=0.7 +infill_wipe_dist=0.1 +extruders_enabled_count=1 +support_conical_min_width=5.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +prime_tower_position_y=222.79999999999998 +mesh_position_x=0 +z_seam_position=back +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_shrinkage_percentage_z=100.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=3000 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_mesh_drop_down=True +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=100 +machine_max_feedrate_z=299792458000 +prime_tower_enable=False +top_bottom=0 +material_break_temperature=50 +wipe_retraction_amount=6.5 +raft_surface_speed=30.0 +speed_layer_0=30.0 +jerk_print=20 +top_bottom_extruder_nr=-1 +retraction_hop=1 +jerk_wall_0=20 +raft_interface_speed=22.5 +travel_avoid_distance=0.625 +support_meshes_present=False +machine_max_jerk_xy=20.0 +cutting_mesh=False +min_odd_wall_line_width=0.34 +machine_nozzle_expansion_angle=45 +support_bottom_enable=False +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=200 +speed_roofing=30.0 +brim_outside_only=True +material_standby_temperature=150 +support_enable=False +acceleration_print_layer_0=3000 +z_seam_relative=False +fill_outline_gaps=True +material_type=empty +support_zag_skip_count=8 +interlocking_boundary_avoidance=2 +material_print_temperature=210 +min_even_wall_line_width=0.34 +skin_overlap=5 +print_sequence=all_at_once +ooze_shield_dist=2 +prime_tower_wipe_enabled=True +bridge_skin_density=100 +raft_base_line_width=0.8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +brim_inside_margin=2.5 +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +bottom_skin_expand_distance=0.8 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +skirt_brim_extruder_nr=-1 +machine_nozzle_id=unknown +speed_equalize_flow_width_factor=100.0 +acceleration_travel_layer_0=5000.0 +wipe_brush_pos_x=100 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +raft_surface_extruder_nr=0 +retraction_hop_enabled=False +switch_extruder_retraction_speed=20 +acceleration_roofing=3000 +travel_speed=120 +speed=0 +acceleration_travel_enabled=True +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +support_z_distance=0.1 +meshfix_union_all=True +z_seam_corner=z_seam_corner_inner +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +support_roof_offset=0.0 +support_interface_density=100 +coasting_enable=False +acceleration_support=3000 +jerk_layer_0=20 +cool_min_temperature=210 +support_bottom_extruder_nr=0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +adaptive_layer_height_variation=0.1 +raft_interface_layers=1 +default_material_print_temperature=210 +speed_slowdown_layers=2 +cool_min_layer_time_fan_speed_max=10 +machine_endstop_positive_direction_y=False +minimum_bottom_area=1.0 +infill_line_distance=4.0 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +material_bed_temperature=60 +support_tree_rest_preference=graceful +coasting_speed=90 +support_infill_extruder_nr=0 +bridge_skin_speed_3=15.0 +magic_fuzzy_skin_point_dist=0.8 +infill_extruder_nr=-1 +support_roof_wall_count=0 +infill_sparse_density=20 +machine_disallowed_areas=[] +skirt_brim_minimal_length=250 +raft_surface_layers=2 +material_break_speed=25 +machine_extruders_share_heater=False +speed_wall_0=30.0 +cool_lift_head=False +layer_start_y=0.0 +build_volume_temperature=28 +extruder_prime_pos_x=0 +retraction_retract_speed=25 +zig_zaggify_infill=False +xy_offset=0 +machine_acceleration=4000 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=20 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=30.0 +mold_angle=40 +raft_speed=30.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.02 +anti_overhang_mesh=False +quality_name=Draft +wall_0_material_flow_layer_0=100 +speed_support_interface=40.0 +machine_max_acceleration_x=9000 +bridge_skin_material_flow_2=100 +top_skin_preshrink=0.8 +skirt_height=3 +raft_airgap=0.3 +wall_distribution_count=1 +retraction_amount=6.5 +wipe_retraction_speed=25 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +speed_topbottom=30.0 +raft_smoothing=5 +lightning_infill_straightening_angle=40 +bridge_enable_more_layers=True +retraction_combing=all +wall_material_flow=100 +material_flow_layer_0=100 +flow_rate_max_extrusion_offset=0 +material_diameter=2.85 +meshfix_union_all_remove_holes=False +skin_edge_support_thickness=0 +machine_max_acceleration_z=100 +support_wall_count=0 +extruder_prime_pos_y=0 +meshfix_maximum_extrusion_area_deviation=50000 +wall_0_material_flow=100 +blackmagic=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=40.0 +support_tree_angle_slow=33.333333333333336 +jerk_wall=20 +interlocking_beam_layer_count=2 +support_interface_material_flow=100 +infill_overlap=10 +print_bed_temperature=60 +lightning_infill_support_angle=40 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +speed_support_infill=60 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +bridge_skin_material_flow=60 +nozzle_disallowed_areas=[] +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +material_shrinkage_percentage_xy=100.0 +cool_min_speed=10 +top_layers=4 +bridge_fan_speed_3=0 +ironing_inset=0.38 +cool_fan_speed_min=100.0 +wipe_move_distance=20 +interlocking_enable=False +wall_line_width_0=0.4 +cross_infill_pocket_size=4.0 +support_tree_top_rate=10 +raft_base_fan_speed=0 +bridge_settings_enabled=False +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=3 +retraction_hop_after_extruder_switch_height=1 +acceleration_prime_tower=3000 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +skin_material_flow=100 +support_bottom_density=100 +bridge_wall_speed=15.0 +support_bottom_offset=0.0 +bridge_fan_speed_2=0 +support_interface_pattern=concentric +initial_bottom_layers=4 +bridge_skin_material_flow_3=110 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +mold_roof_height=0.5 +jerk_ironing=20 +support_bottom_stair_step_min_slope=10.0 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=25 +multiple_mesh_overlap=0.15 +machine_center_is_zero=False +top_thickness=0.8 +acceleration_enabled=False +support_roof_extruder_nr=0 +bridge_wall_material_flow=50 +draft_shield_height=10 +machine_always_write_active_tool=False +z_seam_x=125.0 +retraction_combing_max_distance=0 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +raft_interface_thickness=0.30000000000000004 +support_conical_angle=30 +material_adhesion_tendency=10 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +roofing_line_width=0.4 +layer_height_0=0.3 +support_initial_layer_line_distance=2.6666666666666665 +support_bottom_line_width=0.4 +wipe_hop_enable=False +zig_zaggify_support=False +material_bed_temp_wait=True +skin_edge_support_layers=0 +support_type=everywhere +jerk_travel_layer_0=30.0 +mold_enabled=False +prime_tower_line_width=0.4 +machine_max_feedrate_e=299792458000 +skirt_line_count=1 +material_id=empty_material +retraction_count_max=90 +infill_support_angle=40 +material_no_load_move_factor=0.940860215 +roofing_pattern=lines +jerk_prime_tower=20 +skin_outline_count=1 +support_interface_priority=interface_area_overwrite_support_area +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +interlocking_depth=2 +min_feature_size=0.1 +command_line_settings=0 +speed_infill=60 +gradual_support_infill_step_height=1 +retraction_prime_speed=25 +z_seam_type=sharpest_corner +skirt_brim_speed=30.0 +material_maximum_park_duration=300 +switch_extruder_retraction_amount=16 +machine_nozzle_temp_enabled=True +raft_base_speed=22.5 +support_angle=50 +machine_max_feedrate_x=299792458000 +machine_width=250 +machine_use_extruder_offset_to_offset_coords=True +machine_heated_bed=True +support_bottom_pattern=concentric +acceleration_print=3000 +material_flush_purge_speed=0.5 +minimum_interface_area=1.0 +raft_interface_fan_speed=0 +remove_empty_first_layers=True +jerk_topbottom=20 +bridge_wall_coast=100 +acceleration_wall_0=3000 +shell=0 +small_skin_width=0.8 +machine_nozzle_head_distance=3 +support_interface_enable=False +bridge_skin_density_3=80 +raft_base_wall_count=1 +infill_sparse_thickness=0.2 +speed_travel=120 +support=0 +infill_mesh_order=0 +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +machine_max_acceleration_e=10000 +roofing_layer_count=0 +skin_preshrink=0.8 +material_extrusion_cool_down_speed=0.7 +alternate_extra_perimeter=False +support_roof_enable=False +top_bottom_pattern_0=lines +skin_material_flow_layer_0=100 +infill_offset_x=0 +gantry_height=0 +material_surface_energy=100 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +min_wall_line_width=0.34 +machine_steps_per_mm_x=50 +wall_0_extruder_nr=-1 +machine_settings=0 +acceleration_topbottom=3000 +wipe_retraction_prime_speed=25 +wipe_pause=0 +material_end_of_filament_purge_speed=0.5 +material_alternate_walls=False +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=3000 +speed_support=60 +retraction_min_travel=0.8 +ooze_shield_enabled=False +support_line_width=0.4 +jerk_roofing=20 +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +smooth_spiralized_contours=True +minimum_support_area=0.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +slicing_tolerance=middle +infill_material_flow=100 +support_tree_angle=50 +machine_max_jerk_z=0.4 +cool_min_layer_time=5 +speed_z_hop=10 +xy_offset_layer_0=0 +jerk_support_roof=20 +machine_extruder_count=1 +material_final_print_temperature=195 +jerk_travel=30 +ironing_flow=10.0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +adaptive_layer_height_threshold=0.2 +support_interface_height=1 +support_brim_enable=True +support_interface_skip_height=0.2 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +acceleration_travel=5000 +support_bottom_material_flow=100 +raft_base_extruder_nr=0 +ironing_enabled=False +acceleration_wall=3000 +prime_tower_size=20 +inset_direction=inside_out +small_feature_speed_factor_0=50 +platform_adhesion=0 +support_bottom_wall_count=0 +jerk_wall_x=20 +draft_shield_height_limitation=full +bridge_sparse_infill_max_density=0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +cooling=0 +infill_support_angle=40 +max_skin_angle_for_expansion=90 +acceleration_layer_0=3000 +support_interface_line_width=0.4 +jerk_infill=20 +mesh_position_y=0 +cool_fan_full_at_height=0.3 +layer_0_z_overlap=0.15 +support_pattern=zigzag +top_skin_expand_distance=0.8 +raft_interface_acceleration=3000 +expand_skins_expand_distance=0.8 +support_skip_zag_per_mm=20 +speed_support_bottom=40.0 +support_roof_material_flow=100 +travel_avoid_other_parts=True +speed_ironing=20.0 +mold_width=5 +prime_tower_min_volume=6 +ironing_monotonic=False +conical_overhang_enabled=False +wall_transition_filter_distance=100 +cool_fan_full_layer=2 +support_bottom_height=1 +machine_extruder_start_pos_abs=False +support_bottom_stair_step_width=5.0 +raft_surface_thickness=0.2 +retraction_enable=True +support_line_distance=2.6666666666666665 +bridge_skin_density_2=75 +support_connect_zigzags=True +skin_no_small_gaps_heuristic=False +wall_line_count=2 +minimum_roof_area=1.0 +wall_0_wipe_dist=0.2 +support_infill_sparse_thickness=0.2 +skin_overlap=5 +speed_travel_layer_0=60.0 +raft_surface_line_width=0.4 +machine_endstop_positive_direction_x=False +bridge_skin_speed_2=15.0 +support_brim_width=1.2000000000000002 +top_bottom_thickness=0.8 +raft_jerk=20 +center_object=False +speed_print=60 +travel=0 +material_print_temperature_layer_0=200 +support_tree_min_height_to_model=3 +bottom_layers=4 +support_use_towers=True +machine_nozzle_offset_x=0 +raft_surface_fan_speed=0 +brim_replaces_support=True +line_width=0.4 +machine_nozzle_cool_down_speed=2.0 +z_seam_y=255 +support_xy_distance=0.7 +speed_wall=30.0 +skin_edge_support_layers=0 +speed_topbottom=30.0 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +max_extrusion_before_wipe=10 +raft_base_line_spacing=1.6 +speed_support_infill=60 +min_odd_wall_line_width=0.34 +support_tree_limit_branch_reach=True +mesh_position_z=0 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +connect_skin_polygons=False +infill_pattern=grid +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +support_wall_count=0 +skin_edge_support_thickness=0 +support_roof_height=1 +ironing_line_spacing=0.1 +machine_extruder_end_pos_x=0 +retraction_speed=25 +travel_avoid_supports=False +acceleration_infill=3000 +skin_outline_count=1 +jerk_prime_tower=20 +machine_nozzle_id=unknown +acceleration_travel_layer_0=5000.0 +wipe_brush_pos_x=100 +speed_equalize_flow_width_factor=100.0 +magic_fuzzy_skin_enabled=False +experimental=0 +acceleration_support_infill=3000 +brim_gap=0 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +machine_nozzle_size=0.4 +retraction_extra_prime_amount=0 +wipe_move_distance=20 +cool_fan_speed_min=100 +switch_extruder_extra_prime_amount=0 +bridge_fan_speed_2=0 +bridge_skin_material_flow_3=110 +initial_bottom_layers=4 +support_interface_pattern=concentric +support_xy_distance_overhang=0.2 +retract_at_layer_change=False +wall_transition_length=0.4 +wall_x_material_flow=100 +min_skin_width_for_expansion=4.898587196589413e-17 +cross_infill_pocket_size=4.0 +support_tree_top_rate=10 +wall_line_width_0=0.4 +acceleration_travel=5000 +support_bottom_material_flow=100 +acceleration_wall=3000 +ironing_enabled=False +wipe_pause=0 +wipe_retraction_prime_speed=25 +machine_steps_per_mm_z=50 +gradual_infill_steps=0 +machine_steps_per_mm_x=50 +material_break_preparation_retracted_position=-16 +acceleration_skirt_brim=3000 +meshfix=0 +material_flow=100 +support_offset=0.8 +lightning_infill_prune_angle=40 +lightning_infill_overhang_angle=40 +material_crystallinity=False +support_bottom_distance=0.1 +machine_steps_per_mm_e=1600 +wall_thickness=0.8 +wipe_retraction_amount=6.5 +material_break_temperature=50 +support_top_distance=0.1 +retraction_hop_after_extruder_switch=True +wipe_hop_speed=10 +infill_line_width=0.4 +support_tree_bp_diameter=7.5 +magic_fuzzy_skin_outside_only=False +brim_line_count=20 +support_roof_line_distance=0.4 +prime_tower_line_width=0.4 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.4 +skin_line_width=0.4 +speed_wall_x=60.0 +raft_base_jerk=20 +gradual_support_infill_steps=0 +skirt_brim_material_flow=100 +bridge_skin_speed=15.0 +wipe_retraction_extra_prime_amount=0 +bridge_skin_support_threshold=50 +cool_fan_speed=100 +coasting_min_volume=0.8 +raft_surface_acceleration=3000 +hole_xy_offset_max_diameter=0 +support_conical_min_width=5.0 +wall_line_width=0.4 +raft_acceleration=3000 +raft_base_thickness=0.36 +jerk_support=20 +wall_line_width_x=0.4 +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +jerk_wall_0=20 +retraction_hop=1 +support_tree_tip_diameter=0.8 +skin_monotonic=False +meshfix_keep_open_polygons=False +prime_blob_enable=False +acceleration_support_interface=3000 +machine_extruder_start_pos_y=0 +retraction_extrusion_window=6.5 +support_fan_enable=False +raft_base_acceleration=3000 +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +infill_wipe_dist=0.1 +retraction_hop_only_when_collides=False +machine_feeder_wheel_diameter=10.0 +connect_infill_polygons=False +mesh_position_x=0 +z_seam_position=back +small_feature_speed_factor=50 +retraction_combing_max_distance=0 +z_seam_x=125.0 +infill_line_distance=4.0 +minimum_bottom_area=1.0 +resolution=0 +infill_randomize_start_location=False +acceleration_ironing=3000 +prime_tower_flow=100 +bottom_skin_preshrink=0.8 +sub_div_rad_add=0.4 +switch_extruder_retraction_speeds=20 +infill_multiplier=1 +wall_transition_angle=10 +support_roof_density=100 +top_bottom=0 +infill_enable_travel_optimization=False +raft_surface_speed=30.0 +speed_layer_0=30.0 +jerk_print=20 +retraction_prime_speed=25 +z_seam_type=sharpest_corner +support_bottom_enable=False +dual=0 +material_break_retracted_position=-50 +material_initial_print_temperature=190 +support_bottom_stair_step_height=0.3 +speed_roofing=30.0 +brim_outside_only=True +material_standby_temperature=175 +xy_offset_layer_0=0 +acceleration_print_layer_0=3000 +z_seam_relative=False +fill_outline_gaps=True +support_zag_skip_count=8 +raft_interface_speed=22.5 +travel_avoid_distance=0.625 +material_print_temperature=200 +min_even_wall_line_width=0.34 +prime_tower_wipe_enabled=True +support_bottom_wall_count=0 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +jerk_topbottom=20 +top_skin_preshrink=0.8 +retraction_hop_enabled=False +acceleration_roofing=3000 +switch_extruder_retraction_speed=20 +material_flush_purge_speed=0.5 +wall_distribution_count=1 +raft_airgap=0.3 +bridge_enable_more_layers=True +initial_layer_line_width_factor=100.0 +bridge_skin_material_flow=60 +z_seam_corner=z_seam_corner_inner +brim_smart_ordering=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +ironing_pattern=zigzag +speed_travel=120 +support_angle=50 +raft_base_speed=22.5 +jerk_support_interface=20 +skirt_brim_minimal_length=250 +raft_surface_layers=2 +support_roof_wall_count=0 +infill_sparse_density=20 +skirt_brim_line_width=0.4 +top_bottom_pattern=lines +machine_extruder_end_pos_y=0 +slicing_tolerance=middle +jerk_skirt_brim=20 +machine_heat_zone_length=16 +speed=0 +acceleration_support_roof=3000 +support_roof_offset=0.0 +support_interface_density=100 +coasting_enable=False +retraction_retract_speed=25 +zig_zaggify_infill=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +raft_interface_layers=1 +cool_min_layer_time_fan_speed_max=10 +support_skip_some_zags=False +roofing_material_flow=100 +meshfix_maximum_deviation=0.025 +cool_fan_enabled=True +wall_overhang_angle=90 +cool_fan_speed_max=100 +speed_prime_tower=60 +infill=0 +support_tree_rest_preference=graceful +coasting_speed=90 +bridge_skin_speed_3=15.0 +magic_fuzzy_skin_point_dist=0.8 +material_break_speed=25 +speed_wall_0=30.0 +cool_lift_head=False +xy_offset=0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=20 +wall_x_material_flow_layer_0=100 +speed_print_layer_0=30.0 +acceleration_support=3000 +retraction_hop_after_extruder_switch_height=1 +machine_extruder_end_pos_abs=False +jerk_layer_0=20 +cool_min_temperature=200 +mold_angle=40 +raft_speed=30.0 +roofing_monotonic=True +bottom_thickness=0.8 +small_feature_max_length=0.0 +skin_overlap_mm=0.02 +support_material_flow=100 +support_tree_max_diameter=25 +bridge_fan_speed=100 +wall_0_material_flow_layer_0=100 +speed_support_interface=40.0 +bridge_skin_material_flow_2=100 +bottom_skin_expand_distance=0.8 +skirt_height=3 +machine_extruder_start_pos_x=0 +support_tower_diameter=3.0 +retraction_amount=6.5 +wipe_retraction_speed=25 +skirt_brim_speed=30.0 +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +wall_material_flow=100 +material_flow_layer_0=100 +material_diameter=1.75 +meshfix_union_all_remove_holes=False +extruder_prime_pos_y=0 +blackmagic=0 +support_brim_line_count=3 +infill_support_enabled=False +cool_fan_speed_0=0 +speed_support_roof=40.0 +support_tree_angle_slow=33.333333333333336 +jerk_wall=20 +extruder_nr=0 +support_interface_material_flow=100 +infill_overlap=10 +lightning_infill_support_angle=40 +support_bottom_line_distance=0.4 +raft_interface_jerk=20 +support_interface_wall_count=0 +support_roof_enable=False +alternate_extra_perimeter=False +bridge_wall_speed=15.0 +support_bottom_offset=0.0 +gradual_support_infill_step_height=1 +wipe_repeat_count=5 +meshfix_maximum_resolution=0.5 +magic_mesh_surface_mode=normal +raft_fan_speed=0 +bridge_skin_density=100 +raft_base_line_width=0.8 +machine_nozzle_offset_y=0 +cool_min_speed=10 +top_layers=4 +brim_inside_margin=2.5 +bridge_fan_speed_3=0 +ironing_inset=0.38 +inset_direction=inside_out +support_roof_pattern=concentric +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +extruder_prime_pos_abs=False +support_tower_maximum_supported_diameter=3.0 +support_tree_angle=50 +support_interface_skip_height=0.2 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +infill_before_walls=True +material=0 +brim_width=8.0 +wall_0_inset=0 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +acceleration_print=3000 +support_bottom_pattern=concentric +machine_endstop_positive_direction_z=True +coasting_volume=0.064 +layer_start_x=0.0 +machine_min_cool_heat_time_window=50.0 +ironing_only_highest_layer=False +acceleration_topbottom=3000 +machine_settings=0 +skirt_line_count=1 +retraction_count_max=90 +jerk_travel_layer_0=30.0 +mold_enabled=False +support_brim_enable=True +support_interface_height=1 +meshfix_maximum_travel_resolution=0.8 +mold_roof_height=0.5 +jerk_ironing=20 +speed_z_hop=10 +wipe_hop_enable=False +zig_zaggify_support=False +raft_base_fan_speed=0 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +skirt_gap=3 +acceleration_prime_tower=3000 +jerk_support_roof=20 +machine_endstop_positive_direction_y=False +acceleration_wall_0=3000 +shell=0 +small_skin_width=0.8 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +small_feature_speed_factor_0=50 +material_break_preparation_speed=2 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=3000 +material_alternate_walls=False +platform_adhesion=0 +raft_interface_thickness=0.30000000000000004 +skin_material_flow_layer_0=100 +top_bottom_pattern_0=lines +support_conical_angle=30 +speed_infill=60 +retraction_min_travel=0.8 +support_line_width=0.4 +jerk_roofing=20 +roofing_line_width=0.4 +support_initial_layer_line_distance=2.6666666666666665 +meshfix_union_all=True +support_z_distance=0.1 +support_bottom_line_width=0.4 +acceleration_wall_x=3000 +skin_material_flow=100 +support_bottom_density=100 +small_hole_max_size=0 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +default_material_print_temperature=200 +roofing_layer_count=0 +clean_between_layers=False +skin_preshrink=0.8 +raft_interface_line_width=0.8 +infill_offset_x=0 +material_surface_energy=100 +support_tree_branch_reach_limit=30 +gradual_infill_step_height=1.5 +minimum_support_area=0.0 +minimum_interface_area=1.0 +machine_nozzle_head_distance=3 +support_interface_offset=0.0 +jerk_travel=30 +bridge_wall_material_flow=50 +support_interface_enable=False +bridge_skin_density_3=80 +min_feature_size=0.1 +infill_sparse_thickness=0.2 +command_line_settings=0 +raft_margin=15 +material_end_of_filament_purge_speed=0.5 +speed_support=60 +machine_extruder_cooling_fan_number=0 +roofing_pattern=lines +material_extrusion_cool_down_speed=0.7 +raft_surface_jerk=20 +bridge_sparse_infill_max_density=0 +min_wall_line_width=0.34 +support=0 +jerk_wall_x=20 +min_bead_width=0.34 +switch_extruder_prime_speed=20 +support_join_distance=2.0 +wipe_hop_amount=1 +wipe_retraction_enable=True +cool_min_layer_time=5 +top_thickness=0.8 +jerk_support_bottom=20 +conical_overhang_hole_size=0 +material_final_print_temperature=185 +infill_material_flow=100 +ironing_flow=10.0 +support_bottom_stair_step_min_slope=10.0 +optimize_wall_printing_order=False +extruder_nr=0 +meshfix_fluid_motion_enabled=False \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_001.wkt b/tests/voronoi_crash_resources/slice_polygon_001.wkt new file mode 100644 index 0000000000..bb3157ce63 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_001.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((1571 -49975, 2466 -52292, 3140 -49901, 4107 -52189, 4705 -49778, 5745 -52034, 6267 -49606, 7376 -51828, 7822 -49384, 9001 -51570, 9369 -49114, 10616 -51262, 10907 -48796, 12221 -50904, 12434 -48429, 13814 -50495, 13950 -48015, 15393 -50036, 15451 -47553, 16957 -49528, 16937 -47044, 18504 -48971, 18406 -46489, 20034 -48365, 19858 -45888, 21543 -47712, 21289 -45241, 23031 -47012, 22700 -44550, 24496 -46265, 24088 -43815, 25937 -45473, 25452 -43037, 27353 -44636, 26791 -42216, 28741 -43755, 28104 -41354, 30102 -42830, 29389 -40451, 31432 -41863, 30645 -39508, 32731 -40855, 31871 -38526, 33999 -39807, 33066 -37506, 35232 -38720, 34227 -36449, 36431 -37594, 35355 -35355, 37594 -36431, 36449 -34227, 38720 -35232, 37506 -33066, 39807 -33999, 38526 -31871, 40856 -32731, 39508 -30645, 41863 -31432, 40451 -29389, 42830 -30101, 41354 -28104, 43755 -28741, 42216 -26791, 44636 -27353, 43037 -25452, 45473 -25937, 43815 -24088, 46265 -24496, 44550 -22699, 47012 -23031, 45242 -21289, 47712 -21543, 45888 -19857, 48365 -20034, 46489 -18406, 48971 -18504, 47044 -16937, 49528 -16957, 47553 -15451, 50036 -15393, 48015 -13950, 50495 -13814, 48429 -12434, 50904 -12221, 48796 -10907, 51262 -10616, 49114 -9369, 51570 -9000, 49384 -7822, 51828 -7376, 49606 -6267, 52034 -5745, 49778 -4705, 52189 -4107, 49901 -3139, 52292 -2466, 49975 -1571, 52344 -822, 50000 0, 52344 822, 49975 1571, 52292 2466, 49901 3140, 52189 4107, 49778 4705, 52034 5745, 49606 6267, 51828 7376, 49384 7822, 51570 9001, 49114 9369, 51262 10616, 48796 10907, 50904 12221, 48429 12434, 50495 13814, 48015 13950, 50036 15393, 47553 15451, 49528 16957, 47044 16937, 48971 18504, 46489 18406, 48365 20034, 45888 19858, 47712 21543, 45241 21289, 47012 23031, 44550 22700, 46265 24496, 43815 24088, 45473 25937, 43037 25452, 44636 27353, 42216 26791, 43755 28741, 41354 28104, 42830 30102, 40451 29389, 41863 31432, 39508 30645, 40855 32731, 38526 31871, 39807 33999, 37506 33066, 38720 35232, 36449 34227, 37594 36431, 35355 35355, 36431 37594, 34227 36449, 35232 38720, 33066 37506, 33999 39807, 31871 38526, 32731 40856, 30645 39508, 31432 41863, 29389 40451, 30101 42830, 28104 41354, 28741 43755, 26791 42216, 27353 44636, 25452 43037, 25937 45473, 24088 43815, 24496 46265, 22699 44550, 23031 47012, 21289 45242, 21543 47712, 19857 45888, 20034 48365, 18406 46489, 18504 48971, 16937 47044, 16957 49528, 15451 47553, 15393 50036, 13950 48015, 13814 50495, 12434 48429, 12221 50904, 10907 48796, 10616 51262, 9369 49114, 9000 51570, 7822 49384, 7376 51828, 6267 49606, 5745 52034, 4705 49778, 4107 52189, 3139 49901, 2466 52292, 1571 49975, 822 52344, 0 50000, -822 52344, -1571 49975, -2466 52292, -3140 49901, -4107 52189, -4705 49778, -5745 52034, -6267 49606, -7376 51828, -7822 49384, -9001 51570, -9369 49114, -10616 51262, -10907 48796, -12221 50904, -12434 48429, -13814 50495, -13950 48015, -15393 50036, -15451 47553, -16957 49528, -16937 47044, -18504 48971, -18406 46489, -20034 48365, -19858 45888, -21543 47712, -21289 45241, -23031 47012, -22700 44550, -24496 46265, -24088 43815, -25937 45473, -25452 43037, -27353 44636, -26791 42216, -28741 43755, -28104 41354, -30102 42830, -29389 40451, -31432 41863, -30645 39508, -32731 40855, -31871 38526, -33999 39807, -33066 37506, -35232 38720, -34227 36449, -36431 37594, -35355 35355, -37594 36431, -36449 34227, -38720 35232, -37506 33066, -39807 33999, -38526 31871, -40856 32731, -39508 30645, -41863 31432, -40451 29389, -42830 30101, -41354 28104, -43755 28741, -42216 26791, -44636 27353, -43037 25452, -45473 25937, -43815 24088, -46265 24496, -44550 22699, -47012 23031, -45242 21289, -47712 21543, -45888 19857, -48365 20034, -46489 18406, -48971 18504, -47044 16937, -49528 16957, -47553 15451, -50036 15393, -48015 13950, -50495 13814, -48429 12434, -50904 12221, -48796 10907, -51262 10616, -49114 9369, -51570 9000, -49384 7822, -51828 7376, -49606 6267, -52034 5745, -49778 4705, -52189 4107, -49901 3139, -52292 2466, -49975 1571, -52344 822, -50000 0, -52344 -822, -49975 -1571, -52292 -2466, -49901 -3140, -52189 -4107, -49778 -4705, -52034 -5745, -49606 -6267, -51828 -7376, -49384 -7822, -51570 -9001, -49114 -9369, -51262 -10616, -48796 -10907, -50904 -12221, -48429 -12434, -50495 -13814, -48015 -13950, -50036 -15393, -47553 -15451, -49528 -16957, -47044 -16937, -48971 -18504, -46489 -18406, -48365 -20034, -45888 -19858, -47712 -21543, -45241 -21289, -47012 -23031, -44550 -22700, -46265 -24496, -43815 -24088, -45473 -25937, -43037 -25452, -44636 -27353, -42216 -26791, -43755 -28741, -41354 -28104, -42830 -30102, -40451 -29389, -41863 -31432, -39508 -30645, -40855 -32731, -38526 -31871, -39807 -33999, -37506 -33066, -38720 -35232, -36449 -34227, -37594 -36431, -35355 -35355, -36431 -37594, -34227 -36449, -35232 -38720, -33066 -37506, -33999 -39807, -31871 -38526, -32731 -40856, -30645 -39508, -31432 -41863, -29389 -40451, -30101 -42830, -28104 -41354, -28741 -43755, -26791 -42216, -27353 -44636, -25452 -43037, -25937 -45473, -24088 -43815, -24496 -46265, -22699 -44550, -23031 -47012, -21289 -45242, -21543 -47712, -19857 -45888, -20034 -48365, -18406 -46489, -18504 -48971, -16937 -47044, -16957 -49528, -15451 -47553, -15393 -50036, -13950 -48015, -13814 -50495, -12434 -48429, -12221 -50904, -10907 -48796, -10616 -51262, -9369 -49114, -9000 -51570, -7822 -49384, -7376 -51828, -6267 -49606, -5745 -52034, -4705 -49778, -4107 -52189, -3139 -49901, -2466 -52292, -1571 -49975, -822 -52344, 0 -50000, 822 -52344) (-449 -28579, -942 -29985, -1346 -28551, -1884 -29941, -2243 -28494, -2823 -29867, -3136 -28410, -3760 -29763, -4027 -28297, -4693 -29631, -4914 -28157, -5621 -29469, -5796 -27989, -6544 -29277, -6672 -27793, -7461 -29057, -7542 -27569, -8370 -28809, -8404 -27319, -9270 -28532, -9258 -27042, -10162 -28226, -10103 -26737, -11044 -27893, -10938 -26407, -11914 -27533, -11762 -26050, -12773 -27145, -12575 -25668, -13620 -26730, -13375 -25260, -14453 -26289, -14161 -24828, -15271 -25822, -14934 -24371, -16075 -25330, -15693 -23889, -16862 -24812, -16435 -23385, -17633 -24271, -17162 -22857, -18387 -23705, -17871 -22307, -19123 -23115, -18563 -21734, -19839 -22503, -19236 -21141, -20536 -21869, -19891 -20526, -21213 -21213, -20526 -19891, -21869 -20536, -21141 -19236, -22503 -19839, -21734 -18563, -23115 -19123, -22307 -17871, -23705 -18387, -22857 -17162, -24270 -17633, -23385 -16435, -24812 -16862, -23889 -15693, -25330 -16075, -24371 -14934, -25822 -15271, -24828 -14161, -26289 -14453, -25260 -13375, -26730 -13620, -25668 -12575, -27145 -12773, -26050 -11762, -27533 -11914, -26407 -10938, -27893 -11044, -26737 -10103, -28226 -10162, -27042 -9258, -28532 -9271, -27319 -8404, -28809 -8370, -27569 -7542, -29057 -7461, -27793 -6672, -29277 -6544, -27989 -5796, -29469 -5621, -28157 -4914, -29631 -4693, -28297 -4027, -29763 -3760, -28410 -3137, -29867 -2823, -28494 -2243, -29941 -1884, -28551 -1346, -29985 -942, -28579 -449, -30000 0, -28579 449, -29985 942, -28551 1346, -29941 1884, -28494 2243, -29867 2823, -28410 3136, -29763 3760, -28297 4027, -29631 4693, -28157 4914, -29469 5621, -27989 5796, -29277 6544, -27793 6672, -29057 7461, -27569 7542, -28809 8370, -27319 8404, -28532 9270, -27042 9258, -28226 10162, -26737 10103, -27893 11044, -26407 10938, -27533 11914, -26050 11762, -27145 12773, -25668 12575, -26730 13620, -25260 13375, -26289 14453, -24828 14161, -25822 15271, -24371 14934, -25330 16075, -23889 15693, -24812 16862, -23385 16435, -24271 17633, -22857 17162, -23705 18387, -22307 17871, -23115 19123, -21734 18563, -22503 19839, -21141 19236, -21869 20536, -20526 19891, -21213 21213, -19891 20526, -20536 21869, -19236 21141, -19839 22503, -18563 21734, -19123 23115, -17871 22307, -18387 23705, -17162 22857, -17633 24270, -16435 23385, -16862 24812, -15693 23889, -16075 25330, -14934 24371, -15271 25822, -14161 24828, -14453 26289, -13375 25260, -13620 26730, -12575 25668, -12773 27145, -11762 26050, -11914 27533, -10938 26407, -11044 27893, -10103 26737, -10162 28226, -9258 27042, -9271 28532, -8404 27319, -8370 28809, -7542 27569, -7461 29057, -6672 27793, -6544 29277, -5796 27989, -5621 29469, -4914 28157, -4693 29631, -4027 28297, -3760 29763, -3137 28410, -2823 29867, -2243 28494, -1884 29941, -1346 28551, -942 29985, -449 28579, 0 30000, 449 28579, 942 29985, 1346 28551, 1884 29941, 2243 28494, 2823 29867, 3136 28410, 3760 29763, 4027 28297, 4693 29631, 4914 28157, 5621 29469, 5796 27989, 6544 29277, 6672 27793, 7461 29057, 7542 27569, 8370 28809, 8404 27319, 9270 28532, 9258 27042, 10162 28226, 10103 26737, 11044 27893, 10938 26407, 11914 27533, 11762 26050, 12773 27145, 12575 25668, 13620 26730, 13375 25260, 14453 26289, 14161 24828, 15271 25822, 14934 24371, 16075 25330, 15693 23889, 16862 24812, 16435 23385, 17633 24271, 17162 22857, 18387 23705, 17871 22307, 19123 23115, 18563 21734, 19839 22503, 19236 21141, 20536 21869, 19891 20526, 21213 21213, 20526 19891, 21869 20536, 21141 19236, 22503 19839, 21734 18563, 23115 19123, 22307 17871, 23705 18387, 22857 17162, 24270 17633, 23385 16435, 24812 16862, 23889 15693, 25330 16075, 24371 14934, 25822 15271, 24828 14161, 26289 14453, 25260 13375, 26730 13620, 25668 12575, 27145 12773, 26050 11762, 27533 11914, 26407 10938, 27893 11044, 26737 10103, 28226 10162, 27042 9258, 28532 9271, 27319 8404, 28809 8370, 27569 7542, 29057 7461, 27793 6672, 29277 6544, 27989 5796, 29469 5621, 28157 4914, 29631 4693, 28297 4027, 29763 3760, 28410 3137, 29867 2823, 28494 2243, 29941 1884, 28551 1346, 29985 942, 28579 449, 30000 0, 28579 -449, 29985 -942, 28551 -1346, 29941 -1884, 28494 -2243, 29867 -2823, 28410 -3136, 29763 -3760, 28297 -4027, 29631 -4693, 28157 -4914, 29469 -5621, 27989 -5796, 29277 -6544, 27793 -6672, 29057 -7461, 27569 -7542, 28809 -8370, 27319 -8404, 28532 -9270, 27042 -9258, 28226 -10162, 26737 -10103, 27893 -11044, 26407 -10938, 27533 -11914, 26050 -11762, 27145 -12773, 25668 -12575, 26730 -13620, 25260 -13375, 26289 -14453, 24828 -14161, 25822 -15271, 24371 -14934, 25330 -16075, 23889 -15693, 24812 -16862, 23385 -16435, 24271 -17633, 22857 -17162, 23705 -18387, 22307 -17871, 23115 -19123, 21734 -18563, 22503 -19839, 21141 -19236, 21869 -20536, 20526 -19891, 21213 -21213, 19891 -20526, 20536 -21869, 19236 -21141, 19839 -22503, 18563 -21734, 19123 -23115, 17871 -22307, 18387 -23705, 17162 -22857, 17633 -24270, 16435 -23385, 16862 -24812, 15693 -23889, 16075 -25330, 14934 -24371, 15271 -25822, 14161 -24828, 14453 -26289, 13375 -25260, 13620 -26730, 12575 -25668, 12773 -27145, 11762 -26050, 11914 -27533, 10938 -26407, 11044 -27893, 10103 -26737, 10162 -28226, 9258 -27042, 9271 -28532, 8404 -27319, 8370 -28809, 7542 -27569, 7461 -29057, 6672 -27793, 6544 -29277, 5796 -27989, 5621 -29469, 4914 -28157, 4693 -29631, 4027 -28297, 3760 -29763, 3137 -28410, 2823 -29867, 2243 -28494, 1884 -29941, 1346 -28551, 942 -29985, 449 -28579, 0 -30000))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_002.wkt b/tests/voronoi_crash_resources/slice_polygon_002.wkt new file mode 100644 index 0000000000..da8cb78088 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_002.wkt @@ -0,0 +1 @@ +MultiPolygon (((147289 101492, 147242 101719, 147197 101776, 147218 102093, 147259 102076, 147389 102138, 147392 102471, 147648 102288, 147623 102181, 148137 102295, 148172 102346, 148465 102254, 148577 102197, 148901 102061, 149036 102086, 149302 102109, 149463 102125, 149272 102163, 148937 102366, 148938 102449, 149117 102596, 149219 102465, 149345 102594, 149476 102549, 149777 102548, 149863 102511, 150134 102496, 150233 102538, 150557 102570, 150547 102600, 150750 102934, 150801 102912, 151257 103199, 151451 103115, 151457 102826, 151757 102643, 152047 102912, 152261 103054, 152386 103243, 152530 103190, 152880 103207, 153247 103211, 154056 103406, 154393 103447, 154973 103599, 155060 103545, 155100 103604, 155982 103648, 156531 103905, 156918 103881, 157384 103888, 157677 103949, 157902 103873, 158295 103870, 158382 103777, 158054 103621, 158326 103620, 158609 103479, 158921 103328, 158926 103578, 159080 103506, 159208 103335, 159407 103114, 159605 103018, 160226 102526, 160459 102832, 160833 102936, 161042 102897, 161218 103011, 161202 103295, 161303 103361, 162081 103119, 162153 102960, 162231 103020, 162468 102787, 162676 102742, 162742 102646, 162776 102466, 162854 102390, 162962 102559, 163249 102661, 163345 102847, 163504 102878, 163575 102980, 163720 102792, 164156 102649, 164176 102627, 164599 102346, 165114 102152, 165205 102150, 165383 102040, 165411 101809, 165746 101644, 165778 101795, 165696 102013, 165720 102318, 165786 102277, 166045 102366, 166018 102482, 166117 102372, 166544 102347, 166785 102276, 167055 102137, 167095 102097, 167403 101908, 167813 101885, 167985 101878, 167815 101926, 167483 102191, 167483 102296, 167637 102372, 167713 102283, 167818 102353, 167973 102293, 168276 102247, 168355 102202, 168634 102137, 168729 102164, 169044 102134, 169038 102172, 169224 102475, 169279 102434, 169730 102645, 169936 102500, 169916 102187, 170186 101926, 170336 101993, 170532 102185, 170689 102264, 170892 102592, 170596 102599, 170492 102690, 170436 102843, 170712 103063, 170787 103124, 170795 103080, 171025 103006, 171096 103077, 171105 103274, 171006 103584, 171207 103683, 171275 103662, 171241 103706, 171403 103852, 171735 103762, 171903 103865, 171927 103976, 171705 104095, 171743 104184, 172213 104283, 172262 104237, 172156 103914, 172619 103682, 172830 103639, 172900 103529, 173094 103391, 173509 103035, 173525 103033, 173757 102815, 173949 102709, 174009 102739, 173927 103058, 173943 103287, 173660 103472, 173661 103525, 173920 103551, 174155 103396, 174209 103301, 174318 103340, 174376 103452, 174456 103374, 174621 103431, 174679 103247, 174853 103089, 175105 103011, 175263 102982, 175356 102906, 175714 102690, 175405 102553, 175611 102412, 176108 102435, 176166 102572, 176510 102732, 176632 102730, 176986 102606, 177088 102927, 177133 102959, 177479 102784, 177730 102912, 178167 103227, 178270 103212, 178415 103103, 178539 103533, 178699 103628, 178735 103533, 178909 103540, 179152 103666, 179293 103595, 179307 103474, 179240 103402, 179321 103154, 179015 102954, 179038 102804, 179405 102930, 179596 103044, 179720 103036, 179802 103097, 180130 102994, 180399 102953, 180492 102849, 180553 102866, 180918 103314, 181124 103658, 181476 103909, 181365 103996, 181444 104116, 181416 104349, 181196 104523, 181401 104621, 181087 104844, 181307 105052, 181639 105108, 181766 104929, 181781 104659, 181904 104457, 182004 104371, 181932 104386, 181860 104168, 181689 104083, 181716 104147, 181611 104066, 181633 104042, 181561 103645, 181772 103522, 182052 103455, 182231 103334, 182687 103358, 182805 103441, 182509 103884, 182265 104017, 182458 104020, 182604 104079, 182724 103953, 182909 103883, 183029 103627, 183041 103537, 182807 103418, 183104 103015, 183072 102882, 183095 102773, 183434 102398, 183774 102329, 184013 102268, 184150 102313, 183900 102554, 183714 102959, 184390 102785, 184555 102987, 184729 103061, 184795 103005, 184985 103022, 185172 102952, 185044 102843, 185017 102948, 184776 102837, 184878 102638, 184946 102590, 185175 102594, 185526 102578, 185595 102639, 185644 102816, 185402 102978, 185495 103165, 185364 103320, 185415 103356, 185993 103497, 186163 103449, 186612 103530, 186680 103465, 186766 103478, 186777 103584, 187095 103697, 187163 103665, 187066 103457, 186900 103293, 186898 102946, 187172 103041, 187449 103056, 187568 103029, 187841 103144, 187874 103185, 188271 103377, 188289 103270, 188431 103097, 188494 103281, 188577 103346, 188718 103324, 188798 103355, 188824 103659, 188957 104299, 188699 104528, 188627 104557, 188605 104774, 188682 104938, 188386 105092, 188546 105183, 188772 105026, 188991 104966, 188852 105161, 188506 105245, 188520 105468, 188639 105778, 188726 105719, 188976 105697, 188978 105558, 189162 105369, 189126 105211, 189352 105060, 189442 105105, 189423 105158, 189636 105486, 189980 105363, 190089 105603, 190257 105596, 190431 105473, 190635 105410, 190804 105487, 190925 105394, 191167 105346, 191407 105385, 191426 105475, 191362 105505, 191270 105644, 191419 105725, 191378 106026, 191441 106239, 191247 106397, 191280 106566, 191357 106635, 191712 106619, 191707 106824, 191589 107117, 191591 107166, 191438 107518, 191486 107489, 191842 107548, 191945 107386, 192289 107018, 192412 106980, 192617 107052, 192768 107194, 192617 107366, 192273 107654, 192528 107597, 192618 107650, 192457 108077, 192327 108078, 192227 108154, 192315 108527, 192460 108725, 192530 108695, 192654 108509, 192824 108653, 192991 108649, 193128 108723, 193342 109074, 193377 109066, 193385 108738, 193412 108477, 193256 108025, 193338 107868, 193523 107742, 193784 108149, 193791 108267, 193856 108785, 193928 109098, 193921 109623, 194041 109726, 194014 109968, 194192 109990, 194145 110534, 193970 110609, 193981 111037, 194090 111179, 194208 111406, 194186 111772, 194114 112237, 194141 112431, 193957 112520, 193762 112515, 193785 112803, 193721 112792, 193983 113062, 194376 113386, 194193 113681, 193803 114209, 193782 114331, 193977 114716, 194075 114877, 194258 115254, 194301 115516, 194336 115853, 194190 116248, 193808 116627, 193635 116898, 193616 117188, 193733 117256, 193797 117473, 193881 118035, 193889 118041, 194031 118525, 194060 118432, 194108 118157, 194185 118405, 194186 118880, 194156 119052, 194084 119101, 194031 119307, 194017 119558, 194088 120051, 193901 120195, 193881 120255, 193983 120694, 193859 121226, 193808 121271, 193746 121535, 193908 121772, 193921 121907, 194002 121948, 194003 122292, 193919 122553, 193960 122713, 193902 123111, 193803 123527, 193912 124308, 193955 124449, 193912 124495, 193696 124892, 193504 125134, 193367 125613, 193270 125520, 193126 125503, 193027 125235, 192970 125483, 192847 125120, 192753 125333, 192676 125797, 192772 125873, 193218 125870, 193261 125628, 193254 125811, 193502 125640, 193600 125861, 193876 125817, 193818 126110, 193718 126306, 193601 126318, 193680 126631, 193663 126855, 193715 126921, 193657 126955, 193649 127144, 193583 127153, 193513 127044, 193313 127280, 193067 127163, 193090 127406, 193269 127607, 193200 127699, 193042 127467, 192830 127658, 192849 127794, 192802 127831, 192756 127762, 192702 127763, 192870 128029, 192668 128408, 192444 128240, 192358 128149, 192245 128156, 192101 128238, 192095 128495, 192108 128781, 192122 128882, 192138 129206, 192122 129242, 192129 129802, 192277 130104, 191858 130546, 191556 130801, 191602 130860, 191494 131002, 191565 131169, 191466 131164, 191423 131224, 191143 131156, 191069 131173, 190979 131391, 191008 131524, 190728 131683, 190703 131723, 191109 131900, 190786 132216, 190699 132356, 190197 132439, 190033 132391, 189869 132499, 189476 132278, 189146 132444, 188863 132755, 188988 132913, 188790 133104, 188982 133184, 189187 133074, 189508 133076, 189871 133116, 190198 133123, 190478 133381, 190250 133530, 190102 133558, 189825 133438, 189535 133412, 189347 133587, 189184 133729, 189013 133705, 188688 133186, 188417 133400, 188466 133800, 188343 133827, 188191 134088, 188443 133966, 188634 134119, 188473 134253, 188554 134441, 188748 134657, 188561 134858, 188196 134878, 188048 134714, 187913 134768, 187564 134617, 187037 134670, 186970 134843, 186426 134944, 186325 135023, 185814 134980, 185359 135030, 184937 135137, 184614 135285, 184509 135270, 184229 135295, 184054 135332, 183574 135274, 183031 135044, 182917 135076, 182745 135040, 182557 135142, 182388 135164, 182322 135235, 182611 135504, 182447 135467, 182050 135620, 182111 135323, 182091 135263, 181968 135321, 181618 135392, 181390 135620, 181116 135809, 180936 135876, 180546 136059, 180255 135599, 180163 135526, 179859 135421, 179759 135446, 179567 135417, 179486 135360, 179526 134997, 179438 134867, 179239 134691, 179081 134606, 178876 134648, 178566 134828, 178248 135146, 178103 135168, 178055 135464, 177807 135658, 177624 135329, 177652 135295, 177531 135243, 177372 135070, 177298 134846, 177067 134512, 176768 134856, 176657 134825, 176729 134889, 176593 134881, 176206 135111, 175924 135211, 175953 135492, 175788 135834, 175713 135442, 175715 135305, 175387 135299, 175289 135344, 175387 135388, 175293 135727, 175146 135656, 175151 135572, 175059 135428, 174951 135453, 174890 135224, 174820 135317, 174654 135173, 174540 135176, 174547 135264, 174526 135533, 174328 135628, 174253 135554, 174341 135231, 174315 135183, 174377 135009, 174262 135070, 174318 135010, 174226 135030, 173986 134985, 173626 135116, 173525 135006, 173212 135289, 173185 135293, 173246 135038, 173338 134960, 173105 134747, 172823 134798, 172466 134944, 172110 135050, 172058 135122, 171899 135165, 171707 135114, 171739 134916, 171597 134656, 171452 134782, 171125 134705, 171063 134585, 170889 134653, 171053 134748, 170891 134901, 170633 134936, 170627 134984, 170357 135357, 170243 135310, 169999 135031, 170160 134980, 170330 134756, 170245 134710, 169763 134820, 169567 134677, 169650 134401, 169619 134343, 169695 134147, 169843 133896, 169706 133812, 169600 133874, 169504 133838, 169485 133732, 169348 133673, 169205 133740, 169071 133988, 169041 133807, 169099 133767, 169055 133580, 168495 133612, 168605 134014, 168099 134245, 167911 134560, 167522 134827, 167355 134991, 167175 135008, 166950 135205, 167010 134953, 166956 134754, 167304 134541, 167310 134511, 166920 134471, 166584 134722, 166503 134544, 166459 134577, 166188 134555, 166033 134684, 165978 134858, 165644 134971, 165513 134969, 165457 135112, 165298 135211, 165549 135401, 165275 135495, 164789 135472, 164656 135327, 164463 135262, 164191 135369, 163909 135388, 163842 135067, 163510 135313, 163449 135268, 163371 135354, 162878 135311, 162672 135246, 162452 135360, 162432 135304, 162561 135111, 162011 135115, 161929 135004, 161647 135029, 161618 135049, 161277 135037, 161390 135170, 161367 135272, 161047 135108, 160951 135204, 160784 135006, 160680 134934, 160618 135007, 160677 135147, 160984 135287, 161300 135544, 161701 135725, 161713 135737, 161318 135587, 161067 135607, 160888 135453, 160693 135449, 160366 135346, 160138 135548, 160013 135259, 159835 134959, 159454 135107, 159302 135156, 158877 135405, 158833 135403, 158563 135456, 158353 135531, 157772 135541, 157337 135409, 157176 135474, 156947 135451, 156722 135585, 156609 135642, 156715 135774, 156893 135886, 156671 135870, 156198 136100, 156259 135837, 156229 135744, 156127 135803, 155829 135893, 155574 136163, 155349 136334, 154918 136528, 154714 136680, 154542 136500, 154353 136231, 153984 136113, 153892 136140, 153652 136120, 153552 136060, 153593 135690, 153306 135419, 153053 135341, 152580 135581, 152424 135744, 152139 135968, 152010 136078, 151973 136256, 151750 136416, 151665 136297, 151615 136133, 151319 135935, 151244 135715, 150941 135293, 150655 135636, 150553 135647, 150201 135755, 150161 135787, 149841 135908, 149141 135992, 148954 136073, 148757 136104, 148867 136170, 148843 136326, 148639 136420, 148607 136196, 148634 136111, 148587 135746, 148415 135444, 148211 135379, 148050 135457, 148114 135730, 147652 135706, 147599 135643, 147195 135813, 146749 136022, 146448 136017, 146441 135964, 146753 135735, 146754 135594, 146534 135468, 146203 135523, 146003 135606, 145568 135722, 145105 135802, 144993 135772, 145004 135675, 144940 135517, 144856 135457, 144819 135353, 144738 135411, 144258 135273, 144244 135247, 144182 135276, 144239 135309, 144026 135482, 143898 135483, 143882 135641, 143572 135967, 143240 135766, 143044 135494, 143258 135460, 143461 135255, 143530 134972, 142808 135181, 142614 135003, 142703 134579, 142911 134207, 142805 134129, 142630 134203, 142475 134117, 142442 133928, 142364 133881, 142278 133907, 142160 134105, 142168 134201, 142008 134222, 141982 133986, 142086 133926, 142017 133734, 141547 133613, 141440 133711, 141550 134115, 140958 134288, 140799 134562, 140406 134762, 140183 134934, 140023 134920, 139718 135114, 139790 134861, 139755 134588, 140088 134453, 140094 134400, 139750 134286, 139351 134492, 139248 134284, 138934 134214, 138818 134290, 138777 134473, 138691 134549, 138319 134615, 138165 134492, 138144 134732, 137948 134822, 138223 135040, 137946 135112, 137552 135086, 137343 135004, 137322 134941, 137022 134843, 136645 134999, 136493 135002, 136351 134706, 135940 134954, 135577 135006, 135229 134925, 135039 134916, 134877 135044, 134792 134959, 135057 134672, 134591 134852, 134455 134932, 134172 134918, 133779 135004, 133556 135085, 133748 135061, 133804 135177, 133694 135392, 133421 135386, 133726 135424, 134098 135563, 134086 135641, 133686 135616, 133556 135571, 133360 135662, 133229 135581, 132893 135712, 132594 135774, 132456 135925, 132364 135912, 132064 135512, 131960 135530, 131449 135373, 131078 135348, 130574 135691, 130880 135933, 130800 135919, 130474 136087, 130566 135694, 130433 135488, 130058 135503, 130241 135641, 130311 135805, 129950 135960, 129770 136171, 129365 136500, 128949 136741, 128626 136251, 128497 136199, 128446 136104, 128148 136173, 127886 136127, 127908 135993, 127839 135960, 127716 135989, 127651 136138, 127575 136144, 127158 135990, 126750 136006, 126603 136045, 126590 136114, 126404 136287, 126174 136390, 126088 136272, 126079 136077, 125898 135949, 125420 136013, 125204 136108, 125018 135838, 124939 135792, 124563 135511, 124353 135466, 124189 135599, 124265 135634, 124639 135626, 124729 135776, 124430 135901, 123754 135988, 123703 136011, 123347 136074, 123273 136052, 123213 135680, 123096 135477, 122819 135391, 122756 135337, 122691 135437, 122643 135651, 122510 135631, 121999 135800, 121844 135668, 121573 135898, 121568 135811, 121622 135769, 121623 135583, 121842 135658, 121902 135401, 121762 135410, 121620 135574, 121417 135449, 121133 135476, 121049 135569, 120658 135651, 120447 135748, 120258 135904, 120154 135874, 120086 136053, 119789 136279, 119473 136548, 119452 136500, 119534 136164, 119652 135882, 119635 135791, 119395 135980, 119227 135779, 118829 135851, 118509 136127, 118507 136190, 118428 136136, 118318 136180, 118197 136376, 118305 136615, 118228 136767, 117973 137052, 117776 137191, 117740 136950, 117886 136638, 118130 136633, 118132 136389, 117856 136399, 117602 136628, 117223 136550, 117160 136572, 117126 136516, 117339 136288, 117514 136185, 117251 136082, 117149 136004, 116952 136134, 116884 136454, 116808 136303, 116687 136216, 116557 136220, 116387 136459, 116383 136518, 116338 136531, 116224 136732, 116048 136740, 115806 136673, 115623 136472, 115752 136469, 115765 136210, 115875 136046, 115726 135924, 115616 135998, 115573 136442, 115313 136656, 115197 136803, 114946 136606, 114421 136372, 114395 136106, 114671 135974, 114756 135965, 114950 135593, 114637 135496, 114495 135317, 114420 135283, 114264 135411, 114337 135508, 114237 135738, 114010 135683, 114047 135454, 113922 135387, 114084 135177, 113709 135347, 113585 135286, 113801 134932, 113474 135105, 113328 135292, 113311 135076, 113061 135023, 112988 134932, 112800 135031, 112663 135274, 112815 135369, 112848 135467, 112723 135575, 112282 135653, 112477 135987, 112468 136249, 112200 136411, 112030 136397, 111744 136605, 111606 136329, 111528 136219, 111495 135947, 111474 135955, 111198 135736, 111206 135609, 111344 135288, 111483 135126, 111378 135091, 111296 135276, 110948 135073, 110853 135147, 110801 135336, 110742 135386, 110129 135361, 109900 135563, 109826 135582, 109902 135675, 109930 135813, 109898 135977, 109361 136059, 109070 135973, 108982 135753, 109018 135678, 108572 135701, 108359 135989, 108183 135787, 108007 135903, 108134 135651, 107993 135488, 107824 135440, 107510 135317, 107500 135251, 107380 135207, 107222 135217, 107036 135399, 106858 135430, 106661 135198, 106441 135242, 106302 135206, 106211 135075, 106038 135009, 106034 135111, 105955 135137, 105923 135311, 105951 135404, 106093 135454, 106136 135385, 106276 135341, 106506 135358, 106737 135520, 106855 135713, 106745 135933, 106291 135738, 106290 135663, 106137 135531, 106056 135633, 106235 135744, 106183 136032, 105943 136048, 105739 135953, 105482 136067, 105360 136075, 105289 136216, 105312 136288, 105166 136376, 104952 136050, 104665 136071, 104604 135981, 104366 135871, 104515 135755, 104145 135234, 104041 135248, 104085 135307, 103970 135500, 103984 135672, 103676 135965, 103449 135625, 103475 135258, 103084 135277, 102423 135413, 102316 135482, 101926 135658, 101223 136046, 101049 136013, 100672 136006, 100404 135965, 100242 135976, 100191 136146, 99730 135992, 99269 136011, 99195 136002, 98823 136033, 98693 135957, 98012 135998, 97790 136098, 97612 135850, 97310 135619, 96993 135447, 96928 135395, 96728 135226, 96725 134880, 96456 134773, 96152 134807, 95843 134931, 95367 135283, 95072 135605, 94874 135414, 94584 135321, 94485 135118, 94285 134980, 93947 135151, 93644 135203, 93621 135244, 93579 135231, 93264 135493, 93001 135580, 92834 135678, 92670 136057, 92054 136536, 92030 136488, 92073 136227, 92244 135948, 92190 135752, 91918 136007, 91900 135879, 91802 135771, 91661 135828, 91347 135880, 91131 136093, 91116 136159, 91047 136117, 90919 136159, 90759 136374, 90872 136615, 90797 136764, 90339 137184, 90307 136950, 90453 136639, 90695 136634, 90694 136388, 90423 136398, 90176 136632, 89794 136550, 89727 136573, 89681 136498, 89972 136246, 90064 136244, 90142 136168, 90077 136100, 89848 135965, 89492 136145, 89455 136416, 89371 136306, 89125 136172, 89029 136302, 88890 136646, 88616 136740, 88374 136672, 88233 136483, 88321 136465, 88333 136214, 88410 136077, 88462 136053, 88219 135897, 88161 136116, 88126 136435, 87745 136787, 87523 136611, 86989 136371, 86963 136104, 87240 135974, 87326 135965, 87517 135593, 87207 135496, 86971 135254, 86904 135507, 86806 135738, 86609 135713, 86527 135539, 86543 135406, 86505 135345, 86587 135239, 86398 135331, 86209 135346, 86166 135299, 86313 135035, 86129 134966, 86072 134981, 86005 134907, 85524 134979, 85431 135193, 85222 135242, 85375 135344, 85363 135419, 85430 135509, 85349 135505, 85235 135590, 84944 135622, 84874 135666, 85110 136117, 84884 136377, 84590 136411, 84297 136563, 84140 136272, 84165 136654, 84073 136578, 84008 136352, 83879 136374, 83968 136325, 83982 136146, 83777 136341, 83944 136147, 84002 136108, 84028 135950, 83831 135806, 83748 135624, 83148 135941, 82702 136044, 82544 136113, 82485 136088, 82156 136110, 81742 136005, 81443 136222, 81304 136319, 81199 136183, 81247 136069, 81111 136096, 81017 136168, 81122 136274, 81174 136215, 81412 136642, 81164 136602, 80878 136583, 80988 136446, 80919 136464, 80688 136602, 80607 136305, 80274 136387, 79838 136780, 79352 136963, 79204 137074, 78889 136647, 78725 136575, 78575 136452, 78214 136412, 78091 136286, 78104 136094, 77898 136077, 77858 136221, 77880 136293, 77736 136379, 77573 136136, 77356 136219, 77462 136277, 77570 136404, 77218 136500, 77255 136280, 77348 136219, 76993 136083, 76834 136041, 76765 135943, 76670 135934, 76675 136033, 76453 136336, 76225 136116, 76069 135927, 75919 135837, 75731 135667, 75605 135619, 75565 135543, 75543 135288, 75369 135409, 75321 135349, 75126 135313, 75060 135146, 74935 135097, 74810 135110, 74619 135231, 74763 135254, 75062 135388, 74744 135552, 74607 135568, 73980 135632, 73531 135754, 73480 135413, 73331 135175, 73090 135141, 72995 135227, 72949 135405, 72736 135400, 72236 135639, 72169 135593, 71848 135917, 71689 135933, 71673 135823, 71862 135663, 71864 135511, 71654 135425, 71367 135493, 71288 135568, 71040 135604, 70993 135634, 70604 135716, 70360 135763, 70193 135696, 70220 135539, 70079 135246, 69950 135326, 69544 135136, 69495 135038, 69386 135073, 69489 135154, 69314 135263, 69145 135215, 69111 135345, 69305 135639, 69276 135684, 68888 135662, 68444 135761, 68640 135448, 68572 135408, 68355 135051, 68640 134987, 68769 134819, 68580 134663, 68374 134979, 68064 135234, 67989 135225, 67971 135087, 68120 134737, 67881 134421, 67639 134362, 67512 134397, 67456 134334, 67372 134362, 67111 134592, 67228 134742, 67182 134910, 66807 135079, 66690 135304, 66570 135323, 66126 135241, 66073 135302, 66004 135591, 65754 135734, 65537 135657, 65272 135853, 65027 135919, 65005 135988, 65058 136145, 64870 136361, 64656 136047, 64453 136137, 64643 136213, 64809 136374, 64490 136586, 64183 136707, 64278 136212, 63953 136111, 63861 136118, 63817 136044, 63870 135938, 64210 135619, 63866 135287, 63785 135135, 63681 135233, 63617 135505, 63637 135787, 63183 136382, 62995 135952, 62927 135832, 62946 135473, 62925 135342, 62808 135451, 62588 135515, 62483 135489, 62333 135146, 62578 134986, 62457 134920, 62208 134847, 61894 134944, 61753 134798, 61578 134975, 61937 135253, 62069 135289, 61958 135290, 61697 135292, 61571 135314, 61428 135229, 61397 135335, 61004 135622, 60241 135442, 60653 135209, 60659 135133, 60604 135054, 60260 134980, 60168 134994, 59960 135125, 59926 135360, 60026 135769, 60016 135836, 59667 135644, 59627 135507, 59680 135450, 59386 135416, 59179 135363, 59074 135411, 58765 135445, 58517 135731, 58152 135190, 58085 135149, 57923 134851, 57712 134842, 57447 135170, 57427 135213, 57215 135379, 57082 135597, 57001 135535, 56963 135331, 56899 135248, 56720 135236, 56064 134715, 55605 134667, 55515 134762, 55853 134970, 55757 135450, 55717 135488, 55293 135441, 55267 135392, 54937 135422, 54608 135618, 54543 135725, 54338 136007, 54046 135793, 53530 135623, 53191 135328, 53035 135288, 52979 135480, 53018 135612, 52670 135470, 52383 135414, 52152 135464, 52479 135209, 52428 135144, 52295 135118, 51984 135181, 51773 135125, 51500 135243, 50834 135326, 50687 135287, 50434 135276, 50007 135088, 49585 134979, 49066 134911, 48468 134977, 48441 134957, 47881 134850, 47829 134737, 47239 134728, 47050 134814, 46849 134739, 46622 134986, 46413 134986, 46104 134687, 46275 134378, 46224 134151, 46139 134047, 46249 133899, 46238 133784, 45899 133657, 45626 133769, 45444 133622, 45475 133565, 45347 133384, 44976 133405, 44788 133508, 44529 133467, 44099 133686, 44000 133560, 44091 133436, 44206 133376, 44307 133392, 44335 133296, 44590 133071, 45463 133039, 46008 133156, 45961 133109, 45997 132799, 46025 132770, 45976 132712, 45725 132659, 45581 132482, 45236 132696, 45414 133008, 44857 132757, 44977 132539, 44958 132473, 44826 132404, 44601 132411, 44171 132353, 43769 131871, 43981 131810, 44119 131716, 43838 131518, 43861 131195, 43582 131142, 43466 131189, 43302 131170, 43324 131094, 43161 130950, 43196 130752, 43155 130663, 43383 130419, 43398 130353, 43323 130074, 43239 130062, 43301 129994, 43359 129445, 43225 129258, 43140 128928, 43217 128724, 43144 128657, 42940 128748, 42735 128567, 42877 128329, 42854 128277, 42669 128220, 42706 128570, 42589 128595, 42378 128809, 42407 128597, 42614 128199, 42483 128185, 42245 128300, 42148 128040, 42073 127995, 42155 127678, 42024 127417, 41939 127445, 41801 127704, 41694 127430, 41860 127106, 41683 126831, 41577 126917, 41452 127192, 41401 127192, 41327 126885, 41263 126609, 41298 126498, 41361 125899, 41421 125628, 41539 125708, 41655 125570, 41501 125574, 41381 125345, 41326 125721, 41338 125846, 41251 125989, 41168 125910, 41230 125788, 41146 125605, 41042 125635, 40885 125517, 41079 125226, 41275 125115, 41340 125126, 41344 125038, 40969 124437, 40961 124074, 40972 123976, 40753 123596, 40812 123528, 40853 123552, 40876 123274, 40961 123455, 41052 123377, 40945 122880, 40909 122549, 41037 122550, 41096 122750, 41233 122723, 41310 122893, 41447 122850, 41470 122764, 41329 122150, 41112 121736, 41210 121353, 41117 121282, 40935 120693, 41055 120283, 40984 120078, 40891 120080, 40927 119761, 40902 119326, 40808 118962, 40775 118936, 40690 119317, 40642 119292, 40617 119136, 40666 118864, 40733 118575, 40747 118274, 40765 118204, 40822 118479, 40855 118554, 40940 118159, 41015 117994, 41038 117660, 41078 117340, 41284 116909, 41231 116854, 41170 116552, 41279 116484, 41140 116433, 40929 116541, 40868 116284, 40897 116124, 40745 116071, 40634 115906, 40632 115767, 40705 115521, 40730 115062, 40927 115022, 40990 115139, 40968 115320, 41035 115494, 41054 115226, 41119 115118, 41169 114738, 41259 114825, 41472 114524, 41525 114208, 41451 114180, 40917 113420, 40937 113343, 41219 113156, 41362 112973, 41270 112849, 41254 112554, 41194 112394, 41062 112384, 40975 112475, 40838 112528, 40816 112401, 40718 112361, 40745 112192, 40690 111957, 40598 111447, 40890 110922, 40889 110737, 40836 110775, 40757 110641, 40757 110459, 40731 110070, 40799 109881, 40874 109845, 40904 109699, 40875 109313, 40974 109296, 40990 109049, 41118 108830, 41130 108710, 41238 108243, 41150 107885, 41279 107595, 41556 107763, 41693 107879, 41557 108359, 41595 108818, 41673 108695, 41919 108567, 42073 108574, 42132 108654, 42286 108579, 42330 108646, 42440 108693, 42350 108523, 42438 108401, 42579 108519, 42637 108229, 42424 108110, 42221 107667, 42411 107536, 42181 107261, 42537 106908, 42767 107048, 42936 107335, 43055 107368, 43097 107513, 43366 107437, 43306 107073, 43182 106849, 43123 106812, 43063 106560, 43083 106441, 43331 106232, 43509 105528, 43637 105160, 43807 105021, 44351 104509, 44803 104559, 45345 104667, 45660 104709, 45785 104635, 46197 104955, 46251 104962, 46215 104945, 46234 104628, 46199 104598, 46193 104483, 46273 104392, 46445 104532, 46628 104818, 46807 104657, 46802 104408, 46536 104297, 46374 104104, 46424 104051, 46462 103793, 46414 103721, 46151 103924, 46246 104365, 46082 104371, 46014 104302, 46079 103798, 46092 103325, 46245 103267, 46320 103282, 46370 103240, 46466 102961, 46654 103216, 46984 103089, 47079 103117, 47153 102995, 47334 102916, 47398 102930, 47791 102908, 47842 102889, 48162 102825, 48214 102889, 48058 102998, 48060 103327, 47898 103671, 48048 103640, 48074 103360, 48304 103328, 48459 103485, 48675 103443, 48921 103487, 48971 103424, 49012 103489, 49517 103390, 49313 103137, 49322 103118, 49073 102855, 49329 102621, 49495 102572, 49800 102575, 50067 102637, 50227 102894, 50528 102716, 50971 102866, 51195 102861, 51121 102672, 50655 102231, 51226 102367, 51573 102497, 51601 102525, 51897 102661, 51821 103018, 51929 103206, 52348 103245, 52419 103082, 52872 103051, 53058 103002, 53396 103083, 53372 102914, 53495 102723, 53679 102970, 53652 103076, 54044 103042, 54297 103001, 54488 102914, 54460 102886, 54772 102835, 54989 102481, 55098 102519, 55176 102722, 55297 102770, 55169 102855, 55529 102907, 55885 102741, 55913 102928, 55881 103089, 56057 103132, 56097 103022, 56248 102854, 56401 102766, 56440 102841, 56715 102836, 57049 102691, 57122 102419, 57278 102597, 57290 102727, 57353 102766, 57302 102812, 57354 102803, 57439 102630, 57593 102515, 57585 102421, 57664 102434, 57617 102266, 57786 101936, 57868 102121, 57971 102427, 58260 102239, 58317 101953, 58389 101991, 58462 102115, 58439 102199, 58521 102252, 58907 102200, 58954 102445, 59046 102440, 59109 102376, 59151 102163, 59105 102169, 59146 102062, 59200 102049, 59356 102113, 59338 102205, 59260 102274, 59335 102416, 59345 102374, 59505 102441, 59446 102506, 59439 102771, 59465 102798, 59508 102742, 59616 102722, 59677 102788, 59543 102874, 59665 102972, 59934 102989, 60289 102769, 60840 102283, 61082 102235, 61133 101982, 61256 101889, 61397 102096, 61731 102268, 61738 102342, 61969 102451, 62118 102641, 62319 102502, 62685 102505, 63194 102340, 63358 102348, 63760 102288, 63878 102311, 64214 102268, 64083 102141, 64090 102040, 64390 101954, 64426 102126, 64367 102265, 64389 102596, 64543 102642, 64489 102807, 64596 102940, 64810 102777, 64823 102707, 65211 102741, 65426 102708, 65707 102604, 66086 102383, 66205 102382, 66490 102340, 66088 102710, 66230 102849, 66332 102750, 66499 102802, 66889 102649, 66991 102574, 67293 102447, 67360 102447, 67701 102324, 67773 102544, 67887 102633, 67922 102597, 68384 102610, 68597 102382, 68614 102129, 68909 101754, 69031 101768, 69191 101854, 69327 101871, 69537 102127, 69235 102238, 69004 102702, 69384 102672, 69683 102467, 69779 102550, 69782 102799, 69655 103141, 69818 103191, 69618 103248, 69591 103373, 69858 103211, 70062 103377, 70373 103214, 70474 103282, 70555 103452, 70344 103586, 70391 103728, 70782 103798, 70905 103793, 70806 103354, 71297 103174, 71380 103089, 71462 103114, 71547 102957, 71793 102809, 72140 102520, 72186 102525, 72389 102362, 72580 102289, 72611 102315, 72535 102670, 72544 102884, 72236 103047, 72237 103073, 72525 103168, 72779 103052, 72823 102984, 72898 103039, 72930 103161, 73222 103288, 73295 103018, 73450 103029, 73644 102977, 73847 103010, 73875 102978, 74186 102898, 73915 102651, 74090 102604, 74571 102715, 74661 102889, 75004 103075, 75258 102974, 75439 102956, 75574 103240, 75956 103031, 76299 103060, 76515 103140, 76538 103184, 76809 103118, 76849 103084, 77240 102993, 77134 102726, 77148 102730, 77356 102978, 77510 102976, 77507 102741, 77545 102710, 77663 102759, 77668 102946, 77858 102996, 77952 102741, 77609 102635, 77617 102522, 78023 102499, 78169 102538, 78325 102498, 78414 102540, 78762 102372, 79051 102271, 79150 102138, 79262 102170, 79478 102422, 79801 102043, 79885 102001, 80155 101803, 80254 101746, 80463 101586, 80611 101436, 80900 101801, 81238 101890, 81507 101843, 81662 101912, 81631 102200, 81719 102293, 81773 102114, 82047 101849, 82564 101937, 82706 102044, 82503 102174, 82391 102373, 82538 102309, 82913 101946, 83139 101911, 83193 101633, 83349 101514, 83440 101736, 83685 101935, 83760 101964, 83767 102077, 84077 102548, 84232 102322, 84631 102230, 84758 102536, 84960 102557, 85068 102451, 84941 102429, 84633 102228, 85126 102036, 85398 102015, 85573 101974, 85741 102024, 85931 101954, 86115 101955, 86016 101867, 86041 101723, 86244 101661, 86275 101877, 86245 101972, 86283 102339, 86450 102662, 86643 102768, 86769 102683, 86710 102436, 87155 102575, 87202 102648, 87595 102571, 87633 102615, 87740 102547, 87998 102474, 88271 102533, 88261 102606, 87960 102785, 88128 103007, 88202 102956, 88359 103045, 88680 102998, 89222 102938, 89243 102945, 89515 102924, 89615 102963, 89597 103055, 89690 103240, 89800 103320, 90333 103420, 90539 103256, 90597 103254, 90617 103077, 90900 102750, 91275 102945, 91463 103176, 91227 103240, 91092 103378, 91052 103481, 91291 103610, 91450 103581, 91650 103467, 91780 103562, 91783 103738, 91573 104311, 91611 104328, 91828 104210, 92036 104290, 92381 104155, 92471 104306, 92325 104416, 92377 104554, 92824 104574, 92899 104492, 92802 104159, 93307 103878, 93406 103844, 93510 103666, 93781 103441, 94089 103147, 94193 103134, 94364 102956, 94571 102807, 94470 103223, 94514 103381, 94248 103537, 94233 103632, 94499 103667, 94804 103460, 94827 103413, 94875 103437, 94915 103557, 95238 103695, 95351 103341, 95871 103225, 95882 103192, 96179 103030, 95913 102815, 96138 102733, 96544 102770, 96659 102821, 96700 102937, 97014 103062, 97223 102945, 97520 102892, 97608 103156, 97855 103060, 97968 102956, 98135 102930, 98727 102806, 99483 102970, 99748 103059, 100038 102960, 99956 102800, 100051 102566, 100266 102601, 100058 102551, 100064 102492, 100030 102541, 99694 102416, 99708 102322, 100109 102392, 100361 102334, 100532 102386, 100784 102279, 101072 102229, 101240 102046, 101467 102338, 101637 102556, 101816 102918, 102184 103285, 102019 103454, 102085 103588, 102066 103736, 101839 103973, 102074 104144, 101846 104344, 101760 104385, 101864 104564, 101945 104543, 102014 104450, 102275 104489, 102405 104459, 102376 104629, 102411 104678, 102451 104256, 102680 103942, 102346 103467, 102341 103247, 102250 102982, 102397 102895, 102731 102853, 102740 102888, 102996 102768, 103387 102987, 103486 103101, 103596 102948, 103455 102870, 103467 102836, 103736 102747, 103805 102415, 104035 102223, 104464 102286, 104663 102434, 104518 102525, 104297 102945, 104345 102967, 104680 102838, 105340 102801, 106125 102719, 106282 102724, 106681 102516, 106957 102500, 107141 102447, 107720 102513, 108053 102656, 108224 102608, 108469 102660, 108685 102551, 108635 102442, 108419 102265, 108640 102325, 108840 102275, 109154 102140, 109114 102339, 109152 102472, 109410 102392, 109797 102037, 110142 101906, 110458 101691, 110661 101924, 110765 102084, 111112 102198, 111396 102219, 111501 102275, 111484 102645, 111727 102914, 112139 102810, 112410 102597, 112739 102249, 112982 102181, 113035 101905, 113178 101773, 113348 102030, 113399 102044, 113648 102337, 113692 102355, 113916 102639, 114059 102420, 114480 102269, 114973 102008, 115149 101988, 115499 101861, 115628 101866, 116006 101756, 115861 101625, 115867 101540, 116101 101437, 116138 101639, 116099 101740, 116127 102098, 116295 102422, 116429 102475, 116596 102410, 116547 102246, 116621 102164, 117011 102215, 117057 102284, 117824 102077, 118150 102196, 118156 102230, 117818 102363, 117817 102486, 118028 102702, 118051 102670, 118271 102766, 118416 102736, 118647 102767, 119023 102833, 119058 102857, 119321 102918, 119410 102985, 119393 103074, 119563 103446, 119649 103408, 120081 103746, 120339 103633, 120339 103450, 120649 103177, 121048 103536, 121230 103840, 120986 103834, 120856 103931, 120813 104036, 121072 104265, 121171 104277, 121402 104204, 121525 104322, 121533 104505, 121326 105001, 121363 105024, 121595 104957, 121781 105075, 122112 104983, 122173 105016, 122181 105173, 122280 105173, 122155 105241, 122165 105339, 122595 105444, 122672 105409, 122547 105080, 122838 105009, 123056 104896, 123159 104884, 123260 104743, 123520 104572, 123827 104332, 123913 104329, 124291 104057, 124200 104427, 124245 104553, 124007 104664, 123989 104751, 124252 104784, 124514 104627, 124538 104582, 124626 104611, 124694 104710, 124941 104777, 124983 104567, 125106 104449, 125415 104380, 125553 104351, 125575 104284, 125845 104127, 125573 103988, 125783 103882, 126295 103875, 126431 103973, 126632 104017, 126860 103899, 127125 103831, 127269 104068, 127597 103827, 127626 103849, 127675 103799, 128244 103837, 128406 103915, 128605 103677, 128647 103712, 128759 104020, 128874 103995, 128916 104046, 128974 104043, 129029 103893, 129275 103787, 129447 103791, 129671 103577, 129602 103440, 129713 103206, 129320 103146, 129335 103050, 129719 103003, 129862 103020, 130041 102895, 130164 102932, 130487 102739, 130799 102594, 130951 102403, 131045 102444, 131276 102732, 131415 102812, 131561 103097, 131815 103267, 131982 103425, 131825 103585, 131872 103711, 131816 103924, 131616 104110, 131841 104234, 131829 104315, 131938 104364, 132261 104347, 132445 104089, 132609 104040, 132419 104033, 132330 103782, 132117 103600, 132132 103546, 132005 103154, 132245 103050, 132452 103073, 132708 102981, 133070 103149, 133247 103344, 133509 103064, 133475 102915, 133554 102723, 133791 102553, 134312 102774, 134788 103006, 134819 103028, 134408 102897, 134285 102945, 134096 103200, 134206 103391, 134413 103369, 134601 103463, 135139 103493, 135192 103373, 135744 103302, 135773 103279, 136353 103379, 136882 103330, 137201 103288, 137623 103123, 137969 103106, 138563 103213, 138786 103317, 138974 103260, 139246 103310, 139402 103231, 139102 102993, 139340 103043, 139565 102966, 139877 102792, 139845 102935, 139898 103096, 140036 103041, 140375 102674, 140862 102398, 141105 102152, 141382 102472, 141741 102568, 142001 102545, 142150 102604, 142135 102943, 142396 103154, 142942 102885, 143193 102610, 143529 102283, 143763 102185, 143838 102080, 143878 101879, 143969 101790, 144119 101959, 144311 102032, 144524 102223, 144678 102262, 144829 102401, 144974 102233, 145163 102159, 145511 102099, 145541 102073, 145998 101872, 146354 101835, 146500 101798, 146645 101832, 146867 101744, 146901 101517, 147271 101389), (143581 135001, 143976 135192, 143940 135078, 144043 134952, 144013 134901, 143594 134807), (68879 134758, 69248 134988, 69214 134862, 69298 134787, 69215 134663, 68774 134519), (65782 134382, 65714 134660, 65735 134790, 65796 134809, 66043 134707, 66253 134741, 66493 134669, 66828 134926, 66910 134742, 67017 134614, 66814 134713, 66601 134499, 66540 134559, 66487 134521, 66270 134667, 66066 134661, 65904 134347, 65827 134312), (164793 134568, 164770 134690, 164905 134902, 164993 134817, 165283 134808, 165433 134869, 165622 134594, 165601 134517, 165229 134592, 165103 134583, 164916 134441), (143356 134540, 143449 134773, 143588 134782, 143708 134502, 143559 134451), (170249 134097, 170241 134167, 170413 134497, 170597 134585, 170823 134629, 170854 134376, 170475 134334, 170593 134042, 170406 134003), (137415 134174, 137436 134295, 137526 134449, 137609 134353, 138162 134483, 138362 134150, 137891 134139, 137765 134170, 137577 134038), (45978 133615, 46251 133757, 46366 133686, 46383 133467, 46213 133333), (189640 132105, 190033 132258, 190139 132148, 189973 132090), (193701 118681, 193713 118969, 193757 118982, 193790 118915, 193775 118642, 193726 118073, 193676 118023), (191372 108040, 191400 108103, 191304 108436, 191327 108481, 191556 108335, 191594 108247, 191510 107981, 191407 107912), (188119 105974, 188080 106056, 188126 106140, 188400 105920, 188318 105909), (188652 105805, 188679 106125, 189087 106087, 188973 105793), (189497 105786, 189534 105812, 189535 105925, 189583 105823, 189784 105774, 189926 105683, 189733 105606), (131571 104488, 131787 104761, 131925 104881, 132137 104879, 132179 104738, 132085 104738, 131680 104507, 131686 104442), (188398 103912, 188405 103992, 188567 104111, 188360 104298, 188335 104303, 188064 104441, 188048 104640, 188235 104846, 188465 104447, 188408 104330, 188567 104256, 188638 104158, 188640 104046, 188713 103903, 188484 103780), (126133 104488, 125891 104479, 125575 104527, 125512 104660, 125931 104638, 126033 104613, 126166 104672, 126253 104598, 126251 104514, 126186 104425), (187466 104348, 187379 104462, 187442 104536, 187763 104398, 187558 104297, 187570 104259, 187375 104173), (120287 104169, 120666 104304, 120664 104164, 120395 103967), (133346 103832, 133312 103838, 133367 104088, 133469 104201, 133668 104192, 133560 104017, 133663 103708, 133512 103644), (182922 103927, 182951 104078, 183087 104160, 183256 104093, 183573 103898, 183598 103833, 183459 103611, 183514 103412), (133024 103609, 132839 103701, 132613 103652, 132648 103884, 132899 103876, 133002 103960, 133310 103833, 133476 103591, 133254 103347), (90511 103764, 90906 103803, 90904 103660, 90610 103549), (95768 103681, 96057 103732, 96358 103662, 96506 103784, 96595 103702, 96614 103587, 96533 103461, 96475 103535, 96214 103469, 95938 103429), (183989 103559, 184007 103692, 183892 103752, 184037 103736, 184199 103460, 184055 103448), (73775 103408, 73759 103427, 74218 103505, 74486 103509, 74513 103446, 74456 103334, 74390 103386, 74146 103310), (103243 103402, 103363 103347, 103697 103417, 103838 103273, 103639 103293, 103500 103088), (175394 103184, 175246 103409, 175829 103298, 175863 103262, 176009 103310, 176077 103263, 176079 103189, 176037 103148), (59468 102800, 59496 102829, 59618 102772), (114617 102545, 114800 102539, 114898 102432, 114783 102428, 114493 102288)), ((108850 136644, 108647 136612, 108348 136570, 108610 136156)), ((104897 136284, 104997 136403, 104652 136500, 104722 136201)), ((174305 135194, 174168 135529, 174037 135603, 174086 135371, 174158 135328, 174135 135113)), ((136146 135168, 135649 135133, 135649 135090, 135940 134969)), ((41043 121936, 41186 122120, 41202 122554, 40944 122100, 40904 121929, 40928 121890)), ((123856 103788, 123975 104015, 123854 104135, 123736 103997, 123463 103841, 123678 103718)), ((181388 103391, 181538 103439, 181342 103486, 181240 103467, 181357 103063)), ((119724 102830, 119639 103036, 119662 103128, 119569 103134, 119480 102926, 119554 102702)), ((173519 102386, 173602 102512, 173609 102599, 173728 102771, 173514 102996, 173313 102755, 172941 102588, 173164 102419, 173266 102414, 173364 102332)), ((94131 102562, 94237 102760, 94123 102883, 94024 102765, 93841 102777, 93907 102672, 93790 102609, 93947 102512)), ((150965 102382, 150913 102507, 150983 102711, 150743 102752, 150574 102561, 150694 102218)), ((68054 101957, 67990 102150, 68030 102280, 67838 102396, 67733 102292, 67830 101952)), ((72160 101873, 72322 102233, 72151 102379, 71998 102153, 71724 102100, 71823 101958, 71736 101883, 71850 101827, 71927 101833, 71999 101784)), ((169448 101850, 169401 101987, 169460 102194, 169226 102286, 169062 102121, 169154 101882, 169174 101745))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_003.wkt b/tests/voronoi_crash_resources/slice_polygon_003.wkt new file mode 100644 index 0000000000..041dcd5b9c --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_003.wkt @@ -0,0 +1 @@ +MultiPolygon (((122284 113666, 123049 114043, 123520 114470, 123644 114573, 123817 114751, 123896 114794, 124013 114851, 124694 115297, 125303 115758, 125477 115916, 126470 116593, 126877 117068, 127118 117496, 127198 117898, 127150 118480, 127051 118790, 126908 119189, 126592 119585, 126417 119840, 126185 120009, 125875 120468, 125791 120830, 125570 121185, 125128 121546, 124505 121795, 123592 122108, 122792 122222, 122110 122359, 121721 122424, 120491 122690, 119083 122846, 117862 122758, 117763 122775, 117366 122773, 116401 122835, 115909 122763, 115524 122727, 114931 122571, 114688 122469, 114021 122082, 113525 121558, 113382 121190, 113331 120902, 113336 120423, 113435 120180, 113374 120162, 113261 119886, 113154 119124, 113056 119101, 112971 119049, 112951 119060, 112876 119015, 112876 117561, 112971 117560, 112971 117580, 113031 117580, 113199 117645, 113050 118095, 113047 118359, 113154 119124, 113313 119161, 113550 119140, 113730 118986, 113813 118820, 113829 118625, 113794 118331, 113720 118108, 113577 117902, 113387 117718, 113199 117645, 113418 116985, 114033 116287, 114630 115714, 115362 115246, 115786 115120, 116516 114855, 116827 114768, 117946 114378, 118613 114172, 118991 114040, 119480 113927, 119738 113857, 120380 113725, 120965 113662, 121646 113640), (121614 114261, 121064 114303, 120736 114368, 120370 114429, 119460 114711, 118653 115046, 118123 115255, 117656 115587, 117471 115816, 117219 116158, 117211 116172, 117318 116184, 117780 116466, 118028 116856, 118121 117139, 118359 117797, 118565 118631, 118396 119434, 118187 119501, 117265 119777, 116604 119962, 116111 120021, 115697 120189, 115503 120202, 115046 120688, 114756 120572, 114589 120522, 114404 120312, 114075 119732, 113986 119566, 114172 119488, 114407 119307, 114880 119168, 115414 118856, 115515 118521, 115805 118174, 115983 117895, 116510 117229, 116729 116931, 116889 116730, 117211 116172, 116544 116099, 114823 116276, 114301 116789, 114029 117705, 113932 118116, 113853 118575, 113966 119530, 113986 119566, 113882 119610, 113707 119727, 113444 120158, 113435 120180, 114589 120522, 114708 120658, 115015 120868, 115439 121034, 115919 121203, 116646 121197, 117222 120978, 117287 120917, 117671 120679, 117893 120404, 118315 119816, 118396 119434, 119119 119201, 120958 118521, 121156 118424, 121146 118347, 121156 118119, 121735 116490, 122179 116091, 122487 115947, 123304 115941, 123897 116077, 123827 116268, 123534 116772, 123219 117125, 122881 117439, 122461 117739, 122053 117985, 121156 118424, 121271 119318, 121374 119471, 121819 120261, 122060 120458, 122199 120633, 122737 120931, 123273 121039, 123624 120983, 124108 120884, 124503 120664, 124823 120383, 125303 119692, 125384 119374, 125532 118648, 125478 117748, 125332 116868, 124898 116307, 123897 116077, 123943 115953, 124021 115571, 124018 115263, 123972 115012, 123840 114774, 123817 114751, 123458 114553, 122968 114387, 122292 114251))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_004.wkt b/tests/voronoi_crash_resources/slice_polygon_004.wkt new file mode 100644 index 0000000000..fb8934797c --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_004.wkt @@ -0,0 +1 @@ +MultiPolygon (((114694 35858, 115616 35911, 115854 35970, 116115 36112, 116666 36083, 116755 36064, 116959 36121, 117454 36520, 117954 36308, 118396 36479, 118905 36902, 119142 36740, 119388 36585, 120610 36511, 121349 36576, 121551 36646, 121806 37024, 122134 37435, 122337 37525, 122613 37579, 122905 36993, 123035 36987, 123754 37351, 124156 37152, 124237 37179, 125265 37289, 125714 37320, 125916 37368, 126783 37522, 126884 37542, 127428 37413, 127760 37525, 127985 37667, 128176 37729, 128492 37704, 128708 37756, 129040 38016, 129370 38302, 129553 38343, 130039 38558, 130303 38693, 130645 38683, 130815 38609, 131496 38809, 132570 38671, 132826 39123, 132913 39408, 133122 39596, 133467 39426, 133601 39156, 133743 39187, 133936 39347, 134344 39593, 134523 39533, 134568 39901, 134735 40194, 135001 40147, 135245 40052, 135422 40043, 135593 39721, 135588 39652, 135879 39734, 136913 40255, 137258 40294, 137509 40084, 138034 39610, 138241 40199, 137912 40462, 137782 40885, 138055 40883, 138682 40679, 139860 41330, 139903 41339, 140270 41749, 140358 41819, 140722 42162, 141208 42185, 141335 42501, 141874 42554, 142001 42431, 142678 42985, 142940 43182, 143008 43387, 143371 43383, 143476 43425, 143758 43506, 144322 43650, 144552 43865, 144394 44479, 144474 44471, 144587 44640, 144756 44841, 145358 44845, 145929 44554, 145561 44280, 145198 44136, 144773 44241, 144863 43853, 145300 43698, 145357 43754, 145902 43910, 146069 44500, 146691 44779, 146457 45180, 146532 45278, 147114 45360, 147691 45786, 147974 45934, 148413 45992, 148871 46129, 149174 46207, 149780 45967, 150518 46419, 151023 46445, 151179 46674, 151277 47011, 151931 47268, 152122 47411, 152378 47429, 152371 47652, 152815 47753, 152841 48077, 152822 48148, 153354 48499, 153861 49036, 154395 48895, 155005 49286, 155392 49439, 155975 49852, 156047 49942, 156504 50102, 156854 50647, 156940 50630, 156991 50715, 157507 51150, 157752 51333, 158095 51811, 158342 51899, 158362 52322, 158812 52298, 158820 52290, 159484 52384, 159767 52723, 159879 52764, 160077 52740, 160753 52713, 160926 52761, 160937 52815, 161005 52851, 161092 53432, 161095 53748, 161271 53906, 161501 54270, 161519 54351, 161908 54578, 161971 55091, 162413 54965, 162644 55166, 162846 55764, 162640 56006, 162864 55917, 163153 55978, 163514 55936, 163989 56371, 164195 56644, 164473 56755, 164834 56841, 164651 57037, 165070 57715, 165074 57756, 165228 58005, 165829 58708, 165836 58767, 165894 58779, 166268 59147, 166511 59419, 167227 60014, 167291 60543, 167051 60914, 166973 61121, 166972 61495, 167129 61589, 167383 61556, 167773 61244, 167817 61534, 168386 61687, 168676 61640, 168801 61781, 168814 61968, 168951 62407, 169356 62936, 169883 62918, 169929 63270, 170434 63665, 170639 63616, 171144 64025, 171110 64792, 171185 65115, 170990 65219, 170902 65582, 171142 65638, 171534 65506, 171719 65756, 171922 65992, 172246 65873, 172483 66188, 172822 66325, 172827 66608, 173030 66684, 173096 67142, 173537 67385, 174024 68310, 174243 68335, 174470 68302, 174812 68481, 174841 68804, 174837 69024, 174995 69298, 175146 69480, 175360 70207, 175420 70230, 175450 70355, 176077 70396, 175781 70047, 175687 69727, 176091 69906, 176084 69960, 176391 70487, 176384 70499, 176529 71050, 176278 71598, 176297 71755, 176725 71989, 176885 72414, 176940 72474, 177253 72521, 177404 72763, 177332 73631, 177492 73895, 177746 74166, 177626 74408, 177574 74600, 177192 74917, 177542 75124, 177912 74785, 177904 74683, 178015 74740, 177791 75271, 177810 75487, 177983 75635, 178291 75614, 178544 75530, 178745 75618, 179000 75912, 179061 76348, 179231 76491, 179073 76825, 179165 77257, 179928 76916, 180362 77366, 180379 78058, 180343 78222, 180433 78276, 180446 78550, 180590 78944, 180902 79466, 181180 79474, 181279 80103, 181187 80219, 181319 80454, 181229 81168, 181257 81262, 181362 81360, 181527 81264, 181841 81204, 181947 81287, 182025 81777, 181811 81644, 181555 81814, 181598 82262, 181684 82335, 181822 82856, 181845 83077, 182062 83052, 182437 82695, 182511 83010, 182807 83477, 183019 83880, 182902 84040, 182902 84314, 182827 84766, 183176 84997, 183340 85758, 183402 85874, 183352 85912, 183555 86823, 183864 86929, 184084 86952, 184233 87115, 184037 87326, 183992 87496, 184029 87660, 184326 87781, 184460 88097, 184599 88319, 184668 88590, 184740 88963, 184742 89037, 184800 89531, 184938 89722, 185203 89974, 185123 90389, 185190 90634, 185509 91000, 185551 91217, 185666 91393, 185709 91869, 185842 92055, 185956 92928, 186185 93223, 186185 93364, 186277 93446, 186287 93717, 186364 94336, 186626 94629, 186612 94897, 186649 95199, 186694 95248, 186666 95393, 186392 95793, 186840 95922, 186859 95793, 186878 96097, 186765 96536, 186338 96648, 186316 96756, 186417 96868, 186840 96719, 186593 97222, 186881 97354, 186967 97683, 186960 97778, 187026 98086, 187070 98474, 187092 98755, 187022 99189, 187286 99851, 187286 99926, 187417 99911, 187612 100113, 187402 100497, 187346 100815, 187444 101207, 187786 101608, 187610 101944, 187375 102259, 187512 102696, 187657 102812, 187812 103078, 188284 103190, 188027 104083, 188087 104651, 188079 105003, 188199 105266, 187773 105507, 188239 105450, 188273 105804, 188281 106170, 188299 106301, 188232 106892, 188079 106451, 187732 106782, 187760 106953, 188191 107319, 188381 107897, 188416 108652, 188167 109266, 188428 110087, 188426 110192, 188223 110743, 188428 111106, 188328 111287, 188149 111991, 188187 112010, 188209 112116, 188444 112473, 188503 113335, 188276 113796, 188148 113881, 187922 114174, 187613 114296, 187810 114867, 187710 114928, 187751 115370, 187604 116249, 187634 116536, 188077 117380, 188036 117395, 188087 117412, 188449 117864, 188123 118283, 188025 118526, 188087 118786, 187955 119068, 187865 119194, 187763 119172, 187493 119430, 187599 119914, 187772 119984, 187797 120154, 187644 120253, 187527 120993, 187581 121128, 187575 121246, 187514 121273, 187327 121813, 187294 121855, 187089 122650, 187102 123090, 186836 123375, 186919 123616, 187013 124114, 187092 124135, 187042 124225, 187317 124737, 187277 124814, 187025 125039, 187135 125805, 187188 126304, 187226 126962, 186803 127042, 186780 127077, 186977 127727, 186949 127984, 186658 128438, 186586 128719, 186538 129100, 186747 129550, 186759 129798, 186446 130039, 186662 130144, 186353 130682, 186264 130981, 186249 131185, 185816 130929, 185539 130996, 185495 131199, 186010 131499, 186221 131269, 186091 131610, 185851 132197, 185752 132303, 185563 132814, 185610 132991, 185505 133208, 185268 133312, 185138 133677, 185198 133796, 185122 133968, 184882 134812, 184850 134807, 184866 134859, 184386 135087, 184410 135303, 184550 135520, 184512 135634, 184505 135918, 184539 136289, 184301 136347, 184424 136660, 184541 136812, 184579 137084, 184306 137616, 184117 137621, 184007 137963, 184153 137983, 184108 138301, 183778 138769, 183445 139581, 183227 140076, 183224 140171, 183126 140154, 183094 140479, 183326 140913, 183120 141913, 182904 142226, 182791 142745, 182457 143145, 182221 144290, 182154 144410, 181689 144846, 181574 144997, 181587 145639, 181197 146134, 180867 146720, 180628 146773, 180446 146880, 180293 147627, 180139 148068, 180062 148357, 179469 148950, 179310 148994, 179100 149437, 179074 149463, 178856 149912, 178341 150157, 178315 150295, 178073 150549, 178034 150685, 177767 150997, 177659 151183, 177553 151600, 177400 151654, 177206 152023, 176948 152073, 176646 152327, 176586 152475, 176696 152732, 176551 152980, 176529 153108, 175874 153227, 175665 153609, 175754 153948, 175683 154247, 175551 154300, 175150 154206, 175135 154697, 174606 154845, 174762 155348, 174370 155491, 174373 155773, 174467 156044, 174437 156129, 174480 156575, 174398 156824, 174159 156955, 173942 156610, 173553 156664, 173630 157021, 174052 157130, 173704 157584, 173503 157804, 173467 157971, 173063 158555, 172589 158525, 172470 159146, 172145 159335, 172354 159727, 172027 160454, 171426 160368, 171327 160574, 171440 160938, 171237 161138, 171031 161447, 170586 161305, 170641 161650, 170696 161929, 170017 162319, 169701 162157, 169612 162410, 169947 162590, 169418 163306, 169133 163477, 168777 163453, 168598 163408, 168588 163544, 168445 163680, 168158 164077, 168229 164700, 167813 164621, 167697 164998, 167730 165145, 167611 165235, 167185 165391, 167031 165635, 166947 165864, 166791 165888, 166273 165960, 166242 166237, 165909 166232, 165474 166199, 165332 166560, 165189 166827, 165098 166845, 164772 167082, 164684 167334, 164253 167248, 164216 167347, 164217 167713, 163915 167781, 163780 167943, 163760 168255, 163559 168306, 163464 168612, 163262 168930, 163174 169265, 162737 169552, 162406 170143, 162211 170145, 162236 170212, 161711 170536, 161683 170618, 161145 171030, 161099 171034, 161099 171093, 160786 171574, 160500 171792, 160073 172175, 159416 172440, 159195 172575, 158746 172744, 158853 172426, 158529 172279, 158379 172343, 158502 172843, 158448 172889, 157822 172962, 157647 173154, 157806 173799, 157391 174179, 157392 174188, 156954 174534, 156832 174852, 156436 175204, 156476 175455, 155785 175939, 155247 175730, 154959 175781, 154804 176155, 154319 175864, 154108 175841, 153804 175954, 153400 176060, 153315 176524, 153391 176660, 153361 176907, 153012 177015, 152891 177270, 152706 177287, 152498 177438, 152068 177656, 151875 177808, 151223 177681, 151072 178069, 150622 178275, 150512 178152, 150375 178404, 150381 178835, 150249 179113, 150012 179223, 149599 179683, 149102 180048, 148588 180318, 148349 180547, 147973 180850, 147859 181268, 147680 181423, 147360 181407, 147227 181570, 146809 181637, 146537 182133, 146279 182188, 145981 181974, 145803 182032, 145352 181794, 145098 181735, 145002 181752, 144952 182147, 144962 182375, 144810 182450, 144133 182516, 143760 182356, 143465 182507, 143726 182855, 143498 183139, 142605 182887, 142219 183453, 141992 183525, 141634 183491, 140971 183661, 140947 183967, 140250 184209, 140128 184215, 139807 184324, 139299 184542, 139176 184503, 139040 184599, 138704 184738, 138187 185014, 138032 185012, 137713 185074, 137574 185164, 137321 185479, 137068 185479, 136557 185545, 136256 185235, 135868 185797, 135471 186136, 135228 186096, 134987 186250, 134874 186250, 134759 186061, 134550 186306, 134211 186259, 134112 186294, 133578 186372, 133490 186209, 133122 186247, 133068 186364, 132903 186448, 132530 186771, 132382 186809, 131217 187222, 130252 187346, 129939 187296, 129250 187205, 128909 187413, 128572 187457, 128291 187541, 127932 187634, 127475 187554, 127024 187506, 126434 187950, 125580 187983, 125232 187989, 125046 187954, 124319 188217, 124172 188249, 123799 188403, 123191 188545, 122659 188433, 122515 188019, 122036 188128, 122010 188061, 121893 188090, 121273 188658, 120681 188647, 120591 188686, 120202 188673, 119386 189106, 119197 189105, 118694 188941, 118217 188999, 117947 188984, 117787 188880, 117415 188894, 117326 188640, 116978 188535, 116720 188881, 116146 188816, 115659 188790, 115316 188849, 115115 188814, 114841 188859, 114549 188716, 114318 188681, 113926 188980, 113663 189037, 113174 188806, 112848 188951, 112625 188869, 112408 188732, 112264 188540, 111811 188889, 111320 189022, 111273 188986, 110288 189061, 110284 188991, 110260 189070, 109551 188846, 109049 188980, 108640 188974, 108430 188691, 107946 188679, 107893 188720, 107583 188843, 107452 188771, 107165 188936, 107014 189113, 106883 188957, 106466 188722, 106368 188805, 105651 188889, 105467 188874, 105212 188496, 104989 188829, 104648 189280, 104468 189317, 104302 189076, 103783 189258, 103576 189061, 103219 188955, 103130 188874, 103022 188846, 102608 188878, 102452 188511, 102188 188320, 101536 188115, 101292 188072, 100895 187871, 100634 187581, 100378 187567, 100184 187625, 100054 187619, 99810 187211, 99622 186978, 99352 186435, 99474 186970, 98976 186866, 99246 186448, 98877 186841, 98779 186929, 98463 187246, 98340 187520, 98100 187531, 97578 187368, 97479 187190, 97111 187228, 96622 187076, 96303 187022, 96543 186674, 96574 186252, 96539 186118, 96472 186073, 96240 186145, 96118 186355, 96019 187054, 95406 187175, 95332 186929, 95091 186592, 94431 186396, 94381 186220, 94321 186290, 94052 186257, 93875 186092, 93617 186186, 93177 186327, 92867 186206, 92265 185941, 92063 185774, 91739 185648, 91668 185510, 91466 185466, 90835 185433, 90668 185418, 90214 185200, 89836 184850, 89305 184917, 88906 184822, 88620 184755, 88218 184931, 88017 184559, 87814 184521, 87528 184624, 87291 184414, 87281 184231, 87044 184147, 86634 183794, 86042 183787, 85370 183373, 84994 183501, 84870 183254, 84615 182998, 84453 183100, 83938 182960, 83767 182768, 83707 182853, 83595 182742, 83268 182690, 82900 182557, 82889 182316, 82552 182250, 82422 182112, 82229 181990, 82058 181770, 81544 181718, 81475 181756, 80811 181534, 80436 181226, 80192 181144, 79988 180804, 79669 180721, 79099 180678, 78662 180562, 78308 180327, 78037 180115, 77694 179903, 77057 179859, 76353 179194, 76145 179125, 75725 178963, 75296 178823, 75096 178834, 74550 178516, 74405 178428, 73830 178172, 73573 178089, 73215 177772, 73089 177834, 72911 177578, 72696 177431, 72487 177635, 72248 177417, 72071 177177, 71724 177042, 71931 176679, 71421 176457, 71175 176330, 70737 176489, 70358 176260, 70052 176000, 69957 175975, 69673 175751, 69328 175604, 69027 175264, 68913 175183, 68882 174858, 68630 174645, 68501 174662, 68004 174368, 67967 174215, 67848 174183, 67708 173677, 67419 173452, 66827 173479, 66362 173435, 66217 172902, 65976 172879, 65875 172779, 65545 172764, 65458 172420, 65277 172332, 64915 172052, 64514 171562, 64379 171512, 64221 171307, 64295 171235, 64007 170960, 63776 171020, 63492 170892, 63360 170714, 63202 170413, 62846 170087, 62792 169982, 62569 169903, 62262 169682, 62007 169455, 61892 169164, 61415 168711, 61391 168704, 61052 168045, 60535 168019, 60458 167575, 60029 167470, 60387 167884, 59910 167465, 59717 167207, 59897 167213, 59888 166355, 59737 166309, 59416 166807, 58936 166324, 58829 166134, 58537 165945, 58260 165690, 58166 165542, 57814 165157, 57651 165125, 57323 164827, 57063 164383, 56815 164177, 56033 163328, 56033 163308, 55805 162954, 55550 162650, 55478 162617, 55098 161883, 55025 161705, 54691 161069, 54667 161070, 54295 160827, 54314 160663, 54140 160458, 54105 160318, 53816 160145, 53673 160120, 53549 160002, 53250 159987, 53058 159820, 52796 159217, 52578 159016, 52051 158366, 51945 157941, 51491 157893, 51481 157264, 51547 157067, 50993 156640, 50897 156523, 50822 156514, 50678 156381, 50120 156083, 50132 155857, 49620 154604, 49553 154466, 49447 154132, 49495 154063, 48877 153388, 48464 153234, 48390 153214, 48013 152959, 47914 152954, 47873 152839, 47930 152636, 47651 151872, 47593 151788, 47334 151063, 47400 150617, 47313 150498, 47269 150247, 47205 150000, 47079 149740, 46915 149467, 46728 149347, 46560 149105, 46286 149016, 46242 148833, 46111 148657, 45656 147810, 45293 147362, 45064 147054, 45081 146960, 45078 146541, 45023 146135, 44682 145641, 44688 145623, 44196 145047, 44168 144858, 44047 144430, 44086 144074, 43656 143884, 43558 143636, 43347 143176, 43173 142989, 43202 142738, 43055 142161, 42945 141942, 42487 141628, 42523 141709, 42427 141586, 42537 140936, 42595 140893, 42654 140495, 42195 140398, 42495 139960, 42435 139677, 42412 139482, 42164 138738, 42178 138106, 42083 137957, 41310 137657, 41212 137195, 40908 136836, 40967 136612, 41277 136342, 41395 135834, 41209 135653, 41021 135227, 41094 135010, 40748 134868, 40485 134684, 40366 134160, 40315 133744, 40242 133597, 40194 133159, 40206 133104, 40129 133033, 40182 132935, 40126 132448, 39988 131820, 39968 131658, 39831 131278, 39662 131096, 39730 130361, 39797 130087, 39577 129956, 39250 129922, 39151 129623, 38921 129407, 39010 129096, 39151 128825, 39123 128765, 39525 128567, 39722 128458, 39522 128489, 39279 128068, 39776 127617, 39596 127256, 39369 126710, 39445 126423, 39197 126589, 38969 126239, 38321 125691, 38252 125560, 38057 124561, 38136 124300, 38320 123983, 38134 123313, 38081 123272, 38137 123117, 38255 122832, 38003 122514, 38108 121990, 37857 121397, 37526 120959, 37564 120545, 37692 119896, 37687 119880, 37981 119064, 37979 118852, 38052 118649, 38043 118079, 37971 117878, 37991 117562, 37933 117024, 37909 116725, 37703 116493, 37546 116229, 37681 115530, 37553 115252, 37416 114824, 37741 114424, 37731 114236, 37620 114011, 37314 113827, 37232 113558, 37156 113467, 37197 112524, 36714 112275, 36765 112260, 37199 112522, 37434 111924, 36982 111672, 36811 111408, 37047 111519, 37652 111009, 37698 110754, 37633 110510, 37810 110166, 37691 110040, 37635 109647, 37827 109402, 37613 108785, 37494 108375, 37545 107977, 37669 107602, 37871 107177, 37894 106603, 37823 105857, 38017 105404, 37894 105340, 38162 104604, 38113 104095, 38271 103874, 38117 103621, 37858 103450, 37735 103424, 37866 103205, 38524 103016, 38662 102874, 38741 102203, 38784 102091, 38727 101504, 38704 101369, 38803 100877, 38737 100521, 38915 100277, 38849 99926, 38734 99814, 38525 99757, 38195 99820, 38108 99545, 38142 99423, 37957 99275, 37891 99006, 38014 98504, 38014 98425, 38115 97758, 38218 97604, 38573 97310, 38860 97366, 39051 97061, 38876 96999, 39059 96833, 39100 96737, 39309 96684, 39729 96430, 39835 96234, 39855 95980, 39732 95860, 39978 95385, 40129 94890, 40315 93894, 40220 93607, 40131 93376, 40169 93108, 40366 93070, 40592 92702, 40403 92576, 40428 92384, 40768 91947, 41072 91952, 41055 91927, 40691 91858, 40560 91533, 40478 91298, 40351 91155, 40272 90924, 40489 90939, 40568 90784, 40175 90539, 40305 90041, 40405 89697, 40622 89766, 40473 89621, 40780 88998, 40843 88521, 41126 87815, 41368 87125, 41497 86796, 41925 86280, 41868 86089, 41735 85825, 42063 85620, 42132 85488, 42001 85117, 42157 84853, 42035 84651, 42204 84525, 42205 84394, 42394 84376, 42727 83803, 42657 83830, 43116 82939, 43625 82298, 43735 82041, 43951 81850, 43957 81790, 43814 81520, 43851 81321, 43993 81119, 43945 80553, 43900 80413, 44074 80266, 44419 80144, 44701 80133, 44865 79952, 44740 79681, 44623 79481, 44533 78853, 44903 78650, 45046 78443, 44974 77952, 45184 77517, 45370 77328, 45458 77033, 45553 76760, 45903 76617, 46100 76211, 46046 76094, 46135 75959, 46249 75396, 46288 75370, 46621 74796, 47337 74438, 47549 73641, 47592 73555, 47873 72566, 48398 72257, 48741 71821, 48799 71681, 49048 71491, 49380 71071, 49529 70585, 49771 70188, 50109 69547, 50754 69133, 50798 69120, 51024 68836, 51040 68763, 51306 68494, 50857 68257, 51157 68033, 51273 67296, 51449 67289, 51754 67093, 52127 66821, 52371 66627, 52547 66287, 52955 65976, 53197 65775, 53782 65213, 53950 64896, 54457 65074, 54569 64399, 54759 64217, 54866 64265, 55177 63880, 55664 63137, 56433 62571, 56534 62376, 56667 62389, 56615 62177, 56850 61938, 56778 61643, 57351 61872, 57514 61895, 57725 61745, 57586 61543, 57458 61653, 56835 61034, 56818 60848, 57227 60577, 57256 60550, 57959 60058, 58367 59344, 59107 59224, 59881 58508, 60268 58113, 60501 58132, 60719 57851, 60464 57385, 61205 56999, 61431 56958, 61756 56550, 62127 56520, 62346 56324, 62512 56280, 62620 56136, 62957 56111, 62943 55400, 63507 55262, 63545 55045, 63841 54926, 64174 54912, 64335 54736, 64538 54671, 64947 54426, 65238 54145, 65389 53681, 65552 53589, 65579 53391, 65619 52861, 65716 52791, 65886 52814, 66111 52906, 66390 52450, 66599 52453, 66717 52292, 66686 52000, 67380 51777, 67581 51765, 67698 51580, 67728 51111, 68378 50868, 68507 50615, 68622 50472, 68778 50431, 69002 50296, 69368 50131, 69717 50310, 70557 49559, 70557 49501, 70703 49432, 71371 49265, 71550 49446, 71830 49416, 71856 49248, 71522 48579, 71982 48683, 72097 48645, 72470 48265, 72538 48115, 73022 47911, 73245 47912, 73743 47477, 73837 47531, 74060 47567, 74809 46974, 74861 46819, 75390 46330, 75560 46302, 76216 45971, 76283 45840, 76444 45764, 76747 45701, 76981 46042, 77229 45509, 77531 45281, 77687 45264, 77933 45324, 78000 45216, 78447 45195, 78721 45006, 79118 44864, 79393 44583, 79692 44422, 79924 44054, 79903 43889, 80044 43792, 80128 43817, 80790 43615, 80994 43378, 81598 43354, 81682 43371, 81796 43238, 81829 42961, 82425 42727, 82876 42817, 83007 42888, 83140 42878, 83594 43121, 83763 42776, 84179 42469, 84233 41956, 84386 41952, 85356 41740, 86073 41291, 86415 41110, 86603 41081, 86995 40896, 87195 40760, 88002 40318, 88192 40247, 88504 40510, 88634 40373, 89100 40204, 89722 40123, 90321 39868, 90368 39894, 90957 39587, 91213 39716, 91545 39924, 91766 39880, 92014 39912, 92160 39607, 92284 39521, 92681 39603, 92962 39412, 93222 39258, 93614 39582, 93829 39426, 93913 38860, 94544 38839, 94873 38815, 95006 38580, 95443 38320, 95586 38204, 96271 38276, 96494 38209, 96897 37935, 97525 37702, 97730 37813, 98155 37995, 98383 37914, 98791 38027, 99458 37487, 99856 37658, 99945 37634, 100053 37514, 100503 37386, 100669 37401, 100758 37171, 100936 37042, 101504 36970, 101602 36879, 102117 36754, 102472 36634, 102663 36637, 103129 36495, 103271 36500, 104005 36221, 104537 36294, 104735 36234, 105411 36217, 105919 36015, 106293 36171, 106357 36183, 106451 36275, 106647 36188, 107021 36181, 107376 36356, 107570 36237, 107928 36135, 108681 36328, 108716 36304, 109060 36536, 109325 36315, 109315 36045, 109621 36074, 110324 36059, 110738 36124, 111039 36133, 111489 36048, 111699 36254, 112037 36004, 112610 36230, 112657 36180, 112724 36204, 113493 36040, 113816 35901, 113881 36301, 114059 36269, 114010 35834), (113315 187423, 113330 187976, 113220 188559, 113485 188242, 113648 188366, 114254 188161, 114196 187775, 114015 187492, 113989 187563, 113715 187691, 113520 187838, 113336 187415), (111090 188167, 111327 188385, 111560 188048, 111351 187770), (110220 38303, 109262 38515, 108939 38424, 108324 38367, 108180 38404, 107605 38809, 107326 38827, 107028 38934, 106420 39462, 105838 39689, 105563 39738, 105022 39794, 104529 39627, 104039 39176, 103183 39027, 102929 39428, 102287 39511, 101171 39591, 100292 39851, 99810 39944, 98870 40145, 97878 40233, 97325 40449, 97049 40407, 96658 40382, 96324 40626, 95844 40823, 95393 40803, 95278 40844, 94978 40854, 94321 40962, 93601 41414, 93505 41421, 93297 41537, 92745 41723, 92016 41756, 91371 41986, 91197 42070, 90398 42283, 89737 42394, 89377 42665, 88770 42883, 88366 42898, 87850 43099, 86845 43616, 85989 43809, 85258 44225, 84555 44393, 83531 44659, 83045 44950, 82710 45068, 82377 45139, 81806 45276, 81222 45506, 81338 46066, 81274 46132, 80974 45821, 80698 46388, 80489 46354, 79854 46878, 78940 47245, 78484 47252, 78037 47244, 77903 47193, 77092 47714, 76202 48377, 75019 49231, 74401 49523, 74298 49590, 74207 49589, 73366 50215, 72368 50640, 72127 50867, 71124 51699, 70466 52009, 70328 52019, 70156 52167, 69291 52794, 68108 53517, 67749 53561, 67179 53745, 66945 54057, 66736 54528, 66608 54968, 66042 55318, 65783 55555, 65412 55684, 64875 56211, 64548 56620, 63981 56960, 63905 57640, 63489 57749, 63224 57898, 62400 58206, 62077 58558, 61733 58973, 61463 59338, 61085 59815, 60815 60187, 60516 60332, 60025 60800, 59401 61180, 59278 61290, 58861 61557, 58858 61825, 58886 62647, 58819 62812, 58640 63051, 58139 63706, 58052 63736, 57937 63918, 57745 64075, 57063 64850, 56407 64908, 55683 65792, 55407 66472, 55213 66762, 55062 66964, 53955 68080, 53929 68120, 53490 68461, 52870 69041, 52644 69229, 52374 69467, 52270 69516, 51802 70355, 51776 70442, 51407 71119, 51270 71350, 50722 72343, 50650 72469, 49965 73436, 49659 73815, 49468 74263, 49120 74845, 48929 75360, 48775 75645, 48627 76011, 48123 76496, 48237 76766, 47962 76835, 47548 77953, 47275 78160, 46888 78851, 46671 79281, 46679 79551, 46632 80052, 46430 80502, 45678 81373, 45558 81443, 45501 81682, 45397 81990, 45196 82670, 45416 82990, 44913 83582, 44869 83583, 44240 84686, 44008 85265, 43900 85455, 44032 85532, 44085 86246, 43773 86631, 43669 86706, 43644 86813, 43279 87236, 43264 87330, 43414 87773, 43333 88084, 42999 88374, 42877 88750, 42620 89331, 42284 90404, 42222 90474, 41734 91181, 41591 91486, 41980 92492, 41977 92524, 42097 93108, 42039 93370, 41898 94264, 41853 94733, 41769 94823, 41610 95231, 41560 95560, 41441 95975, 41351 96392, 41057 96924, 40901 97129, 40135 97700, 39990 98237, 40042 98680, 39802 99203, 39947 99743, 40073 99930, 40252 100270, 40349 100745, 40175 102128, 40160 102350, 39732 103273, 39815 103780, 39863 104149, 39836 104224, 39814 104482, 39641 105522, 39557 105896, 39862 105985, 39904 106320, 39772 106478, 39470 106685, 39298 106848, 39216 107000, 39173 107250, 39039 108188, 39231 108930, 39243 109972, 39090 110595, 38989 110824, 38861 111046, 39176 111334, 38813 111612, 38840 111864, 38942 113436, 38841 114185, 38673 114737, 38674 114864, 39002 115713, 39033 116469, 39573 117303, 39652 117527, 39266 118213, 39266 119205, 39302 120034, 39278 120171, 39221 120244, 39010 120729, 39150 121474, 39169 121538, 39199 121870, 39305 122513, 39542 123057, 39630 123571, 39645 123990, 39753 124427, 39596 124939, 40111 125327, 40283 125359, 40569 125528, 40766 125808, 40981 126176, 41019 126750, 41157 127641, 41153 128112, 40614 128785, 40457 128933, 40467 129128, 40649 129315, 40741 129455, 40870 129554, 41345 130327, 41321 130387, 41379 130590, 41404 131026, 41490 131412, 41970 132227, 42105 132759, 42133 133155, 41896 133643, 42016 134336, 42081 134501, 42282 135189, 42335 135269, 42379 135506, 42777 136515, 43176 136683, 43616 137662, 43751 138002, 43809 138087, 44005 138697, 44119 139023, 44368 139795, 44445 140160, 44691 140661, 44475 141292, 44413 141421, 44522 141675, 44931 142243, 45045 142788, 45375 143300, 45788 143905, 45941 144113, 45961 144276, 46360 144960, 46579 145604, 46633 145683, 47287 146999, 47515 147502, 47647 147831, 48043 148334, 48454 148689, 48773 149386, 48903 149627, 49483 150442, 49812 151624, 49815 151961, 49889 152125, 49841 152473, 50140 152837, 50415 153086, 50584 153299, 51613 154227, 51629 154299, 52490 154759, 52655 154965, 53233 155791, 53626 156536, 53798 156815, 54248 157436, 54391 158124, 54977 158304, 54919 158899, 55383 159303, 56087 159866, 56601 160621, 56633 160718, 57136 161320, 57331 161673, 58228 162575, 58457 162833, 58731 163160, 59005 163580, 59672 164178, 59873 164371, 60054 164404, 60439 164750, 60573 165084, 61028 165594, 61737 166223, 61774 166287, 61813 166287, 63154 167515, 63748 168100, 64479 168735, 64519 168796, 65322 169571, 65979 170371, 66323 170670, 66523 170828, 67112 170643, 68088 171300, 68391 171561, 68884 172061, 71094 173718, 71274 173814, 71528 174007, 72164 174415, 72500 174614, 72694 174673, 73521 175084, 73670 175317, 74073 175859, 74476 176081, 75707 176645, 76222 176920, 76541 177065, 76794 177202, 77398 177664, 77618 177817, 78983 178382, 79225 178500, 79764 178639, 80732 179282, 80990 179407, 81130 179459, 81860 179929, 82048 179981, 83382 180542, 83679 180685, 84445 180994, 84725 181106, 85568 181425, 86013 181633, 86557 181806, 86774 181976, 87199 182273, 88396 182521, 89059 182911, 89995 183169, 90265 183178, 90303 183218, 90775 183375, 90965 183481, 91259 183499, 92114 183875, 92705 183957, 93035 184116, 93774 184411, 93811 184500, 94382 184511, 95025 184545, 95116 184520, 95372 184245, 95599 184298, 95724 184570, 95918 184736, 96642 185408, 97335 185423, 97528 185581, 97924 185590, 98435 185782, 98869 185626, 99285 185625, 99738 185722, 100322 185751, 100660 185759, 100679 185889, 101517 186369, 101678 186357, 102556 186722, 102962 186818, 104083 187308, 104965 186797, 105317 186765, 106017 186808, 106735 186719, 107297 186745, 107469 186642, 108288 186664, 108990 186880, 109910 186775, 109929 186727, 110622 186296, 111052 186269, 111354 186319, 111615 186475, 112159 186937, 112742 186822, 112805 186844, 112836 186781, 113778 186813, 114049 186694, 114201 186943, 115713 186809, 115975 186814, 117052 186878, 117502 186687, 117974 186619, 118389 186781, 118858 186670, 119298 186545, 119517 186580, 119778 186716, 120313 186663, 120807 186666, 121071 186343, 121339 186161, 121986 186004, 122519 186323, 123378 186211, 123895 185988, 124640 185916, 124830 185789, 125276 185687, 125877 185652, 125977 185680, 126672 185617, 126893 185624, 127612 185399, 127782 185327, 128384 185199, 128779 185167, 129347 184977, 129607 184971, 129740 184977, 130912 184795, 131594 184793, 131706 184763, 131812 184785, 132313 184666, 132776 184390, 133371 184218, 134347 184044, 134699 183911, 135171 183802, 135887 183735, 136467 183534, 136711 183388, 137521 182983, 137696 182968, 138189 182809, 138911 182599, 139218 182547, 140114 181730, 140145 181674, 140193 181670, 140208 181623, 141014 181046, 141479 180664, 142537 180360, 143625 179814, 143633 179792, 144431 179464, 144534 179498, 145511 179297, 145657 179170, 146290 179250, 146382 179304, 146557 179178, 147836 178821, 148038 178689, 148927 177474, 148980 177378, 149241 177156, 149673 176696, 149991 176476, 150756 175852, 151159 175708, 151875 175549, 152034 175409, 152210 174820, 152766 174447, 152959 174401, 153340 174138, 153832 173824, 154252 173567, 154813 173302, 155277 172938, 155601 172746, 156026 172346, 156779 171839, 157015 171682, 157715 171130, 157778 171089, 158362 170590, 158376 170504, 159170 169927, 159377 169900, 160116 169205, 160112 168999, 160425 168546, 161053 168101, 161395 168104, 161612 167818, 161871 167621, 162754 167241, 162812 167112, 163112 166834, 163305 166532, 163397 166550, 163531 166511, 163611 166336, 164053 165573, 164719 165183, 165058 164500, 165145 164451, 165365 164126, 166253 163296, 166265 163234, 166350 163185, 167121 162521, 167163 162284, 167682 161784, 167620 161097, 167649 160923, 167922 160470, 168205 160140, 168617 159694, 169220 159177, 169422 159089, 170140 158922, 170544 158208, 170711 158051, 170908 157762, 171095 157273, 171081 156937, 171280 156716, 171798 156240, 172120 155956, 172469 155573, 172536 155147, 172808 154598, 172841 154298, 172880 153697, 173039 153423, 173660 152440, 173819 152287, 174219 151703, 174389 151357, 174531 151194, 174966 150576, 175405 150204, 175599 150106, 175591 149660, 175645 149486, 176113 148724, 176567 148149, 176692 147681, 177111 147030, 177309 146754, 177329 146696, 177708 146049, 177894 145650, 178638 144396, 178731 144210, 179121 143276, 179257 143128, 179516 142688, 179547 142487, 179617 142146, 179889 141464, 180036 141240, 180098 141026, 180664 140174, 180720 139672, 180868 139507, 181116 139182, 181296 138669, 181350 138614, 181422 138372, 181731 137560, 181828 137257, 182023 136664, 182106 136384, 182289 135858, 182335 135800, 182439 134791, 182623 134299, 182710 134046, 182834 133720, 182991 133175, 183203 132289, 183365 132030, 183423 131406, 183590 130935, 183691 130790, 183849 129837, 183933 129482, 184141 128757, 184218 128092, 184538 127076, 184622 126260, 184648 125979, 184698 125815, 184853 124593, 184904 124116, 184919 123695, 185006 122986, 185303 121478, 185392 120917, 185470 120573, 185517 120153, 185711 119513, 185788 119220, 186008 118225, 186077 117997, 186124 117662, 186037 117447, 185792 117157, 185424 116495, 185359 116285, 185431 115211, 185477 115087, 185487 114528, 185649 114179, 185975 113639, 186056 113353, 186384 113259, 186516 113125, 186533 112726, 186448 111685, 186318 111123, 185988 111211, 185926 110444, 185712 110174, 185705 109880, 185653 109496, 185565 108383, 185553 108056, 185549 107916, 185395 107486, 185545 107358, 185403 106993, 185404 106559, 185303 106425, 185376 105896, 185583 105374, 185468 105193, 185253 105203, 185418 104260, 185540 103837, 185700 103337, 185710 102966, 185622 102684, 185493 101932, 185004 100942, 184661 99311, 184604 98922, 184482 98210, 184439 97858, 184351 97461, 184295 97025, 184386 96888, 184463 96395, 184241 95902, 184096 95687, 183869 94891, 183903 94711, 183795 94565, 183606 93806, 183439 93345, 183437 92770, 183403 92504, 183269 92083, 182927 91685, 182912 91244, 182603 90390, 182527 90091, 182363 89993, 182148 89499, 181881 89153, 181988 88821, 181938 88305, 181818 88007, 181625 87702, 181483 87225, 181404 86875, 180894 85370, 180776 84192, 180309 83929, 180160 83631, 180080 82935, 180020 82782, 179981 82767, 179946 82648, 179524 81966, 179248 81239, 179240 81201, 178654 80229, 178602 79764, 178347 79644, 178277 79425, 178421 78683, 178556 78387, 178447 78139, 178316 78073, 177837 77719, 177223 77227, 177064 76925, 176761 76503, 176503 76104, 176107 75583, 175954 75337, 175818 74910, 175516 74429, 175600 74041, 175595 73838, 175375 73124, 175227 72790, 175210 71941, 174903 71882, 174939 71448, 174312 71026, 173972 70720, 173535 70368, 173384 70299, 172805 69711, 172318 69002, 172270 68997, 172237 68823, 171997 68260, 171845 67995, 171364 67545, 171317 67459, 171007 66982, 170785 66661, 170164 65897, 169975 65719, 169713 65512, 169620 64939, 169075 64816, 168314 64347, 168104 64188, 167587 63690, 167040 63180, 166525 62591, 166066 62039, 165221 61251, 164956 60968, 164482 60502, 164182 60231, 164095 60134, 163704 59771, 163587 59375, 163443 58938, 163208 58711, 163108 58561, 162486 58315, 162092 58104, 161597 57767, 161290 57495, 161039 57154, 161015 57021, 160742 56357, 160478 56012, 159962 55790, 159667 55609, 159142 54839, 159063 54798, 159002 54649, 158673 54248, 158352 53701, 157495 53405, 156376 52966, 156262 52881, 156102 52220, 155837 51809, 155503 51536, 155043 51283, 154567 51136, 154057 50812, 153778 50741, 153123 50620, 152911 50395, 152824 50401, 152493 50074, 152175 49806, 151787 49744, 151256 49878, 150793 49682, 150625 49450, 150420 49453, 149949 49263, 149383 48954, 149232 48882, 148621 48392, 148294 48190, 147894 47796, 147738 47477, 147250 47165, 147020 47048, 145982 46591, 145509 45862, 144958 46188, 144599 46131, 144150 45982, 143714 45501, 143696 45378, 143612 45235, 143029 45204, 142924 45210, 142478 45007, 142080 45026, 141597 44631, 140373 44065, 140145 44164, 139342 44150, 139018 44041, 138822 43996, 138557 43794, 138165 43097, 137132 42805, 136979 42726, 135463 42239, 134834 42055, 134666 41855, 134426 41800, 134088 41838, 133365 41608, 132977 41506, 132117 41303, 131857 41204, 131327 41096, 130858 41015, 130072 40764, 129798 40616, 129547 40612, 129287 40560, 129130 40561, 128062 40237, 127120 40086, 126798 39994, 125179 39795, 123937 39506, 123924 39510, 122978 38988, 122586 39068, 122250 39195, 121980 39331, 121783 39449, 121140 39495, 120694 39364, 119340 39375, 119085 39189, 118614 38925, 118389 38790, 117942 38743, 117467 38795, 117174 38809, 115958 38779, 115053 38727, 114402 38704, 113949 38707, 113268 38649, 112334 38715, 111993 38731, 111598 38747, 111276 38693, 111009 38476, 110429 38293), (92370 185073, 92328 185313, 92308 185653, 92982 185807, 93171 185876, 93417 185422, 93455 185103, 92888 185108, 92518 184971), (145157 181180, 145303 181367, 145566 181168, 145392 180995, 145137 180940), (68249 174029, 68620 174447, 68841 174042, 68760 173837, 68559 173681, 68248 173622), (159439 171440, 159776 171830, 160160 171503, 159586 171359), (44622 83091, 44684 83134, 44788 83136, 44876 83061, 44931 82823, 44800 82744), (139758 42256, 139920 42316, 140180 41894))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_005.wkt b/tests/voronoi_crash_resources/slice_polygon_005.wkt new file mode 100644 index 0000000000..3e2b406488 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_005.wkt @@ -0,0 +1 @@ +MultiPolygon (((138539 75509, 137892 76451, 136650 78222, 136294 78718, 136295 78719, 136293 78719, 135795 79414, 136032 79459, 136450 79517, 137320 79621, 139845 79899, 139676 79805, 139395 79485, 139319 79300, 139321 78970, 139001 78937, 137350 78781, 136743 78735, 136295 78719, 136371 78675, 138860 77322, 139307 77102, 139672 76981, 140035 76939, 140691 76994, 141290 77068, 142237 77200, 143218 77353, 143883 77467, 144387 77565, 144797 77659, 145017 77759, 145146 77921, 145156 78093, 144997 78606, 144796 79150, 144677 79439, 144675 79439, 144303 79460, 143772 79428, 142973 79351, 141618 79210, 141620 78833, 141547 78649, 141268 78329, 140874 78109, 140430 78026, 139999 78112, 139808 78220, 139497 78525, 139321 78905, 139321 78970, 141618 79210, 141618 79228, 141446 79608, 141138 79914, 140954 80019, 142911 80210, 143379 80242, 143695 80251, 144077 80230, 144277 80132, 144414 80000, 144664 79471, 144677 79439, 144998 79373, 145297 79231, 145554 79071, 146451 78425, 147174 77920, 147657 77601, 148231 77248, 148531 77075, 149153 76747, 149473 76595, 149797 76454, 150124 76326, 150454 76211, 150784 76110, 151113 76022, 151442 75946, 151765 75882, 152399 75782, 152704 75745, 153289 75694, 153827 75666, 154525 75653, 155217 75664, 155614 75698, 155973 75800, 156236 75903, 156646 76098, 157277 76430, 160408 78141, 161785 78882, 162196 79094, 162530 79254, 162943 79426, 163343 79477, 163667 79452, 163921 79409, 166052 78969, 166862 78817, 167125 78841, 167319 78944, 167520 79165, 167746 79536, 168019 80092, 168360 80863, 171168 87641, 173031 92047, 173823 93875, 175444 97534, 175852 98437, 177471 101932, 178648 104385, 179763 106641, 180791 108653, 181695 110368, 182434 111719, 182830 112410, 183154 112943, 183414 113329, 183677 113651, 183875 113772, 184026 113801, 184278 113776, 185530 113543, 186065 113454, 186323 113558, 186559 113817, 186800 114172, 187217 114861, 187483 115328, 189399 118831, 191579 122766, 192864 125043, 194134 127269, 195406 129471, 198000 133917, 201493 139874, 202835 142192, 204205 144593, 205594 147078, 207009 149682, 208387 152299, 209775 155034, 211150 157844, 212510 160725, 213848 163667, 215161 166660, 216446 169694, 217698 172755, 218913 175825, 220090 178896, 221224 181947, 222343 185052, 223352 187927, 224342 190826, 225279 193640, 226163 196358, 226991 198964, 227766 201462, 228490 203853, 229217 206325, 229794 208341, 230382 210449, 230928 212474, 231438 214424, 231914 216307, 232359 218130, 232776 219898, 233169 221622, 233539 223305, 234231 226609, 234859 229790, 235238 231800, 231173 231800, 230740 229536, 230103 226364, 229762 224746, 229402 223095, 229021 221405, 228615 219670, 228180 217879, 227716 216028, 227216 214106, 226680 212108, 226103 210025, 225484 207850, 224818 205577, 224102 203199, 223335 200712, 222514 198112, 221637 195398, 220706 192582, 219722 189679, 218690 186709, 217610 183689, 216485 180633, 215319 177559, 214118 174487, 212882 171429, 211619 168407, 210285 165321, 209027 162509, 207706 159658, 206376 156885, 205042 154200, 203709 151605, 202382 149103, 201071 146693, 199786 144374, 198534 142142, 195042 135959, 192819 131983, 191734 130010, 190652 128018, 189568 125987, 188320 123613, 186172 119438, 185659 118474, 185283 117823, 185064 117492, 184832 117239, 184571 117136, 184077 117178, 182551 117364, 182250 117379, 182078 117338, 181846 117190, 181523 116813, 181366 116600, 180977 116030, 180469 115238, 179529 113709, 178347 111726, 177466 110208, 176054 107708, 175084 105935, 174115 104110, 173162 102255, 172241 100401, 171371 98566, 170560 96771, 170177 95897, 169456 94183, 169117 93349, 168452 91658, 167901 90200, 167376 88759, 166459 86126, 165765 84101, 165519 83427, 165322 82946, 165159 82629, 165019 82449, 164885 82375, 164722 82378, 164293 82561, 163510 82925, 162729 83269, 162410 83362, 162051 83317, 161645 83157, 161301 82999, 160869 82787, 159270 81960, 156750 80632, 155651 80065, 155154 79820, 154756 79648, 154297 79513, 153789 79491, 153520 79492, 153070 79520, 152726 79566, 152346 79642, 151925 79758, 151480 79915, 150994 80127, 150477 80395, 150211 80546, 149670 80875, 149129 81225, 148603 81581, 146757 82886, 146492 83048, 146247 83163, 145996 83236, 145711 83270, 145370 83273, 144946 83247, 144212 83178, 140935 82837, 139330 82683, 138057 82578, 137473 82548, 137027 82555, 136629 82665, 136325 82939, 135865 83494, 134570 85114, 134201 85524, 133916 85770, 133608 85766, 133368 85661, 132940 85380, 132235 84882, 131900 84632, 131648 84960, 130392 86556, 129931 87127, 127676 85889, 129151 84113, 130329 82653, 131507 81156, 132683 79626, 133858 78061, 135029 76466, 136321 74661))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_006.wkt b/tests/voronoi_crash_resources/slice_polygon_006.wkt new file mode 100644 index 0000000000..18b9bef171 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_006.wkt @@ -0,0 +1 @@ +MultiPolygon (((147845 114697, 79916 114698, 79356 114263, 78887 113180, 78804 112804, 78579 111059, 78578 108942, 78804 107197, 78886 106821, 79356 105737, 79916 105303, 147845 105302))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_007.wkt b/tests/voronoi_crash_resources/slice_polygon_007.wkt new file mode 100644 index 0000000000..f7169c20c1 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_007.wkt @@ -0,0 +1 @@ +MultiPolygon (((120264 173957, 120384 174108, 110615 174109, 110736 173957, 111261 172596, 119739 172595)), ((109264 173957, 109384 174108, 99615 174109, 99736 173957, 100261 172596, 108739 172595)), ((98264 173957, 98384 174108, 88616 174108, 88736 173957, 89261 172596, 97739 172595)), ((131264 173957, 131384 174108, 121616 174108, 121736 173957, 122261 172596, 130739 172595)), ((174108 131384, 173957 131264, 172596 130739, 172596 122260, 173957 121736, 174108 121616)), ((46043 121736, 47404 122261, 47405 130739, 46043 131264, 45892 131384, 45892 121616)), ((174109 120385, 173957 120264, 172596 119739, 172596 111260, 173957 110736, 174108 110616)), ((46043 110736, 47404 111261, 47405 119739, 46043 120264, 45892 120384, 45891 110615)), ((174109 109385, 173957 109264, 172596 108739, 172596 100260, 173957 99736, 174108 99616)), ((46043 99736, 47404 100261, 47405 108739, 46043 109264, 45892 109384, 45891 99615)), ((46043 88736, 47404 89261, 47405 97739, 46043 98264, 45892 98384, 45892 88616)), ((174108 98384, 173957 98264, 172596 97739, 172596 89260, 173957 88736, 174108 88616)), ((98264 46043, 97739 47404, 89260 47404, 88736 46043, 88616 45892, 98384 45892)), ((131264 46043, 130739 47404, 122260 47404, 121736 46043, 121616 45892, 131384 45892)), ((120264 46043, 119739 47404, 111260 47404, 110736 46043, 110616 45892, 120385 45891)), ((109264 46043, 108739 47404, 100260 47404, 99736 46043, 99616 45892, 109385 45891)), ((165002 41351, 165002 42361, 177640 42360, 177639 55002, 178648 55002, 178655 55358, 178649 55431, 178649 77573, 178655 77646, 178649 78002, 177639 78002, 177639 80000, 176630 80000, 176630 81000, 177639 81000, 177640 139000, 176630 139000, 176630 140000, 177639 140000, 177640 142002, 178648 142002, 178655 142358, 178649 142431, 178649 164573, 178655 164646, 178649 165002, 177639 165002, 177640 177640, 164998 177639, 164998 178648, 164642 178655, 164569 178649, 142427 178649, 142354 178655, 141998 178649, 141998 177639, 140000 177639, 140000 176630, 139000 176630, 139000 177639, 81000 177640, 81000 176630, 80000 176630, 80000 177639, 77998 177640, 77998 178648, 77642 178655, 77569 178649, 55427 178649, 55354 178655, 54998 178649, 54998 177639, 42360 177640, 42361 164998, 41352 164998, 41345 164642, 41351 164569, 41351 142427, 41345 142354, 41351 141998, 42361 141998, 42361 140000, 43369 140000, 43370 139000, 42361 139000, 42360 81000, 43370 81000, 43370 80000, 42361 80000, 42360 77998, 41352 77998, 41345 77642, 41351 77569, 41351 55427, 41345 55354, 41351 54998, 42361 54998, 42360 42360, 55002 42361, 55002 41352, 55358 41345, 55431 41351, 77573 41351, 77646 41345, 78002 41351, 78002 42361, 80000 42361, 80000 43370, 81000 43370, 81000 42361, 139000 42360, 139000 43370, 140000 43370, 140000 42361, 142002 42360, 142002 41352, 142358 41345, 142431 41351, 164573 41351, 164646 41345), (80000 45891, 87384 45892, 87264 46043, 86739 47404, 47405 47405, 47405 86739, 46043 87264, 45892 87384, 45891 80000, 44379 80000, 44378 140000, 45891 140000, 45892 132616, 46043 132736, 47404 133261, 47404 172596, 86739 172595, 87264 173957, 87384 174108, 80000 174109, 80000 175621, 140000 175622, 140000 174109, 132616 174108, 132736 173957, 133261 172596, 172596 172596, 172595 133261, 173957 132736, 174108 132616, 174109 140000, 175621 140000, 175622 80000, 174109 80000, 174108 87384, 173957 87264, 172596 86739, 172596 47404, 133261 47405, 132736 46043, 132616 45892, 140000 45891, 140000 44379, 80000 44378))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_008.wkt b/tests/voronoi_crash_resources/slice_polygon_008.wkt new file mode 100644 index 0000000000..4d388fded5 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_008.wkt @@ -0,0 +1 @@ +MultiPolygon (((237021 162714, 237023 162724, 237364 163247, 237431 163603, 237382 164159, 237382 164160, 237383 164635, 237314 164698, 236962 164552, 236735 163971, 236680 163321, 236790 162822, 237039 162566)), ((196948 149246, 197417 149496, 198057 150166, 198076 150169, 198558 149890, 198968 150153, 199172 150383, 199194 150384, 199662 149907, 199895 149944, 200470 150376, 200985 150928, 200987 150930, 201462 151312, 201466 151314, 202288 151627, 202289 151627, 203572 151984, 203805 152076, 203809 152077, 204846 152214, 205659 152291, 205661 152291, 206822 152310, 207841 152366, 208624 152336, 208628 152336, 208726 152312, 209896 152097, 210277 152709, 210278 152710, 210633 153195, 210636 153198, 210899 153407, 210916 153408, 211357 153135, 211364 153123, 211403 152572, 211403 152571, 211389 152056, 211382 151183, 211433 151052, 212562 151617, 213178 152054, 213827 152630, 214293 153079, 214736 153557, 215297 154263, 215510 154979, 215757 155893, 215789 156278, 215895 157177, 215896 157723, 215779 158199, 215560 158688, 215238 159253, 214794 159910, 214463 160346, 214277 160566, 213930 161008, 213836 161041, 213422 160222, 213072 159565, 213070 159562, 212609 159059, 212603 159055, 212246 158917, 212228 158924, 211954 159402, 211953 159405, 211877 159669, 211876 159675, 211967 160494, 211968 160497, 212007 160620, 212296 161784, 212112 161840, 211731 161766, 211727 161766, 211117 161811, 209745 161806, 208632 161841, 208630 161841, 207787 161950, 207014 161992, 207012 161992, 206326 162131, 205756 162256, 204724 162462, 204722 162463, 203983 162705, 203479 162812, 203043 162877, 202656 162052, 202352 161202, 202535 160466, 202524 160447, 201956 160309, 201646 160031, 201621 160039, 201352 161266, 200692 162042, 199940 162503, 199938 162505, 199857 162573, 199168 162915, 198804 162934, 198389 162563, 197570 160876, 196601 158763, 195650 156631, 194563 154098, 194252 153214, 194203 152893, 194633 152656, 194640 152637, 193702 150642, 193817 150110, 194604 149574, 194604 149575, 195371 149132, 196288 149104), (201024 151497, 201020 151508, 201024 152241, 201028 152252, 201258 152481, 201502 152941, 201661 153421, 201663 153425, 202291 154295, 202742 155032, 202750 155038, 202920 155093, 204057 155657, 204864 155999, 204866 156000, 205599 156282, 206025 156423, 207071 157070, 208172 158008, 207997 158538, 207996 158543, 208010 159375, 207491 159650, 207489 159651, 207258 159811, 204318 160425, 203138 160445, 203124 160456, 202933 161076, 202932 161076, 202756 161512, 202756 161523, 202970 162164, 202971 162166, 203123 162472, 203141 162479, 203458 162361, 204386 162016, 205140 161816, 205293 161765, 206864 161349, 208269 161152, 209044 161095, 209612 160996, 210708 160987, 210928 161007, 210929 161007, 211795 160999, 211810 160981, 211730 160589, 211691 160083, 211703 159543, 211776 159246, 212014 158768, 212217 158457, 212219 158450, 212262 157867, 212262 157866, 212259 157369, 212322 156706, 212322 156704, 212294 155987, 212294 155985, 212082 154837, 211969 154157, 211970 153786, 211970 153784, 211897 153265, 211892 153256, 211734 153103, 211722 153099, 211600 153118, 211588 153127, 211525 153261, 211232 153471, 210933 153510, 210640 153381, 210329 153092, 210115 152728, 210098 152721, 209103 152964, 209102 152965, 208961 153011, 208061 153092, 207430 153063, 206582 153036, 205387 152943, 204532 152843, 203722 152728, 203190 152483, 203189 152483, 202882 152381, 202374 152174, 201862 151983, 201282 151684, 201044 151496), (199660 150856, 199663 150872, 200418 151616, 200244 151805, 200248 151828, 200761 152078, 200783 152065, 200767 151288, 200764 151280, 200611 151055, 200602 151048, 199677 150846)), ((257842 77402, 257958 77503, 257967 77507, 258382 77521, 258387 77520, 258932 77373, 259287 77397, 259290 77397, 259820 77325, 260186 77380, 260188 77380, 261013 77379, 261568 77508, 261572 77508, 262215 77455, 262427 77735, 262432 77740, 262904 77968, 262908 77969, 263328 78050, 263331 78050, 264234 78057, 265790 78454, 266522 78661, 266526 78661, 267151 78648, 267315 79096, 267341 79100, 267496 78895, 268274 79013, 268342 79176, 268354 79185, 269843 79339, 270380 79431, 270578 79451, 271164 79760, 271544 80561, 271533 80742, 271406 80815, 271065 80822, 271050 80836, 271025 81139, 270919 81233, 269420 81075, 269187 80838, 269171 80835, 268729 80996, 268138 80990, 268125 80998, 267947 81312, 267800 81297, 267711 81174, 267687 81173, 267610 81265, 267425 81264, 267366 80922, 267351 80910, 266705 80927, 266699 80928, 266503 81009, 266495 81018, 266417 81224, 266352 81260, 265829 81196, 265733 81160, 265728 81159, 265208 81158, 265201 81160, 265033 81249, 265026 81267, 265033 81276, 265271 81391, 265274 81391, 265845 81543, 265848 81544, 266380 81574, 266383 81574, 267284 81469, 267286 81468, 267546 81390, 268286 81361, 268920 81413, 269967 81660, 270833 81895, 271992 82328, 272685 82657, 273357 83031, 273914 83384, 273991 83440, 274841 83961, 274843 83962, 275409 84219, 276776 84944, 277587 85461, 278565 86053, 279381 86732, 279503 86865, 279971 87341, 280263 87794, 280538 88759, 280583 89381, 280544 90450, 280448 91102, 280230 91999, 280231 91999, 279949 92852, 279505 94107, 279095 95144, 278683 96033, 278418 96531, 278130 97004, 277565 97887, 277056 98583, 276523 99253, 275661 100221, 275132 100795, 274606 101330, 274606 101350, 274622 101354, 276156 100750, 276660 100636, 276898 100808, 277283 101420, 277619 102202, 277590 102617, 277328 102892, 276938 103144, 276475 103475, 274584 104615, 271906 106100, 270857 106562, 269832 106996, 269832 106997, 268247 107477, 266102 108030, 265254 108145, 264964 108150, 264640 107940, 264350 107278, 264227 106761, 264227 105206, 264040 104063, 264039 104060, 263859 103590, 263834 103585, 262617 104879, 262622 104903, 263522 105294, 263509 105567, 263323 106198, 262984 107541, 262983 107545, 262977 107738, 262993 107753, 263852 107724, 263904 107801, 263595 108964, 263594 108971, 263653 109236, 263271 109310, 263262 109334, 263472 109613, 263941 110528, 263743 110652, 263737 110659, 263629 110892, 263628 110897, 263575 111643, 263127 112510, 263133 112530, 263994 113017, 265358 113816, 266382 114440, 266392 114442, 266602 114397, 267264 114810, 267077 114844, 267069 114849, 266914 115029, 265819 114390, 264961 113905, 263784 113255, 263764 113259, 263767 113280, 264281 113646, 264282 113647, 265669 114477, 267569 115661, 269348 116820, 270033 117288, 269733 117438, 268429 116616, 267675 116153, 267655 116156, 267658 116178, 268170 116583, 269569 117746, 270183 118283, 270793 118833, 271246 119260, 270712 119282, 270507 119105, 270487 119105, 270484 119124, 270676 119418, 270685 119425, 271123 119540, 271336 119840, 271216 120083, 271107 120150, 271101 120169, 271431 120889, 271441 120897, 272735 121256, 272754 121241, 272745 121085, 272742 121077, 272214 120365, 272042 119918, 271841 118913, 271884 117731, 272035 117337, 272539 116435, 273590 115566, 274932 115108, 276112 115147, 276653 115226, 277760 115739, 278265 116038, 279296 117242, 279532 117825, 279788 118758, 279787 118758, 279890 119359, 279782 120388, 279633 121087, 279056 122368, 278695 122789, 277877 123559, 277359 123844, 276226 124347, 276226 124348, 275463 124570, 275454 124591, 275589 124828, 275381 125158, 274941 125501, 274324 125735, 273633 125830, 273393 125620, 273464 125492, 273460 125473, 273441 125474, 272828 126069, 272826 126089, 272838 126095, 273233 126087, 273353 126213, 273382 126689, 273397 126703, 273715 126707, 273794 126758, 273840 127389, 273506 127420, 273492 127436, 273801 134782, 273788 135336, 273656 135448, 272172 135516, 272019 135362, 272005 135358, 271905 135381, 271893 135397, 271897 135478, 271647 135600, 271639 135610, 271544 136035, 271556 136053, 273992 136583, 274518 136687, 274522 136687, 274677 136672, 275429 136819, 275431 136819, 275654 136838, 275961 136972, 276217 137263, 276317 137577, 276298 137922, 275976 138560, 275767 138783, 275556 138853, 275382 138838, 275114 138662, 274747 138181, 274738 138175, 274204 138047, 274222 137808, 274210 137792, 273740 137690, 273723 137700, 273647 137895, 273611 137886, 273592 137898, 273587 137918, 273581 137888, 273569 137876, 273505 137863, 273488 137874, 273465 137949, 273407 137935, 273388 137842, 273372 137830, 273358 137842, 273341 137920, 273266 137903, 273332 137618, 273320 137600, 271376 137175, 271358 137186, 271295 137440, 271255 137430, 271234 137338, 271218 137326, 271205 137336, 271175 137413, 271148 137406, 271171 137333, 271163 137314, 271145 137319, 271105 137374, 271091 137306, 271075 137294, 271063 137301, 271017 137375, 270984 137368, 270990 137286, 270978 137270, 270926 137259, 270908 137271, 270891 137346, 270843 137334, 270874 137263, 270863 137242, 270816 137232, 270798 137244, 270785 137320, 270621 137283, 270616 137196, 270602 137182, 270587 137193, 270563 137269, 270468 137247, 270524 137003, 270512 136985, 268402 136528, 268385 136549, 268478 136780, 266292 136268, 266356 136099, 266345 136079, 264686 135718, 264725 135529, 264718 135513, 264479 135360, 264639 134364, 264639 134359, 264588 134110, 264477 133277, 264476 133274, 264286 132782, 264283 132777, 263888 132372, 263886 132370, 263406 132006, 262921 131664, 262919 131663, 262424 131398, 262420 131396, 261884 131298, 261882 131298, 261324 131275, 260766 131271, 260763 131271, 260250 131357, 260243 131360, 259824 131655, 259822 131656, 259065 132420, 259064 132422, 258702 132884, 258701 132886, 258336 133561, 257968 134336, 257595 135054, 257190 135549, 255458 134879, 255393 134775, 255613 133856, 255612 133856, 256047 132707, 256638 131248, 256629 131229, 255944 131006, 254925 130422, 254340 129926, 254320 129926, 254315 129940, 254439 130596, 254458 131503, 254468 131517, 255641 131908, 254606 135130, 254617 135150, 255114 135260, 255752 135389, 256317 135491, 257106 135613, 257107 135613, 258363 135763, 259014 135816, 259856 135860, 259858 135860, 260580 135873, 260483 136292, 260483 136297, 260515 136544, 260006 136577, 259977 136329, 259961 136316, 259259 136341, 258267 136338, 257395 136294, 256571 136222, 255643 136110, 254367 135906, 254351 135916, 254223 136317, 254235 136337, 254851 136429, 255508 136514, 256163 136585, 256164 136585, 256814 136636, 257451 136671, 258386 136701, 258292 137112, 258292 137117, 258324 137363, 257813 137396, 257784 137149, 257768 137136, 257059 137162, 256536 137167, 255826 137149, 255198 137119, 254008 137021, 253993 137031, 253751 137778, 253320 137635, 253301 137644, 252596 139852, 251905 139629, 251885 139643, 251867 140222, 251687 140644, 251696 140664, 252190 140840, 251715 142262, 250872 141969, 250852 141984, 250877 142317, 250827 142534, 250663 142797, 250438 142970, 250441 142996, 251044 143264, 250641 143949, 250320 144407, 249544 144075, 249523 144085, 249221 145241, 248970 146060, 248971 146060, 248788 146532, 248493 147127, 247903 147823, 247521 148089, 246927 148341, 246924 148343, 246547 148615, 246101 148946, 245394 149502, 245393 149503, 244967 149905, 244962 149912, 244886 150217, 244481 151229, 243827 152080, 243019 152639, 242821 152732, 242815 152737, 242373 153278, 242002 153753, 241784 154008, 241243 154684, 241240 154689, 241121 155162, 239651 156938, 239142 157600, 239142 157601, 238650 158316, 238369 158752, 238368 158753, 238087 159229, 238087 159230, 237594 160244, 237342 160569, 237007 160823, 236528 161022, 236117 161093, 235506 161004, 235235 160859, 234926 160462, 234897 160393, 234896 160391, 234582 159885, 234581 159884, 234226 159402, 233652 158634, 232668 157218, 232484 156828, 232494 156592, 232588 156433, 232590 156422, 232547 156214, 232543 156207, 232041 155656, 232040 155655, 231514 155156, 231513 155155, 230865 154677, 230864 154676, 230211 154262, 229717 153969, 228921 153483, 228437 153204, 228191 153048, 227663 152741, 227662 152741, 227414 152610, 226886 152299, 226396 151999, 225874 151652, 225657 151521, 225153 151183, 224561 150731, 223993 150335, 223992 150334, 223554 150085, 222520 149424, 221766 148770, 221063 148012, 220656 147468, 220485 147131, 220467 147124, 220457 147140, 220505 147525, 220197 147971, 220196 147973, 220038 148277, 219762 148407, 219354 148177, 219009 147560, 218833 146916, 219146 145879, 219144 145866, 218946 145606, 219049 145454, 219394 145250, 219473 145385, 219479 145390, 220025 145698, 220047 145685, 220062 144978, 220117 144435, 220217 143893, 220356 143342, 220573 142844, 221277 141863, 221808 141236, 222236 140760, 222599 140393, 223019 140006, 223834 139301, 224395 138801, 224829 138454, 225442 137996, 226115 137536, 226784 137144, 227526 136750, 228373 136347, 228377 136344, 228827 135949, 228828 135948, 229225 135496, 229648 134993, 230142 134435, 230781 133620, 230783 133618, 231266 132855, 231266 132854, 231608 132159, 232182 130834, 232183 130832, 232493 129959, 232494 129958, 232663 129289, 232663 129286, 232683 128854, 232683 128850, 232472 127815, 232609 126871, 232609 126870, 232658 126161, 232658 125317, 232562 124411, 232562 124410, 232404 123550, 232403 123549, 232203 122889, 232045 122410, 231833 121848, 231833 121846, 231455 121020, 230800 119678, 230349 118613, 230348 118611, 230112 118213, 230107 118209, 229607 117876, 229447 117599, 229304 117089, 229305 117089, 229075 115858, 229075 115857, 228932 115312, 228930 115309, 228710 114892, 228635 114606, 228602 113648, 228599 113153, 228580 112409, 228580 112408, 228510 111864, 228456 111170, 228456 110861, 228412 110102, 228389 108993, 228434 108114, 228509 107202, 228589 106509, 228764 105403, 229026 104184, 229361 102826, 229795 101280, 230323 99345, 230323 99343, 230369 98915, 230369 98913, 230343 97895, 230598 96765, 230871 95815, 230861 95798, 230654 95717, 229953 95094, 229389 94488, 228540 93647, 229631 92008, 230469 90882, 230470 90866, 230347 90671, 231863 89112, 233238 87892, 234139 87328, 234823 87021, 234832 87006, 234710 85788, 234627 84687, 235292 84236, 235772 83925, 235777 83906, 235457 83312, 235821 83212, 235827 83209, 235983 83060, 236221 83057, 236231 83053, 236477 82834, 236739 82765, 236998 82795, 237309 82946, 237324 82946, 237406 82898, 237413 82882, 237267 82263, 238357 81986, 238366 81979, 238431 81869, 238746 81668, 239506 81475, 239964 81404, 240104 81533, 240118 81537, 240347 81479, 242220 81003, 242231 80987, 242217 80823, 242390 80732, 242516 80748, 242639 80888, 242654 80893, 242976 80811, 242987 80794, 242951 80568, 243018 80425, 243287 80446, 243473 80547, 243515 80633, 243154 80734, 243143 80750, 243162 80763, 243588 80656, 244252 80483, 244263 80466, 244244 80453, 243653 80595, 243711 80502, 243922 80363, 244306 80466, 244314 80466, 245377 80178, 245381 80177, 245851 79888, 246208 79845, 246217 79968, 246236 79982, 246771 79846, 246923 80402, 246935 80413, 248151 80593, 248164 80588, 248784 79905, 249716 80346, 249735 80340, 249736 80328, 249586 79765, 249571 79372, 250057 78916, 250062 78909, 250322 77829, 250457 77712, 251621 77791, 252145 77831, 252158 77824, 252359 77527, 252687 77555, 252838 77890, 252850 77899, 253631 77987, 253642 77984, 253787 77874, 253793 77862, 253804 77445, 253852 77408, 254650 77620, 254658 77620, 255128 77475, 255128 77476, 255890 77327, 256350 77505, 256356 77506, 256883 77486, 256982 77547, 257001 77544, 257238 77292), (266087 134538, 266057 134841, 266069 134857, 268356 135357, 268374 135345, 268411 135178, 268400 135161, 266106 134525), (271611 128933, 271597 128951, 271709 129444, 271725 129456, 271739 129440, 271715 128943, 271699 128929), (263000 113432, 262998 113449, 263272 113964, 263644 114800, 263656 114809, 264395 114934, 265105 115120, 265105 115119, 265585 115282, 265603 115275, 265599 115256, 264103 114182, 263020 113430), (260831 106740, 260069 106917, 260059 106925, 259672 107618, 259412 108108, 259205 108523, 258948 109011, 258947 109012, 258807 109308, 258541 109815, 258552 109836, 258982 109927, 259937 110259, 259956 110250, 260711 108095, 261223 106603, 261216 106585, 261203 106584)), ((286459 73808, 286764 74016, 286735 74267, 286404 74410, 285970 74306, 285964 74306, 285140 74453, 285134 74456, 284412 74963, 284415 74989, 285580 75497, 285585 75498, 285993 75514, 286069 75641, 286083 75648, 286973 75591, 286985 75584, 287131 75363, 287790 74735, 288597 74968, 289915 75906, 289917 75907, 290364 76153, 290844 76457, 291153 76750, 291635 77389, 291658 77390, 291746 77285, 292909 77078, 293762 77003, 294227 77144, 294626 77532, 294968 78010, 294977 78016, 295049 78029, 295506 78298, 296031 78579, 296051 78575, 296054 78562, 296018 78414, 296009 78404, 295912 78363, 295935 78186, 296030 78132, 296589 78381, 297044 78739, 297047 78784, 296930 78845, 296324 78696, 296306 78706, 296312 78723, 296776 79036, 296968 79270, 296981 79430, 296988 79442, 297221 79577, 297574 80064, 297894 80707, 297912 80714, 298162 80619, 298257 80670, 298261 80778, 298085 81058, 297966 81119, 297958 81134, 298038 81929, 298047 81941, 298384 82093, 298547 82235, 299164 83129, 299205 83286, 299211 83294, 299390 83428, 299881 84171, 300031 84701, 299858 85309, 299857 85309, 299601 85882, 299332 86140, 299327 86150, 299320 86338, 299148 86892, 298934 86866, 298928 86867, 298469 87008, 298458 87021, 298406 87753, 298376 88416, 298346 88693, 298330 89465, 298330 89466, 298338 90346, 298351 90361, 298977 90434, 299471 90526, 299462 91164, 298991 91159, 298987 91159, 298460 91296, 298449 91313, 298461 91326, 298917 91415, 298869 91854, 298356 91835, 298340 91848, 298114 93363, 298028 93822, 297845 94961, 297360 96432, 296885 97482, 296265 98720, 295636 99846, 294647 101280, 294647 101292, 293839 102311, 293839 102329, 294122 102738, 293849 103011, 293220 102462, 293199 102463, 292566 103198, 291527 104236, 291161 104559, 290468 105215, 289903 105729, 289361 106177, 289356 106192, 289435 106542, 289437 106546, 289848 107276, 289659 107484, 289337 107685, 289013 107249, 289011 107247, 288859 107110, 288840 107109, 287374 108190, 286800 108549, 286798 108550, 286319 108945, 286316 108965, 286698 109587, 286144 109966, 285561 109220, 284908 108356, 284330 107568, 284312 107563, 281892 108641, 280803 109139, 280802 109140, 280075 109550, 278296 109960, 277595 110079, 276885 110188, 276605 110149, 276179 109336, 276162 109328, 274368 109766, 273734 109902, 272341 110222, 271745 110375, 271764 110356, 271765 110336, 271751 110330, 271188 110400, 270188 110587, 269349 110722, 268229 110826, 267865 110768, 267604 110210, 267397 109341, 267261 108626, 267278 108390, 267791 108258, 268446 108196, 268510 108313, 268587 109538, 268588 109543, 268643 109671, 268655 109680, 269034 109721, 269040 109721, 270270 109422, 270885 109260, 270890 109257, 271015 109171, 272399 108812, 273241 108616, 275594 108031, 275605 108013, 275541 107740, 276406 107448, 276667 107447, 276755 107723, 276773 107733, 277832 107464, 279379 107085, 280127 106935, 280303 107001, 280554 107786, 280574 107795, 282165 107050, 283077 106643, 283702 106339, 283708 106334, 283762 106266, 284414 105934, 284416 105933, 285209 105353, 285815 104860, 285817 104858, 285954 104709, 286367 104341, 286699 104891, 286718 104897, 287313 104648, 287850 105472, 287957 105734, 287569 106014, 286344 106635, 285104 107202, 285100 107225, 285739 107952, 285758 107954, 286974 107145, 286975 107145, 288157 106208, 288162 106191, 288050 105887, 288325 105648, 289181 104848, 290537 103534, 290538 103534, 290966 103099, 292104 101970, 292621 101439, 292978 101085, 293263 101202, 293281 101197, 293757 100551, 294580 99361, 294581 99360, 295152 98459, 295152 98458, 295876 97042, 296331 95998, 296332 95996, 296650 95115, 296651 95113, 297027 93529, 297362 91622, 297362 91621, 297461 90884, 297612 90312, 297898 90222, 297908 90208, 297930 89468, 297884 88200, 297884 88199, 297787 87188, 297766 87175, 297194 87446, 297192 87448, 297010 87573, 296442 87738, 295700 87995, 295196 88110, 294532 88064, 294004 88040, 293520 87988, 293514 87989, 292861 88212, 292851 88223, 292794 88549, 292795 88549, 292478 89634, 292252 90333, 291904 91006, 291448 91381, 289925 92279, 287276 93463, 286342 93864, 284448 94654, 283584 95002, 282468 95406, 282010 95582, 281522 95677, 281393 95585, 281259 95333, 281231 95146, 281402 94948, 282587 94393, 285754 93043, 287888 92104, 289175 91498, 289176 91497, 289772 91162, 290806 90556, 290810 90553, 291232 90064, 291235 90059, 291580 88969, 291581 88967, 291656 88536, 291638 88518, 290862 88674, 290861 88675, 290105 88885, 289831 88943, 289176 89154, 289175 89154, 288682 89343, 288087 89173, 288070 89179, 287919 89419, 287663 89646, 286663 89980, 286534 90029, 285717 90222, 285715 90223, 284884 90508, 284709 90529, 284704 90531, 284366 90704, 284685 88421, 284672 88404, 284475 88372, 284467 88373, 284082 88543, 283890 88535, 283922 88486, 283919 88467, 283866 88422, 283843 88425, 283790 88508, 283794 88528, 283820 88547, 283769 88588, 283446 88576, 283398 88482, 283378 88476, 283129 88613, 282928 88611, 282643 88465, 282249 87875, 282238 87868, 281824 87831, 281777 87729, 281756 87722, 281474 87859, 277731 82418, 277916 82125, 277918 82115, 277900 82002, 278116 81568, 278286 81533, 278296 81526, 278589 81074, 278587 81056, 277934 80287, 277912 80286, 277321 80879, 277320 80882, 277249 80988, 276812 81009, 276548 80700, 276529 80698, 275136 81642, 274722 81835, 274276 81459, 274262 81456, 273799 81583, 273646 81446, 273632 81443, 273352 81527, 273580 81414, 273586 81394, 273295 80879, 273357 80667, 274434 80210, 274443 80198, 274478 79984, 274474 79972, 274354 79847, 274336 79844, 273421 80361, 273191 79945, 273176 79937, 272786 79990, 272583 79651, 272570 79352, 272907 78998, 273532 78715, 274134 78547, 274395 78624, 274406 78623, 275576 78005, 276097 77819, 276630 78173, 277188 78580, 277193 78583, 277910 78745, 277922 78742, 278413 78369, 278419 78357, 278419 78281, 278587 78082, 278981 78127, 278994 78122, 279174 77937, 279630 77906, 279639 77902, 279884 77682, 279888 77667, 279833 77485, 279830 77479, 279539 77170, 279279 76434, 279275 76310, 279273 76303, 279089 75951, 279046 75532, 279171 75129, 279342 75049, 279446 75090, 279464 75085, 279609 74905, 279718 74868, 279972 74917, 279990 74902, 279988 74850, 280355 74868, 280362 74867, 280920 74633, 280925 74630, 281005 74550, 281130 74549, 281137 74547, 281624 74290, 282084 74029, 282453 73962, 282594 74035, 282604 74140, 282300 74719, 282298 74724, 282248 75137, 282249 75145, 282326 75340, 282332 75347, 282441 75416, 282451 75418, 282982 75357, 282990 75353, 283428 74984, 283913 74668, 284653 74219, 284951 74232, 284967 74221, 285004 74072, 285322 73808, 285644 73770, 286149 73722), (275250 79336, 275246 79359, 275672 79804, 275690 79807, 276154 79546, 276156 79545, 276442 79339, 276443 79315, 276009 78952, 275992 78951), (288854 77618, 288842 77631, 288823 77797, 288828 77810, 289352 78307, 290025 78989, 290032 78993, 290274 79035, 290285 79032, 290450 78921, 290613 78909, 290619 78907, 290975 78719, 290979 78696, 290613 78267, 290608 78263, 290404 78177, 289834 77818, 289831 77817, 289339 77626, 289169 77562, 289161 77561), (281705 76631, 281708 76643, 281762 76714, 281774 76720, 281898 76718, 281973 76782, 282076 77063, 282085 77072, 282175 77106, 282187 77105, 282425 76989, 282428 76965, 282060 76648, 282051 76644, 281721 76619), (283850 75271, 283612 75445, 283609 75448, 283424 75711, 283422 75715, 283305 76031, 283209 76128, 283209 76134, 283202 76134, 283018 76319, 283014 76329, 283009 76415, 283030 76430, 283274 76330, 283278 76305, 283188 76219, 283225 76153, 283491 76061, 283685 76074, 283694 76072, 283783 76014, 283790 75999, 283771 75838, 283870 75603, 283871 75597, 283874 75283, 283861 75268)), ((300300 81817, 300272 81877, 300278 81896, 300288 81898, 300381 81883, 300427 82079, 300307 82164, 300124 82129, 300117 82130, 299817 82221, 299011 82315, 298646 82253, 298640 82165, 298946 81906, 299181 81832, 299696 81807, 300217 81771)), ((271992 82164, 272231 81825, 272604 81637, 273119 81611)), ((298948 81163, 298950 81309, 298701 81584, 298410 81664, 298286 81586, 298306 81452, 298579 81186, 298847 81119)), ((298362 79448, 298127 79529, 298146 79404, 298294 79269, 298519 79182)), ((298711 78753, 298777 78925, 298669 78956, 298375 78716, 298351 78635, 298538 78630)), ((285930 68926, 286629 69186, 286962 69325, 286677 69880, 286177 70153, 286172 70157, 285851 70606, 285553 70821, 284837 71032, 284313 70956, 284309 70956, 283741 71037, 283739 71037, 283169 71178, 283005 71091, 283065 70956, 283563 70513, 283719 70445, 283724 70441, 284000 70122, 284589 69523, 285081 69273, 285087 69267, 285207 69052, 285405 68894, 285541 68860))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_009.wkt b/tests/voronoi_crash_resources/slice_polygon_009.wkt new file mode 100644 index 0000000000..540cf1afe6 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_009.wkt @@ -0,0 +1 @@ +MultiPolygon (((273309 86663, 273171 86933, 272905 87016, 272763 86930, 273101 86650))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_010.wkt b/tests/voronoi_crash_resources/slice_polygon_010.wkt new file mode 100644 index 0000000000..11bc7aa3a5 --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_010.wkt @@ -0,0 +1 @@ +MultiPolygon (((197366 140151, 198008 140453, 198569 140709, 198560 140980, 198069 141540, 197297 141998, 197293 142020, 197356 142101, 197077 142358, 196515 142882, 195989 143113, 195987 143115, 195824 143225, 195042 143362, 194506 143386, 194189 143347, 194128 142562, 194106 141067, 194164 140387, 194980 140604, 195506 140818, 195523 140814, 195793 140516, 195795 140514, 196148 139981, 196469 139830, 196646 139829)), ((219033 103218, 219096 103903, 219026 104447, 218908 105001, 218559 105813, 217997 106959, 217785 106926, 217499 106378, 217246 105649, 217113 104880, 217140 104295, 217248 103963, 217448 103630, 218094 103082, 218629 102730, 218898 102601)), ((267611 89140, 268331 89308, 268331 89307, 269200 89544, 270028 89755, 271121 90152, 272486 90752, 273592 91344, 273963 91608, 274630 92058, 275213 92492, 276368 93491, 276369 93492, 276619 93679, 277158 94275, 277594 94791, 277904 95279, 278265 95847, 278582 96515, 278851 97268, 278659 97374, 277149 96612, 275882 95922, 275863 95927, 275862 95942, 276710 97587, 277053 98280, 277427 99183, 278079 101107, 278102 101521, 277826 102000, 277824 102004, 277633 103124, 277531 104019, 277373 105171, 277168 105584, 276757 105878, 276466 105944, 275560 105747, 274539 105388, 274508 105033, 274427 104192, 274480 103041, 274503 102721, 274545 101657, 274544 101651, 274272 100917, 274272 100916, 273686 99678, 273685 99676, 273219 98884, 272754 98130, 272753 98129, 272288 97494, 272287 97493, 271942 97089, 271939 97086, 271419 96743, 271418 96743, 270010 95973, 269432 95641, 269430 95640, 269088 95527, 268327 95230, 267958 95129, 267258 94907, 266575 94599, 266167 93864, 265899 92905, 265885 92159, 266434 92162, 267233 92202, 267236 92202, 267584 92137, 267592 92132, 267997 91716, 268887 91910, 268887 91909, 269860 92196, 270886 92484, 270904 92476, 270899 92458, 268614 90725, 267717 89995, 267394 89763, 266981 89264, 267242 89068), (267996 93061, 267392 93305, 267383 93316, 267341 93494, 267342 93503, 267456 93743, 267463 93750, 267870 93968, 267872 93969, 268682 94250, 269341 94447, 270058 94733, 270806 95209, 270807 95209, 270863 95238, 272208 96101, 272674 96419, 273154 96928, 273512 97385, 273781 97818, 273782 97819, 273908 97975, 274581 99106, 275156 100507, 275327 101010, 275359 101766, 275330 103070, 275334 103829, 275334 103830, 275401 104289, 275403 104295, 275574 104555, 275585 104562, 276277 104652, 276290 104647, 276413 104512, 276417 104505, 276558 103768, 276558 103766, 276714 102058, 276781 101521, 276943 101178, 276944 101168, 276806 100625, 276795 100552, 276794 100549, 276447 99516, 276218 98951, 276218 98950, 275998 98456, 275997 98455, 275238 97024, 274776 96200, 274775 96198, 274518 95867, 274505 95861, 274351 95871, 273947 95631, 273188 95034, 272065 94171, 272062 94169, 271684 93991, 271680 93990, 270728 93845, 270223 93687, 269434 93411, 268443 93110, 268441 93109, 268004 93060)), ((222005 103731, 221827 103863, 221821 103878, 222023 104869, 222024 104872, 222090 105020, 221948 105800, 221462 105291, 221309 104905, 221068 103603, 221891 103002)), ((214242 101132, 214836 101282, 215604 101756, 215880 102142, 215976 102674, 215931 103054, 215659 103678, 215310 104046, 214972 104224, 214616 104243, 214348 104086, 213829 103406, 213553 102978, 213315 102419, 213246 101605, 213395 101174, 213704 101021)), ((207278 77855, 207575 77977, 208152 78658, 208320 78893, 208321 78894, 208847 79459, 209194 79867, 209195 79868, 209862 80482, 210438 81071, 210867 81618, 211147 82107, 211399 82643, 211400 82643, 211599 83300, 211598 83300, 211718 83986, 211719 83987, 211854 84482, 211854 84484, 212169 85149, 212823 86416, 213029 87018, 213243 87799, 213513 88637, 213573 89037, 213574 89040, 213748 89542, 213749 89544, 213819 89687, 213837 89694, 213847 89682, 213947 89075, 214072 88475, 214232 87779, 214393 86929, 214540 86295, 214648 85775, 214648 85774, 214696 85191, 214696 85188, 214638 84631, 214636 84553, 214636 84550, 214547 84045, 214590 83624, 214588 83614, 214257 83089, 214119 82154, 214117 82149, 213881 81687, 213878 81683, 213178 81083, 212603 80476, 212154 79967, 212153 79916, 213186 80201, 213846 80428, 213846 80429, 214836 80843, 215249 81281, 215610 81707, 216098 82237, 216465 82891, 216466 82893, 216868 83473, 217123 84101, 217074 84674, 216345 86101, 216343 86106, 216266 86565, 216267 86572, 216406 86949, 216410 86955, 216506 87042, 216514 87046, 216670 87069, 216677 87068, 217005 86942, 217010 86939, 217990 86017, 218128 86945, 217847 87997, 217530 88673, 217307 89047, 217305 89052, 217253 89315, 217253 89321, 217318 89635, 217322 89642, 217464 89788, 217475 89793, 218201 89811, 218538 90110, 218647 90428, 218458 91271, 217823 91770, 217819 91775, 217742 91916, 217740 91921, 217687 92375, 217706 92391, 218002 92301, 218294 92370, 218494 92520, 218660 93027, 218474 93724, 217885 94315, 217881 94324, 217841 94574, 217841 94579, 217934 94980, 217949 94992, 218388 94999, 218673 95138, 218783 95404, 218800 95988, 218615 96450, 218013 97221, 218010 97232, 218123 97993, 218082 98223, 218099 98241, 218557 98164, 218768 98294, 219009 98829, 219007 99003, 218835 99466, 218252 100114, 218249 100118, 217987 100667, 217986 100673, 217971 101245, 217973 101252, 218066 101438, 218073 101445, 218591 101693, 218642 101788, 218598 102059, 218399 102472, 217872 102913, 217383 103263, 217083 102442, 217082 102440, 216736 101745, 216352 100847, 215893 99673, 215617 98903, 215493 98483, 215134 97409, 213814 93619, 213808 93610, 212980 93126, 212411 92829, 212344 92721, 212336 92715, 212097 92629, 212091 92628, 211828 92644, 211352 92513, 211144 92391, 210965 92089, 210962 92085, 210377 91598, 209828 91148, 209454 90805, 208907 90182, 208524 89602, 208233 88954, 208232 88954, 208059 88399, 208060 88399, 207941 87742, 207839 86799, 207787 85892, 207791 85119, 207749 84148, 207748 84143, 207504 83423, 207108 82450, 206924 81967, 206923 81965, 206849 81816, 206667 81318, 206611 81185, 206433 80562, 206286 79494, 206286 79493, 206242 79287, 206169 78608, 206267 78257, 206422 78061, 206647 77910, 206980 77841)), ((243324 100236, 243405 100140, 243830 99829, 243917 99794)), ((210150 92740, 210649 93747, 210650 93748, 210922 94235, 211689 95496, 211690 95497, 212092 96094, 212092 96095, 212587 96713, 212588 96715, 213114 97240, 213121 97243, 213553 97367, 214072 97675, 214576 98021, 215079 98502, 215580 99252, 215710 99653, 215710 99654, 215964 100219, 214797 99763, 213453 99261, 212294 98871, 211924 98684, 211522 98374, 210894 97650, 210696 97319, 210216 96529, 209805 95636, 209456 94626, 209457 94626, 209092 93161, 209009 92306, 209077 91919, 209256 91700, 209625 91475)), ((280038 94708, 279604 94474, 280021 94402))) \ No newline at end of file diff --git a/tests/voronoi_crash_resources/slice_polygon_011.wkt b/tests/voronoi_crash_resources/slice_polygon_011.wkt new file mode 100644 index 0000000000..922ed70a5d --- /dev/null +++ b/tests/voronoi_crash_resources/slice_polygon_011.wkt @@ -0,0 +1 @@ +MultiPolygon (((99345 45800, 99640 46892, 99895 48430, 99533 48811, 99754 50319, 99482 50643, 99467 50724, 99719 50808, 99843 50755, 99865 50639, 99705 49954, 99827 49570, 100002 49260, 99911 48847, 99897 48429, 100280 48073, 100663 47826, 101099 47951, 101445 48274, 101834 48333, 102216 47947, 102603 47911, 102995 48278, 103387 48397, 103796 48170, 104154 47911, 104588 47964, 104933 48205, 105322 48264, 105706 48005, 106093 47968, 106484 48242, 106878 48388, 107643 47912, 108031 47909, 108422 48169, 108811 48307, 109581 47879, 109973 48193, 110364 48430, 110770 48202, 111132 47899, 111520 47915, 112300 48366, 112685 48089, 113071 47880, 113855 48400, 114256 48236, 114621 47912, 115009 47904, 115790 48310, 116202 48153, 116560 47912, 116983 48089, 117341 48362, 117739 48302, 118111 47966, 118542 47991, 118880 47387, 119256 46484, 119637 46480, 119663 46673, 120031 46476, 120222 47192, 126622 47203, 127010 47210, 129336 47204, 130302 47216, 130502 47358, 130647 47521, 130909 48432, 130323 49080, 130401 49194, 104681 49194, 104681 66303, 104485 66253, 104426 67081, 104497 67968, 104434 68318, 104504 68792, 104426 68928, 104406 69065, 104448 69444, 104445 69999, 104681 70128, 104681 72342, 104459 72248, 104438 72651, 104526 73040, 104323 73868, 104359 73974, 104618 74190, 104681 74196, 104681 87981, 104494 88321, 104285 89144, 103946 89111, 103678 89708, 103449 90150, 103398 90172, 103313 90560, 103010 90493, 102825 91098, 102781 91116, 102720 91849, 102350 91412, 102210 91621, 101960 92117, 101741 92951, 101396 92965, 101336 93064, 100914 93907, 100806 94311, 101018 94313, 100884 94504, 100741 94527, 100768 94381, 100388 94450, 100156 95315, 100225 95351, 100144 95357, 100147 95327, 99763 95409, 99643 95846, 99421 96297, 99195 96743, 98881 96739, 98816 96833, 98559 97699, 98166 97777, 97947 98256, 97708 98709, 97606 99122, 97204 99188, 97085 99634, 96893 100072, 96952 100132, 96789 100511, 96838 100788, 96609 100706, 96614 100559, 96302 100615, 96042 101411, 96254 101435, 96114 101720, 95839 102043, 95736 102071, 95784 101950, 95452 101927, 95167 102507, 95081 102881, 95444 103057, 94988 103170, 94921 103335, 94572 103370, 94198 104191, 94316 104291, 94256 104523, 94052 104859, 93943 104904, 93975 104772, 93633 104807, 93590 104840, 93469 105293, 93027 106147, 92786 106056, 92652 106298, 92543 106685, 92681 106678, 92624 106847, 92458 106942, 92389 107142, 92204 107196, 92125 107475, 91996 107289, 91596 108138, 91452 108563, 91123 108541, 91052 108627, 90813 109456, 90910 109489, 90746 109656, 90775 109525, 90399 109599, 90056 110462, 90314 110606, 89936 110770, 89853 110933, 89548 110901, 89469 111015, 89186 111896, 89172 111903, 89150 112679, 88728 112186, 88562 112458, 88357 113023, 88624 113454, 88095 113737, 87817 113561, 87526 114287, 87313 114739, 87236 115250, 86938 114880, 86750 115280, 86644 115685, 86237 115789, 85860 116688, 85772 116981, 86087 117014, 85876 117336, 85621 117407, 85563 117529, 85260 117468, 85171 117606, 84920 118267, 85317 118388, 85105 118977, 84717 118772, 84627 118925, 84352 118849, 84236 119070, 84133 119451, 84337 119432, 84111 119945, 84060 120251, 83449 120266, 83327 120483, 83037 121329, 82708 121331, 82639 121395, 82325 122266, 82434 122279, 82307 122622, 82241 122330, 81905 122408, 81704 122866, 81600 123264, 81953 123186, 81745 123519, 81460 123639, 81430 123715, 81100 123704, 81036 123786, 80887 124239, 80486 125072, 80212 125075, 80068 125253, 79996 125626, 80230 125365, 80485 125216, 80879 125062, 81135 125121, 81609 124906, 81593 125429, 81437 125368, 81233 125554, 81115 125740, 81191 125983, 81567 126136, 81545 126011, 81891 125207, 82592 124977, 82816 125275, 82611 125719, 82799 126055, 82483 126916, 82664 127255, 82480 127692, 82685 128025, 82519 128457, 82711 128793, 82518 129233, 82736 129562, 82580 129991, 82763 130329, 82583 130766, 82787 131098, 82628 131528, 82813 131866, 82453 132739, 82675 133067, 82479 133507, 82663 133845, 82517 134272, 82723 134604, 82554 135037, 82764 135369, 82758 135415, 83117 136047, 82803 136862, 82776 136915, 82461 137772, 82805 138458, 82472 139236, 82451 139480, 82728 140030, 82517 140763, 82185 140567, 82130 140968, 82152 141058, 82206 140971, 82566 140854, 82968 141507, 82253 141654, 82135 141566, 82085 141756, 82148 141913, 82260 141772, 82967 141522, 82616 142376, 82279 142410, 82156 142331, 82103 142526, 82159 142713, 82283 142546, 82616 142396, 83019 143044, 82309 143180, 82178 143087, 82145 143290, 82193 143468, 82612 143895, 82622 144054, 83001 144607, 82515 145824, 82340 145951, 82553 145900, 82751 146226, 82581 146652, 82425 146702, 82582 146665, 82783 146993, 82609 147422, 82273 147441, 82141 147370, 82095 147568, 82145 147763, 82276 147594, 82610 147431, 82807 147762, 82632 148186, 82297 148216, 82161 148124, 82128 148334, 82178 148514, 82433 148639, 82494 149400, 82862 150072, 82521 150880, 82448 150960, 82528 150991, 82864 151566, 82733 151657, 82476 152253, 82202 151921, 82100 152606, 82155 152767, 82274 152635, 82605 152477, 82983 153130, 82283 153254, 82160 153190, 82120 153376, 82165 153554, 82279 153393, 82986 153145, 82661 153997, 82315 154041, 82194 153951, 82159 154140, 82202 154317, 82441 154451, 82200 154708, 82155 154916, 82214 155096, 82498 155228, 82702 155543, 82696 155587, 83041 156225, 82713 156988, 82038 157237, 82010 157260, 81299 157423, 81227 157409, 80553 157625, 80509 157656, 79948 157437, 79934 157458, 78827 157759, 78600 157441, 78691 157223, 78718 156971, 78622 156661, 78841 156505, 78811 156297, 78597 155892, 78769 155515, 78778 155384, 78344 155517, 78344 155625, 78491 155922, 78283 156171, 78191 156391, 78187 156780, 77836 157609, 77309 157380, 76917 157506, 76183 157699, 76018 157374, 76028 157309, 76000 157372, 75286 157565, 74872 156913, 75041 156505, 74820 156190, 74756 156170, 74667 155807, 74793 155450, 74795 155307, 74477 154696, 74674 154325, 74777 154226, 74834 154033, 74793 153834, 74812 153633, 74664 153481, 74476 153383, 74507 153524, 74469 153671, 74511 153911, 74436 154101, 74472 154309, 74373 154724, 74405 155012, 74589 155441, 74515 155688, 74563 155835, 74326 156288, 74238 156699, 74555 156755, 74766 156943, 75236 157573, 74520 157770, 74284 157454, 73165 157755, 72939 157443, 72971 157348, 72919 157439, 72554 157539, 72507 157460, 72513 157534, 71808 157737, 71687 157389, 70900 157607, 70751 157241, 70693 157205, 70018 157408, 69984 157456, 69369 157235, 69251 157677, 68886 157760, 68644 157457, 67888 157662, 67638 157345, 67275 157426, 67241 157393, 67256 157445, 66147 157742, 66036 157396, 65608 157514, 65751 157863, 65619 158286, 65886 158601, 65651 159053, 65796 159402, 65556 160266, 65831 160943, 65529 161792, 65597 161798, 65843 162102, 65737 162505, 65858 162873, 65692 163221, 65876 163256, 65720 163421, 65885 163640, 65774 164075, 65910 164410, 65658 164866, 65544 165258, 65473 165304, 65561 165285, 65819 165598, 65578 166046, 65531 166063, 65577 166056, 65703 166405, 65593 166815, 65559 166832, 65847 167140, 65606 167593, 65738 167946, 65614 168367, 65876 168683, 65637 169136, 65772 169487, 65557 170316, 65533 170292, 65781 171067, 65583 171871, 65818 172575, 65625 173403, 65880 173721, 65780 174121, 65898 174492, 65656 174945, 65903 175266, 65820 175675, 65558 176151, 65668 176493, 65546 176914, 65843 177220, 65592 177680, 65716 178031, 65617 178436, 65570 178457, 65620 178454, 65882 178761, 65632 179194, 65533 179243, 65626 179237, 65745 179574, 65649 179978, 65615 179996, 65653 179994, 65925 180299, 65659 180761, 65776 181115, 65577 181932, 65808 182657, 65603 183467, 65545 183504, 65605 183508, 65838 184200, 65643 185019, 65614 185035, 65915 185341, 65827 185752, 65563 186201, 65486 186353, 65632 186582, 65501 186891, 65545 186992, 66202 187201, 65560 187763, 65701 188114, 65576 188534, 66234 188743, 65566 189323, 65614 189322, 65730 189656, 65620 190069, 66264 190285, 65640 190846, 65758 191199, 65666 191602, 65608 191627, 65530 191968, 65565 192027, 65534 192103, 65621 192400, 65685 192385, 65787 192742, 65597 193579, 65819 194284, 66195 194191, 66470 194493, 67598 194194, 67871 194496, 68990 194193, 69102 194547, 70601 194139, 70717 194491, 71479 194286, 71490 194293, 72225 194092, 72736 193165, 72767 193153, 72621 192486, 73196 192721, 73327 192226, 73576 191776, 73682 191740, 73842 191370, 74184 191229, 74218 191123, 74147 190836, 74194 190661, 74369 190553, 74419 190378, 74790 190279, 75282 189363, 75397 188951, 75761 188857, 75873 188403, 76160 187895, 76325 187333, 76389 187509, 76729 187442, 76911 186779, 76572 186683, 76823 186204, 77093 186336, 77080 186545, 77348 186477, 77812 185569, 77935 185151, 78187 185078, 78087 184767, 78356 184872, 78431 184624, 78661 184180, 78730 184154, 78821 183852, 78590 183804, 78689 183468, 78936 183555, 79069 183375, 79373 183238, 79520 182788, 79650 182739, 79645 182111, 80076 182291, 80335 181780, 80465 181356, 80622 181310, 80708 181083, 80909 181009, 81231 179999, 81607 179878, 81695 179369, 81893 178777, 82087 178846, 82185 178562, 82544 178484, 82695 178028, 82910 177587, 83278 177484, 83494 177034, 83785 176194, 84063 176102, 83996 175759, 84215 175940, 84568 175193, 84711 174763, 84994 174530, 85148 174474, 85437 173794, 85802 173699, 86008 173243, 86315 172396, 86681 172288, 87080 171399, 87230 170971, 87600 170873, 87762 170437, 88141 169559, 88510 169460, 88809 168650, 88644 168644, 88738 168425, 88866 168506, 89018 168160, 89386 168058, 89504 167778, 89434 167652, 89734 167183, 90107 167094, 90305 166561, 90238 166135, 90861 165988, 91458 164535, 91312 164423, 91392 164176, 91601 164140, 91696 164319, 91882 164273, 91989 164003, 91899 163875, 91888 163551, 92118 163678, 92232 163401, 92607 163297, 93132 161992, 93502 161888, 94024 160582, 94396 160480, 94749 159613, 95101 159513, 95655 158201, 95921 158121, 95957 157983, 96052 158024, 96359 157230, 96729 157128, 97204 156024, 96890 155669, 97362 155556, 97431 155387, 97801 155285, 98183 154406, 98552 154303, 99041 153014, 99407 152906, 99569 152474, 99955 151598, 100324 151489, 100642 150633, 101006 150534, 101391 149663, 101355 149653, 101531 149174, 101630 149192, 101928 149112, 102082 148679, 102482 147800, 102850 147701, 103158 146838, 103528 146736, 103645 146479, 103526 146201, 103886 145859, 104011 145391, 104094 145381, 104235 144994, 104605 144886, 105015 144003, 105131 143658, 105068 143597, 105135 143534, 105066 143210, 105331 142639, 105595 143065, 105437 143330, 105195 143562, 105533 143476, 105682 143043, 106054 142941, 106418 142161, 106377 142075, 106509 141472, 106681 141424, 106788 141575, 106990 141522, 107138 141092, 107556 140207, 107703 139785, 108067 139684, 108363 138833, 108624 138746, 108604 138547, 108801 138492, 108870 138291, 109320 137398, 109669 137308, 109947 136450, 110315 136349, 110754 135449, 110890 135030, 111240 134928, 111397 134497, 111616 134054, 111811 133996, 111889 133726, 112140 133638, 112331 133108, 112303 133062, 112349 133049, 112476 132653, 112848 132550, 113294 131655, 113426 131231, 113800 131128, 113932 130701, 114382 129802, 114512 129385, 114877 129295, 115015 128858, 115241 128410, 115371 128374, 117026 129315, 120530 130977, 124387 132501, 128548 133870, 132944 135062, 137562 136077, 142293 136898, 147340 137558, 147017 138014, 146860 138296, 146399 138935, 146209 139365, 145835 139873, 145634 140056, 145550 140254, 145315 140588, 145226 140647, 144845 141272, 144597 141521, 144407 141978, 144121 142347, 143672 143068, 143386 143392, 142990 144083, 142651 144537, 142428 144986, 142059 145352, 141994 145492, 141721 145955, 141311 146521, 141075 146907, 140678 147411, 140490 147843, 140135 148328, 139911 148545, 139761 148914, 139515 149171, 139144 149762, 139048 150044, 138790 150353, 138623 150624, 138349 150927, 138250 151170, 137886 151689, 137650 152136, 137393 152379, 137061 153047, 136777 153304, 136609 153660, 136240 153932, 135775 154562, 135501 154829, 135137 155319, 134997 155429, 134778 155726, 134378 156427, 133836 157068, 133657 157533, 133391 157773, 133165 158121, 132928 158563, 132646 158891, 132330 159383, 132022 159869, 131754 160196, 131521 160639, 131028 161226, 130851 161583, 130351 162280, 130135 162698, 129687 163327, 129175 164078, 128902 164587, 128519 165061, 128177 165672, 127820 166088, 127596 166517, 127367 166811, 127179 167163, 126719 167757, 126403 168372, 126040 168766, 125987 168874, 125644 169463, 125337 169779, 125055 170292, 124682 170931, 124187 171560, 123859 172171, 123488 172539, 123205 173126, 122847 173669, 122552 174080, 122246 174551, 121896 175064, 121654 175352, 121245 176061, 120966 176353, 120722 176718, 120526 177123, 120106 177823, 119830 178086, 119298 178849, 119016 179313, 118723 179871, 118439 180145, 118189 180487, 118083 180732, 117733 181289, 117481 181536, 116854 182505, 116636 182878, 116374 183188, 116151 183588, 115853 184057, 115711 184252, 115588 184517, 115290 184957, 115012 185295, 114915 185477, 114580 186012, 114182 186802, 113908 187085, 113509 187800, 113229 188112, 112787 188840, 112515 189119, 112184 189714, 111859 190184, 111625 190643, 111163 191217, 111025 191583, 110743 191957, 110373 192537, 110032 192950, 109726 193489, 109365 194016, 109084 194440, 108694 194935, 108850 195238, 109218 195146, 109428 195465, 110149 195306, 110529 195194, 110745 195487, 111481 195312, 111862 195193, 112074 195501, 112807 195337, 113201 195189, 113405 195509, 114112 195371, 114466 195233, 114667 194866, 115018 194821, 115639 195010, 116361 194787, 116547 195136, 116970 195062, 117650 194877, 117704 194835, 118410 194642, 118461 194642, 119127 194520, 119481 194861, 119751 194647, 119954 194228, 120650 194038, 121050 194650, 121085 194674, 121408 195328, 121356 195424, 121124 196188, 121233 196325, 121164 196169, 121505 195364, 121527 195295, 121884 194489, 122577 194279, 122642 194299, 123322 194086, 123666 194814, 123722 194710, 124078 194613, 124114 194635, 124461 194491, 125020 194725, 124593 195229, 124697 195603, 125075 195480, 125074 194722, 126165 194440, 126390 194752, 126496 195248, 126693 195429, 126677 195618, 126805 195495, 126762 195021, 126465 194763, 127116 194599, 127324 194481, 127405 194254, 127602 194199, 127675 193999, 127793 193964, 127896 193673, 128166 193552, 128403 193026, 128769 192930, 128981 192479, 129276 191623, 129643 191528, 130063 190633, 130212 190210, 130575 190114, 130869 189248, 131238 189147, 131351 188809, 131289 188741, 131301 188545, 131434 188605, 131809 187835, 132160 187793, 132459 186874, 132549 186846, 132580 186231, 132970 186475, 133266 185874, 133396 185452, 133768 185352, 133867 185042, 133812 184949, 133850 184801, 133952 184827, 134345 184038, 134387 184017, 134280 183270, 134309 183134, 134013 182568, 134468 182109, 134446 182062, 134579 181638, 134425 181292, 134650 180843, 134175 180218, 134633 179297, 134144 178656, 134570 177791, 134571 177729, 134357 177434, 134478 177065, 134457 177019, 134594 176541, 134362 176270, 134577 175877, 134414 175480, 134678 174633, 134543 174282, 134551 174219, 134074 174023, 134527 173562, 134631 173107, 134505 172693, 134035 172483, 134493 172027, 134596 171555, 134449 171206, 134679 170760, 134187 170128, 134672 169197, 134172 168569, 134640 167665, 134141 167027, 134569 166177, 134564 166102, 134351 165806, 134468 165449, 134444 165394, 134563 164934, 134351 164644, 134538 164196, 134867 163332, 135646 163086, 135707 163109, 135778 163310, 135718 163493, 135858 163702, 136156 163548, 136383 163651, 136396 163308, 137035 163054, 137190 163091, 137266 163266, 137467 163402, 137643 163798, 137828 164079, 137672 164909, 138121 164879, 138130 164514, 137984 164423, 138085 164266, 138162 163987, 138262 163918, 138350 163548, 138117 163475, 137942 163271, 138390 162955, 138609 162989, 138712 162949, 138722 163058, 138859 163281, 139115 163228, 139527 163223, 139950 163026, 140269 163023, 140264 163053, 140277 163022, 140733 163024, 141114 162848, 141589 162660, 141565 162512, 141693 162413, 142172 161725, 142240 161686, 142238 161626, 142276 161616, 142650 161074, 142786 160969, 143119 160373, 143659 159725, 143688 159715, 143999 158920, 144034 158888, 144644 157689, 144747 157285, 145292 156911, 145368 156880, 145451 156620, 145683 156111, 145758 155884, 145973 155762, 146056 155650, 146134 155212, 146344 154766, 146736 154271, 147174 153872, 147391 153316, 147528 152892, 147758 152580, 148061 152317, 148156 151944, 148203 151882, 148503 151759, 148952 151037, 149189 150370, 149415 150048, 149616 149930, 149685 149587, 149864 149120, 150203 149018, 150570 148569, 150653 148508, 150751 148258, 151041 147664, 151147 147523, 151239 147222, 151382 146938, 151520 146900, 151598 146737, 152092 146340, 152213 145792, 152277 145711, 152425 145305, 152677 145122, 152803 144856, 153029 144581, 153303 144453, 153504 143888, 153888 143618, 154069 143597, 154054 143275, 154158 142934, 154405 142478, 154714 142006, 154837 141897, 154994 141479, 155364 141452, 155548 141002, 155749 140685, 155985 140036, 156219 139845, 156321 139627, 156471 139499, 156725 139380, 156869 139089, 156956 138794, 157276 138354, 157269 138228, 158822 138256, 158803 138559, 158509 138773, 158437 139047, 158278 139309, 158133 139373, 158081 139532, 157956 139640, 157922 139800, 157784 139854, 157812 139993, 157672 140101, 157645 140263, 157504 140316, 157522 140461, 157373 140582, 157247 140835, 157171 140869, 157155 140949, 156957 141143, 156869 141414, 156786 141517, 156502 141945, 156178 142559, 156007 142646, 155956 142828, 155832 142965, 155698 143287, 155364 143645, 155286 143787, 154975 144260, 154836 144414, 154642 144822, 154469 145036, 154411 145190, 154227 145357, 153949 145786, 153632 146289, 153443 146448, 153380 146635, 153269 146771, 153126 147093, 152870 147551, 152540 148028, 152295 148235, 152229 148502, 152150 148593, 152019 148893, 151724 149156, 151545 149427, 151238 149657, 151139 149963, 151216 150269, 151188 150725, 151286 151087, 151798 151949, 151977 152406, 152177 152684, 151938 152577, 151804 152789, 151386 152843, 151134 153113, 150919 153512, 150751 153719, 150559 153866, 150334 154215, 150073 154721, 149949 154834, 149909 154952, 149504 155451, 149250 155908, 149015 156359, 148745 156557, 148636 156891, 148230 157457, 148004 157667, 147776 157703, 147659 157507, 147610 157133, 147496 156922, 147217 156646, 146882 156598, 146558 156703, 146394 157151, 146174 157335, 146098 157547, 145961 157677, 145503 158443, 145191 158768, 145094 158985, 144976 159057, 144861 159437, 144746 159618, 144550 159779, 144466 159933, 144261 160123, 144004 160497, 143866 160852, 143789 160851, 143846 160878, 143580 161088, 143494 161362, 143202 161830, 143146 161894, 142880 162327, 142645 162568, 142502 162797, 142739 162854, 142774 163111, 142876 163400, 142749 163505, 142888 163588, 143012 163821, 143247 164091, 143247 164253, 143372 164280, 143349 164116, 143604 163786, 143672 163640, 143547 163286, 144051 163134, 144338 163366, 144653 163371, 144674 163450, 144958 163448, 144923 163849, 145284 163879, 145409 163551, 145462 163220, 145589 163461, 145909 163323, 145973 163342, 146541 163241, 146366 163676, 146705 163960, 147074 163864, 147176 163455, 147527 163256, 147600 163276, 147971 163180, 148189 163177, 148142 163577, 148177 163661, 148667 163821, 148655 163942, 148315 164708, 148425 164786, 148359 164681, 148889 163898, 148954 163354, 149282 163201, 149602 163177, 149640 163396, 149971 163469, 150107 163789, 150241 163916, 150565 164014, 150688 163655, 150611 163457, 150601 163290, 151114 163083, 151224 163121, 151312 163338, 151600 163388, 151825 163343, 151825 163551, 151744 163753, 151915 164093, 151905 164382, 152242 164377, 152234 164006, 152326 163941, 152501 163545, 152761 163246, 152947 163246, 153209 163339, 153973 163107, 154022 163129, 154087 163303, 153625 163307, 153670 163762, 154075 163890, 154055 164003, 154145 163930, 154331 163431, 154495 163238, 154620 163271, 155363 163094, 155512 163108, 155453 163267, 155206 163579, 155380 163919, 155474 164280, 155476 164669, 155431 164754, 155497 165049, 155388 165476, 155862 165664, 155779 164972, 155822 164669, 155801 164385, 155483 164277, 155819 164081, 156041 163483, 156057 163346, 156270 163138, 156810 162905, 157036 162950, 157345 162774, 157308 162616, 156948 161938, 156933 161798, 156734 161570, 156689 161234, 156542 160893, 156609 160765, 156534 160873, 156403 160578, 156205 160042, 156378 159924, 156484 160128, 156525 160366, 156799 160404, 157141 161038, 157137 161111, 157440 161467, 157756 162105, 158218 162805, 158271 162806, 158743 162985, 158919 163222, 159178 163134, 159330 162836, 159400 162509, 159484 162406, 159393 162364, 159315 162064, 159452 161640, 159317 161288, 159376 160977, 159489 160854, 159372 160796, 159306 160516, 159391 160106, 159280 159748, 159358 159461, 159488 159305, 159352 159223, 159275 158941, 159602 157723, 159342 157017, 159577 156179, 159298 155498, 159503 154623, 159426 154422, 159284 153932, 159493 153101, 159403 152872, 159272 152385, 159491 151551, 159368 151196, 159421 150983, 159624 150739, 159415 150599, 159360 150422, 159443 150013, 159344 149652, 159395 149440, 159598 149195, 159387 149066, 159329 148881, 159405 148473, 159316 148109, 159368 147889, 159631 147890, 159542 147661, 159357 147547, 159285 147342, 159390 146926, 159495 146399, 159583 146099, 159421 145638, 159510 145515, 159782 145529, 159710 145288, 159507 145155, 159459 144969, 159562 144553, 159398 144096, 159489 143988, 159782 143999, 159700 143741, 159482 143611, 159413 143431, 159499 143020, 159370 142551, 159464 142448, 159762 142458, 159678 142196, 159457 142064, 159387 141887, 159467 141479, 159344 141007, 159439 140901, 159718 140905, 159639 140656, 159431 140525, 159360 140344, 159439 139936, 159406 139820, 159506 139707, 159797 139727, 159713 139472, 159761 139399, 159631 138962, 159700 138701, 159487 138579, 159357 138406, 159183 138262, 161310 138300, 165974 138218, 170748 137963, 175585 137525, 180428 136898, 181209 136764, 181213 137008, 181154 137385, 181138 137864, 181203 138621, 181160 138921, 181173 139792, 181227 140165, 181128 140875, 181127 141502, 181372 141424, 181550 141273, 181579 140839, 181439 140495, 181455 140273, 181386 139854, 181458 139715, 181195 139399, 181407 138953, 181439 138728, 181314 138274, 181332 138198, 181264 137913, 181214 137843, 181386 137408, 181415 137012, 181279 136751, 185219 136077, 186357 135831, 186193 136213, 186214 136472, 186370 137063, 186263 137234, 186097 137658, 186215 138023, 186369 138599, 186248 138789, 186139 139229, 186210 139575, 185932 139933, 185942 140917, 186255 141114, 185947 141479, 185977 142434, 186325 142645, 185876 142945, 185797 143177, 185968 143518, 186406 143598, 186679 143711, 186878 143719, 187223 143562, 187209 143252, 187255 143165, 187167 142862, 186746 142528, 186854 142168, 187134 141800, 187160 141685, 187129 141502, 186830 140955, 186793 140767, 186845 140625, 187119 140249, 187144 140136, 187111 139985, 186797 139413, 186799 138944, 186750 138651, 186761 138172, 186863 137846, 186800 137412, 186710 137112, 186717 136607, 186848 136299, 186660 135765, 189894 135066, 194392 133870, 198657 132499, 201412 131440, 201451 131614, 201484 131541, 201469 131417, 202618 130977, 205127 129826, 205173 130479, 205126 131289, 205178 131708, 205158 131280, 205206 130492, 205157 129812, 206243 129315, 209488 127541, 212324 125679, 214742 123750, 216717 121794, 217547 120809, 218272 119823, 218893 118840, 219414 117863, 219414 83293, 219920 83818, 220188 83799, 220136 83469, 220008 83405, 220138 83209, 220266 83335, 220548 83294, 220522 82885, 220601 82855, 220568 82536, 220674 82339, 220674 81843, 220766 81259, 220885 80785, 220977 80621, 220969 80532, 221533 80172, 221578 79395, 221753 78663, 222157 78320, 222262 78074, 222494 77800, 222527 77676, 222756 77313, 222839 77618, 222890 78396, 223018 79157, 223040 79544, 223166 79577, 222757 79792, 222589 79812, 222631 79973, 222756 79963, 224908 80278, 224891 81241, 224891 82016, 224702 82266, 224697 91951, 224889 92293, 224374 92482, 224375 92680, 224313 92870, 224313 93068, 224373 93258, 224374 93456, 224300 93645, 224274 94231, 224355 94421, 224374 95006, 224286 95196, 224259 95782, 224321 95971, 224322 96169, 224380 96359, 224381 96557, 224318 96746, 224318 96944, 224248 97134, 224281 97720, 224362 97909, 224331 98495, 224245 98685, 224269 99270, 224359 99460, 224341 100046, 224235 100235, 224246 100821, 224276 101011, 224305 101596, 224354 101786, 224350 102371, 224279 102561, 224264 103147, 224343 103337, 224387 103922, 224308 104112, 224290 104697, 224311 104887, 224330 105473, 224348 105662, 224346 106248, 224270 106438, 224259 107023, 224328 107213, 224329 107411, 224387 107600, 224388 107798, 224319 107988, 224278 108574, 224323 108764, 224336 109349, 224353 109539, 224362 110125, 224284 110314, 224294 110900, 224337 111089, 224302 111477, 224317 112063, 224384 112252, 224385 112450, 224328 112640, 224329 112838, 224263 113028, 224279 113613, 224363 113803, 224362 114389, 224267 114578, 224268 114776, 224360 114966, 224361 115164, 224305 115353, 224268 115939, 224347 116129, 224381 116714, 224317 116904, 224318 117102, 224257 117292, 224291 117877, 224374 118067, 224350 118653, 224255 118842, 224269 119428, 224356 119618, 224344 120203, 224254 120393, 224263 120978, 224349 121168, 224348 121754, 224263 121944, 224226 122529, 224277 122719, 224286 123304, 224343 123494, 224352 124080, 224283 124269, 224264 124855, 224330 125045, 224331 125243, 224387 125432, 224388 125630, 224314 125820, 224283 126207, 224317 126595, 224337 127181, 224355 127370, 224352 127956, 224290 128146, 224259 128731, 224315 128921, 224316 129119, 224389 129309, 224389 129507, 224325 129696, 224326 129894, 224277 130084, 224325 130529, 224365 131832, 224307 132022, 224279 132608, 224330 132798, 224310 133771, 224386 133961, 224344 134546, 224263 134736, 224273 135321, 224357 135511, 224351 136097, 224162 136285, 224170 136484, 223690 136646, 223677 137033, 222752 137306, 222753 137695, 222378 137797, 222381 138123, 222459 138167, 222501 138666, 222383 138698, 222007 138337, 222005 138676, 221632 138779, 221619 139543, 221259 139656, 221260 139861, 221416 140004, 221418 140330, 221042 140105, 220883 140149, 220882 140532, 220510 140636, 220517 141024, 220144 141125, 220128 141898, 219763 141991, 219750 142390, 219379 142496, 219375 142886, 218996 142986, 219000 143371, 218632 143478, 218638 143862, 218265 143966, 218253 144350, 218162 144384, 218206 144710, 217879 144846, 217882 145231, 217506 145334, 217517 145720, 217146 145823, 217133 146210, 216766 146315, 216764 147092, 216390 147188, 216399 147578, 216029 147682, 216022 147975, 216060 148062, 215820 148315, 215638 148403, 215631 148565, 215251 148663, 215280 149433, 214910 149523, 214902 149844, 215267 150022, 214894 150125, 214829 149949, 214525 150014, 214508 150420, 214353 150468, 214581 150847, 214143 150671, 214146 150905, 213775 151011, 213789 151393, 213412 151492, 213388 152277, 213012 152385, 213027 152604, 213214 152718, 213161 153366, 212934 153182, 212999 153112, 212944 152792, 212652 152863, 212675 153249, 212297 153349, 212287 153744, 211913 153846, 211896 154238, 211522 154341, 211536 154720, 211182 154826, 211189 155210, 210817 155310, 210813 155433, 210943 155667, 210953 155830, 210793 155880, 210773 156091, 210402 156196, 210382 156588, 210011 156692, 210013 157468, 209642 157565, 209664 157939, 209709 157991, 209649 157959, 209286 158054, 209268 158448, 208888 158547, 208866 158939, 208501 159044, 208521 159429, 208146 159529, 208171 159910, 207794 160011, 207767 160621, 207930 160757, 207954 161109, 207614 160843, 207378 160904, 207404 161226, 207571 161323, 207411 161327, 207383 161294, 207023 161382, 207057 161766, 206682 161867, 206657 162260, 206290 162369, 206260 162760, 205886 162863, 205915 163243, 205541 163347, 205574 163728, 205537 164111, 205169 164220, 205154 164539, 205414 164426, 205703 164468, 205732 164833, 205158 164751, 205033 164651, 204770 164720, 204795 165095, 204512 165182, 204584 165308, 204436 165272, 204453 165576, 204081 165678, 204059 166078, 203685 166180, 203655 166580, 203679 166810, 203940 167012, 203703 167077, 203574 166989, 203313 167061, 203344 167431, 203043 167523, 203152 167686, 202956 167869, 202950 167936, 202576 168039, 202520 168442, 202565 168803, 202187 168719, 202204 168913, 201830 169016, 201868 169392, 201495 169494, 201429 170288, 201058 170393, 201021 170788, 200712 170876, 200875 171089, 200644 170958, 200612 171289, 200239 171393, 200319 172145, 199946 172245, 199905 172642, 199531 172744, 199512 173004, 199646 173106, 199728 173470, 199291 173203, 199122 173247, 199164 173623, 198825 173749, 198984 174062, 198985 174449, 198847 174544, 198443 174414, 198421 174601, 198047 174704, 198002 175107, 198049 175476, 197680 175571, 197722 175954, 197352 176052, 197311 176456, 196940 176558, 196894 176957, 196518 177059, 196567 177435, 196190 177535, 196243 177915, 196199 178309, 195823 178409, 195783 178812, 195408 178914, 195457 179288, 195082 179389, 195137 179765, 194761 179866, 194720 180268, 194347 180370, 194297 180774, 194349 181142, 194257 181173, 194297 181447, 194021 181522, 194031 181618, 193663 181718, 193611 182120, 193234 182219, 193190 182624, 192819 182730, 192867 183096, 192497 183200, 192557 183573, 192185 183676, 192083 184478, 191710 184582, 191658 184983, 191286 185088, 191230 185491, 191288 185858, 190918 185953, 190974 186296, 191059 186314, 191116 186460, 190971 186419, 190903 186356, 190606 186433, 190549 186836, 190258 186921, 190299 187297, 190530 187593, 189800 187434, 189749 187448, 189809 187815, 189613 187873, 189642 188044, 189874 188640, 189471 188525, 189259 188357, 189128 188393, 189072 188794, 188692 188893, 188648 189257, 188785 189263, 188860 189435, 188657 189394, 188704 189670, 188332 189772, 188393 190139, 188020 190242, 187964 190646, 187596 190749, 187527 191158, 187597 191521, 187229 191623, 187293 191992, 186924 192092, 186862 192499, 186486 192601, 186424 193005, 186055 193112, 186121 193477, 185748 193580, 185821 193947, 185450 194051, 185386 194454, 185009 194553, 184943 194968, 185021 195330, 184650 195435, 184721 195797, 184537 195854, 184682 196226, 184321 196119, 184287 196308, 183909 196405, 183869 196697, 184047 196765, 184088 196958, 183889 197012, 183921 197182, 183546 197289, 183623 197647, 183256 197743, 183185 198155, 182813 198251, 182671 199072, 182305 199172, 182228 199583, 181845 199678, 181934 200052, 181562 200157, 181644 200520, 181260 200617, 181122 201435, 180750 201544, 180789 201697, 181025 201857, 181067 202038, 180880 202089, 180652 201958, 180460 202008, 180544 202370, 180176 202475, 180095 202878, 179729 202981, 179633 203401, 179730 203753, 178989 203963, 179076 204324, 178998 204731, 178755 204804, 178703 204915, 178611 204941, 178547 205244, 178380 205295, 178682 205634, 178217 205517, 178263 205710, 177883 205810, 177982 206175, 177598 206272, 177445 207094, 177074 207203, 177165 207560, 176996 207612, 177046 207804, 176849 207858, 176889 208025, 176520 208123, 176430 208532, 176068 208625, 175976 209051, 175428 209973, 175072 210060, 174998 210370, 175169 210440, 175123 210657, 174925 210711, 174880 210901, 174505 211003, 174235 211454, 173964 211932, 173784 212750, 173418 212850, 173344 213184, 173402 213250, 173419 213632, 173152 214093, 173044 213735, 173270 213286, 172945 213370, 172852 213788, 172323 214698, 155836 214698, 155808 214583, 155857 214296, 155679 214476, 155661 214698, 154486 214698, 154447 214569, 154466 214349, 154309 214698, 150462 214698, 150557 214639, 150571 214234, 150345 214296, 150390 214518, 150365 214698, 148599 214698, 148466 214404, 147917 214662, 147923 214698, 146434 214698, 146753 213964, 146735 213889, 146374 213526, 146641 213980, 146244 214698, 145085 214698, 145088 214639, 144986 214698, 127633 214698, 127633 200302, 53651 200302, 53784 199534, 54142 199451, 54217 199016, 54592 198913, 54515 198547, 54895 198447, 54810 198079, 55181 197977, 55254 197572, 55406 197525, 55447 197288, 55676 197166, 55704 197056, 55627 196700, 55989 196598, 55928 196239, 56281 196134, 56360 195726, 56721 195634, 56806 195213, 57169 195121, 57093 194741, 57132 194726, 57075 194683, 57057 194720, 56709 194825, 55928 194677, 55640 193971, 55196 193707, 55164 194005, 55069 194128, 55229 194351, 55739 194638, 55157 194768, 55124 194873, 54408 195069, 54470 194680, 54416 194640, 54096 194727, 53981 194426, 54036 194311, 53971 194042, 53732 193720, 53734 193331, 53823 193001, 53809 192535, 53737 192285, 53790 191446, 53685 190724, 53733 190342, 53849 189981, 53706 189523, 53742 189453, 53658 189177, 53592 189107, 53643 189014, 53700 188689, 53806 188417, 53783 187794, 53594 188203, 53584 188721, 53521 189084, 53589 189455, 53600 189779, 53567 189888, 53565 190276, 53500 190585, 53565 191051, 53675 191409, 53499 192105, 53547 192494, 53528 192612, 53654 192966, 53637 193327, 53485 193787, 53346 194046, 53566 194357, 53564 194440, 53021 194647, 52283 194890, 52309 193865, 52247 193430, 52104 193390, 52219 193142, 52181 192594, 52204 192030, 52106 191839, 52107 191723, 52182 191518, 52155 190656, 52007 190338, 52077 189574, 52041 188755, 51827 188040, 51893 187815, 51945 187232, 51866 186478, 51914 186278, 51851 186085, 51960 185677, 51711 185181, 51635 184991, 51545 184955, 51124 185544, 51028 185921, 51033 186424, 51342 186623, 51029 186976, 51011 187428, 51026 188012, 51409 188155, 51041 188494, 51040 189264, 51064 189412, 50980 189981, 50982 190209, 51076 190571, 51032 190968, 51097 191449, 51044 191735, 51054 192520, 51116 192887, 51183 193033, 51130 193269, 51293 193613, 50941 193930, 50907 194106, 51296 194388, 51436 194716, 51073 194825, 50336 195029, 49906 194767, 49915 194635, 49759 194640, 49209 194959, 49252 195038, 49164 195062, 49062 194999, 49044 194946, 48408 194737, 48444 194781, 48385 195162, 48035 195258, 47715 194981, 47679 194991, 47701 195373, 47760 195446, 47667 195443, 47317 195245, 47191 195124, 46967 195180, 46855 195082, 46612 195148, 46418 194948, 45896 195087, 45823 195046, 45509 195117, 45110 194919, 44344 195124, 43916 194859, 43177 195009, 42985 194896, 42879 194983, 42444 195101, 42292 194916, 42100 194928, 42081 194958, 41351 195168, 41250 195087, 40961 195437, 40494 195022, 40259 195000, 39805 194781, 39909 195007, 39500 195117, 39322 194955, 38729 195106, 38515 194975, 38341 195063, 38351 195215, 38222 195257, 38246 195495, 37995 195433, 37994 195679, 37649 195800, 37613 196196, 37240 196298, 37205 196691, 36989 196758, 37213 197050, 36859 197019, 36873 197175, 36501 197279, 36718 197608, 36867 197940, 36526 197815, 36489 198038, 36134 198134, 36096 198546, 35791 198637, 35989 198829, 35734 198708, 35755 199026, 35390 199132, 35442 199555, 35409 199516, 35044 199613, 35028 199922, 35249 200071, 35013 200138, 34981 200302, 20742 200302, 20744 197971, 20553 197628, 20546 197240, 20759 197051, 20949 196801, 20930 196420, 20932 195645, 20744 195302, 20737 195112, 20857 194911, 21062 194748, 22089 194491, 22169 194439, 22687 194173, 23062 194242, 23232 194116, 23298 193921, 23060 193221, 22685 193510, 22590 193316, 22602 192927, 22595 192144, 22536 190992, 22569 190593, 22558 189427, 22518 189054, 22529 188263, 22574 187778, 22532 186712, 22494 186341, 22492 185548, 22510 184772, 22473 184018, 22482 183221, 22549 182850, 22596 182074, 22575 181298, 22568 180514, 22569 179350, 22544 178976, 22551 177819, 22593 177801, 22537 177425, 22684 177294, 23019 177290, 22990 176949, 23224 176670, 23224 176497, 23359 176384, 23363 176072, 23187 175868, 23431 175976, 23712 175883, 23685 175596, 23595 175407, 24103 175411, 24113 175028, 24175 174928, 24543 174969, 24568 174191, 24498 173435, 24575 173026, 24557 172597, 24619 172173, 24627 171073, 24581 170311, 24667 169208, 24612 168364, 24656 167681, 24689 167180, 24689 166553, 24695 166164, 24707 165624, 24711 165023, 24679 164470, 24650 164090, 24913 163729, 24954 163619, 24698 163300, 25193 163063, 25633 163045, 25657 163241, 25767 163121, 26023 163291, 26250 163264, 26539 163464, 26455 163207, 26690 163062, 27138 162950, 27520 163186, 27771 163107, 27896 163124, 28216 163058, 28637 162871, 29392 162872, 29764 162750, 29954 163024, 30027 163271, 29648 163368, 29388 163566, 29719 163864, 29748 163953, 29847 163930, 30131 163999, 30306 163504, 30271 163324, 30372 163145, 30637 162954, 30886 163056, 31159 163081, 31198 163424, 31167 163465, 31250 163740, 31454 163604, 31888 163783, 32056 163304, 31975 163178, 31916 163200, 31613 163151, 31409 163012, 31631 162856, 31918 162783, 32022 162505, 32083 162137, 32399 161966, 32450 161676, 32717 161625, 32832 161459, 32736 161100, 33092 161157, 33190 161070, 33206 160969, 33096 160572, 33555 160537, 33485 160236, 33424 160134, 33469 160073, 33905 160057, 33753 159656, 33812 159557, 33918 159612, 34237 159580, 34262 159188, 34336 159109, 34298 158792, 34600 158834, 34703 158718, 34623 158254, 34656 158212, 35091 158198, 35058 157837, 35014 157759, 35298 157549, 35431 157288, 35542 157228, 35743 156938, 35873 156488, 36210 156355, 36178 155889, 36630 155855, 36633 155765, 36513 155418, 36978 155373, 36798 154945, 36831 154900, 37301 154898, 37220 154441, 37409 154144, 37703 153922, 37776 153663, 38009 153472, 38029 153147, 38382 153034, 38406 152635, 38799 152550, 38815 152117, 39196 152020, 39165 151652, 39548 151556, 39487 151186, 39856 151082, 39842 151010, 39941 150739, 40108 150549, 39917 150261, 40208 150437, 40377 150241, 40393 150083, 40199 149760, 40585 149785, 40728 149752, 40695 149613, 40505 149288, 40890 149314, 41032 149281, 41006 148856, 41390 148767, 41455 148366, 41522 148223, 41288 147910, 41252 147909, 41279 147862, 41295 147898, 41688 147964, 41811 147891, 41812 147756, 41589 147451, 41507 147451, 41612 147245, 41604 147425, 41987 147486, 42320 147229, 42254 147156, 42326 147222, 42506 146937, 42535 146497, 42838 146326, 42849 146006, 43283 145940, 43054 145486, 43539 145451, 43457 145118, 43264 145227, 43048 145457, 42962 145398, 42680 145550, 42693 145188, 42769 144734, 42677 144417, 42524 144312, 42273 144244, 42204 144648, 41881 144798, 41865 145028, 41781 145170, 41734 145588, 41604 145624, 41264 145594, 41383 146102, 41220 146127, 40890 146070, 40957 145758, 41232 145563, 41396 145157, 41265 144417, 41259 144031, 41189 143894, 41270 143611, 41707 143270, 41753 143147, 41503 142801, 41481 142535, 41423 142436, 41372 142148, 41293 141961, 41130 141740, 41052 141406, 40816 141051, 40755 140524, 40923 140221, 41306 140198, 41678 140428, 41920 140749, 41974 140970, 42118 141267, 42297 141421, 42410 141650, 42540 141742, 42588 141899, 42733 142077, 42901 142524, 43088 142581, 43276 142419, 43318 142692, 43565 142805, 43645 143089, 43548 143115, 43286 143088, 43200 142862, 43047 143017, 43091 143141, 43376 143451, 43414 143592, 43194 143784, 43277 144085, 43378 144226, 43539 144633, 43582 144598, 43887 144674, 44002 144544, 44035 144434, 44026 144089, 44438 144027, 44420 143535, 44644 143346, 44711 143070, 44971 142901, 44968 142627, 45029 142540, 45428 142297, 46089 142293, 45516 141839, 45500 141670, 45751 141497, 45670 141272, 45665 141137, 45773 141013, 46200 141131, 46088 140768, 45780 140628, 45731 140479, 45515 140168, 45091 140033, 44753 140032, 45077 140607, 45058 140711, 44746 140816, 44439 140988, 44447 141219, 44337 141325, 44296 141479, 43892 141371, 44138 140679, 44330 140420, 44588 139939, 44694 139684, 44801 139571, 45065 139143, 45481 138553, 46199 138370, 46174 138033, 46015 137687, 45721 137570, 45651 137400, 45687 137293, 45607 136830, 45758 136630, 46151 136821, 46043 136518, 46111 136493, 45929 136161, 46098 135727, 45786 135563, 45678 135454, 45620 135309, 46175 135318, 46146 135527, 46249 135379, 46260 135193, 46144 134939, 46088 134941, 45909 134615, 46072 134203, 46116 134194, 46256 133609, 46109 133397, 46206 133163, 46060 133409, 45872 133204, 45851 133081, 45993 132655, 45970 132557, 46118 132296, 46329 132443, 46280 131801, 46313 131408, 46279 131025, 46185 130664, 46352 130231, 46361 129727, 46325 129462, 46163 129120, 46366 128676, 46354 128292, 46426 128021, 46394 127892, 46128 127891, 46238 128324, 46139 128703, 45825 128677, 45691 128726, 45639 128875, 45368 129174, 45201 129207, 45197 129383, 45015 129656, 44744 130123, 44516 130124, 44637 130313, 44552 130526, 44338 130731, 44266 130722, 44272 130801, 44081 131022, 43977 131269, 44010 131373, 43660 131488, 43780 131865, 43389 131959, 43346 132264, 43057 132455, 43001 132886, 42811 132998, 42630 132990, 42652 133183, 42553 133395, 42350 133593, 42201 133516, 42273 133674, 42097 133892, 42070 134117, 42112 134290, 41934 134331, 41594 134306, 41795 134581, 41844 134768, 41648 134814, 41363 134806, 41455 135061, 41430 135212, 41286 135284, 41044 135301, 41094 135548, 40922 135983, 40951 136094, 40596 136206, 40643 136554, 40284 136665, 40192 136817, 39909 136765, 40025 137004, 39907 137111, 39954 137411, 40303 138091, 40431 138443, 40502 139104, 40548 139239, 40521 139370, 40374 139458, 40131 139385, 39856 139474, 39678 139425, 39674 139039, 39459 138930, 39338 139012, 39194 139557, 39496 139909, 39046 139841, 38913 139883, 38918 140021, 39153 140362, 38737 140298, 38610 140357, 38430 140542, 38740 140626, 38845 140817, 38835 140976, 38684 141034, 38549 140897, 38386 140579, 38170 140801, 38164 141003, 38440 141316, 38455 141466, 38305 141504, 37913 141464, 38131 141787, 38161 141948, 37996 141984, 37574 141777, 37251 141717, 37439 141977, 37812 142263, 37623 142577, 37478 142353, 37260 142252, 36934 142187, 37128 142450, 37189 142820, 37229 142849, 37399 143344, 37209 143381, 36991 143262, 36837 143099, 36582 143099, 36657 143354, 37036 143639, 37079 143814, 36893 143843, 36471 143622, 36110 143543, 36302 143839, 36712 144115, 36709 144305, 36528 144350, 36359 144210, 35906 143947, 35709 143708, 35453 143802, 35420 144120, 35041 144221, 35079 144595, 34707 144699, 34704 145134, 34616 145264, 34361 145262, 34397 145524, 34243 145745, 33932 145728, 34084 145997, 33916 146228, 33600 146204, 33721 146485, 33626 146582, 33546 146943, 33213 147082, 33225 147396, 33103 147585, 32812 147587, 32875 147880, 32791 147995, 32683 148324, 32391 148479, 32344 148776, 32263 148744, 32306 148811, 32023 148935, 32001 149191, 31873 149187, 31925 149303, 31684 149423, 31667 149831, 31599 149887, 31272 149912, 31338 150239, 31302 150340, 31218 150409, 30875 150404, 31000 150719, 30962 150819, 30879 150881, 30531 150882, 30649 151203, 30513 151452, 30221 151396, 30293 151688, 30180 151778, 30125 152142, 29770 152255, 29855 152676, 29431 152741, 29485 153152, 29063 153215, 29095 153652, 29014 153689, 28668 153710, 28718 154148, 28635 154233, 28302 154218, 28397 154534, 28283 154694, 27951 154702, 28007 155029, 27914 155256, 27651 155237, 27720 155494, 27570 155576, 27582 155984, 27165 156054, 27252 156486, 26809 156539, 26902 156882, 26886 156974, 26801 157037, 26438 157017, 26530 157372, 26413 157583, 26079 157533, 26157 157862, 26083 157931, 26092 158312, 25724 158418, 25701 158778, 25336 158889, 25372 159315, 24939 159372, 25022 159723, 25010 159817, 24923 159913, 24604 159896, 24689 160202, 24625 160290, 24561 160566, 24392 160497, 24501 160642, 24249 160776, 24184 160994, 23963 160947, 23923 161187, 23823 161230, 23864 161656, 23453 161727, 23512 162166, 23426 162246, 23083 162193, 23104 161848, 23396 161683, 23395 161293, 23769 161189, 23760 160791, 23981 160574, 24148 160316, 24213 159984, 24501 159818, 24609 159507, 24906 159347, 24911 158979, 24868 158922, 24935 158950, 25263 158834, 25271 158492, 25241 158441, 25300 158448, 25582 158314, 25624 157967, 25941 157822, 26022 157487, 26254 157272, 26417 157015, 26533 156711, 26762 156505, 26908 156238, 27118 156017, 27153 155813, 27235 155628, 27445 155475, 27498 155117, 27821 154979, 27860 154637, 28074 154423, 28170 154208, 28436 153927, 28754 153371, 28990 153161, 28971 152783, 29014 152793, 29302 152651, 29356 152327, 29665 152173, 29720 151806, 29922 151562, 30246 151043, 30458 150832, 30606 150574, 30799 150346, 30883 150000, 31181 149834, 31203 149443, 31522 149304, 31523 148950, 31866 148829, 31899 148492, 32132 148270, 32304 147997, 32428 147678, 32688 147479, 32744 147141, 32716 147076, 32782 147087, 33060 146949, 33104 146655, 33049 146539, 33180 146542, 33402 146421, 33445 146102, 33515 146092, 33715 145931, 33803 145633, 34062 145229, 34195 145115, 34298 144806, 34610 144629, 34523 144459, 34768 144387, 34974 144464, 34925 144146, 34959 143859, 35017 143862, 34971 143816, 35190 143598, 35309 143268, 35384 143163, 35590 143080, 35676 142848, 35922 142563, 35952 142385, 36088 142201, 36247 142093, 36270 141910, 36364 141813, 36464 141527, 36760 141288, 36797 140990, 36741 140867, 36881 140870, 37144 140783, 37124 140513, 37068 140402, 37196 140409, 37462 140312, 37442 139943, 37791 139822, 37916 139485, 37949 139124, 37808 138992, 37991 139062, 38306 138967, 38125 138692, 38288 138625, 38662 138798, 38602 138489, 38631 138267, 38707 138224, 38687 138147, 38898 137983, 38953 137685, 38938 137562, 39067 137477, 39368 137515, 39389 137178, 39636 136926, 39665 136715, 39639 136603, 39759 136596, 40037 136182, 40115 135817, 40083 135759, 40139 135790, 40485 135689, 40495 135325, 40313 135151, 40556 135225, 40758 135091, 40804 134852, 40653 134709, 40854 134774, 41039 134616, 41134 134375, 41116 134326, 41160 134344, 41448 134187, 41751 133540, 41896 133390, 42097 132930, 42435 132467, 42397 132340, 42539 132343, 42669 132180, 42742 131995, 42616 131835, 42823 131864, 42973 131724, 43019 131387, 43281 131168, 43304 131066, 43568 130606, 43388 130428, 43636 130481, 43801 130347, 43795 130156, 43605 129929, 43904 129974, 44094 129892, 44147 129672, 44107 129536, 44231 129574, 44446 129400, 44464 128917, 44736 128646, 45001 128164, 45079 128181, 45337 127936, 45449 127764, 45583 127340, 45514 127020, 45601 126559, 45710 126404, 45990 125678, 45845 125361, 46150 125435, 46524 125322, 46735 125318, 46891 125248, 46994 125088, 47200 124959, 47051 124833, 47012 124622, 47332 123974, 47551 123712, 47636 124064, 47612 124395, 47862 124128, 47948 123978, 47899 123704, 47588 123688, 47848 123507, 47809 123241, 48226 122573, 48401 122692, 48180 123139, 48348 123290, 48552 123258, 48582 123030, 48823 122575, 49070 122120, 48949 121956, 48769 121814, 48842 121560, 49093 121400, 49357 121705, 49400 121685, 49526 121284, 49597 121201, 49511 121126, 49365 120875, 49462 120651, 49683 120493, 49754 120770, 49897 120977, 50075 120840, 50111 120672, 50092 120298, 50293 119758, 50309 119455, 50552 118804, 50523 118620, 50712 118324, 50902 117773, 51108 117446, 51379 117246, 51510 117575, 51517 117961, 51449 118367, 51490 118548, 51632 118705, 51703 119073, 51913 119241, 52174 119720, 52266 119918, 52518 120220, 52747 120204, 52902 120084, 53122 120235, 52899 120400, 52921 120677, 52607 121083, 52419 120554, 52090 120510, 52030 120145, 51884 120043, 51747 120083, 51541 120042, 51332 120133, 51295 120347, 51204 120546, 51014 120678, 50859 120682, 50848 120857, 50589 121474, 50352 121769, 50063 122035, 49944 122268, 49676 122729, 49629 122904, 49445 123056, 49316 123078, 49294 123221, 49148 123421, 48978 123837, 48379 124456, 48045 125115, 48247 125384, 48522 125372, 48465 125595, 48696 125636, 48722 125699, 49504 125424, 49740 125426, 49729 125598, 49922 125637, 49973 125734, 50683 125475, 51119 125379, 51328 125378, 51370 125669, 51685 125623, 51716 125654, 52431 125418, 52730 125382, 52774 125564, 52916 125456, 53103 125610, 53852 125381, 54198 125365, 54361 125677, 55145 125393, 55431 125345, 55889 125188, 56038 125250, 56065 125485, 56292 125407, 56410 125441, 56650 125267, 56842 124761, 57158 124609, 57469 123748, 57586 123662, 57714 123400, 57990 123218, 58250 122759, 58316 122687, 58422 122362, 58563 122232, 58646 122048, 58806 121989, 59114 121369, 59204 121281, 59334 120967, 59561 120795, 59610 120702, 59690 120667, 60008 119990, 60333 119818, 60553 119361, 60834 118896, 60938 118614, 61094 118437, 61163 118287, 61281 118270, 61465 118078, 61716 117491, 61734 117122, 61801 117080, 61683 116724, 61502 116386, 61243 115807, 61128 115713, 61060 115437, 61066 115267, 61160 115194, 61444 115178, 61523 114830, 61592 114694, 61497 114342, 61378 113623, 61571 113222, 61856 113438, 62189 113437, 62461 113595, 62773 114101, 63065 114408, 63100 114495, 63338 114735, 63280 114348, 63292 113958, 63198 113596, 63208 113205, 63248 113111, 63610 113484, 63790 113605, 63881 113797, 63865 114139, 63828 114198, 63879 114212, 64146 113724, 64300 113404, 64437 113257, 64451 112935, 64662 112807, 64460 112758, 64399 112491, 64248 112144, 64176 111813, 64013 111417, 64362 110612, 64355 110177, 64265 109919, 64286 109761, 64205 109229, 63927 108435, 64121 108622, 64333 108918, 64580 109126, 64683 109313, 64955 109626, 65204 110078, 65439 110315, 65767 110778, 65887 110856, 66091 110595, 66354 110516, 66426 110428, 66629 109942, 66971 109142, 67304 108987, 67666 108123, 67868 107716, 68206 107630, 68557 106719, 68909 106627, 69127 106156, 69469 105309, 69830 105183, 70092 104527, 70164 104281, 70381 103893, 70736 103755, 71007 102927, 71354 102671, 71573 102332, 71631 102297, 71957 101514, 72324 101447, 72552 100953, 72626 100668, 72538 100569, 72817 100144, 73198 100022, 73597 99116, 73792 98745, 74099 98656, 74284 98158, 74484 97723, 74863 97584, 75067 97162, 75204 96738, 75442 96435, 75710 96262, 75940 95784, 76329 94963, 76621 94885, 77005 93991, 77388 93827, 77781 93010, 77992 92872, 78050 92754, 78153 92712, 78334 92391, 78589 91933, 78720 91630, 78839 91477, 78859 91160, 79028 91037, 78871 90928, 78732 90731, 78677 90577, 78338 90063, 78274 89693, 78140 89295, 78212 89205, 78439 89084, 78466 88866, 78608 88688, 78536 88071, 78526 87750, 78617 87662, 78655 87448, 79177 87641, 79385 87768, 79521 87602, 79581 87785, 79745 87824, 79979 87811, 80102 87329, 80218 87223, 80250 87099, 80362 87095, 80620 87347, 80928 87386, 81115 87683, 81346 87440, 81668 87230, 81710 87111, 81678 86822, 81393 86505, 81274 86145, 81099 85911, 80908 85434, 80970 85125, 81171 84913, 81591 84843, 81481 84518, 81505 84440, 81349 84159, 81323 83774, 81224 83555, 81373 83369, 81378 83311, 81434 83307, 81814 83650, 82465 84233, 82768 84665, 82979 84878, 83214 84851, 83185 84481, 83518 84355, 83507 83999, 83839 83873, 83798 83497, 84160 83392, 84115 83014, 84272 82955, 84410 82842, 84433 82505, 84806 82375, 84729 81997, 84752 81962, 85137 81900, 85085 81512, 85355 81348, 85364 81048, 85448 80712, 85726 80466, 85886 80135, 86019 79713, 86265 79534, 86409 79231, 86689 78877, 86768 78830, 86771 78741, 86890 78545, 86992 78247, 87334 77847, 87457 77806, 87441 77677, 87514 77495, 87660 77360, 87829 77021, 87985 76863, 88001 76795, 88069 76754, 88587 75805, 88818 75637, 88927 75371, 89228 75239, 89363 74974, 89285 74879, 89251 74910, 88898 74902, 88554 74696, 88473 74597, 88369 74625, 88086 74603, 87944 74666, 87694 74578, 87315 74644, 87168 74800, 86954 74854, 86860 74954, 86226 75230, 85738 75348, 85795 75735, 85515 75736, 85002 75861, 84746 76025, 84658 76311, 84429 76344, 83935 76519, 83754 76737, 83754 76822, 83658 76781, 83200 76830, 83112 76977, 83115 77116, 82793 77233, 82233 77373, 81764 77567, 81492 77647, 81129 77849, 81018 77870, 80828 78024, 80817 78072, 80482 78183, 80526 78479, 80461 78693, 80221 78693, 80333 78912, 80198 79023, 80132 79155, 79888 79153, 79959 79385, 79856 79479, 79868 79835, 79501 79926, 79601 80252, 79713 80425, 79614 80642, 79630 80715, 79849 80983, 79881 81240, 79640 81402, 79591 81388, 79777 81867, 79700 81868, 79284 81638, 79048 81744, 79016 82012, 79380 82280, 79298 82308, 78969 82216, 78734 82518, 78978 82764, 78639 82679, 78453 82990, 78596 83232, 78304 83093, 78065 83218, 78022 83487, 78174 83640, 77974 83553, 77737 83690, 77790 83937, 78029 84238, 77659 84124, 77416 84170, 77488 84407, 77662 84688, 77336 84639, 77098 84654, 77290 85135, 77005 85085, 76756 85122, 76815 85368, 77156 85679, 77180 85762, 77092 85776, 76679 85565, 76428 85621, 76485 85864, 76822 86162, 76841 86236, 76764 86247, 76361 86118, 76114 86127, 76175 86360, 76422 86601, 76479 86707, 76436 86716, 75849 86452, 75607 86288, 75351 86318, 75420 86564, 75420 86713, 75271 86695, 74943 86742, 75027 87150, 74616 87225, 74722 87647, 74267 87692, 74382 88122, 73941 88179, 74052 88606, 73966 88648, 73629 88681, 73733 89000, 73422 89482, 73091 89649, 73000 89976, 72898 90081, 72741 90505, 72573 90809, 72488 90785, 72483 90893, 72217 91040, 72113 91382, 71898 91897, 71810 91966, 71541 92034, 71236 92785, 71002 93089, 70815 93064, 70735 93310, 70609 93419, 70534 93753, 70455 93871, 70048 94745, 69688 94832, 69606 95170, 69377 95717, 69238 95848, 69014 95841, 68757 96566, 68628 96701, 68391 97113, 68112 97263, 68024 97542, 67922 97661, 67789 97994, 67543 98530, 67442 98615, 67182 98652, 67103 98958, 67012 99070, 66845 99506, 66645 99795, 66561 99772, 66526 99891, 66290 100061, 66188 100372, 65929 100903, 65793 101098, 65624 101113, 65568 101316, 65395 101455, 65280 101783, 65037 102340, 64885 102508, 64681 102470, 64627 102738, 64482 102852, 64369 103196, 64108 103683, 63749 103812, 63422 104716, 63297 104824, 63023 104777, 62908 105147, 62852 105207, 62722 105705, 62630 105998, 62894 106702, 63153 106862, 63219 107001, 63235 107280, 62987 107287, 62854 107100, 62865 106744, 62561 107180, 62508 107523, 62253 107455, 62020 107442, 61972 107730, 61728 108413, 61608 108604, 61740 108724, 61768 108949, 61516 109505, 61379 109632, 61269 109050, 60951 109294, 60873 109581, 60942 109889, 61018 109930, 60938 109999, 60790 110379, 60585 110863, 60535 110905, 60473 110854, 60536 110780, 60665 110413, 60487 110190, 60232 110275, 60113 110803, 59939 111236, 59695 111343, 59551 111309, 59516 111504, 59345 111690, 59201 112158, 58978 112343, 58766 112023, 58674 112009, 58653 112127, 58406 112277, 58212 112613, 58152 112560, 58157 112651, 57871 112813, 57759 113148, 57671 113232, 57494 113681, 57315 114009, 57114 113773, 56985 114136, 56928 114153, 56840 114563, 56597 115057, 56490 115219, 56382 115076, 56599 114316, 56925 114149, 57218 113297, 57425 112785, 57539 112629, 57704 112544, 57842 112350, 57972 112277, 58099 111784, 58330 111436, 58675 111287, 58757 110937, 58969 110491, 58976 110351, 59328 110217, 59541 109851, 59711 109411, 59900 109155, 59969 109115, 60184 108608, 60437 108439, 60779 107669, 60765 107536, 60870 107565, 61137 107430, 61237 107156, 61469 106704, 61488 106555, 61669 106414, 61809 106362, 61884 106204, 62048 106030, 62168 105738, 62416 105282, 62420 105217, 62726 105004, 62866 104771, 62757 104641, 62751 104132, 63120 104224, 63333 103841, 63647 103635, 63753 103365, 63847 103235, 64018 102810, 64222 102487, 64545 102243, 64658 101954, 64951 101486, 64936 101414, 65027 101347, 65264 101013, 65460 100856, 65721 100266, 66203 99592, 66377 99453, 66513 99120, 66178 98940, 66334 98782, 66363 98505, 66688 98552, 66779 98600, 67066 98457, 67196 98157, 67442 97702, 67448 97599, 67754 97391, 67967 97041, 68092 96749, 68380 96282, 68607 95832, 68903 95654, 69201 94894, 69212 94759, 69582 94650, 69800 94251, 69976 93799, 70484 93230, 70587 92964, 70873 92498, 71078 92053, 71066 91968, 71134 91991, 71410 91818, 71605 91448, 71722 91102, 71727 90972, 71839 90970, 72095 90860, 72434 90132, 72661 89682, 72648 89619, 72703 89621, 72977 89426, 73095 89175, 73363 88855, 73498 88595, 73700 88374, 73823 88102, 73848 87772, 73776 87718, 73855 87757, 74112 87588, 74158 87269, 74366 87056, 74490 86790, 74751 86614, 74842 86321, 75052 86118, 75172 85910, 75414 85663, 75586 85342, 75753 85195, 75831 84986, 75890 84935, 75892 84867, 76051 84683, 76151 84452, 76400 84186, 76416 83886, 76040 83619, 76455 83800, 76693 83674, 76742 83404, 76493 83186, 76788 83356, 77054 83222, 77088 82926, 76818 82710, 77116 82887, 77368 82740, 77440 82448, 77383 82402, 77447 82439, 77697 82269, 77769 81978, 77711 81932, 77775 81971, 78020 81796, 78084 81513, 77892 81361, 78102 81489, 78338 81321, 78351 81060, 78077 80795, 78424 80965, 78699 80838, 78675 80543, 78386 80310, 78744 80431, 79000 80292, 79000 80005, 78699 79770, 79064 79897, 79354 79822, 79306 79528, 78978 79218, 78848 79262, 78973 79173, 79389 79407, 79628 79318, 79632 79063, 79392 78802, 79719 78942, 79941 78842, 79980 78596, 79874 78447, 80051 78504, 80310 78408, 80284 78140, 79913 78126, 79601 78254, 79207 78320, 78862 78307, 78495 78475, 78090 78328, 77955 78416, 77909 78599, 77741 78644, 77503 78511, 77333 78476, 76820 78521, 76577 78635, 76490 78634, 76402 78919, 76238 79022, 76065 79028, 76124 79193, 76079 79388, 75729 79527, 75782 79695, 75741 79889, 75589 80020, 75403 80067, 75460 80241, 75425 80432, 75263 80507, 75018 80523, 75115 80938, 74695 80991, 74795 81409, 74623 81581, 74533 81575, 74570 81658, 74462 81873, 74295 82050, 74210 82046, 74238 82126, 73966 82515, 73882 82516, 73911 82597, 73638 82987, 73553 82987, 73587 83066, 73309 83445, 73196 83456, 73245 83555, 73134 83775, 72983 83943, 72837 83958, 72892 84090, 72809 84293, 72663 84467, 72532 84469, 72576 84591, 72411 85023, 72437 85100, 72355 85103, 72163 85263, 72097 85495, 72123 85584, 72029 85591, 71839 85740, 71752 85974, 71774 86045, 71699 86048, 71486 86200, 71424 86509, 71370 86514, 71162 86681, 71059 86962, 70845 87169, 70712 87431, 70505 87654, 70422 87957, 70178 88152, 70088 88445, 69853 88639, 69913 89027, 69752 89045, 69542 89131, 69541 89357, 69584 89509, 69425 89528, 69216 89616, 69204 89844, 69239 89981, 68860 90081, 68869 90333, 68811 90469, 68467 90626, 68208 91289, 67924 91755, 67889 91859, 67614 92110, 67586 92235, 67399 92455, 67230 92871, 67048 93012, 66897 93037, 66861 93210, 66695 93431, 66593 93670, 66371 94119, 66317 94292, 66134 94416, 65977 94447, 65926 94628, 65786 94834, 65618 95279, 65360 95558, 65142 96006, 64885 96268, 64693 96653, 64456 96973, 64179 97250, 64108 97453, 63799 98093, 63580 98287, 63484 98289, 63457 98407, 63274 98651, 63205 98864, 62891 99337, 62744 99538, 62560 99662, 62509 99829, 62285 100278, 61994 100746, 61964 100827, 61669 101067, 61619 101236, 61463 101463, 61284 101891, 61057 102231, 60771 102476, 60726 102644, 60564 102859, 60370 103268, 60131 103601, 59835 103829, 59471 104666, 59279 104871, 59183 104915, 59165 105010, 58967 105284, 58896 105471, 58612 105937, 58574 106077, 58277 106306, 58237 106427, 58040 106637, 57870 107078, 57662 107450, 57339 107630, 57289 107850, 57002 108493, 56792 108641, 56660 108643, 56618 108809, 56446 109020, 56283 109471, 55796 110063, 55763 110206, 55149 111046, 55057 111046, 55093 111165, 54918 111601, 54739 111901, 54466 112068, 54283 111621, 53961 111087, 53952 110845, 53872 110725, 53693 110678, 53332 110313, 53381 110472, 53115 110638, 53065 110946, 52785 111411, 52561 111950, 52215 112089, 52082 112517, 51884 112870, 51572 113104, 51511 113310, 51346 113528, 51151 113945, 50940 114261, 50649 114467, 50578 114729, 50290 115196, 50066 115645, 50042 115752, 49679 115868, 49567 116299, 49390 116681, 49047 116850, 48923 117121, 48671 117578, 48439 118029, 48434 118074, 48128 118259, 48069 118518, 47780 118984, 47433 119476, 47132 119666, 47044 120102, 46766 120543, 46553 120871, 46272 121137, 45929 121818, 45924 121913, 45580 122047, 45551 122309, 45488 122467, 45325 122635, 45169 122626, 45168 122802, 45016 122973, 44947 123250, 44577 123772, 44408 124172, 44399 124309, 44020 124404, 43929 124811, 43764 125153, 43440 125428, 43152 125835, 42871 125863, 42992 126112, 42948 126271, 42757 126560, 42488 126775, 42464 127032, 42514 127191, 42050 127241, 42166 127617, 41770 127708, 41824 128091, 41467 128209, 41470 128467, 41302 128901, 41348 128996, 41239 129002, 40994 129108, 40901 129250, 40695 129252, 40792 129428, 40610 129707, 40394 129713, 40495 129897, 40365 130056, 40330 130495, 39925 130565, 39967 130994, 39797 131046, 39517 131051, 39642 131294, 39669 131462, 39206 131510, 39327 131768, 39284 131926, 39129 132056, 38922 132043, 38941 132262, 38837 132424, 38777 132694, 38829 132820, 38416 132897, 38471 133255, 38132 133381, 38142 133744, 37792 133869, 37741 134279, 37605 134345, 37360 134374, 37358 134634, 37301 134773, 37169 134912, 36983 134925, 37001 135119, 36884 135285, 36838 135551, 36879 135680, 36473 135759, 36491 136105, 36156 136227, 36149 136575, 35821 136719, 35844 136987, 35800 137143, 35652 137268, 35446 137262, 35471 137477, 35410 137628, 35292 137742, 35065 137746, 35152 137952, 35090 138101, 34972 138208, 34739 138216, 34824 138429, 34734 138584, 34658 138955, 34318 139085, 34333 139491, 33904 139557, 34003 139964, 33585 140038, 33654 140300, 33636 140444, 33491 140611, 33338 140613, 33362 140768, 33220 140941, 33107 141226, 33122 141272, 32815 141416, 32815 141764, 32486 141894, 32439 142220, 32147 142395, 32109 142786, 31985 142882, 31768 142917, 31804 143134, 31751 143295, 31617 143402, 31401 143411, 31469 143613, 31406 143768, 31278 143877, 31056 143886, 31124 144095, 30896 144489, 30815 144482, 30829 144564, 30624 144738, 30573 145021, 30600 145117, 30221 145216, 30305 145630, 29882 145700, 29932 146114, 29517 146182, 29530 146608, 29397 146674, 29140 146695, 29136 147087, 29026 147227, 28847 147248, 28868 147427, 28676 147675, 28486 147724, 28501 147916, 28403 148041, 28319 148382, 28012 148539, 28002 148939, 27892 149048, 27675 149078, 27736 149288, 27643 149457, 27503 149570, 27271 149560, 27325 149789, 27141 150187, 27073 150175, 27098 150238, 26888 150412, 26785 150663, 26720 150662, 26746 150722, 26538 150912, 26492 151278, 26131 151389, 26171 151808, 26024 151878, 25775 151892, 25836 152135, 25803 152287, 25665 152359, 25419 152381, 25474 152622, 25430 152774, 25294 152920, 25105 152914, 25146 153099, 25038 153258, 24951 153583, 24649 153736, 24677 154136, 24304 154238, 24300 154620, 23915 154714, 23960 154975, 23940 155126, 23800 155238, 23583 155241, 23631 155453, 23438 155900, 23166 156080, 23172 156471, 22797 156572, 22780 156964, 22089 156891, 22096 156834, 21811 156510, 22079 156115, 21751 156033, 22130 155726, 22312 155687, 21437 155357, 21606 155241, 21213 154979, 21671 154823, 22703 154562, 22683 153811, 23054 153981, 23059 153675, 23426 153602, 23674 153763, 23456 153563, 23432 153199, 23284 153222, 23281 152914, 23442 153180, 23805 153124, 24028 153254, 23850 153067, 23800 152701, 23563 152635, 23799 152586, 23879 152284, 23876 151586, 24112 151606, 24545 151548, 24558 151331, 24995 151279, 24947 151216, 24917 150840, 25287 150782, 25398 150818, 25333 150722, 25279 150355, 25647 150303, 25844 150397, 25685 150239, 25652 149897, 25393 149930, 25400 149656, 25662 149540, 25692 149849, 26025 149796, 26267 149952, 26071 149745, 26036 149417, 25722 149452, 25494 148935, 26045 149108, 26063 148985, 26442 148888, 26442 148485, 26901 148450, 26854 148367, 26796 147997, 27173 147930, 27344 148016, 27206 147884, 27151 147529, 26950 147565, 26986 147182, 27164 147508, 27525 147452, 27840 147633, 27570 147396, 27538 147056, 27012 146882, 27555 146653, 27930 146541, 27916 146142, 28287 146083, 28407 146123, 28333 146024, 28270 145663, 28636 145603, 28756 145641, 28661 145546, 28655 145163, 29024 145104, 29153 145164, 29070 145046, 29051 144666, 29420 144609, 29605 144714, 29484 144546, 29399 144206, 29168 144244, 29151 144011, 29369 143803, 29265 143303, 29756 143432, 29770 143309, 29868 143277, 29887 142993, 30150 142990, 30175 142817, 30586 142747, 30557 142701, 30881 142238, 31068 142353, 30890 142222, 30848 141850, 31220 141800, 31588 141996, 31257 141733, 31247 141351, 31614 141269, 31818 141422, 31636 141242, 31647 140871, 31525 140884, 31547 140782, 31636 140709, 31622 140479, 31716 140445, 31688 140173, 31962 140162, 31972 140013, 32323 139962, 32378 139876, 32360 139507, 32708 139537, 32775 139441, 32760 138998, 33124 138960, 33252 139002, 33174 138882, 33091 138520, 33466 138474, 33793 138634, 33511 138403, 33417 138082, 33126 138120, 32896 137582, 33438 137777, 33451 138032, 33789 137993, 34081 138135, 33834 137926, 33823 137543, 33887 137163, 34207 137313, 34277 137077, 34190 136668, 34563 136590, 34651 136623, 34584 136557, 34508 136193, 34880 136119, 34967 136149, 34904 136082, 34923 135692, 35283 135648, 35400 135689, 35338 135575, 35337 135198, 35182 135229, 35191 135051, 35353 135066, 35394 134794, 35759 134695, 35813 134285, 36178 134236, 36376 134356, 36238 134166, 36135 133813, 36509 133762, 36808 133896, 36544 133694, 36441 133337, 36816 133267, 37067 133392, 36842 133226, 36862 132834, 36820 132842, 36874 132751, 36864 132831, 37231 132779, 37502 132981, 37327 132705, 37306 132337, 37342 132313, 37249 131969, 37609 131881, 37547 131493, 37760 131423, 37706 131192, 37939 131148, 37966 130980, 38327 130933, 38457 130994, 38369 130868, 38401 130474, 38764 130423, 39004 130597, 38821 130357, 38702 130004, 39083 129945, 39387 130085, 39117 129888, 38999 129543, 38849 129573, 38875 129413, 39011 129440, 39004 129532, 39378 129483, 39623 129581, 39442 129411, 39431 129040, 39313 129059, 39276 128870, 39495 128645, 39681 128959, 39815 128934, 39900 128543, 39803 128155, 40170 128066, 40330 128144, 40183 128045, 40088 127686, 40509 127614, 40523 127184, 40452 127196, 40533 127129, 40527 127176, 40881 127171, 41059 127240, 40935 127064, 40963 126708, 40711 126737, 40333 126299, 40933 126503, 40911 126317, 41090 126246, 40977 126040, 41196 125947, 41178 125843, 41341 125789, 41225 125410, 41623 125279, 41555 125730, 41920 125681, 42177 125785, 41957 125621, 42070 124820, 42488 124766, 42344 124353, 42726 124285, 42986 124400, 42748 124241, 42622 123892, 42997 123825, 43043 123772, 43057 123444, 42546 123213, 43137 123050, 43128 123362, 43427 123341, 43561 123407, 43481 123265, 43610 122474, 43585 122460, 43621 122422, 43618 122452, 43980 122396, 44076 122444, 44017 122342, 44084 121941, 44189 121908, 44171 121782, 43937 121257, 44505 121202, 44726 121367, 45035 120900, 45071 120537, 44717 120612, 44687 120698, 44447 120520, 44503 120271, 44715 119904, 44906 120006, 44904 120162, 45131 120285, 45185 120094, 45647 120091, 45595 119951, 46071 119082, 46196 119135, 46288 119006, 46681 118717, 46569 118542, 46655 118144, 46803 117844, 46678 117736, 46786 117368, 46872 117295, 47051 116795, 47168 117215, 47434 117265, 47536 117186, 47737 116287, 47977 115840, 48224 115960, 48363 115769, 48591 115299, 48935 115180, 48699 114858, 48989 115044, 49282 114846, 49249 114409, 49697 114510, 49883 114317, 49947 114127, 49883 113997, 49654 113909, 49752 113684, 49871 113624, 50020 113331, 50274 112493, 50638 112399, 50867 112712, 50862 112779, 50929 112695, 50886 112700, 50648 112383, 51075 111498, 51098 111541, 51154 111471, 51583 110951, 51720 110540, 51962 110086, 52146 109687, 52456 109639, 52502 109561, 52638 109614, 52567 109532, 52503 109544, 52787 108702, 53157 108600, 53458 107738, 53660 107306, 54016 107213, 54218 106754, 54542 105900, 54906 105798, 55275 104920, 55645 104819, 56148 103523, 56524 103420, 56639 103132, 56554 103011, 56782 102774, 57061 102110, 57386 102009, 57383 101920, 57439 101973, 57773 101129, 58149 101028, 58685 99735, 59046 99619, 59376 98796, 59332 98717, 59419 98693, 59584 98316, 59946 98241, 60279 97362, 60246 97348, 60267 97298, 60303 97303, 60479 96912, 60848 96794, 61203 95936, 61368 95501, 61728 95408, 61908 94984, 61879 94962, 61943 94900, 62284 94098, 62637 94003, 62811 93545, 63183 93446, 63510 92581, 63519 92575, 63891 91709, 64251 91616, 64220 91221, 64595 91117, 64541 90734, 64914 90634, 64871 90254, 65112 90180, 64828 89959, 64518 89948, 64479 89645, 64779 89567, 64966 89826, 65213 89938, 65193 89759, 65564 89645, 65551 89544, 65132 89188, 65379 88903, 65369 88814, 65456 88785, 65680 89216, 65894 89163, 65845 88779, 66222 88683, 66173 88300, 66551 88205, 66499 87820, 66873 87724, 66625 87293, 66817 87278, 66940 87312, 67201 87247, 67154 86869, 67327 86823, 67077 86468, 67510 86636, 67483 86396, 67780 86289, 67704 86178, 67835 86144, 67804 85882, 68179 85752, 68128 85366, 68503 85274, 68455 84891, 68831 84801, 68789 84423, 69160 84330, 69072 83571, 69236 83523, 69211 83321, 69268 83124, 69118 82908, 69358 82854, 69688 83379, 69807 83333, 69761 82950, 70131 82801, 70079 82413, 70384 82277, 70435 82173, 70368 81565, 70737 81491, 70692 81095, 71064 81009, 71023 80630, 71393 80549, 71353 80169, 71722 80085, 71677 79703, 72072 79612, 72007 79244, 72372 79093, 72346 78703, 72690 78542, 72652 78139, 73397 77980, 73301 77214, 73681 77141, 73630 76756, 74010 76685, 73960 76302, 74290 76236, 74326 76151, 74289 75847, 74667 75784, 74620 75398, 75345 75012, 75329 74888, 74936 74629, 75270 74416, 75250 74241, 75507 74193, 75520 74093, 75619 74109, 75581 73790, 75904 73731, 75636 73136, 75893 73218, 76287 73273, 76246 72895, 76620 72831, 76576 72451, 76954 72386, 76903 72002, 77287 71942, 77237 71563, 77610 71335, 77549 70989, 77504 70990, 77498 70581, 77575 70947, 77907 70756, 77863 70363, 78241 70302, 78192 69917, 78570 69860, 78523 69479, 78903 69421, 78808 68675, 78761 68663, 78750 68574, 78849 68651, 79187 68612, 79150 68231, 79521 68175, 79494 67807, 79853 67743, 80071 67589, 80108 67462, 80198 67402, 80163 67118, 80404 66950, 80330 66807, 80505 66764, 80472 66489, 80852 66439, 80805 66056, 81041 66024, 81148 65720, 81136 65624, 81335 65368, 81419 65158, 81502 65155, 81806 64771, 82158 64512, 82113 64131, 82464 63868, 83473 62574, 83432 62202, 83753 61793, 83753 61782, 84441 60932, 84391 60574, 85076 59992, 85376 59613, 85405 59527, 85372 59187, 85917 58519, 85793 58165, 86115 58231, 86710 57583, 87085 57139, 86994 56761, 87344 56466, 87701 56111, 87653 55739, 88314 54933, 89017 54108, 88945 53799, 88710 53884, 88924 53632, 89046 53628, 89457 53147, 89436 52970, 89592 52789, 89773 52806, 89961 52622, 89914 52239, 90259 51889, 90909 51129, 90882 51104, 90928 51081, 90892 50722, 91559 49947, 91904 49580, 92249 49196, 92201 48820, 92534 48456, 92896 46537, 93135 45885, 93274 45832, 93915 45830, 94437 45851, 94824 45830, 95063 46013, 95473 45629, 99079 45623), (143176 214170, 143101 214582, 143307 214236, 143295 214045, 143080 213805), (148068 213383, 148076 213601, 147968 214050, 148426 214061, 148793 213405, 148359 213075), (144676 213608, 144677 213926, 144905 213970, 144846 213711, 144909 213384), (148802 210301, 148740 210555, 148923 210390, 148917 210148, 148762 210131), (145180 209356, 145037 209868, 145189 210129, 145253 210139, 145114 209760, 145239 209287), (155600 209489, 155731 209728, 155803 209579, 155857 209278), (155588 208940, 155851 209008, 155784 208741, 155703 208627), (148541 207104, 148535 207485, 148713 207395, 148676 207235, 148724 207017), (155679 204372, 155689 204701, 155825 204500, 155860 204252), (155601 201072, 155748 201322, 155870 200999, 155646 200780), (155572 200305, 155641 200567, 155853 200228, 155699 199919), (128324 199634, 128234 200049, 128475 199744, 128437 199603, 128511 199343, 128245 199340), (155529 199377, 155697 199845, 155833 199458, 155866 199216), (121190 199160, 121198 199362, 121436 199587, 121345 199219, 121411 198810), (155517 198935, 155860 198910, 155805 198653, 155699 198472), (130227 198243, 130242 198409, 130405 198566, 130318 198312, 130362 198087), (128414 197670, 128231 197868, 128283 198240, 128524 198349, 128418 198057, 128557 197596), (131709 195216, 131716 195481, 131855 195564, 131764 195780, 131802 195966, 131728 196386, 132070 197055, 131745 197863, 131753 197969, 131941 198237, 131828 197898, 132074 197051, 131747 196364, 132039 195901, 132112 195640, 132089 195500, 132255 195067), (155499 197838, 155693 198192, 155789 197957, 155825 197697), (121129 197605, 121123 197886, 121334 197957, 121288 197685, 121411 197139), (124642 196588, 124760 196734, 124666 196965, 124706 197227, 124824 197155, 125005 196794, 125033 196438, 124959 196291, 124666 196263), (128170 196186, 128158 196281, 128234 196557, 128189 196833, 128480 196816, 128462 196495, 128599 196309, 128576 195912), (130113 195267, 130122 195398, 130394 195651, 130395 195189), (104353 195349, 104482 195523, 104782 195376, 104876 195268, 104845 195211), (128199 195015, 128201 195125, 128329 195368, 128545 195442, 128546 195309, 128471 195322, 128246 194998), (177330 188306, 177371 188515, 177312 188772, 177326 189690, 177391 189949, 177317 190298, 177351 190459, 177305 190772, 177375 191156, 177307 191246, 177357 191460, 177250 191750, 177283 192028, 177263 192250, 177324 192791, 177423 193028, 177380 193164, 177386 193409, 177437 193537, 177149 194091, 177090 194406, 177495 194684, 177589 194691, 177813 194597, 177858 194196, 177818 194155, 177785 193828, 177558 193504, 177654 193197, 177634 192707, 177559 192478, 177658 192167, 177610 191939, 177634 191657, 177557 191259, 177578 191172, 177500 190914, 177596 190583, 177557 190402, 177608 190110, 177532 189634, 177394 189284, 177568 188549, 177564 188124), (174621 193971, 174571 194413, 174731 194665, 175207 194535, 175178 194504, 175146 193934), (170728 193079, 170795 193419, 170733 193823, 170528 194267, 170606 194305, 170682 194614, 170729 194628, 171295 194445, 171256 194067, 171121 193717, 171127 193635, 170946 193377, 171137 193097, 171151 192856, 170913 192849), (172355 194245, 172312 194553, 172708 194480, 172790 194522, 172996 194366, 172519 194228), (166988 186294, 166942 186721, 167149 187441, 167015 187837, 166934 188274, 166994 188695, 167130 188997, 166916 189715, 166913 189957, 166978 190201, 167140 190544, 167057 190918, 166948 190985, 166868 191174, 166947 191372, 166866 191687, 166790 192190, 166867 192558, 166840 192724, 166909 192934, 166910 193398, 166645 194169, 166698 194542, 167076 194474, 167159 194518, 167370 194358, 167371 193944, 167193 193705, 167030 193674, 167051 193282, 167166 193014, 167201 192644, 167161 192476, 166907 192159, 167038 191796, 167119 191713, 167157 191491, 167125 191324, 167248 190566, 167199 190005, 167126 189772, 167213 189017, 167152 188602, 167208 188398, 167082 188233, 167165 187965, 167124 187835, 167155 187443, 166950 186719, 167110 186391, 167115 185868), (57360 192252, 57298 192742, 57323 192770, 57448 193411, 57316 193900, 57196 194090, 57149 194333, 57420 194466, 57847 194530, 57979 194301, 57805 193855, 57691 193797, 57682 193617, 57558 193160, 57819 192977, 57420 192708, 57829 192249, 57846 191965, 57805 191827, 57420 191575), (165290 184073, 164827 184880, 164791 184986, 164453 185556, 164463 185850, 164402 186257, 164651 186575, 164403 187010, 164420 187413, 164390 187662, 164391 188197, 164361 188592, 164432 188961, 164392 189118, 164385 189473, 164730 189655, 164410 190039, 164378 190523, 164434 190983, 164810 191183, 164441 191582, 164447 192109, 164457 192900, 164564 193377, 164521 193588, 164284 193957, 164263 194046, 164563 194352, 164963 194288, 165032 194350, 165261 194321, 165402 194510, 165581 194460, 165670 193944, 165556 193325, 165534 193212, 165418 192540, 165588 191822, 165614 191397, 165185 191080, 165466 190228, 165299 189498, 165299 188978, 165345 188635, 165326 188512, 165298 187948, 165362 187278, 165334 187009, 165315 186393, 165409 186049, 165425 185587, 165517 185141, 165136 184891, 165506 184436, 165447 184030, 165488 183604), (39449 193702, 39335 194021, 39332 194178, 39436 194509, 39867 194249, 39744 193950, 39694 193691, 39453 193262), (35693 185464, 35733 186248, 35666 187042, 35756 187792, 35653 188210, 35631 188488, 35687 188898, 35661 188982, 35742 189347, 35639 189763, 35619 190018, 35652 190416, 35606 190547, 35663 190919, 35641 191313, 35587 191530, 35649 191955, 35577 192106, 35616 192482, 35585 192878, 35606 193648, 35284 194124, 35480 194459, 35906 194503, 36146 194276, 36080 193913, 35815 193591, 35848 193194, 35951 192536, 35903 192126, 35934 192008, 35882 191360, 35917 190967, 35908 190465, 35865 190205, 35901 189691, 35851 189009, 35882 188922, 35843 188545, 35866 188268, 35782 187132, 35849 186714, 35851 186216, 35736 185496, 35745 185055), (59075 193980, 58921 194085, 58863 194252, 58964 194256, 59421 194497, 59576 194444, 59631 194291, 59505 193836), (37069 194022, 37140 194391, 37419 194490, 37620 194472, 37792 194386, 37872 194190, 37206 193720), (31530 193835, 31455 194011, 31480 194203, 31555 194371, 31802 194469, 32013 194460, 32166 194359, 32179 194200, 32055 193706, 31906 193659), (168521 193823, 168458 194059, 168478 194442, 168857 194366, 168983 194466, 168968 194221, 168737 193757), (161631 193182, 161248 193226, 161085 193754, 161097 194139, 161346 194459, 161479 194465, 161701 194361, 161801 194259, 161885 193923, 161752 193571, 161717 193089), (156902 193996, 156853 194139, 157080 194465, 157260 194415, 157354 194076, 157660 193918, 157338 193881), (64030 185814, 63951 186243, 64014 186638, 64160 186984, 63967 187769, 64008 188189, 64129 188544, 64032 188905, 63932 188985, 63905 189209, 63961 189365, 63901 189565, 64059 189967, 64188 190078, 64069 190450, 63997 190518, 63915 190732, 63923 191121, 64197 191626, 64057 191981, 63978 192074, 63917 192246, 63995 192845, 63914 193286, 64070 193600, 63797 193826, 63666 194098, 63812 194446, 64198 194369, 64551 194243, 64244 193552, 64273 193256, 64037 193221, 64287 193117, 64296 192612, 64226 192393, 64266 192116, 64299 191553, 64238 191227, 64270 191064, 64231 190841, 64288 190116, 64202 189589, 64123 189320, 64271 188586, 64184 188140, 64212 187977, 64079 187781, 64168 187476, 64139 187378, 64213 186928, 64175 186447, 64027 186245, 64118 185912, 64094 185840, 64156 185428), (47874 193775, 47671 193857, 47796 194184, 48137 194440, 48343 194267, 48413 193787, 48708 193830, 48407 193482, 48184 193444), (62442 194433, 62734 194353, 62667 194173, 62344 194085), (29773 193309, 29541 193874, 29214 193807, 29232 194232, 29582 194288, 29814 194159, 30093 194385, 30249 194423, 30335 194160, 30128 193987, 29785 193313, 29789 193047), (42266 193592, 42239 193769, 41916 194086, 41853 194262, 42114 194375, 42438 194420, 42539 193803, 42450 193365), (175714 194126, 175722 194394, 176015 194394, 175964 194107), (61163 194009, 61203 194385, 61626 194321, 61848 194208, 61777 193840, 61553 193739, 61230 193722), (33350 193879, 33328 194273, 33488 194346, 33761 194297, 33782 193761, 33543 193469), (158081 192731, 158197 192995, 158095 193411, 157684 193911, 157875 194247, 158021 194319, 158262 194344, 158405 194226, 158489 194078, 158465 193697, 158185 193386, 158294 192918, 158209 192604, 158227 192466, 158045 192345), (46073 193881, 46125 194254, 46556 194344, 46730 194273, 46924 194034, 46246 193516), (159606 193665, 159488 194192, 159785 194343, 160152 194217, 160277 193976, 160165 193721, 159756 193643), (44271 193392, 44004 193379, 44254 193874, 44231 193998, 44374 194038, 44517 194307, 44804 194341, 45072 194232, 45162 194130, 45040 193776, 44842 193569, 44649 193138), (163144 192776, 163068 192823, 162975 193075, 163009 193227, 162828 193660, 162720 194082, 162877 194300, 163205 194316, 163455 194073, 163470 193876, 163243 193550, 163162 193185, 163253 192518), (26004 193508, 25922 193589, 25951 193694, 26057 193801, 26238 194279, 26420 194296, 26551 194193, 26223 193678, 26053 193185), (27439 193844, 27542 194044, 27814 194235, 27961 194228, 28203 194030, 28218 193736, 27697 193402), (24493 185403, 24507 185795, 24479 185887, 24541 186990, 24509 187727, 24430 188269, 24481 189333, 24422 189740, 24452 190503, 24451 191171, 24428 191673, 24415 192303, 24503 193203, 24449 193496, 24284 193754, 24185 194065, 24558 194220, 24865 194198, 25045 193943, 25055 193827, 24932 193545, 24839 193498, 24653 193162, 24771 192577, 24764 191969, 24714 191595, 24707 190978, 24727 190816, 24719 190218, 24710 189658, 24642 189289, 24682 188199, 24624 187815, 24547 186989, 24636 186277, 24621 185500, 24544 185238), (49842 193859, 49657 194061, 49978 194217, 50100 194045, 50131 193931, 49879 193245), (23018 191672, 22943 192080, 22932 192471, 23060 193128, 23090 192459, 23069 191659, 23060 191118), (26043 190067, 26015 191212, 26035 192008, 26017 192761, 26051 193120, 26093 192818, 26110 191988, 26089 191219, 26102 190439, 26058 190069, 26041 189459), (44476 192139, 44668 192327, 44655 193023, 44756 192765, 44727 192699, 44817 192375, 44694 191992), (159598 192107, 159671 192592, 159647 192999, 160017 192873, 159961 192512, 160066 192284, 160052 192033, 159805 192007), (31991 191129, 32052 191898, 32005 192683, 32022 192755, 32068 191910, 32011 191004), (37262 192419, 37268 192670, 37351 192428, 37316 192090), (42281 192071, 42296 192202, 42458 192623, 42447 191718), (29579 185477, 29703 186302, 29524 186923, 29515 187178, 29676 187884, 29510 188456, 29500 188733, 29632 189398, 29528 190016, 29530 190275, 29803 190975, 29583 191605, 29576 191813, 29812 192500, 30042 191949, 30027 191690, 29812 190973, 30065 190421, 29989 189374, 30059 188755, 29916 187933, 30011 187200, 29879 186373, 29918 185683, 29772 185070), (161196 192009, 161202 192336, 161456 192401, 161350 192131, 161450 191795), (170763 191756, 170736 192146, 170891 191972, 170854 191852, 170887 191712), (159881 190521, 159635 190771, 159644 191339, 159781 191399, 160016 191369, 160066 190841, 160005 190520), (163143 190705, 163179 190854, 163092 191124, 163299 190965, 163299 190653), (161589 189739, 161154 190610, 161192 190706, 161380 190809, 161290 190597, 161773 189833, 161836 189672, 161765 189552, 161495 189434), (44755 189912, 44788 189969, 44725 190777, 44855 189982, 44735 189364), (49935 189333, 49487 189800, 49438 190214, 49462 190717, 49815 190775, 49941 190680, 49938 190108, 49962 189299, 49926 189296), (22994 187415, 23006 188131, 23047 188563, 23038 189319, 22984 190130, 23058 190731, 23080 190104, 23065 189333, 23061 188559, 23075 188184, 23073 187005, 23058 186673), (57410 190727, 57778 190678, 57745 190293, 57421 190132), (170864 189523, 170735 190290, 170744 190441, 170865 190429, 170833 190307, 171216 189818, 171101 189459, 170853 189190), (46273 189561, 46219 190366, 46652 189848, 46339 189220, 46418 189135, 46253 189085), (158089 190319, 158129 190356, 158093 190311, 158228 189934, 158225 189841, 158160 189790), (31985 189581, 32045 190194, 32004 189439), (142628 185723, 142888 186338, 142558 186796, 142628 187184, 142576 187611, 142845 187901, 142621 188368, 142669 188724, 142641 189099, 142921 189430, 142968 189968, 143357 189637, 143359 188953, 143292 188552, 143367 188157, 143405 187249, 143350 186986, 143385 186202, 143309 185469), (159607 189243, 159635 189500, 159611 189802, 159699 189871, 159995 189839, 159993 189661, 159842 189443, 159946 189026), (163150 188821, 163029 189067, 163085 189330, 163041 189619, 163187 189782, 163372 189755, 163383 189636, 163312 189267, 163371 188864, 163354 188747), (44706 188030, 44801 188414, 44776 188712, 44823 188420, 44709 187756), (46278 187978, 46223 188368, 46238 188565, 46328 188422, 46374 187984, 46267 187725), (163224 187312, 162843 187350, 162868 187451, 162822 187849, 162846 188366, 163129 188309, 163330 188171, 163275 187726, 163318 187231), (170841 188301, 171059 188117, 171000 187936, 170864 187788), (44701 187254, 44704 187604, 44799 187315, 44794 186900), (177618 186130, 177419 186565, 177371 186827, 177566 187314, 177526 186963, 177626 186122, 177455 185383), (57537 186474, 57428 187289, 57676 186550, 57495 186090), (53693 186336, 53653 186763, 53757 187140, 53688 186768, 53783 186392, 53780 186140), (161523 186449, 161546 186650, 161453 187000, 161722 186778, 161714 186432), (155590 186345, 155567 186630, 155615 186726, 155593 186809, 155684 186836, 155665 186712, 155779 186336, 155774 186202), (163174 185763, 162816 185810, 162768 186315, 162835 186685, 162819 186817, 163186 186813, 163329 186722, 163305 186168, 163319 185558), (170825 186705, 170949 186486, 170819 186173), (49677 186003, 49801 186269, 49965 186474, 50089 186338, 50017 186210, 49967 185923), (141011 185896, 140982 186084, 141020 186255, 141238 186264, 141191 186028, 141363 185497), (35720 183697, 35761 183560, 35763 183112), (165480 180095, 165380 180532, 165318 180577, 165198 180808, 165227 181148, 165304 181357, 165532 181681, 165380 182066, 165300 182433, 165303 182607, 165411 182912, 165499 182967, 165499 182809, 165419 182487, 165551 181684, 165408 180939, 165535 180053), (44586 182124, 44668 182248, 44714 182500, 44812 182284, 44698 181912), (136162 182001, 136254 182342, 136394 182479, 136376 182308, 136409 182156, 136226 181961, 136340 181596, 136348 181416), (23017 180389, 23035 181174, 23019 181941, 23015 182369, 23070 182439, 23062 179954), (158220 181360, 158095 181758, 158081 181996, 158182 181825, 158244 181340, 158206 181265), (48339 180080, 48302 180423, 48367 180847, 48454 181017, 48369 180480, 48442 180094, 48437 179871), (44645 180626, 44710 180854, 44769 180714, 44678 180351), (143611 179937, 143294 180644, 143707 180012, 143708 179790, 143545 179764), (136215 179946, 136222 180155, 136352 180125, 136330 179995, 136389 179572), (52087 176988, 52120 177105, 51989 177457, 51913 177837, 52195 178625, 52114 179032, 51970 179350, 51985 179468, 52125 179712, 52147 179036, 52215 178630, 52125 177951, 52177 177477, 52212 176932), (165350 178440, 165421 178611, 165360 178814, 165555 178822, 165564 178245), (143527 178410, 143446 178743, 143709 178566, 143708 178123, 143426 178119), (143314 176484, 143312 176919, 143273 177065, 143271 177467, 143779 177295, 143732 176802, 143779 176492, 143759 176275), (165449 176605, 165350 176927, 165362 177137, 165295 177335, 165552 177366, 165540 177028, 165598 176688, 165582 176489), (39530 176961, 39587 176664, 39471 176107), (165360 175423, 165367 175621, 165475 175920, 165561 175952, 165480 175493, 165484 175278), (143396 175088, 143461 175327, 143437 175544, 143607 175733, 143733 175731, 143643 175022), (44687 174858, 44791 175237, 44731 175686, 44795 175239, 44679 174577), (44657 173310, 44753 173697, 44665 174078, 44676 174456, 44760 174133, 44795 173709, 44677 173137), (137774 171960, 137979 172178, 137837 172568, 137847 172646, 137987 172170, 137969 171792, 137756 171616), (152083 171801, 152018 172261, 152160 171813, 152171 171648), (141575 171563, 141422 171621, 141312 171780, 141426 172007, 141398 172155, 141553 172174, 141529 171980, 141624 171488), (155577 171618, 155554 172044, 155607 172103, 155601 171999, 155724 171646, 155737 171334), (38656 163287, 38350 163400, 38268 163378, 38214 163473, 38392 163932, 38651 164128, 38559 164541, 38566 164927, 38634 165150, 38481 165411, 38551 165706, 38548 166094, 38680 166718, 38544 167003, 38484 167388, 38614 167872, 38472 168053, 38819 168346, 38509 168819, 38496 168933, 38586 169185, 38555 169582, 38581 169885, 38744 170692, 38624 171113, 38591 171428, 38632 171886, 38737 172072, 38766 171850, 38716 171476, 38768 170981, 38695 169976, 38805 169650, 38777 169521, 38836 168729, 38818 168003, 38798 167650, 38885 167178, 38793 166109, 38883 165774, 38851 165624, 38867 164959, 38783 164565, 38791 164089, 39089 163621, 39201 163292, 39142 163218), (148457 170801, 148364 171277, 148515 170778), (152025 170266, 151961 170613, 152022 171043, 152183 171199, 152165 170935, 152035 170650, 152141 170287, 152143 170086), (137890 170651, 137818 171074, 138018 170727, 138007 170518, 137831 170353), (44670 170557, 44701 170611, 44697 170908, 44764 170622, 44682 170280), (141487 170053, 141433 170435, 141540 170814, 141610 170872, 141604 170762, 141460 170448, 141599 170075, 141666 169670), (33504 166659, 33488 167093, 33489 167836, 33542 168227, 33477 169012, 33526 169757, 33500 170191, 33495 170754, 33586 170222, 33601 169777, 33520 169045, 33573 168234, 33496 167488, 33579 166681, 33488 166037), (158069 170132, 158053 170419, 158163 170200, 158202 169766), (146912 169728, 146797 170091, 146799 170278, 146914 170230, 146897 170121, 146972 169674, 146846 169438), (34994 168973, 35034 169350, 35021 169930, 35200 169338, 35160 168962, 34994 168630), (151900 164557, 151889 164875, 151832 165136, 151878 165267, 151840 165422, 151898 165649, 151844 166148, 151902 166423, 151893 166626, 151959 166795, 151903 167001, 151923 167192, 151860 167486, 151857 167722, 151925 167968, 152116 168302, 151883 169017, 151897 169249, 151986 169502, 152159 169681, 152198 169278, 152137 169072, 152189 168836, 152144 168682, 152225 168196, 152184 167895, 152219 167640, 152165 167513, 152215 167360, 152180 167122, 152241 166857, 152226 166595, 152157 166352, 151986 166013, 152185 165570, 152240 165350, 152232 164988, 152174 164797, 152246 164401), (148361 169084, 148388 169514, 148645 169642, 148717 169636, 148573 169273, 148715 168922, 148718 168805, 148587 168802), (159584 168987, 159637 169617, 159909 169552, 159834 169288, 159859 169054, 159575 168894), (137804 169125, 137745 169466, 137756 169617, 137891 169488, 138019 169237, 138014 169067, 138114 168698, 137718 168623), (141864 163286, 141587 163273, 141434 163320, 141183 163482, 141105 163479, 141070 163577, 141299 163903, 141303 164299, 141335 164839, 141380 165044, 141319 165238, 141260 165727, 141271 165965, 141362 166212, 141303 166506, 141355 166601, 141294 166706, 141364 166985, 141325 167469, 141382 167757, 141643 168071, 141443 168461, 141354 168539, 141326 168805, 141359 168925, 141328 169071, 141403 169301, 141671 169583, 141600 169161, 141488 168890, 141609 168589, 141647 168073, 141601 167696, 141664 167433, 141559 167319, 141672 167169, 141607 166919, 141692 166375, 141623 166139, 141639 165873, 141597 165758, 141654 165647, 141649 165357, 141702 165146, 141665 164965, 141685 164782, 141587 164599, 141675 164200, 141560 164218, 141680 164179, 141986 163434, 141962 163164), (41997 168589, 42010 168852, 42379 169053, 42396 168635, 42281 168339), (158040 167732, 158030 167869, 158156 168198, 158071 168666, 158192 168204, 158104 167823, 158172 167658), (155746 167656, 155427 167766, 155425 167837, 155563 168133, 155407 168406, 155414 168621, 155551 168601, 155830 168452, 155754 168080, 155849 167520), (34980 167460, 35015 167798, 34994 168232, 34994 168611, 35142 168191, 35199 167788, 35199 167400, 34983 167077), (136341 167976, 136235 168440, 136272 168415, 136395 167926, 136266 167607, 136301 167483, 136176 167478), (159559 167397, 159593 167804, 159563 168277, 159600 168201, 159869 167997, 159856 167732, 159988 167479, 159988 167239, 159787 167238), (148451 167369, 148331 167555, 148338 168036, 148680 168091, 148758 167600, 148699 167237), (150453 167595, 150416 168031, 150465 168061, 150452 167984, 150562 167498), (137720 167181, 137781 167581, 137737 168015, 138125 167876, 138017 167515, 138132 167168, 138130 167057, 137970 167038), (44641 167525, 44666 167766, 44751 167554, 44809 166797), (28173 167388, 28287 167762, 28321 167400, 28282 167017), (158109 166659, 158019 167050, 158033 167165, 158151 167168, 158097 167051, 158179 166598, 158107 166505), (35302 164207, 34992 164324, 34994 164743, 34941 165145, 34961 165914, 35013 166288, 34986 166683, 34983 167070, 35406 166592, 35402 166398, 35253 166222, 35265 166072, 35404 165996, 35409 165759, 34978 165522, 35423 165069, 35405 164691, 35124 164440, 35391 164441, 35401 164207), (155697 166108, 155402 166229, 155496 166601, 155441 166978, 155844 167054, 155765 166527, 155854 165827), (144789 165936, 144779 166343, 144934 166395, 144789 166546, 144820 166813, 144787 166972, 145021 166867, 145160 166432, 145226 165927), (136333 166426, 136208 166864, 136338 166428, 136316 166375), (159548 166669, 159763 166369, 159765 166032, 159568 165981), (148343 166141, 148319 166439, 148470 166341, 148442 166208, 148595 165826), (137689 165654, 137733 166043, 137717 166418, 138113 166365, 138130 166183, 138084 165946, 138126 165705, 138104 165498), (28148 163377, 27772 163478, 27736 163631, 27901 163928, 27982 163952, 28206 164278, 28179 164623, 28275 165014, 28153 165815, 28286 166291, 28326 165859, 28307 165026, 28340 164693, 28289 164255, 28359 163943, 28637 163384, 28281 163301), (43965 163427, 43888 163397, 43474 163474, 43530 163651, 43845 163698, 44003 163622, 44369 163910, 44580 164441, 44569 164752, 44663 165069, 44734 165175, 44678 165539, 44694 165901, 44795 165607, 44844 165192, 44700 164408, 44808 164093, 45024 163839, 45089 163526, 45067 163450, 44834 163209, 44710 163208), (33087 163294, 32745 163421, 33417 164013, 33459 164776, 33449 165486, 33483 165873, 33623 165213, 33504 164376, 33571 164052, 33754 163787, 33831 163511, 33515 163431, 33269 163277), (158037 165129, 158015 165573, 158077 165575, 158054 165512, 158188 165180, 158176 165011, 158006 164722), (136197 164757, 136230 164904, 136135 165253, 136135 165451, 136290 165449, 136287 165276, 136383 164990, 136343 164873, 136358 164680), (150327 164843, 150418 165280, 150545 165402, 150531 165197, 150416 164891, 150467 164544), (146780 165346, 146957 165229, 146918 165076, 146936 164930, 146755 164841), (144826 164480, 144816 164877, 144768 165037, 144806 165332, 145245 165214, 145176 164777, 145201 164398), (42363 164969, 42468 165261, 42485 164622), (139739 164614, 139691 164920, 139786 165092, 139974 165134, 139974 164989, 139873 164681, 139916 164309), (159605 164663, 159603 164750, 159631 164692, 160160 163772, 160159 163756), (156939 163901, 156948 163967, 157246 164184, 157084 164515, 157077 164732, 157596 164475, 157252 164174, 157138 163824, 157327 163709, 157466 163347, 157352 163210, 157172 163198), (178576 164017, 178620 164138, 178577 164538, 178633 164718, 178756 164101, 178677 163848), (157727 163649, 157700 163603, 157569 163707, 157943 164225, 158183 164179, 158234 163912, 158345 163842, 158458 163463, 158168 163433), (177401 163625, 177538 164063, 177528 163723, 177557 163655, 177477 163564), (42039 163918, 42055 164030, 42506 164026, 42621 163613, 42777 163385, 42417 163441, 42277 163359, 42060 163432, 41705 163291), (37140 163326, 36819 163429, 36717 163382, 36506 163553, 36811 163918, 37250 163858, 37493 163283), (163316 163542, 163302 163913, 163474 163639, 163504 163416), (35027 163889, 35602 163689, 35673 163394, 35366 163435, 35212 163348), (40231 163266, 39875 163405, 40214 163806, 40379 163857, 40774 163756, 40911 163509, 40621 163420, 40445 163248), (134976 163447, 135128 163749, 135237 163626, 135248 163274), (165497 159946, 165290 160753, 165485 161496, 165299 162341, 165570 162971, 165549 162368, 165688 161587, 165493 160841, 165599 159978, 165429 159537), (46189 156962, 46282 156684, 46058 156363), (72014 149212, 72042 149548, 71951 149946, 72015 150332, 71963 150596, 72017 151106, 72010 151507, 72055 151871, 72011 152423, 72025 152655, 72007 153158, 72061 153420, 72028 153629, 72081 154190, 72062 154662, 72106 154959, 72076 155555, 72143 155847, 71960 156492, 72029 156586, 72339 156530, 72632 156752, 72952 156710, 73070 156856, 73230 156588, 73084 155852, 73085 155443, 73012 155097, 73221 154265, 72879 153577, 73079 152753, 72830 152050, 72976 151231, 72700 150590, 72578 150564, 72713 150401, 72916 149697, 72679 149054), (76012 156600, 76214 156766, 76451 156744, 76631 156432, 76435 156222, 76129 156180), (68803 155863, 68667 156289, 68825 156633, 69051 156741, 69393 156562, 69487 156451, 69353 155672, 68812 155616), (65655 154692, 65621 155020, 65858 155120, 65665 155322, 65766 155532, 65413 156017, 65296 156279, 65306 156434, 65628 156668, 65991 156651, 66143 156205, 65918 155949, 65805 155909, 65861 155621, 65843 155512, 65945 155084, 65741 154764, 65921 154326), (67526 154954, 67624 155030, 67182 155806, 67014 156354, 67071 156431, 67696 156584, 67789 156521, 67358 155888, 67706 155072, 67701 154936, 67288 154501), (51234 147818, 51198 148021, 51427 148610, 51053 149132, 51090 149476, 51062 149845, 51514 150136, 50897 150476, 50854 151092, 50903 151466, 50837 151815, 51378 151724, 50837 151926, 50862 152455, 50889 152633, 50891 153313, 51468 153250, 51067 153688, 51213 154095, 50916 154527, 51032 155061, 50908 155143, 50873 155279, 50889 155444, 51349 155609, 51137 156416, 51305 156573, 52008 156222, 52010 156167, 51603 155538, 52019 154821, 52012 154481, 51731 153953, 51611 153201, 51841 152372, 51578 151653, 51734 150851, 51524 150133, 51750 149296, 51541 148569, 51717 148205, 51724 147752, 51324 147690), (70457 155407, 70600 155759, 70395 155991, 70310 156225, 70362 156418, 71001 156471, 71069 156406, 70945 155889, 70787 155707, 70863 155211), (63732 155747, 63840 156256, 64085 156353, 64012 156014, 64054 155690), (53588 153375, 53471 153818, 53398 153884, 53329 154115, 53343 154451, 53592 154993, 53452 155344, 53375 155440, 53345 155641, 53380 155982, 53496 156183, 53629 156286, 53612 155762, 53683 155501, 53651 155365, 53705 154908, 53575 154222, 53623 153822, 53685 153219), (57235 153680, 57329 153970, 57248 154306, 57197 154780, 57257 155153, 57237 155276, 57278 155534, 57257 156222, 57476 156070, 57492 155863, 57576 155657, 57606 155178, 57202 154779, 57396 154397, 57487 154314, 57538 154109, 57502 153922, 57657 153484, 57225 153423), (46263 151562, 46125 152377, 46288 153109, 46147 153921, 46303 154650, 46233 155073, 46095 155971, 46482 155780, 46388 155417, 46447 155267, 46401 155026, 46427 154768, 46338 154268, 46234 153909, 46333 153728, 46410 153228, 46357 152713, 46288 152475, 46206 152366, 46272 152227, 46384 151679, 46277 151255, 46307 151176, 46141 150982), (63743 152778, 63749 153373, 63718 154237, 63777 154527, 63678 154929, 63717 155662, 64025 155544, 63882 155274, 64000 154947, 63737 154926, 64026 154757, 63961 154477, 64124 154045, 63807 153743, 64102 153275, 63910 152940, 63997 152536), (69209 154145, 68831 154157, 68853 154511, 68935 154665, 68861 154859, 68823 155294, 69159 155148, 69341 154998, 69319 154108), (47717 154277, 47674 155056, 48183 154621, 48172 154277, 48081 154081, 48170 154031, 48167 153688, 47653 153550), (78490 153983, 78372 154126, 78395 154397, 78360 154795, 78784 154793, 78803 154464, 78711 154310, 78765 154059, 78730 153918, 78751 153796), (70710 153740, 70602 153819, 70493 153977, 70538 154225, 70496 154517, 70606 154594, 70854 154635, 70854 154447, 70789 154155, 70896 153432), (69037 152560, 68793 152624, 68804 152991, 68882 153129, 68813 153309, 68817 153682, 69123 153612, 69302 153465, 69308 153011, 69360 152780, 69360 152303), (47856 152110, 47679 152215, 47697 152733, 47653 153508, 48209 153128, 48231 152586, 48180 152082), (70408 148868, 70473 149204, 70433 149748, 70471 149979, 70403 150238, 70412 150532, 70473 150754, 70432 150939, 70447 151357, 70512 151519, 70815 151823, 70537 152287, 70444 152994, 70475 153080, 70909 153309, 70908 152701, 70850 152588, 70914 152464, 70888 152191, 70919 151856, 70862 151422, 70886 151112, 70848 151038, 70888 150955, 70941 150187, 70841 149877, 70613 149552, 70820 149217, 70902 148698, 70884 148315, 70408 148189), (78545 152349, 78390 152715, 78335 153158, 78454 153219, 78723 153239, 78716 153033, 78637 152780, 78737 152562, 78736 152177), (57272 149341, 57541 150035, 57325 150858, 57466 151606, 57321 152420, 57232 152783, 57228 152979, 57338 152847, 57646 152732, 57454 152384, 57644 151656, 57633 151471, 57341 150865, 57547 150037, 57329 149297, 57376 149023), (74479 151949, 74536 152354, 74462 152912, 74790 152499, 74761 152292, 74869 151866), (67528 151948, 67377 152363, 67632 152025, 67622 151831, 67466 151766), (68878 149395, 68985 149612, 68912 149828, 68855 150348, 68892 150412, 69342 150676, 69067 151048, 68869 151245, 68918 151567, 68853 151982, 69357 152144, 69325 151675, 69263 151473, 69298 151219, 69347 150677, 69278 150305, 69288 150120, 69216 149935, 69282 149722, 69302 149134, 68856 148700), (53629 151451, 53544 151818, 53547 151994, 53674 152109, 53650 151877, 53734 151510, 53724 151378), (63741 151287, 63764 151429, 63720 151637, 63961 151716, 63874 151426, 63940 151381, 63929 151093), (47904 150608, 47847 150753, 48053 151003, 47733 150994, 47731 151398, 47881 151684, 48153 151552, 48163 151071, 48120 150596), (74517 150581, 74548 150799, 74523 151057, 74841 151108, 74731 150749, 74739 150511), (46255 150027, 46169 150509, 46259 150031, 46203 149654, 46151 149581), (63739 149111, 63881 149848, 63832 150253, 63972 149852, 63811 149478, 64105 149010, 63819 148746), (136812 149201, 136658 149819, 136793 149767, 136888 149605, 137001 149187), (65792 149323, 65714 149689, 65857 149351, 65852 149265, 65771 149181), (74568 149239, 74581 149258, 74767 148799), (72802 146626, 72577 147464, 72045 147978, 72063 148380, 72019 148575, 72012 149123, 72648 148921, 73014 148120, 72586 147462, 73053 146715, 73045 146560, 73118 146142), (46124 149076, 46217 148908, 46230 148472), (67273 148777, 67294 149013, 67454 149069, 67414 148879, 67549 148451), (69177 147490, 69198 147615, 69009 148116, 69292 147675, 69294 147483), (70644 147044, 70626 147223, 70455 147463, 70407 147915, 70809 147754, 70848 147162, 70807 147009), (63912 147513, 63860 147762, 64010 147516, 64033 147374, 63872 147325), (179641 143901, 179269 144018, 178732 144497, 178796 144708, 178685 145126, 178868 145464, 178579 145612, 178731 146391, 178677 146679, 178925 146788, 179068 146714, 179193 146150, 179120 145937, 179508 145842, 179438 145472, 179811 145368, 180208 144892, 180234 144458, 180520 144273, 180440 143870, 180023 143838), (72854 144925, 72847 145230, 73096 145356, 73002 145022, 73091 144594), (29369 143801, 29414 144177, 29775 144161, 30074 144289, 29846 144059, 29741 143724), (72836 143128, 72748 143306, 72761 143536, 72673 143972, 73103 143923, 73102 143746, 73004 143469, 73096 143165, 73109 142870), (214087 143097, 213856 143626, 214142 143746, 214285 143897, 214509 143890, 214833 143746, 214531 143156, 214400 143089, 214172 142774), (215788 143249, 215606 143533, 215825 143862, 216001 143875, 216421 143745, 216392 142954), (196122 143060, 196145 143128, 196033 143726, 196105 143863, 196783 143655, 196187 142712), (210363 137606, 210295 138013, 210362 138859, 210273 139830, 210325 140248, 210287 140340, 210324 140717, 210219 141522, 210282 142130, 210334 142654, 210280 142925, 210070 143158, 209988 143524, 210048 143550, 210253 143839, 210439 143846, 210806 143687, 210743 143317, 210486 142999, 210470 142674, 210568 141965, 210541 141434, 210531 140661, 210501 139895, 210556 139360, 210468 138353, 210511 138072, 210500 137657, 210380 136798), (208834 133733, 208849 134125, 208130 134105, 207982 134235, 207983 134382, 207914 134623, 207881 135185, 207785 135986, 207808 136755, 207765 137542, 207813 138305, 207766 139099, 207830 139509, 207762 139869, 207857 140231, 207873 141083, 207789 141388, 207860 141782, 207900 142282, 207957 142686, 207938 142922, 207678 143247, 207641 143391, 207955 143694, 208155 143668, 208252 143708, 208532 143593, 208830 143841, 208926 143843, 209133 143756, 208946 142640, 208963 141932, 208922 141491, 208943 141097, 208939 140097, 208805 139584, 208817 139525, 208806 138809, 208814 138770, 208741 137874, 208725 137280, 208732 137201, 208712 136508, 208673 136281, 208810 135706, 208807 135635, 208841 134922, 208786 134815, 208878 134320, 208902 133760, 208906 133321), (211852 143319, 211732 143619, 211818 143797, 211917 143805, 212291 143684, 212355 143717, 212455 143459, 212051 143027, 211912 142911), (197247 143463, 197159 143551, 197275 143538, 197655 143804, 197723 143784, 197651 143379), (199039 143036, 198644 143375, 198594 143545, 199089 143798, 199253 143787, 199404 143711, 199403 143324, 199201 142992, 199195 142416), (192401 135137, 192451 135538, 192409 136552, 192478 137081, 192380 137496, 192368 137887, 192344 138668, 192357 139440, 192301 140158, 192347 140994, 192303 141696, 192314 142165, 192368 142443, 192337 142935, 192016 143412, 192061 143785, 192445 143739, 192606 143792, 192880 143561, 192771 143139, 192529 142881, 192590 142478, 192582 142237, 192680 142065, 192627 141923, 192722 141196, 192568 140689, 192620 140531, 192578 140352, 192453 140190, 192619 139907, 192677 139620, 192505 139110, 192620 138981, 192362 138664, 192648 138058, 192569 137832, 192596 137577, 192519 136683, 192424 136321, 192571 135525, 192522 135131, 192415 134726), (204464 143160, 204482 143482, 204792 143784, 205070 143709, 205147 143630, 205151 142910), (190046 143400, 189933 143593, 190176 143603, 190456 143770, 190518 143433, 190470 143059, 190180 142766), (193816 143304, 193791 143699, 193977 143679, 194089 143743, 194339 143692, 194615 143473, 193921 143077), (188625 138913, 188485 139340, 188433 139740, 188487 140114, 188696 140444, 188479 140891, 188419 141295, 188461 141671, 188655 142005, 188595 142797, 188421 143108, 188396 143322, 188194 143417, 188161 143692, 188356 143669, 188466 143734, 188716 143686, 188952 143733, 188920 143484, 188806 143127, 188646 142802, 188751 142017, 188688 141291, 188746 140921, 188725 140824, 188717 140110, 188662 139736, 188732 139373, 188717 139275, 188747 138408), (202785 143172, 202878 143534, 203301 143711, 203536 143601, 203671 143310, 202949 142873), (201195 142717, 200890 142760, 201032 143162, 200957 143285, 201088 143286, 201240 143596, 201428 143619, 201616 143697, 201801 143542, 201869 143424, 201795 143055, 201410 142548), (206282 142731, 206250 142949, 206137 143232, 206122 143420, 206313 143632, 206542 143694, 206752 143636, 206870 143402, 206891 143210, 206662 142685), (182863 143594, 183201 143612, 183286 143478, 182775 143100), (181212 142495, 181065 142923, 180983 143333, 181147 143519, 181380 143612, 181584 143589, 181727 143345, 181749 143124, 181475 142985, 181236 142489, 181151 142092), (200234 143484, 200516 143602, 200647 143370, 200257 143328), (184893 142960, 184222 143169, 184102 143139, 184470 143541, 184630 143589, 184988 143082, 185158 143063, 184932 142716), (179573 143332, 179653 143398, 179928 143235, 179932 143101, 179675 142630), (51816 142917, 51852 143065, 51828 143222, 52000 143273, 51971 143033, 52026 142632), (214134 138896, 214126 140401, 214118 140477, 214138 141223, 214090 142012, 214172 142736, 214298 142482, 214369 142160, 214246 141969, 214230 141198, 214185 140435, 214229 139648, 214140 138897, 214165 138119, 214157 138007), (69390 142136, 69233 142635, 69412 142115, 69226 141773), (72913 139495, 72959 139583, 72733 140370, 72739 140512, 73116 141101, 72723 141810, 72733 142185, 73017 142321, 72922 141942, 72970 141825, 73161 141097, 72849 140402, 73175 139699, 73208 139294, 72753 138960), (201355 141206, 201321 141508, 201399 141613, 201362 141977, 201412 142168, 201498 142056, 201536 141667, 201467 141207, 201416 141161), (198788 141158, 198757 141556, 198796 141945, 199199 142075, 199227 141871, 199169 141480, 199205 141092, 199184 140881), (202921 141605, 202964 141185, 202941 141081), (199074 138325, 199190 139117, 199082 139872, 199125 140279, 199179 140431, 199152 139928, 199194 139119, 199156 138740, 199142 138062), (206426 134601, 206427 134809, 206586 135462, 206571 135892, 206431 136168, 206605 137019, 206563 137800, 206576 137868, 206576 138544, 206559 138649, 206552 139334, 206683 140304, 206697 140150, 206673 139430, 206723 138652, 206771 138591, 206722 138558, 206655 137873, 206700 137089, 206730 137051, 206698 137032, 206700 136285, 206668 135906, 206697 135544, 206736 135499, 206705 135464, 206729 134764, 206636 134371), (182757 140117, 182978 139890, 182970 139688, 182756 139415), (46050 139560, 46244 139854, 46241 139565, 46121 139382), (72777 137718, 72692 138174, 72813 138483, 72738 138845, 72970 138501, 73088 138408, 73181 138255, 73130 137816, 72994 137658, 72760 137538), (182758 138438, 182931 138316, 182897 138157, 182758 137977), (188636 137310, 188685 137711, 188752 137882, 188755 137737, 188698 137158), (46121 137256, 46077 137283, 46084 137516, 46224 137243, 46194 136964), (210344 135647, 210405 136230, 210462 135641, 210385 135274, 210391 134870), (72906 134969, 72736 135436, 72941 134937, 72764 134691), (74361 134456, 74384 134644, 74477 134648, 74470 134540, 74596 134115), (81455 133200, 81485 133392, 81339 133738, 81316 133962, 81478 133782, 81614 133460, 81630 133195), (70938 133183, 70805 133615, 71002 133220, 71022 133051, 70779 132835), (77847 131676, 77788 131955, 77850 132063, 77837 132269, 77906 132435, 77887 132550, 78169 132097, 78162 131851, 78033 131625, 77812 131490), (81292 131487, 81392 131868, 81389 132130, 81624 132031, 81603 131810, 81657 131454), (70718 131287, 70767 131679, 70750 132085, 71085 131900, 71044 131602, 71079 131244), (74386 131074, 74260 131394, 74268 131595, 74367 131855, 74604 131960, 74588 131629, 74422 131452, 74550 131149, 74551 130893), (77804 130253, 77939 130489, 77817 130784, 77812 131076, 78037 130849, 78132 130586, 78105 130443, 78157 130204, 78076 130062, 77802 130024), (81410 129924, 81311 130059, 81347 130329, 81269 130759, 81676 130674, 81678 130575, 81578 130265, 81695 129686), (67444 130264, 67351 130615, 67542 130306, 67569 130084, 67344 129992), (70929 129619, 70760 129920, 70776 130126, 70693 130553, 71090 130462, 71066 130046, 71137 129825, 71099 129649, 71138 129420), (72724 130290, 72720 130466, 72864 130522, 72802 130346, 72915 129980), (74571 129085, 74220 129878, 74223 130039, 74422 130211, 74330 129927, 74637 129110, 74642 129003, 74406 128733), (79869 129183, 79730 129613, 79936 129208, 79941 129100, 79831 129039), (77774 128527, 77877 128955, 77793 129458, 78176 129201, 78123 128887, 78203 128434), (67151 128626, 67245 128768, 67173 128978, 67212 129164, 67177 129363, 67386 129198, 67560 128903, 67538 128483, 67444 128325, 67161 128256), (69288 128983, 69201 129289, 69346 129014, 69360 128877, 69243 128841), (81431 126754, 81150 126887, 81276 127434, 81376 127608, 81664 127916, 81464 128283, 81297 128404, 81253 128508, 81311 128788, 81309 129010, 81413 129149, 81700 129270, 81685 128903, 81604 128707, 81682 128490, 81662 128305, 81768 127937, 81656 127530, 81721 127167, 81598 126772, 81607 126582), (208804 128730, 208921 129178, 208937 128306, 208923 127968), (63990 128884, 63952 129150, 64113 128851, 63954 128684), (71047 127649, 71106 127709, 70819 128176, 70735 128764, 70831 128948, 71126 129085, 71096 128690, 70982 128518, 71111 128334, 71107 128097, 71183 127640, 70808 127105), (74255 125580, 73924 125774, 74301 126447, 74409 126804, 74283 127081, 74184 127651, 74255 128010, 74242 128326, 74529 128031, 74643 127670, 74630 127369, 74527 127158, 74609 126900, 74590 126715, 74858 125845, 74824 125528), (76402 127808, 76269 128267, 76330 128302, 76303 128223, 76481 127840, 76480 127726, 76330 127582), (65665 127994, 65663 128172, 65795 128146, 65782 128006, 65853 127725), (79797 127653, 79770 127860, 79953 127790, 79910 127516, 79752 127456), (77925 127003, 77798 127121, 77819 127420, 77781 127821, 78208 127795, 78237 127505, 78174 127322, 78198 127060, 78158 126885), (67259 125562, 66855 125773, 67081 126243, 67294 126429, 67180 126839, 67244 127218, 67170 127539, 67169 127718, 67609 127555, 67622 127420, 67558 127130, 67552 126756, 67434 126777, 67547 126728, 67479 126378, 67675 126237, 67811 125899, 67704 125541), (69195 127624, 69365 127599, 69335 127262, 69160 127259), (63943 127346, 63911 127582, 64034 127383, 64190 127279, 64022 127265, 63912 127201), (72779 126862, 72701 127179, 72871 126906, 72865 126775, 72686 126594), (75992 125549, 75668 125683, 75799 126035, 76147 126328, 76186 126813, 76344 127049, 76463 127062, 76465 126956, 76298 126673, 76510 126432, 76690 125791, 76598 125786, 76470 125622, 76345 125596, 76310 125507), (46081 126428, 46176 126790, 46166 127047, 46379 126947, 46496 126702, 46439 126403, 46153 126355), (70541 125538, 70628 125685, 70598 125911, 70678 126401, 70863 126613, 70776 126992, 70805 127017, 71162 126966, 71169 126845, 71030 126566, 71233 126363, 71390 125691, 70936 125751, 70707 125486), (49675 126499, 49703 126669, 49842 126852, 49872 126552, 49820 126308), (68981 125524, 68651 125668, 68769 126024, 69026 126341, 69205 126680, 69170 126850, 69299 126767, 69277 126660, 69475 126343, 69661 125780, 69593 125776, 69369 125472), (65589 125667, 65253 125812, 65212 125765, 65142 125855, 65215 125900, 65405 126242, 65608 126503, 65578 126680, 65836 126784, 65735 126468, 65953 126284, 66138 125876, 66124 125586), (72563 125677, 72242 125847, 72643 126501, 72945 126299, 73144 125912, 73113 125609, 72943 125584), (77678 125907, 77647 126146, 77696 126374, 77872 126335, 78283 125907, 78337 125728, 77918 125800, 77792 125661), (64671 125560, 64367 125680, 64504 126021, 64818 125824, 64900 125534), (61578 125669, 61661 125862, 61853 126013, 62126 125713, 62132 125518), (57307 125677, 57331 125713, 57818 125704, 57827 125535), (50780 119092, 50641 119591, 50387 119820, 50572 119976, 50753 119874, 51023 119515, 51061 119248, 51035 118923), (52440 110342, 52318 110762, 52658 110283, 52481 110291, 52381 110176), (90492 73880, 90508 74097, 90745 74443, 90898 74412, 91006 74251, 91250 74080, 91317 73938, 90648 73370), (95409 74279, 95803 74309, 96000 74157, 95493 73769), (89095 73380, 89036 73436, 89041 73726, 88737 73881, 88840 74250, 89211 74302, 89346 74254, 89588 74015, 89348 73541, 89359 73292), (101213 71532, 101237 72214, 101296 72603, 101323 73291, 101161 73606, 101101 73936, 101134 74004, 101499 74244, 101612 74263, 101733 74170, 101926 73735, 101714 73229, 101616 72809, 101711 72599, 101678 72155, 101732 72141, 101752 71805, 101745 71291, 101226 71130), (92948 73383, 92727 73994, 92893 74248, 93180 74242, 93302 74116, 93081 73553, 93314 73641, 93055 73379, 92931 73057), (96900 73796, 96690 73802, 96952 74201, 97020 74037, 97505 74035, 97612 73826, 97137 73654), (98362 73445, 97755 73851, 97925 74101, 98106 74134, 98210 74086, 98432 73470, 98397 73368), (99658 71587, 99664 72041, 99726 72328, 99707 72423, 99859 73116, 99716 73360, 99566 73417, 99467 73644, 99544 74021, 99650 74082, 100045 74129, 100243 73875, 100126 73509, 99968 73194, 99934 72477, 100006 72364, 100018 72192, 99907 71767, 99985 71590, 99917 71429, 100081 71347, 100079 71161, 99631 70867), (93951 73986, 94226 74112, 94284 73920, 94076 73750), (102889 72361, 102983 73121, 102920 73391, 102831 73543, 102790 73943, 103141 74099, 103377 74057, 103543 73829, 103350 73432, 103069 73103, 102980 72343, 102892 72123), (98110 71878, 98302 72616, 98266 71965, 98116 71143), (90761 71701, 90857 72063, 90827 72078, 90900 72333, 90888 72068, 90955 71667, 90812 71636), (95501 69458, 95481 69538, 95570 70204, 95530 70315, 95579 70560, 95545 70704, 95624 70940, 95723 71065, 95824 71437, 95810 71834, 95894 71964, 95828 71439, 95789 70716, 95801 70659, 95728 69976, 95753 69884, 95722 69623, 95746 69494, 95652 69119, 95502 68753, 95470 68554), (102854 66173, 102889 66828, 102874 66939, 102964 67569, 102958 67907, 102886 68094, 102956 68591, 102847 68705, 102839 68908, 103170 69206, 103375 69813, 103364 69213, 103331 68484, 103270 67742, 103310 67551, 103243 67012, 103320 66728, 103311 66326, 103019 66098, 102850 65661), (101279 66021, 101325 66687, 101353 67054, 101328 67182, 101446 67817, 101369 67957, 101441 68505, 101282 68592, 101267 69247, 101725 69460, 101797 69595, 101872 69518, 101820 69431, 101714 68364, 101664 67981, 101624 67258, 101656 67131, 101556 66517, 101681 66350, 101653 66245, 101750 66153, 101748 65922, 101289 65615), (99721 65991, 99940 67172, 99889 66588, 99841 65848, 99720 65436), (98163 65632, 98248 66055, 98212 65657, 98113 64989), (98218 59856, 98262 60034, 98199 59533), (97930 57562, 97989 57883, 98264 57538, 98224 57226), (98274 57069, 98352 56767, 98340 56650, 98212 56572)), ((225644 179887, 225631 180659, 225630 181166, 225501 181198, 225501 201627, 225489 202135, 225491 202402, 225469 202910, 225469 214698, 189190 214698, 189122 214369, 189502 214263, 189441 213910, 189797 213801, 189863 213394, 190230 213295, 190305 212881, 190232 212521, 190597 212416, 190527 212045, 190904 211955, 190968 211543, 191333 211450, 191398 211033, 191769 210929, 191702 210561, 192075 210458, 192010 210090, 192387 209987, 192509 209189, 192779 209101, 192659 208948, 192840 208898, 192807 208707, 193184 208605, 193131 208320, 192997 208265, 192914 208042, 193133 208105, 193491 208130, 193607 207330, 193975 207223, 194033 206825, 194399 206727, 194460 206322, 194830 206217, 194769 205845, 195094 205753, 195088 205710, 195137 205727, 195088 205374, 195460 205270, 195555 204465, 195925 204377, 195870 203991, 196248 203890, 196189 203517, 196562 203414, 196571 202978, 196982 202909, 197032 202509, 196980 202140, 197349 202039, 197301 201665, 197550 201591, 197462 201369, 197687 201403, 197718 201161, 198088 201065, 198164 200648, 198098 200293, 198459 200201, 198419 199815, 198786 199740, 198819 199692, 198820 199339, 198731 199328, 198742 199230, 199210 199075, 199243 198805, 199612 198706, 199570 198329, 199940 198226, 199894 197850, 200267 197748, 200313 197351, 200344 197336, 200361 196961, 200721 196845, 200705 196490, 201051 196387, 201007 195994, 201379 195890, 201419 195494, 201681 195420, 201733 195337, 201797 195323, 201850 195374, 202914 195085, 203286 195013, 203608 195279, 204380 195071, 204758 194997, 205145 195245, 205915 195038, 205949 195057, 206292 194965, 206675 195213, 207472 195028, 207513 194984, 207433 194326, 208139 194763, 208187 194751, 208198 194796, 208936 194597, 209310 194493, 209652 194785, 210783 194487, 211127 194769, 211887 194564, 211904 194572, 212636 194366, 212663 193969, 213028 193869, 213040 193607, 212897 193507, 212880 193203, 213194 193427, 213421 193365, 213402 192984, 213778 192883, 213784 192115, 214174 191995, 214180 191626, 214532 191562, 214522 191129, 214893 191026, 214877 190640, 215252 190538, 215271 190150, 215642 190045, 215655 189653, 215771 189619, 215781 189353, 216031 189376, 216044 189162, 216112 189138, 216050 188786, 216008 188778, 216004 188689, 216072 188762, 216421 188730, 216428 188669, 216798 188563, 216789 188184, 217163 188081, 217146 187723, 217067 187713, 217038 187607, 217146 187610, 217311 187424, 217524 187367, 217531 187200, 217904 187096, 217905 186326, 218274 186231, 218267 185837, 218640 185733, 218649 185345, 219023 185239, 219029 184851, 219399 184751, 219396 183984, 219761 183882, 219768 183486, 220141 183382, 220142 183149, 220015 183028, 219880 182796, 220142 182801, 220210 182976, 220523 182895, 220515 182507, 220895 182408, 220888 182020, 221261 181916, 221267 181139, 221642 181032, 221644 180654, 222008 180546, 222009 180160, 222387 180058, 222385 179669, 222756 179566)), ((188743 194702, 188639 195415, 187979 195596, 187463 195051, 187300 194412, 187962 194231)), ((191618 194689, 191729 195343, 191069 195524, 190334 195040, 190395 194339, 191054 194158)), ((185622 194782, 185772 195404, 185067 194934, 185117 194659, 185378 194526)), ((202513 194804, 202501 195148, 202174 195210, 201897 194972, 201465 194406, 202129 194224)), ((205441 194777, 205470 195090, 205161 195195, 204822 194945, 204525 194343, 205184 194161)), ((115949 193379, 115652 193181, 115715 193005, 116038 192923)), ((116700 192741, 116596 193015, 116359 193081, 116203 192877, 116394 192683, 116521 192667)), ((77515 185401, 77725 185593, 77537 185918, 77288 185961, 76960 185801, 77113 185262)), ((222757 179018, 222796 179176, 222834 179180, 222757 179400, 222524 179239, 222523 178999)), ((126075 177767, 125917 178099, 125649 178316, 125278 178528, 125164 178494, 125215 178384, 125585 178287, 125820 177765)), ((22835 173891, 22683 174001, 22336 173940, 22684 173657)), ((23062 172597, 23098 172656, 23435 172783, 23506 173007, 23433 173045, 23083 173072, 23138 173420, 23058 173608, 22788 173515, 22816 173257, 22943 173086, 22915 172943, 22945 172697, 22921 172558)), ((24493 172273, 23903 172529, 23686 172494, 23808 172066)), ((24475 170728, 24357 171043, 24352 171329, 23809 171154, 23712 170835, 23808 170583)), ((131176 170166, 130997 170524, 130804 170766, 130591 170824, 130405 170764, 130636 170654, 130806 170268, 130873 170243, 130909 170143)), ((87703 170065, 87660 170256, 87487 170304, 87320 169991, 87664 169896)), ((131726 168823, 131426 168980, 131353 168974, 131586 168499, 131745 168460)), ((91043 165273, 90853 165457, 90718 165509, 90523 165236, 90869 165141)), ((22740 165058, 22708 165423, 22614 165405, 22458 165000, 22685 164907)), ((152546 163146, 152437 163506, 152211 163429, 152010 163292, 152388 163115)), ((23180 162555, 23054 162803, 22692 162698, 22885 163023, 22753 163130, 22685 163270, 22142 163084, 22674 162691, 22697 162314, 23054 162234)), ((206641 162618, 206796 162618, 206808 162777, 206650 162820, 206360 162428)), ((30210 162566, 30322 162719, 29848 162664, 29897 162422, 30111 162273)), ((30545 162087, 30625 162207, 30481 162174, 30181 162185, 30267 161930, 30497 161755)), ((31148 161146, 30929 161241, 30951 161675, 30542 161699, 30589 161371, 30882 160992)), ((31307 160327, 31592 160378, 31742 160596, 31624 160760, 31258 160726, 31138 160372, 31214 160276)), ((32017 159366, 31997 159750, 32042 159807, 31822 159797, 31884 159673, 31940 159378, 32014 159263, 32380 159258)), ((32534 158827, 32462 158906, 32382 159256, 32162 158929, 32434 158544)), ((152430 153099, 152546 153564, 152446 153974, 152343 154012, 152176 154193, 151922 154317, 151807 154302, 151802 154433, 151495 154905, 151309 155116, 150914 155802, 150871 155804, 150870 155851, 150646 156077, 150562 156324, 150073 157020, 149641 157496, 149567 157759, 149356 158130, 149274 158138, 149254 158232, 149011 158461, 148837 158735, 148458 159215, 148556 158811, 148724 158379, 148883 158222, 148958 157926, 149103 157735, 149316 157655, 149359 157429, 149737 156738, 150003 156403, 150135 156024, 150417 155818, 150505 155564, 150599 155434, 150859 154975, 151128 154586, 151413 154383, 151556 154020, 151815 153788, 151902 153242, 151911 152990, 152256 152794)), ((209437 158793, 209460 159173, 209128 158877, 209263 158588)), ((83131 157752, 82774 158528, 82105 158742, 81770 158123, 82047 157317, 82720 157208)), ((33547 157387, 33627 157494, 33315 157450, 33355 157287, 33511 157131)), ((39116 145521, 39364 145607, 39465 145590, 39635 145639, 39593 145824, 39925 146523, 40177 146819, 40235 146713, 40363 146603, 40306 146231, 40480 145992, 40628 146143, 40835 146156, 41032 146419, 41083 146572, 40564 146585, 40726 146890, 40702 147036, 40562 147117, 40287 147099, 40358 147379, 40157 147822, 40193 147892, 40111 147893, 39957 148076, 39861 148291, 39896 148368, 39807 148367, 39593 148514, 39544 148835, 39480 148838, 39246 149007, 39189 149406, 39031 149520, 38731 149427, 38695 149473, 38370 148754, 38200 147828, 38271 147564, 38208 147453, 38235 147390, 38584 147478, 38709 147555, 38773 147426, 38757 147127, 38603 146698, 38544 146326, 38576 145772, 38732 145464)), ((43859 142156, 43963 142503, 43646 142341, 43370 142289, 43457 141959)), ((44171 141682, 44007 141948, 43683 141581, 43880 141391)), ((24416 45497, 24693 45678, 25200 45679, 25466 45668, 25974 45669, 26239 45658, 26747 45659, 27020 45680, 27527 45681, 27792 45669, 28300 45670, 28566 45658, 29073 45659, 29338 45646, 29845 45647, 30119 45671, 30626 45672, 30892 45658, 31399 45659, 31664 45644, 32172 45645, 32446 45673, 32953 45674, 33218 45658, 33725 45659, 33989 45642, 34497 45643, 34773 45678, 35280 45679, 35544 45658, 36051 45659, 36315 45638, 36822 45639, 37086 45618, 37593 45619, 37870 45658, 38377 45659, 38639 45631, 39147 45632, 39409 45604, 39917 45605, 40196 45658, 40703 45658, 40963 45619, 41730 45617, 42226 45683, 42524 45767, 42787 45684, 43283 45687, 43545 45602, 44533 45603, 44832 45795, 59563 45794, 59688 45676, 60180 45673, 60322 45630, 60554 45847, 60716 46268, 60907 46296, 61682 46292, 61904 46485, 62076 46292, 63233 46292, 63455 46488, 67332 46486, 67504 46292, 68660 46292, 68883 46489, 69658 46488, 70039 46678, 71209 46673, 72365 46679, 74310 46672, 75467 46678, 78962 46675, 79133 46472, 79903 46483, 80127 48386, 80383 48432, 80159 48711, 80166 48815, 79154 49957, 79190 50343, 78862 50732, 78290 51383, 78522 51502, 78206 51657, 78225 51863, 77930 52172, 78046 52480, 78186 52613, 77967 52832, 77830 52716, 77559 52668, 77515 52628, 76871 53397, 76911 53776, 76580 54130, 76297 54514, 76422 54717, 76353 54952, 75925 55085, 75942 55355, 75261 56022, 75284 56139, 75631 56439, 75354 56695, 75182 56552, 74638 57171, 74637 57198, 74304 57591, 73293 58838, 73343 59217, 73068 59463, 73003 59568, 73039 59902, 72696 60203, 72359 60608, 71013 62293, 71062 62667, 70726 63087, 70378 63374, 70424 63748, 70078 64026, 69343 64944, 69460 65598, 69208 65831, 68818 66330, 68532 66440, 68117 66973, 68167 67352, 67460 67856, 67504 68234, 67291 68267, 67356 68464, 67153 68491, 67216 69045, 66837 69105, 66881 69479, 66510 69535, 66538 69906, 66176 69964, 65816 70214, 65862 70591, 65510 70826, 65553 71203, 65254 71251, 65285 71343, 65281 71726, 65668 72320, 64891 72061, 64935 72458, 64607 72515, 64612 72559, 64564 72547, 64598 72895, 64228 72956, 64272 73342, 63897 73399, 63944 73789, 63565 73847, 63609 74236, 63165 74504, 63485 74913, 62921 74883, 62936 75038, 62562 75102, 62624 75596, 62911 75825, 62944 76077, 62690 76122, 62461 76069, 62300 76096, 62320 76311, 61948 76379, 61984 76755, 61615 76819, 61663 77214, 61464 77254, 61486 77432, 61304 77417, 61330 77666, 60940 77749, 60997 78122, 60812 78228, 60856 78585, 61066 78879, 60326 78884, 60370 79264, 59992 79337, 60033 79627, 60176 79697, 60192 79828, 60061 79854, 59948 79740, 59662 79792, 59710 80174, 59417 80237, 59426 80317, 59344 80316, 59380 80631, 59006 80706, 59051 81093, 58935 81120, 58967 81381, 58707 81408, 58722 81553, 58336 81640, 58391 82016, 58246 82090, 58251 82304, 58053 82367, 58069 82570, 57710 82723, 57757 83119, 57543 83168, 57563 83329, 57396 83309, 57426 83580, 57212 83632, 57509 84009, 57085 83905, 57100 84046, 56906 84091, 56905 84257, 56745 84291, 56771 84511, 56557 84561, 56757 84851, 56409 84700, 56434 84976, 56076 85132, 56109 85511, 55755 85661, 55804 86049, 55424 86133, 55470 86511, 55094 86599, 55145 86982, 54763 87067, 54814 87449, 54438 87539, 54486 87922, 54111 88013, 54155 88392, 53782 88487, 53829 88871, 53459 89006, 53510 89393, 53137 89521, 53187 89903, 52802 89990, 52859 90376, 52703 90419, 52710 90624, 52515 90692, 52533 90854, 52151 90944, 52201 91272, 52306 91308, 52250 91667, 52034 91376, 51831 91427, 51879 91810, 51495 91900, 51551 92263, 51626 92274, 51566 92388, 51440 92321, 51177 92389, 51224 92772, 50962 92858, 50975 92967, 51310 93535, 50936 93537, 50649 93353, 50528 93387, 50577 93769, 50267 93859, 50165 94288, 50128 94307, 49991 94714, 49647 94794, 49270 95699, 48904 95815, 48694 96638, 48743 97052, 48853 97371, 48734 97692, 48458 97769, 48332 97513, 48248 97434, 48196 97549, 47810 97630, 47535 98478, 47611 98487, 47576 98586, 47522 98510, 47124 98568, 46867 99452, 46666 99899, 46336 99929, 46100 100429, 46451 100333, 46537 100189, 46563 100324, 46492 100589, 46239 100659, 46047 100588, 45956 100874, 45560 100944, 45274 101782, 45602 101736, 45688 101585, 45774 101826, 45571 101825, 45016 102298, 44728 102233, 44593 102414, 44398 103233, 44170 103691, 43893 103620, 43786 103749, 43552 104250, 43393 104889, 43475 105047, 43290 105457, 43260 105105, 42999 105123, 42722 105625, 42534 105997, 42898 105981, 42778 106445, 42451 106217, 42462 106099, 42175 106075, 42048 106213, 41901 107029, 41647 107479, 41328 107496, 41263 107547, 40991 108053, 40938 108396, 41320 108589, 40870 108695, 40821 108864, 40461 108966, 40166 109442, 39916 109898, 39829 110305, 39431 110378, 39382 110798, 39549 110775, 39417 110972, 39457 111172, 39103 111282, 39169 111630, 38792 111757, 38588 111998, 38485 112383, 38346 112377, 38285 112664, 37909 112761, 37845 113179, 37734 113547, 37423 113581, 37397 113690, 37482 114047, 37105 114157, 37190 114514, 37029 114567, 37004 114799, 36791 114846, 36754 115023, 36402 115058, 36360 115100, 36322 115532, 35926 115607, 36030 116002, 35610 116075, 35729 116457, 35880 116433, 35978 116715, 35708 116634, 35719 116476, 35304 116542, 35299 116972, 35376 116958, 35363 117042, 35287 117063, 35230 117373, 34881 117419, 34856 117488, 34934 117850, 34546 117940, 34628 118322, 34232 118411, 34196 118820, 33802 118904, 33785 119312, 33929 119293, 33978 119588, 34239 119951, 33966 119909, 33504 120034, 33504 120164, 33090 120298, 33318 120877, 32753 120620, 32685 121180, 32362 121273, 32332 121391, 32369 121657, 31958 121737, 32041 122132, 31617 122202, 31633 122600, 31865 122572, 31839 122824, 31605 122889, 31559 123007, 31223 123099, 31217 123135, 30926 123216, 31072 123565, 31093 123746, 30912 123795, 30926 123985, 30558 124091, 30513 124480, 30154 124540, 30114 124986, 29712 125062, 29777 125465, 29366 125541, 29439 125946, 29018 126018, 29002 126835, 28643 126893, 28609 127338, 28206 127410, 28214 127831, 27819 127911, 27875 128275, 28093 128258, 28109 128478, 27946 128686, 27937 129141, 27518 129029, 27487 129175, 27139 129261, 27110 129681, 26752 129730, 26720 129765, 26763 130166, 26373 130253, 26413 130652, 26000 130726, 26028 131148, 25959 131496, 25646 131601, 25652 132019, 25406 132095, 25410 132217, 25290 132235, 25292 132505, 24925 132562, 24912 133001, 24503 133074, 24535 133496, 24127 133567, 24169 133977, 23759 134053, 23800 134466, 23409 134555, 23407 135337, 23055 135414, 23048 135448, 21448 135412, 21472 134763, 21483 127274, 21477 126689, 20543 126499, 20547 125733, 20740 125475, 20742 123147, 20552 123002, 20549 121848, 20739 121598, 20551 121452, 20549 120297, 20739 120048, 20551 119901, 20549 118747, 20739 118497, 20551 118351, 20549 117196, 20738 116947, 20742 113068, 20552 112923, 20549 111769, 20741 111519, 20551 111373, 20549 110219, 20739 109969, 20551 109823, 20549 108668, 20739 108419, 20551 108272, 20550 107307, 20543 107118, 20546 106531, 20263 106323, 20249 106152, 20289 105938, 19975 105771, 19971 105529, 19902 105384, 19903 104888, 20107 104860, 20043 104711, 20055 104570, 20058 103937, 20048 103797, 20057 103019, 20053 101752, 19921 101506, 19914 101119, 20734 100873, 20730 100098, 20726 82901, 20732 80715, 20725 78390, 20733 77861, 20682 77377, 20679 76060, 20673 75926, 20673 74375, 20791 74122, 20766 73599, 20920 73346, 20888 72825, 20780 72572, 20826 72049, 20943 71796, 21012 71314, 21026 70499, 21067 69857, 21079 69335, 21108 68560, 21174 68195, 21159 67397, 20693 67144, 20633 66757, 20627 65980, 20613 65594, 20617 64430, 20611 64297, 20643 63656, 20651 62880, 20644 62747, 20643 61329, 20635 61197, 20626 60556, 20634 60167, 20616 59647, 20612 59006, 20626 58617, 20635 57452, 20621 56933, 20637 56543, 20635 55902, 20623 55771, 20605 55130, 20589 54605, 20479 53698, 20498 53443, 20502 52802, 20483 52673, 20484 52032, 20495 51895, 20488 51253, 20464 51125, 20462 50484, 20438 50222, 20439 49193, 20980 48996, 20972 48796, 21054 48617, 22249 48387, 22365 48176, 22528 47991, 22803 46284, 23023 45522, 23179 45567, 23686 45577, 23908 45496), (27459 128386, 27528 128768, 27898 128695, 27847 128326)), ((46309 131406, 46100 132193, 45817 132066, 45755 131944, 45798 131545, 45735 131174, 46083 130719)), ((46265 129867, 46083 130664, 45720 130403, 45769 130003, 45853 129772, 46158 129536)), ((54828 117709, 54891 117423, 55016 117220)), ((56066 115552, 56016 115584, 55910 115981, 55820 116114, 55765 116020, 55985 115528, 56047 115473)), ((59963 111769, 59714 112290, 59647 112321, 59601 112256, 59642 112169, 59706 111568, 59949 111540)), ((62416 108104, 62244 108298, 62197 108054, 62278 107868, 62506 107656)), ((57993 100763, 57795 101073, 57770 100618, 58007 100553)), ((49407 98770, 49043 99607, 48336 99801, 48010 99151, 48287 98338, 48992 98144)), ((53524 90588, 53555 90831, 53318 90908, 53183 90693, 53153 90576, 53273 90546)), ((56329 85838, 56370 86162, 55836 86037, 56054 85835)), ((222336 47944, 222395 48012, 222777 48153, 222736 48544, 222778 49316, 222736 49687, 222776 50867, 222795 51643, 222701 52375, 222699 53594, 222734 53973, 222663 54767, 222651 55437, 222681 55925, 222655 56215, 222650 56987, 222654 57483, 222627 58132, 222631 58523, 222568 59151, 222623 59817, 222677 60190, 222569 60413, 222370 60649, 222312 61066, 222756 61068, 223426 61317, 223377 61372, 222756 61414, 222487 61515, 222007 61657, 221730 61613, 221633 61475, 221483 61525, 221260 61479, 221073 61600, 220593 61536, 220524 61179, 220568 61156, 220425 61014, 220480 61180, 220318 61410, 220141 61322, 219901 61479, 219414 61586, 219414 49194, 217175 49194, 217219 49066, 217149 48897, 217135 48627, 217222 48422, 217177 48323, 217350 48304, 218065 47960, 218125 47964, 218516 48221, 218898 48295, 219284 48120, 219664 47874, 220022 48066, 220456 48162, 220840 48174, 221181 48040, 221560 47983, 221979 47772)), ((86963 56778, 86303 57198, 86321 57587, 85769 57802, 85799 57221, 86214 56722, 86685 56693)), ((174552 46418, 182693 46412, 182828 46417, 188121 46412, 188256 46418, 191222 46411, 191357 46418, 194323 46409, 194458 46417, 197425 46407, 197560 46416, 199751 46409, 199886 46418, 201049 46413, 201302 46688, 201824 46740, 202094 46910, 202987 46913, 204017 46885, 204149 46822, 204809 46823, 205309 46801, 206086 46789, 206360 46660, 206474 46659, 206748 46390, 206861 46384, 207135 46236, 207249 46235, 207522 46465, 207636 46459, 207910 46560, 208023 46555, 208243 46722, 208436 48071, 208472 48065, 208520 48292, 209213 47870, 209605 48229, 209954 48401, 209935 48462, 210024 48635, 210019 48398, 210342 48113, 210415 48115, 210759 47945, 211151 48229, 211538 48432, 211577 48654, 211555 48434, 212313 47984, 212701 48021, 213120 48192, 213452 48383, 213454 48696, 213563 48746, 213515 48380, 213863 48181, 214304 47874, 214692 48624, 214728 48633, 215442 48174, 215865 47811, 216185 47831, 216603 48152, 216919 48328, 216984 48875, 216970 49194, 167425 49194, 167789 48811, 168129 48436, 168490 46070, 168738 45582, 168888 45717, 170945 45706, 171214 45716, 174047 45702, 174299 45581))) \ No newline at end of file From fccc5bd7fe21a8b8453d8f28d6ae7a1ae8b69b32 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Mon, 20 Nov 2023 18:51:56 +0000 Subject: [PATCH 454/470] Applied clang-format. --- include/utils/SVG.h | 46 ++++++----- include/utils/polygon.h | 8 +- src/WallsComputation.cpp | 74 +++++++++-------- src/utils/polygon.cpp | 168 ++++++++++++++++++++++++--------------- 4 files changed, 174 insertions(+), 122 deletions(-) diff --git a/include/utils/SVG.h b/include/utils/SVG.h index 2a4d4cbe55..d0fb38bbe8 100644 --- a/include/utils/SVG.h +++ b/include/utils/SVG.h @@ -1,13 +1,13 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef SVG_H #define SVG_H #include +#include // for file output #include -#include // for file output #include "AABB.h" #include "ExtrusionLine.h" //To accept variable-width paths. @@ -22,7 +22,8 @@ class FPoint3; class SVG : NoCopy { public: - enum class Color { + enum class Color + { BLACK, WHITE, GRAY, @@ -43,18 +44,20 @@ class SVG : NoCopy Color color; int r, g, b; ColorObject(Color color) - : is_enum(true) - , color(color) - {} + : is_enum(true) + , color(color) + { + } ColorObject(int r, int g, int b) - : is_enum(false) - , r(r) - , g(g) - , b(b) - {} + : is_enum(false) + , r(r) + , g(g) + , b(b) + { + } }; -private: +private: std::string toString(const Color color) const; std::string toString(const ColorObject& color) const; @@ -106,10 +109,10 @@ class SVG : NoCopy /*! * \brief Draws a polyline on the canvas. - * + * * The polyline is the set of line segments between each pair of consecutive * points in the specified vector. - * + * * \param polyline A set of points between which line segments must be * drawn. * \param color The colour of the line segments. If this is not specified, @@ -125,14 +128,14 @@ class SVG : NoCopy /*! * \brief Draws a dashed line on the canvas from point A to point B. - * + * * This is useful in the case where multiple lines may overlap each other. - * + * * \param a The starting endpoint of the line. * \param b The ending endpoint of the line. * \param color The stroke colour of the line. */ - void writeDashedLine(const Point& a,const Point& b, ColorObject color = Color::BLACK) const; + void writeDashedLine(const Point& a, const Point& b, ColorObject color = Color::BLACK) const; template void printf(const char* txt, Args&&... args) const; @@ -200,10 +203,11 @@ class SVG : NoCopy * @param stroke_width The width of the lines. */ template - void writeVoronoiDiagram(const boost::polygon::voronoi_diagram& voronoi_diagram, const Color color = Color::BLACK, const float stroke_width = 0.1) const { - for (const auto& edge: voronoi_diagram.edges()) + void writeVoronoiDiagram(const boost::polygon::voronoi_diagram& voronoi_diagram, const Color color = Color::BLACK, const float stroke_width = 0.1) const + { + for (const auto& edge : voronoi_diagram.edges()) { - if (!edge.is_finite()) + if (! edge.is_finite()) { continue; } diff --git a/include/utils/polygon.h b/include/utils/polygon.h index 9f32b5fa72..a0adf4666e 100644 --- a/include/utils/polygon.h +++ b/include/utils/polygon.h @@ -4,10 +4,6 @@ #ifndef UTILS_POLYGON_H #define UTILS_POLYGON_H -#include "../settings/types/Angle.h" //For angles between vertices. -#include "../settings/types/Ratio.h" -#include "IntPoint.h" - #include #include // std::reverse, fill_n array #include @@ -20,6 +16,10 @@ #include #include +#include "../settings/types/Angle.h" //For angles between vertices. +#include "../settings/types/Ratio.h" +#include "IntPoint.h" + #define CHECK_POLY_ACCESS #ifdef CHECK_POLY_ACCESS #define POLY_ASSERT(e) assert(e) diff --git a/src/WallsComputation.cpp b/src/WallsComputation.cpp index 76d55accc4..17e8c44316 100644 --- a/src/WallsComputation.cpp +++ b/src/WallsComputation.cpp @@ -1,8 +1,10 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher -#include +#include "WallsComputation.h" + #include +#include #include #include @@ -10,7 +12,6 @@ #include #include -#include "WallsComputation.h" #include "Application.h" #include "ExtruderTrain.h" #include "Slice.h" @@ -22,7 +23,9 @@ namespace cura { -WallsComputation::WallsComputation(const Settings& settings, const LayerIndex layer_nr) : settings(settings), layer_nr(layer_nr) +WallsComputation::WallsComputation(const Settings& settings, const LayerIndex layer_nr) + : settings(settings) + , layer_nr(layer_nr) { } @@ -44,7 +47,8 @@ void WallsComputation::generateWalls(SliceLayerPart* part, SectionType section_t const bool spiralize = settings.get("magic_spiralize"); const size_t alternate = ((layer_nr % 2) + 2) % 2; - if (spiralize && layer_nr < LayerIndex(settings.get("initial_bottom_layers")) && alternate == 1) //Add extra insets every 2 layers when spiralizing. This makes bottoms of cups watertight. + if (spiralize && layer_nr < LayerIndex(settings.get("initial_bottom_layers")) + && alternate == 1) // Add extra insets every 2 layers when spiralizing. This makes bottoms of cups watertight. { wall_count += 5; } @@ -64,8 +68,7 @@ void WallsComputation::generateWalls(SliceLayerPart* part, SectionType section_t // When spiralizing, generate the spiral insets using simple offsets instead of generating toolpaths if (spiralize) { - const bool recompute_outline_based_on_outer_wall = - settings.get("support_enable") && !settings.get("fill_outline_gaps"); + const bool recompute_outline_based_on_outer_wall = settings.get("support_enable") && ! settings.get("fill_outline_gaps"); generateSpiralInsets(part, line_width_0, wall_0_inset, recompute_outline_based_on_outer_wall); if (layer_nr <= static_cast(settings.get("initial_bottom_layers"))) @@ -81,7 +84,7 @@ void WallsComputation::generateWalls(SliceLayerPart* part, SectionType section_t part->wall_toolpaths = wall_tool_paths.getToolPaths(); part->inner_area = wall_tool_paths.getInnerContour(); } - part->outline = PolygonsPart { Simplify(settings).polygon(part->outline) }; + part->outline = PolygonsPart{ Simplify(settings).polygon(part->outline) }; part->print_outline = part->outline; } @@ -98,7 +101,7 @@ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) { std::ofstream SettingsFile("settings.txt"); SettingsFile.clear(); - for (auto [key, value]: settings.getFlattendSettings()) + for (auto [key, value] : settings.getFlattendSettings()) { if (value == "") { @@ -118,24 +121,27 @@ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) } PolygonFile << "MULTIPOLYGON ("; - const auto paths_str - = multi_polygons - | ranges::views::transform([](const auto& path) { - const auto path_str - = path - | ranges::views::transform([](const auto& path) { - const auto path_str - = path - | ranges::views::transform([](const auto& point) { return fmt::format("{} {}", point.X, point.Y); }) - | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); - return "(" + path_str + ")"; - }) - | ranges::views::join(ranges::views::c_str(" ")) - | ranges::to(); - return "(" + path_str + ")"; - }) - | ranges::views::join(ranges::views::c_str(", ")) - | ranges::to(); + const auto paths_str = multi_polygons + | ranges::views::transform( + [](const auto& path) + { + const auto path_str = path + | ranges::views::transform( + [](const auto& path) + { + const auto path_str = path + | ranges::views::transform( + [](const auto& point) + { + return fmt::format("{} {}", point.X, point.Y); + }) + | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); + return "(" + path_str + ")"; + }) + | ranges::views::join(ranges::views::c_str(" ")) | ranges::to(); + return "(" + path_str + ")"; + }) + | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); PolygonFile << paths_str; PolygonFile << ")"; @@ -143,16 +149,16 @@ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) PolygonFile.close(); } - for(SliceLayerPart& part : layer->parts) + for (SliceLayerPart& part : layer->parts) { generateWalls(&part, section); } - //Remove the parts which did not generate a wall. As these parts are too small to print, - // and later code can now assume that there is always minimal 1 wall line. - if(settings.get("wall_line_count") >= 1 && !settings.get("fill_outline_gaps")) + // Remove the parts which did not generate a wall. As these parts are too small to print, + // and later code can now assume that there is always minimal 1 wall line. + if (settings.get("wall_line_count") >= 1 && ! settings.get("fill_outline_gaps")) { - for(size_t part_idx = 0; part_idx < layer->parts.size(); part_idx++) + for (size_t part_idx = 0; part_idx < layer->parts.size(); part_idx++) { if (layer->parts[part_idx].wall_toolpaths.empty() && layer->parts[part_idx].spiral_wall.empty()) { @@ -167,11 +173,11 @@ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) } } -void WallsComputation::generateSpiralInsets(SliceLayerPart *part, coord_t line_width_0, coord_t wall_0_inset, bool recompute_outline_based_on_outer_wall) +void WallsComputation::generateSpiralInsets(SliceLayerPart* part, coord_t line_width_0, coord_t wall_0_inset, bool recompute_outline_based_on_outer_wall) { part->spiral_wall = part->outline.offset(-line_width_0 / 2 - wall_0_inset); - //Optimize the wall. This prevents buffer underruns in the printer firmware, and reduces processing time in CuraEngine. + // Optimize the wall. This prevents buffer underruns in the printer firmware, and reduces processing time in CuraEngine. const ExtruderTrain& train_wall = settings.get("wall_0_extruder_nr"); part->spiral_wall = Simplify(train_wall.settings).polygon(part->spiral_wall); part->spiral_wall.removeDegenerateVerts(); @@ -185,4 +191,4 @@ void WallsComputation::generateSpiralInsets(SliceLayerPart *part, coord_t line_w } } -}//namespace cura +} // namespace cura diff --git a/src/utils/polygon.cpp b/src/utils/polygon.cpp index d89381078b..447d5de056 100644 --- a/src/utils/polygon.cpp +++ b/src/utils/polygon.cpp @@ -1,13 +1,13 @@ -//Copyright (c) 2022 Ultimaker B.V. -//CuraEngine is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// CuraEngine is released under the terms of the AGPLv3 or higher. #include "utils/polygon.h" #include -#include #include #include +#include #include #include #include @@ -112,7 +112,14 @@ void Polygons::makeConvex() Polygon convexified; // Start from a vertex that is known to be on the convex hull: The one with the lowest X. - const size_t start_index = std::min_element(poly.begin(), poly.end(), [](Point a, Point b) { return a.X == b.X ? a.Y < b.Y : a.X < b.X; }) - poly.begin(); + const size_t start_index = std::min_element( + poly.begin(), + poly.end(), + [](Point a, Point b) + { + return a.X == b.X ? a.Y < b.Y : a.X < b.X; + }) + - poly.begin(); convexified.path->push_back(poly[start_index]); for (size_t i = 1; i <= poly.size(); ++i) @@ -378,14 +385,19 @@ Polygons Polygons::offset(const std::vector& offset_dists) const Polygons ret; int i = 0; - for (auto& poly_line : this->paths | ranges::views::filter([](const auto& path){ return ! path.empty(); })) + for (auto& poly_line : this->paths + | ranges::views::filter( + [](const auto& path) + { + return ! path.empty(); + })) { std::vector ret_poly_line; auto prev_p = poly_line.back(); auto prev_dist = offset_dists[i + poly_line.size() - 1]; - for (const auto& p: poly_line) + for (const auto& p : poly_line) { auto offset_dist = offset_dists[i]; @@ -403,7 +415,7 @@ Polygons Polygons::offset(const std::vector& offset_dists) const prev_p = p; prev_dist = offset_dist; - i ++; + i++; } ret.add(ret_poly_line); @@ -478,8 +490,11 @@ void PolygonRef::removeColinearEdges(const AngleRadians max_deviation_angle) const Point& pt = rpath[point_idx]; const Point& next = rpath[(point_idx + 1) % pathlen]; - float angle = LinearAlg2D::getAngleLeft(prev, pt, next); // [0 : 2 * pi] - if (angle >= M_PI) {angle -= M_PI;} // map [pi : 2 * pi] to [0 : pi] + float angle = LinearAlg2D::getAngleLeft(prev, pt, next); // [0 : 2 * pi] + if (angle >= M_PI) + { + angle -= M_PI; + } // map [pi : 2 * pi] to [0 : pi] // Check if the angle is within limits for the point to 'make sense', given the maximum deviation. // If the angle indicates near-parallel segments ignore the point 'pt' @@ -502,8 +517,7 @@ void PolygonRef::removeColinearEdges(const AngleRadians max_deviation_angle) process_indices.clear(); process_indices.insert(process_indices.end(), skip_indices.begin(), skip_indices.end()); } - } - while (num_removed_in_iteration > 0); + } while (num_removed_in_iteration > 0); } void PolygonRef::applyMatrix(const PointMatrix& matrix) @@ -683,7 +697,7 @@ void Polygons::removeSmallAreaCircumference(const double min_area_size, const co { // containing parent outline is removed; hole should be removed as well } - else if (!remove_holes || (circumference >= min_circumference_size && std::abs(area) >= min_area_size)) + else if (! remove_holes || (circumference >= min_circumference_size && std::abs(area) >= min_area_size)) { // keep hole-polygon if we do not remove holes, or if its // circumference is bigger then the minimum circumference size @@ -707,7 +721,7 @@ void Polygons::removeDegenerateVertsPolyline() void Polygons::_removeDegenerateVerts(const bool for_polyline) { Polygons& thiss = *this; - for(size_t poly_idx = 0; poly_idx < size(); poly_idx++) + for (size_t poly_idx = 0; poly_idx < size(); poly_idx++) { PolygonRef poly = thiss[poly_idx]; Polygon result; @@ -719,28 +733,28 @@ void Polygons::_removeDegenerateVerts(const bool for_polyline) return dot(last_line, next_line) == -1 * vSize(last_line) * vSize(next_line); }; - //With polylines, skip the first and last vertex. + // With polylines, skip the first and last vertex. const size_t start_vertex = for_polyline ? 1 : 0; const size_t end_vertex = for_polyline ? poly.size() - 1 : poly.size(); - for(size_t i = 0; i < start_vertex; ++i) + for (size_t i = 0; i < start_vertex; ++i) { - result.add(poly[i]); //Add everything before the start vertex. + result.add(poly[i]); // Add everything before the start vertex. } bool isChanged = false; - for(size_t idx = start_vertex; idx < end_vertex; idx++) + for (size_t idx = start_vertex; idx < end_vertex; idx++) { const Point& last = (result.size() == 0) ? poly.back() : result.back(); - if(idx + 1 >= poly.size() && result.size() == 0) + if (idx + 1 >= poly.size() && result.size() == 0) { break; } const Point& next = (idx + 1 >= poly.size()) ? result[0] : poly[idx + 1]; - if(isDegenerate(last, poly[idx], next)) + if (isDegenerate(last, poly[idx], next)) { // lines are in the opposite direction // don't add vert to the result isChanged = true; - while(result.size() > 1 && isDegenerate(result[result.size() - 2], result.back(), next)) + while (result.size() > 1 && isDegenerate(result[result.size() - 2], result.back(), next)) { result.pop_back(); } @@ -751,14 +765,14 @@ void Polygons::_removeDegenerateVerts(const bool for_polyline) } } - for(size_t i = end_vertex; i < poly.size(); ++i) + for (size_t i = end_vertex; i < poly.size(); ++i) { - result.add(poly[i]); //Add everything after the end vertex. + result.add(poly[i]); // Add everything after the end vertex. } - if(isChanged) + if (isChanged) { - if(for_polyline || result.size() > 2) + if (for_polyline || result.size() > 2) { *poly = *result; } @@ -789,16 +803,16 @@ Polygons Polygons::fromWkt(const std::string& wkt) Polygons ret; Polygon outer; - for (const auto& point: poly.outer()) + for (const auto& point : poly.outer()) { outer.add(Point(point.x(), point.y())); } ret.add(outer); - for (const auto& hole: poly.inners()) + for (const auto& hole : poly.inners()) { Polygon inner; - for (const auto& point: hole) + for (const auto& point : hole) { inner.add(Point(point.x(), point.y())); } @@ -812,16 +826,19 @@ void Polygons::writeWkt(std::ostream& stream) const { stream << "POLYGON ("; const auto paths_str = paths - | ranges::views::transform([](const auto& path) { - const auto path_str - = path - | ranges::views::transform([](const auto& point) { return fmt::format("{} {}", point.X, point.Y); }) - | ranges::views::join(ranges::views::c_str(", ")) - | ranges::to(); - return "(" + path_str + ")"; - }) - | ranges::views::join(ranges::views::c_str(" ")) - | ranges::to(); + | ranges::views::transform( + [](const auto& path) + { + const auto path_str = path + | ranges::views::transform( + [](const auto& point) + { + return fmt::format("{} {}", point.X, point.Y); + }) + | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); + return "(" + path_str + ")"; + }) + | ranges::views::join(ranges::views::c_str(" ")) | ranges::to(); stream << paths_str; stream << ")"; @@ -905,7 +922,7 @@ bool ConstPolygonRef::smooth_corner_complex(const Point p1, ListPolyIt& p0_it, L // handle this separately to avoid rounding problems below in the getPointOnLineWithDist function // p0_it and p2_it are already correct } - else if (!backward_is_blocked && !forward_is_blocked) + else if (! backward_is_blocked && ! forward_is_blocked) { // introduce two new points // 1----b---->2 // ^ / @@ -923,14 +940,15 @@ bool ConstPolygonRef::smooth_corner_complex(const Point p1, ListPolyIt& p0_it, L const Point p0_2 = p0_2_it.p(); const Point v02_2 = p0_2 - p2_2; const int64_t v02_2_size = vSize(v02_2); - float progress = std::min(1.0, INT2MM(shortcut_length - v02_size) / INT2MM(v02_2_size - v02_size)); // account for rounding error when v02_2_size is approx equal to v02_size + float progress + = std::min(1.0, INT2MM(shortcut_length - v02_size) / INT2MM(v02_2_size - v02_size)); // account for rounding error when v02_2_size is approx equal to v02_size assert(progress >= 0.0f && progress <= 1.0f && "shortcut length must be between last length and new length"); const Point new_p0 = p0_it.p() + (p0_2 - p0_it.p()) * progress; p0_it = ListPolyIt::insertPointNonDuplicate(p0_2_it, p0_it, new_p0); const Point new_p2 = p2_it.p() + (p2_2 - p2_it.p()) * progress; p2_it = ListPolyIt::insertPointNonDuplicate(p2_it, p2_2_it, new_p2); } - else if (!backward_is_blocked) + else if (! backward_is_blocked) { // forward is blocked, back is open // | // 1->b @@ -963,7 +981,7 @@ bool ConstPolygonRef::smooth_corner_complex(const Point p1, ListPolyIt& p0_it, L } } } - else if (!forward_is_blocked) + else if (! forward_is_blocked) { // backward is blocked, front is open // 1----2----b----------->2_2 // ^ ,-' @@ -1009,20 +1027,29 @@ bool ConstPolygonRef::smooth_corner_complex(const Point p1, ListPolyIt& p0_it, L return false; } -void ConstPolygonRef::smooth_outward_step(const Point p1, const int64_t shortcut_length2, ListPolyIt& p0_it, ListPolyIt& p2_it, bool& forward_is_blocked, bool& backward_is_blocked, bool& forward_is_too_far, bool& backward_is_too_far) +void ConstPolygonRef::smooth_outward_step( + const Point p1, + const int64_t shortcut_length2, + ListPolyIt& p0_it, + ListPolyIt& p2_it, + bool& forward_is_blocked, + bool& backward_is_blocked, + bool& forward_is_too_far, + bool& backward_is_too_far) { const bool forward_has_converged = forward_is_blocked || forward_is_too_far; const bool backward_has_converged = backward_is_blocked || backward_is_too_far; const Point p0 = p0_it.p(); const Point p2 = p2_it.p(); - bool walk_forward = !forward_has_converged && (backward_has_converged || (vSize2(p2 - p1) < vSize2(p0 - p1))); // whether to walk along the p1-p2 direction or in the p1-p0 direction + bool walk_forward + = ! forward_has_converged && (backward_has_converged || (vSize2(p2 - p1) < vSize2(p0 - p1))); // whether to walk along the p1-p2 direction or in the p1-p0 direction if (walk_forward) { const ListPolyIt p2_2_it = p2_it.next(); const Point p2_2 = p2_2_it.p(); bool p2_is_left = LinearAlg2D::pointIsLeftOfLine(p2, p0, p2_2) >= 0; - if (!p2_is_left) + if (! p2_is_left) { forward_is_blocked = true; return; @@ -1045,7 +1072,7 @@ void ConstPolygonRef::smooth_outward_step(const Point p1, const int64_t shortcut const ListPolyIt p0_2_it = p0_it.prev(); const Point p0_2 = p0_2_it.p(); bool p0_is_left = LinearAlg2D::pointIsLeftOfLine(p0, p0_2, p2) >= 0; - if (!p0_is_left) + if (! p0_is_left) { backward_is_blocked = true; return; @@ -1065,7 +1092,18 @@ void ConstPolygonRef::smooth_outward_step(const Point p1, const int64_t shortcut } } -void ConstPolygonRef::smooth_corner_simple(const Point p0, const Point p1, const Point p2, const ListPolyIt p0_it, const ListPolyIt p1_it, const ListPolyIt p2_it, const Point v10, const Point v12, const Point v02, const int64_t shortcut_length, float cos_angle) +void ConstPolygonRef::smooth_corner_simple( + const Point p0, + const Point p1, + const Point p2, + const ListPolyIt p0_it, + const ListPolyIt p1_it, + const ListPolyIt p2_it, + const Point v10, + const Point v12, + const Point v02, + const int64_t shortcut_length, + float cos_angle) { // 1----b---->2 // ^ / @@ -1259,8 +1297,6 @@ Polygons Polygons::smooth_outward(const AngleDegrees max_angle, int shortcut_len } - - void ConstPolygonRef::splitPolylineIntoSegments(Polygons& result) const { Point last = front(); @@ -1320,7 +1356,7 @@ void ConstPolygonRef::smooth(int remove_length, PolygonRef result) const return false; } const bool p1_is_left_of_v02 = dot1 < 0; - if (!p1_is_left_of_v02) + if (! p1_is_left_of_v02) { // removing p1 wouldn't smooth outward return false; } @@ -1359,7 +1395,7 @@ void ConstPolygonRef::smooth(int remove_length, PolygonRef result) const const int64_t dot1 = dot(v02T, v12); const Point v13T = turn90CCW(v13); const int64_t dot2 = dot(v13T, v12); - bool push_point = force_push || !is_zigzag(v02_size, v12_size, v13_size, dot1, dot2); + bool push_point = force_push || ! is_zigzag(v02_size, v12_size, v13_size, dot1, dot2); force_push = false; if (push_point) { @@ -1484,12 +1520,12 @@ std::vector Polygons::splitIntoParts(bool unionAll) const void Polygons::splitIntoParts_processPolyTreeNode(ClipperLib::PolyNode* node, std::vector& ret) const { - for(int n=0; nChildCount(); n++) + for (int n = 0; n < node->ChildCount(); n++) { ClipperLib::PolyNode* child = node->Childs[n]; PolygonsPart part; part.add(child->Contour); - for(int i=0; iChildCount(); i++) + for (int i = 0; i < child->ChildCount(); i++) { part.add(child->Childs[i]->Contour); splitIntoParts_processPolyTreeNode(child->Childs[i], ret); @@ -1535,11 +1571,17 @@ unsigned int PartsView::getPartContaining(unsigned int poly_idx, unsigned int* b for (unsigned int part_idx_now = 0; part_idx_now < partsView.size(); part_idx_now++) { const std::vector& partView = partsView[part_idx_now]; - if (partView.size() == 0) { continue; } + if (partView.size() == 0) + { + continue; + } std::vector::const_iterator result = std::find(partView.begin(), partView.end(), poly_idx); if (result != partView.end()) { - if (boundary_poly_idx) { *boundary_poly_idx = partView[0]; } + if (boundary_poly_idx) + { + *boundary_poly_idx = partView[0]; + } return part_idx_now; } } @@ -1591,14 +1633,14 @@ PartsView Polygons::splitIntoPartsView(bool unionAll) void Polygons::splitIntoPartsView_processPolyTreeNode(PartsView& partsView, Polygons& reordered, ClipperLib::PolyNode* node) const { - for(int n=0; nChildCount(); n++) + for (int n = 0; n < node->ChildCount(); n++) { ClipperLib::PolyNode* child = node->Childs[n]; partsView.emplace_back(); unsigned int pos = partsView.size() - 1; partsView[pos].push_back(reordered.size()); - reordered.add(child->Contour); //TODO: should this steal the internal representation for speed? - for(int i = 0; i < child->ChildCount(); i++) + reordered.add(child->Contour); // TODO: should this steal the internal representation for speed? + for (int i = 0; i < child->ChildCount(); i++) { partsView[pos].push_back(reordered.size()); reordered.add(child->Childs[i]->Contour); @@ -1629,15 +1671,15 @@ void Polygons::ensureManifold() for (Point p : duplicate_locations) { PolygonRef dot = removal_dots.newPoly(); - dot.add(p + Point(0,5)); - dot.add(p + Point(5,0)); - dot.add(p + Point(0,-5)); - dot.add(p + Point(-5,0)); + dot.add(p + Point(0, 5)); + dot.add(p + Point(5, 0)); + dot.add(p + Point(0, -5)); + dot.add(p + Point(-5, 0)); } - if ( ! removal_dots.empty()) + if (! removal_dots.empty()) { *this = polys.difference(removal_dots); } } -}//namespace cura +} // namespace cura From 18ebef6d701ec1a5fccd50b67a5b7850dae8cbbb Mon Sep 17 00:00:00 2001 From: Thomas Rahm <67757218+ThomasRahm@users.noreply.github.com> Date: Wed, 22 Nov 2023 10:00:53 +0100 Subject: [PATCH 455/470] Fix formatting Co-authored-by: Casper Lamboo --- include/SupportInfillPart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 7b1c94c8f0..354e37fe73 100644 --- a/include/SupportInfillPart.h +++ b/include/SupportInfillPart.h @@ -33,7 +33,7 @@ class SupportInfillPart // for infill_areas[x][n], x means the density level and n means the thickness std::vector wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx. - coord_t custom_line_distance;//!< The distance between support infill lines. 0 means use the default line distance instead. + coord_t custom_line_distance; //!< The distance between support infill lines. 0 means use the default line distance instead. bool use_fractional_config; //!< Request to use the configuration used to fill a partial layer height here, instead of the normal full layer height configuration. SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0); From bb3f93c665cb45b4d849c162aa43fd70039ddf09 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 22 Nov 2023 14:40:56 +0100 Subject: [PATCH 456/470] Add Basic Stress Benchmarking Reads in a number of known problematic polygons and settings and counts how many crashes occur in those shapes Contributes to CURA-11378 --- CMakeLists.txt | 3 + conanfile.py | 1 + stress_benchmark/CMakeLists.txt | 9 + stress_benchmark/stress_bm_voronoi.cpp | 173 ++++++++++++++++++ .../stress_bm_voronoi_resources/001.settings | 0 .../stress_bm_voronoi_resources/001.wkt | 0 .../stress_bm_voronoi_resources/002.settings | 0 .../stress_bm_voronoi_resources/002.wkt | 0 .../stress_bm_voronoi_resources/003.settings | 0 .../stress_bm_voronoi_resources/003.wkt | 0 .../stress_bm_voronoi_resources/004.settings | 0 .../stress_bm_voronoi_resources/004.wkt | 0 .../stress_bm_voronoi_resources/005.settings | 0 .../stress_bm_voronoi_resources/005.wkt | 0 .../stress_bm_voronoi_resources/006.settings | 0 .../stress_bm_voronoi_resources/006.wkt | 0 .../stress_bm_voronoi_resources/007.settings | 0 .../stress_bm_voronoi_resources/007.wkt | 0 .../stress_bm_voronoi_resources/008.settings | 0 .../stress_bm_voronoi_resources/008.wkt | 0 .../stress_bm_voronoi_resources/009.settings | 0 .../stress_bm_voronoi_resources/009.wkt | 0 .../stress_bm_voronoi_resources/010.settings | 0 .../stress_bm_voronoi_resources/010.wkt | 0 .../stress_bm_voronoi_resources/011.settings | 0 .../stress_bm_voronoi_resources/011.wkt | 0 tests/CMakeLists.txt | 1 - tests/VoronoiCrashTest.cpp | 137 -------------- 28 files changed, 186 insertions(+), 138 deletions(-) create mode 100644 stress_benchmark/CMakeLists.txt create mode 100644 stress_benchmark/stress_bm_voronoi.cpp rename tests/voronoi_crash_resources/settings_001.txt => stress_benchmark/stress_bm_voronoi_resources/001.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_001.wkt => stress_benchmark/stress_bm_voronoi_resources/001.wkt (100%) rename tests/voronoi_crash_resources/settings_002.txt => stress_benchmark/stress_bm_voronoi_resources/002.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_002.wkt => stress_benchmark/stress_bm_voronoi_resources/002.wkt (100%) rename tests/voronoi_crash_resources/settings_003.txt => stress_benchmark/stress_bm_voronoi_resources/003.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_003.wkt => stress_benchmark/stress_bm_voronoi_resources/003.wkt (100%) rename tests/voronoi_crash_resources/settings_004.txt => stress_benchmark/stress_bm_voronoi_resources/004.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_004.wkt => stress_benchmark/stress_bm_voronoi_resources/004.wkt (100%) rename tests/voronoi_crash_resources/settings_005.txt => stress_benchmark/stress_bm_voronoi_resources/005.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_005.wkt => stress_benchmark/stress_bm_voronoi_resources/005.wkt (100%) rename tests/voronoi_crash_resources/settings_006.txt => stress_benchmark/stress_bm_voronoi_resources/006.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_006.wkt => stress_benchmark/stress_bm_voronoi_resources/006.wkt (100%) rename tests/voronoi_crash_resources/settings_007.txt => stress_benchmark/stress_bm_voronoi_resources/007.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_007.wkt => stress_benchmark/stress_bm_voronoi_resources/007.wkt (100%) rename tests/voronoi_crash_resources/settings_008.txt => stress_benchmark/stress_bm_voronoi_resources/008.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_008.wkt => stress_benchmark/stress_bm_voronoi_resources/008.wkt (100%) rename tests/voronoi_crash_resources/settings_009.txt => stress_benchmark/stress_bm_voronoi_resources/009.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_009.wkt => stress_benchmark/stress_bm_voronoi_resources/009.wkt (100%) rename tests/voronoi_crash_resources/settings_010.txt => stress_benchmark/stress_bm_voronoi_resources/010.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_010.wkt => stress_benchmark/stress_bm_voronoi_resources/010.wkt (100%) rename tests/voronoi_crash_resources/settings_011.txt => stress_benchmark/stress_bm_voronoi_resources/011.settings (100%) rename tests/voronoi_crash_resources/slice_polygon_011.wkt => stress_benchmark/stress_bm_voronoi_resources/011.wkt (100%) delete mode 100644 tests/VoronoiCrashTest.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c2aabc528..d521b683d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ AssureOutOfSourceBuilds() option(ENABLE_ARCUS "Enable support for ARCUS" ON) option(ENABLE_TESTING "Build with unit tests" OFF) +option(ENABLE_BENCHMARKS "Build with Benchmarks" OFF) option(EXTENSIVE_WARNINGS "Build with all warnings" ON) option(ENABLE_PLUGINS "Build with plugins" ON) option(ENABLE_REMOTE_PLUGINS "Build with all warnings" OFF) @@ -271,6 +272,8 @@ if (ENABLE_TESTING OR ENABLE_BENCHMARKS) endif () endif () +add_subdirectory(stress_benchmark) + if (ENABLE_TESTING) enable_testing() add_subdirectory(tests) diff --git a/conanfile.py b/conanfile.py index b3e464843a..97fc114ef9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -51,6 +51,7 @@ def export_sources(self): copy(self, "*", path.join(self.recipe_folder, "src"), path.join(self.export_sources_folder, "src")) copy(self, "*", path.join(self.recipe_folder, "include"), path.join(self.export_sources_folder, "include")) copy(self, "*", path.join(self.recipe_folder, "benchmark"), path.join(self.export_sources_folder, "benchmark")) + copy(self, "*", path.join(self.recipe_folder, "stress_benchmark"), path.join(self.export_sources_folder, "benchmark")) copy(self, "*", path.join(self.recipe_folder, "tests"), path.join(self.export_sources_folder, "tests")) def config_options(self): diff --git a/stress_benchmark/CMakeLists.txt b/stress_benchmark/CMakeLists.txt new file mode 100644 index 0000000000..c27cc81366 --- /dev/null +++ b/stress_benchmark/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2023 Ultimaker B.V. +# CuraEngine is released under the terms of the AGPLv3 or higher. + +message(STATUS "Building stress benchmarks...") + + +add_executable(stress_bm_voronoi stress_bm_voronoi.cpp) +target_link_libraries(stress_bm_voronoi PRIVATE _CuraEngine test_helpers range-v3::range-v3 fmt::fmt spdlog::spdlog boost::boost) +target_include_directories(stress_bm_voronoi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/generated) \ No newline at end of file diff --git a/stress_benchmark/stress_bm_voronoi.cpp b/stress_benchmark/stress_bm_voronoi.cpp new file mode 100644 index 0000000000..f3066fc5e0 --- /dev/null +++ b/stress_benchmark/stress_bm_voronoi.cpp @@ -0,0 +1,173 @@ +// Copyright (c) 2023 UltiMaker +// CuraEngine is released under the terms of the AGPLv3 or higher + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "WallsComputation.h" //Unit under test. +#include "settings/Settings.h" //Settings to generate walls with. +#include "sliceDataStorage.h" //Sl +#include "utils/polygon.h" //To create example polygons. + +struct Resource +{ + std::filesystem::path wkt_file; + std::filesystem::path settings_file; + + std::string stem() const + { + return wkt_file.stem().string(); + } + + std::vector polygons() const + { + using point_type = boost::geometry::model::d2::point_xy; + using polygon_type = boost::geometry::model::polygon; + using multi_polygon_type = boost::geometry::model::multi_polygon; + + multi_polygon_type boost_polygons{}; + std::ifstream file{ wkt_file }; + if (! file) + { + spdlog::error("Could not read shapes from: {}", wkt_file.string()); + } + + std::stringstream buffer; + buffer << file.rdbuf(); + + boost::geometry::read_wkt(buffer.str(), boost_polygons); + + std::vector polygons; + + for (const auto& boost_polygon : boost_polygons) + { + cura::Polygons polygon; + + cura::Polygon outer; + for (const auto& point : boost_polygon.outer()) + { + outer.add(cura::Point(point.x(), point.y())); + } + polygon.add(outer); + + for (const auto& hole : boost_polygon.inners()) + { + cura::Polygon inner; + for (const auto& point : hole) + { + inner.add(cura::Point(point.x(), point.y())); + } + polygon.add(inner); + } + + polygons.push_back(polygon); + } + return polygons; + } + + cura::Settings settings() const + { + cura::Settings settings; + std::ifstream file{ settings_file }; + if (! file) + { + spdlog::error("Could not read settings from: {}", settings_file.string()); + } + + std::string line; + while (std::getline(file, line)) + { + std::istringstream iss(line); + std::string key; + std::string value; + + if (std::getline(std::getline(iss, key, '='), value)) + { + settings.add(key, value); + } + } + return settings; + } +}; + +std::vector getResources() +{ + auto resource_path = std::filesystem::path(std::source_location::current().file_name()).parent_path().append("stress_bm_voronoi_resources"); + + std::vector resources; + for (const auto& p : std::filesystem::recursive_directory_iterator(resource_path)) + { + if (p.path().extension() == ".wkt") + { + auto settings = p.path(); + settings.replace_extension(".settings"); + spdlog::info("Adding resources for: {}", p.path().filename().stem().string()); + resources.emplace_back(Resource{ .wkt_file = p, .settings_file = settings }); + } + } + return resources; +}; + +int main() +{ + const auto resources = getResources(); + size_t crashCount = 0; + + for (const auto& resource : resources) + { + const auto& shapes = resource.polygons(); + const auto& settings = resource.settings(); + + pid_t pid = fork(); + + if (pid == -1) + { + spdlog::critical("Unable to fork"); + return 1; + } + + if (pid == 0) + { + cura::SliceLayer layer; + for (const cura::Polygons& shape : shapes) + { + layer.parts.emplace_back(); + cura::SliceLayerPart& part = layer.parts.back(); + part.outline.add(shape); + } + + cura::LayerIndex layer_idx(100); + cura::WallsComputation walls_computation(settings, layer_idx); + + walls_computation.generateWalls(&layer, cura::SectionType::WALL); + exit(EXIT_SUCCESS); + } + else + { + int status; + waitpid(pid, &status, 0); + + if (WIFSIGNALED(status)) + { + ++crashCount; + spdlog::error("Crash detected for: {}", resource.stem()); + } + } + } + spdlog::info("Total number of crashes: {}", crashCount); + return 0; +} \ No newline at end of file diff --git a/tests/voronoi_crash_resources/settings_001.txt b/stress_benchmark/stress_bm_voronoi_resources/001.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_001.txt rename to stress_benchmark/stress_bm_voronoi_resources/001.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_001.wkt b/stress_benchmark/stress_bm_voronoi_resources/001.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_001.wkt rename to stress_benchmark/stress_bm_voronoi_resources/001.wkt diff --git a/tests/voronoi_crash_resources/settings_002.txt b/stress_benchmark/stress_bm_voronoi_resources/002.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_002.txt rename to stress_benchmark/stress_bm_voronoi_resources/002.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_002.wkt b/stress_benchmark/stress_bm_voronoi_resources/002.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_002.wkt rename to stress_benchmark/stress_bm_voronoi_resources/002.wkt diff --git a/tests/voronoi_crash_resources/settings_003.txt b/stress_benchmark/stress_bm_voronoi_resources/003.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_003.txt rename to stress_benchmark/stress_bm_voronoi_resources/003.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_003.wkt b/stress_benchmark/stress_bm_voronoi_resources/003.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_003.wkt rename to stress_benchmark/stress_bm_voronoi_resources/003.wkt diff --git a/tests/voronoi_crash_resources/settings_004.txt b/stress_benchmark/stress_bm_voronoi_resources/004.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_004.txt rename to stress_benchmark/stress_bm_voronoi_resources/004.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_004.wkt b/stress_benchmark/stress_bm_voronoi_resources/004.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_004.wkt rename to stress_benchmark/stress_bm_voronoi_resources/004.wkt diff --git a/tests/voronoi_crash_resources/settings_005.txt b/stress_benchmark/stress_bm_voronoi_resources/005.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_005.txt rename to stress_benchmark/stress_bm_voronoi_resources/005.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_005.wkt b/stress_benchmark/stress_bm_voronoi_resources/005.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_005.wkt rename to stress_benchmark/stress_bm_voronoi_resources/005.wkt diff --git a/tests/voronoi_crash_resources/settings_006.txt b/stress_benchmark/stress_bm_voronoi_resources/006.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_006.txt rename to stress_benchmark/stress_bm_voronoi_resources/006.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_006.wkt b/stress_benchmark/stress_bm_voronoi_resources/006.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_006.wkt rename to stress_benchmark/stress_bm_voronoi_resources/006.wkt diff --git a/tests/voronoi_crash_resources/settings_007.txt b/stress_benchmark/stress_bm_voronoi_resources/007.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_007.txt rename to stress_benchmark/stress_bm_voronoi_resources/007.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_007.wkt b/stress_benchmark/stress_bm_voronoi_resources/007.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_007.wkt rename to stress_benchmark/stress_bm_voronoi_resources/007.wkt diff --git a/tests/voronoi_crash_resources/settings_008.txt b/stress_benchmark/stress_bm_voronoi_resources/008.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_008.txt rename to stress_benchmark/stress_bm_voronoi_resources/008.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_008.wkt b/stress_benchmark/stress_bm_voronoi_resources/008.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_008.wkt rename to stress_benchmark/stress_bm_voronoi_resources/008.wkt diff --git a/tests/voronoi_crash_resources/settings_009.txt b/stress_benchmark/stress_bm_voronoi_resources/009.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_009.txt rename to stress_benchmark/stress_bm_voronoi_resources/009.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_009.wkt b/stress_benchmark/stress_bm_voronoi_resources/009.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_009.wkt rename to stress_benchmark/stress_bm_voronoi_resources/009.wkt diff --git a/tests/voronoi_crash_resources/settings_010.txt b/stress_benchmark/stress_bm_voronoi_resources/010.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_010.txt rename to stress_benchmark/stress_bm_voronoi_resources/010.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_010.wkt b/stress_benchmark/stress_bm_voronoi_resources/010.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_010.wkt rename to stress_benchmark/stress_bm_voronoi_resources/010.wkt diff --git a/tests/voronoi_crash_resources/settings_011.txt b/stress_benchmark/stress_bm_voronoi_resources/011.settings similarity index 100% rename from tests/voronoi_crash_resources/settings_011.txt rename to stress_benchmark/stress_bm_voronoi_resources/011.settings diff --git a/tests/voronoi_crash_resources/slice_polygon_011.wkt b/stress_benchmark/stress_bm_voronoi_resources/011.wkt similarity index 100% rename from tests/voronoi_crash_resources/slice_polygon_011.wkt rename to stress_benchmark/stress_bm_voronoi_resources/011.wkt diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 92543609e6..1e36893cee 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,7 +14,6 @@ set(TESTS_SRC_BASE PathOrderMonotonicTest TimeEstimateCalculatorTest WallsComputationTest - VoronoiCrashTest ) set(TESTS_SRC_INTEGRATION diff --git a/tests/VoronoiCrashTest.cpp b/tests/VoronoiCrashTest.cpp deleted file mode 100644 index d7cb2fdff6..0000000000 --- a/tests/VoronoiCrashTest.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher - -#include -#include -#include -#include - -#include "WallsComputation.h" //Unit under test. -#include "ReadTestSettings.h" -#include "settings/Settings.h" //Settings to generate walls with. -#include "sliceDataStorage.h" //Sl -#include "utils/polygon.h" //To create example polygons. - -#include -#include -#include -#include - -#include -#include - -namespace cura -{ - -class VoronoiCrashTest : public testing::TestWithParam> -{ -public: -}; - -std::vector multiPolygonsFromWkt(const std::string& wkt) -{ - typedef boost::geometry::model::d2::point_xy point_type; - typedef boost::geometry::model::polygon polygon_type; - typedef boost::geometry::model::multi_polygon multi_polygon_type; - - multi_polygon_type boost_polygons {}; - boost::geometry::read_wkt(wkt, boost_polygons); - - std::vector polygons; - - for (const auto& boost_polygon: boost_polygons) - { - Polygons polygon; - - Polygon outer; - for (const auto& point: boost_polygon.outer()) - { - outer.add(Point(point.x(), point.y())); - } - polygon.add(outer); - - for (const auto& hole: boost_polygon.inners()) - { - Polygon inner; - for (const auto& point: hole) - { - inner.add(Point(point.x(), point.y())); - } - polygon.add(inner); - } - - polygons.push_back(polygon); - } - return polygons; -} - -/*! - * - */ -TEST_P(VoronoiCrashTest, SectionsTest) -{ - const auto params = GetParam(); - const std::string polygon_file = std::get<0>(params); - const std::string setting_file = std::get<1>(params); - - spdlog::info("Testing polygon: {}", polygon_file); - spdlog::info("Testing with settings: {}", setting_file); - - std::ifstream file(polygon_file); - std::ostringstream ss; - ss << file.rdbuf(); - const auto shapes = multiPolygonsFromWkt(ss.str()); - - Settings settings; - auto read_settings = readTestSettings(setting_file, settings); - ASSERT_TRUE(read_settings); - - size_t wall_count = settings.get("wall_line_count"); - spdlog::info("wall_count: {}", wall_count); - - SliceLayer layer; - for (const Polygons& shape : shapes) - { - layer.parts.emplace_back(); - SliceLayerPart& part = layer.parts.back(); - part.outline.add(shape); - } - - LayerIndex layer_idx(100); - WallsComputation walls_computation(settings, layer_idx); - - walls_computation.generateWalls(&layer, SectionType::WALL); -} - - -const std::vector polygon_filenames = { - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_001.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_002.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_003.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_004.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_005.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_006.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_007.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_008.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_009.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_010.wkt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/slice_polygon_011.wkt").string(), -}; - -const std::vector setting_filenames = { - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_001.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_002.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_003.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_004.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_005.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_006.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_007.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_008.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_009.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_010.txt").string(), - std::filesystem::path(__FILE__).parent_path().append("voronoi_crash_resources/settings_011.txt").string(), -}; - -INSTANTIATE_TEST_SUITE_P(TestCrashingPolygons, VoronoiCrashTest, testing::Combine(testing::ValuesIn(polygon_filenames), testing::ValuesIn(setting_filenames))); - -} // namespace cura \ No newline at end of file From ce2564977dfa17fb4774df395226ee7c2451ca41 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 23 Nov 2023 09:29:13 +0100 Subject: [PATCH 457/470] Store results as json Contributes to CURA-11378 --- conanfile.py | 1 + stress_benchmark/CMakeLists.txt | 7 +- .../001.settings | 0 .../001.wkt | 0 .../002.settings | 0 .../002.wkt | 0 .../003.settings | 0 .../003.wkt | 0 .../004.settings | 0 .../004.wkt | 0 .../005.settings | 0 .../005.wkt | 0 .../006.settings | 0 .../006.wkt | 0 .../007.settings | 0 .../007.wkt | 0 .../008.settings | 0 .../008.wkt | 0 .../009.settings | 0 .../009.wkt | 0 .../010.settings | 0 .../010.wkt | 0 .../011.settings | 0 .../011.wkt | 0 ...ss_bm_voronoi.cpp => stress_benchmark.cpp} | 125 +++++++++++++----- 25 files changed, 96 insertions(+), 37 deletions(-) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/001.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/001.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/002.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/002.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/003.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/003.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/004.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/004.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/005.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/005.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/006.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/006.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/007.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/007.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/008.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/008.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/009.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/009.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/010.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/010.wkt (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/011.settings (100%) rename stress_benchmark/{stress_bm_voronoi_resources => resources}/011.wkt (100%) rename stress_benchmark/{stress_bm_voronoi.cpp => stress_benchmark.cpp} (55%) diff --git a/conanfile.py b/conanfile.py index 97fc114ef9..c9d7b50c95 100644 --- a/conanfile.py +++ b/conanfile.py @@ -80,6 +80,7 @@ def build_requirements(self): self.test_requires("gtest/1.12.1") if self.options.enable_benchmarks: self.test_requires("benchmark/1.7.0") + self.test_requires("docopt.cpp/0.6.3") def requirements(self): if self.options.enable_arcus: diff --git a/stress_benchmark/CMakeLists.txt b/stress_benchmark/CMakeLists.txt index c27cc81366..0807007234 100644 --- a/stress_benchmark/CMakeLists.txt +++ b/stress_benchmark/CMakeLists.txt @@ -3,7 +3,8 @@ message(STATUS "Building stress benchmarks...") +find_package(docopt REQUIRED) -add_executable(stress_bm_voronoi stress_bm_voronoi.cpp) -target_link_libraries(stress_bm_voronoi PRIVATE _CuraEngine test_helpers range-v3::range-v3 fmt::fmt spdlog::spdlog boost::boost) -target_include_directories(stress_bm_voronoi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/generated) \ No newline at end of file +add_executable(stress_benchmark stress_benchmark.cpp) +target_link_libraries(stress_benchmark PRIVATE _CuraEngine test_helpers spdlog::spdlog boost::boost rapidjson docopt_s) +target_include_directories(stress_benchmark PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/generated) \ No newline at end of file diff --git a/stress_benchmark/stress_bm_voronoi_resources/001.settings b/stress_benchmark/resources/001.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/001.settings rename to stress_benchmark/resources/001.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/001.wkt b/stress_benchmark/resources/001.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/001.wkt rename to stress_benchmark/resources/001.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/002.settings b/stress_benchmark/resources/002.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/002.settings rename to stress_benchmark/resources/002.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/002.wkt b/stress_benchmark/resources/002.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/002.wkt rename to stress_benchmark/resources/002.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/003.settings b/stress_benchmark/resources/003.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/003.settings rename to stress_benchmark/resources/003.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/003.wkt b/stress_benchmark/resources/003.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/003.wkt rename to stress_benchmark/resources/003.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/004.settings b/stress_benchmark/resources/004.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/004.settings rename to stress_benchmark/resources/004.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/004.wkt b/stress_benchmark/resources/004.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/004.wkt rename to stress_benchmark/resources/004.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/005.settings b/stress_benchmark/resources/005.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/005.settings rename to stress_benchmark/resources/005.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/005.wkt b/stress_benchmark/resources/005.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/005.wkt rename to stress_benchmark/resources/005.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/006.settings b/stress_benchmark/resources/006.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/006.settings rename to stress_benchmark/resources/006.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/006.wkt b/stress_benchmark/resources/006.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/006.wkt rename to stress_benchmark/resources/006.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/007.settings b/stress_benchmark/resources/007.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/007.settings rename to stress_benchmark/resources/007.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/007.wkt b/stress_benchmark/resources/007.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/007.wkt rename to stress_benchmark/resources/007.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/008.settings b/stress_benchmark/resources/008.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/008.settings rename to stress_benchmark/resources/008.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/008.wkt b/stress_benchmark/resources/008.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/008.wkt rename to stress_benchmark/resources/008.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/009.settings b/stress_benchmark/resources/009.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/009.settings rename to stress_benchmark/resources/009.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/009.wkt b/stress_benchmark/resources/009.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/009.wkt rename to stress_benchmark/resources/009.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/010.settings b/stress_benchmark/resources/010.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/010.settings rename to stress_benchmark/resources/010.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/010.wkt b/stress_benchmark/resources/010.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/010.wkt rename to stress_benchmark/resources/010.wkt diff --git a/stress_benchmark/stress_bm_voronoi_resources/011.settings b/stress_benchmark/resources/011.settings similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/011.settings rename to stress_benchmark/resources/011.settings diff --git a/stress_benchmark/stress_bm_voronoi_resources/011.wkt b/stress_benchmark/resources/011.wkt similarity index 100% rename from stress_benchmark/stress_bm_voronoi_resources/011.wkt rename to stress_benchmark/resources/011.wkt diff --git a/stress_benchmark/stress_bm_voronoi.cpp b/stress_benchmark/stress_benchmark.cpp similarity index 55% rename from stress_benchmark/stress_bm_voronoi.cpp rename to stress_benchmark/stress_benchmark.cpp index f3066fc5e0..55e164fc93 100644 --- a/stress_benchmark/stress_bm_voronoi.cpp +++ b/stress_benchmark/stress_benchmark.cpp @@ -1,11 +1,12 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include #include #include #include -#include -#include +#include +#include #include #include #include @@ -15,13 +16,31 @@ #include #include #include -#include #include -#include "WallsComputation.h" //Unit under test. -#include "settings/Settings.h" //Settings to generate walls with. -#include "sliceDataStorage.h" //Sl -#include "utils/polygon.h" //To create example polygons. +#include "WallsComputation.h" +#include "rapidjson/document.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/writer.h" +#include "settings/Settings.h" +#include "sliceDataStorage.h" +#include "utils/polygon.h" + + +constexpr std::string_view USAGE = R"(Stress Benchmark. + +Executes a Stress Benchmark on CuraEngine. + +Usage: + stress_benchmark -o FILE + stress_benchmark (-h | --help) + stress_benchmark --version + +Options: + -h --help Show this screen. + --version Show version. + -o FILE Specify the output Json file. +)"; struct Resource { @@ -106,7 +125,7 @@ struct Resource std::vector getResources() { - auto resource_path = std::filesystem::path(std::source_location::current().file_name()).parent_path().append("stress_bm_voronoi_resources"); + auto resource_path = std::filesystem::path(std::source_location::current().file_name()).parent_path().append("resources"); std::vector resources; for (const auto& p : std::filesystem::recursive_directory_iterator(resource_path)) @@ -122,8 +141,62 @@ std::vector getResources() return resources; }; -int main() +void handleChildProcess(const auto& shapes, const auto& settings) +{ + cura::SliceLayer layer; + for (const cura::Polygons& shape : shapes) + { + layer.parts.emplace_back(); + cura::SliceLayerPart& part = layer.parts.back(); + part.outline.add(shape); + } + cura::LayerIndex layer_idx(100); + cura::WallsComputation walls_computation(settings, layer_idx); + walls_computation.generateWalls(&layer, cura::SectionType::WALL); + exit(EXIT_SUCCESS); +} + +size_t checkCrashCount(size_t crashCount, int status, const auto& resource) +{ + if (WIFSIGNALED(status)) + { + ++crashCount; + spdlog::error("Crash detected for: {}", resource.stem()); + } + return crashCount; +} + +void createAndWriteJson(const std::filesystem::path& out_file, double stress_level) +{ + rapidjson::Document doc; + doc.SetArray(); + rapidjson::Document::AllocatorType& allocator = doc.GetAllocator(); + rapidjson::Value obj(rapidjson::kObjectType); + obj.AddMember("name", "General Stress Level", allocator); + obj.AddMember("unit", "%", allocator); + obj.AddMember("value", stress_level, allocator); + doc.PushBack(obj, allocator); + rapidjson::StringBuffer buffer; + rapidjson::Writer writer(buffer); + doc.Accept(writer); + + spdlog::info("Writing Json results: {}", std::filesystem::absolute(out_file).string()); + std::ofstream file{ out_file }; + if (! file) + { + spdlog::critical("Failed to open the file: {}", out_file.string()); + exit(EXIT_FAILURE); + } + file.write(buffer.GetString(), buffer.GetSize()); + file.close(); +} + +int main(int argc, const char** argv) { + constexpr bool show_help = true; + constexpr std::string_view version = "0.1.0"; + const std::map args = docopt::docopt(fmt::format("{}", USAGE), { argv + 1, argv + argc }, show_help, fmt::format("{}", version)); + const auto resources = getResources(); size_t crashCount = 0; @@ -133,41 +206,25 @@ int main() const auto& settings = resource.settings(); pid_t pid = fork(); - if (pid == -1) { spdlog::critical("Unable to fork"); - return 1; + return EXIT_FAILURE; } - if (pid == 0) { - cura::SliceLayer layer; - for (const cura::Polygons& shape : shapes) - { - layer.parts.emplace_back(); - cura::SliceLayerPart& part = layer.parts.back(); - part.outline.add(shape); - } - - cura::LayerIndex layer_idx(100); - cura::WallsComputation walls_computation(settings, layer_idx); - - walls_computation.generateWalls(&layer, cura::SectionType::WALL); - exit(EXIT_SUCCESS); + handleChildProcess(shapes, settings); } else { int status; waitpid(pid, &status, 0); - - if (WIFSIGNALED(status)) - { - ++crashCount; - spdlog::error("Crash detected for: {}", resource.stem()); - } + crashCount = checkCrashCount(crashCount, status, resource); } } - spdlog::info("Total number of crashes: {}", crashCount); - return 0; -} \ No newline at end of file + double stress_level = static_cast(crashCount) / static_cast(resources.size()) * 100.0; + spdlog::info("Stress level: {:.2f} [%]", stress_level); + + createAndWriteJson(std::filesystem::path{ args.at("-o").asString() }, stress_level); + return EXIT_SUCCESS; +} From ef93523b4e8ecb990ae85c4f3ca25d483f334893 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 23 Nov 2023 10:07:06 +0100 Subject: [PATCH 458/470] Add extra info Showing the failed test cases in the tooltip Contributes to CURA-11378 --- stress_benchmark/stress_benchmark.cpp | 34 ++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/stress_benchmark/stress_benchmark.cpp b/stress_benchmark/stress_benchmark.cpp index 55e164fc93..6b1e03a01b 100644 --- a/stress_benchmark/stress_benchmark.cpp +++ b/stress_benchmark/stress_benchmark.cpp @@ -166,15 +166,27 @@ size_t checkCrashCount(size_t crashCount, int status, const auto& resource) return crashCount; } -void createAndWriteJson(const std::filesystem::path& out_file, double stress_level) +void createAndWriteJson(const std::filesystem::path& out_file, double stress_level, const std::string& extra_info) { rapidjson::Document doc; doc.SetArray(); rapidjson::Document::AllocatorType& allocator = doc.GetAllocator(); rapidjson::Value obj(rapidjson::kObjectType); - obj.AddMember("name", "General Stress Level", allocator); - obj.AddMember("unit", "%", allocator); - obj.AddMember("value", stress_level, allocator); + rapidjson::Value key("name", allocator); + rapidjson::Value val1("General Stress Level", allocator); + obj.AddMember(key, val1, allocator); + + key.SetString("unit", allocator); + rapidjson::Value val2("%", allocator); + obj.AddMember(key, val2, allocator); + + key.SetString("value", allocator); + rapidjson::Value val3(stress_level); + obj.AddMember(key, val3, allocator); + + key.SetString("extra", allocator); + rapidjson::Value val4(extra_info.c_str(), extra_info.length(), allocator); + obj.AddMember(key, val4, allocator); doc.PushBack(obj, allocator); rapidjson::StringBuffer buffer; rapidjson::Writer writer(buffer); @@ -198,7 +210,8 @@ int main(int argc, const char** argv) const std::map args = docopt::docopt(fmt::format("{}", USAGE), { argv + 1, argv + argc }, show_help, fmt::format("{}", version)); const auto resources = getResources(); - size_t crashCount = 0; + size_t crash_count = 0; + std::vector extra_infos; for (const auto& resource : resources) { @@ -219,12 +232,17 @@ int main(int argc, const char** argv) { int status; waitpid(pid, &status, 0); - crashCount = checkCrashCount(crashCount, status, resource); + const auto old_crash_count = crash_count; + crash_count = checkCrashCount(crash_count, status, resource); + if (old_crash_count != crash_count) + { + extra_infos.emplace_back(resource.stem()); + } } } - double stress_level = static_cast(crashCount) / static_cast(resources.size()) * 100.0; + const double stress_level = static_cast(crash_count) / static_cast(resources.size()) * 100.0; spdlog::info("Stress level: {:.2f} [%]", stress_level); - createAndWriteJson(std::filesystem::path{ args.at("-o").asString() }, stress_level); + createAndWriteJson(std::filesystem::path{ args.at("-o").asString() }, stress_level, fmt::format("Crashes in: {}", fmt::join(extra_infos, ", "))); return EXIT_SUCCESS; } From 99cab75ac064d911aca00a22c401568ece0df1fe Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 23 Nov 2023 10:07:57 +0100 Subject: [PATCH 459/470] Add Workflow for automatic Stress Testing Contributes to CURA-11378 --- .github/workflows/stress_benchmark.yml | 170 +++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 .github/workflows/stress_benchmark.yml diff --git a/.github/workflows/stress_benchmark.yml b/.github/workflows/stress_benchmark.yml new file mode 100644 index 0000000000..696e0253d5 --- /dev/null +++ b/.github/workflows/stress_benchmark.yml @@ -0,0 +1,170 @@ +name: Stress Benchmark +on: + push: + paths: + - 'include/**' + - 'src/**' + - 'stress_benchmark/**' + - '.github/workflows/stress_benchmark.yml' + - '.github/workflows/requirements-conan-package.txt' + branches: + - main + tags: + - '[0-9].[0-9].[0-9]*' + pull_request: + types: [ opened, reopened, synchronize ] + paths: + - 'include/**' + - 'src/**' + - 'stress_benchmark/**' + - '.github/workflows/stress_benchmark.yml' + - '.github/workflows/requirements-conan-package.txt' + branches: + - main + - 'CURA-*' + - '[0-9]+.[0-9]+' + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + deployments: write + +env: + CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} + CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }} + CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }} + CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }} + CONAN_LOG_RUN_TO_OUTPUT: 1 + CONAN_LOGGING_LEVEL: info + CONAN_NON_INTERACTIVE: 1 + +jobs: + check_actor: + runs-on: ubuntu-latest + outputs: + proceed: ${{ steps.skip_check.outputs.proceed }} + steps: + - id: skip_check + run: | + if [[ "${{ github.actor }}" == *"[bot]"* ]]; then + echo "proceed=true" >> $GITHUB_OUTPUT + elif [[ "${{ github.event.pull_request }}" == "" ]]; then + echo "proceed=true" >> $GITHUB_OUTPUT + elif [[ "${{ github.event.pull_request.head.repo.fork }}" == "false" ]]; then + echo "proceed=true" >> $GITHUB_OUTPUT + else + echo "proceed=false" >> $GITHUB_OUTPUT + fi + shell: bash + + conan-recipe-version: + needs: [ check_actor ] + if: ${{ needs.check_actor.outputs.proceed == 'true' }} + uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main + with: + project_name: curaengine + + benchmark: + needs: [ conan-recipe-version ] + name: Run C++ benchmark + runs-on: ubuntu-22.04 + steps: + - name: Checkout CuraEngine + uses: actions/checkout@v3 + + - name: Setup Python and pip + uses: actions/setup-python@v4 + with: + python-version: '3.11.x' + architecture: 'x64' + cache: 'pip' + cache-dependency-path: .github/workflows/requirements-conan-package.txt + + - name: Cache Benchmark library + uses: actions/cache@v1 + with: + path: ./cache + key: ${{ runner.os }}-stressbenchmark + + - name: Install Python requirements and Create default Conan profile + run: | + pip install -r .github/workflows/requirements-conan-package.txt + + # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest. + # This is maybe because grub caches the disk it uses last time, which is recreated each time. + - name: Install Linux system requirements + if: ${{ runner.os == 'Linux' }} + run: | + sudo rm /var/cache/debconf/config.dat + sudo dpkg --configure -a + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt update + sudo apt upgrade + sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + + - name: Install GCC-132 on ubuntu + run: | + sudo apt install g++-13 gcc-13 -y + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 + + - name: Create the default Conan profile + run: conan profile new default --detect + + - name: Get Conan configuration + run: | + conan config install https://github.com/Ultimaker/conan-config.git + conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}" + + - name: Use Conan download cache (Bash) + if: ${{ runner.os != 'Windows' }} + run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache" + + - name: Cache Conan local repository packages (Bash) + uses: actions/cache@v3 + if: ${{ runner.os != 'Windows' }} + with: + path: | + $HOME/.conan/data + $HOME/.conan/conan_download_cache + key: conan-${{ runner.os }}-${{ runner.arch }} + + - name: Install dependencies + run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -o enable_benchmarks=True -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv + + - name: Upload the Dependency package(s) + run: conan upload "*" -r cura --all -c + + - name: Set Environment variables from Conan install (bash) + if: ${{ runner.os != 'Windows' }} + run: | + . ./activate_github_actions_runenv.sh + . ./activate_github_actions_buildenv.sh + working-directory: build/Release/generators + + - name: Build CuraEngine and tests + run: | + cmake --preset release + cmake --build --preset release + + - name: Run Stress Benchmark CuraEngine + id: run-test + run: ./stress_benchmarks -o benchmark_result.json + working-directory: build/Release/stress_benchmark + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + name: Stress Benchmark + output-file-path: build/Release/benchmark/benchmark_result.json + gh-repository: github.com/Ultimaker/CuraEngineBenchmarks + gh-pages-branch: main + benchmark-data-dir-path: dev/stress_bench + tool: customSmallerIsBetter + github-token: ${{ secrets.CURA_BENCHMARK_PAT }} + auto-push: true + # alert-threshold: '175%' + # summary-always: true + # comment-on-alert: true + max-items-in-chart: 250 From 11b7404e3bdc7c18a0edcd8103df5b30739fce7a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 23 Nov 2023 10:34:22 +0100 Subject: [PATCH 460/470] Fix failing workflows Contributes to CURA-11378 --- .github/workflows/stress_benchmark.yml | 2 +- CMakeLists.txt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/stress_benchmark.yml b/.github/workflows/stress_benchmark.yml index 696e0253d5..39a8087d0a 100644 --- a/.github/workflows/stress_benchmark.yml +++ b/.github/workflows/stress_benchmark.yml @@ -150,7 +150,7 @@ jobs: - name: Run Stress Benchmark CuraEngine id: run-test - run: ./stress_benchmarks -o benchmark_result.json + run: ./stress_benchmark -o benchmark_result.json working-directory: build/Release/stress_benchmark - name: Store benchmark result diff --git a/CMakeLists.txt b/CMakeLists.txt index d521b683d9..c5109f8ce6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,13 +272,12 @@ if (ENABLE_TESTING OR ENABLE_BENCHMARKS) endif () endif () -add_subdirectory(stress_benchmark) +if (ENABLE_BENCHMARKS) + add_subdirectory(benchmark) + add_subdirectory(stress_benchmark) +endif () if (ENABLE_TESTING) enable_testing() add_subdirectory(tests) -endif () - -if (ENABLE_BENCHMARKS) - add_subdirectory(benchmark) endif () \ No newline at end of file From 93e75df16d9a7960a3a0efe19fdd708ef439330f Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 23 Nov 2023 11:02:24 +0100 Subject: [PATCH 461/470] Add total number of test cases Contributes to CURA-11378 --- stress_benchmark/stress_benchmark.cpp | 33 +++++++++++++++++---------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/stress_benchmark/stress_benchmark.cpp b/stress_benchmark/stress_benchmark.cpp index 6b1e03a01b..62502c1c5f 100644 --- a/stress_benchmark/stress_benchmark.cpp +++ b/stress_benchmark/stress_benchmark.cpp @@ -1,6 +1,7 @@ // Copyright (c) 2023 UltiMaker // CuraEngine is released under the terms of the AGPLv3 or higher +#include #include #include #include @@ -166,28 +167,36 @@ size_t checkCrashCount(size_t crashCount, int status, const auto& resource) return crashCount; } -void createAndWriteJson(const std::filesystem::path& out_file, double stress_level, const std::string& extra_info) +rapidjson::Value + createRapidJSONObject(rapidjson::Document::AllocatorType& allocator, const std::string& test_name, const auto value, const std::string& unit, const std::string& extra_info) { - rapidjson::Document doc; - doc.SetArray(); - rapidjson::Document::AllocatorType& allocator = doc.GetAllocator(); rapidjson::Value obj(rapidjson::kObjectType); rapidjson::Value key("name", allocator); - rapidjson::Value val1("General Stress Level", allocator); + rapidjson::Value val1(test_name.c_str(), test_name.length(), allocator); obj.AddMember(key, val1, allocator); - key.SetString("unit", allocator); - rapidjson::Value val2("%", allocator); + rapidjson::Value val2(unit.c_str(), unit.length(), allocator); obj.AddMember(key, val2, allocator); - key.SetString("value", allocator); - rapidjson::Value val3(stress_level); + rapidjson::Value val3(value); obj.AddMember(key, val3, allocator); - key.SetString("extra", allocator); rapidjson::Value val4(extra_info.c_str(), extra_info.length(), allocator); obj.AddMember(key, val4, allocator); - doc.PushBack(obj, allocator); + return obj; +} + +void createAndWriteJson(const std::filesystem::path& out_file, double stress_level, const std::string& extra_info, const size_t no_test_cases) +{ + rapidjson::Document doc; + doc.SetArray(); + rapidjson::Document::AllocatorType& allocator = doc.GetAllocator(); + auto no_test_cases_obj = createRapidJSONObject(allocator, "Number of test cases", no_test_cases, "-", ""); + doc.PushBack(no_test_cases_obj, allocator); + + auto stress_obj = createRapidJSONObject(allocator, "General Stress Level", stress_level, "%", extra_info); + doc.PushBack(stress_obj, allocator); + rapidjson::StringBuffer buffer; rapidjson::Writer writer(buffer); doc.Accept(writer); @@ -243,6 +252,6 @@ int main(int argc, const char** argv) const double stress_level = static_cast(crash_count) / static_cast(resources.size()) * 100.0; spdlog::info("Stress level: {:.2f} [%]", stress_level); - createAndWriteJson(std::filesystem::path{ args.at("-o").asString() }, stress_level, fmt::format("Crashes in: {}", fmt::join(extra_infos, ", "))); + createAndWriteJson(std::filesystem::path{ args.at("-o").asString() }, stress_level, fmt::format("Crashes in: {}", fmt::join(extra_infos, ", ")), resources.size()); return EXIT_SUCCESS; } From dd56f46c41cc581a11c10f017b13a3b3a4aad7a5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 23 Nov 2023 11:18:03 +0100 Subject: [PATCH 462/470] Update stress_benchmark.yml --- .github/workflows/stress_benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stress_benchmark.yml b/.github/workflows/stress_benchmark.yml index 39a8087d0a..01d98e8db5 100644 --- a/.github/workflows/stress_benchmark.yml +++ b/.github/workflows/stress_benchmark.yml @@ -157,7 +157,7 @@ jobs: uses: benchmark-action/github-action-benchmark@v1 with: name: Stress Benchmark - output-file-path: build/Release/benchmark/benchmark_result.json + output-file-path: build/Release/stress_benchmark/benchmark_result.json gh-repository: github.com/Ultimaker/CuraEngineBenchmarks gh-pages-branch: main benchmark-data-dir-path: dev/stress_bench From b931a9c67fab2b464a33cf1b1fa59e56b2aa8553 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 23 Nov 2023 12:46:59 +0100 Subject: [PATCH 463/470] Add test cases CURA-11378 --- stress_benchmark/resources/012.settings | 632 ++++++++++++++++++++++++ stress_benchmark/resources/012.wkt | 1 + stress_benchmark/resources/013.settings | 628 +++++++++++++++++++++++ stress_benchmark/resources/013.wkt | 1 + stress_benchmark/resources/014.settings | 628 +++++++++++++++++++++++ stress_benchmark/resources/014.wkt | 1 + stress_benchmark/resources/015.settings | 630 +++++++++++++++++++++++ stress_benchmark/resources/015.wkt | 1 + stress_benchmark/resources/016.settings | 627 +++++++++++++++++++++++ stress_benchmark/resources/016.wkt | 1 + stress_benchmark/resources/017.settings | 628 +++++++++++++++++++++++ stress_benchmark/resources/017.wkt | 1 + stress_benchmark/resources/018.settings | 629 +++++++++++++++++++++++ stress_benchmark/resources/018.wkt | 1 + stress_benchmark/resources/019.settings | 629 +++++++++++++++++++++++ stress_benchmark/resources/019.wkt | 1 + stress_benchmark/resources/020.settings | 629 +++++++++++++++++++++++ stress_benchmark/resources/020.wkt | 1 + stress_benchmark/resources/021.settings | 632 ++++++++++++++++++++++++ stress_benchmark/resources/021.wkt | 1 + stress_benchmark/resources/022.settings | 631 +++++++++++++++++++++++ stress_benchmark/resources/022.wkt | 1 + stress_benchmark/resources/023.settings | 630 +++++++++++++++++++++++ stress_benchmark/resources/023.wkt | 1 + stress_benchmark/resources/024.settings | 632 ++++++++++++++++++++++++ stress_benchmark/resources/024.wkt | 1 + stress_benchmark/resources/025.settings | 631 +++++++++++++++++++++++ stress_benchmark/resources/025.wkt | 1 + stress_benchmark/resources/026.settings | 631 +++++++++++++++++++++++ stress_benchmark/resources/026.wkt | 1 + stress_benchmark/resources/027.settings | 632 ++++++++++++++++++++++++ stress_benchmark/resources/027.wkt | 1 + stress_benchmark/resources/028.settings | 631 +++++++++++++++++++++++ stress_benchmark/resources/028.wkt | 1 + stress_benchmark/resources/029.settings | 631 +++++++++++++++++++++++ stress_benchmark/resources/029.wkt | 1 + stress_benchmark/resources/030.settings | 632 ++++++++++++++++++++++++ stress_benchmark/resources/030.wkt | 1 + stress_benchmark/resources/031.settings | 628 +++++++++++++++++++++++ stress_benchmark/resources/031.wkt | 1 + 40 files changed, 12621 insertions(+) create mode 100644 stress_benchmark/resources/012.settings create mode 100644 stress_benchmark/resources/012.wkt create mode 100644 stress_benchmark/resources/013.settings create mode 100644 stress_benchmark/resources/013.wkt create mode 100644 stress_benchmark/resources/014.settings create mode 100644 stress_benchmark/resources/014.wkt create mode 100644 stress_benchmark/resources/015.settings create mode 100644 stress_benchmark/resources/015.wkt create mode 100644 stress_benchmark/resources/016.settings create mode 100644 stress_benchmark/resources/016.wkt create mode 100644 stress_benchmark/resources/017.settings create mode 100644 stress_benchmark/resources/017.wkt create mode 100644 stress_benchmark/resources/018.settings create mode 100644 stress_benchmark/resources/018.wkt create mode 100644 stress_benchmark/resources/019.settings create mode 100644 stress_benchmark/resources/019.wkt create mode 100644 stress_benchmark/resources/020.settings create mode 100644 stress_benchmark/resources/020.wkt create mode 100644 stress_benchmark/resources/021.settings create mode 100644 stress_benchmark/resources/021.wkt create mode 100644 stress_benchmark/resources/022.settings create mode 100644 stress_benchmark/resources/022.wkt create mode 100644 stress_benchmark/resources/023.settings create mode 100644 stress_benchmark/resources/023.wkt create mode 100644 stress_benchmark/resources/024.settings create mode 100644 stress_benchmark/resources/024.wkt create mode 100644 stress_benchmark/resources/025.settings create mode 100644 stress_benchmark/resources/025.wkt create mode 100644 stress_benchmark/resources/026.settings create mode 100644 stress_benchmark/resources/026.wkt create mode 100644 stress_benchmark/resources/027.settings create mode 100644 stress_benchmark/resources/027.wkt create mode 100644 stress_benchmark/resources/028.settings create mode 100644 stress_benchmark/resources/028.wkt create mode 100644 stress_benchmark/resources/029.settings create mode 100644 stress_benchmark/resources/029.wkt create mode 100644 stress_benchmark/resources/030.settings create mode 100644 stress_benchmark/resources/030.wkt create mode 100644 stress_benchmark/resources/031.settings create mode 100644 stress_benchmark/resources/031.wkt diff --git a/stress_benchmark/resources/012.settings b/stress_benchmark/resources/012.settings new file mode 100644 index 0000000000..99daccc636 --- /dev/null +++ b/stress_benchmark/resources/012.settings @@ -0,0 +1,632 @@ +retraction_extra_prime_amount=0 +interlocking_beam_width=0.8 +support_tree_branch_diameter_angle=7 +min_feature_size=0.1 +minimum_polygon_circumference=1.0 +machine_scale_fan_speed_zero_to_one=False +retraction_amount=0.75 +wipe_retraction_speed=5 +material_end_of_filament_purge_speed=0.5 +wall_0_extruder_nr=-1 +acceleration_wall_x_roofing=300 +raft_interface_thickness=0.3 +support_infill_rate=12.0 +magic_fuzzy_skin_point_density=1.25 +wall_line_count=2 +support_bottom_wall_count=2 +support_bottom_density=24 +skin_material_flow=92.14999999999999 +xy_offset=0 +jerk_support_bottom=12.5 +minimum_roof_area=1.0 +support_roof_density=97 +machine_max_feedrate_z=299792458000 +switch_extruder_extra_prime_amount=0 +slicing_tolerance=middle +material_break_retracted_position=-50 +material_initial_print_temperature=250 +jerk_skirt_brim=12.5 +roofing_monotonic=True +machine_max_jerk_e=5.0 +raft_margin=3 +bottom_thickness=1.0 +skirt_height=3 +speed_travel_layer_0=250.0 +z_seam_corner=z_seam_corner_none +machine_head_with_fans_polygon=[[-20, 10], [10, 10], [10, -10], [-20, -10]] +material_bed_temp_wait=True +top_bottom_pattern=lines +cool_fan_full_layer=1 +skirt_brim_line_width=0.4 +support_interface_wall_count=2 +raft_interface_jerk=12.5 +material_shrinkage_percentage=100.0 +support_bottom_line_distance=2.5 +z_seam_y=160.0 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +z_seam_position=backright +skirt_brim_minimal_length=500 +raft_surface_layers=2 +bridge_fan_speed_3=0 +ironing_inset=0.38 +gantry_height=320 +material_surface_energy=70 +inset_direction=inside_out +prime_tower_size=20 +jerk_wall_0=12.5 +retraction_hop=0.4 +acceleration_enabled=True +support_roof_extruder_nr=0 +skin_material_flow_layer_0=95 +support_material_flow=97 +bridge_fan_speed=100 +support_tree_max_diameter=25 +small_feature_speed_factor_0=50 +machine_acceleration=3000 +bottom_skin_preshrink=0 +sub_div_rad_add=0.4 +raft_surface_jerk=12.5 +adaptive_layer_height_variation_step=0.01 +bridge_sparse_infill_max_density=50 +nozzle_disallowed_areas=[] +support_interface_extruder_nr=0 +support_tower_maximum_supported_diameter=3.0 +support_brim_enable=False +cool_fan_full_at_height=0 +material_crystallinity=False +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +support_bottom_distance=0.125 +wall_material_flow=97 +material_flow_layer_0=100 +retraction_combing=off +gradual_support_infill_steps=0 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +xy_offset_layer_0=0 +support_initial_layer_line_distance=2.5 +smooth_spiralized_contours=True +infill_multiplier=1 +top_thickness=1.0 +gradual_infill_step_height=1.5 +cool_min_speed=9 +cool_fan_enabled=False +wall_overhang_angle=90 +cool_fan_speed_max=100 +support_skip_some_zags=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=85 +support_xy_distance_overhang=0.15 +support_fan_enable=False +retraction_extrusion_window=0 +max_skin_angle_for_expansion=90 +wipe_retraction_enable=True +day=Mon +cool_fan_speed=0 +coasting_min_volume=0.8 +raft_surface_thickness=0.2 +switch_extruder_retraction_speeds=5 +machine_firmware_retract=False +acceleration_prime_tower=300 +skirt_gap=3 +retraction_hop_after_extruder_switch_height=0.4 +support_bottom_pattern=lines +acceleration_print=300 +acceleration_support_roof=300 +retraction_retract_speed=5 +zig_zaggify_infill=True +machine_min_cool_heat_time_window=15 +layer_start_x=0.0 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +infill_wipe_dist=0 +speed_wall_x_roofing=65 +brim_line_count=13 +support_roof_line_distance=0.25773195876288657 +material_guid=88c8919c-6a09-471a-b7b6-e801263d862d +material_shrinkage_percentage_z=100.0 +infill_offset_y=0 +bottom_layers=5 +machine_max_feedrate_e=45 +interlocking_beam_layer_count=2 +raft_airgap=0.3 +wall_distribution_count=1 +raft_base_fan_speed=0 +material_print_temperature_layer_0=260 +raft_base_line_width=1.4 +support_tower_diameter=3.0 +bridge_skin_density_2=100 +wall_0_material_flow_layer_0=110.00000000000001 +quality_name=Fast +wipe_pause=0 +wipe_retraction_prime_speed=5 +lightning_infill_support_angle=40 +print_bed_temperature=95 +support_xy_distance=0.2 +speed_wall=96.0 +meshfix_fluid_motion_shift_distance=0.1 +support_join_distance=2.0 +wipe_hop_amount=0.4 +prime_tower_raft_base_line_spacing=1.4 +support_bottom_stair_step_width=5.0 +wall_line_width_x=0.4 +jerk_support=12.5 +roofing_extruder_nr=-1 +machine_show_variants=False +skin_line_width=0.4 +lightning_infill_prune_angle=40 +speed_support_roof=55 +support_tree_angle_slow=33.333333333333336 +support_skip_zag_per_mm=20 +support_interface_line_width=0.4 +machine_name=UltiMaker Method XL +acceleration_skirt_brim=300 +meshfix=0 +nozzle_offsetting_for_disallowed_areas=False +support_tree_min_height_to_model=3 +machine_max_acceleration_y=9000 +layer_0_z_overlap=0.15 +speed_travel=250.0 +ironing_pattern=zigzag +bridge_skin_speed=55 +skirt_brim_material_flow=97 +machine_nozzle_cool_down_speed=0.8 +alternate_extra_perimeter=False +support_roof_enable=True +support_bottom_offset=0 +bridge_wall_speed=96.0 +magic_spiralize=False +initial_layer_line_width_factor=100.0 +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=260 +machine_nozzle_heat_up_speed=3.5 +raft_interface_line_spacing=1.4 +material_flush_purge_length=60 +draft_shield_dist=10 +ironing_only_highest_layer=False +machine_settings=0 +acceleration_topbottom=300 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=300 +carve_multiple_volumes=True +speed_slowdown_layers=1 +default_material_print_temperature=260 +machine_center_is_zero=True +ironing_monotonic=False +infill_material_flow=97 +support_tree_tip_diameter=0.6 +meshfix_keep_open_polygons=False +skin_monotonic=True +minimum_interface_area=1.0 +draft_shield_enabled=False +infill_overlap_mm=0.0 +conical_overhang_angle=50 +mesh_position_z=0 +adhesion_type=raft +machine_endstop_positive_direction_y=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +infill_mesh=False +jerk_support_roof=12.5 +machine_extruder_count=2 +wall_0_material_flow_roofing=97 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +machine_gcode_flavor=Griffin +support_meshes_present=False +raft_interface_speed=30.0 +travel_avoid_distance=3 +jerk_prime_tower=12.5 +skin_outline_count=0 +support_infill_extruder_nr=0 +coasting_speed=90 +speed_prime_tower=30.0 +support_bottom_stair_step_min_slope=10.0 +infill_sparse_thickness=0.2 +wipe_retraction_extra_prime_amount=0 +skin_preshrink=0 +clean_between_layers=False +roofing_layer_count=2 +bridge_skin_speed_3=55 +magic_fuzzy_skin_point_dist=0.8 +hole_xy_offset_max_diameter=0 +brim_width=5 +acceleration_travel_enabled=True +coasting_enable=False +support_interface_density=100 +machine_buildplate_type=glass +time=21:10:13 +speed_wall_x=65 +material_final_print_temperature=250 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +machine_max_jerk_xy=20.0 +cutting_mesh=False +magic_fuzzy_skin_enabled=False +jerk_enabled=True +support_line_distance=2.5 +retraction_enable=True +expand_skins_expand_distance=0.8 +prime_tower_position_y=118.80000000000001 +mesh_position_x=0 +mold_width=5 +adhesion_extruder_nr=0 +support_interface_skip_height=0.2 +jerk_support_infill=12.5 +wall_overhang_speed_factor=100 +material_bed_temp_prepend=True +infill_before_walls=False +material=0 +small_hole_max_size=0 +support_z_distance=0.25 +meshfix_union_all=True +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.4 +minimum_support_area=0.1 +skin_no_small_gaps_heuristic=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0.8 +mesh_rotation_matrix=[[1,0,0], [0,1,0], [0,0,1]] +support_interface_priority=interface_area_overwrite_support_area +skin_overlap=0 +print_sequence=all_at_once +acceleration_support_infill=300 +brim_gap=0 +speed_layer_0=30 +infill_enable_travel_optimization=True +raft_surface_speed=55 +machine_height=320 +travel_retract_before_outer_wall=False +prime_tower_base_size=10 +adaptive_layer_height_variation=0.1 +raft_interface_layers=2 +support_type=everywhere +skin_edge_support_layers=4 +mold_enabled=False +jerk_travel_layer_0=12.5 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +small_skin_width=0.8 +shell=0 +support_zag_skip_count=8 +material_type=empty +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +support_roof_line_width=0.25 +speed_topbottom=55 +lightning_infill_straightening_angle=40 +raft_smoothing=5 +bridge_enable_more_layers=True +speed_infill=120.0 +connect_infill_polygons=False +min_bead_width=0.4 +wall_x_extruder_nr=-1 +switch_extruder_prime_speed=5 +support=0 +infill_mesh_order=0 +support_angle=50 +raft_base_speed=5 +machine_nozzle_temp_enabled=True +material_maximum_park_duration=300 +skirt_brim_speed=30 +switch_extruder_retraction_amount=0.5 +infill_pattern=lines +meshfix_fluid_motion_enabled=True +connect_skin_polygons=False +material_break_temperature=50 +wipe_retraction_amount=0.75 +jerk_layer_0=12.5 +cool_min_temperature=250 +acceleration_support=300 +switch_extruder_retraction_speed=5 +retraction_hop_enabled=True +raft_surface_extruder_nr=0 +acceleration_roofing=300 +material_print_temp_wait=True +prime_tower_base_height=6 +fill_outline_gaps=True +mold_roof_height=0.5 +support_bottom_line_width=0.6 +support_extruder_nr=0 +wall_0_inset=0 +relative_extrusion=False +support_conical_min_width=10 +support_structure=normal +support_interface_height=0.4 +cool_fan_speed_0=0 +blackmagic=0 +infill_support_enabled=False +support_brim_line_count=3 +material_adhesion_tendency=0 +prime_tower_base_curve_magnitude=2 +extruder_prime_pos_abs=True +machine_extruders_shared_nozzle_initial_retraction=0 +conical_overhang_hole_size=0 +jerk_travel_enabled=True +bridge_skin_support_threshold=50 +support_roof_wall_count=2 +infill_sparse_density=20 +infill_extruder_nr=-1 +support_interface_enable=True +bridge_skin_density_3=100 +bridge_fan_speed_2=50.0 +support_interface_pattern=lines +bridge_skin_material_flow_3=97 +initial_bottom_layers=5 +wall_line_width_0=0.4 +interlocking_enable=False +support_tree_top_rate=30 +cross_infill_pocket_size=2.0 +meshfix_maximum_deviation=0.04 +meshfix_maximum_resolution=0.6 +wipe_repeat_count=5 +brim_inside_margin=2.5 +material_end_of_filament_purge_length=20 +acceleration_support_bottom=300 +material_break_preparation_speed=2 +material_alternate_walls=False +machine_shape=rectangular +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +bridge_wall_min_length=1.6 +experimental=0 +prime_tower_position_x=138.8 +bridge_skin_speed_2=55 +top_bottom_extruder_nr=-1 +resolution=0 +raft_surface_fan_speed=0 +speed_wall_0=45 +cool_lift_head=False +machine_extruders_share_heater=False +raft_interface_acceleration=300 +ironing_flow=10.0 +jerk_topbottom=12.5 +remove_empty_first_layers=True +support_mesh=False +support_roof_pattern=lines +travel_speed=500 +speed=0 +material_print_temperature=260 +min_even_wall_line_width=0.4 +interlocking_boundary_avoidance=2 +support_tower_roof_angle=0 +extruder_prime_pos_z=0 +acceleration_infill=300 +travel_avoid_supports=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +raft_interface_line_width=1.2 +small_skin_on_surface=False +support_use_towers=False +support_extruder_nr_layer_0=0 +meshfix_maximum_travel_resolution=0.8 +machine_nozzle_id=1XA +speed_equalize_flow_width_factor=0 +acceleration_travel_layer_0=5000 +wipe_brush_pos_x=100 +speed_z_hop=10 +command_line_settings=0 +z_seam_relative=False +retraction_combing_max_distance=25.0 +machine_always_write_active_tool=False +z_seam_x=205.0 +draft_shield_height=10 +infill_line_distance=2.0 +minimum_bottom_area=1.0 +raft_speed=15 +mold_angle=40 +raft_surface_line_width=0.4 +support_bottom_material_flow=97 +raft_base_extruder_nr=0 +acceleration_wall=300 +acceleration_travel=5000 +ironing_enabled=False +meshfix_fluid_motion_small_distance=0.01 +speed_support_bottom=55 +acceleration_wall_0_roofing=300 +material_extrusion_cool_down_speed=0.7 +raft_base_line_spacing=2.8 +speed_support_infill=96.0 +max_extrusion_before_wipe=10 +cool_min_layer_time_fan_speed_max=11 +ooze_shield_dist=2 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +support_tree_bp_diameter=7.5 +support_roof_height=1.015 +material_bed_temperature_layer_0=95 +support_infill_sparse_thickness=0.2 +support_line_width=0.3 +ooze_shield_enabled=False +retraction_min_travel=1.6 +acceleration_layer_0=300 +wipe_move_distance=20 +cool_fan_speed_min=0 +wall_0_wipe_dist=0 +wall_0_material_flow=97 +meshfix_maximum_extrusion_area_deviation=50000 +speed_roofing=55 +support_bottom_stair_step_height=0 +brim_outside_only=True +material_standby_temperature=180 +brim_replaces_support=True +bridge_skin_density=100 +lightning_infill_overhang_angle=40 +platform_adhesion=0 +machine_disallowed_areas=[[[-204, -160], [204, -160], [204, -154.5], [-204, -154.5]], [[-204, 160], [204, 160], [204, 154.5], [-204, 154.5]], [[-205, -160], [-154.5, -160], [-154.5, 160], [-205, 160]], [[154.5, -160], [205, -160], [205, 160], [154.5, 160]]] +jerk_support_interface=12.5 +wall_transition_angle=10 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +jerk_wall_x_roofing=12.5 +prime_tower_line_width=1 +group_outer_walls=True +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +brim_smart_ordering=True +zig_zaggify_support=True +wipe_hop_enable=True +line_width=0.4 +optimize_wall_printing_order=True +machine_minimum_feedrate=0.0 +speed_support=96.0 +material_anti_ooze_retracted_position=-4 +hole_xy_offset=0 +jerk_print_layer_0=12.5 +skin_overlap_mm=0.0 +small_feature_max_length=0.0 +roofing_pattern=lines +center_object=False +machine_max_acceleration_e=10000 +speed_ironing=36.666666666666664 +raft_interface_extruder_nr=0 +small_feature_speed_factor=50 +material_no_load_move_factor=0.940860215 +raft_surface_line_spacing=0.4 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=97 +bridge_wall_material_flow=97 +bottom_skin_expand_distance=0.8 +acceleration_support_interface=300 +extruders_enabled_count=2 +jerk_travel=12.5 +support_top_distance=0.25 +retraction_hop_after_extruder_switch=True +raft_base_thickness=0.8 +jerk_wall=12.5 +dual=0 +support_bottom_enable=False +support_tree_rest_preference=graceful +material_bed_temperature=95 +prime_tower_min_volume=6 +prime_tower_flow=97 +acceleration_ironing=300 +roofing_material_flow=97 +material_flow=97 +support_offset=0.7 +material_is_support_material=False +raft_acceleration=300 +machine_extruders_share_nozzle=False +support_bottom_height=0.4 +cooling=0 +wall_x_material_flow_roofing=97 +interlocking_depth=2 +machine_nozzle_size=0.4 +quality_changes_name=empty +support_conical_angle=30 +machine_heated_build_volume=True +gradual_support_infill_step_height=0.8 +interlocking_orientation=22.5 +speed_print_layer_0=30 +wall_x_material_flow_layer_0=95.0 +top_skin_expand_distance=0.8 +top_bottom=0 +prime_tower_enable=False +travel=0 +jerk_roofing=12.5 +anti_overhang_mesh=False +cool_min_layer_time=6 +machine_width=410 +machine_max_feedrate_x=299792458000 +support_tree_angle=50 +machine_max_jerk_z=0.4 +roofing_line_width=0.4 +machine_depth=320 +bridge_settings_enabled=True +wall_transition_filter_distance=100 +raft_interface_fan_speed=0.0 +bridge_wall_coast=0 +infill=0 +jerk_wall_x=12.5 +min_wall_line_width=0.4 +retraction_prime_speed=5 +z_seam_type=sharpest_corner +wall_line_width=0.4 +ironing_line_spacing=0.1 +speed_wall_0_roofing=45 +roofing_angles=[] +jerk_ironing=12.5 +support_roof_offset=0 +material_print_temp_prepend=True +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +machine_max_feedrate_y=299792458000 +support_roof_material_flow=97 +alternate_carve_order=True +adaptive_layer_height_threshold=0.2 +default_material_bed_temperature=95 +raft_jerk=12.5 +support_tree_branch_reach_limit=30 +wipe_retraction_retract_speed=5 +multiple_mesh_overlap=0 +support_tree_limit_branch_reach=True +skin_angles=[] +machine_steps_per_mm_z=50 +top_layers=5 +infill_overlap=0 +support_interface_material_flow=97 +retract_at_layer_change=False +wall_transition_length=0.4 +material_flow_temp_graph=[[3.5, 200],[7.0, 240]] +conical_overhang_enabled=False +raft_surface_acceleration=300 +skirt_line_count=1 +material_id=empty_material +retraction_count_max=100 +extruder_prime_pos_y=0 +raft_base_jerk=12.5 +infill_randomize_start_location=False +mesh_position_y=0 +bridge_skin_material_flow_2=97 +machine_max_acceleration_x=9000 +speed_support_interface=55 +prime_tower_wipe_enabled=True +top_bottom_thickness=1.0 +jerk_infill=12.5 +draft_shield_height_limitation=full +layer_height_0=0.2 +jerk_print=12.5 +raft_remove_inside_corners=False +support_pattern=lines +infill_support_angle=40 +raft_base_acceleration=300 +wall_extruder_nr=-1 +raft_base_wall_count=1 +material_flush_purge_speed=0.5 +gradual_infill_steps=0 +speed_print=120.0 +top_bottom_pattern_0=lines +flow_rate_max_extrusion_offset=0 +material_diameter=1.75 +initial_extruder_nr=0 +meshfix_union_all_remove_holes=False +jerk_wall_0_roofing=12.5 +material_break_speed=25 +support_brim_width=1.2000000000000002 +machine_nozzle_head_distance=3 +infill_offset_x=0 +acceleration_print_layer_0=300 +travel_avoid_other_parts=False +support_enable=True +prime_tower_brim_enable=True +meshfix_fluid_motion_angle=15 +top_skin_preshrink=0 +wipe_hop_speed=10 +date=20-11-2023 +material_brand=empty_brand +prime_blob_enable=False +skirt_brim_extruder_nr=0 +acceleration_wall_0=300 +support_mesh_drop_down=True +machine_steps_per_mm_x=50 +retraction_speed=5 +wall_x_material_flow=97 +min_skin_width_for_expansion=6.123233995736766e-17 +print_temperature=210 +support_interface_offset=0 +material_name=empty +support_bottom_extruder_nr=0 +machine_heat_zone_length=16 \ No newline at end of file diff --git a/stress_benchmark/resources/012.wkt b/stress_benchmark/resources/012.wkt new file mode 100644 index 0000000000..bb3157ce63 --- /dev/null +++ b/stress_benchmark/resources/012.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((1571 -49975, 2466 -52292, 3140 -49901, 4107 -52189, 4705 -49778, 5745 -52034, 6267 -49606, 7376 -51828, 7822 -49384, 9001 -51570, 9369 -49114, 10616 -51262, 10907 -48796, 12221 -50904, 12434 -48429, 13814 -50495, 13950 -48015, 15393 -50036, 15451 -47553, 16957 -49528, 16937 -47044, 18504 -48971, 18406 -46489, 20034 -48365, 19858 -45888, 21543 -47712, 21289 -45241, 23031 -47012, 22700 -44550, 24496 -46265, 24088 -43815, 25937 -45473, 25452 -43037, 27353 -44636, 26791 -42216, 28741 -43755, 28104 -41354, 30102 -42830, 29389 -40451, 31432 -41863, 30645 -39508, 32731 -40855, 31871 -38526, 33999 -39807, 33066 -37506, 35232 -38720, 34227 -36449, 36431 -37594, 35355 -35355, 37594 -36431, 36449 -34227, 38720 -35232, 37506 -33066, 39807 -33999, 38526 -31871, 40856 -32731, 39508 -30645, 41863 -31432, 40451 -29389, 42830 -30101, 41354 -28104, 43755 -28741, 42216 -26791, 44636 -27353, 43037 -25452, 45473 -25937, 43815 -24088, 46265 -24496, 44550 -22699, 47012 -23031, 45242 -21289, 47712 -21543, 45888 -19857, 48365 -20034, 46489 -18406, 48971 -18504, 47044 -16937, 49528 -16957, 47553 -15451, 50036 -15393, 48015 -13950, 50495 -13814, 48429 -12434, 50904 -12221, 48796 -10907, 51262 -10616, 49114 -9369, 51570 -9000, 49384 -7822, 51828 -7376, 49606 -6267, 52034 -5745, 49778 -4705, 52189 -4107, 49901 -3139, 52292 -2466, 49975 -1571, 52344 -822, 50000 0, 52344 822, 49975 1571, 52292 2466, 49901 3140, 52189 4107, 49778 4705, 52034 5745, 49606 6267, 51828 7376, 49384 7822, 51570 9001, 49114 9369, 51262 10616, 48796 10907, 50904 12221, 48429 12434, 50495 13814, 48015 13950, 50036 15393, 47553 15451, 49528 16957, 47044 16937, 48971 18504, 46489 18406, 48365 20034, 45888 19858, 47712 21543, 45241 21289, 47012 23031, 44550 22700, 46265 24496, 43815 24088, 45473 25937, 43037 25452, 44636 27353, 42216 26791, 43755 28741, 41354 28104, 42830 30102, 40451 29389, 41863 31432, 39508 30645, 40855 32731, 38526 31871, 39807 33999, 37506 33066, 38720 35232, 36449 34227, 37594 36431, 35355 35355, 36431 37594, 34227 36449, 35232 38720, 33066 37506, 33999 39807, 31871 38526, 32731 40856, 30645 39508, 31432 41863, 29389 40451, 30101 42830, 28104 41354, 28741 43755, 26791 42216, 27353 44636, 25452 43037, 25937 45473, 24088 43815, 24496 46265, 22699 44550, 23031 47012, 21289 45242, 21543 47712, 19857 45888, 20034 48365, 18406 46489, 18504 48971, 16937 47044, 16957 49528, 15451 47553, 15393 50036, 13950 48015, 13814 50495, 12434 48429, 12221 50904, 10907 48796, 10616 51262, 9369 49114, 9000 51570, 7822 49384, 7376 51828, 6267 49606, 5745 52034, 4705 49778, 4107 52189, 3139 49901, 2466 52292, 1571 49975, 822 52344, 0 50000, -822 52344, -1571 49975, -2466 52292, -3140 49901, -4107 52189, -4705 49778, -5745 52034, -6267 49606, -7376 51828, -7822 49384, -9001 51570, -9369 49114, -10616 51262, -10907 48796, -12221 50904, -12434 48429, -13814 50495, -13950 48015, -15393 50036, -15451 47553, -16957 49528, -16937 47044, -18504 48971, -18406 46489, -20034 48365, -19858 45888, -21543 47712, -21289 45241, -23031 47012, -22700 44550, -24496 46265, -24088 43815, -25937 45473, -25452 43037, -27353 44636, -26791 42216, -28741 43755, -28104 41354, -30102 42830, -29389 40451, -31432 41863, -30645 39508, -32731 40855, -31871 38526, -33999 39807, -33066 37506, -35232 38720, -34227 36449, -36431 37594, -35355 35355, -37594 36431, -36449 34227, -38720 35232, -37506 33066, -39807 33999, -38526 31871, -40856 32731, -39508 30645, -41863 31432, -40451 29389, -42830 30101, -41354 28104, -43755 28741, -42216 26791, -44636 27353, -43037 25452, -45473 25937, -43815 24088, -46265 24496, -44550 22699, -47012 23031, -45242 21289, -47712 21543, -45888 19857, -48365 20034, -46489 18406, -48971 18504, -47044 16937, -49528 16957, -47553 15451, -50036 15393, -48015 13950, -50495 13814, -48429 12434, -50904 12221, -48796 10907, -51262 10616, -49114 9369, -51570 9000, -49384 7822, -51828 7376, -49606 6267, -52034 5745, -49778 4705, -52189 4107, -49901 3139, -52292 2466, -49975 1571, -52344 822, -50000 0, -52344 -822, -49975 -1571, -52292 -2466, -49901 -3140, -52189 -4107, -49778 -4705, -52034 -5745, -49606 -6267, -51828 -7376, -49384 -7822, -51570 -9001, -49114 -9369, -51262 -10616, -48796 -10907, -50904 -12221, -48429 -12434, -50495 -13814, -48015 -13950, -50036 -15393, -47553 -15451, -49528 -16957, -47044 -16937, -48971 -18504, -46489 -18406, -48365 -20034, -45888 -19858, -47712 -21543, -45241 -21289, -47012 -23031, -44550 -22700, -46265 -24496, -43815 -24088, -45473 -25937, -43037 -25452, -44636 -27353, -42216 -26791, -43755 -28741, -41354 -28104, -42830 -30102, -40451 -29389, -41863 -31432, -39508 -30645, -40855 -32731, -38526 -31871, -39807 -33999, -37506 -33066, -38720 -35232, -36449 -34227, -37594 -36431, -35355 -35355, -36431 -37594, -34227 -36449, -35232 -38720, -33066 -37506, -33999 -39807, -31871 -38526, -32731 -40856, -30645 -39508, -31432 -41863, -29389 -40451, -30101 -42830, -28104 -41354, -28741 -43755, -26791 -42216, -27353 -44636, -25452 -43037, -25937 -45473, -24088 -43815, -24496 -46265, -22699 -44550, -23031 -47012, -21289 -45242, -21543 -47712, -19857 -45888, -20034 -48365, -18406 -46489, -18504 -48971, -16937 -47044, -16957 -49528, -15451 -47553, -15393 -50036, -13950 -48015, -13814 -50495, -12434 -48429, -12221 -50904, -10907 -48796, -10616 -51262, -9369 -49114, -9000 -51570, -7822 -49384, -7376 -51828, -6267 -49606, -5745 -52034, -4705 -49778, -4107 -52189, -3139 -49901, -2466 -52292, -1571 -49975, -822 -52344, 0 -50000, 822 -52344) (-449 -28579, -942 -29985, -1346 -28551, -1884 -29941, -2243 -28494, -2823 -29867, -3136 -28410, -3760 -29763, -4027 -28297, -4693 -29631, -4914 -28157, -5621 -29469, -5796 -27989, -6544 -29277, -6672 -27793, -7461 -29057, -7542 -27569, -8370 -28809, -8404 -27319, -9270 -28532, -9258 -27042, -10162 -28226, -10103 -26737, -11044 -27893, -10938 -26407, -11914 -27533, -11762 -26050, -12773 -27145, -12575 -25668, -13620 -26730, -13375 -25260, -14453 -26289, -14161 -24828, -15271 -25822, -14934 -24371, -16075 -25330, -15693 -23889, -16862 -24812, -16435 -23385, -17633 -24271, -17162 -22857, -18387 -23705, -17871 -22307, -19123 -23115, -18563 -21734, -19839 -22503, -19236 -21141, -20536 -21869, -19891 -20526, -21213 -21213, -20526 -19891, -21869 -20536, -21141 -19236, -22503 -19839, -21734 -18563, -23115 -19123, -22307 -17871, -23705 -18387, -22857 -17162, -24270 -17633, -23385 -16435, -24812 -16862, -23889 -15693, -25330 -16075, -24371 -14934, -25822 -15271, -24828 -14161, -26289 -14453, -25260 -13375, -26730 -13620, -25668 -12575, -27145 -12773, -26050 -11762, -27533 -11914, -26407 -10938, -27893 -11044, -26737 -10103, -28226 -10162, -27042 -9258, -28532 -9271, -27319 -8404, -28809 -8370, -27569 -7542, -29057 -7461, -27793 -6672, -29277 -6544, -27989 -5796, -29469 -5621, -28157 -4914, -29631 -4693, -28297 -4027, -29763 -3760, -28410 -3137, -29867 -2823, -28494 -2243, -29941 -1884, -28551 -1346, -29985 -942, -28579 -449, -30000 0, -28579 449, -29985 942, -28551 1346, -29941 1884, -28494 2243, -29867 2823, -28410 3136, -29763 3760, -28297 4027, -29631 4693, -28157 4914, -29469 5621, -27989 5796, -29277 6544, -27793 6672, -29057 7461, -27569 7542, -28809 8370, -27319 8404, -28532 9270, -27042 9258, -28226 10162, -26737 10103, -27893 11044, -26407 10938, -27533 11914, -26050 11762, -27145 12773, -25668 12575, -26730 13620, -25260 13375, -26289 14453, -24828 14161, -25822 15271, -24371 14934, -25330 16075, -23889 15693, -24812 16862, -23385 16435, -24271 17633, -22857 17162, -23705 18387, -22307 17871, -23115 19123, -21734 18563, -22503 19839, -21141 19236, -21869 20536, -20526 19891, -21213 21213, -19891 20526, -20536 21869, -19236 21141, -19839 22503, -18563 21734, -19123 23115, -17871 22307, -18387 23705, -17162 22857, -17633 24270, -16435 23385, -16862 24812, -15693 23889, -16075 25330, -14934 24371, -15271 25822, -14161 24828, -14453 26289, -13375 25260, -13620 26730, -12575 25668, -12773 27145, -11762 26050, -11914 27533, -10938 26407, -11044 27893, -10103 26737, -10162 28226, -9258 27042, -9271 28532, -8404 27319, -8370 28809, -7542 27569, -7461 29057, -6672 27793, -6544 29277, -5796 27989, -5621 29469, -4914 28157, -4693 29631, -4027 28297, -3760 29763, -3137 28410, -2823 29867, -2243 28494, -1884 29941, -1346 28551, -942 29985, -449 28579, 0 30000, 449 28579, 942 29985, 1346 28551, 1884 29941, 2243 28494, 2823 29867, 3136 28410, 3760 29763, 4027 28297, 4693 29631, 4914 28157, 5621 29469, 5796 27989, 6544 29277, 6672 27793, 7461 29057, 7542 27569, 8370 28809, 8404 27319, 9270 28532, 9258 27042, 10162 28226, 10103 26737, 11044 27893, 10938 26407, 11914 27533, 11762 26050, 12773 27145, 12575 25668, 13620 26730, 13375 25260, 14453 26289, 14161 24828, 15271 25822, 14934 24371, 16075 25330, 15693 23889, 16862 24812, 16435 23385, 17633 24271, 17162 22857, 18387 23705, 17871 22307, 19123 23115, 18563 21734, 19839 22503, 19236 21141, 20536 21869, 19891 20526, 21213 21213, 20526 19891, 21869 20536, 21141 19236, 22503 19839, 21734 18563, 23115 19123, 22307 17871, 23705 18387, 22857 17162, 24270 17633, 23385 16435, 24812 16862, 23889 15693, 25330 16075, 24371 14934, 25822 15271, 24828 14161, 26289 14453, 25260 13375, 26730 13620, 25668 12575, 27145 12773, 26050 11762, 27533 11914, 26407 10938, 27893 11044, 26737 10103, 28226 10162, 27042 9258, 28532 9271, 27319 8404, 28809 8370, 27569 7542, 29057 7461, 27793 6672, 29277 6544, 27989 5796, 29469 5621, 28157 4914, 29631 4693, 28297 4027, 29763 3760, 28410 3137, 29867 2823, 28494 2243, 29941 1884, 28551 1346, 29985 942, 28579 449, 30000 0, 28579 -449, 29985 -942, 28551 -1346, 29941 -1884, 28494 -2243, 29867 -2823, 28410 -3136, 29763 -3760, 28297 -4027, 29631 -4693, 28157 -4914, 29469 -5621, 27989 -5796, 29277 -6544, 27793 -6672, 29057 -7461, 27569 -7542, 28809 -8370, 27319 -8404, 28532 -9270, 27042 -9258, 28226 -10162, 26737 -10103, 27893 -11044, 26407 -10938, 27533 -11914, 26050 -11762, 27145 -12773, 25668 -12575, 26730 -13620, 25260 -13375, 26289 -14453, 24828 -14161, 25822 -15271, 24371 -14934, 25330 -16075, 23889 -15693, 24812 -16862, 23385 -16435, 24271 -17633, 22857 -17162, 23705 -18387, 22307 -17871, 23115 -19123, 21734 -18563, 22503 -19839, 21141 -19236, 21869 -20536, 20526 -19891, 21213 -21213, 19891 -20526, 20536 -21869, 19236 -21141, 19839 -22503, 18563 -21734, 19123 -23115, 17871 -22307, 18387 -23705, 17162 -22857, 17633 -24270, 16435 -23385, 16862 -24812, 15693 -23889, 16075 -25330, 14934 -24371, 15271 -25822, 14161 -24828, 14453 -26289, 13375 -25260, 13620 -26730, 12575 -25668, 12773 -27145, 11762 -26050, 11914 -27533, 10938 -26407, 11044 -27893, 10103 -26737, 10162 -28226, 9258 -27042, 9271 -28532, 8404 -27319, 8370 -28809, 7542 -27569, 7461 -29057, 6672 -27793, 6544 -29277, 5796 -27989, 5621 -29469, 4914 -28157, 4693 -29631, 4027 -28297, 3760 -29763, 3137 -28410, 2823 -29867, 2243 -28494, 1884 -29941, 1346 -28551, 942 -29985, 449 -28579, 0 -30000))) \ No newline at end of file diff --git a/stress_benchmark/resources/013.settings b/stress_benchmark/resources/013.settings new file mode 100644 index 0000000000..a78ed7616e --- /dev/null +++ b/stress_benchmark/resources/013.settings @@ -0,0 +1,628 @@ +material_bed_temperature=55 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=2.4 +clean_between_layers=False +support_interface_skip_height=0.1 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=10 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=3 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=120 +support_bottom_height=0.8 +raft_acceleration=350 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +cool_min_speed=12 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=190 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=50 +acceleration_support_interface=350 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.1 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=2.4000240002400024 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=350 +speed_travel=100 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.1 +material_bed_temperature_layer_0=70 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=6.5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=30 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=13.333333333333334 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=350 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.4 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=350 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.8 +speed_wall=22.5 +bottom_thickness=1.2 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=0.0 +wall_line_count=6 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=190 +brim_gap=0 +acceleration_support_infill=350 +support_meshes_present=False +travel_avoid_distance=0.638 +raft_interface_speed=16.875 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=10 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150.0 +acceleration_topbottom=350 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=40 +skin_overlap=10.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=100 +skin_material_flow_layer_0=101 +bridge_skin_material_flow_2=100 +speed_support_interface=20 +machine_max_acceleration_x=500 +support_interface_height=0.8 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=8 +blackmagic=0 +speed_wall_x_roofing=35 +material_print_temperature_layer_0=200 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=2.0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=350 +interlocking_orientation=22.5 +speed_wall_0_roofing=30 +sub_div_rad_add=0.4 +bottom_skin_preshrink=2.4 +minimum_bottom_area=10 +infill_line_distance=0.40404040404040403 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=36.666666666666664 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=55 +raft_base_speed=16.875 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=12 +skirt_brim_material_flow=100 +acceleration_support_roof=350 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=250 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=30 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.2 +jerk_wall_0=8 +mold_angle=40 +raft_speed=22.5 +prime_tower_wipe_enabled=True +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=350 +cool_min_temperature=190 +jerk_layer_0=8 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.1 +fill_outline_gaps=False +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=8 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=225 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=25 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=101 +material_final_print_temperature=190 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=350 +meshfix=0 +material_flow_layer_0=101 +retraction_combing=noskin +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=12 +roofing_layer_count=0 +speed_slowdown_layers=1 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=12 +lightning_infill_straightening_angle=40 +speed_topbottom=20 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=20.0 +machine_max_jerk_z=0.4 +support_tree_angle=55 +expand_skins_expand_distance=2.4 +prime_tower_position_y=195.562 +mesh_position_x=0 +cross_infill_pocket_size=0.40404040404040403 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.2 +wall_thickness=1.2000000000000002 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=350 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=350 +minimum_support_area=2 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=8 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=60 +z_seam_x=112.5 +acceleration_travel=500 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=350 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.04 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=8 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=350 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=215.562 +bridge_wall_min_length=2.2 +experimental=0 +bottom_layers=8 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.0 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=lines +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=350 +material_end_of_filament_purge_length=20 +speed_print=45 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=350 +carve_multiple_volumes=False +raft_surface_thickness=0.1 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=100 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=99 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=101 +speed_print_layer_0=20 +raft_jerk=8 +speed_support=30 +jerk_support_interface=8 +machine_disallowed_areas=[] +minimum_roof_area=10 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=55 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=2.4 +acceleration_ironing=350 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=20 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=grid +support_roof_height=0.8 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1.2 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=10 +support_fan_enable=False +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=350 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=2.4000240002400024 +brim_line_count=15 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=350 +wall_transition_angle=10 +top_thickness=1.2 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=15.0 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=8 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=3 +infill_mesh=False +layer_height=0.1 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=90 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=500 +alternate_carve_order=True +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.4 +machine_extruders_share_nozzle=False +acceleration_prime_tower=350 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=10.0 +wall_0_material_flow_roofing=100 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=190 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=350 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=35 +time=09:20:33 +machine_buildplate_type=glass +top_layers=8 +jerk_ironing=8 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=2.4 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.15000000000000002 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=20 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=20 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=20 +material_bed_temp_wait=True +machine_depth=225 +bridge_wall_material_flow=50 +jerk_travel=10 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=225 +bottom_skin_expand_distance=2.4 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=22.5 +material_name=empty +acceleration_wall_0=350 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/013.wkt b/stress_benchmark/resources/013.wkt new file mode 100644 index 0000000000..262d510e32 --- /dev/null +++ b/stress_benchmark/resources/013.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((107638 61798, 107744 62158, 108015 62180, 108062 62230, 108158 62595, 108629 62124, 108298 62134, 108653 62014, 109074 62244, 109253 61956, 109398 62376, 109778 62263, 110656 62109, 110664 62166, 111427 62029, 111455 62046, 111909 62070, 111589 62212, 111811 62557, 112026 62552, 112468 62660, 112801 62720, 113487 62365, 113536 62295, 113672 62301, 113685 62442, 113789 62647, 113875 62653, 114231 62320, 114654 62279, 115076 62173, 115173 62437, 115478 62555, 115710 62416, 115765 62591, 116266 62673, 116360 62845, 116641 62839, 116922 62956, 117235 62822, 117458 63223, 117459 62791, 117998 62730, 117546 62587, 117967 62033, 118261 61840, 118748 61934, 119096 62353, 119359 62691, 119801 62728, 120175 62684, 120280 62944, 120774 62898, 120901 62842, 121043 63014, 121518 63116, 121805 63356, 122041 63450, 122526 63294, 122632 63225, 123064 63424, 123244 63527, 123317 63515, 124068 63678, 124174 63956, 124422 63794, 124995 63832, 125404 64201, 126132 64693, 126089 64441, 126457 64147, 126777 64239, 127418 64478, 128049 64082, 128275 64819, 128762 64965, 128929 64780, 128811 65015, 129252 65023, 130043 64726, 130423 64443, 130492 64314, 130544 64398, 130731 64407, 131153 64554, 131278 64749, 131377 65183, 131928 65221, 132241 65138, 132370 65393, 132667 65433, 132789 65394, 133284 65774, 133424 65732, 133566 65611, 134116 65771, 134053 66534, 134180 66604, 134271 66552, 134167 65762, 134697 65797, 134853 65990, 134596 66599, 134863 66665, 135169 66580, 135312 66469, 135630 66611, 135871 66841, 136072 66764, 136384 66966, 136641 67299, 136703 67429, 136850 67448, 137216 67207, 137434 67416, 137720 67474, 137803 67771, 137931 67972, 138182 67790, 138010 67383, 138471 67543, 138462 67769, 138718 68077, 139093 67699, 139253 67684, 139313 67819, 139270 68249, 139653 68632, 139943 68770, 140305 68715, 140118 68196, 140039 68075, 140343 68073, 140824 68399, 140847 68453, 140689 68774, 141071 69419, 141379 69254, 141750 69433, 141961 69711, 142034 69702, 143056 70297, 143079 70701, 143137 70925, 143207 70998, 143671 70858, 144069 70888, 144063 70756, 144170 70669, 144256 70867, 144197 71122, 143918 71390, 143754 71388, 143741 71894, 143973 71983, 144178 71866, 144287 71644, 144585 71807, 145227 72064, 145344 72079, 145422 72196, 145734 72514, 146087 72750, 146266 73205, 146504 73286, 146903 72997, 147138 73558, 147258 73710, 147374 73949, 147816 74245, 148300 74404, 148262 73694, 148482 73644, 148546 74002, 148808 73791, 148947 73748, 149399 74308, 149320 74843, 149861 75048, 150004 75194, 150297 75228, 150697 75742, 150898 76141, 151018 76209, 151055 76307, 151091 76961, 151179 77070, 151126 77332, 151570 77909, 151580 78020, 151677 78055, 152478 78580, 152696 78890, 153246 78969, 153380 79090, 153611 79598, 153792 79860, 153905 79874, 153936 79591, 154122 79201, 154206 79214, 154328 79854, 154605 79798, 154504 80124, 154638 80595, 154936 80806, 155128 80869, 155269 81264, 155431 81461, 155986 81903, 156258 82619, 156519 82902, 156556 83165, 157009 83410, 157167 83650, 157544 83967, 157864 84528, 158004 84588, 158073 85144, 158021 85262, 158066 85649, 158272 85891, 158599 86346, 158557 86503, 158724 86951, 158727 86979, 158994 87451, 158791 87519, 158896 87858, 159613 88094, 159336 88273, 159649 88589, 159739 88888, 160231 89076, 160204 89377, 160601 89355, 160838 89733, 161221 90494, 161383 90683, 161672 91308, 161571 91396, 161971 91966, 162496 92318, 162462 92594, 162351 92817, 162180 92856, 161919 93082, 162058 93324, 162016 93586, 162077 93918, 161818 93768, 161505 94100, 161903 94483, 162130 94357, 162118 94570, 162029 94651, 161900 95118, 162044 95320, 162237 95693, 162398 96260, 162247 96429, 162428 97079, 162416 97087, 162649 97642, 162676 97681, 162746 98177, 162913 98358, 162884 98734, 162808 98875, 163144 99515, 163166 99796, 163123 100064, 163535 100638, 163830 100958, 163875 101096, 164441 101577, 164657 102608, 164595 102645, 164362 103065, 164983 103275, 165146 103843, 164874 103985, 165021 104245, 165545 104603, 165903 105016, 165782 105809, 165812 105910, 165682 106040, 165320 106161, 165251 107010, 165111 107456, 165237 108118, 165064 108353, 165277 108600, 165182 108913, 165174 109503, 165333 109641, 165308 109854, 165320 110236, 165568 110298, 165474 110446, 165754 111299, 165547 111687, 165981 111636, 165974 111657, 165481 111804, 165584 111929, 165889 112497, 165964 112767, 165945 113418, 166046 114684, 165503 115419, 165817 116075, 165383 116036, 165285 116518, 165742 116536, 165617 116819, 165673 117116, 165822 117431, 165683 117658, 165526 117986, 165568 118331, 165417 118612, 165467 118745, 165151 118758, 164957 118933, 164905 119163, 165368 119289, 165490 119256, 165516 119450, 165484 119467, 165217 120121, 165067 120571, 165157 121003, 165172 121288, 165011 121820, 164765 121800, 164445 121913, 164355 122565, 164523 122609, 164201 122923, 164910 123207, 164748 123566, 165050 124082, 164563 125083, 164392 125386, 164152 125996, 163871 126297, 163547 126535, 163469 126722, 163349 126839, 163017 127240, 162763 127834, 162564 127878, 162590 127731, 162175 127658, 162065 127927, 162342 128096, 162190 128472, 162603 128759, 162611 128912, 162760 129315, 162472 129764, 162485 130421, 162416 130697, 162248 130937, 162311 131118, 162261 132151, 162371 132801, 162325 132903, 162382 133095, 162566 133491, 162586 133703, 162446 133854, 162530 133985, 162238 134286, 161767 134062, 161670 134133, 161712 134452, 160591 134891, 160035 135235, 159899 135389, 159790 135615, 159612 135650, 159146 136137, 158963 136445, 158739 136611, 158161 136703, 157900 137055, 157994 137249, 157778 137593, 158521 137562, 158398 137737, 158264 137783, 157781 138194, 157602 138122, 157415 138501, 157068 138911, 156974 139057, 156760 139345, 156410 139507, 156292 139768, 155917 139738, 155750 139652, 155490 139865, 155149 140040, 155280 140188, 155685 140146, 155753 140218, 155589 140305, 155221 140427, 155160 140620, 155287 141386, 155238 141436, 155052 142258, 154966 142371, 154495 143275, 154456 143369, 154201 143734, 154049 144255, 153871 144409, 153698 144744, 153645 145119, 153283 144989, 152823 145452, 152842 145920, 152754 146154, 152301 146979, 152110 147120, 152044 147501, 151917 147924, 151659 148182, 151360 148687, 151430 149144, 151420 149256, 151372 149220, 150907 149175, 150656 149553, 150614 149805, 150902 150066, 151046 150526, 150329 151460, 150202 151491, 149753 151374, 149417 151668, 149174 152094, 148972 151942, 148562 152188, 148517 152674, 148526 152895, 148418 152955, 148350 153100, 148103 153019, 147353 153203, 147243 153213, 147088 153415, 147014 153879, 146967 153867, 146071 154506, 145993 154466, 145495 154367, 145205 154083, 145100 154068, 144872 153638, 144729 153643, 144741 154034, 144882 154200, 144749 154383, 144397 154504, 144154 154600, 143646 154758, 143366 154743, 143275 155263, 143228 155261, 143174 155353, 142516 155406, 142285 156030, 142168 156078, 142060 156390, 142113 156052, 141577 156346, 141933 156689, 141829 157065, 141794 157330, 141700 157397, 141716 157431, 140903 157507, 140293 157893, 140034 158441, 140068 157709, 140640 157507, 140116 157450, 139847 157552, 139436 158276, 139837 158458, 139336 158461, 138686 158872, 137909 158995, 137861 158740, 137635 158791, 137532 158912, 137450 159332, 137196 159858, 135972 160278, 135835 160233, 135518 160665, 135594 160729, 135517 160742, 135391 160690, 135007 160607, 134864 160622, 134745 160899, 134671 161326, 134448 161485, 134359 161330, 134092 161332, 133701 161441, 133695 161585, 133506 161665, 133254 161563, 132782 161658, 132173 162159, 132000 162484, 131789 162307, 131500 162273, 131201 162404, 130891 162617, 130781 162604, 130708 162672, 130305 162626, 130092 162964, 129726 162769, 129546 162178, 129065 162143, 129020 162183, 128325 162112, 128244 162139, 128097 162067, 128237 162029, 128235 161603, 128399 161569, 128252 161425, 127574 161299, 127228 161617, 127387 161818, 127212 161733, 127046 162124, 126770 162433, 126418 162319, 126131 162762, 125819 162784, 125715 163046, 125310 163312, 125114 163304, 125127 163483, 124763 163835, 124536 163765, 124474 163510, 124167 163601, 124074 163593, 123247 163771, 122981 163958, 122697 164085, 122335 164007, 121863 164241, 121858 164227, 121137 164199, 121067 164467, 120021 164611, 119693 163971, 119739 163581, 119366 163183, 119105 163154, 119020 163401, 119114 163896, 118883 163770, 118631 163914, 118470 163732, 118453 163882, 118177 163847, 118321 164160, 117915 164427, 118067 164735, 117856 164553, 117582 164442, 117481 164518, 117068 164577, 116939 164916, 116709 165055, 116192 165087, 116027 164799, 116062 164641, 116039 164238, 115539 163917, 115085 163960, 115015 163931, 114539 163932, 114354 164048, 114197 164264, 114091 164522, 114280 165180, 113539 164858, 113371 164716, 113113 164784, 112690 164606, 111994 165075, 111490 165262, 111219 165331, 110298 164515, 110557 165316, 110477 165308, 110032 164930, 109991 164995, 109892 164947, 109392 164932, 109305 165141, 109136 165242, 109037 165177, 108134 165011, 107889 165174, 107890 165207, 107535 165027, 107281 164788, 107097 164792, 106984 164860, 106574 164973, 106296 164837, 105829 164535, 105493 164437, 105167 164174, 104876 164084, 104653 164317, 103974 164179, 103578 163873, 103532 164101, 102784 163889, 102609 163627, 102484 163388, 101939 163456, 101877 163716, 101795 163419, 101351 163304, 101293 163693, 101638 163863, 101453 164071, 101246 163822, 100885 163533, 101153 162796, 101934 163113, 102341 163186, 102017 162680, 101132 162568, 100907 162322, 101047 162652, 100880 163530, 100496 163549, 100135 163399, 99760 163287, 99423 163126, 99214 162951, 98920 163149, 98490 163059, 98142 162563, 97901 162928, 97559 162428, 97072 162026, 96310 161931, 96778 162238, 96736 162288, 96671 162241, 96623 162260, 96193 161924, 95762 161666, 95631 161693, 95338 161385, 94738 161327, 94356 161354, 94035 161322, 94213 161133, 93952 160952, 93626 161035, 93167 160833, 92458 160573, 92483 160542, 91980 160109, 91620 160219, 91635 160057, 91176 159840, 91294 159570, 91504 159403, 91193 159130, 90531 159379, 89536 159374, 89282 159293, 89299 159127, 89111 158789, 89120 158769, 88695 158394, 88407 158566, 88150 158607, 87522 158118, 87379 158052, 86752 157585, 86554 157572, 86219 157667, 85893 157358, 85559 157215, 85735 156690, 85727 156510, 85591 156449, 85593 156521, 85081 156933, 85053 156526, 85152 156226, 84432 156133, 84073 156466, 84088 156721, 83864 156586, 83664 156539, 83838 156454, 84155 156068, 83957 155828, 83676 155305, 83334 155100, 82732 154931, 82745 154765, 82658 154885, 82135 154847, 81814 154578, 81757 154250, 81376 154469, 80767 154183, 80818 153959, 80751 153846, 80146 153555, 79859 153068, 79693 152867, 79265 152780, 78962 152586, 78662 152546, 78113 152225, 78048 152007, 77743 151619, 77425 151154, 77646 150887, 77376 150978, 76961 150958, 76693 150973, 76627 150905, 76689 150795, 76621 150181, 76183 149989, 76111 149562, 75871 149735, 75370 150201, 75322 149778, 75193 149701, 74914 149472, 74486 148900, 74513 148800, 74464 148427, 74190 148322, 74076 148230, 73738 148245, 73618 148397, 73659 148164, 73500 147713, 73666 146997, 73648 146658, 73301 146188, 73129 146033, 72780 145897, 72312 146251, 72276 145911, 72056 145754, 71945 145570, 71284 145039, 70815 144606, 70801 144331, 70597 144262, 70424 144117, 70432 143568, 70647 143304, 70680 142891, 70297 142497, 69982 143003, 69855 143086, 69805 143064, 69791 142923, 70270 142480, 69746 142313, 69407 142467, 69113 141754, 68871 141327, 68720 141118, 68511 140871, 68561 140310, 68669 140001, 68576 139702, 68364 139591, 68332 139947, 67868 139424, 67407 139393, 67186 139323, 66959 138724, 66983 138469, 66424 138353, 66486 137934, 66538 137653, 66020 137484, 65843 136947, 65627 136590, 65374 136286, 65343 135432, 65250 135015, 65159 134751, 64778 134435, 64885 134175, 64196 133775, 64179 133680, 64333 133269, 64195 132998, 63970 132896, 63712 132872, 63225 132438, 63375 131948, 63074 131185, 63119 131037, 63074 130981, 62915 130326, 62777 130148, 62721 129550, 62657 129309, 62584 129210, 62057 128796, 62203 128478, 61955 128412, 61929 128235, 62047 127661, 61699 127364, 61684 127190, 61755 127070, 61773 126640, 62035 126030, 62009 125911, 61436 125556, 61432 125520, 61857 125167, 61540 125052, 61054 124897, 61013 124414, 61237 123699, 60717 123715, 60734 123292, 60628 123041, 60716 122373, 60480 121823, 60265 121578, 60217 120990, 60468 120094, 60238 119458, 60004 119090, 59981 118793, 59828 118448, 59823 117850, 59701 117599, 59670 117391, 59759 116940, 59654 116786, 59793 116138, 59588 115572, 59575 115355, 59731 114955, 59857 114376, 59599 113591, 59856 112715, 59776 112139, 59887 111652, 60011 111355, 59808 111014, 59734 110646, 59686 110483, 59827 109878, 59940 109779, 59994 109528, 59940 109297, 59649 109152, 59583 108877, 59915 108894, 60079 108737, 60252 108998, 60478 109100, 60548 108936, 60481 108729, 60268 108467, 60720 108165, 60701 108075, 60857 108020, 61222 107710, 61301 107710, 61218 107408, 60219 106833, 60044 107052, 59763 107001, 60192 106806, 60291 106190, 60565 105774, 60593 105609, 60659 105643, 60655 105497, 60723 105129, 60848 104635, 60874 104340, 61021 104090, 61048 102967, 61091 102932, 61011 102630, 61123 102383, 61004 102171, 60910 101701, 60885 101387, 61199 100818, 61145 100707, 61376 100410, 61494 100173, 61688 100090, 61820 99750, 61972 99564, 61858 99159, 61816 98760, 61950 98612, 62065 98263, 62079 97386, 62111 97085, 62311 96552, 62332 96320, 62505 96335, 62659 95923, 62637 95813, 63041 95281, 63354 95070, 63339 94378, 63390 94042, 63886 93811, 64211 93100, 64312 93017, 64288 92830, 64368 92463, 64531 92378, 64728 91633, 64661 91444, 64750 90969, 64664 90595, 64752 90411, 64803 90087, 64957 90200, 64961 90453, 65257 90882, 65490 90727, 65715 90836, 66168 90639, 66220 90569, 66181 90244, 65966 89980, 65606 89857, 65511 90282, 65388 90350, 65269 89946, 65367 89777, 65311 89403, 65365 89082, 65784 88998, 65968 88879, 65801 88198, 66423 87757, 66470 87783, 66483 87703, 66672 87366, 67092 87078, 67525 86514, 67736 86138, 68038 85312, 68331 85212, 68766 84683, 68658 84425, 69008 84286, 69551 83796, 69773 82646, 69905 82334, 70278 81957, 70394 81760, 70475 81723, 70809 81300, 71241 81463, 71389 81277, 71375 80953, 70861 81223, 71346 80613, 71462 80697, 71682 80604, 71981 80583, 72016 80532, 72447 80372, 72659 80263, 72576 80080, 72447 79614, 72736 79324, 73032 78853, 73318 78735, 73314 78631, 73465 78597, 73725 78275, 73833 78183, 73800 77861, 73687 77683, 73900 77542, 74015 77407, 74281 77286, 74665 77314, 75150 77680, 75233 76974, 75746 76759, 75853 76678, 76135 76806, 76072 76387, 76293 75934, 76542 75750, 76961 75829, 77021 75669, 77140 75787, 77293 75861, 78094 75293, 78260 75090, 78560 74838, 78138 74243, 78580 74003, 79071 73679, 79173 73665, 79896 73332, 80217 73357, 80228 73057, 80593 73050, 80682 72879, 80725 72331, 81188 71782, 81414 71643, 82167 71556, 82415 71469, 82405 71348, 82702 70919, 82725 70678, 83050 70397, 83858 69751, 84248 69190, 84308 69050, 84388 69066, 84411 68405, 84266 68336, 84248 68033, 84547 68005, 84744 67907, 85257 68266, 85370 68279, 86119 68437, 86165 67866, 86320 67645, 86362 67230, 86722 67072, 87027 66667, 87459 66643, 88121 66513, 88125 66307, 88576 66447, 89015 66728, 89248 66285, 89680 65979, 89710 65827, 90025 65647, 90292 65288, 91699 65040, 91843 65174, 91803 65479, 92197 65569, 92568 65917, 92697 65862, 92474 65523, 92616 65436, 92809 65182, 93354 65118, 93778 65542, 93951 65570, 94671 65348, 94694 65251, 94819 65197, 95130 64605, 95165 64605, 95181 64525, 94977 64273, 95382 64182, 95570 64205, 96162 63962, 96461 63772, 96690 63543, 96787 63371, 97676 63653, 97902 63476, 98374 63151, 98461 62855, 98556 62844, 98610 62901, 98658 63205, 99056 63088, 99395 63359, 99804 63559, 100333 63509, 100415 63772, 100805 63361, 101010 62939, 101252 62919, 101611 62855, 102073 62624, 102333 62846, 102565 62800, 103215 62762, 103198 62253, 102993 61820, 102934 61788, 102919 61678, 103019 61612, 103775 61530, 103877 61422, 103926 61511, 104386 61511, 104682 61620, 104751 62166, 105231 62050, 105494 61705, 105716 61970, 105985 62345, 106404 62038, 106632 62045, 107082 62232, 107223 61822, 107320 61394) (107405 163123, 107658 163399, 107872 163671, 108234 163678, 108544 163668, 108569 163577, 108562 163262, 108410 163315, 108084 163236, 107876 163248, 107574 163068, 107392 163009) (104025 163306, 104223 163629, 104453 163662, 104530 163378, 104357 163119) (118332 64249, 117941 64298, 117861 64327, 116702 64337, 116338 64265, 115949 64310, 115152 64290, 114927 64232, 113840 64171, 113565 64190, 113494 64076, 113018 64133, 112030 64137, 111788 64178, 110986 64242, 109716 64235, 109400 64280, 109212 64269, 107898 64604, 106933 64043, 106712 64278, 106557 64475, 106399 64460, 105159 64515, 104534 64856, 103577 64886, 103375 64972, 103091 64974, 102518 65034, 101601 65102, 100399 65081, 100307 65042, 99991 65061, 99430 65219, 99351 65274, 98751 65234, 98501 65229, 97418 65711, 96438 66211, 95855 66285, 95702 66424, 95166 66789, 95003 66784, 93994 67300, 93565 67491, 93450 67561, 93275 67551, 92746 67656, 92677 67642, 92602 67697, 92389 68016, 92034 68146, 91538 68520, 91054 68778, 90543 68507, 90189 68638, 89572 68818, 89431 68894, 89600 69240, 89152 69427, 88704 69395, 88043 69758, 87655 69861, 87129 69892, 86755 69902, 86660 69960, 85555 70291, 85627 70909, 84995 71379, 84372 71916, 84189 72110, 83892 72549, 83540 72778, 83195 72953, 83119 73024, 81636 74220, 81427 74422, 80402 74743, 80336 74845, 80131 75541, 79908 75972, 79451 76296, 79219 76480, 78370 77063, 77598 77965, 77425 78059, 77134 78291, 76996 78386, 76762 78693, 76494 78814, 76366 79273, 75559 80110, 75523 80171, 75071 80725, 74926 80792, 74274 81543, 74046 81739, 73512 82236, 73432 82394, 73287 82441, 73195 83047, 72690 83547, 72675 83599, 72014 84512, 71734 85155, 71464 85491, 71166 85735, 70684 86870, 70468 87225, 69999 87689, 69674 88209, 69360 88868, 69222 89131, 68714 89882, 68209 90916, 67841 91761, 67500 92602, 67136 93381, 66926 93690, 66526 94671, 66412 95158, 66303 95397, 65974 96510, 65766 97083, 65441 97653, 65284 98604, 65214 98882, 65143 99712, 64590 100407, 64500 100809, 64418 101321, 64408 101545, 64072 102139, 63842 102588, 63716 103865, 63684 104077, 63644 104860, 63652 105000, 63568 105413, 63591 105916, 63628 106423, 63570 106622, 63393 107695, 63431 107873, 63516 108445, 63492 108902, 63314 109220, 63445 109770, 63410 110098, 63355 111041, 63337 111208, 63322 111967, 63234 112230, 63222 112796, 63356 113665, 63268 114234, 63233 115222, 63268 115478, 63252 116059, 63179 117013, 63251 117207, 63404 118524, 63430 118819, 63622 119082, 63693 120009, 63900 120454, 63854 120862, 64062 121653, 64175 121995, 64201 122326, 64402 123143, 64545 123670, 64562 123809, 65015 125370, 65101 125609, 65173 126317, 65233 126683, 65422 127154, 65697 127749, 65835 127942, 66039 128414, 65981 128841, 66105 129353, 66362 130142, 66715 130892, 66819 131198, 66966 131728, 67741 133316, 67863 133501, 68490 134853, 68571 135075, 68746 135211, 69075 135718, 69459 136475, 69570 136810, 69745 137069, 69822 137324, 70255 138093, 70518 138490, 70762 138734, 70950 139101, 71035 139601, 72216 140772, 72578 141326, 72855 141789, 73131 142910, 73205 142988, 73201 142906, 73804 142853, 74067 142994, 73804 143344, 74120 143350, 74567 143816, 74944 144274, 75672 145048, 75809 145220, 76382 145873, 76660 146129, 77248 146760, 77838 147367, 77561 147882, 77986 148080, 78110 148405, 78588 148758, 78812 149017, 79004 149291, 79293 149580, 80175 150357, 80996 150861, 81132 150999, 81469 151225, 82383 152190, 82961 152145, 83411 152379, 83602 152383, 83776 152532, 84030 152705, 84332 153022, 84989 153522, 85236 153680, 85811 153977, 86088 154147, 87503 155176, 87941 155484, 88037 155644, 88509 155894, 88649 156026, 88896 156464, 89256 156693, 89976 156860, 90298 156903, 90826 157231, 91428 157487, 92466 157794, 93189 157931, 94452 158517, 94652 158574, 95101 158783, 95323 158911, 96117 159087, 96193 159084, 96735 159292, 97287 159520, 97997 159705, 99238 160198, 99530 160345, 100146 160544, 100454 160282, 100923 160136, 101193 160173, 102820 160613, 103521 161372, 103640 161587, 104564 161534, 105113 161583, 106008 161762, 106274 161772, 106554 161984, 107012 162164, 107372 161803, 107580 161665, 108231 161557, 108698 161681, 109450 162234, 109527 162340, 110191 162230, 110362 162249, 110745 162246, 111519 162512, 111975 162605, 112070 162538, 112267 162685, 112569 162368, 113001 162209, 113297 162148, 113753 162246, 114120 162432, 114284 162624, 115492 162998, 115842 163021, 115936 163094, 115995 163083, 116014 162936, 116562 162232, 116741 162045, 117010 161708, 117549 161399, 117916 161394, 118641 161286, 119454 161150, 120071 161144, 120446 161289, 121097 161718, 122237 161336, 122955 161373, 123198 161502, 123406 161454, 123904 161418, 124372 161282, 124564 161268, 125138 160939, 125848 160412, 127286 160207, 127539 160206, 127987 160160, 128492 160038, 129097 160282, 129479 160041, 129849 159927, 130055 159748, 130325 159620, 130993 159527, 131266 159365, 132113 159153, 132375 159132, 132663 158903, 132893 158953, 133028 158471, 133350 158246, 134054 157389, 134145 157158, 134631 156874, 135563 156265, 135868 156297, 136264 156301, 136527 156485, 136855 156983, 137067 156746, 137396 156838, 137538 156827, 137765 156737, 138488 156186, 138769 156047, 139205 155497, 139329 155768, 139746 155523, 139996 155443, 140685 154981, 140785 154271, 141249 153702, 141374 153163, 141450 153050, 141575 153016, 142406 152562, 142670 152365, 143077 152360, 143404 152460, 144087 152220, 144265 152108, 144932 151865, 145318 151417, 145450 151382, 145672 151218, 146028 151007, 146462 150661, 146538 150476, 146782 150375, 147350 149983, 147657 149637, 148380 148989, 149170 148735, 149406 148492, 149427 148299, 149553 147781, 149546 147627, 149170 147541, 149179 147259, 149621 147344, 149776 147059, 150031 146436, 150062 146160, 150227 145713, 150261 145330, 150362 145027, 150515 144747, 151115 144003, 151850 142957, 152578 141858, 152779 141599, 153416 140855, 153547 140649, 153820 140336, 153833 139718, 153854 139343, 153971 139212, 154216 139230, 154439 139371, 154816 139041, 155069 138562, 155892 137302, 156253 136712, 156316 136456, 156763 135491, 157157 134559, 157716 134034, 158304 133462, 158783 132859, 158935 132748, 159680 132397, 159798 132167, 160053 131875, 160621 131758, 160572 130952, 160533 130837, 160892 130141, 160799 129900, 160781 129657, 160903 129457, 160982 128990, 160987 128625, 161176 128257, 161166 128110, 161557 127571, 161669 127305, 161738 127185, 161887 126263, 161440 125660, 161501 125490, 161901 125130, 161852 124508, 161726 124351, 161996 123695, 161765 122827, 161848 122322, 162041 121681, 162146 120906, 162238 120500, 162328 119792, 162466 119524, 162556 118576, 162558 118218, 162658 118233, 162887 117852, 162861 117560, 162940 117257, 162949 116670, 162815 116087, 162691 115786, 162653 115598, 162949 115117, 162837 114936, 162467 114521, 162421 114072, 162851 113620, 162914 113675, 162895 113588, 163052 113137, 163096 112475, 162816 112337, 162767 111631, 162838 111282, 162788 111154, 162883 110292, 162829 110177, 162773 109418, 162575 108764, 162593 107705, 162642 107502, 162602 106746, 162630 106378, 162654 105255, 162643 104845, 162461 104012, 162598 103620, 162538 103199, 162269 102862, 162168 102299, 161936 102017, 161825 101733, 161994 101331, 161460 100585, 161389 100509, 160987 99974, 160702 99563, 160116 98162, 160078 97301, 160030 97091, 160163 96953, 160030 96835, 160213 96249, 159915 95619, 159709 95519, 159606 95087, 159662 94582, 159780 94567, 159737 94166, 159880 93232, 159554 92811, 159278 92701, 158941 92375, 158735 91583, 158056 90671, 158031 90487, 157694 89655, 157567 89499, 157393 89087, 157390 89026, 157289 88594, 156872 88218, 156632 88097, 156472 87979, 155579 87725, 155415 87548, 155195 86858, 155225 86781, 155151 86730, 154982 85908, 154180 84810, 154167 84709, 153923 84142, 153010 84035, 152679 83755, 152641 83063, 152862 82895, 152628 83030, 152354 82668, 152259 81794, 151577 81214, 151511 81185, 151083 80454, 150987 80241, 150883 80216, 150151 79183, 150120 79110, 149967 78910, 149525 78717, 149453 78432, 149224 78487, 148997 78170, 148806 78022, 148269 77129, 148047 76893, 147812 76854, 147700 76878, 146995 76693, 146742 76644, 146492 76505, 146216 76178, 145992 76002, 145365 75304, 145041 74457, 144978 74075, 144709 74103, 144229 74193, 143949 74147, 143396 74395, 143274 74409, 142661 74114, 142150 73737, 141928 73607, 141257 72838, 141262 72776, 140917 72224, 140786 71965, 140761 71988, 139847 71919, 139375 71573, 139008 71533, 138453 71257, 137972 70699, 137711 70457, 137577 70044, 137637 69671, 137000 68917, 136714 69035, 136514 69048, 136292 68757, 135873 68740, 135567 68510, 135344 68283, 134919 68430, 134676 68453, 134236 68218, 134057 68154, 133281 67841, 132775 67687, 131954 67617, 131716 67520, 131452 67203, 131068 67053, 130761 66919, 130344 66928, 129949 66616, 129054 66515, 128832 66803, 128529 66715, 127661 66437, 126795 66102, 126468 66087, 125917 66030, 125027 65716, 124646 65610, 123784 65289, 123550 65306, 122980 65095, 122571 65075, 121657 64533, 121195 64627, 119556 64070, 119199 64016) (97747 161636, 98038 161957, 98138 161655, 97891 161358) (137167 158299, 137516 158370, 137528 158041, 137367 157993) (164383 121157, 164460 121458, 164643 121522, 164651 121052) (165315 113634, 165369 114218, 165799 114380, 165940 113417) (163783 104411, 164070 104509, 163958 104846, 164043 104979, 164418 104902, 164321 104595, 164220 104404, 163754 104362) (164371 103476, 164497 103574, 164952 103288, 164357 103226) (164030 102190, 164349 102398, 164361 101710) (62343 97288, 62705 97711, 62815 97991, 63011 97994, 62946 97661, 63191 97365, 62735 96934) (63712 97384, 63444 97446, 63704 97768, 63836 97639, 63840 97309) (161996 97262, 161982 97442, 162590 97623, 162361 97115) (62940 96740, 63290 97296, 63423 96919, 63229 96594) (161250 96057, 161332 96219, 161509 96299, 161675 96146, 161399 95965) (161528 92489, 161412 92579, 161881 92672, 161810 92403, 161531 92208) (67036 87741, 67287 87743, 67496 87568, 67116 87236) (157512 86791, 157894 87140, 157806 86746, 157543 86569) (68660 85381, 68873 85485, 68972 85478, 69044 85346, 68962 84984) (157148 84782, 157317 85047, 157841 85054, 157744 84588, 157505 84507) (154475 81612, 154617 81963, 154688 82040, 155046 82077, 155312 81938, 154902 81489, 154793 81079) (148148 74973, 148185 75238, 148290 75288, 148587 75136, 148667 74723, 148333 74586) (84059 69892, 84210 70181, 84431 70204, 84386 70094, 84499 69920, 84353 69654) (139600 69184, 139319 69556, 139738 69340, 139806 69096, 139661 69025) (87096 68038, 87328 67948, 87495 67797, 87062 67638) (88318 67155, 89083 66978, 88634 66696) (96357 64276, 96536 64491, 96761 64482, 96798 64312, 96649 64269) (110797 62370, 110959 62617, 111135 62607, 111268 62228)), ((75815 150408, 75891 150745, 75537 150700, 75397 150390)), ((156372 140873, 156236 141029, 156017 141039, 155807 140986, 155929 140815)), ((71837 79997, 71743 80151, 71603 79971, 71504 80015, 71541 79854, 72177 79688)), ((78017 74627, 77871 74674, 77757 74502, 78127 74251)), ((146743 71850, 146863 71919, 146785 72533, 146546 72150, 146620 71955, 146542 71809)), ((125944 63739, 126212 63938, 125900 64280, 125410 64170, 125556 63785, 125754 63696))) \ No newline at end of file diff --git a/stress_benchmark/resources/014.settings b/stress_benchmark/resources/014.settings new file mode 100644 index 0000000000..cfc003e2af --- /dev/null +++ b/stress_benchmark/resources/014.settings @@ -0,0 +1,628 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=1.2000000000000002 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=8 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=140 +support_bottom_height=1 +raft_acceleration=1000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.1 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.6666666666666665 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=195 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6 +material_break_temperature=50 +acceleration_support_interface=1000 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0.3 +acceleration_wall_x_roofing=1000 +speed_travel=100 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.6800000000000002 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=40 +retraction_amount=6 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=45 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=30.0 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=1000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=1000 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.7 +speed_wall=80 +bottom_thickness=1.6 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.02 +small_feature_max_length=0.0 +wall_line_count=3 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=195 +brim_gap=0 +acceleration_support_infill=1000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=30.0 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=10.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=100 +acceleration_topbottom=1000 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=80 +skin_overlap=5 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=95 +skin_material_flow_layer_0=120 +bridge_skin_material_flow_2=100 +speed_support_interface=53.333333333333336 +machine_max_acceleration_x=9000 +support_interface_height=1 +skirt_height=3 +support_roof_pattern=concentric +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=95 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=80 +material_print_temperature_layer_0=0 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=2.6666666666666665 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=1000 +interlocking_orientation=22.5 +speed_wall_0_roofing=45 +sub_div_rad_add=0.4 +bottom_skin_preshrink=1.2000000000000002 +minimum_bottom_area=1.0 +infill_line_distance=6.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=33.333333333333336 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=50 +raft_base_speed=30.0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=22.5 +skirt_brim_material_flow=95 +acceleration_support_roof=1000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=452 +prime_tower_base_size=7 +infill_enable_travel_optimization=False +speed_support_infill=80 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=40 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=0.075 +jerk_wall_0=8 +mold_angle=40 +raft_speed=40.0 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=1000 +cool_min_temperature=195 +jerk_layer_0=8 +support_offset=0.8 +material_flow=95 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.2 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=0.075 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=402 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=40 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=120 +material_final_print_temperature=195 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=1000 +meshfix=0 +material_flow_layer_0=120 +retraction_combing=all +wall_material_flow=95 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=20 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=22.5 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=195 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.625 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.1 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=22.5 +lightning_infill_straightening_angle=40 +speed_topbottom=45 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=40 +machine_max_jerk_z=0.4 +support_tree_angle=50 +expand_skins_expand_distance=1.2000000000000002 +prime_tower_position_y=380.575 +mesh_position_x=0 +cross_infill_pocket_size=6.0 +interlocking_enable=False +support_tree_top_rate=10 +wall_line_width_0=0.4 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.1 +wall_thickness=1.2 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=1000 +minimum_support_area=0.0 +brim_width=7 +small_skin_width=0.8 +shell=0 +jerk_print=8 +adhesion_type=none +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=0 +z_seam_x=110 +acceleration_travel=3000 +ironing_enabled=False +support_bottom_material_flow=95 +acceleration_wall=1000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=concentric +initial_bottom_layers=8 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +retraction_hop_enabled=True +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=40 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=400.575 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=8 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=trihexagon +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=1000 +material_end_of_filament_purge_length=20 +speed_print=80 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=1000 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=3000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=95 +support_bottom_density=100 +bridge_skin_density_3=80 +support_interface_enable=False +support_roof_wall_count=0 +infill_sparse_density=20 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=120 +speed_print_layer_0=45 +raft_jerk=8 +speed_support=80 +jerk_support_interface=8 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=1.2000000000000002 +acceleration_ironing=1000 +prime_tower_flow=95 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=95 +speed_prime_tower=80 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=95 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=40 +support_bottom_pattern=concentric +support_roof_height=1 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1.2 +min_skin_width_for_expansion=9.797174393178826e-17 +wall_x_material_flow=95 +infill_material_flow=95 +ironing_monotonic=False +retraction_extrusion_window=6 +support_fan_enable=False +infill_wipe_dist=0.1 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=1000 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=0.4 +brim_line_count=13 +interlocking_depth=2 +wall_x_material_flow_roofing=95 +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=1000 +wall_transition_angle=10 +top_thickness=1.6 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=22.5 +support_roof_enable=False +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=8 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=1 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=100 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=95 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +acceleration_prime_tower=1000 +retraction_hop_after_extruder_switch_height=0.075 +skirt_gap=3 +wall_0_material_flow_roofing=95 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=195 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=False +dual=0 +raft_interface_acceleration=1000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=80 +time=09:27:03 +machine_buildplate_type=glass +top_layers=8 +jerk_ironing=8 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=20 +top_skin_preshrink=1.2000000000000002 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=452 +support_bottom_extruder_nr=0 +speed_support_roof=53.333333333333336 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=45 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=53.333333333333336 +material_bed_temp_wait=True +machine_depth=402 +bridge_wall_material_flow=50 +jerk_travel=10 +retraction_speed=40 +xy_offset=0 +print_temperature=195 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=220 +bottom_skin_expand_distance=1.2000000000000002 +infill_support_angle=40 +speed_layer_0=45 +raft_surface_speed=40.0 +material_name=empty +acceleration_wall_0=1000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/014.wkt b/stress_benchmark/resources/014.wkt new file mode 100644 index 0000000000..8ed5068c15 --- /dev/null +++ b/stress_benchmark/resources/014.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((180401 253120, 180770 253328, 180896 254044, 180950 255594, 180939 256385, 180965 257447, 181027 261131, 180999 262268, 181043 264621, 181053 265621, 180959 266394, 180915 267136, 180917 267899, 180885 269921, 180833 270636, 180822 271584, 180687 271860, 180454 271664, 180287 271686, 180232 271793, 180039 271309, 179876 271205, 179793 271061, 179737 271411, 180003 271830, 180043 271711, 180113 272031, 180472 272798, 180776 273320, 180789 273492, 180877 274014, 180761 274625, 180696 275178, 178285 275179, 178395 274311, 178686 273480, 178802 272821, 178885 272446, 178967 271340, 179110 270986, 179202 271276, 179395 271100, 179508 271097, 179586 270941, 179659 271080, 179728 270749, 179664 270546, 179588 270495, 179314 270104, 179004 269444, 178874 268689, 178842 268581, 178587 267454, 178520 267233, 178330 266478, 178117 265699, 178042 265304, 177864 264756, 177673 263988, 177631 263918, 177450 264122, 177446 263482, 177402 263217, 177118 262649, 177153 261776, 177113 261350, 177427 260679, 177543 260189, 177766 260004, 178111 259341, 178186 258677, 178157 258248, 178095 257998, 178021 257333, 177905 256808, 177690 256176, 177595 255795, 177664 255549, 177677 255139, 177455 254508, 177497 254397, 177502 254014, 177623 253544, 177344 253492, 177001 254010, 177108 254823, 177116 255366, 177250 256146, 177469 256730, 177602 257273, 177680 257746, 177620 258001, 177622 258393, 177721 258588, 177878 258335, 177756 258660, 177761 259328, 177495 259815, 177448 259982, 177185 260456, 177057 260654, 176743 261367, 176831 261995, 176937 261799, 176843 262087, 176977 262493, 177020 262803, 177232 263557, 177566 264892, 177634 265261, 177841 266124, 177948 266497, 178025 267262, 178023 268038, 178220 268832, 178454 270557, 178543 271123, 178555 271680, 178466 272184, 178378 272540, 178245 273191, 178177 273439, 178024 274602, 177937 275179, 175161 275179, 175072 275072, 174908 274173, 174714 273290, 174381 272616, 174234 272588, 173997 272447, 173780 272239, 173774 272831, 173992 273174, 174151 273286, 174465 272849, 174247 273520, 174301 273788, 174403 273931, 174579 273719, 174440 274198, 174664 275178, 172846 275179, 172865 273846, 172901 272749, 173051 272549, 173167 272557, 173719 272179, 173502 271725, 173394 271713, 173417 271519, 173166 270882, 173005 270158, 172980 269156, 172980 268299, 172950 268129, 172869 266955, 173554 266273, 173146 265709, 173043 265790, 173080 265615, 172920 264829, 172954 263238, 173064 261698, 173017 260894, 172927 260304, 172881 259667, 172877 258774, 172930 254727, 172963 254554, 172960 254036, 173186 253499, 173819 253445, 174231 253475, 174503 253549, 174778 253704, 174974 254220, 175060 254700, 175178 255218, 175228 255741, 175028 256553, 175013 257058, 174980 257428, 174954 257950, 174961 258036, 174850 259350, 174765 260073, 174775 260816, 174881 261556, 174830 262315, 175308 263779, 175500 264496, 175675 265237, 175706 265944, 175811 266316, 175976 267035, 176065 267367, 176312 268766, 176418 269461, 176469 270178, 176566 270842, 176468 271328, 176563 271518, 176380 271962, 176355 272547, 176432 272178, 176728 271531, 176930 270862, 176996 270177, 176942 269466, 176791 268635, 176657 268032, 176424 267147, 176088 265976, 175886 265331, 175693 265214, 175821 264614, 175640 263734, 175562 262989, 175407 262252, 175200 261520, 175150 261022, 175089 260055, 175038 259698, 175109 259351, 175013 258923, 175196 259164, 175286 258135, 175320 257566, 175298 257251, 175353 256828, 175271 256599, 175393 256615, 175445 256395, 175498 255706, 175459 255176, 175454 254504, 175393 253577, 175648 253330, 176162 253286, 176581 253523, 176964 253903, 177368 253320, 177734 253188, 178337 253134, 178523 253171, 178685 253329, 178775 253691, 178801 254546, 178865 255240, 178966 255468, 179088 256099, 179295 255568, 179365 254747, 179322 254036, 179231 253412, 179336 253192, 179637 253104, 180046 253063) (175991 273453, 175935 274592, 176030 274154, 176152 273474, 176069 273100) (174513 268260, 174573 268260, 174641 268168, 174606 268043, 174543 267495, 174502 267461) (173356 266952, 173422 267327, 173855 267192, 173962 267088, 174066 267084, 174157 266911, 173590 266311) (179435 258004, 179481 258574, 179512 258664, 179363 259483, 179301 259522, 179164 259912, 178895 260523, 178700 261164, 178632 261896, 178649 262712, 178932 263370, 179179 263498, 179455 263371, 179240 262631, 179185 262546, 179051 261822, 179080 261071, 179213 260623, 179217 260473, 179533 259927, 179743 259304, 179889 258648, 179784 257986, 179635 257451) (180103 262636, 180236 262838, 180346 262652, 180361 262426, 180257 262285) (179094 256146, 179375 257647, 179571 257341, 179485 256716, 179311 255736)), ((192410 128152, 192443 129647, 192451 132488, 192594 132474, 192572 130626, 192581 129942, 192578 128942, 192657 128493, 193435 128418, 193984 128420, 194511 128458, 196757 128379, 198201 128396, 198659 128347, 199100 128408, 199897 128452, 200575 128448, 201158 128404, 202011 128379, 202190 128387, 202832 128329, 203208 128368, 203595 128335, 204050 128436, 204879 128287, 206187 128266, 206563 128213, 206912 128270, 207484 128250, 208104 128246, 208521 128339, 208588 128761, 208599 129944, 208635 129492, 208711 129151, 208790 129008, 209227 128726, 209432 128563, 209924 128454, 210534 128416, 210887 128433, 211395 128437, 211700 128498, 212242 128471, 213091 128468, 213408 128515, 214379 128518, 214572 128553, 215166 128454, 215998 128600, 216830 128587, 217466 128428, 218691 128484, 218829 128471, 219338 128476, 219687 128434, 220130 128516, 220952 128525, 221033 128510, 221749 128452, 222479 128452, 223076 128480, 223861 128448, 224423 128603, 224638 128600, 225114 128936, 225270 129119, 226145 129939, 226530 130320, 226653 130418, 227440 131200, 228401 132191, 228534 132427, 228712 132636, 228980 132761, 229481 133302, 229783 133595, 230250 134140, 230354 134206, 231056 134906, 231191 135292, 231148 135601, 231615 135292, 232157 135551, 232520 135938, 232626 136089, 232997 136496, 233273 136770, 233648 137166, 233851 137327, 234359 137890, 234423 137940, 234804 138326, 235248 138726, 235672 139171, 235891 139426, 236228 139659, 236684 140130, 237065 140431, 237393 140885, 238475 141886, 238692 142176, 239200 142607, 239380 142806, 239914 143313, 240529 143955, 240589 144059, 241505 144961, 241646 145187, 242058 145493, 242551 145938, 242936 146331, 243263 146625, 244368 147784, 244667 148326, 244654 148645, 244995 148367, 245894 149270, 246188 149580, 246655 150003, 247145 150486, 247731 151097, 248096 151452, 248483 151859, 249643 152993, 249978 153520, 250108 154140, 250128 158178, 250319 158231, 250424 158343, 250966 158305, 251139 158331, 251683 158603, 251956 158389, 252376 158525, 252834 158468, 252927 158562, 253133 158468, 253657 158397, 254206 158253, 254935 158265, 255427 158326, 256313 158390, 257434 158287, 258107 158325, 259066 158325, 259906 158284, 260766 158296, 261428 158215, 261592 158169, 262454 158165, 263248 158570, 263312 158665, 263440 159107, 263453 159678, 263450 160545, 263405 161735, 263380 162793, 263338 163779, 263354 164910, 263320 165580, 263282 165627, 263180 166119, 263050 166312, 263095 166617, 263049 167185, 263268 167536, 263291 167907, 257174 182673, 257168 185685, 257174 217532, 256904 217498, 256902 219138, 257174 219142, 257174 231170, 256863 231143, 256858 232925, 257174 232823, 257174 275178, 246644 275178, 246447 274181, 246321 273595, 246144 272551, 246065 271817, 245897 270538, 245849 270272, 245950 269348, 246003 268707, 246238 267945, 246483 267201, 247079 265284, 247400 264557, 247777 263745, 247772 263537, 247799 263707, 248111 263115, 248114 262843, 248156 263037, 248376 262617, 248376 261874, 248363 261798, 248035 262423, 247693 263038, 247362 263667, 247081 264320, 246835 264968, 246319 266443, 246155 267060, 245893 267917, 245748 268684, 245642 268862, 245434 269447, 245293 270263, 245337 271021, 245548 271792, 245640 272526, 245744 273086, 245984 274189, 246218 275179, 244435 275179, 244374 274651, 244273 274001, 244245 273255, 244269 272421, 244254 271265, 244224 270942, 244295 270003, 244406 267717, 244447 267079, 244539 266259, 244792 265619, 245251 264908, 245280 264660, 245407 264167, 245440 263967, 245709 262815, 245637 262163, 245650 261775, 245821 260799, 246055 259608, 246155 258787, 246248 258152, 246228 257465, 246296 256783, 246274 256113, 246377 255451, 246201 254977, 246154 255263, 245949 255301, 245528 255170, 245513 254822, 245308 254046, 245188 253717, 245078 253155, 245046 252781, 244960 252189, 244692 249985, 244564 248462, 244538 247567, 244579 247146, 244664 247054, 245066 246940, 245603 246921, 245591 246309, 245533 246174, 245230 246566, 244497 246480, 244347 246328, 244267 245423, 244165 244972, 244187 244428, 244133 245249, 244027 245689, 243929 246227, 243785 246362, 243159 246387, 242895 246296, 242753 246106, 242652 245459, 242609 243888, 242607 242872, 242580 241048, 242576 239765, 242615 237368, 242498 229349, 242500 228464, 242480 226741, 242506 225790, 242586 224526, 242641 223025, 242654 221933, 242648 219036, 242662 217151, 242646 214088, 242705 210897, 242700 208895, 242678 206165, 242639 203402, 242626 200390, 242638 199146, 242610 197892, 242563 196697, 242525 195344, 242517 194183, 242478 192990, 242417 190420, 242397 187920, 242434 187427, 242482 185917, 242578 184128, 242602 183876, 242634 183140, 242650 182318, 242609 181433, 242537 178701, 242477 177249, 242476 174782, 241961 174785, 241953 175694, 241926 176337, 241906 177653, 241909 178593, 241854 179943, 241844 180599, 241953 181918, 241912 182604, 241907 183194, 241877 183894, 241907 185371, 241868 185928, 241795 187666, 241639 188074, 241353 188228, 240589 188239, 240358 187862, 240300 187494, 240297 187803, 240088 188059, 239597 188098, 239353 187904, 239160 188239, 238313 188250, 237976 188131, 237876 187818, 237900 187016, 237689 186988, 237519 187603, 237528 187749, 237311 188249, 236809 188207, 236262 188235, 236161 187816, 236059 186978, 235917 186787, 235930 186317, 235758 185822, 235707 186250, 235829 186862, 235571 188099, 235419 188078, 235194 188201, 234786 188171, 234463 187980, 234249 187540, 234165 187127, 234109 185720, 234114 183040, 234065 181445, 234021 180489, 234060 176553, 234039 175800, 234048 175081, 234019 173962, 234020 173212, 234064 170877, 234139 169927, 234214 168675, 234275 167900, 234297 167153, 234085 165668, 233687 164974, 233638 166365, 233630 167434, 233674 168185, 233733 168747, 233747 169449, 233678 169987, 233674 170133, 233561 170778, 233447 171584, 233436 172973, 233527 174984, 233532 175455, 233595 176493, 233717 177539, 233751 178590, 233812 183152, 233784 184229, 233718 185390, 233700 186493, 233751 188019, 233768 188288, 233781 189008, 233780 189559, 233754 190779, 233745 192596, 233698 193250, 233573 193649, 233518 193990, 233492 194799, 233455 195451, 233427 196478, 233507 197434, 233571 197942, 233617 198718, 233633 200041, 233626 202233, 233592 203457, 233576 204957, 233578 206464, 233523 207639, 233514 208538, 233533 209220, 233634 209877, 233586 210868, 233574 211821, 233547 212474, 233550 213097, 233582 214354, 233476 217213, 233429 217466, 233306 217743, 233094 217919, 232408 217952, 231862 217752, 231421 217817, 231101 217721, 230811 217964, 230373 217979, 229780 217960, 229558 217902, 229493 217835, 229403 217402, 229482 217303, 229490 216468, 229458 216266, 229368 216514, 229261 217115, 229308 217350, 229185 217720, 228997 217986, 228320 218011, 227860 217973, 227756 217303, 227679 217185, 227530 217255, 227102 217570, 226591 217911, 225937 217428, 225708 216545, 225670 214441, 225673 211706, 225635 209836, 225599 208952, 225589 208087, 225605 204975, 225570 203517, 225584 201299, 225574 200124, 225612 196932, 225689 195623, 225781 193717, 225841 192829, 225858 192095, 225797 191405, 225671 190660, 225622 190017, 225595 188988, 225615 188162, 225710 186730, 225741 186420, 225794 185525, 225813 184576, 225782 183386, 225740 182421, 225631 180559, 225513 177500, 225444 176008, 225492 174050, 225566 168640, 225733 167673, 225833 167291, 225827 166627, 225631 165377, 225608 164541, 225582 163986, 225584 163344, 225539 161836, 225582 160497, 225633 158127, 225752 156302, 225733 155632, 225565 154405, 225561 152207, 225590 150576, 224795 149775, 224711 150371, 224256 151138, 224239 151261, 224281 151194, 224416 151487, 224579 151610, 224799 151936, 224792 153471, 224811 156117, 224800 158616, 224744 161961, 224547 163360, 224493 164031, 224509 164671, 224608 165960, 224658 167029, 224692 168247, 224594 168963, 224570 169753, 224344 170506, 224605 171125, 224688 171256, 224737 171574, 224779 172359, 224782 172964, 224724 175850, 224745 176633, 224777 177263, 224795 178342, 224754 181712, 224691 182222, 224382 182539, 223970 182586, 223672 182572, 223475 182411, 223287 182384, 223121 181913, 222944 181222, 222921 180632, 222983 179987, 222944 179287, 222928 179160, 222903 178581, 223010 177873, 223247 177176, 223459 176481, 223628 175773, 223754 175041, 223843 174298, 223829 173977, 223837 172981, 223972 172288, 224127 172025, 224232 171557, 224050 171167, 223824 171712, 223660 172005, 223447 172850, 223481 173509, 223472 173641, 223492 174259, 223178 175557, 222955 176407, 222785 176750, 222640 177424, 222572 177637, 222509 178135, 222488 178540, 222410 179244, 222381 179922, 222432 180561, 222521 181189, 222545 182205, 222448 182430, 221886 182595, 220831 182599, 220701 182566, 220574 182469, 220526 181902, 220321 181305, 220191 181586, 220103 182083, 219958 182499, 219673 182627, 219268 182356, 219092 181880, 219099 181253, 219152 180747, 219166 179635, 219211 179025, 219159 178325, 219196 177700, 219068 176786, 218707 175603, 218522 175126, 218435 174589, 218239 174275, 218151 173993, 218047 173389, 218008 173641, 218029 173808, 217981 174330, 218112 174999, 218429 176364, 218507 176859, 218598 177649, 218615 177728, 218640 178233, 218662 178418, 218691 179539, 218678 179800, 218671 180346, 218604 181203, 218382 181969, 218242 182079, 218156 182267, 218001 182392, 217626 182299, 216968 182012, 216870 181781, 216771 181725, 216726 181266, 216691 180362, 216693 179999, 216654 177370, 216699 174541, 216646 172147, 216559 166166, 216603 164803, 216674 163773, 216717 162823, 216734 161909, 216729 159917, 216744 157655, 216729 155257, 216763 153372, 216781 153168, 216803 152631, 216773 149664, 216867 148838, 217241 148141, 217141 147828, 216917 147404, 216855 147065, 215946 146528, 216035 148472, 216046 149815, 216005 151774, 216062 154229, 216042 155158, 215960 157591, 215917 158179, 215873 158626, 215792 160732, 215487 160955, 215119 161020, 214930 160442, 214829 159937, 214788 159868, 214717 159975, 214602 160884, 214517 160964, 214229 161051, 213586 161046, 213253 160860, 213314 160788, 213348 160461, 213280 159871, 213191 159662, 213383 159471, 213442 159357, 213348 158735, 213271 158533, 213162 158663, 213160 159269, 213040 159734, 213110 160180, 213073 160432, 213108 160503, 212762 161057, 211563 161008, 211146 160859, 211045 160712, 211072 160508, 211006 159563, 211002 159050, 210950 158538, 210891 158277, 210961 157458, 210909 156219, 210759 155771, 210815 155090, 210864 154933, 210773 154558, 210707 153849, 210689 153219, 210760 152627, 210721 152106, 210597 150812, 210475 149054, 210401 147777, 210387 147196, 210329 146929, 210398 146455, 210396 145921, 210368 145424, 210410 144567, 210512 143891, 210482 143170, 210315 142460, 210272 142431, 209996 142484, 209869 143171, 209909 143876, 210095 144833, 210075 146498, 210099 147198, 210138 147449, 210151 148297, 210177 148425, 210189 148954, 210234 149162, 210207 149780, 210276 150885, 210315 152037, 210380 152715, 210446 153159, 210511 154050, 210546 154971, 210600 155441, 210626 156589, 210704 157357, 210669 157518, 210722 157933, 210677 158666, 210601 158868, 210604 159231, 210665 159826, 210634 160752, 210459 160852, 210062 160898, 209065 160776, 208455 160667, 207849 160510, 207787 159837, 207839 158038, 207822 157460, 207767 156542, 207706 154959, 207805 153711, 207812 153134, 207658 151279, 207632 149622, 207649 148992, 207719 148366, 207828 147865, 208031 147116, 208116 146508, 208102 145757, 208104 144541, 207982 143866, 207733 143193, 207652 142528, 207126 142528, 207081 145956, 207012 147181, 206955 148773, 206842 150961, 206869 151792, 206930 152440, 207027 153120, 207077 153801, 207100 155303, 207083 156129, 207007 157672, 206947 158469, 206915 159264, 206897 160039, 206894 160859, 206920 161941, 206925 162607, 206985 164000, 207027 164618, 207081 165673, 207273 171437, 207240 173152, 207159 180144, 206953 181247, 206903 181441, 206878 182101, 206921 182768, 207050 183463, 207103 184130, 207151 185617, 207154 186539, 207195 187978, 207116 191678, 207105 192839, 206967 195345, 207031 196214, 207096 196735, 207147 197409, 207162 199810, 207120 202908, 207114 204678, 207075 205290, 206979 205800, 206456 205948, 206676 206105, 206767 206528, 206831 207114, 206863 208664, 206863 209360, 206879 210399, 206879 211170, 206930 213225, 206957 214926, 206929 216286, 206985 220098, 206915 220769, 206852 221522, 206836 222237, 206843 222970, 206810 224819, 206757 225846, 206745 226798, 206796 227636, 206860 228406, 206851 229243, 206611 230855, 206573 231742, 206567 232507, 206653 234315, 206656 234809, 206692 235704, 206851 237166, 206870 237748, 206923 241217, 206943 243335, 206825 245802, 206828 246410, 206864 247502, 206898 248170, 206907 249269, 206878 250731, 206862 252832, 206787 253242, 206669 253555, 206597 254286, 206571 255458, 206534 256511, 206691 257872, 206760 259072, 206759 262159, 206722 263703, 206708 265244, 206709 266697, 206658 267690, 206644 268981, 206732 269665, 206758 270280, 206717 271077, 206703 272111, 206676 272785, 206713 274883, 206689 275178, 200778 275179, 200788 274640, 200747 274512, 200744 274192, 200572 274125, 200488 274963, 200509 275179, 198843 275179, 198845 271897, 198811 270166, 198756 268769, 198779 265030, 198754 262997, 198761 261728, 198751 261102, 198751 259938, 198795 256481, 198856 255729, 198931 254059, 199018 252678, 199031 251943, 198964 251226, 198843 250512, 198792 249791, 198773 249075, 198780 248229, 198855 246918, 198928 246116, 198970 245182, 198987 244400, 198963 243221, 198790 239950, 198609 235343, 198623 234580, 198660 233480, 198727 228366, 198800 227574, 198997 226793, 198991 226029, 198851 225257, 198795 224576, 198754 223659, 198738 222514, 198705 221644, 198709 220956, 198773 218723, 198786 217774, 198831 216829, 198920 215545, 198889 214829, 198770 213963, 198738 213462, 198721 212253, 198773 208758, 198774 207516, 198826 206788, 199338 206423, 199393 206425, 199248 206277, 199133 205306, 199096 203617, 199096 202218, 199074 201131, 199090 200372, 199040 198312, 199001 195525, 199025 194278, 199010 192825, 198985 191746, 198972 189522, 199067 188431, 199102 187733, 199116 186903, 199106 186317, 199135 184276, 199191 183087, 199223 182094, 199215 181310, 199101 179448, 199116 178549, 199190 177833, 199278 177193, 199357 176417, 199381 175050, 199376 174397, 199312 173183, 199269 171339, 199213 170393, 199121 169473, 199083 168235, 199070 166211, 199041 164973, 199011 161524, 199075 160062, 199123 159231, 199133 158419, 199064 155948, 199081 150808, 199129 150130, 199338 149482, 199409 148818, 199439 146993, 199471 146296, 199428 145598, 199287 144358, 199233 143804, 199198 142997, 199190 142471, 197987 142381, 197973 143321, 197994 145273, 197957 146910, 197955 147413, 197924 147986, 197943 150070, 197892 150737, 197595 151074, 197474 151368, 197731 151905, 197810 152027, 197966 152682, 197967 153701, 197954 154400, 197958 154622, 197915 155329, 197903 155412, 197909 156283, 198039 159371, 198126 160814, 197956 161292, 197763 161129, 197502 161316, 197380 161470, 197881 162110, 198054 162796, 198098 163516, 198118 164579, 198111 165602, 198053 166530, 198005 167051, 197989 167743, 198046 168793, 198058 169212, 198148 171146, 198165 171965, 198161 172709, 198125 173503, 198126 174004, 198105 174661, 198158 176761, 198171 177914, 198072 180939, 197976 182091, 197906 184105, 197785 184452, 197708 184511, 197328 184602, 196833 184576, 196689 184496, 196538 184146, 196380 183296, 196072 180728, 196021 180495, 195928 180561, 195978 180309, 195903 179920, 195905 179718, 195846 179101, 195747 178518, 195597 179131, 195680 179475, 195658 179748, 195714 180342, 195804 180906, 195857 181449, 195972 181789, 195964 181954, 196036 182457, 196144 183440, 196171 184125, 196121 184348, 195976 184541, 196206 184567, 196309 184624, 196313 184717, 196465 184988, 196492 185129, 196623 185274, 197002 184638, 197670 184634, 197919 184724, 198038 184951, 198127 185524, 198159 187024, 198157 187411, 198192 189029, 198157 190303, 198146 191317, 198190 192935, 198264 196789, 198262 197451, 198279 198108, 198264 198952, 198143 200792, 198120 201790, 198110 205340, 198124 207092, 198081 209002, 198082 210397, 198106 212849, 198138 214541, 198136 215847, 198148 216267, 198143 217185, 198179 218509, 198256 219862, 198281 221341, 198318 222395, 198329 222991, 198351 223492, 198368 226035, 198266 227712, 198212 228283, 198166 228642, 198131 229429, 198152 230091, 198191 230779, 198220 231956, 198262 232680, 198290 233739, 198292 234335, 198261 235453, 198250 236759, 198296 238521, 198306 239245, 198290 240144, 198209 242819, 198121 243957, 198038 246213, 197926 246413, 197662 246482, 197819 246479, 197976 246608, 198159 246990, 198235 247688, 198262 248855, 198282 250763, 198276 251220, 198294 252049, 198318 252649, 198356 254840, 198323 256215, 198379 258614, 198374 259744, 198282 260440, 198243 261135, 198241 262307, 198204 264037, 198169 264568, 198146 265461, 198162 266195, 198249 267136, 198269 267690, 198245 267863, 198209 268405, 198096 268996, 197988 269763, 197969 271124, 198050 272537, 198078 273756, 198234 275179, 193720 275179, 193685 274563, 193643 275179, 190079 275178, 190011 273738, 190063 271654, 190116 267968, 190149 266686, 190368 265983, 190412 265318, 190327 264644, 190196 263998, 190175 263173, 190146 262520, 190144 261870, 190113 261139, 190108 260430, 190173 258279, 190197 257074, 190316 255366, 190282 254633, 190175 253918, 190135 253212, 190125 251943, 190178 247902, 190223 247371, 190333 247044, 190639 246921, 191575 246902, 191881 246870, 192882 246810, 192955 246844, 193065 246995, 193146 247319, 193167 247747, 193119 248499, 193101 249583, 193107 249632, 193089 250155, 193128 250347, 193032 250777, 192857 252295, 192804 253033, 192937 253719, 193013 252664, 193046 252009, 193131 251585, 193101 251377, 193237 251042, 193615 248580, 193690 247117, 193651 246998, 193736 246732, 193921 246679, 194752 246670, 195133 246836, 195131 247272, 195177 247788, 194974 247824, 194874 249182, 194931 249582, 194808 249597, 194738 250356, 194654 250836, 194672 250968, 194594 251204, 194477 252034, 194427 252844, 194412 253727, 194438 254301, 194471 255510, 194573 256179, 194658 256866, 194709 257746, 194918 258507, 194912 258918, 194987 259617, 195125 260300, 195261 259610, 195165 259116, 195142 258914, 195033 258222, 195013 257533, 194913 256853, 194901 256191, 194820 255543, 194777 254893, 194759 254205, 194757 252983, 194779 252257, 194850 251485, 194845 250996, 194909 250385, 195027 249948, 195135 248899, 195131 248799, 195262 247887, 195311 247058, 195463 246650, 195523 246590, 195822 246563, 195615 246230, 195591 245812, 195517 245453, 195561 245281, 195445 245126, 195627 245092, 195608 244394, 195537 243896, 195349 244047, 195370 244710, 195524 244915, 195342 244994, 195276 245240, 195416 245878, 195194 246424, 194838 246569, 194320 246552, 193779 246506, 193469 246422, 193324 245962, 193261 245166, 193214 245025, 193245 244938, 193251 244075, 193197 243914, 193185 243344, 193212 242885, 193166 242160, 193116 240365, 193079 239667, 193009 239079, 192913 238448, 193005 237864, 192975 237161, 192821 235432, 192794 235314, 192782 234738, 192711 233573, 192683 232960, 192643 231453, 192633 229783, 192648 229054, 192738 228394, 192756 227614, 192600 226911, 192580 226892, 192487 226332, 192275 226214, 192247 226902, 192101 227636, 192175 228349, 192329 229069, 192318 229368, 192327 231098, 192355 232462, 192430 234133, 192480 234953, 192513 235257, 192547 235895, 192577 236047, 192541 236297, 192577 237196, 192676 238086, 192757 238465, 192769 239111, 192794 239349, 192818 240263, 192834 240354, 192862 240865, 192879 240964, 192870 241673, 192898 243459, 192846 244475, 192912 244875, 192887 245428, 192878 245965, 192722 246352, 192383 246417, 191500 246308, 190689 246164, 190157 246017, 190048 245880, 190020 245729, 190079 243431, 190073 242776, 190032 242249, 189995 241316, 189942 240500, 189963 239848, 190007 239360, 190058 238544, 190038 237850, 189890 236199, 189877 234905, 189886 233768, 189992 232831, 190265 231773, 190361 231110, 190350 230171, 190352 229114, 190277 228427, 190039 227700, 189911 227014, 189893 226231, 189898 225037, 189966 220139, 189886 218314, 189907 217131, 189908 216382, 189882 215438, 189851 213545, 189876 211180, 189912 209435, 189911 208541, 189883 206660, 189894 204532, 189927 202659, 189963 201614, 190113 200721, 190200 199774, 190063 197992, 189974 195938, 189956 194314, 189896 192906, 189960 190449, 189942 189678, 189881 188780, 189905 187594, 189905 186497, 189939 185209, 190142 184731, 190280 184649, 190748 184552, 191548 184532, 192068 184654, 192522 184510, 192831 184499, 192541 184454, 192378 184089, 192294 183352, 192207 182899, 192224 182815, 192049 181297, 191947 181065, 191971 180885, 191853 180305, 191703 179059, 191736 178986, 191771 178325, 191620 176985, 191558 176857, 191562 176203, 191579 176033, 191338 175254, 191081 174646, 190502 173743, 190096 173009, 189938 172175, 189971 171421, 190097 170672, 190296 169948, 190401 169271, 190397 167362, 190349 166727, 190176 166093, 189972 165475, 189924 164820, 189912 163601, 189924 163009, 189921 162394, 189950 160674, 189997 160364, 190137 160265, 190205 160390, 190567 160724, 190641 160685, 190786 161037, 191068 161281, 191170 161220, 191340 161485, 191335 161618, 191579 162195, 191666 162742, 191733 163285, 191730 163403, 191861 164005, 191890 164630, 191911 164721, 191933 165261, 191971 165814, 191988 166604, 192041 167605, 192090 167737, 192067 167851, 192106 168350, 192082 168518, 192103 169462, 192146 169627, 192266 169577, 192227 169883, 192169 169987, 192151 170750, 192217 172036, 192186 172905, 192139 173519, 192144 174311, 192307 175097, 192517 175873, 193058 177609, 193230 178081, 193429 178858, 193527 179423, 193746 180173, 193965 181039, 194186 181972, 194486 183115, 194546 183564, 194522 184140, 194409 184460, 194689 184470, 195091 184602, 195178 184579, 195106 184574, 195012 184485, 194977 183824, 194896 183414, 194742 182505, 194534 181556, 194218 180256, 194031 179341, 193845 178580, 193675 178017, 193626 177765, 193466 177247, 193199 176568, 193037 176316, 192888 176172, 192864 175841, 192760 175333, 192680 175345, 192680 175072, 192579 174535, 192461 173530, 192463 172745, 192487 171993, 192589 171242, 192525 170388, 192446 169859, 192460 169165, 192403 167906, 192413 167824, 192379 166537, 192337 165881, 192316 165232, 192304 165130, 192388 163959, 192325 163389, 192328 163345, 192151 162497, 192004 161526, 191987 160912, 191804 160713, 191482 160056, 191253 159315, 191233 158533, 191235 157850, 191189 157150, 191154 155774, 191002 156126, 190985 156441, 190905 157180, 191153 157787, 190916 157569, 190847 157624, 190906 157896, 191155 158474, 190944 158318, 190927 158589, 190953 159243, 191168 159853, 191349 160639, 191219 160585, 191173 160785, 191015 160600, 190742 160103, 190005 158678, 189887 156181, 189880 154961, 189888 153069, 189867 152481, 189891 150260, 190022 149515, 190335 149065, 189980 148522, 189202 147175, 189113 148121, 188932 148781, 188901 149601, 188854 150377, 189002 151348, 189058 152066, 189074 153401, 189064 154839, 189024 155786, 189011 157981, 188963 158751, 188955 159524, 189075 160259, 189028 160987, 189020 161519, 188984 162406, 189018 163599, 188978 164281, 188919 165745, 188705 166093, 188388 166234, 188032 166259, 187555 166219, 187390 166132, 187214 166104, 186681 166152, 186408 166088, 186163 166273, 185095 166274, 184984 166147, 185041 166059, 184948 165383, 184782 165412, 184779 165944, 184719 166075, 184430 166257, 183688 166321, 183237 166265, 183097 165702, 182982 164978, 183001 164602, 183078 164238, 183121 163646, 183078 162869, 183060 162805, 182962 163237, 182986 163361, 182932 164223, 182975 164614, 182952 164977, 182787 165651, 182560 166249, 181877 166226, 181499 166070, 181204 165482, 181152 165132, 181116 164154, 181107 161326, 181076 160315, 181030 159410, 181039 158201, 181035 157069, 181042 156518, 181037 155941, 181011 155442, 181029 153480, 180690 153967, 179915 154689, 180089 155358, 180144 155503, 180296 156000, 180366 156711, 180368 158506, 180343 160696, 180312 162390, 180305 163625, 180366 164900, 180376 165616, 180348 166488, 180348 167432, 180382 168633, 180406 170177, 180404 171895, 180346 174654, 180379 177365, 180367 179699, 180328 181607, 180298 182535, 180164 183381, 180055 184305, 180100 185163, 180169 185917, 180236 187143, 180286 188741, 180281 189502, 180347 191863, 180299 193912, 180303 194629, 180384 196037, 180330 199485, 180217 199955, 179950 200065, 180198 200062, 180567 200146, 180693 200525, 180751 201077, 180783 202030, 180780 202682, 180807 204260, 180832 204794, 180876 206712, 180837 207736, 180900 210366, 180777 211226, 180749 212002, 180745 212783, 180726 213720, 180710 213873, 180667 215028, 180705 215750, 180783 216485, 180761 217177, 180605 217828, 180497 218495, 180480 219229, 180497 219808, 180564 220710, 180571 221099, 180613 221859, 180728 222566, 180786 223225, 180814 224883, 180834 225524, 180857 227458, 180786 228301, 180735 229231, 180809 230810, 180819 231874, 180808 232495, 180790 232906, 180791 233896, 180715 234652, 180536 235308, 180504 236128, 180457 236900, 180606 237873, 180661 238593, 180677 239931, 180669 241359, 180630 242292, 180615 244507, 180566 245282, 180558 246050, 180678 246785, 180631 247514, 180623 248048, 180588 248920, 180621 250125, 180582 250808, 180522 252272, 180309 252619, 179991 252761, 179635 252786, 179158 252745, 178993 252659, 178819 252631, 178285 252679, 178011 252616, 177765 252799, 177032 252807, 176678 252777, 176587 252672, 176644 252582, 176551 251910, 176385 251939, 176384 252470, 176322 252601, 176034 252784, 175287 252849, 174840 252792, 174701 252228, 174586 251505, 174604 251129, 174681 250766, 174725 250161, 174681 249397, 174663 249331, 174566 249764, 174590 249888, 174536 250750, 174579 251153, 174556 251504, 174391 252178, 174164 252775, 173480 252752, 173102 252597, 172804 252019, 172756 251690, 172715 250338, 172713 248030, 172684 246944, 172634 245798, 172641 242482, 172615 241970, 172613 241330, 172631 240249, 172620 239695, 172662 237268, 172806 235100, 172885 234184, 172882 233397, 172707 232535, 172651 231755, 172645 230968, 172751 229685, 172799 229328, 172847 228591, 172855 227767, 172823 227034, 172778 226450, 172762 226061, 172700 225441, 172495 221653, 172504 220898, 172530 220515, 172602 216618, 172653 215894, 172878 215187, 172822 214447, 172669 213672, 172627 212808, 172621 212118, 172587 211242, 172649 209574, 172677 208441, 172768 207486, 172798 206804, 172689 206149, 172608 205489, 172597 204980, 172644 202288, 172639 201794, 172671 200979, 172965 200420, 174331 200378, 175382 200325, 175521 200415, 175617 200582, 175625 200760, 175706 201026, 175651 201114, 175680 201312, 175634 201381, 175615 201859, 175644 201951, 175614 202218, 175575 203004, 175578 203723, 175516 204000, 175584 204264, 175524 204440, 175605 204348, 175777 203193, 175826 203120, 176113 201556, 176140 200783, 176114 200457, 176167 200338, 176349 200250, 175637 200251, 175226 200103, 174785 200214, 174172 200171, 173994 200115, 173882 200011, 173884 199821, 173793 199248, 173788 198935, 173703 199307, 173501 199811, 173357 200047, 172639 200073, 172378 199984, 172224 199511, 172170 198194, 172137 195413, 172176 193338, 172119 191158, 172054 187393, 172057 186870, 172036 185993, 172073 185078, 172129 184388, 172189 183359, 172216 182302, 172208 181125, 172221 178730, 172210 176775, 172231 175534, 172267 174376, 172262 172921, 172239 170735, 172203 169588, 172202 167958, 172191 166877, 172201 166203, 172196 165276, 171870 165083, 172041 165793, 172041 166608, 171922 168997, 171936 169941, 171995 171091, 172011 171708, 171998 173158, 171981 173723, 171972 176018, 171825 176754, 171734 177109, 171643 179584, 171689 179975, 171855 181765, 171866 183058, 171862 185335, 171827 186629, 171810 189678, 171759 190868, 171749 191761, 171769 192412, 171870 193059, 171818 194159, 171805 195064, 171776 195798, 171807 197028, 171810 197823, 171702 200589, 171527 200988, 171282 201197, 170878 201112, 170748 200943, 170637 200468, 170606 199761, 170485 199097, 170398 198096, 170147 195995, 169904 194659, 169820 193608, 169635 192700, 169572 192675, 169590 192497, 169416 191812, 169039 190460, 168993 189801, 168981 189038, 168917 188423, 168854 187624, 168853 187042, 168820 187023, 168822 186492, 169143 184469, 169187 184283, 169319 182983, 169440 182430, 169546 181748, 169720 181049, 169934 180331, 169947 180341, 170242 179774, 170459 179098, 170473 178728, 170531 178059, 170629 177335, 170692 175832, 170709 174978, 170334 174970, 170275 175821, 170263 176459, 170225 176995, 170189 177750, 170169 178424, 170011 179086, 169760 179791, 169625 179913, 169462 180256, 169324 180680, 169129 181719, 168989 182303, 168917 182962, 169041 183620, 168780 185352, 168621 186326, 168534 186946, 168426 188096, 168426 188457, 168363 189889, 168440 191006, 168354 191179, 168493 191259, 168709 191262, 168923 191370, 169094 191861, 169201 192267, 169347 192002, 169322 192530, 169388 192819, 169412 193204, 169492 193748, 169706 194835, 169749 195559, 169749 195748, 169913 197223, 170057 199026, 170101 199972, 170111 200629, 170066 200942, 169972 201112, 169714 201226, 168814 201260, 168417 201132, 168260 200874, 167976 199777, 167938 199117, 167871 198892, 167622 197336, 167711 196719, 167752 195863, 167595 195409, 167475 195836, 167374 196800, 167409 197085, 167466 197956, 167531 198410, 167499 198792, 167395 199024, 167444 199662, 167576 200877, 167322 201111, 167019 201215, 166812 201161, 166677 201181, 166459 201073, 166248 200713, 166049 199792, 166067 199042, 166053 198382, 165991 197761, 165955 197119, 165941 196452, 165864 195775, 165540 195125, 165502 194406, 165397 192983, 165324 190513, 165510 190234, 165539 190117, 165776 189438, 166055 188777, 166132 188531, 166355 188127, 166303 187540, 166025 188052, 166001 188304, 165927 188243, 165635 188841, 165197 190051, 165169 190202, 165003 190788, 164970 191492, 164871 192237, 164875 192972, 164933 193830, 165055 194599, 165342 196589, 165340 197102, 165401 197852, 165498 198440, 165525 199073, 165600 199599, 165628 200210, 165669 200767, 165548 201172, 165195 201272, 164990 201267, 164744 201171, 164317 200816, 164067 200069, 164024 198788, 164011 197889, 164005 194421, 163923 191739, 163938 190188, 163932 189662, 163953 187624, 164160 186981, 164467 186372, 164836 185756, 164139 185359, 164066 185726, 163925 185226, 163922 183872, 163912 183337, 163958 179676, 164028 178800, 164034 178512, 164120 176909, 164153 176588, 164195 175391, 164176 174909, 163316 174926, 163347 175589, 163251 176906, 163226 177660, 163257 178411, 163403 180144, 163426 182879, 163368 183543, 163252 184293, 163182 184535, 162984 185459, 162923 186130, 162940 187169, 162938 188497, 163009 189112, 163348 190328, 163406 190993, 163423 192639, 163409 194401, 163351 198629, 163364 199217, 163422 200616, 163413 201410, 163386 202455, 163448 205469, 163441 206093, 163454 206384, 163443 208813, 163396 211235, 163429 214580, 163420 216750, 163365 219741, 163265 220691, 163123 221675, 163124 222612, 163174 223208, 163251 224424, 163313 226065, 163329 226757, 163345 228616, 163379 229447, 163395 230381, 163384 231215, 163357 232219, 163347 233536, 163424 234956, 163402 238135, 163386 238987, 163339 239426, 163106 239665, 162760 239789, 161653 239821, 161301 239669, 160832 239834, 160413 239844, 160180 239799, 160128 239450, 159942 238987, 159928 239457, 159861 239701, 159601 239856, 159273 239867, 159266 239927, 159629 239915, 160535 240006, 160938 239974, 161345 240038, 161770 240882, 162085 240125, 162755 240112, 163121 240436, 163188 240752, 163220 241371, 163268 243838, 163280 245271, 163238 247469, 163286 249665, 163366 254762, 163367 256265, 163324 257168, 163244 258416, 163203 259673, 163206 262495, 163190 264186, 163207 266160, 163171 268244, 163154 268504, 163145 269263, 163176 272989, 163191 273326, 163212 275179, 144700 275179, 144712 274792, 144788 274066, 144821 273493, 144971 273125, 145452 272841, 146023 272792, 147449 272773, 152208 272763, 152233 272660, 151428 272736, 150436 272747, 148039 272748, 147465 272740, 147036 272750, 146271 272747, 145483 272728, 144953 272682, 144742 272539, 144487 271888, 144546 271470, 144366 270992, 144415 270197, 144336 269319, 144316 267943, 144346 266960, 144258 266350, 144256 265823, 144206 264601, 144185 264353, 144209 263538, 144167 262793, 144201 262023, 144342 261209, 144491 260157, 144376 258934, 144323 257514, 144357 256882, 144304 256245, 144343 255728, 144280 255041, 144320 254463, 144225 253872, 144297 253309, 144331 252861, 144410 252545, 144579 252398, 144948 252269, 145544 252201, 145280 252167, 145076 252044, 144901 251719, 144993 250786, 145023 250282, 145028 249478, 144887 248646, 144813 247937, 144746 246839, 144655 245970, 144727 245338, 144765 244394, 144719 243225, 144751 241955, 144703 240863, 144749 239931, 144753 239452, 144873 238461, 145101 237975, 145598 237694, 146728 237624, 147335 237620, 148259 237665, 149032 237659, 149379 237631, 150760 237612, 151269 237641, 152331 237735, 152650 237892, 152578 237426, 152018 237410, 151653 237441, 149515 237459, 148965 237433, 147132 237441, 145669 237418, 145208 237316, 144989 236928, 144764 235880, 144811 235012, 144746 234263, 144774 233253, 145006 233150, 145110 233058, 145145 232963, 145194 232160, 144855 231765, 144880 230482, 144899 230226, 144834 229003, 144938 228102, 144856 227504, 144838 225837, 144773 225200, 144792 224635, 144913 224001, 144934 223418, 145065 222888, 145300 222520, 145147 222137, 145097 221641, 145138 221398, 145418 220833, 145251 220111, 145286 219929, 145272 219164, 145495 218163, 145495 217969, 145690 217453, 145328 216644, 145370 215987, 145451 215835, 145372 215699, 145205 214946, 145369 214620, 146051 214564, 146302 214604, 146369 214569, 147387 214580, 148140 214633, 149886 214615, 150346 214704, 150764 214577, 151489 214553, 151493 214270, 150940 214258, 149644 214163, 148337 214234, 147728 214295, 146084 214350, 145501 214350, 145238 214288, 145135 214210, 145023 213887, 145036 213813, 144904 213322, 144849 212450, 144893 211942, 144833 211191, 144866 210552, 144863 209895, 144897 209496, 144867 209022, 144754 208627, 144814 208148, 144828 207584, 144802 206856, 144783 206675, 144753 205673, 144725 205404, 144732 204708, 144761 204416, 144719 203879, 144564 202442, 144609 201648, 144535 200441, 144499 200131, 144494 199487, 144505 199311, 144458 198606, 144557 197874, 144513 197140, 144403 196276, 144470 195060, 144433 194270, 144546 193880, 144564 193258, 144630 192449, 144652 191709, 144613 191304, 144554 190433, 144592 189976, 144587 189361, 144667 188397, 144624 187791, 144595 187560, 144610 186949, 144579 186328, 144631 185986, 144620 185294, 144656 184431, 144678 184255, 144622 183373, 144596 183223, 144504 182183, 144558 181615, 144551 180348, 144660 179762, 144814 179475, 145169 179331, 146039 179297, 145065 179271, 144531 179091, 144407 178927, 144433 177691, 144473 177087, 144453 176806, 144463 176110, 144500 175708, 144519 174628, 144509 174485, 144583 174080, 144550 173417, 144605 172688, 144677 171216, 144669 170950, 144670 169896, 144606 168981, 144454 168276, 144515 167858, 144431 167301, 144478 166037, 144541 165329, 144511 164785, 144530 163830, 144528 163280, 144506 163033, 144514 162422, 144537 161715, 144500 161474, 144517 160325, 144562 160046, 144524 159648, 144631 159280, 144907 158944, 145406 158856, 146707 158822, 147946 158825, 150704 158798, 151042 158785, 152216 158784, 152531 158774, 154217 158779, 155236 158797, 157450 158799, 157489 158547, 157462 157758, 157545 157256, 157540 157003, 157556 156101, 157678 155517, 158121 154939, 158426 154675, 159484 153578, 160022 153054, 160149 152896, 160647 152396, 160994 151837, 161480 151447, 162137 150795, 162499 150550, 162618 150375, 163159 149803, 163258 149667, 163643 149287, 163921 148880, 164078 148762, 164481 148345, 164622 148249, 165028 147716, 165587 147163, 165862 146935, 166385 146451, 166990 145918, 167434 145376, 167940 144884, 168340 144622, 168913 144489, 169160 144497, 169289 144560, 169178 144422, 169131 144264, 170155 143341, 171052 142374, 171511 141958, 172004 141380, 173257 140328, 173472 140044, 173995 139464, 174559 139147, 174750 139134, 175141 139477, 175145 139364, 175575 138849, 176050 138410, 176433 137968, 176845 137616, 177010 137493, 177385 137010, 177829 136529, 178584 135811, 179691 134787, 180110 134382, 180265 134246, 180652 133827, 181157 133346, 181668 132774, 181763 132691, 182239 132223, 182717 131720, 183336 131142, 183690 130735, 184652 129746, 185079 129370, 185646 128839, 186236 128394, 186878 128200, 187900 128249, 188725 128250, 189047 128191, 189338 128211, 189823 128162, 190727 128144, 191524 128170, 192151 128135) (205036 273709, 205010 274271, 204985 274483, 205015 274774, 205136 274932, 205261 274445, 205274 274168, 205175 273289) (247820 270238, 247863 270976, 248052 271684, 248027 272433, 248181 272681, 248248 272679, 248238 271456, 248285 270960, 248275 270373, 248213 270297, 248089 270526, 248004 270222, 247893 270155, 247861 269984) (203773 269999, 203713 270513, 203749 271165, 203815 271517, 203893 271319, 203944 270768, 203950 270268, 203920 269702, 203859 269412) (191635 271452, 191672 270912, 191644 270827) (247895 268052, 247426 268749, 247417 269505, 247544 269787, 247736 269505, 247693 269202, 247745 268766, 248162 268118, 248161 267584) (195319 268434, 195359 268389, 195292 267737) (195409 264465, 195310 265264, 195376 266003, 195353 266513, 195393 266747, 195322 267369, 195504 267474, 195650 265290, 195490 264773, 195437 264436) (194064 265183, 194092 265294, 194114 265233, 194083 264660) (152691 259011, 152712 260009, 152745 260834, 152690 261516, 152724 262290, 152699 263746, 153047 263665, 153026 262962, 152748 262280, 152707 261527, 152808 261253, 152799 261052, 152867 260519, 152883 260094, 152755 259337, 152770 258901, 152711 258436) (191454 262488, 191405 263188, 191441 263533, 191533 263451, 191507 263183, 191502 262430, 191485 262312) (195302 261011, 195365 261293, 195377 261710, 195531 262726, 195598 262076, 195488 260965, 195367 260402) (200531 261940, 200542 262429, 200605 262236, 200586 261856) (247777 258918, 247752 258941, 247447 259614, 247212 260250, 247121 261304, 247161 261637, 247208 261608, 247213 261545, 247484 260933, 247639 259977, 247742 259677, 247920 259441, 248285 258845, 248195 258163) (192699 258837, 192728 259018, 192677 259673, 192639 260469, 192621 261201, 192678 261298, 192786 261065, 192758 260906, 192775 260370, 192772 259671, 192789 259519, 192766 258763) (152745 257572, 152714 258360, 152783 257995, 152825 256945, 152799 256820, 152778 256189) (192515 256106, 192459 256828, 192500 257377, 192584 256830, 192574 256687, 192590 256108, 192581 255706) (196796 252899, 196798 253748, 196838 255063, 196814 255286, 196865 255337, 196967 256917, 196969 256531, 197028 256159, 196976 255967, 196975 255342, 197026 255309, 196990 255066, 197005 254441, 196998 254278, 197017 253757, 197003 253099, 196903 252628) (200886 253409, 200824 254109, 200757 255172, 200733 255873, 200737 256226, 200794 255849, 200913 254730, 200961 253935, 200923 253387) (192629 254726, 192713 255156, 192987 254712, 192928 254213, 192744 254208) (246787 250980, 246821 251449, 246777 251695, 246695 251838, 246507 252692, 246457 252763, 246524 253504, 246381 253840, 246336 254141, 246462 254764, 246399 254792, 246479 254893, 246538 254375, 246669 253782, 246749 253503, 246664 253064, 246712 252881, 246849 252725, 247198 251696, 247095 251375, 247208 251145, 246839 250818) (152779 254035, 152788 253354, 152762 253164) (152537 249747, 152090 250399, 152174 250996, 152621 251765, 152212 252072, 151954 252128, 151169 252199, 152183 252203, 152595 252360, 152679 252567, 152861 251779, 152859 251633, 152980 250927, 153066 250499, 153066 249565, 152789 249450, 152583 249270) (147828 252238, 148142 252248, 148898 252226) (246853 249859, 246813 249993, 246850 250404, 246904 250560, 247249 251097, 247339 250831, 247189 249919, 247135 249786, 246791 249785) (178949 249400, 178888 250214, 178914 250387, 179007 250405, 179020 250221, 179148 249641, 179078 249303) (161245 247644, 161320 248226, 161348 248343, 161357 248231, 161332 247638, 161340 247503, 161269 247325) (177741 247708, 177788 248016, 177871 247793, 177806 246927) (196884 245487, 196879 246314, 196732 246502, 196475 246571, 196234 246576, 196470 246731, 196691 247210, 196826 246759, 197018 246574, 197335 246494, 197232 246427, 197149 246174, 197128 245885, 197025 245866, 196965 245295) (161394 246276, 161461 246563, 161459 246072, 161414 246053) (149054 242941, 149324 243447, 149417 243522, 149540 243510, 149583 243259, 149267 242971, 149121 242920) (176201 240709, 176253 241344, 176336 241615, 176366 241465, 176280 240577, 176202 240214) (195320 240717, 195328 241042, 195454 241364, 195425 240829, 195310 240329, 195317 240242, 195249 240095) (152796 240421, 152744 240917, 152345 241048, 152523 241164, 152577 241260, 152736 241098, 153037 241025, 153008 240492, 152974 240457, 152747 239959) (247326 236433, 247284 237082, 247259 237739, 247284 238567, 247246 239359, 247285 240868, 247349 240863, 247353 236162) (195206 238525, 195304 239021, 195302 239138, 195364 239265, 195336 238952, 195261 238402, 195254 238248, 195166 238022) (244563 235703, 244596 236416, 244438 237024, 244399 237853, 244393 238480, 244447 239121, 244481 238867, 244514 238280, 244503 237869, 244566 237278, 244448 237040, 244632 236607, 244648 236319, 244593 235662) (159948 237680, 159982 237942, 159938 238326, 159999 238691, 160067 238716, 159962 238322, 160061 237977, 159996 237584, 160046 237300, 159936 237120) (202126 237510, 202097 237640, 202203 238333, 202228 237641, 202189 237493) (159960 232550, 159990 233304, 159933 233925, 159920 234523, 159967 235323, 159954 235923, 159978 236439, 160021 236615, 159943 237075, 160109 236830, 160119 235214, 160131 234678, 160106 233665, 160061 233304, 160076 232670, 160042 232155) (174626 236039, 174665 236339, 174709 235883, 174670 235705) (195122 236194, 195104 235803, 195020 235516) (174867 234131, 174826 234502, 174883 234818, 174920 234315, 174993 233799) (194902 233254, 194959 234032, 194964 234370, 195114 234599, 195110 234054, 194977 233503, 195023 232980) (200547 234235, 200588 234521, 200566 233909) (244623 232450, 244678 233094, 244659 233424, 244772 233575, 244779 232785, 244629 232298) (200226 232669, 200254 233503, 200286 233571, 200419 233377, 200321 233209, 200320 232514, 200249 232225) (194858 231416, 194864 231721, 194941 232087, 194931 232411, 195061 232650, 195009 231489, 194997 230977, 194759 230017) (194729 227865, 194791 228546, 194781 228793, 194844 229292, 194947 229670, 194924 229310, 194755 227846, 194639 226573) (204060 225066, 203953 225846, 203876 226534, 204025 227467, 204010 227792, 204130 228345, 204241 226660, 204247 225857, 204102 225142, 204057 224673) (200033 223536, 200048 224065, 200116 223701, 200099 223374) (194475 219745, 194495 220662, 194467 221792, 194496 222933, 194567 221934, 194572 220917, 194546 220717, 194613 220247, 194528 219620) (203725 220115, 203774 220787, 203791 221321, 203825 221565, 203861 222286, 203934 222612, 204062 222140, 203999 221846, 203915 220985, 203878 220783, 203887 220252, 203776 219454) (201298 221541, 201362 221761, 201372 222338, 201415 222430, 201475 222213, 201546 221384, 201472 221267) (174162 219334, 174126 219861, 174239 220399, 174480 220660, 174352 220066, 174225 219396, 174181 219267) (201193 219122, 201168 219514, 201200 220274, 201219 220470, 201362 219511, 201420 218673, 201331 218508, 201144 218358) (203389 217451, 203471 217572, 203424 218122, 203458 218269, 203438 218792, 203486 219300, 203620 218781, 203602 218108, 203568 217854, 203520 216948) (201078 216815, 201097 217629, 201189 216818, 201215 215795) (205557 213368, 205409 213545, 205454 215387, 205594 217406, 205563 215981, 205564 214747, 205591 214111, 205653 213367) (177745 215035, 177806 215615, 177805 216457, 177795 216644, 177837 217182, 177856 217289, 177888 217125, 177959 216442, 177996 215740, 178055 215568, 178122 215013, 178034 214506, 177874 214443) (204629 192513, 204789 192612, 204698 193219, 204734 193435, 204702 193922, 204690 194622, 204616 194850, 204560 195316, 204431 195451, 204294 196007, 204364 196707, 204346 197246, 204353 197399, 204281 198322, 204267 198670, 204210 199233, 204217 199400, 204117 200062, 204067 200580, 203882 202121, 203710 203669, 203637 204884, 203606 205027, 203665 205548, 203580 206130, 203486 206192, 203601 206454, 203604 206621, 203724 207598, 203558 207788, 203521 207896, 203574 208957, 203409 209336, 203330 210102, 203298 210302, 203263 210834, 203206 211147, 203029 212911, 203021 213573, 203066 214188, 203118 214640, 203103 214999, 203155 216125, 203197 216355, 203244 217163, 203460 216770, 203374 216443, 203455 215954, 203390 215424, 203380 214704, 203358 214253, 203364 212436, 203415 211733, 203413 211475, 203458 210841, 203429 210627, 203496 210126, 203683 209329, 203710 208798, 203795 207944, 203866 207445, 203914 206221, 204116 206085, 204419 206039, 204287 205881, 204189 205314, 204186 204456, 204212 203960, 204234 203212, 204231 203023, 204251 202496, 204259 201860, 204295 201234, 204468 199271, 204480 198975, 204529 198277, 204518 198097, 204618 197397, 204670 196723, 204724 195779, 204719 195157, 204732 194519, 204841 193926, 204892 193228, 204818 192278) (201332 213488, 201216 214893, 201249 215252, 201418 215112, 201576 214854, 201581 214772, 201362 214145, 201381 213568, 201373 213489, 201393 212892) (231855 213838, 232042 214241, 232111 214015, 232014 213356, 232010 213097, 231947 213039) (173883 212862, 173949 213705, 173969 213807, 173983 213705, 173979 213057, 173901 212139) (177959 211937, 178042 212199, 178052 212024, 177984 211672) (201697 186599, 201810 187800, 201930 188294, 202005 188835, 202001 189527, 202165 190777, 202230 191137, 202268 192156, 202397 193290, 202394 193956, 202444 194359, 202483 194858, 202522 195589, 202532 196243, 202553 196736, 202545 198545, 202514 199297, 202542 199510, 202457 200022, 202408 201040, 202492 201511, 202376 201316, 202332 201718, 202405 202044, 202292 201923, 202263 202005, 202169 203287, 202266 203573, 202110 203588, 202229 204020, 202062 204020, 202187 204431, 202066 204518, 201988 205600, 202004 206023, 201921 206286, 201597 206394, 201690 206568, 201747 206850, 201764 207274, 201728 207962, 201660 210734, 201562 211477, 201685 211631, 201636 211846, 201741 211683, 201810 211204, 201859 210593, 202006 209355, 202220 208074, 202220 207725, 202265 206955, 202202 206795, 202231 206473, 202349 206212, 202398 206191, 202237 205691, 202365 205386, 202335 205033, 202117 204646, 202354 204830, 202444 204830, 202292 204453, 202378 204439, 202358 204097, 202398 204095, 202425 203787, 202388 203665, 202439 203644, 202602 201566, 202681 201162, 202733 200585, 202773 200395, 202824 199646, 202855 199392, 202885 198580, 202910 198160, 202908 196684, 202893 196245, 202887 195342, 202871 194840, 202715 193253, 202644 192276, 202529 191475, 202346 189463, 202271 189340, 202296 189114, 202153 188464, 202170 188121, 202097 187502, 202032 186823, 201848 186256, 201798 185521, 201758 185236) (175123 211263, 175213 211653, 175328 211270, 175250 210420) (191878 211554, 191958 211491, 191994 211024, 191880 210838) (230714 210796, 230767 211008, 230781 210505) (176990 204502, 176940 205311, 176947 205408, 176925 206477, 177046 207636, 177156 208109, 177241 208800, 177365 209592, 177480 210448, 177595 210814, 177673 210355, 177497 209586, 177401 209085, 177438 208829, 177244 208104, 177341 207506, 177263 206697, 177242 205648, 177247 205043, 177116 204391, 177252 204261, 177056 204066) (161338 208376, 161504 209268, 161292 209950, 161264 210277, 161337 210319, 161347 210115, 161538 209315, 161508 208543, 161381 208109) (230550 209397, 230559 210069, 230622 209388, 230587 209221) (232369 207814, 232334 208618, 232362 208794, 232389 208618, 232377 207931, 232537 207237) (174980 208087, 175013 208695, 175121 208086, 175097 207710) (179328 205404, 179344 206018, 179391 206519, 179395 206664, 179447 207196, 179455 207554, 179574 207753, 179599 207342, 179560 206667, 179544 206184, 179480 205277, 179401 205080) (175206 205931, 175141 206823, 175164 206895, 175287 206705, 175239 206559, 175301 205791, 175297 205180) (205643 205960, 204785 206043, 204991 206128, 205270 206463, 205343 206846, 205426 206352, 205656 205998, 206181 205952) (200443 205602, 200445 206148, 200346 206395, 201033 206344, 200857 206173, 200655 205888, 200528 205498) (177337 202292, 177391 202631, 177236 203159, 177172 203730, 177301 204178, 177353 203506, 177277 203232, 177455 202995, 177539 202335, 177488 202039, 177548 201787, 177451 201590) (177624 200894, 177540 201156, 177746 201129, 177770 200710) (176853 200021, 176561 200223, 177253 200212, 177529 200413, 177781 200372, 178070 200150, 178446 200118, 178358 200051, 178155 200031, 178051 200123, 177708 200223, 177279 200225, 177030 200080, 176872 199767) (178907 200202, 179009 200307, 179076 200257, 179374 200244, 179472 200191) (200171 193180, 200213 193482, 200195 194026, 200211 194285, 200228 195005, 200246 195284, 200261 195987, 200356 196947, 200376 197546, 200456 198481, 200543 198705, 200572 198651, 200565 197975, 200488 196318, 200483 195517, 200460 195296, 200430 194445, 200413 193539, 200358 193363, 200275 192835, 200286 192697, 200221 192522) (176812 193659, 176864 194592, 176874 195613, 176971 196715, 176976 196864, 177057 197569, 177069 196930, 177064 196659, 177091 195390, 177042 194852, 176988 193663, 176868 192934) (246067 195478, 246190 196451, 246274 196027, 246253 195475) (167917 193899, 168024 194534, 167787 194513, 167760 195004, 167683 195209, 167859 195517, 168054 194591, 168043 194055, 168057 193916, 167970 193470) (246011 189379, 246017 189859, 245967 190238, 245989 192001, 246038 191929, 246004 192086, 246046 192488, 245999 192743, 245981 193861, 246049 193860, 245999 194065, 246030 194462, 245982 194731, 246050 195333, 246244 194702, 246276 194018, 246283 193352, 246210 189725, 246209 189186, 246168 188699) (173983 193717, 173987 194337, 173974 194534, 174022 194738, 174084 194311, 174110 193810, 174145 193393, 174090 192595) (227777 193488, 227762 193676, 227823 193903, 227873 193403) (191669 192716, 191517 193694, 191608 193873, 191769 193456, 191786 192603, 191744 192556) (168097 192552, 168134 193105, 168062 193237, 168188 193392, 168207 193254, 168118 192399) (160322 177695, 160281 178342, 160303 178887, 160456 180921, 160578 183057, 160643 184726, 160680 188122, 160621 188822, 160569 189240, 160539 189870, 160671 190500, 160782 191143, 160870 192031, 160918 193203, 160974 193114, 160964 193021, 161028 192444, 161029 192171, 161098 191577, 161120 191124, 161248 189994, 161273 189851, 161053 188224, 161040 185390, 160923 182027, 160880 181298, 160793 179031, 160712 178071, 160660 177692, 160655 177221, 160609 176351, 160255 176336) (204546 190576, 204557 191442, 204583 191810, 204605 192495, 204816 191680, 204779 190232, 204761 189896) (168227 191871, 168307 192046, 168332 191877, 168278 191366) (193242 189697, 193301 190202, 193304 190998, 193381 191689, 193421 190835, 193353 190273, 193352 189703, 193368 189478, 193316 189140, 193354 188849, 193214 188735) (204412 186998, 204392 187709, 204616 187819, 204515 188361, 204546 188582, 204536 189624, 204615 189031, 204623 188913, 204711 188347, 204709 187667, 204686 187532, 204402 187664, 204450 186995, 204427 186894) (152945 188667, 153137 188664, 153138 188236, 152929 188115) (193344 187964, 193330 188083, 193420 188317, 193366 187678, 193368 187414, 193267 187155) (248032 178717, 248068 182641, 248043 183307, 247931 184522, 247948 185177, 248109 185974, 248169 186978, 248258 187785, 248276 188309, 248320 187663, 248258 187013, 248364 186325, 248387 185607, 248313 184914, 248298 183805, 248266 183433, 248314 183077, 248312 182380, 248283 181944, 248321 181262, 248372 181020, 248359 180124, 248375 179914, 248267 179322, 248303 178877, 248202 177880, 248246 177403, 248255 176508, 247968 176503) (166399 187422, 166368 188107, 166676 187490, 166678 186793) (245582 176486, 245651 177190, 245711 178724, 245675 179822, 245729 181530, 245810 183302, 245876 184141, 245980 186304, 245998 187839, 246061 187255, 246082 186650, 246007 185171, 246006 184920, 245957 184264, 246006 183220, 245974 182608, 245935 182229, 245958 180969, 245920 179906, 245871 177794, 245810 176481) (238998 187574, 239100 187565, 239199 187404, 239068 186936) (167197 184511, 167136 185099, 167026 185765, 166903 186666, 166691 186784, 166808 187211, 166974 186850, 167051 186563, 167234 186150, 167399 185539, 167452 184862, 167426 184401, 167327 184231) (205785 184863, 205830 186461, 205873 187081, 205918 187081, 205899 186932, 205961 186463, 205950 186069, 205967 185548, 205956 184687, 205901 184369) (240213 184281, 240226 184468, 240173 184992, 240203 185477, 240320 186232, 240310 186336, 240434 186647, 240443 186415, 240323 185477, 240460 185286, 240580 185277, 240546 184990, 240421 184466, 240457 183919) (237962 185970, 237970 185728, 237942 185445) (239141 185577, 239184 185719, 239180 185599, 239111 185088, 239080 184946) (168656 175857, 168541 176320, 168514 176614, 168322 177042, 168013 178161, 167993 178403, 167854 178746, 167636 179511, 167603 179713, 167442 180155, 167439 180272, 167414 180221, 167212 180790, 167174 181046, 167034 181263, 166883 181694, 166596 182303, 166434 182582, 166333 182961, 166234 183021, 165831 183918, 165797 184112, 165766 184059, 165522 184538, 165548 185099, 165456 184911, 165392 184987, 165317 184901, 165215 184932, 165153 185159, 165214 185536, 165445 185428, 165615 185223, 165661 184996, 165715 184968, 165903 184450, 166096 184132, 166440 183371, 166448 182827, 166549 183122, 166624 183044, 166736 182748, 166715 182112, 166814 182569, 167014 182115, 167014 181652, 167100 181929, 167313 181489, 167330 181334, 167393 181269, 167586 180656, 167805 180049, 168198 178657, 168646 176968, 168744 176350, 168809 175806) (235958 184195, 236025 184822, 236072 184841, 236007 184193, 235982 184130) (200200 183488, 200221 184186, 200256 184468, 200284 184187, 200285 183440, 200248 182728, 200214 182292) (203055 183103, 203137 183828, 203247 182992, 203191 182226) (258533 170918, 258025 171330, 257788 171452, 257414 171507, 256839 170956, 256603 170919, 256473 170770, 256332 171086, 256204 171849, 255715 171684, 255670 172206, 255653 172793, 255618 172847, 255658 173119, 255583 173732, 255475 174054, 255295 174277, 254850 174558, 254780 174663, 254969 174779, 255067 174947, 255236 175551, 255295 176183, 255343 176384, 255303 176971, 255432 177401, 255425 177902, 255510 178385, 255388 178802, 255464 179162, 255470 179407, 255560 179798, 255526 179989, 255543 180351, 255431 180723, 255455 181322, 255385 181681, 255403 182070, 255117 182498, 255109 182618, 255361 182749, 255601 182955, 255757 183221, 255790 183615, 256079 183112, 256258 182590, 256586 181933, 256790 181621, 256997 180892, 257317 180079, 257886 178809, 258777 177069, 259277 175973, 259656 175502, 259236 175306, 259070 175286, 258869 174878, 258701 174277, 258968 174208, 259157 174066, 259271 173487, 259444 173474, 259634 173272, 259681 173150, 259486 173050, 259656 172717, 259608 172244, 259478 171605, 259052 171337, 258519 171708, 258832 171267, 258915 171018, 258660 170768) (201861 177762, 201867 178156, 201835 178686, 201833 178882, 201794 179385, 201651 182144, 201669 182837, 201740 183339, 201890 182844, 201986 182649, 202070 182154, 202068 181295, 201938 180771, 201967 180080, 201949 179726, 201975 178819, 201973 177982, 201927 177659) (238931 181210, 238902 181830, 239014 182746, 239133 183246, 239189 182970, 239193 182225, 239114 181437, 238996 181006) (205659 182818, 205678 183225, 205700 182816, 205710 182108, 205688 182073) (240796 179333, 240742 180040, 240759 180509, 240717 180734, 240816 180934, 240854 180860, 240908 180041, 240900 179524, 240942 179011, 240858 178840) (177399 179315, 177377 179795, 177502 180666, 177523 180577, 177589 179765, 177580 179330, 177490 179103) (222126 170842, 221864 171589, 221631 171917, 221550 172352, 221573 172952, 221458 172458, 221306 172540, 221165 173188, 221037 173490, 220858 174300, 220584 175435, 220495 175930, 220421 176737, 220392 177698, 220459 178429, 220579 179130, 220803 179481, 220888 179446, 220945 179031, 220969 177724, 221068 176226, 221093 176086, 221145 175469, 221278 174561, 221424 173765, 221580 173322, 221848 172424, 222158 171683, 222389 171017, 222409 170981, 222583 170184, 222569 170074) (146545 179301, 147300 179320, 148040 179387, 149250 179445, 150186 179400, 150829 179335, 152323 179294) (193894 158758, 194101 159394, 194125 160080, 194232 160696, 194422 161415, 194543 162007, 194647 162635, 194684 163761, 194834 164468, 194859 165026, 194780 166345, 194786 166496, 194674 167512, 194554 169229, 194468 170111, 194419 171120, 194345 171770, 194333 172468, 194319 172646, 194358 173428, 194491 174210, 194850 175751, 195009 176484, 195203 177022, 195306 176877, 195290 177339, 195406 178197, 195536 179026, 195734 178444, 195601 177833, 195535 177163, 195442 176462, 195357 176131, 195234 175979, 195235 175739, 195184 175189, 195184 174192, 195167 174025, 195233 173803, 195382 172640, 195504 171887, 195679 171147, 195630 170616, 195848 170517, 195932 169967, 196126 169095, 196397 168346, 196470 167670, 196331 167448, 196265 167488, 196243 167651, 196303 168233, 196079 168038, 195967 168297, 195957 168611, 196037 169002, 195838 169377, 195741 169689, 195820 170368, 195560 170270, 195502 170434, 195446 171136, 195255 171468, 195111 171867, 195017 172529, 195073 172914, 194937 172681, 194753 172629, 194630 171867, 194630 171524, 194571 171116, 194623 170297, 194756 168962, 194777 168624, 194869 168001, 194925 167316, 195097 166768, 195202 166255, 195260 165024, 195216 164441, 195274 163821, 195240 163319, 195152 162771, 195010 161757, 194830 160639, 194641 159993, 194554 159613, 194441 159384, 194218 158784, 194125 159258, 194167 158676, 194032 158467, 193954 158104) (166078 177081, 165946 177692, 165681 177884, 165377 178407, 165384 178732, 165532 178813, 165874 178488, 166090 177880, 166175 177499, 166316 177266, 166160 177007) (164890 176516, 164768 177123, 165082 177518, 165165 177124, 165193 176268) (166807 174942, 166956 175417, 166714 175959, 166809 176042, 166649 176136, 166468 176642, 166470 177036, 166648 176672, 166980 176109, 167272 175438, 167085 174939) (235715 175711, 235729 175444, 235683 175206) (227303 174676, 227619 175674, 227654 175678, 227649 175564, 227320 174674, 227325 174481) (168707 175489, 168839 175586, 168854 175667, 168945 175529, 169157 174991, 168729 174976) (205286 171819, 205320 171880, 205271 172498, 205313 172735, 205373 173344, 205382 173868, 205474 174524, 205753 174620, 205666 173866, 205550 173522, 205465 172990, 205456 172494, 205345 171756) (178350 172158, 178242 172939, 178249 173688, 178208 174287, 178412 173869, 178279 172969, 178480 172706, 178487 172046, 178377 171628) (237360 173322, 237505 173849, 237453 173155, 237302 172512) (227078 173082, 227107 173181, 227176 172962, 227160 172650) (217503 169812, 217635 171074, 217845 170628, 217774 169808, 217664 169389, 217545 169375) (219779 163326, 219640 163961, 219537 164592, 219285 165202, 218969 165841, 219017 166492, 219222 167783, 219487 168474, 219692 168836, 219784 169088, 219855 169487, 219882 170099, 220301 170549, 220462 170622, 220535 170597, 220829 170670, 221236 170448, 221336 169889, 221498 170039, 221654 169829, 222183 168514, 222235 167581, 222189 167237, 222198 166618, 222249 165872, 222345 165544, 222350 165379, 222037 164844, 221561 164634, 221518 165196, 221813 165589, 221999 166064, 222073 166531, 222055 167085, 221824 167044, 221775 167101, 221777 167200, 221670 167434, 221610 168087, 221720 168135, 221963 168039, 221899 168447, 221757 169076, 221577 169608, 221347 169394, 221306 169481, 220901 169568, 220485 169265, 220394 168998, 220252 168767, 220174 168538, 220012 168298, 219988 168322, 219704 167337, 219641 166826, 219476 166491, 219522 165863, 219731 165675, 219900 164901, 219947 164332, 220045 163681, 220111 163400, 220013 162958) (235937 169403, 235965 170155, 235951 170303, 236003 170610, 236061 169829, 236112 169590, 235998 169206) (203458 167700, 203481 167968, 203501 168683, 203572 169057, 203674 169725, 203676 169945, 203781 170386, 203785 169063, 203909 168389, 203845 168001, 203763 167879, 203731 167696, 203546 167351) (230683 167098, 230778 167914, 230760 168585, 230882 169752, 230904 169394, 230928 168593, 230966 168195, 230925 167920, 231063 167254, 231089 166580, 231060 166387, 230817 166263) (218495 160812, 218265 161492, 218154 162217, 218059 162440, 217706 163556, 217593 164302, 217443 164995, 217396 166403, 217422 167185, 217394 167740, 217425 168705, 217527 169030, 217617 168835, 217714 168819, 217824 166297, 217870 165604, 217937 165075, 218096 164236, 218163 163806, 218338 162981, 218439 162273, 218624 161575, 218833 160879, 218765 160110) (236086 168476, 236223 169027, 236253 168386, 236305 168094, 236154 167736) (236264 166544, 236291 167308, 236367 167670, 236429 166934, 236298 166513, 236294 166388) (223076 162100, 223021 162782, 223037 163429, 223197 164063, 223257 164516, 223436 164774, 223415 166053, 223502 166137, 223517 166305, 223539 166070, 223464 163658, 223421 163480, 223440 163398, 223336 162171, 223262 161484) (232541 165988, 232596 166130, 232622 166057, 232564 165363) (220949 164694, 220789 164670, 220612 164790, 220521 165025, 220539 165374, 220937 165327, 221176 165443, 221356 165234, 221330 164566) (226865 164644, 226900 164841, 226953 164611, 226930 163888) (187346 162874, 187285 163687, 187311 163860, 187404 163878, 187417 163694, 187544 163114, 187474 162776) (230212 158456, 230241 158757, 230346 159318, 230338 159844, 230372 160030, 230438 160750, 230636 161195, 230681 161668, 230750 161914, 230710 162529, 230738 162738, 230789 163301, 230865 163423, 230889 163195, 230823 163077, 230900 162525, 230781 161858, 230771 161283, 230721 160870, 230547 160522, 230606 160310, 230481 159816, 230414 158991, 230414 158446, 230348 157875, 230114 157761) (228120 161635, 228100 161942, 228153 162740, 228201 162848, 228270 162606, 228271 162450, 228319 161932, 228233 161435) (223104 155174, 223034 155481, 222955 155977, 222908 156554, 222903 156791, 222756 157603, 222817 158173, 222864 158406, 222806 158803, 222702 159970, 222766 160712, 222894 161423, 222914 161681, 222986 161888, 223247 161352, 223199 160674, 223104 159936, 222996 159541, 223093 158709, 223108 158408, 223166 157909, 223248 157615, 223225 157050, 223177 156808, 223227 155977, 223187 155358, 223251 154814, 223143 154483) (186137 161181, 186185 161489, 186265 161271, 186212 160434, 186203 160400) (219212 148112, 219056 148171, 219158 148838, 219252 149594, 219421 150333, 219451 150537, 219614 151079, 219667 151837, 219962 152602, 220111 153272, 220143 153369, 220155 153990, 220109 154725, 220126 154915, 220007 155462, 219990 155682, 219883 155920, 219612 157178, 219603 157715, 219429 157685, 219231 158673, 219016 159400, 218965 159988, 218786 160102, 218911 160536, 219005 160168, 219056 159628, 219260 159303, 219659 157982, 219843 157218, 219855 156857, 220004 156550, 220213 155712, 220540 154609, 220637 154132, 220606 153351, 220490 152509, 220318 151816, 220131 150250, 220117 149806, 219986 149559, 219808 149909, 219697 149816, 219614 149818, 219496 150119, 219509 149546, 219295 148816, 219280 148517, 219352 147926) (196058 158301, 196022 158995, 196055 159659, 196253 160095, 196326 159612, 196509 158900, 196426 158246, 196273 157655) (228030 157793, 227963 158221, 227995 158497, 227984 159128, 227992 159503, 228091 158663, 228085 158498, 228116 157879, 228101 157687) (193677 158129, 193789 158467, 193915 158060, 193705 157826) (200929 156442, 200968 157300, 200986 158241, 201019 158442, 201037 158139, 201020 157423, 201055 156501, 200971 156105) (177708 156818, 177792 157399, 177839 158097, 177874 158333, 177971 157741, 177946 157403, 178087 156465) (195386 151562, 195343 152115, 195387 152268, 195499 152813, 195532 153308, 195663 154129, 195671 154648, 195722 155010, 195781 155665, 195880 156264, 196004 156014, 195902 156399, 195979 156975, 196042 157905, 196157 157620, 196246 157505, 196136 156956, 196173 156285, 196209 156006, 196191 155619, 196066 155206, 196130 154957, 196085 154499, 196007 154348, 195735 154968, 195952 154295, 195905 153904, 195973 153598, 196009 152885, 195905 152259, 195860 152303, 195889 152185, 195712 151694, 195558 151952, 195677 151509, 195568 150836) (229914 156253, 230112 157752, 230305 157636, 230283 157048, 230314 156980, 230190 156078, 230207 155189, 229881 154868) (221501 156486, 221473 156776, 221533 157258, 221633 156637, 221573 156277) (213110 156703, 213168 157031, 213154 156629, 213098 156060, 213104 155937, 213022 155323) (193971 153598, 193901 153875, 193909 154041, 193898 154576, 193909 155438, 194030 155754, 194108 155741, 194081 155931, 194319 156763, 194456 156542, 194501 155854, 194475 155364, 194421 155188, 194274 154511, 194115 153850, 194133 153465) (218434 155483, 218444 155599, 218351 156207, 218353 156510, 218397 156333, 218487 155433) (228164 155664, 228272 155927, 228389 155674, 228365 155114, 228144 155044) (190963 154745, 190977 154955, 191154 155612, 191153 154950, 191125 154659, 191017 154600) (184597 154183, 184649 154817, 184733 155088, 184763 154938, 184676 154051, 184598 153689) (192213 153409, 192307 154141, 192561 154792, 192624 154390, 192560 153772, 192436 153133, 192282 152921) (228154 154701, 228263 154148, 228431 153416, 228296 153280) (218220 153687, 218304 154615, 218424 154134, 218369 153474) (223373 152823, 223288 153557, 223168 154280, 223381 154023, 223432 153565, 223615 152702) (218111 152662, 218167 153135, 218269 152674, 218273 152443, 218206 152352) (204852 149584, 204828 150158, 204792 150655, 204774 151383, 204817 151740, 204799 151992, 204882 152395, 204987 150616, 204937 149875, 204959 149705, 204879 149236) (191697 151159, 191764 151476, 191807 151160, 191734 150929) (197142 150685, 197357 151127, 197295 150551) (194175 147495, 194379 148265, 194486 148948, 194589 149698, 194628 150295, 194656 150463, 194678 150289, 194906 149978, 195050 149985, 195158 149890, 195272 150176, 195332 150974, 195511 150834, 195372 150787, 195465 150139, 195444 149915, 195270 149470, 194921 147859, 194646 147410, 194613 147224) (212526 145417, 212571 146128, 212608 147073, 212644 147679, 212664 148225, 212692 148634, 212714 149494, 212881 150757, 212848 149731, 212864 149196, 212797 148564, 212744 146917, 212719 146481, 212709 145928, 212683 145245, 212645 144610, 212548 144488) (201959 148238, 201992 148884, 202045 149539, 202038 149687, 202093 149797, 202148 149544, 202135 149405, 202146 148890, 202111 148101, 202040 147922) (222829 148562, 222880 149026, 222953 148750, 222946 147929, 222849 147832) (204982 147994, 205001 148370, 204927 148890, 205114 148848, 205171 148118, 205145 147716, 205045 147259) (196470 147739, 196661 147870, 196600 147355, 196517 146912, 196292 146736) (205188 146384, 205271 146845, 205310 146191, 205229 145880) (196238 146293, 196287 146689, 196369 146225) (192471 134099, 192609 134100, 192605 133602, 192463 133570)), ((171025 202017, 171280 202159, 171529 202543, 171632 202842, 171761 203498, 171801 205287, 171805 208719, 171893 212263, 171858 216296, 171598 216999, 171059 218039, 171269 218249, 171365 218266, 171573 218175, 171637 218251, 171796 218245, 171885 218527, 171893 219256, 171884 220173, 171904 220480, 171856 224509, 171796 225316, 171758 226225, 171653 227973, 171619 229081, 171653 229663, 171736 230288, 171832 230862, 171865 231711, 171873 232834, 171765 233465, 171496 234122, 171646 234392, 171757 234829, 171711 235541, 171684 236138, 171667 236944, 171682 237999, 171808 240513, 171238 241098, 171466 241735, 171606 242337, 171592 242940, 171892 243549, 171953 244203, 172035 246354, 171966 249888, 171954 251669, 171919 253624, 171745 254130, 171486 254377, 171254 254841, 171681 256113, 171793 256804, 171797 257224, 171831 258137, 171831 259025, 171851 259154, 171911 259842, 171939 260520, 171891 261269, 171711 260758, 171184 261246, 171676 261979, 171883 262720, 171878 263638, 171860 264610, 171734 266990, 171809 267764, 171937 268854, 171900 272390, 171896 273615, 171869 275179, 169816 275179, 169623 273958, 169676 273162, 169695 273119, 169846 271721, 169857 271195, 169904 270102, 169987 269086, 170058 268446, 170042 267761, 169985 267244, 169944 267073, 169928 266365, 169951 266258, 169992 265635, 169794 265134, 169668 264918, 169516 264287, 169480 264191, 169123 262760, 169104 262045, 169019 261330, 168669 259727, 168594 258975, 168386 257785, 168339 257237, 168333 256983, 168232 256066, 168318 255965, 168414 255277, 168423 254956, 168596 254297, 168607 253847, 168658 253630, 168661 253039, 168927 252348, 169012 251659, 169105 251392, 169151 250974, 169288 250805, 169341 250501, 169517 250553, 169690 251125, 169848 251258, 169777 251688, 170011 252804, 170135 252689, 170076 253009, 170266 253633, 170451 253913, 170625 253963, 170769 254058, 170975 253604, 170953 253286, 170808 253236, 170740 253290, 170634 253191, 170479 253395, 170598 252953, 170556 252720, 170481 252621, 170361 252634, 170418 252290, 170322 251861, 170259 251797, 170279 251612, 170157 251015, 170132 250997, 170087 250490, 170014 250222, 169925 249706, 169837 249376, 169738 248390, 169642 247830, 169500 247734, 169433 247209, 169352 248087, 169390 248789, 169396 249468, 169208 250262, 168963 251125, 168933 251646, 168825 252058, 168910 252326, 168689 252617, 168557 253434, 168449 254030, 168443 254273, 168181 254931, 167989 255373, 167851 256282, 167814 256955, 167858 257589, 167953 258112, 168038 258721, 168167 259389, 168715 261704, 168833 262042, 168988 262763, 169016 263490, 169151 264214, 169223 264957, 169329 265677, 169497 266364, 169621 267102, 169734 268441, 169682 269118, 169581 270135, 169537 270462, 169517 271403, 169480 271940, 169418 272636, 169323 273417, 169366 274457, 169374 275178, 167667 275179, 167669 274079, 167615 273486, 167323 272501, 167263 272516, 167285 272378, 167212 271919, 167191 271159, 167116 270525, 167080 270024, 167060 269874, 167057 269359, 166991 269214, 167174 268953, 167740 267886, 167543 267443, 167406 267867, 167095 268529, 166880 269171, 166751 269333, 166538 269922, 166685 270575, 166714 271021, 166823 271983, 167068 273225, 167145 273338, 167235 273342, 167196 273599, 167197 274414, 167256 275179, 166021 275179, 165998 274676, 165794 273690, 165785 273693, 165600 272453, 165483 272316, 165522 272009, 165462 271761, 165398 271195, 165204 271298, 165328 270758, 165303 270241, 165438 269572, 165462 269382, 165682 268638, 165967 267928, 166115 267187, 166171 266446, 166171 265711, 166072 264999, 165820 264618, 165572 264565, 165165 264685, 165036 264797, 164831 264800, 164770 265097, 164946 265370, 165048 265442, 165328 265503, 165451 265570, 165553 265515, 165680 265828, 165873 266065, 165870 266795, 165767 267629, 165672 267945, 165665 268652, 165507 268197, 165390 268345, 165106 269393, 164929 270097, 164963 270596, 165036 271189, 165135 271417, 165267 272024, 165302 272372, 165391 272954, 165446 273136, 165436 273242, 165515 273765, 165448 274573, 165458 275179, 163897 275179, 163865 273669, 163870 273181, 163777 267335, 163810 265854, 163758 262865, 163766 261996, 163850 261220, 163891 260424, 163913 257927, 163961 256340, 163977 256087, 163981 255090, 164060 254796, 164340 255051, 164506 255038, 164566 254981, 164959 255732, 165027 255639, 165020 256018, 165163 256348, 165322 256517, 165761 257497, 165899 258118, 166009 258921, 166162 259777, 166360 260503, 166522 261324, 167038 263521, 167326 264634, 167452 265007, 167464 265193, 167584 265748, 167690 266453, 167660 266843, 167741 267882, 167817 267461, 167974 267362, 168048 267188, 168012 266457, 167889 265877, 167842 265851, 167852 265720, 167417 263803, 167343 263778, 167355 263552, 167231 262954, 167224 262826, 167087 262082, 166929 261344, 166821 260515, 166813 259777, 166762 259049, 166712 258874, 166576 258263, 166509 257701, 166457 257029, 166356 256292, 166292 256032, 166239 255487, 166294 254746, 166638 252925, 166946 250317, 167015 249611, 167068 248620, 167132 247060, 167152 245107, 167138 244341, 167139 243596, 167033 242886, 166949 242793, 166714 242712, 166508 242540, 166443 242365, 166006 241914, 165251 241071, 165305 241295, 165794 241882, 165770 242109, 166053 242541, 166461 243473, 166542 244100, 166586 244353, 166635 244998, 166725 245635, 166790 246313, 166874 246742, 166846 246989, 166826 247664, 166703 248275, 166626 248964, 166669 249609, 166643 250260, 166561 250640, 166447 251594, 166300 252233, 166132 252870, 166103 253113, 165935 254204, 165829 255507, 165803 255472, 165436 255796, 165282 255859, 165205 255744, 165142 255844, 165142 255426, 164841 254972, 164389 253862, 163975 252937, 163929 252303, 164042 251592, 164124 250996, 164163 250047, 164165 249088, 164090 247856, 164065 246588, 164035 245925, 163952 245197, 163873 244199, 163827 241047, 163925 240752, 164078 240822, 164369 240654, 164519 240654, 164644 240597, 164727 240633, 164749 240500, 163969 239656, 163801 238962, 163798 238036, 163906 235814, 163907 235050, 163861 233743, 163832 232576, 163844 230868, 163857 230357, 163860 228506, 163940 227851, 164103 227247, 164185 225268, 164175 225054, 164198 224517, 164078 223381, 163983 222226, 163970 220737, 163976 218464, 164012 217202, 164032 213775, 164075 212969, 164086 211848, 164071 211252, 163965 210621, 164019 209442, 164022 209005, 164057 207604, 164023 205835, 164053 205241, 164054 204962, 164135 202838, 164325 202223, 164734 202060, 165092 202299, 165180 202932, 165176 203041, 165230 203750, 165346 204359, 165409 205192, 165723 207865, 165969 209098, 165953 209287, 166002 209880, 166101 210473, 166208 210743, 166213 211062, 166435 211942, 166525 212000, 166548 212457, 166691 212890, 166838 213532, 166804 214192, 166888 214964, 166937 216036, 166972 216590, 167009 216779, 166964 217079, 166934 217590, 166586 219881, 166596 220235, 166561 220818, 166501 221052, 166357 221750, 166239 222446, 166075 223140, 165857 223823, 165581 224364, 165347 225130, 165327 225673, 165332 225860, 165228 226622, 165165 227291, 165150 228119, 165097 229394, 165039 230171, 165006 230848, 165166 232319, 165183 233050, 165167 233776, 165185 234491, 165258 235247, 165448 236617, 165465 237047, 165573 238014, 165856 238589, 165892 238001, 165819 237489, 165775 237315, 165704 236802, 165665 236618, 165518 235532, 165442 234692, 165412 234505, 165457 234240, 165458 232208, 165423 231636, 165404 230886, 165549 228730, 165574 227857, 165640 226637, 165659 225877, 165714 225641, 165806 225140, 166013 224532, 166344 223903, 166551 223185, 166674 222474, 166846 221711, 166922 221067, 166788 220586, 166830 220066, 166908 219647, 166982 219049, 167121 218184, 167204 217579, 167258 217037, 167297 216898, 167343 216332, 167361 216215, 167419 215532, 167400 214856, 167492 214179, 167420 213526, 167547 212254, 167670 211558, 167687 211039, 167833 210456, 167884 209859, 167973 209393, 167746 209254, 167704 209829, 167612 210304, 167788 210448, 167579 210556, 167551 211021, 167616 211575, 167291 212235, 167262 212378, 167233 212329, 166879 212173, 166724 211768, 166555 211027, 166438 210363, 166356 210121, 166347 209850, 166254 209197, 166170 208741, 166072 207516, 165983 206783, 165861 205521, 165798 204624, 165731 203269, 165722 202675, 165768 202296, 165979 202094, 166187 202030, 166831 202015, 167158 202063, 167460 202195, 167795 203120, 167897 203742, 167891 204211, 168075 205214, 168199 205491, 168068 205557, 168110 206302, 168116 206665, 168166 206879, 168398 207438, 168451 207143, 168424 206514, 168394 206310, 168433 205921, 168362 205207, 168286 204956, 168414 204493, 168402 204182, 168362 204110, 168438 203917, 168316 203217, 168415 203080, 168276 202642, 168261 202461, 168477 202195, 168801 202064, 169193 202092, 169358 202212, 169533 202415, 169660 202987, 169760 203508, 169779 204051, 169744 204453, 169778 205087, 169848 205776, 169881 206661, 169884 207538, 170209 208137, 170296 208772, 170444 210848, 170457 212750, 170353 213352, 170149 213972, 169935 214565, 169946 214861, 169844 214777, 169765 214914, 169648 215426, 169470 215640, 169086 216452, 168877 216925, 168818 217194, 168640 217561, 168444 218235, 168398 218720, 168442 218780, 168381 218940, 168408 219697, 168669 218973, 168756 218269, 168920 217617, 168992 217185, 169224 216918, 169453 216386, 169781 215818, 169801 215523, 169933 215502, 170064 215248, 170290 214664, 170714 213441, 170835 212776, 170877 212105, 170964 211424, 170947 210123, 170887 209715, 170776 208781, 170620 207841, 170481 206768, 170491 206323, 170466 205741, 170368 205141, 170318 204322, 170246 203622, 170244 203487, 170176 202471, 170395 202005) (170585 260507, 170848 260843, 170764 260512, 170687 260390) (170138 259071, 170173 259202, 170247 259788, 170484 260302, 170564 259795, 170439 259539, 170209 258967) (170904 254217, 171173 254656, 171452 254235, 171185 254048) (166858 228965, 166618 229573, 166538 230326, 166564 231081, 166750 231844, 166917 233219, 167072 234160, 167499 236450, 167642 237263, 167649 237463, 167763 238567, 167967 239870, 168113 241281, 168240 241999, 168400 242676, 168491 243325, 168615 244101, 168827 244927, 168970 245639, 169189 246147, 169216 246390, 169235 245998, 169185 245770, 169009 245353, 169020 245054, 168899 244459, 168647 242798, 168543 241944, 168534 241236, 168638 240548, 168505 239819, 168346 239090, 168288 238699, 168084 237592, 167989 237239, 167774 235899, 167697 235339, 167531 234400, 167302 232743, 167203 231526, 167071 230376, 167141 229625, 167153 229135, 167066 228862) (170741 239500, 170808 239296, 170790 239075, 170723 239069, 170473 238656) (170274 237799, 170391 238329, 170428 237908, 170398 237715, 170349 237686) (170640 233267, 170497 233273, 170318 233557, 170501 233770, 171023 233947, 171194 233449, 170772 233145) (169143 230474, 169122 231057, 169247 231624, 169244 231746, 169347 232441, 169378 233144, 169667 233424, 169871 233422, 170004 232953, 169829 232604, 169680 231990, 169665 231646, 169593 231306, 169581 230987, 169412 230414) (169691 226419, 169421 227051, 169062 227785, 168762 228333, 168718 228518, 168544 229046, 168801 229590, 169030 229910, 169092 230141, 169322 230184, 169160 229725, 169150 229597, 169106 229549, 168943 229048, 169015 228363, 169414 227829, 169603 227392, 169762 226567, 170007 226488, 169906 225812) (170412 218423, 170241 218590, 170215 218740, 169990 219268, 169975 219776, 169866 219497, 169238 220930, 169142 221020, 169040 221322, 168345 222976, 168222 223644, 168024 224072, 167640 225378, 167494 226044, 167343 226646, 167369 227067, 167269 226934, 167146 227405, 166959 228607, 167068 228849, 167211 228135, 167235 227690, 167407 227605, 167557 227081, 167697 226511, 167785 226072, 167922 225586, 167937 225425, 168121 224915, 168542 223445, 168660 223190, 169050 222192, 169198 221752, 169383 221442, 170028 220026, 170102 219522, 170209 219646, 170362 219327, 170452 219007, 170501 219080, 170855 218662, 170861 218184) (170960 227016, 170707 227270, 170553 227901, 170572 227976, 170764 227967, 170841 227907, 171070 227460, 171227 227281, 171092 226992) (169920 225774, 170053 226483, 170314 226414, 170480 225874, 170432 225432, 170287 225365) (168044 207459, 168094 207867, 167927 208218, 167823 208636, 168013 209172, 168100 208671, 168285 208084, 168232 207693, 168367 207486, 168085 207177)), ((219205 273608, 219435 274056, 219485 274352, 219523 275179, 216079 275179, 216090 274536, 216146 274112, 216289 273858, 216694 273676, 217260 273641, 217782 273636, 218098 273798, 218243 273715, 218510 273685, 218711 273604)), ((232817 218826, 233139 219181, 233371 219924, 233416 220288, 233455 222188, 233456 225888, 233502 227922, 233535 228825, 233520 233026, 233428 233816, 233046 234687, 233131 235107, 233475 235496, 233552 235786, 233549 237992, 233501 242055, 233437 242926, 233389 244145, 233298 245783, 233276 246329, 233283 247071, 233345 247679, 233451 248346, 233518 249069, 233535 250867, 233395 251242, 233273 251074, 233042 251250, 232937 251060, 232647 251116, 232249 251009, 232054 250893, 231996 250937, 231693 250809, 231593 250502, 231410 250251, 231339 249977, 231320 249556, 231122 248714, 231031 248215, 230936 247996, 230779 248503, 230821 249002, 230808 249195, 230957 249907, 230956 250481, 231411 251029, 231886 251268, 232314 251606, 232706 251763, 233163 252081, 233170 251960, 233322 251816, 233360 252215, 233395 252991, 233347 253727, 233311 254887, 233345 256308, 233446 258234, 233437 258520, 233452 259029, 233296 259250, 233197 259486, 232848 259009, 233004 258275, 232957 257933, 232604 258279, 233074 259783, 233208 260525, 233435 261285, 233589 262069, 233667 264259, 233676 264803, 233628 266354, 233593 268692, 233595 269622, 233560 271792, 233506 272493, 233039 272885, 232826 273129, 233270 274506, 233410 275178, 229905 275178, 229821 274224, 229865 273956, 229817 273447, 229724 273659, 229575 274158, 229486 274661, 229468 275178, 227934 275179, 227853 274481, 227814 273920, 227866 273247, 227956 272498, 228056 272166, 228228 271178, 228542 268132, 228575 267889, 228603 267135, 228585 266954, 228681 265721, 228696 265097, 228688 264413, 228713 263710, 228703 262828, 228668 262243, 228701 261471, 228514 260883, 228318 260758, 228241 260751, 227873 260275, 227871 260872, 228010 261395, 228131 261924, 228264 262287, 228318 262646, 228301 263010, 228364 263354, 228359 263716, 228430 264410, 228409 265781, 228327 266721, 228279 267137, 228284 268482, 228212 268993, 228255 269494, 228152 269535, 227976 270480, 227783 271144, 227679 271877, 227606 272181, 227543 272738, 227456 273897, 227385 274300, 227329 274036, 226907 274485, 226839 274473, 226738 274668, 227002 275179, 225500 275178, 225519 274434, 225535 273132, 225587 273084, 225654 273140, 225810 273451, 225928 273303, 226094 273400, 226190 273374, 226317 273208, 226058 272518, 225759 271853, 225517 271187, 225514 270509, 225619 269863, 225701 269181, 225730 267969, 225714 267185, 225648 265978, 225626 264736, 225569 263776, 225501 263269, 225445 262699, 225410 261740, 225376 258908, 225450 258807, 225493 258805, 226059 258351, 226108 258264, 225505 257579, 225348 256863, 225345 255899, 225401 255018, 225462 253677, 225456 253404, 225466 252880, 225387 250932, 225364 249687, 225405 248567, 225402 247755, 225412 247300, 225413 246017, 225548 244959, 225622 244532, 225668 243034, 225706 242324, 225674 241601, 225574 240421, 225539 239714, 225526 237480, 225540 235601, 225569 234484, 225586 231076, 225630 230187, 225648 229191, 225632 228370, 225524 227709, 225577 226444, 225587 225603, 225618 224573, 225583 222646, 225665 219987, 225757 219288, 226080 218851, 226338 218814, 226596 218886, 226731 219534, 226769 219987, 226828 220115, 226867 220117, 227008 221389, 227036 222057, 227178 223189, 227268 224203, 227393 224129, 227338 224409, 227416 224736, 227416 225032, 227486 225420, 227618 225645, 227568 225952, 227626 226462, 227648 226960, 227730 226926, 227653 226925, 227750 226272, 227758 225592, 227571 224760, 227617 224380, 227419 222355, 227355 221360, 227303 220356, 227299 219544, 227327 219139, 227436 218922, 227731 218793, 228634 218752, 228978 218862, 229209 219079, 229505 220272, 229539 221000, 229679 221884, 229802 222080, 229842 222644, 229910 223111, 229890 223372, 230003 223455, 229909 221616, 229970 221015, 229903 220332, 229800 219512, 229896 219029, 230086 218874, 230383 218785, 230794 218801, 231003 218944, 231191 219186, 231357 220109, 231416 220665, 231392 220844, 231381 221588, 231410 222110, 231474 222708, 231517 223615, 231540 224468, 231852 225087, 231917 225719, 231948 226289, 232047 227671, 232064 228375, 232064 228772, 232085 229410, 232077 230183, 232042 230549, 232081 231193, 232272 230592, 232275 230416, 232399 229858, 232522 228610, 232531 227708, 232492 227022, 232412 226357, 232346 225701, 232236 225103, 232235 225045, 232082 223856, 232081 223700, 232029 222711, 231885 221734, 231862 221146, 231839 221024, 231789 220425, 231775 220094, 231724 219559, 231765 219010, 231900 218767, 232384 218732) (226451 273927, 226495 274125, 226569 274181, 226670 274074, 226708 274327, 226726 273878, 226529 273679) (230388 271245, 230180 271850, 230101 272572, 230010 272876, 230103 273021, 230171 272576, 230191 271929, 230419 271253, 230405 270628) (232522 272275, 232336 272421, 232321 272389, 232289 272458, 232538 272737, 232668 272451, 232616 272272) (231017 266466, 231052 266978, 231008 267125, 231003 267799, 230882 268419, 230908 268579, 230933 268510, 231264 269109, 231348 269545, 231496 269405, 231415 269817, 231521 270525, 231720 271473, 231875 271964, 232010 272176, 232139 272255, 232304 271767, 232134 271409, 231968 270657, 231856 270049, 231814 269742, 231699 269233, 231593 268565, 231405 267639, 231334 266950, 231204 266047) (230576 263565, 230632 263844, 230699 263777, 230583 263204) (228655 246251, 228464 246498, 228317 246904, 228197 247690, 228178 248473, 228338 249247, 228379 249660, 228510 250750, 228726 252137, 228864 252903, 228914 253079, 229096 254080, 229137 254216, 229230 254752, 229316 255069, 229290 255365, 229321 255892, 229372 256413, 229574 257719, 229656 258372, 229741 259269, 229855 259977, 230032 260718, 230205 261962, 230181 261464, 230138 260907, 230128 260370, 230077 259750, 230174 258402, 229971 257332, 229802 256214, 229687 255789, 229538 255085, 229416 254246, 229348 253906, 229202 252902, 229179 252673, 229077 251925, 229000 251441, 228911 250705, 228701 248477, 228661 247706, 228743 246585, 228697 246247) (227542 260216, 227714 260569, 227770 260149, 227523 259902) (227034 259737, 227239 259578, 226970 259439, 226737 259018) (226468 258972, 226589 259109, 226640 259118, 226709 258972, 226291 258493) (226809 252179, 226885 252960, 227096 254419, 227113 254758, 227234 255526, 227248 255865, 227487 256365, 227493 255991, 227365 255303, 227181 253943, 226961 252178, 226798 251410) (228511 236117, 228364 236482, 228176 237761, 228165 238185, 228067 238876, 227944 239248, 227836 239818, 227736 240476, 227626 240945, 227617 241359, 227494 241219, 227363 241435, 227069 242288, 226919 243022, 226924 243596, 226945 243781, 226876 244299, 226832 244534, 226757 246063, 226723 247423, 226651 248412, 226733 249175, 226744 249467, 226858 250332, 226857 250685, 227027 251188, 227032 250686, 226988 249936, 226929 249476, 226935 248418, 227001 247913, 227129 245992, 227160 245117, 227193 244556, 227207 243794, 227233 243654, 227286 243052, 227438 242449, 227449 242346, 227709 241664, 228055 240997, 228076 240831, 228487 238703, 228462 238398, 228268 238578, 228329 238200, 228229 238112, 228469 237100, 228571 236213, 228732 235220) (230238 246301, 230302 246602, 230324 247076, 230371 247190, 230418 247084, 230391 247006, 230441 246325, 230451 245912) (228722 245362, 228718 245885, 228825 245370, 228806 244950) (230646 245563, 230741 245734, 230764 245708, 230839 245159) (232467 244884, 232335 245097, 232408 245256, 232484 245235, 232708 245328, 232759 245082, 232654 244843, 232557 244821) (231631 243119, 231275 244124, 231139 244441, 231028 244850, 231143 245016, 231316 244661, 231392 244156, 231871 243726, 231955 243684, 232039 243531, 232000 243373, 231778 243064) (229219 243151, 229059 243886, 228909 244479, 229037 244950, 229185 244374, 229282 243907, 229446 243322, 229425 243203, 229366 242598) (232139 235723, 231865 235925, 231630 236627, 231625 236621, 231355 237212, 231310 237391, 231187 237571, 230217 239848, 229994 240505, 230007 240936, 229886 240766, 229583 241823, 229571 242113, 229413 242495, 229529 243046, 229661 242524, 229814 241849, 229833 241391, 230008 241321, 230122 240810, 230485 239936, 230529 239379, 230608 239578, 231359 237894, 231397 237664, 231471 237645, 231742 237021, 231870 236621, 232270 236104, 232558 235785, 232436 235590) (230293 234819, 230098 235541, 230014 236276, 230024 236744, 230140 236712, 230204 236082, 230293 235585, 230355 235309, 230426 234440) (228385 230190, 228509 230912, 228457 231660, 228509 232188, 228516 232738, 228550 233000, 228636 232999, 228571 233378, 228594 233968, 228577 234500, 228804 234624, 228863 233966, 228904 233849, 228973 233207, 228979 232431, 229065 231720, 228991 230904, 228995 230692, 228790 230172, 228815 230084, 228778 230150, 228738 229627, 228559 229543) (231749 231256, 231765 231988, 231594 231636, 231473 231973, 231432 232570, 231227 232570, 231179 232685, 231080 233233, 230845 233404, 230714 233922, 230588 234113, 230679 234367, 231120 233532, 231204 232801, 231419 232912, 231782 232046, 232035 231318, 231897 230841) (228192 229508, 228223 229756, 228293 229915, 228526 229469, 228299 229232) (227781 227569, 227853 228090, 227903 228205, 227900 228379, 228031 228963, 228065 229041, 228113 228838, 228167 228331, 228105 228003, 227912 227409, 227906 226944) (229352 227481, 229362 227548, 229375 227441, 229336 226899) (229482 225584, 229531 226170, 229345 226794, 229562 226265, 229547 225686, 229578 225594, 229515 225444) (229716 224385, 229730 224886, 229712 224990, 229768 225160, 229815 225000, 229798 224512, 229840 224395, 229743 224039)), ((186759 229470, 187003 229341, 187705 229408, 187886 229956, 187924 229931, 188071 230030, 188199 229652, 188152 229507, 188223 229535, 188511 229460, 188875 229484, 189474 229752, 189556 230481, 189603 233084, 189607 233812, 189573 235252, 189576 236023, 189612 237273, 189694 241318, 189699 242606, 189668 243182, 189587 244233, 189541 245303, 189548 246294, 189535 248692, 189545 250615, 189498 252916, 189530 255852, 189547 256397, 189560 257485, 189555 258491, 189578 259584, 189576 260596, 189616 261494, 189685 262512, 189710 263957, 189774 266052, 189788 267626, 189777 268318, 189697 269740, 189576 270941, 189554 271637, 189587 272179, 189709 275179, 186479 275178, 186448 274612, 186414 273373, 186388 272937, 186378 272384, 186352 271700, 186305 270854, 186264 270507, 186182 270998, 186209 271320, 186194 271869, 186240 272584, 186278 273528, 186314 274135, 186359 275178, 184126 275179, 184070 274230, 184055 273650, 183997 273381, 184066 272911, 184064 272378, 184038 271875, 184080 271023, 184182 270347, 184151 269626, 184007 268961, 183693 268627, 183669 268915, 183538 269627, 183577 270331, 183765 271299, 183744 272954, 183768 273653, 183807 273904, 183820 274751, 183853 275179, 181348 275178, 181388 274821, 181497 274319, 181702 273570, 181784 272960, 181772 272282, 181772 270999, 181651 270321, 181402 269648, 181322 268954, 181316 268195, 181328 266698, 181387 263251, 181384 262483, 181329 261546, 181309 261013, 181322 260134, 181319 258948, 181286 257600, 181281 255959, 181291 254939, 181340 252286, 181309 250470, 181325 247731, 181355 246041, 181398 245239, 181588 244218, 181600 243285, 181514 242401, 181463 241601, 181419 240601, 181386 239424, 181389 238835, 181319 237202, 181361 235525, 181376 235301, 181369 234753, 181377 234601, 181348 233917, 181304 233342, 181349 230410, 181369 229731, 181593 229518, 181964 229391, 183081 229359, 183329 229452, 183539 229478, 183889 229355, 184372 229339, 184933 229403, 185284 229319, 186249 229313) (186061 268122, 186061 268817, 186106 268234, 186111 267884) (183755 267542, 183878 268023, 183819 267456, 183773 267390) (185993 264715, 186014 264930, 185937 265438, 185948 265797, 185951 266521, 186035 266137, 186018 266015, 186113 265421, 186148 264704, 186184 264491, 186139 264173) (185923 262511, 185925 263176, 186029 262699, 185978 262343)), ((238842 264205, 239031 264578, 239288 264231, 239497 264187, 240082 264288, 240254 264523, 240356 265714, 240400 265276, 240490 265013, 240572 265024, 240649 264965, 240737 264542, 240847 264403, 241445 264368, 241689 264472, 241836 264686, 241928 265219, 241966 266371, 242011 269933, 242015 271093, 241985 272862, 241977 274109, 241996 275179, 233818 275179, 233857 272843, 233846 271805, 233794 270824, 233765 269892, 233797 267565, 233798 266394, 233826 264831, 233883 264684, 234181 264376, 234483 264251, 235508 264202, 235741 264355, 235922 264402, 236318 264189, 236849 264162, 237005 264209, 237141 264388, 237130 264435, 237182 265012, 237153 266235, 237241 266583, 237206 266754, 237254 266661, 237259 265988, 237240 265592, 237296 264422, 237384 264273, 237552 264158, 238579 264135) (239951 274986, 240034 274958, 240041 274731, 239984 274504) (240039 273025, 240025 273326, 240137 273813, 240142 273337, 240190 272832) (237089 268690, 237093 270943, 237115 272093, 237135 272499, 237111 273209, 237138 273477, 237256 273609, 237265 272203, 237313 271866, 237324 271145, 237291 269924, 237274 269708, 237265 268925, 237242 268372, 237181 267827, 237186 267593, 237114 267195) (240112 272144, 240194 272351, 240183 271984, 240137 271853)), ((210371 236583, 210437 236987, 210423 238199, 210408 238705, 210363 239537, 210345 239619, 210237 241105, 210284 241303, 210263 241676, 210403 242034, 210377 242415, 210534 242603, 210747 242198, 210937 242016, 210943 241628, 211006 241514, 211045 240126, 211078 239928, 211078 239033, 211065 238756, 211048 237470, 211053 236639, 211541 236561, 212150 236589, 212485 236727, 212868 236681, 213127 236726, 213250 236647, 213603 236905, 213784 237300, 213725 237419, 213778 237927, 213763 238030, 213787 238618, 213701 238670, 213716 238801, 213638 238937, 213679 239498, 213657 239654, 213688 241111, 213713 241332, 213630 241755, 213433 241987, 213439 242652, 213380 242912, 213366 243532, 213322 244710, 213309 245571, 213292 245698, 213279 247011, 213309 247187, 213278 247829, 213316 248066, 213228 248778, 213257 248973, 213206 249912, 213243 250285, 213232 250885, 213193 251271, 213010 251420, 212879 251836, 212858 252032, 212906 252547, 212966 252671, 212974 252836, 213170 253144, 213082 253843, 213053 254142, 212852 254808, 212776 255347, 212971 256139, 213254 256402, 213463 255845, 213182 255538, 213438 254872, 213433 254322, 213372 253878, 213450 252891, 213574 251908, 213603 251005, 213691 250488, 213811 249958, 213795 249018, 213736 248454, 213777 248111, 213726 247625, 213774 247244, 213793 246659, 213845 245639, 213858 244903, 213944 243972, 214097 243330, 214086 243000, 214135 242811, 214115 242409, 214148 241836, 214166 240676, 214385 240121, 214642 239843, 214763 239293, 214421 238631, 214430 238492, 214348 238098, 214348 237420, 214416 237296, 214621 237091, 214926 237034, 215218 237070, 215313 237311, 215300 237723, 215350 238331, 215349 238645, 215375 239875, 215466 241183, 215491 241364, 215524 242093, 215480 242836, 215539 245017, 215569 249801, 215519 250422, 215458 250861, 215411 251663, 215407 252032, 215351 253010, 215402 253459, 215421 254636, 215415 255114, 215455 256206, 215457 256759, 215421 258910, 215425 259358, 215397 260086, 215398 260502, 215293 262075, 215271 263131, 215310 265849, 215340 266017, 215387 266985, 215375 267578, 215384 268312, 215294 269081, 215355 269442, 215306 270405, 215348 270956, 215217 272603, 215225 273215, 215294 273883, 215324 274050, 215365 275179, 214010 275178, 214121 274427, 214144 273935, 214267 273280, 214121 273135, 213872 273670, 213784 273998, 213719 275179, 212500 275178, 212609 274425, 212306 273683, 212231 272881, 212128 272077, 212134 271540, 212064 270849, 211924 270399, 211924 270287, 211692 270010, 211745 269521, 211719 268974, 211731 267653, 211713 267283, 211763 266285, 211701 265910, 211728 265535, 211731 265001, 211770 264643, 211621 263985, 211302 263948, 211384 263182, 211484 262759, 211658 262293, 211779 261587, 211845 261397, 211800 261313, 211714 260486, 211659 259559, 211694 259215, 211732 258522, 212084 256372, 211943 255909, 211646 256687, 211417 258821, 211308 259548, 211215 259981, 211204 260469, 211119 260780, 211025 262093, 211058 262269, 211085 262800, 211217 263233, 211213 264433, 211488 264377, 211274 264994, 211202 265919, 211297 267437, 211276 267725, 211297 268674, 211396 270043, 211472 270386, 211624 271359, 211721 271896, 211639 272871, 211721 273874, 211702 274355, 211731 275179, 209671 275178, 209589 273375, 209558 270973, 209567 270083, 209557 269395, 209453 265898, 209474 265256, 209461 264650, 209522 264004, 209561 263439, 209628 263073, 209686 262518, 209768 261868, 209866 261614, 209865 261272, 209929 260698, 209953 260368, 210149 259466, 210351 258329, 210499 257964, 210555 257223, 210689 256640, 210714 256044, 210173 255631, 210070 255333, 209913 255204, 209646 256019, 209673 256579, 209666 256952, 209760 258438, 209647 259046, 209533 259398, 209469 260311, 209521 260646, 209406 260558, 209244 260721, 209216 261195, 209156 261400, 209046 262094, 209099 263195, 209025 263179, 208847 263329, 208911 263962, 208909 264207, 208950 264921, 209013 265675, 209048 265876, 209097 266814, 209119 267731, 209124 268450, 209110 268629, 209092 269509, 209130 269818, 209113 270368, 209131 270982, 209127 271210, 209226 272253, 209223 272893, 209201 273464, 209228 273844, 209243 274433, 209279 275179, 207459 275179, 207453 274391, 207432 273626, 207509 273197, 207475 272858, 207499 272521, 207487 271922, 207518 271253, 207516 270384, 207487 269505, 207528 268928, 207440 267149, 207420 265699, 207458 264874, 207492 264422, 207464 263892, 207503 262920, 207561 262036, 207532 261530, 207488 261113, 207509 260664, 207439 258429, 207433 257403, 207443 256351, 207438 255810, 207481 254980, 207476 254525, 207531 254236, 207567 253521, 207724 252682, 207680 251734, 207585 250846, 207565 250210, 207530 249784, 207534 249023, 207521 248364, 207541 247818, 207568 247406, 207547 246528, 207562 245867, 207533 243968, 207550 243442, 207534 242863, 207556 241959, 207544 241563, 207594 240329, 207523 239544, 207557 239023, 207576 238447, 207567 238056, 207731 236998, 207940 236719, 208392 236523, 208870 236551, 208956 236719, 208957 236941, 209095 237154, 208961 237870, 209008 238014, 208975 238139, 209054 238196, 209411 238019, 209267 237871, 209448 237591, 209538 237072, 209648 236542, 210166 236499) (213710 270437, 213663 271249, 213640 271460, 213608 272085, 213549 272596, 213726 272891, 213717 272982, 213758 273017, 213895 272882, 213850 272764, 214158 272058, 214273 271222, 214286 270900, 214416 269831, 214233 269443) (213895 265092, 213840 265877, 213871 266358, 213790 267208, 213773 267699, 213640 268209, 213796 268604, 213752 268795, 213865 268740, 214140 267689, 214160 267322, 214231 266776, 214315 266417, 214345 265863, 214345 265439, 214391 264467, 214238 264031) (213795 261352, 213777 261635, 213553 262263, 213505 262879, 213697 263159, 213841 263544, 213995 263148, 214003 262876, 214195 262238, 214221 261625, 213968 261055) (212981 256966, 212856 257708, 212866 258347, 213118 258646, 213118 258785, 213203 258788, 213341 259561, 213290 260058, 213389 260467, 213354 260736, 213518 260729, 213676 260457, 213731 260121, 213899 259546, 213696 258683, 213593 258646, 213690 258621, 213691 257096, 213403 256876) (208567 252322, 208564 252738, 208518 253280, 208521 254049, 208655 254448, 208835 254113, 208851 253147, 208815 252344, 208770 251719, 208776 251553, 208730 250899) (209120 240735, 209088 240963, 208879 241805, 208904 242455, 208948 242786, 208933 243669, 208854 244453, 208695 244910, 208674 245446, 208642 245654, 208625 246270, 208697 246406, 208760 246901, 208754 247204, 208866 247689, 209036 247172, 209050 246855, 209156 246342, 209189 245843, 209280 245547, 209307 244951, 209150 244440, 209154 243659, 209279 242692, 209391 242330, 209391 242021, 209465 241428, 209451 240913, 209476 240693, 209366 240216) (212215 246286, 212251 246632, 212309 246242, 212276 245297) (210252 244747, 210408 244996, 211017 245524, 211184 244740, 211186 244573, 210438 244466) (212394 237474, 212164 237568, 212284 238866, 212427 239052, 212434 239271, 212604 239527, 212568 239651, 212645 240024, 212618 240418, 212208 240333, 212065 240521, 211759 241057, 211942 241912, 212274 242018, 212712 241642, 212828 241088, 212814 240537, 212764 240067, 212772 239464, 212891 239093, 212875 238894, 212953 238676, 212935 238279, 212855 237892, 212609 237575, 212597 237413, 212485 237294) (209085 238393, 209069 238667, 208966 239142, 208981 239771, 209037 240003, 209358 240195, 209217 239743, 209339 239570, 209411 238919, 209486 238699, 209563 238144, 209413 238017)), ((243534 247038, 243728 247088, 243928 247574, 243972 248247, 244083 248768, 244150 249474, 244406 251339, 244507 251868, 244626 252391, 244691 253008, 244797 253629, 244943 254251, 245323 255509, 245507 256153, 245543 256829, 245573 257033, 245736 258848, 245706 259554, 245512 260760, 245373 261510, 245319 262049, 245209 262797, 245071 263295, 244884 264122, 244643 264859, 244613 264885, 244280 265497, 244062 266225, 244015 266557, 244016 266996, 243901 267835, 243868 269340, 243785 270130, 243781 270920, 243904 271715, 243935 272494, 243923 273235, 243975 274018, 244140 275179, 242720 275178, 242727 274009, 242706 273666, 242668 272475, 242675 269896, 242685 269105, 242713 268523, 242961 267758, 243011 267025, 243049 265554, 242938 264621, 242880 264289, 242798 263496, 242791 260424, 242826 259424, 242837 256983, 242888 255870, 242900 255074, 242877 254443, 242785 253822, 242829 253173, 242868 251382, 242835 249885, 242874 249446, 242953 247590, 243067 247248, 243244 247016, 243467 246980)), ((221224 273778, 221474 273743, 221736 273614, 222292 273669, 222515 273776, 222598 274492, 222718 274665, 222662 275160, 222763 274613, 222975 273875, 223103 273782, 223863 273770, 224105 273975, 224196 274366, 224248 275179, 219540 275179, 219545 274352, 219580 273738, 219719 273635, 220015 273586, 220948 273567)), ((224447 183282, 224550 184231, 224586 186140, 224582 187233, 224602 188770, 224600 189673, 224638 191102, 224678 194053, 224665 195018, 224646 195492, 224702 199777, 224690 200709, 224627 201380, 224573 202108, 224561 202831, 224561 204184, 224541 205337, 224539 206018, 224466 207994, 224472 209041, 224584 210794, 224583 211790, 224333 213790, 224298 214546, 224291 216029, 224355 217381, 224391 219130, 224434 220129, 224503 220751, 224555 221338, 224593 222485, 224609 224755, 224635 225855, 224663 228667, 224652 229796, 224569 231563, 224543 232473, 224558 233421, 224612 234970, 224611 235659, 224622 236106, 224611 237860, 224600 238177, 224604 238709, 224595 239177, 224594 240598, 224574 241157, 224327 242499, 224314 243379, 224275 244317, 224277 244673, 224248 245429, 224295 246103, 224350 246679, 224372 247029, 224450 247840, 224473 248571, 224486 250859, 224478 252935, 224446 254211, 224429 256271, 224430 258269, 224383 259372, 224366 260651, 224376 261481, 224486 262201, 224470 262917, 224441 263643, 224422 265046, 224395 265865, 224431 268094, 224410 268862, 224374 269624, 224323 271783, 224147 272412, 223970 272565, 223148 272604, 222848 272234, 222350 272406, 222044 272370, 221731 272554, 221361 272617, 220686 272589, 220552 272530, 220351 272282, 220189 272391, 219628 272669, 218880 272651, 218609 272478, 218584 272049, 218610 271507, 218570 271310, 218539 270793, 218384 271287, 218189 271750, 217954 272537, 217516 272545, 217084 272427, 216830 271939, 216613 271147, 216565 268553, 216558 264186, 216522 262228, 216486 261099, 216477 260491, 216493 257562, 216503 257117, 216499 256031, 216472 253963, 216486 251430, 216464 249965, 216516 245719, 216586 244422, 216654 242519, 216743 240815, 216752 240116, 216723 239502, 216661 238873, 216568 238219, 216524 237584, 216490 236230, 216506 235135, 216568 233863, 216651 232616, 216687 231722, 216707 230869, 216701 229923, 216679 229135, 216531 225559, 216331 219356, 216374 217420, 216408 214498, 216409 213576, 216427 212681, 216454 210147, 216605 209413, 216714 208774, 216729 208105, 216679 207420, 216546 206738, 216514 206144, 216492 205236, 216466 204618, 216463 203492, 216426 202227, 216430 201491, 216465 200211, 216520 197089, 216634 194859, 216636 194149, 216507 192973, 216453 192264, 216456 190971, 216443 190252, 216488 186887, 216507 184549, 216543 184025, 216615 183617, 216971 183471, 217830 183442, 219051 183340, 219314 183418, 219459 183886, 219487 184467, 219442 185849, 219410 187433, 219382 187999, 219367 188611, 219390 188863, 219284 189428, 219203 190396, 219174 191021, 219319 191652, 219356 191025, 219331 190622, 219458 189873, 219412 189792, 219488 189706, 219576 188603, 219571 188408, 219669 188060, 219768 187204, 219942 185532, 219983 184466, 219930 183976, 219962 183478, 220082 183209, 220292 183151, 221175 183144, 221267 183262, 221380 183688, 221332 183877, 221359 184134, 221485 184092, 221329 184479, 221303 185014, 221321 185341, 221246 185564, 221236 185815, 221355 185766, 221214 186121, 221097 187364, 221059 187981, 221057 188307, 221009 188807, 220895 189404, 220815 190144, 220750 191391, 220740 192209, 220778 195101, 220949 196160, 220956 196402, 221026 197159, 221033 197692, 221110 198562, 221163 198774, 221140 198845, 221220 199434, 221348 200987, 221411 201257, 221566 201406, 221504 201601, 221601 202069, 221581 202313, 221611 203094, 221744 204087, 221750 204272, 221815 204912, 221875 204073, 221881 203400, 221835 202777, 221653 201372, 221626 200756, 221574 200236, 221440 199675, 221438 199420, 221364 198766, 221369 198261, 221310 197173, 221206 197061, 221220 195958, 221141 194961, 221122 194825, 221100 194168, 221079 192852, 221070 190963, 221162 189736, 221171 189147, 221164 188859, 221180 188304, 221304 187820, 221413 186984, 221422 186472, 221527 185273, 221504 185228, 221537 185165, 221600 184499, 221642 183187, 221868 183031, 222621 182969, 222896 183411, 223205 183100, 223623 182886, 224146 182886) (221579 271452, 221677 271624, 221791 271589, 221676 271035, 221598 270763) (218301 267048, 218320 267226, 218239 267686, 218228 268304, 218275 269127, 218442 268452, 218452 268292, 218554 267794, 218601 266861, 218502 266661) (222871 266324, 222708 267065, 222680 267782, 222880 268273, 222951 267758, 222782 267285, 222876 267147, 222924 266966, 222905 266309) (221401 262111, 221440 263168, 221492 264009, 221553 264201, 221594 263782, 221578 263025, 221515 262262, 221418 261760) (223248 259991, 223192 260544, 223336 260606, 223354 259998, 223259 259490) (223354 258416, 223427 259152, 223375 258378) (220045 253121, 220169 253585, 220165 253125, 220020 252587) (218447 244665, 218498 244992, 218554 244391, 218442 244221) (218581 243353, 218488 243838, 218620 243690, 218639 243444, 218549 242983) (221494 242384, 221525 242967, 221576 243399, 221606 243109, 221558 242496, 221488 242053) (218647 241972, 218647 242211, 218709 242491, 218759 241863) (218661 241275, 218784 241414, 218797 240995, 218702 240782) (218844 238922, 218842 239048, 218741 239701, 218854 240368, 218756 239732, 218882 239251, 218892 238832) (222535 230596, 222651 231465, 222673 230706, 222568 230176) (219891 221588, 219824 222165, 219831 222537, 219905 222767, 219967 223238, 220069 222526, 220022 222241, 220006 221740, 219954 221128, 219887 220566) (217920 215876, 217954 216771, 218169 216804, 218156 217736, 218237 218085, 218305 218874, 218355 218808, 218396 218375, 218333 218080, 218292 217494, 218262 217290, 218215 216522, 217981 216554, 217957 215920, 217928 215828) (220148 212201, 220146 212837, 220208 212441, 220234 211647) (221676 207556, 221593 208146, 221584 208840, 221630 209360, 221752 209538, 221731 210072, 221753 211026, 221789 211564, 221846 210636, 221969 208162, 221955 207470, 221910 207167) (223382 206906, 223445 207583, 223418 206839, 223380 206415) (217876 206674, 217887 206958, 217906 206790, 217899 206047) (217700 203481, 217666 204005, 217697 204636, 217775 204393, 217753 204127, 217762 203627, 217741 203195) (218966 201405, 218984 202172, 219048 202451, 219012 202834, 219063 203166, 219177 202826, 219234 202158, 219187 201799, 219024 201502, 219045 200889) (218852 198320, 218858 199204, 218891 200056, 219085 199208, 219019 198112) (218879 196159, 218803 196403, 218811 197084, 218831 197750, 218895 197490, 218874 197385, 218961 196821, 218977 196029, 218887 195908) (219100 191706, 219047 192287, 219023 192916, 218959 193569, 218971 194193, 218951 194539, 219045 194532, 219223 194217, 219286 193573, 219165 192923, 219164 192286, 219314 191674)), ((238343 189074, 238466 189951, 238541 189602, 238613 189493, 238645 189311, 238794 189391, 239047 188956, 239074 188676, 239423 188828, 239546 188950, 239750 189388, 239803 189758, 239767 190009, 239782 191249, 239710 191843, 239742 192441, 239723 193700, 239974 194816, 240044 195031, 240147 195546, 240242 195710, 240447 196382, 240504 196527, 240652 197054, 240686 197287, 240889 197730, 240974 198611, 241107 199123, 241073 199371, 241136 199823, 241106 200524, 241183 201703, 241255 201911, 241271 202166, 241222 202618, 241128 204066, 241045 205657, 240961 206288, 240589 208316, 240467 209198, 240312 209647, 240069 210479, 240062 210743, 239680 211869, 239256 213328, 239121 213885, 238955 214403, 238854 214909, 238649 215754, 238499 216236, 238370 216732, 238274 217295, 238325 218051, 238453 218891, 238611 219601, 238806 221174, 238815 222674, 238869 222780, 238905 222760, 238853 221963, 239061 221662, 239142 221664, 239370 221558, 239385 221871, 239529 222317, 239665 222596, 239619 222820, 239635 223341, 239596 224068, 239628 224771, 239727 225452, 239774 226138, 239897 226768, 239890 226818, 239907 227507, 239945 228187, 240037 228864, 240042 228961, 240130 229456, 240131 229573, 240230 230959, 240251 231684, 240239 232431, 240265 233174, 240469 233887, 240808 234681, 240962 234927, 241100 235036, 241178 234559, 240855 233840, 240653 233116, 240818 232362, 240756 231638, 240483 230936, 240483 230707, 240393 229747, 240486 228828, 240475 228728, 240472 228132, 240361 227431, 240251 226855, 240260 226793, 240246 226029, 240318 225458, 240252 224699, 240111 224001, 239940 223418, 239741 221825, 239598 221203, 239589 221071, 239508 220570, 239397 220322, 239370 219606, 239095 218908, 238951 218216, 238871 218027, 238863 217305, 238898 216514, 239024 215712, 239032 215506, 239114 215386, 239265 214624, 239396 214130, 239408 213996, 239780 212643, 239914 212107, 239929 211922, 240012 211769, 240202 211235, 240472 210557, 240714 209875, 240820 209163, 241093 208411, 241299 207799, 241416 207071, 241454 206940, 241562 206309, 241567 205790, 241599 204818, 241570 204094, 241591 203532, 241549 202618, 241389 201907, 241440 201704, 241461 201204, 241390 200508, 241333 200139, 241261 199255, 241190 198524, 241113 198413, 241166 198342, 241064 197706, 241083 197452, 241034 197000, 240765 195656, 240585 194949, 240469 194319, 240329 193050, 240303 192285, 240291 191408, 240329 190524, 240440 189673, 240692 189167, 241035 188977, 241165 188990, 241466 189159, 241919 189372, 241927 189425, 242107 189544, 242166 189839, 242219 190574, 242260 193582, 242220 196581, 242263 198318, 242349 203539, 242361 205152, 242306 206488, 242251 207307, 242211 207755, 242175 208744, 242169 209889, 242176 211654, 242160 213534, 242176 216292, 242132 218077, 242085 218699, 242105 219587, 242110 221679, 241993 222464, 241946 222538, 241924 222462, 241620 222140, 241356 222442, 241463 222779, 241603 223055, 241936 223864, 242097 224582, 242130 225301, 242135 225920, 242120 226887, 242136 227340, 242096 228115, 242091 228860, 242144 230395, 242184 231981, 242283 234070, 242297 234594, 242206 235307, 241952 235986, 242136 236674, 242281 237408, 242277 237847, 242302 239597, 242266 241099, 242183 242292, 242164 243079, 242190 243842, 242231 244484, 242285 246326, 242352 248044, 242356 249246, 242317 249939, 242300 250644, 242291 252041, 242350 254884, 242347 255935, 242261 259208, 242141 260772, 242087 262831, 242022 263442, 241963 263614, 241691 263748, 241304 263770, 241260 263720, 241007 263670, 240762 262918, 240688 262185, 240679 261955, 240620 261823, 240542 260977, 240417 260160, 240429 260017, 240372 259463, 240241 258383, 240116 257068, 239992 256314, 239824 255078, 239768 254380, 239655 253672, 239502 252946, 239415 251429, 239443 251175, 239537 250000, 239680 248866, 239774 248252, 240064 246754, 240020 246522, 240084 246654, 240239 245997, 240318 245234, 240482 244703, 240527 244496, 240726 243772, 240732 243678, 240833 243049, 240789 242535, 240792 242329, 240719 242095, 240679 242217, 240625 242790, 240550 243028, 240310 243290, 240227 243721, 240286 244023, 240239 244463, 240166 244579, 240043 245198, 239836 245937, 239711 246705, 239746 247201, 239609 246970, 239508 247049, 239375 248117, 239383 248263, 239320 248369, 239115 249194, 239001 248246, 238908 247708, 238953 247232, 238961 246669, 238985 246421, 239019 245721, 239137 243961, 239182 242980, 239442 241678, 239476 240987, 239531 239192, 239535 238642, 239570 238158, 239446 237173, 239215 235484, 239176 234866, 238828 233217, 238629 232674, 238413 231982, 238225 231428, 237949 230810, 237870 231367, 237951 231862, 238238 232738, 238237 232822, 238305 233443, 238364 234147, 238486 234863, 238640 235447, 238761 236166, 238846 236819, 238892 237562, 238850 238192, 238971 238925, 239025 239170, 239061 239838, 238986 241568, 238937 242014, 238870 242815, 238767 244690, 238684 245975, 238608 247781, 238519 248276, 238502 249076, 238525 249851, 238629 250654, 239073 253179, 239171 253674, 239356 254378, 239509 255348, 239682 256303, 239682 256420, 239781 257305, 239802 257577, 239908 258471, 239975 258916, 240060 259767, 240072 260070, 240188 260790, 240332 262146, 240387 263258, 240336 263386, 240039 263760, 239860 263772, 239265 263643, 239241 262821, 239208 262648, 239083 261652, 238621 259224, 238256 257179, 238231 256993, 237988 255951, 237805 255011, 237614 254279, 237251 253547, 237065 252835, 236933 251926, 236830 251346, 236734 250572, 236723 249668, 236758 248330, 236855 247633, 236792 246570, 236740 245897, 236624 241292, 236577 240327, 236600 239805, 236627 239686, 236716 238760, 236702 238342, 236617 237739, 236475 236970, 236460 236839, 236356 236263, 236286 235725, 236326 235113, 236148 234799, 235820 234077, 235582 233219, 235479 232408, 235520 230968, 235484 230196, 235510 229820, 235460 229420, 235400 228643, 235479 227943, 235461 227347, 235471 227082, 235346 226735, 235276 226779, 235167 227039, 235163 227668, 235180 227868, 235182 228648, 235134 229426, 235076 229804, 235164 230572, 235028 230745, 235109 231770, 235018 232533, 235401 233237, 235459 233937, 235404 234531, 235069 233961, 234723 233171, 234400 232559, 234250 231839, 234232 230792, 234198 229856, 234181 227180, 234193 225615, 234171 225243, 234162 224313, 234147 224039, 234180 221495, 234379 220757, 234802 220123, 234983 219747, 235084 219654, 235619 218639, 235742 217885, 235722 217610, 235831 217309, 235903 216323, 236055 215526, 236096 214985, 236133 214717, 236195 214065, 236227 213910, 236204 213692, 236176 213113, 236219 212329, 236311 211552, 236281 210794, 236151 210056, 236006 209465, 235946 209334, 235969 209208, 235991 208624, 236009 208509, 235995 207937, 235949 207551, 235818 207365, 235753 207444, 235780 207284, 235690 206929, 235694 206623, 235670 205673, 235617 204800, 235405 205220, 235402 205075, 235392 205251, 235441 205947, 235431 206112, 235452 206628, 235444 206868, 235481 207715, 235462 208249, 235540 208649, 235649 210076, 235812 211576, 235793 212347, 235657 213908, 235685 214506, 235642 215429, 235471 217868, 235519 218413, 235389 218183, 235315 218343, 235281 218619, 235187 219194, 235078 219117, 234858 219348, 234785 219854, 234721 219595, 234552 219687, 234223 219379, 234203 218779, 234209 218235, 234198 217128, 234206 216894, 234186 214805, 234199 213486, 234198 212325, 234207 211648, 234266 209342, 234354 208618, 234455 207962, 234510 207323, 234497 206593, 234388 205145, 234347 204230, 234311 203025, 234394 202314, 234409 201601, 234566 200894, 234862 200182, 235136 199476, 235290 199235, 235493 198758, 235503 197947, 235564 197188, 235594 196688, 235759 195934, 235918 195386, 236095 194694, 236298 194088, 236409 193551, 236468 193030, 236464 192850, 236560 192099, 236614 191279, 236582 190696, 236498 190197, 236455 189602, 236476 188896, 236527 188773, 236873 188592, 238134 188573) (240900 240252, 240969 240744, 240992 240253, 240950 239972) (241520 235027, 241285 235269, 241617 235624, 241769 235280, 241657 234982) (237279 229235, 237401 229619, 237637 229919, 237611 230403, 237752 230909, 237780 230640, 237654 229936, 237348 229022) (238179 225876, 238102 226234, 238120 226825, 238117 227685, 238157 228361, 238354 229240, 238507 229512, 238607 229992, 238674 230084, 238783 229732, 238742 229296, 238780 228311, 238647 227301, 238574 226928, 238487 226236, 238422 225928, 238489 225531, 238275 225271) (236384 225592, 236462 225985, 236458 226334, 236582 226826, 236602 227068, 236736 227566, 236858 227429, 236768 227058, 236836 226776, 236738 225966, 236723 225586, 236503 224927) (238493 224488, 238422 224821, 238520 225431, 238559 224823, 238719 224109, 238705 224038) (236045 222573, 235943 222839, 235941 223324, 236131 224095, 236194 224927, 236292 224850, 236222 224267, 236154 224096, 236291 223704, 236162 222717, 236142 222130) (240959 220227, 241188 220935, 241072 220064, 241032 220035) (240535 214767, 240447 215722, 240411 216476, 240424 217236, 240533 217769, 240643 217990, 240599 218166, 240824 219535, 240908 218741, 240835 217983, 240600 217035, 240615 215719, 240656 214977, 240634 214446) (236852 217712, 236725 218297, 236746 218799, 236758 218846, 236939 217702) (237578 212775, 237514 213156, 237517 213600, 237440 213973, 237341 214670, 237466 214805, 237456 214990, 237515 214855, 237675 213995, 237715 213679, 237796 213185, 237676 212609) (237984 210681, 237912 211600, 237839 211949, 237924 212134, 238181 211046, 238175 210874, 238046 210467) (238366 209385, 238272 209921, 238178 210120, 238257 210712, 238359 210159, 238381 209486, 238542 209077) (237656 200927, 237545 200973, 237285 201343, 236755 202641, 236720 203315, 236728 203978, 236716 204626, 236675 205208, 236577 205916, 236611 206182, 236740 206256, 236816 206421, 237059 206467, 237328 205881, 237085 205249, 236992 204625, 236982 204196, 237053 203998, 237141 203374, 237104 203076, 237174 202730, 237363 202110, 237657 201876, 238116 201740, 238179 201673, 238155 201753, 238562 202288, 238851 202825, 238995 203426, 239238 204036, 239304 204499, 239374 204692, 239344 205365, 239169 205939, 238988 206297, 238940 206705, 238875 206858, 238812 207360, 238783 207670, 238671 208063, 238562 208568, 238691 208756, 239018 208248, 239047 208230, 239313 207492, 239422 206798, 239756 205949, 240007 205437, 239979 204723, 239744 203362, 239613 203002, 239440 202706, 239212 202080, 239176 201409, 239064 201032, 238707 200491, 238594 200497, 238459 200367, 237831 200289) (238123 204104, 238329 205275, 238273 205912, 238015 206509, 237794 206376, 237700 206363, 237398 206516, 237377 206374, 237350 206541, 237761 206705, 238028 206609, 238334 206237, 238507 205942, 238398 205282, 238324 204102, 238174 203773) (238362 191738, 238144 191680, 238002 192028, 237973 192393, 237977 193015, 237930 193581, 237932 193658, 237844 194985, 237787 195553, 237776 195751, 237637 196768, 237427 197672, 236960 199011, 236496 200253, 236303 201098, 236196 201820, 236350 201218, 236411 201121, 236528 200667, 236621 200902, 236739 200747, 236914 200206, 237315 199390, 237430 199122, 237506 199057, 237662 198391, 237829 198164, 237902 197766, 238030 197217, 238250 196405, 238417 195740, 238531 194978, 238611 193732, 238574 192958, 238514 192403, 238411 191889, 238445 191249, 238431 190864)), ((234450 234457, 234980 235087, 235013 235067, 235417 235572, 235537 235674, 235765 236292, 235840 236935, 235913 237772, 236006 238386, 236063 239040, 236101 239706, 236120 239872, 236161 240578, 236234 242552, 236310 245043, 236308 245456, 236402 246188, 236368 246932, 236413 247684, 236426 248456, 236384 249655, 236322 250581, 236371 251307, 236501 252056, 236651 252800, 237214 255047, 237404 255666, 237654 257041, 238061 258853, 238359 260389, 238399 260660, 238546 261313, 238694 262037, 238755 262893, 238711 263384, 238623 263575, 238328 263743, 237416 263693, 236907 263631, 236745 263514, 236657 263377, 236512 261806, 236512 261601, 236238 259282, 236228 259124, 236080 258254, 236091 257824, 236021 257143, 236068 256445, 235973 255593, 235882 254304, 235870 253770, 235874 253548, 235733 252837, 235469 251848, 235112 251144, 235027 251002, 234518 250051, 234298 249355, 234218 248630, 234243 247856, 234332 247086, 234523 246264, 234670 245502, 234713 244736, 234701 243942, 234705 242584, 234637 241828, 234474 241189, 234291 240557, 234221 239969, 234190 239053, 234198 237815, 234188 237079, 234200 235539, 234241 234423, 234421 234310)), ((234699 252115, 235042 252659, 235132 252732, 235154 252689, 235443 253585, 235573 254291, 235586 254258, 235609 254968, 235488 255769, 235502 256537, 235604 257557, 235628 257895, 235804 259166, 235995 260094, 236000 260318, 236037 260874, 236070 261140, 236070 261699, 236218 262676, 236157 263318, 236050 263345, 235909 263450, 235590 263411, 235073 263302, 234599 263133, 234411 262951, 234482 259797, 234427 259070, 234357 257393, 234308 256474, 234309 255777, 234402 254403, 234407 253623, 234385 252908, 234428 252102, 234694 251969)), ((212440 161411, 212695 161715, 212968 161451, 213288 161437, 213687 161481, 213762 161557, 213985 162190, 214154 161762, 214444 161585, 215057 161587, 215443 161680, 215612 162197, 215664 163053, 215677 164716, 215704 166271, 215695 167747, 215661 169361, 215735 172914, 215805 177782, 215784 178881, 215700 180264, 215657 181141, 215642 181986, 215646 184473, 215628 186095, 215649 188704, 215595 191835, 215635 195825, 215646 196163, 215659 197615, 215653 198779, 215673 199975, 215671 200992, 215690 202183, 215771 203627, 215794 204455, 215810 205979, 215867 207776, 215880 208674, 215891 211173, 215784 213394, 215679 214490, 215650 215501, 215721 217192, 215741 218264, 215800 219676, 215813 221360, 215786 222596, 215771 223960, 215823 226624, 215819 227927, 215717 231715, 215642 232784, 215567 235278, 215512 235597, 215257 235788, 214940 235867, 214709 235657, 214712 235290, 214616 234833, 214425 234517, 214406 234841, 214420 235587, 214264 235823, 214080 235894, 213238 235899, 213109 235747, 213059 235249, 213020 235044, 213116 234818, 213171 233598, 212910 233213, 212908 233570, 213053 233822, 212878 233711, 212810 234280, 212906 234917, 212696 235789, 212448 235895, 211593 235869, 211005 235727, 210953 235676, 210826 235294, 210729 232555, 210692 232520, 210735 231063, 210650 230072, 210668 229274, 210643 228245, 210600 227702, 210539 227151, 210496 226539, 210472 225830, 210517 225452, 210515 224876, 210447 223841, 210343 222516, 210246 220602, 210208 219192, 210176 218361, 210156 215819, 210146 215442, 210175 214814, 210302 213689, 210283 213185, 210147 212584, 210060 211653, 209784 211565, 209773 212224, 209623 213193, 209638 213698, 209853 215052, 209850 217707, 209879 218985, 209976 221518, 210059 223109, 210082 224343, 210160 225372, 210261 226027, 210285 226635, 210288 227146, 210312 227498, 210315 228229, 210368 228750, 210377 229280, 210428 229721, 210406 229915, 210417 230514, 210408 230639, 210411 231342, 210437 232023, 210430 232777, 210378 232955, 210394 234232, 210421 234678, 210417 235345, 210324 235602, 210104 235684, 209793 235698, 209200 235614, 208295 235447, 207762 235262, 207538 235090, 207566 234057, 207602 231983, 207592 231454, 207544 230472, 207539 230101, 207459 228215, 207526 227284, 207588 226165, 207544 225077, 207473 224320, 207422 223319, 207405 221222, 207414 220620, 207470 219790, 207575 219098, 207670 218709, 207786 218152, 207865 217637, 207886 217135, 207866 215940, 207875 214846, 207831 214345, 207733 213837, 207571 213314, 207451 212734, 207418 211861, 207417 209814, 207487 204769, 207486 203965, 207418 202465, 207402 201902, 207432 200397, 207389 197813, 207394 197304, 207381 196974, 207377 196415, 207403 192751, 207437 191270, 207408 188057, 207422 185090, 207466 182056, 207645 180758, 207707 180234, 207699 179314, 207618 178259, 207545 176541, 207496 175108, 207483 173204, 207418 171732, 207468 169113, 207482 168798, 207469 167819, 207403 166529, 207427 164953, 207434 163576, 207467 162005, 207641 161687, 207894 161553, 208174 161476, 209149 161445, 209497 161594, 209774 161542, 209986 161431, 210544 161419, 210712 161464, 210847 161629, 210878 162280, 210906 161921, 211036 161499, 211230 161398, 212120 161382) (212912 233140, 213125 233207, 213039 232607, 212925 232540) (212806 228865, 212855 229397, 212968 229728, 212950 228843, 212811 228159, 212767 228030) (212747 225751, 212825 226366, 212765 225625, 212652 224658) (212550 222099, 212551 222374, 212645 222578, 212628 222208, 212570 221663, 212482 221328) (212261 214313, 212236 214855, 212368 217723, 212397 218735, 212496 219954, 212504 220320, 212571 220623, 212532 220903, 212644 220804, 212574 219703, 212553 219034, 212548 218233, 212491 216876, 212440 216129, 212423 215247, 212346 214252, 212315 213624) (212142 211547, 212145 211643, 212214 211075, 212195 210932) (212058 205702, 212067 205984, 211995 206315, 212012 207264, 212240 207285, 212049 207835, 212044 208551, 212138 208884, 212060 209057, 212086 209876, 212241 209402, 212266 208559, 212118 208215, 212242 207809, 212242 207283, 212182 206755, 212227 206591, 212220 206220, 212250 205491, 212222 205159) (211999 204427, 212018 205052, 212221 205149, 212139 204623, 212162 204273, 212124 203930) (209374 193203, 209357 193802, 209467 193918, 209510 193142) (213678 169320, 213752 169432, 213706 168918) (210828 164479, 210793 166386, 210909 167076, 210912 167278, 210978 167382, 210925 165323, 210884 164169, 210855 163677)), ((185297 167110, 185407 167451, 185338 167598, 185329 167852, 185381 168350, 185440 168634, 185651 168170, 185703 167967, 185970 167346, 185951 167256, 186126 167059, 186995 167057, 187112 167225, 187126 167396, 187297 167851, 187511 167580, 187718 167194, 187870 167100, 188330 167079, 188764 167155, 188994 167415, 189208 168124, 189259 170043, 189265 172829, 189303 174099, 189352 175290, 189338 177095, 189317 178365, 189324 178591, 189317 179552, 189335 180080, 189336 181778, 189365 182574, 189307 185446, 189234 186526, 189151 188026, 189098 188685, 189071 189372, 189129 190059, 189263 190768, 189309 191406, 189325 192154, 189286 193042, 189214 194103, 189187 194381, 189130 195334, 189118 196181, 189172 197770, 189250 199065, 189299 199563, 189498 203737, 189430 206912, 189389 209907, 189222 210588, 189108 211235, 189156 211949, 189317 212617, 189341 213367, 189375 214059, 189384 214777, 189416 215539, 189407 216229, 189356 217642, 189328 219067, 189215 220574, 189234 221297, 189335 221977, 189374 222713, 189388 223874, 189324 227914, 189109 228395, 188719 228449, 188023 228456, 186631 228549, 186472 228294, 186408 227996, 186415 227471, 186472 226226, 186490 224835, 186572 224305, 186831 221683, 186915 221369, 186945 220871, 186783 220779, 186532 221354, 186601 222053, 186534 222688, 186516 222971, 186301 224576, 186158 225468, 186101 225766, 185988 226490, 185888 227052, 185879 227574, 185884 228095, 185903 228345, 185800 228622, 185648 228661, 184705 228665, 184580 228544, 184505 228065, 184589 227785, 184592 227338, 184713 226475, 184776 225868, 184855 225273, 184967 224652, 185050 223973, 185108 223369, 185147 222391, 185115 221420, 185102 220614, 185028 219962, 184895 219037, 184863 218607, 184664 217295, 184543 216617, 184519 216385, 184402 215871, 184301 216015, 184314 215632, 184248 215280, 184263 214892, 184154 214176, 183924 214098, 183955 214899, 184062 215474, 184143 215982, 184290 217116, 184437 217790, 184485 218576, 184610 219345, 184622 219973, 184659 220157, 184721 220668, 184758 221351, 184776 222025, 184770 223359, 184705 224019, 184708 224132, 184682 224654, 184580 225282, 184460 225890, 184397 226657, 184348 226954, 184281 227490, 184203 228319, 184198 228589, 184131 228705, 183472 228795, 183168 228715, 183084 228646, 182878 228161, 182621 228725, 182522 228823, 181707 228851, 181435 228417, 181350 227690, 181327 226798, 181332 226001, 181306 225040, 181307 223943, 181234 221768, 181239 220209, 181254 220012, 181188 216954, 181248 216258, 181333 215500, 181336 214207, 181369 212866, 181422 212207, 181449 211242, 181418 210532, 181344 209805, 181330 209094, 181393 208494, 181534 207740, 181587 207109, 181606 206295, 181572 205427, 181536 204928, 181513 204025, 181460 203209, 181407 202874, 181346 202316, 181309 201374, 181297 200232, 181281 199875, 181240 197166, 181250 196634, 181339 195182, 181353 194246, 181298 192862, 181286 191907, 181303 190654, 181308 188838, 181532 188195, 181627 187585, 181656 186499, 181699 185835, 181613 185045, 181541 184647, 181431 183748, 181409 182317, 181416 180616, 181454 179562, 181469 177082, 181521 175854, 181525 174698, 181410 173973, 181453 173234, 181473 172197, 181501 171633, 181456 170072, 181527 169120, 181574 167732, 181674 167318, 182006 167041, 182733 167028, 182932 167135, 183128 167348, 183253 167247, 183784 167190, 184405 167022, 184888 167021) (182601 220573, 182601 220833, 182575 221391, 182589 221549, 182558 222068, 182557 222276, 182513 222984, 182619 223110, 182774 222721, 182727 221382, 182712 220690, 182653 220062) (186874 218523, 186899 218720, 186834 219235, 186874 219794, 187068 219231, 187034 218959, 187056 218340, 187039 217808) (186807 215685, 186788 216242, 186814 216403, 186714 217267, 186752 217528, 187037 217808, 186850 217109, 186886 216506, 186880 216399, 186968 215570, 186736 215251) (188015 213703, 188055 214135, 188100 215107, 188192 215141, 188177 214751, 188239 214003, 188173 213331, 188153 213301) (182346 211844, 182288 211830, 182377 212784, 182461 213044, 182533 212958, 182502 212708, 182479 212001, 182439 211663) (185267 212010, 185261 212745, 185405 212303, 185449 211755, 185350 211748) (187888 211959, 187918 212466, 187950 211958, 187923 211687) (184110 208365, 184085 209894, 183979 210471, 184007 210590, 183928 210733, 183874 211295, 183917 212207, 184178 212008, 184328 211284, 184328 210906, 184243 210539, 184282 209889, 184284 209201, 184240 208653, 184164 208194) (187824 206319, 187819 206833, 187922 206254, 187903 205990) (187613 204764, 187640 204905, 187597 205679, 187634 205715, 187779 205556, 187696 205446, 187760 204747, 187708 204580) (187325 203943, 187332 204158, 187409 204261, 187509 203922, 187510 203680, 187417 203655) (185723 201112, 185803 201361, 185782 202147, 185822 202381, 185871 203134, 185947 203520, 185999 203290, 185993 202138, 185999 201841, 185953 200921, 185896 200713) (183111 196097, 183111 196338, 183220 196571, 183346 196089, 183357 195861, 183244 195515) (187168 187332, 187096 188140, 187055 188812, 186932 189816, 186947 190690, 187033 190305, 186975 189832, 187148 189628, 187219 188881, 187258 188142, 187230 187867, 187370 187292) (184359 187722, 184404 188292, 184387 187689, 184349 187311) (187365 185986, 187363 186393, 187203 187147, 187394 187204, 187461 186611, 187503 185973, 187455 185491) (185911 183458, 185982 184152, 186008 184285, 186031 184115, 186101 183340, 186009 182935) (187495 180554, 187553 181290, 187625 180551, 187535 179884) (182489 175139, 182515 175803, 182391 176384, 182360 176383, 182395 176941, 182579 176594, 182646 175985, 182711 175237, 182687 174648) (184155 172903, 184186 173891, 184245 174426, 184331 174780, 184395 174585, 184412 173770, 184378 173140, 184238 172626) (187354 169144, 187305 169545, 187269 170271, 187255 170954, 187324 171368, 187399 171508, 187539 171257, 187533 171111, 187641 170750, 187724 169433, 187631 169027, 187644 168917, 187597 168883) (182772 170156, 182859 170644, 182923 171233, 183103 171365, 183165 170881, 183182 170371, 182928 170047) (184144 167291, 184024 167660, 184063 167803, 184162 168395, 184189 168798, 184297 169405, 184296 169102, 184244 168395, 184283 168102, 184311 167596, 184411 167274) (182898 167926, 182844 168051, 182954 168592, 183074 169096, 183100 169155, 183098 168673, 183052 167999, 183066 167740)), ((235459 188654, 235687 188917, 235822 189324, 236001 190191, 235918 191121, 235928 191635, 236013 192207, 235998 192273, 236012 192789, 235902 193397, 235786 193668, 235569 194393, 235505 194555, 235319 195235, 235090 196611, 235041 197310, 234999 197624, 235055 198027, 234832 198748, 234866 199199, 234741 199466, 234758 200007, 234621 199769, 234389 199579, 234325 199670, 234281 199476, 234248 198732, 234254 197148, 234286 195536, 234204 193095, 234226 191243, 234221 190495, 234237 189605, 234266 189452, 234274 188928, 234657 188619, 235149 188598)), ((190945 175323, 191056 175591, 191143 175634, 191279 175359, 191317 176094, 191367 176309, 191424 176930, 191362 177653, 191320 178375, 191372 178726, 191437 179275, 191479 179855, 191543 180389, 191708 180544, 191648 180897, 191717 181145, 191724 181439, 191798 181801, 191987 181569, 191896 181948, 191968 182137, 191889 182525, 191944 183472, 191990 183616, 192074 183655, 191952 184189, 191699 184362, 191201 184289, 190347 184111, 190098 183979, 190087 183430, 190096 183346, 190105 182806, 190150 181489, 190128 180812, 190090 180358, 190042 179446, 190034 179080, 189985 178259, 190101 176873, 190082 175434, 190129 175036, 190276 174786, 190571 175021, 190665 174877, 190781 174873, 190924 174583))) \ No newline at end of file diff --git a/stress_benchmark/resources/015.settings b/stress_benchmark/resources/015.settings new file mode 100644 index 0000000000..a56803e6fe --- /dev/null +++ b/stress_benchmark/resources/015.settings @@ -0,0 +1,630 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=8 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=1 +raft_acceleration=3000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.1 +meshfix_union_all=True +layer_height_0=0.3 +support_initial_layer_line_distance=2.6666666666666665 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=200 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=50 +acceleration_support_interface=3000 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0.3 +acceleration_wall_x_roofing=3000 +speed_travel=120 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=6.5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=50.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=33.333333333333336 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3000 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.7 +speed_wall=50.0 +bottom_thickness=0.8 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.02 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +brim_gap=0 +acceleration_support_infill=3000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=37.5 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=30.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=120 +acceleration_topbottom=3000 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=100.0 +skin_overlap=5 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=66.66666666666667 +machine_max_acceleration_x=9000 +support_interface_height=1 +skirt_height=3 +support_roof_pattern=concentric +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=100.0 +material_print_temperature_layer_0=200 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=2.6666666666666665 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3000 +interlocking_orientation=22.5 +speed_wall_0_roofing=50.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1.0 +infill_line_distance=4.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=13.333333333333334 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=0 +raft_base_speed=37.5 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=25.0 +skirt_brim_material_flow=100 +acceleration_support_roof=3000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=265 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=100.0 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=1 +jerk_wall_0=20 +mold_angle=40 +raft_speed=50.0 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=3000 +cool_min_temperature=200 +jerk_layer_0=20 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=1 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=250 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=25 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +quality_name=Draft +material_final_print_temperature=185 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=3000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=all +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=25.0 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.6 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.1 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=25.0 +lightning_infill_straightening_angle=40 +speed_topbottom=50.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=50.0 +machine_max_jerk_z=0.4 +support_tree_angle=20 +expand_skins_expand_distance=0.8 +prime_tower_position_y=233.575 +mesh_position_x=0 +cross_infill_pocket_size=4.0 +interlocking_enable=False +support_tree_top_rate=10 +wall_line_width_0=0.4 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.1 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=3000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=3000 +minimum_support_area=0.0 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=20 +adhesion_type=none +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=0 +z_seam_x=125.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=3000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=concentric +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=3000 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=248.575 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.36 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=zigzag +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=3000 +material_end_of_filament_purge_length=20 +speed_print=100.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3000 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=5000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=20 +skin_material_flow=100 +support_bottom_density=100 +bridge_skin_density_3=80 +support_interface_enable=False +support_roof_wall_count=0 +infill_sparse_density=10.0 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=50.0 +raft_jerk=20 +speed_support=100.0 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=20 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=3000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=100.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=concentric +support_roof_height=1 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=6.5 +support_fan_enable=False +infill_wipe_dist=0.1 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=3000 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=0.4 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=3000 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=25.0 +support_roof_enable=False +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=1 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=60.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.3 +machine_extruders_share_nozzle=False +acceleration_prime_tower=3000 +retraction_hop_after_extruder_switch_height=1 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=190 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=False +dual=0 +raft_interface_acceleration=3000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=20 +speed_wall_x=100.0 +time=09:28:31 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=0 +support_bottom_extruder_nr=0 +speed_support_roof=66.66666666666667 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=50.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=66.66666666666667 +material_bed_temp_wait=True +machine_depth=255 +bridge_wall_material_flow=50 +jerk_travel=30 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=255 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=50.0 +raft_surface_speed=50.0 +material_name=empty +acceleration_wall_0=3000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/015.wkt b/stress_benchmark/resources/015.wkt new file mode 100644 index 0000000000..65775d9826 --- /dev/null +++ b/stress_benchmark/resources/015.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((99345 45800, 99640 46892, 99895 48430, 99533 48811, 99754 50319, 99482 50643, 99467 50724, 99719 50808, 99843 50755, 99865 50639, 99705 49954, 99827 49570, 100002 49260, 99911 48847, 99897 48429, 100280 48073, 100663 47826, 101099 47951, 101445 48274, 101834 48333, 102216 47947, 102603 47911, 102995 48278, 103387 48397, 103796 48170, 104154 47911, 104588 47964, 104933 48205, 105322 48264, 105706 48005, 106093 47968, 106484 48242, 106878 48388, 107643 47912, 108031 47909, 108422 48169, 108811 48307, 109581 47879, 109973 48193, 110364 48430, 110770 48202, 111132 47899, 111520 47915, 112300 48366, 112685 48089, 113071 47880, 113855 48400, 114256 48236, 114621 47912, 115058 47917, 115790 48310, 116202 48153, 116560 47912, 116983 48089, 117341 48362, 117739 48302, 118111 47966, 118542 47991, 118880 47387, 119256 46484, 119637 46480, 119663 46673, 120031 46476, 120222 47192, 127010 47210, 129336 47204, 130302 47216, 130502 47358, 130647 47521, 130909 48432, 130325 49083, 130401 49194, 104681 49194, 104681 66303, 104485 66253, 104426 67081, 104497 67968, 104434 68318, 104504 68792, 104426 68928, 104406 69103, 104448 69444, 104445 69999, 104681 70128, 104681 72342, 104459 72248, 104438 72651, 104526 73040, 104323 73868, 104359 73974, 104618 74190, 104681 74196, 104681 87981, 104494 88321, 104285 89144, 103946 89111, 103678 89708, 103449 90150, 103398 90172, 103313 90560, 103010 90493, 102825 91098, 102781 91116, 102720 91849, 102350 91412, 102210 91621, 101960 92117, 101741 92951, 101384 92965, 100900 93958, 100806 94311, 101018 94313, 100884 94504, 100741 94527, 100768 94381, 100388 94450, 100156 95315, 100225 95351, 100144 95357, 100147 95327, 99763 95409, 99643 95846, 99195 96743, 98881 96739, 98816 96833, 98559 97699, 98166 97777, 97947 98256, 97708 98709, 97606 99122, 97204 99188, 97085 99634, 96893 100072, 96952 100132, 96789 100511, 96838 100788, 96609 100706, 96614 100559, 96302 100615, 96042 101411, 96254 101435, 96114 101720, 95839 102043, 95736 102071, 95784 101950, 95452 101927, 95167 102507, 95081 102881, 95444 103057, 94988 103170, 94921 103335, 94572 103370, 94198 104191, 94316 104291, 94256 104523, 94052 104859, 93943 104904, 93975 104772, 93590 104840, 93469 105293, 93027 106147, 92786 106056, 92652 106298, 92543 106685, 92681 106678, 92624 106847, 92458 106942, 92389 107142, 92204 107196, 92125 107475, 91996 107289, 91596 108138, 91452 108563, 91123 108541, 91052 108627, 90813 109456, 90910 109489, 90746 109656, 90775 109525, 90399 109599, 90056 110462, 90314 110606, 89936 110770, 89853 110933, 89548 110901, 89469 111015, 89186 111896, 89172 111903, 89150 112679, 88728 112186, 88562 112458, 88357 113023, 88624 113454, 88095 113737, 87821 113564, 87326 114734, 87313 114739, 87236 115250, 86938 114880, 86750 115280, 86644 115685, 86237 115789, 85860 116688, 85772 116981, 86087 117014, 85876 117336, 85621 117407, 85563 117529, 85260 117468, 85171 117606, 84920 118267, 85317 118388, 85105 118977, 84717 118772, 84627 118925, 84352 118849, 84236 119070, 84133 119451, 84337 119432, 84111 119945, 84060 120251, 83449 120266, 83327 120483, 83037 121329, 82708 121331, 82639 121395, 82309 122264, 82434 122279, 82307 122622, 82241 122330, 81905 122408, 81704 122866, 81600 123264, 81953 123186, 81745 123519, 81460 123639, 81430 123715, 81100 123704, 81036 123786, 80887 124239, 80486 125072, 80212 125075, 80068 125253, 79996 125626, 80230 125365, 80553 125184, 80879 125062, 81135 125121, 81609 124906, 81593 125429, 81437 125368, 81233 125554, 81115 125740, 81191 125983, 81567 126136, 81545 126011, 81891 125207, 82592 124977, 82816 125275, 82611 125719, 82799 126055, 82483 126916, 82664 127255, 82480 127692, 82685 128025, 82519 128457, 82711 128793, 82518 129233, 82736 129562, 82580 129991, 82763 130329, 82583 130766, 82787 131098, 82628 131528, 82813 131866, 82453 132739, 82675 133067, 82479 133507, 82663 133845, 82517 134272, 82723 134604, 82554 135037, 82764 135369, 82758 135415, 83117 136047, 82776 136915, 82461 137772, 82805 138458, 82472 139236, 82451 139480, 82728 140030, 82517 140763, 82185 140567, 82130 140968, 82152 141058, 82206 140971, 82566 140854, 82968 141507, 82253 141654, 82135 141566, 82085 141756, 82148 141913, 82260 141772, 82967 141522, 82616 142376, 82279 142410, 82156 142331, 82103 142526, 82159 142713, 82283 142546, 82616 142396, 83019 143044, 82309 143180, 82178 143087, 82145 143290, 82193 143468, 82612 143895, 82622 144054, 83001 144607, 82515 145824, 82340 145951, 82553 145900, 82751 146226, 82581 146652, 82425 146702, 82582 146665, 82783 146993, 82609 147422, 82273 147441, 82141 147370, 82095 147568, 82145 147763, 82276 147594, 82610 147431, 82807 147762, 82632 148186, 82297 148216, 82161 148124, 82128 148334, 82178 148514, 82433 148639, 82494 149400, 82862 150072, 82521 150880, 82448 150960, 82528 150991, 82864 151566, 82733 151657, 82476 152253, 82202 151921, 82100 152606, 82155 152767, 82274 152635, 82605 152477, 82983 153130, 82283 153254, 82160 153190, 82120 153376, 82165 153554, 82279 153393, 82986 153145, 82661 153997, 82315 154041, 82194 153951, 82159 154140, 82202 154317, 82441 154451, 82200 154708, 82155 154916, 82214 155096, 82498 155228, 82702 155543, 82696 155587, 83041 156225, 82713 156988, 82038 157237, 82010 157260, 81299 157423, 81227 157409, 80553 157625, 80509 157656, 79948 157437, 79934 157458, 78822 157751, 78600 157441, 78691 157223, 78718 156971, 78622 156661, 78841 156505, 78811 156297, 78597 155892, 78769 155515, 78778 155384, 78344 155517, 78344 155625, 78491 155922, 78283 156171, 78191 156391, 78187 156780, 77836 157609, 77309 157380, 76917 157506, 76183 157699, 76018 157374, 76028 157309, 76000 157372, 75286 157565, 74872 156913, 75041 156505, 74820 156190, 74756 156170, 74667 155807, 74793 155450, 74795 155307, 74477 154696, 74674 154325, 74777 154226, 74834 154033, 74793 153834, 74812 153633, 74664 153481, 74476 153383, 74507 153524, 74469 153671, 74511 153911, 74436 154101, 74472 154309, 74373 154724, 74405 155012, 74589 155441, 74515 155688, 74563 155835, 74326 156288, 74238 156699, 74555 156755, 74766 156943, 75236 157573, 74520 157770, 74284 157454, 73165 157755, 72939 157443, 72971 157348, 72919 157439, 72554 157539, 72507 157460, 72513 157534, 71808 157737, 71687 157389, 70900 157607, 70751 157241, 70693 157205, 70018 157408, 69984 157456, 69370 157241, 69251 157677, 68886 157760, 68644 157457, 67888 157662, 67637 157346, 67275 157426, 67241 157393, 67256 157445, 66147 157742, 66036 157396, 65608 157514, 65751 157863, 65619 158286, 65886 158601, 65651 159053, 65796 159402, 65556 160266, 65831 160943, 65529 161792, 65597 161798, 65843 162102, 65737 162505, 65858 162873, 65692 163221, 65876 163256, 65720 163421, 65885 163640, 65774 164075, 65910 164410, 65658 164866, 65544 165258, 65473 165304, 65561 165285, 65819 165598, 65578 166046, 65531 166063, 65577 166056, 65703 166405, 65593 166815, 65559 166832, 65847 167140, 65606 167593, 65738 167946, 65614 168367, 65876 168683, 65637 169136, 65772 169487, 65557 170316, 65533 170292, 65781 171067, 65583 171871, 65818 172575, 65625 173403, 65880 173721, 65782 174148, 65898 174492, 65656 174945, 65903 175266, 65820 175675, 65558 176151, 65668 176493, 65546 176914, 65843 177220, 65592 177680, 65716 178031, 65617 178436, 65570 178457, 65620 178454, 65882 178761, 65632 179194, 65533 179243, 65626 179237, 65745 179574, 65649 179978, 65615 179996, 65653 179994, 65925 180299, 65659 180761, 65776 181115, 65577 181932, 65808 182657, 65603 183467, 65545 183504, 65605 183508, 65838 184200, 65639 185035, 65915 185341, 65827 185752, 65480 186343, 65632 186582, 65501 186891, 65545 186992, 66202 187201, 65560 187763, 65701 188114, 65576 188534, 66234 188743, 65566 189323, 65614 189322, 65730 189656, 65620 190069, 66264 190285, 65652 190835, 65758 191199, 65666 191602, 65608 191627, 65530 191968, 65565 192027, 65534 192103, 65621 192400, 65685 192385, 65787 192742, 65594 193569, 65824 194283, 66195 194191, 66470 194493, 67598 194194, 67871 194496, 68992 194200, 69102 194547, 70603 194146, 70717 194491, 71479 194286, 71490 194293, 72225 194092, 72736 193165, 72767 193153, 72621 192486, 73196 192721, 73327 192226, 73576 191776, 73682 191740, 73842 191370, 74184 191229, 74218 191123, 74147 190836, 74194 190661, 74369 190553, 74419 190378, 74790 190279, 75282 189363, 75397 188951, 75761 188857, 75873 188403, 76160 187895, 76325 187333, 76389 187509, 76729 187442, 76911 186779, 76572 186683, 76823 186204, 77093 186336, 77080 186545, 77348 186477, 77812 185569, 77935 185151, 78187 185078, 78087 184767, 78356 184872, 78431 184624, 78661 184180, 78730 184154, 78821 183852, 78590 183804, 78689 183468, 78936 183555, 79069 183375, 79373 183238, 79520 182788, 79650 182739, 79645 182111, 80076 182291, 80335 181780, 80465 181356, 80622 181310, 80708 181083, 80909 181009, 81245 179994, 81607 179878, 81695 179369, 81893 178777, 82087 178846, 82185 178562, 82544 178484, 82695 178028, 82910 177587, 83278 177484, 83494 177034, 83785 176194, 84063 176102, 83996 175759, 84215 175940, 84568 175193, 84711 174763, 84994 174530, 85148 174474, 85437 173794, 85802 173699, 86008 173243, 86315 172396, 86681 172288, 87080 171399, 87230 170971, 87600 170873, 87762 170437, 88141 169559, 88510 169460, 88809 168650, 88644 168644, 88738 168425, 88866 168506, 89018 168160, 89386 168058, 89504 167778, 89434 167652, 89734 167183, 90101 167096, 90305 166561, 90238 166135, 90861 165988, 91458 164535, 91312 164423, 91392 164176, 91601 164140, 91696 164319, 91882 164273, 91989 164003, 91899 163875, 91888 163551, 92118 163678, 92232 163401, 92607 163297, 93132 161992, 93502 161888, 94024 160582, 94396 160480, 94749 159613, 95102 159509, 95655 158201, 95921 158121, 95957 157983, 96052 158024, 96359 157230, 96733 157124, 97204 156023, 96890 155669, 97362 155556, 97431 155387, 97801 155285, 98183 154406, 98552 154303, 99041 153014, 99407 152906, 99573 152468, 99955 151598, 100324 151489, 100642 150633, 101006 150534, 101391 149663, 101355 149653, 101531 149174, 101630 149192, 101928 149112, 102082 148679, 102482 147800, 102850 147701, 103158 146838, 103528 146736, 103645 146479, 103526 146201, 103886 145859, 104011 145391, 104094 145381, 104235 144994, 104605 144886, 105015 144003, 105131 143658, 105068 143597, 105135 143534, 105066 143210, 105331 142639, 105595 143065, 105437 143330, 105195 143562, 105533 143476, 105682 143043, 106055 142939, 106418 142161, 106377 142075, 106509 141472, 106681 141424, 106788 141575, 106990 141522, 107138 141092, 107557 140201, 107703 139785, 108067 139684, 108363 138833, 108624 138746, 108604 138547, 108801 138492, 108870 138291, 109320 137398, 109669 137308, 109947 136450, 110315 136349, 110754 135449, 110890 135030, 111240 134928, 111397 134497, 111616 134054, 111811 133996, 111889 133726, 112140 133638, 112331 133108, 112303 133062, 112349 133049, 112476 132653, 112848 132550, 113294 131655, 113426 131231, 113800 131128, 113932 130701, 114382 129802, 114512 129385, 114877 129295, 115015 128858, 115241 128410, 115371 128374, 117026 129315, 120530 130977, 124387 132501, 128548 133870, 132944 135062, 137562 136077, 142293 136898, 147340 137558, 147017 138014, 146860 138296, 146399 138935, 146209 139365, 145835 139873, 145634 140056, 145550 140254, 145315 140588, 145226 140647, 144845 141272, 144597 141521, 144407 141978, 144121 142347, 143642 143102, 143386 143392, 142990 144083, 142651 144537, 142428 144986, 142059 145352, 141994 145492, 141721 145955, 141311 146521, 141075 146907, 140678 147411, 140490 147843, 140135 148328, 139911 148545, 139761 148914, 139515 149171, 139144 149762, 139048 150044, 138623 150624, 138349 150927, 138250 151170, 137886 151689, 137650 152136, 137393 152379, 137061 153047, 136777 153304, 136609 153660, 136240 153932, 135775 154562, 135501 154829, 135137 155319, 134997 155429, 134778 155726, 134378 156427, 133836 157068, 133657 157533, 133391 157773, 133165 158121, 132928 158563, 132646 158891, 132022 159869, 131754 160196, 131521 160639, 131028 161226, 130851 161583, 130351 162280, 130135 162698, 129687 163327, 129220 164012, 128902 164587, 128519 165061, 128177 165672, 127820 166088, 127596 166517, 127367 166811, 127179 167163, 126719 167757, 126403 168372, 126040 168766, 125987 168874, 125644 169463, 125337 169779, 125055 170292, 124774 170757, 124682 170931, 124187 171560, 123859 172171, 123488 172539, 123205 173126, 122847 173669, 122552 174080, 122246 174551, 121896 175064, 121654 175352, 121245 176061, 120966 176353, 120722 176718, 120526 177123, 120106 177823, 119830 178086, 119298 178849, 119016 179313, 118723 179871, 118439 180145, 118189 180487, 117993 180894, 117733 181289, 117481 181536, 116854 182505, 116636 182878, 116374 183188, 116151 183588, 115853 184057, 115588 184517, 115290 184957, 115012 185295, 114915 185477, 114580 186012, 114182 186802, 113908 187085, 113509 187800, 113229 188112, 112787 188840, 112515 189119, 112184 189714, 111859 190184, 111625 190643, 111163 191217, 111025 191583, 110743 191957, 110373 192537, 110032 192950, 109726 193489, 109084 194440, 108694 194935, 108850 195238, 109218 195146, 109428 195465, 110149 195306, 110529 195194, 110745 195487, 111481 195312, 111862 195193, 112074 195501, 112807 195337, 113201 195189, 113405 195509, 114112 195371, 114466 195233, 114667 194866, 115018 194821, 115639 195010, 116361 194787, 116547 195136, 116970 195062, 117650 194877, 117704 194835, 118410 194642, 118461 194642, 119127 194520, 119481 194861, 119751 194647, 119954 194228, 120650 194038, 121050 194650, 121085 194674, 121408 195328, 121356 195424, 121124 196188, 121233 196325, 121164 196169, 121505 195364, 121527 195295, 121884 194489, 122577 194279, 122642 194299, 123322 194086, 123666 194814, 123722 194710, 124078 194613, 124114 194635, 124461 194491, 125020 194725, 124593 195229, 124697 195603, 125075 195480, 125074 194722, 126165 194440, 126390 194752, 126496 195248, 126693 195429, 126677 195618, 126805 195495, 126762 195021, 126465 194763, 127116 194599, 127324 194481, 127405 194254, 127602 194199, 127675 193999, 127793 193964, 127896 193673, 128166 193552, 128403 193026, 128776 192924, 128981 192475, 129276 191623, 129643 191528, 130063 190633, 130212 190210, 130575 190114, 130869 189248, 131242 189143, 131351 188809, 131289 188741, 131301 188545, 131434 188605, 131809 187835, 132160 187793, 132459 186874, 132549 186846, 132580 186231, 132970 186475, 133266 185874, 133396 185452, 133772 185348, 133867 185042, 133812 184949, 133850 184801, 133952 184827, 134345 184038, 134387 184017, 134280 183270, 134309 183134, 134013 182568, 134468 182109, 134446 182062, 134579 181638, 134425 181292, 134650 180843, 134175 180218, 134633 179297, 134144 178656, 134589 177753, 134357 177434, 134478 177065, 134457 177019, 134594 176541, 134362 176270, 134577 175877, 134414 175480, 134678 174633, 134543 174282, 134551 174219, 134074 174023, 134527 173562, 134631 173107, 134505 172693, 134035 172483, 134493 172027, 134596 171555, 134449 171206, 134682 170755, 134187 170128, 134672 169197, 134172 168569, 134640 167665, 134141 167027, 134569 166177, 134564 166102, 134351 165806, 134468 165449, 134444 165394, 134563 164934, 134362 164659, 134867 163332, 135646 163086, 135707 163109, 135778 163310, 135718 163493, 135858 163702, 136156 163548, 136383 163651, 136396 163308, 137035 163054, 137190 163091, 137266 163266, 137467 163402, 137643 163798, 137828 164079, 137672 164909, 138121 164879, 138130 164514, 137984 164423, 138085 164266, 138162 163987, 138262 163918, 138350 163548, 138117 163475, 137942 163271, 138390 162955, 138609 162989, 138712 162949, 138722 163058, 138859 163281, 139115 163228, 139527 163223, 139950 163026, 140269 163023, 140264 163053, 140277 163022, 140733 163024, 141114 162848, 141589 162660, 141565 162512, 141693 162413, 142172 161725, 142240 161686, 142238 161626, 142276 161616, 142650 161074, 142786 160969, 143119 160373, 143649 159728, 143688 159715, 143999 158920, 144034 158888, 144644 157689, 144747 157285, 145292 156911, 145368 156880, 145451 156620, 145683 156111, 145758 155884, 145973 155762, 146056 155650, 146134 155212, 146344 154766, 146736 154271, 147174 153872, 147391 153316, 147528 152892, 147758 152580, 148061 152317, 148203 151882, 148503 151759, 148952 151037, 149189 150370, 149415 150048, 149616 149930, 149685 149587, 149864 149120, 150203 149018, 150570 148569, 150653 148508, 150751 148258, 151041 147664, 151147 147523, 151239 147222, 151382 146938, 151520 146900, 151598 146737, 152092 146340, 152213 145792, 152277 145711, 152425 145305, 152677 145122, 152803 144856, 153029 144581, 153303 144453, 153504 143888, 153888 143618, 154069 143597, 154054 143275, 154158 142934, 154405 142478, 154714 142006, 154837 141897, 154994 141479, 155364 141452, 155548 141002, 155749 140685, 155985 140036, 156219 139845, 156321 139627, 156471 139499, 156725 139380, 156869 139089, 156956 138794, 157276 138354, 157269 138228, 158822 138256, 158803 138559, 158509 138773, 158437 139047, 158278 139309, 158133 139373, 158081 139532, 157956 139640, 157922 139800, 157784 139854, 157812 139993, 157672 140101, 157645 140263, 157504 140316, 157522 140461, 157373 140582, 157247 140835, 157171 140869, 157155 140949, 156957 141143, 156869 141414, 156786 141517, 156502 141945, 156178 142559, 156007 142646, 155956 142828, 155832 142965, 155698 143287, 155364 143645, 155286 143787, 154975 144260, 154836 144414, 154642 144822, 154469 145036, 154411 145190, 154227 145357, 153632 146289, 153443 146448, 153380 146635, 153269 146771, 153126 147093, 152870 147551, 152540 148028, 152295 148235, 152229 148502, 152150 148593, 152019 148893, 151724 149156, 151545 149427, 151238 149657, 151139 149963, 151216 150269, 151188 150725, 151286 151087, 151798 151949, 151977 152406, 152177 152684, 151938 152577, 151804 152789, 151386 152843, 151134 153113, 150919 153512, 150751 153719, 150559 153866, 150334 154215, 150073 154721, 149949 154834, 149909 154952, 149504 155451, 149250 155908, 149015 156359, 148745 156557, 148636 156891, 148230 157457, 148004 157667, 147776 157703, 147659 157507, 147610 157133, 147496 156922, 147217 156646, 146882 156598, 146558 156703, 146394 157151, 146174 157335, 146098 157547, 145961 157677, 145503 158443, 145191 158768, 145094 158985, 144976 159057, 144861 159437, 144746 159618, 144550 159779, 144466 159933, 144261 160123, 144004 160497, 143866 160852, 143789 160851, 143846 160878, 143580 161088, 143494 161362, 143202 161830, 143146 161894, 142880 162327, 142645 162568, 142502 162797, 142739 162854, 142774 163111, 142876 163400, 142749 163505, 142888 163588, 143012 163821, 143247 164091, 143247 164253, 143372 164280, 143349 164116, 143672 163640, 143547 163286, 144051 163134, 144338 163366, 144653 163371, 144674 163450, 144958 163448, 144923 163849, 145284 163879, 145409 163551, 145462 163220, 145589 163461, 145909 163323, 145973 163342, 146541 163241, 146366 163676, 146705 163960, 147074 163864, 147176 163455, 147527 163256, 147600 163276, 147971 163180, 148189 163177, 148142 163577, 148177 163661, 148667 163821, 148655 163942, 148315 164708, 148425 164786, 148359 164681, 148889 163898, 148954 163354, 149282 163201, 149602 163177, 149640 163396, 149971 163469, 150107 163789, 150241 163916, 150565 164014, 150688 163655, 150611 163457, 150601 163290, 151114 163083, 151224 163121, 151312 163338, 151600 163388, 151825 163343, 151825 163551, 151744 163753, 151915 164093, 151905 164382, 152242 164377, 152234 164006, 152326 163941, 152501 163545, 152761 163246, 152947 163246, 153209 163339, 153973 163107, 154022 163129, 154087 163303, 153625 163307, 153670 163762, 154075 163890, 154055 164003, 154145 163930, 154331 163431, 154495 163238, 154620 163271, 155363 163094, 155512 163108, 155453 163267, 155206 163579, 155380 163919, 155474 164280, 155476 164669, 155431 164754, 155497 165049, 155388 165476, 155862 165664, 155779 164972, 155822 164669, 155801 164385, 155483 164277, 155819 164081, 156041 163483, 156057 163346, 156270 163138, 156810 162905, 157036 162950, 157345 162774, 157308 162616, 156948 161938, 156933 161798, 156734 161570, 156689 161234, 156542 160893, 156609 160765, 156534 160873, 156403 160578, 156205 160042, 156378 159924, 156484 160128, 156525 160366, 156799 160404, 157141 161038, 157137 161111, 157440 161467, 157756 162105, 158218 162805, 158271 162806, 158743 162985, 158919 163222, 159178 163134, 159330 162836, 159400 162509, 159484 162406, 159393 162364, 159315 162064, 159452 161640, 159317 161288, 159376 160977, 159489 160854, 159372 160796, 159306 160516, 159391 160106, 159280 159748, 159358 159461, 159488 159305, 159352 159223, 159283 158972, 159411 158424, 159602 157723, 159342 157017, 159577 156179, 159298 155498, 159503 154623, 159426 154422, 159284 153932, 159493 153101, 159403 152872, 159272 152385, 159491 151551, 159368 151196, 159421 150983, 159624 150739, 159415 150599, 159360 150422, 159443 150013, 159344 149652, 159395 149440, 159598 149195, 159387 149066, 159329 148881, 159405 148473, 159316 148109, 159368 147889, 159631 147890, 159542 147661, 159357 147547, 159285 147342, 159390 146926, 159495 146399, 159583 146099, 159421 145638, 159510 145515, 159782 145529, 159710 145288, 159507 145155, 159459 144969, 159562 144553, 159398 144096, 159489 143988, 159782 143999, 159700 143741, 159482 143611, 159413 143431, 159499 143020, 159370 142551, 159464 142448, 159762 142458, 159678 142196, 159457 142064, 159387 141887, 159467 141479, 159344 141007, 159439 140901, 159718 140905, 159639 140656, 159431 140525, 159360 140344, 159439 139936, 159406 139820, 159506 139707, 159797 139727, 159713 139472, 159761 139399, 159631 138962, 159700 138701, 159487 138579, 159183 138262, 161310 138300, 165974 138218, 170748 137963, 175585 137525, 180428 136898, 181209 136764, 181125 137713, 181203 138621, 181160 138921, 181173 139792, 181227 140165, 181128 140875, 181127 141502, 181372 141424, 181550 141273, 181579 140839, 181439 140495, 181455 140273, 181386 139854, 181458 139715, 181195 139399, 181407 138953, 181439 138728, 181314 138274, 181332 138198, 181214 137843, 181386 137408, 181415 137012, 181279 136751, 185219 136077, 186357 135831, 186193 136213, 186214 136472, 186370 137063, 186097 137658, 186215 138023, 186369 138599, 186248 138789, 186139 139229, 186210 139575, 185932 139933, 185942 140917, 186255 141114, 185947 141479, 185977 142434, 186325 142645, 185876 142945, 185797 143177, 185968 143518, 186406 143598, 186679 143711, 186878 143719, 187223 143562, 187209 143252, 187255 143165, 187167 142862, 186746 142528, 186854 142168, 187134 141800, 187160 141685, 187129 141502, 186830 140955, 186793 140767, 186845 140625, 187119 140249, 187144 140136, 187111 139985, 186797 139413, 186799 138944, 186750 138651, 186761 138172, 186863 137846, 186800 137412, 186710 137112, 186717 136607, 186848 136299, 186660 135765, 189894 135066, 194392 133870, 198657 132499, 201412 131440, 201451 131614, 201484 131541, 201469 131417, 202618 130977, 205127 129826, 205173 130479, 205126 131289, 205178 131708, 205158 131280, 205206 130492, 205157 129812, 206243 129315, 209488 127541, 212324 125679, 214742 123750, 216717 121794, 217547 120809, 218272 119823, 218893 118840, 219414 117863, 219414 83293, 219920 83818, 220188 83799, 220136 83469, 220008 83405, 220138 83209, 220266 83335, 220548 83294, 220522 82885, 220601 82855, 220568 82536, 220674 82339, 220674 81843, 220766 81259, 220885 80785, 220977 80621, 220969 80532, 221533 80172, 221578 79395, 221753 78663, 222157 78320, 222262 78074, 222494 77800, 222527 77676, 222756 77313, 222839 77618, 222890 78396, 223018 79157, 223040 79544, 223166 79577, 222757 79792, 222589 79812, 222631 79973, 222756 79963, 224897 80276, 224891 82016, 224702 82266, 224697 91951, 224889 92293, 224374 92482, 224375 92680, 224313 92870, 224313 93068, 224373 93258, 224374 93456, 224300 93645, 224274 94231, 224355 94421, 224374 95006, 224286 95196, 224259 95782, 224321 95971, 224322 96169, 224380 96359, 224381 96557, 224318 96746, 224318 96944, 224248 97134, 224281 97720, 224362 97909, 224331 98495, 224245 98685, 224269 99270, 224359 99460, 224341 100046, 224235 100235, 224246 100821, 224276 101011, 224305 101596, 224354 101786, 224350 102371, 224279 102561, 224264 103147, 224343 103337, 224387 103922, 224308 104112, 224290 104697, 224311 104887, 224330 105473, 224348 105662, 224346 106248, 224270 106438, 224259 107023, 224328 107213, 224329 107411, 224387 107600, 224388 107798, 224319 107988, 224278 108574, 224323 108764, 224336 109349, 224353 109539, 224362 110125, 224284 110314, 224294 110900, 224337 111089, 224302 111477, 224317 112063, 224384 112252, 224385 112450, 224328 112640, 224329 112838, 224263 113028, 224279 113613, 224363 113803, 224362 114389, 224267 114578, 224268 114776, 224360 114966, 224361 115164, 224305 115353, 224268 115939, 224347 116129, 224381 116714, 224317 116904, 224318 117102, 224257 117292, 224291 117877, 224374 118067, 224350 118653, 224255 118842, 224269 119428, 224356 119618, 224344 120203, 224254 120393, 224263 120978, 224349 121168, 224348 121754, 224263 121944, 224226 122529, 224277 122719, 224286 123304, 224343 123494, 224352 124080, 224283 124269, 224264 124855, 224330 125045, 224331 125243, 224387 125432, 224388 125630, 224314 125820, 224284 126405, 224317 126595, 224337 127181, 224355 127370, 224352 127956, 224290 128146, 224259 128731, 224315 128921, 224316 129119, 224389 129309, 224389 129507, 224325 129696, 224277 130084, 224327 130543, 224365 131832, 224307 132022, 224279 132608, 224330 132798, 224310 133771, 224386 133961, 224344 134546, 224263 134736, 224273 135321, 224357 135511, 224351 136097, 224162 136285, 224170 136484, 223690 136646, 223677 137033, 222752 137306, 222753 137695, 222378 137797, 222381 138123, 222459 138167, 222501 138666, 222383 138698, 222007 138337, 222005 138676, 221632 138779, 221619 139543, 221259 139656, 221260 139861, 221416 140004, 221418 140330, 221042 140105, 220883 140149, 220882 140532, 220510 140636, 220517 141024, 220144 141127, 220128 141898, 219763 141991, 219750 142390, 219379 142496, 219375 142886, 218996 142986, 219000 143371, 218632 143478, 218638 143862, 218265 143966, 218253 144350, 218162 144384, 218206 144710, 217879 144846, 217882 145231, 217506 145334, 217517 145720, 217146 145825, 217133 146210, 216766 146315, 216764 147092, 216390 147188, 216399 147578, 216029 147682, 216022 147975, 216060 148062, 215820 148315, 215638 148403, 215631 148565, 215251 148663, 215280 149433, 214910 149523, 214902 149844, 215267 150022, 214894 150125, 214829 149949, 214525 150014, 214508 150420, 214353 150468, 214581 150847, 214143 150671, 214146 150905, 213775 151011, 213789 151393, 213412 151492, 213388 152277, 213012 152385, 213027 152604, 213214 152718, 213161 153366, 212934 153182, 212999 153112, 212944 152792, 212652 152863, 212675 153249, 212297 153349, 212287 153744, 211913 153846, 211896 154238, 211522 154341, 211536 154720, 211182 154826, 211189 155210, 210817 155310, 210813 155433, 210943 155667, 210953 155830, 210793 155880, 210773 156091, 210402 156196, 210382 156588, 210011 156692, 210013 157468, 209642 157565, 209664 157939, 209709 157991, 209649 157959, 209286 158054, 209268 158448, 208888 158547, 208866 158939, 208497 159050, 208521 159429, 208146 159529, 208171 159910, 207794 160011, 207767 160621, 207930 160757, 207954 161109, 207614 160843, 207378 160904, 207404 161226, 207571 161323, 207411 161327, 207383 161294, 207023 161382, 207057 161766, 206682 161867, 206657 162260, 206290 162369, 206260 162760, 205886 162863, 205915 163243, 205541 163347, 205574 163728, 205537 164111, 205169 164220, 205154 164539, 205414 164426, 205703 164468, 205732 164833, 205158 164751, 205033 164651, 204770 164720, 204795 165095, 204512 165182, 204584 165308, 204436 165272, 204453 165576, 204081 165678, 204059 166078, 203685 166180, 203655 166580, 203679 166810, 203940 167012, 203703 167077, 203574 166989, 203313 167061, 203344 167431, 203043 167523, 203152 167686, 202956 167869, 202950 167936, 202576 168038, 202520 168442, 202565 168803, 202187 168719, 202204 168913, 201830 169016, 201868 169392, 201495 169494, 201429 170288, 201058 170393, 201021 170788, 200712 170876, 200875 171089, 200644 170958, 200612 171289, 200239 171393, 200319 172145, 199946 172245, 199905 172642, 199531 172744, 199512 173004, 199646 173106, 199728 173470, 199291 173203, 199122 173247, 199164 173623, 198825 173749, 198984 174062, 198985 174449, 198847 174544, 198443 174414, 198421 174601, 198047 174704, 198002 175107, 198049 175476, 197670 175586, 197722 175954, 197352 176052, 197311 176456, 196940 176558, 196894 176957, 196518 177059, 196567 177435, 196190 177535, 196243 177915, 196199 178309, 195823 178409, 195783 178812, 195408 178914, 195457 179288, 195082 179389, 195137 179765, 194761 179866, 194720 180268, 194347 180370, 194297 180774, 194349 181142, 194257 181173, 194297 181447, 194021 181522, 194031 181618, 193663 181718, 193611 182120, 193234 182219, 193190 182624, 192819 182729, 192867 183096, 192497 183200, 192557 183573, 192185 183676, 192083 184478, 191710 184582, 191658 184983, 191286 185087, 191230 185491, 191288 185858, 190918 185953, 190974 186296, 191059 186314, 191116 186460, 190971 186419, 190903 186356, 190606 186433, 190549 186836, 190258 186921, 190299 187297, 190530 187593, 189800 187434, 189749 187448, 189809 187815, 189613 187873, 189642 188044, 189874 188640, 189471 188525, 189259 188357, 189128 188392, 189072 188794, 188692 188893, 188648 189257, 188785 189263, 188860 189435, 188657 189394, 188704 189670, 188332 189774, 188393 190139, 188020 190242, 187964 190646, 187596 190749, 187527 191158, 187597 191521, 187229 191623, 187293 191992, 186924 192092, 186862 192499, 186486 192601, 186424 193005, 186055 193112, 186121 193477, 185748 193580, 185821 193947, 185450 194051, 185386 194454, 185009 194553, 184943 194968, 185021 195330, 184650 195435, 184721 195797, 184537 195854, 184682 196226, 184321 196119, 184287 196308, 183909 196405, 183869 196697, 184047 196765, 184088 196958, 183889 197012, 183921 197182, 183546 197289, 183623 197647, 183256 197743, 183185 198155, 182813 198251, 182671 199072, 182305 199172, 182228 199583, 181845 199678, 181934 200052, 181562 200157, 181644 200520, 181260 200617, 181122 201435, 180750 201544, 180789 201697, 181025 201857, 181067 202038, 180880 202089, 180652 201958, 180460 202008, 180544 202370, 180176 202475, 180095 202878, 179725 202985, 179633 203401, 179730 203753, 178989 203963, 179076 204324, 178998 204731, 178755 204804, 178703 204915, 178611 204941, 178547 205244, 178380 205295, 178682 205634, 178217 205517, 178263 205710, 177883 205810, 177982 206175, 177598 206272, 177445 207094, 177074 207203, 177165 207560, 176996 207612, 177046 207804, 176849 207858, 176889 208025, 176520 208123, 176430 208532, 176068 208625, 175976 209051, 175428 209973, 175072 210060, 174998 210370, 175169 210440, 175123 210657, 174925 210711, 174880 210901, 174505 211003, 174235 211454, 173964 211932, 173784 212750, 173418 212850, 173344 213184, 173402 213250, 173419 213632, 173152 214093, 173044 213735, 173270 213286, 172945 213370, 172852 213788, 172323 214698, 155836 214698, 155808 214583, 155857 214296, 155679 214476, 155661 214698, 154486 214698, 154447 214569, 154466 214349, 154309 214698, 150462 214698, 150557 214639, 150571 214234, 150345 214296, 150390 214518, 150365 214698, 148599 214698, 148466 214404, 147917 214662, 147923 214698, 146434 214698, 146753 213964, 146735 213889, 146374 213526, 146641 213980, 146244 214698, 145085 214698, 145088 214639, 144986 214698, 127633 214698, 127633 200302, 53651 200302, 53784 199534, 54142 199451, 54217 199016, 54592 198913, 54515 198547, 54895 198447, 54810 198079, 55181 197977, 55254 197572, 55406 197525, 55447 197288, 55676 197166, 55704 197056, 55627 196700, 55995 196588, 55928 196239, 56281 196134, 56360 195726, 56721 195634, 56806 195213, 57169 195121, 57093 194741, 57132 194726, 57075 194683, 57057 194720, 56709 194825, 55928 194677, 55640 193971, 55196 193707, 55164 194005, 55069 194128, 55229 194351, 55739 194638, 55157 194768, 55124 194873, 54408 195069, 54470 194680, 54416 194640, 54096 194727, 53981 194426, 54036 194311, 53971 194042, 53732 193720, 53734 193331, 53823 193001, 53809 192535, 53737 192285, 53790 191446, 53685 190724, 53733 190342, 53849 189981, 53706 189523, 53742 189453, 53658 189177, 53592 189107, 53643 189014, 53700 188689, 53806 188417, 53783 187794, 53594 188203, 53584 188721, 53521 189084, 53600 189779, 53565 190276, 53500 190585, 53565 191051, 53675 191409, 53499 192105, 53528 192612, 53654 192966, 53637 193327, 53485 193787, 53346 194046, 53566 194357, 53564 194440, 53021 194647, 52283 194890, 52309 193865, 52247 193430, 52104 193390, 52219 193142, 52181 192594, 52204 192030, 52106 191839, 52182 191518, 52155 190656, 52007 190338, 52077 189574, 52041 188755, 51827 188040, 51893 187815, 51945 187232, 51866 186478, 51914 186278, 51851 186085, 51960 185677, 51711 185181, 51635 184991, 51545 184955, 51124 185544, 51028 185921, 51033 186424, 51342 186623, 51029 186976, 51011 187428, 51026 188012, 51409 188155, 51041 188494, 51040 189264, 51064 189412, 50959 190121, 51076 190571, 51032 190968, 51097 191449, 51044 191735, 51054 192520, 51116 192887, 51183 193033, 51130 193269, 51293 193613, 50941 193930, 50907 194106, 51296 194388, 51436 194716, 50336 195029, 49906 194767, 49915 194635, 49759 194640, 49209 194959, 49252 195038, 49164 195062, 49044 194946, 48408 194737, 48444 194781, 48385 195162, 48035 195258, 47713 194981, 47679 194991, 47701 195373, 47760 195446, 47667 195443, 47317 195245, 47191 195124, 46967 195180, 46855 195082, 46612 195148, 46418 194948, 45896 195087, 45823 195046, 45509 195117, 45110 194919, 44344 195124, 43916 194859, 43177 195009, 42985 194896, 42879 194983, 42444 195101, 42280 194901, 41351 195168, 41250 195087, 40961 195437, 40494 195022, 40259 195000, 39805 194781, 39909 195007, 39500 195117, 39322 194955, 38729 195106, 38515 194975, 38341 195063, 38351 195215, 38222 195257, 38246 195495, 37995 195433, 37994 195679, 37649 195800, 37613 196196, 37240 196298, 37205 196691, 36989 196758, 37213 197050, 36859 197019, 36873 197175, 36501 197279, 36718 197608, 36867 197940, 36526 197815, 36489 198038, 36134 198134, 36096 198546, 35791 198637, 35989 198829, 35734 198708, 35755 199026, 35390 199134, 35442 199555, 35409 199516, 35044 199613, 35028 199922, 35249 200071, 35013 200138, 34981 200302, 20742 200302, 20744 197971, 20553 197628, 20546 197240, 20759 197051, 20949 196801, 20930 196420, 20932 195645, 20744 195302, 20737 195112, 20857 194911, 21062 194748, 22089 194491, 22169 194439, 22687 194173, 23062 194242, 23232 194116, 23298 193921, 23060 193221, 22685 193510, 22590 193316, 22602 192927, 22595 192144, 22536 190992, 22569 190593, 22558 189427, 22518 189054, 22529 188263, 22574 187778, 22532 186712, 22494 186341, 22491 185568, 22510 184772, 22486 184403, 22466 183309, 22549 182850, 22596 182074, 22575 181298, 22570 179360, 22545 178974, 22551 177819, 22593 177801, 22537 177425, 22684 177294, 23019 177290, 22990 176949, 23224 176670, 23224 176497, 23359 176384, 23363 176072, 23187 175868, 23431 175976, 23712 175883, 23685 175596, 23595 175407, 24103 175411, 24113 175028, 24175 174928, 24543 174969, 24568 174191, 24498 173435, 24575 173026, 24557 172597, 24620 172167, 24627 171073, 24581 170311, 24667 169208, 24612 168364, 24689 167180, 24689 166553, 24711 165023, 24650 164090, 24954 163619, 24698 163300, 25193 163063, 25633 163045, 25657 163241, 25767 163121, 26023 163291, 26250 163264, 26539 163464, 26455 163207, 26690 163062, 27138 162950, 27520 163186, 27771 163107, 27896 163124, 28216 163058, 28637 162871, 29392 162872, 29764 162750, 29954 163024, 30027 163271, 29648 163368, 29388 163565, 29719 163864, 29748 163953, 29847 163930, 30131 163999, 30306 163504, 30271 163324, 30372 163145, 30637 162954, 30886 163056, 31159 163081, 31198 163424, 31167 163465, 31250 163740, 31454 163604, 31888 163783, 32056 163304, 31975 163178, 31916 163200, 31613 163151, 31409 163012, 31631 162856, 31918 162783, 32022 162505, 32083 162137, 32399 161966, 32450 161676, 32717 161625, 32832 161459, 32736 161100, 33092 161157, 33190 161070, 33206 160969, 33096 160572, 33555 160537, 33485 160236, 33424 160134, 33469 160073, 33905 160057, 33753 159656, 33812 159557, 33918 159612, 34237 159580, 34262 159188, 34336 159109, 34298 158792, 34600 158834, 34703 158718, 34623 158254, 34656 158212, 35091 158198, 35028 157720, 35298 157549, 35431 157288, 35542 157228, 35743 156938, 35873 156488, 36210 156355, 36178 155889, 36630 155855, 36633 155765, 36513 155418, 36978 155373, 36798 154945, 36831 154900, 37301 154898, 37220 154441, 37409 154144, 37703 153922, 37776 153663, 38009 153472, 38029 153147, 38382 153034, 38406 152635, 38799 152550, 38815 152117, 39196 152020, 39165 151652, 39548 151556, 39487 151186, 39856 151082, 39842 151010, 39941 150739, 40108 150549, 39917 150261, 40208 150437, 40377 150241, 40393 150083, 40199 149760, 40585 149785, 40728 149752, 40695 149613, 40505 149288, 40890 149314, 41032 149281, 41006 148856, 41390 148767, 41455 148366, 41522 148223, 41288 147910, 41252 147909, 41279 147862, 41295 147898, 41688 147964, 41811 147891, 41812 147756, 41589 147451, 41507 147451, 41612 147245, 41604 147425, 41987 147486, 42320 147229, 42254 147156, 42326 147222, 42506 146937, 42535 146497, 42838 146326, 42849 146006, 43283 145940, 43054 145486, 43539 145451, 43457 145118, 43264 145227, 43048 145457, 42962 145398, 42680 145550, 42693 145188, 42769 144734, 42677 144417, 42524 144312, 42273 144244, 42204 144648, 41881 144798, 41865 145028, 41781 145170, 41734 145588, 41604 145624, 41264 145594, 41383 146102, 41220 146127, 40890 146070, 40957 145758, 41232 145563, 41396 145157, 41265 144417, 41259 144031, 41189 143894, 41270 143611, 41707 143270, 41753 143147, 41503 142801, 41481 142535, 41423 142436, 41372 142148, 41293 141961, 41130 141740, 41052 141406, 40816 141051, 40755 140524, 40923 140221, 41306 140198, 41678 140428, 41920 140749, 41974 140970, 42118 141267, 42297 141421, 42410 141650, 42540 141742, 42588 141899, 42733 142077, 42901 142524, 43088 142581, 43276 142419, 43318 142692, 43565 142805, 43645 143089, 43548 143115, 43286 143088, 43200 142862, 43047 143017, 43091 143141, 43376 143451, 43414 143592, 43194 143784, 43277 144085, 43378 144226, 43539 144633, 43582 144598, 43887 144674, 44002 144544, 44035 144434, 44026 144089, 44438 144027, 44420 143535, 44644 143346, 44711 143070, 44971 142901, 44968 142627, 45029 142540, 45428 142297, 46089 142293, 45516 141839, 45500 141670, 45751 141497, 45670 141272, 45665 141137, 45773 141013, 46200 141131, 46088 140768, 45780 140628, 45731 140479, 45515 140168, 45091 140033, 44753 140032, 45077 140607, 45058 140711, 44746 140816, 44439 140988, 44447 141219, 44337 141325, 44296 141479, 43892 141371, 44138 140679, 44330 140420, 44588 139939, 44694 139684, 44801 139571, 45065 139143, 45481 138553, 46203 138369, 46174 138033, 46015 137687, 45721 137570, 45651 137400, 45687 137293, 45607 136830, 45758 136630, 46151 136821, 46043 136518, 46111 136493, 45929 136161, 46098 135727, 45786 135563, 45678 135454, 45620 135309, 46175 135318, 46146 135527, 46249 135379, 46260 135193, 46144 134939, 46088 134941, 45909 134615, 46072 134203, 46116 134194, 46256 133609, 46109 133397, 46206 133163, 46060 133409, 45872 133204, 45851 133081, 45993 132655, 45970 132557, 46118 132296, 46329 132443, 46280 131801, 46313 131408, 46279 131025, 46185 130664, 46352 130231, 46361 129727, 46325 129462, 46163 129120, 46366 128676, 46354 128292, 46426 128021, 46394 127892, 46128 127891, 46238 128324, 46139 128703, 45825 128677, 45691 128726, 45639 128875, 45368 129174, 45201 129207, 45197 129383, 45015 129656, 44744 130123, 44516 130124, 44637 130313, 44552 130526, 44338 130731, 44266 130722, 44272 130801, 44081 131022, 43977 131269, 44010 131373, 43660 131488, 43780 131865, 43389 131959, 43346 132264, 43057 132455, 43001 132886, 42811 132998, 42630 132990, 42652 133183, 42553 133395, 42350 133593, 42201 133516, 42273 133674, 42097 133892, 42070 134117, 42112 134290, 41934 134331, 41594 134306, 41795 134581, 41844 134768, 41648 134814, 41363 134806, 41455 135061, 41430 135212, 41286 135284, 41044 135301, 41094 135548, 40922 135983, 40951 136094, 40596 136206, 40643 136554, 40284 136665, 40192 136817, 39909 136765, 40025 137004, 39907 137111, 39954 137411, 40303 138091, 40431 138443, 40521 139194, 40548 139239, 40521 139370, 40374 139458, 40131 139385, 39856 139474, 39678 139425, 39674 139039, 39459 138930, 39338 139012, 39194 139557, 39496 139909, 39046 139841, 38913 139883, 38918 140021, 39153 140362, 38737 140298, 38610 140357, 38430 140542, 38740 140626, 38845 140817, 38835 140976, 38684 141034, 38549 140897, 38386 140579, 38170 140801, 38164 141003, 38440 141316, 38455 141466, 38305 141504, 37913 141464, 38131 141787, 38161 141948, 37996 141984, 37574 141777, 37251 141717, 37439 141977, 37812 142263, 37623 142577, 37478 142353, 37260 142252, 36934 142187, 37128 142450, 37189 142820, 37229 142849, 37399 143344, 37209 143381, 36991 143262, 36837 143099, 36582 143099, 36657 143354, 37036 143639, 37079 143814, 36893 143843, 36471 143622, 36110 143543, 36302 143839, 36712 144115, 36709 144305, 36528 144350, 36359 144210, 35906 143947, 35709 143708, 35453 143802, 35420 144120, 35041 144221, 35079 144595, 34707 144699, 34704 145134, 34616 145264, 34361 145262, 34397 145524, 34243 145745, 33932 145728, 34084 145997, 33916 146228, 33600 146204, 33721 146485, 33626 146582, 33546 146943, 33213 147082, 33225 147396, 33103 147585, 32812 147587, 32875 147880, 32791 147995, 32683 148324, 32391 148479, 32344 148776, 32263 148744, 32306 148811, 32023 148935, 32001 149191, 31873 149187, 31925 149303, 31684 149423, 31667 149831, 31599 149887, 31272 149912, 31338 150239, 31302 150340, 31218 150409, 30875 150404, 31000 150719, 30962 150819, 30879 150881, 30531 150882, 30649 151203, 30513 151452, 30221 151396, 30293 151688, 30180 151778, 30125 152142, 29770 152255, 29855 152676, 29431 152741, 29485 153152, 29063 153215, 29095 153652, 28668 153710, 28718 154148, 28635 154233, 28302 154218, 28397 154534, 28283 154694, 27951 154702, 28007 155029, 27914 155256, 27651 155237, 27720 155494, 27570 155576, 27582 155984, 27165 156054, 27252 156486, 26809 156539, 26902 156882, 26886 156974, 26801 157037, 26438 157017, 26530 157372, 26413 157583, 26079 157533, 26157 157862, 26083 157931, 26092 158312, 25724 158418, 25701 158778, 25336 158889, 25372 159315, 24939 159372, 25022 159723, 25010 159817, 24923 159913, 24604 159896, 24689 160202, 24625 160290, 24561 160566, 24392 160497, 24501 160642, 24249 160776, 24184 160994, 23963 160947, 23923 161187, 23823 161230, 23864 161656, 23453 161727, 23512 162166, 23426 162246, 23083 162193, 23104 161848, 23396 161683, 23395 161293, 23769 161189, 23760 160791, 23981 160574, 24148 160316, 24213 159984, 24501 159818, 24609 159507, 24906 159347, 24911 158979, 24868 158922, 24935 158950, 25263 158834, 25271 158492, 25241 158441, 25300 158448, 25582 158314, 25624 157967, 25941 157822, 26022 157487, 26254 157272, 26417 157015, 26533 156711, 26762 156505, 26908 156238, 27118 156017, 27235 155628, 27445 155475, 27498 155117, 27821 154979, 27860 154637, 28074 154423, 28170 154208, 28436 153927, 28754 153371, 28990 153161, 28971 152783, 29302 152651, 29356 152327, 29665 152173, 29720 151806, 29922 151562, 30246 151043, 30458 150832, 30606 150574, 30799 150346, 30883 150000, 31181 149834, 31203 149443, 31522 149304, 31523 148950, 31866 148829, 31899 148492, 32132 148270, 32304 147997, 32428 147678, 32688 147479, 32744 147141, 32716 147076, 32782 147087, 33060 146949, 33104 146655, 33049 146539, 33180 146542, 33402 146421, 33445 146102, 33515 146092, 33715 145931, 33803 145633, 34062 145229, 34195 145115, 34298 144806, 34610 144629, 34523 144459, 34768 144387, 34974 144464, 34925 144146, 34959 143859, 35017 143862, 34971 143816, 35190 143598, 35384 143163, 35590 143080, 35676 142848, 35922 142563, 35952 142385, 36088 142201, 36247 142093, 36270 141910, 36364 141813, 36464 141527, 36760 141288, 36797 140990, 36741 140867, 36881 140870, 37144 140783, 37124 140513, 37068 140402, 37196 140409, 37462 140312, 37442 139943, 37791 139822, 37916 139485, 37949 139124, 37808 138992, 37991 139062, 38306 138967, 38125 138692, 38288 138625, 38662 138798, 38602 138489, 38631 138267, 38707 138224, 38687 138147, 38898 137983, 38953 137685, 38938 137562, 39067 137477, 39368 137515, 39389 137178, 39636 136926, 39665 136715, 39639 136603, 39759 136596, 40037 136182, 40115 135817, 40083 135759, 40139 135790, 40485 135689, 40495 135325, 40313 135151, 40556 135225, 40758 135091, 40804 134852, 40653 134709, 40854 134774, 41039 134616, 41134 134375, 41116 134326, 41160 134344, 41448 134187, 41751 133540, 41896 133390, 42097 132930, 42435 132467, 42397 132340, 42539 132343, 42669 132180, 42742 131995, 42616 131835, 42823 131864, 42973 131724, 43019 131387, 43281 131168, 43304 131066, 43568 130606, 43388 130428, 43636 130481, 43801 130347, 43795 130156, 43605 129929, 43904 129974, 44094 129892, 44147 129672, 44107 129536, 44231 129574, 44446 129400, 44464 128917, 44736 128646, 45001 128164, 45079 128181, 45337 127936, 45449 127764, 45583 127340, 45514 127020, 45601 126559, 45710 126404, 45990 125678, 45845 125361, 46150 125435, 46524 125322, 46735 125318, 46891 125248, 46994 125088, 47200 124959, 47051 124833, 47012 124622, 47332 123974, 47551 123712, 47636 124064, 47612 124395, 47862 124128, 47948 123978, 47899 123704, 47588 123688, 47848 123507, 47809 123241, 48226 122573, 48401 122692, 48180 123139, 48348 123290, 48552 123258, 48582 123030, 49060 122106, 48949 121956, 48769 121814, 48842 121560, 49093 121400, 49357 121705, 49400 121685, 49526 121284, 49597 121201, 49511 121126, 49365 120875, 49462 120651, 49683 120493, 49754 120770, 49897 120977, 50075 120840, 50111 120672, 50092 120298, 50293 119758, 50309 119455, 50552 118804, 50523 118620, 50712 118324, 50902 117773, 51108 117446, 51379 117246, 51510 117575, 51517 117961, 51449 118367, 51490 118548, 51632 118705, 51703 119073, 51913 119241, 52174 119720, 52266 119918, 52518 120220, 52747 120204, 52902 120084, 53122 120235, 52899 120400, 52921 120677, 52607 121083, 52419 120554, 52090 120510, 52030 120145, 51884 120043, 51747 120083, 51541 120042, 51332 120133, 51295 120347, 51204 120546, 51014 120678, 50859 120682, 50848 120857, 50589 121474, 50352 121769, 50063 122035, 49944 122268, 49676 122729, 49629 122904, 49445 123056, 49316 123078, 49294 123221, 49148 123421, 48978 123837, 48379 124456, 48045 125115, 48247 125384, 48522 125372, 48465 125595, 48696 125636, 48722 125699, 49504 125424, 49740 125426, 49729 125598, 49922 125637, 49973 125734, 50683 125475, 51119 125379, 51328 125378, 51370 125669, 51685 125623, 51716 125654, 52431 125418, 52730 125382, 52774 125564, 52916 125456, 53103 125610, 53852 125381, 54198 125365, 54361 125677, 55145 125393, 55431 125345, 55889 125188, 56038 125250, 56065 125485, 56292 125407, 56410 125441, 56650 125267, 56842 124761, 57158 124609, 57469 123748, 57586 123662, 57714 123400, 57990 123218, 58250 122759, 58316 122687, 58422 122362, 58563 122232, 58646 122048, 58806 121989, 59114 121369, 59204 121281, 59334 120967, 59561 120795, 59610 120702, 59690 120667, 60008 119990, 60333 119818, 60553 119361, 60834 118896, 60938 118614, 61094 118437, 61163 118287, 61281 118270, 61465 118078, 61716 117491, 61734 117122, 61801 117080, 61683 116724, 61502 116386, 61243 115807, 61128 115713, 61060 115437, 61066 115267, 61160 115194, 61444 115178, 61523 114830, 61592 114694, 61497 114342, 61378 113623, 61571 113222, 61856 113438, 62189 113437, 62461 113595, 62773 114101, 63065 114408, 63100 114495, 63338 114735, 63280 114348, 63292 113958, 63198 113596, 63208 113205, 63248 113111, 63610 113484, 63790 113605, 63881 113797, 63865 114139, 63828 114198, 63879 114212, 64146 113724, 64300 113404, 64437 113257, 64451 112935, 64662 112807, 64460 112758, 64399 112491, 64248 112144, 64176 111813, 64013 111417, 64362 110612, 64355 110177, 64265 109919, 64286 109761, 64205 109229, 63927 108435, 64121 108622, 64333 108918, 64580 109126, 64683 109313, 64955 109626, 65204 110078, 65439 110315, 65767 110778, 65887 110856, 66091 110595, 66354 110516, 66426 110428, 66971 109142, 67304 108987, 67666 108123, 67868 107716, 68206 107630, 68557 106719, 68909 106627, 69127 106156, 69469 105309, 69830 105183, 70092 104527, 70164 104281, 70381 103893, 70736 103755, 71007 102927, 71354 102671, 71631 102297, 71957 101514, 72324 101447, 72552 100953, 72626 100668, 72538 100569, 72817 100144, 73198 100022, 73597 99116, 73792 98745, 74099 98656, 74284 98158, 74484 97723, 74863 97584, 75067 97162, 75204 96738, 75442 96435, 75710 96262, 75960 95755, 76329 94963, 76621 94885, 77005 93991, 77388 93827, 77781 93010, 77992 92872, 78050 92754, 78153 92712, 78589 91933, 78720 91630, 78839 91477, 78859 91160, 79028 91037, 78871 90928, 78732 90731, 78677 90577, 78338 90063, 78274 89693, 78140 89295, 78212 89205, 78439 89084, 78466 88866, 78608 88688, 78536 88071, 78526 87750, 78617 87662, 78655 87448, 79177 87641, 79385 87768, 79521 87602, 79581 87785, 79745 87824, 79979 87811, 80102 87329, 80218 87223, 80250 87099, 80362 87095, 80620 87347, 80928 87386, 81115 87683, 81346 87440, 81668 87230, 81710 87111, 81678 86822, 81393 86505, 81274 86145, 81099 85911, 80908 85434, 80970 85125, 81171 84913, 81591 84843, 81481 84518, 81505 84440, 81349 84159, 81323 83774, 81224 83555, 81373 83369, 81378 83311, 81434 83307, 82465 84233, 82768 84665, 82979 84878, 83214 84851, 83185 84481, 83518 84355, 83507 83999, 83839 83873, 83798 83497, 84160 83392, 84115 83014, 84272 82955, 84410 82842, 84433 82505, 84806 82375, 84729 81997, 84752 81962, 85137 81900, 85085 81512, 85355 81348, 85364 81048, 85448 80712, 85726 80466, 85886 80135, 86019 79713, 86265 79534, 86409 79231, 86689 78877, 86768 78830, 86771 78741, 86890 78545, 86992 78247, 87334 77847, 87457 77806, 87441 77677, 87514 77495, 87660 77360, 87829 77021, 87985 76863, 88001 76795, 88069 76754, 88587 75805, 88818 75637, 88927 75371, 89228 75239, 89363 74974, 89285 74879, 89251 74910, 88898 74902, 88554 74696, 88473 74597, 88369 74625, 88086 74603, 87944 74666, 87694 74578, 87315 74644, 87168 74800, 86954 74854, 86860 74954, 86226 75230, 85738 75348, 85795 75735, 85515 75736, 85002 75861, 84746 76025, 84658 76311, 84429 76344, 83935 76519, 83754 76737, 83754 76822, 83658 76781, 83200 76830, 83112 76977, 83115 77116, 82793 77233, 82233 77373, 81764 77567, 81492 77647, 81129 77849, 81018 77870, 80828 78024, 80817 78072, 80482 78183, 80526 78479, 80461 78693, 80221 78693, 80333 78912, 80198 79023, 80132 79155, 79888 79153, 79959 79385, 79856 79479, 79868 79835, 79501 79926, 79601 80252, 79713 80425, 79614 80642, 79630 80715, 79849 80983, 79881 81240, 79640 81402, 79591 81388, 79777 81867, 79700 81868, 79284 81638, 79048 81744, 79016 82012, 79380 82280, 79298 82308, 78969 82216, 78734 82518, 78978 82764, 78639 82679, 78453 82990, 78596 83232, 78304 83093, 78065 83218, 78022 83487, 78174 83640, 77974 83553, 77737 83690, 77790 83937, 78029 84238, 77659 84124, 77416 84170, 77488 84407, 77662 84688, 77336 84639, 77098 84654, 77290 85135, 77005 85085, 76756 85122, 76815 85368, 77156 85679, 77180 85762, 77092 85776, 76679 85565, 76428 85621, 76485 85864, 76822 86162, 76841 86236, 76764 86247, 76361 86118, 76114 86127, 76175 86360, 76422 86601, 76479 86707, 76436 86716, 75849 86452, 75607 86288, 75351 86318, 75420 86713, 75271 86695, 74943 86742, 75027 87150, 74616 87225, 74722 87647, 74267 87692, 74382 88122, 73941 88179, 74052 88606, 73966 88648, 73629 88681, 73733 89000, 73422 89482, 73091 89649, 73000 89976, 72898 90081, 72741 90505, 72573 90809, 72488 90785, 72483 90893, 72217 91040, 72113 91382, 71898 91897, 71810 91966, 71541 92034, 71236 92785, 71002 93089, 70815 93064, 70735 93310, 70609 93419, 70534 93753, 70455 93871, 70048 94745, 69688 94832, 69606 95170, 69377 95717, 69238 95848, 69014 95841, 68757 96566, 68628 96701, 68391 97113, 68112 97263, 68024 97542, 67922 97661, 67789 97994, 67543 98530, 67442 98615, 67182 98652, 67103 98958, 67012 99070, 66845 99506, 66645 99795, 66561 99772, 66526 99891, 66290 100061, 66188 100372, 65929 100903, 65793 101098, 65624 101113, 65568 101316, 65395 101455, 65280 101783, 65037 102340, 64885 102508, 64681 102470, 64627 102738, 64482 102852, 64369 103196, 64108 103683, 63749 103812, 63422 104716, 63297 104824, 63023 104777, 62908 105147, 62852 105207, 62722 105705, 62630 105998, 62894 106702, 63153 106862, 63219 107001, 63235 107280, 62987 107287, 62854 107100, 62865 106744, 62561 107180, 62508 107523, 62020 107442, 61972 107730, 61728 108413, 61608 108604, 61740 108724, 61768 108949, 61516 109505, 61379 109632, 61269 109050, 60951 109294, 60873 109581, 60942 109889, 61018 109930, 60938 109999, 60790 110379, 60585 110863, 60535 110905, 60473 110854, 60536 110780, 60665 110413, 60487 110190, 60232 110275, 60113 110803, 59939 111236, 59695 111343, 59551 111309, 59516 111504, 59345 111690, 59201 112158, 58978 112343, 58766 112023, 58674 112009, 58653 112127, 58406 112277, 58212 112613, 58152 112560, 58157 112651, 57871 112813, 57759 113148, 57671 113232, 57494 113681, 57315 114009, 57114 113773, 56985 114136, 56928 114153, 56840 114563, 56597 115057, 56490 115219, 56382 115076, 56599 114316, 56925 114149, 57218 113297, 57425 112785, 57539 112629, 57704 112544, 57842 112350, 57972 112277, 58099 111784, 58333 111438, 58675 111287, 58757 110937, 58969 110491, 58976 110351, 59328 110217, 59541 109851, 59711 109411, 59969 109115, 60184 108608, 60437 108439, 60779 107669, 60765 107536, 60870 107565, 61137 107430, 61237 107156, 61469 106704, 61488 106555, 61669 106414, 61809 106362, 61884 106204, 62048 106030, 62168 105738, 62416 105282, 62420 105217, 62726 105004, 62866 104771, 62757 104641, 62751 104132, 63120 104224, 63333 103841, 63647 103635, 64018 102810, 64222 102487, 64545 102243, 64658 101954, 64951 101486, 64936 101414, 65027 101347, 65264 101013, 65460 100856, 65863 100067, 66203 99592, 66377 99453, 66513 99120, 66178 98940, 66334 98782, 66363 98505, 66688 98552, 66779 98600, 67066 98457, 67196 98157, 67442 97702, 67448 97599, 67754 97391, 68092 96749, 68380 96282, 68607 95832, 68903 95654, 69201 94894, 69212 94759, 69582 94650, 69800 94251, 69976 93799, 70484 93230, 70587 92964, 70873 92498, 71078 92053, 71066 91968, 71134 91991, 71410 91818, 71605 91448, 71722 91102, 71727 90972, 71839 90970, 72095 90860, 72434 90132, 72661 89682, 72648 89619, 72703 89621, 72977 89426, 73095 89175, 73363 88855, 73498 88595, 73700 88374, 73823 88102, 73848 87772, 73776 87718, 73855 87757, 74112 87588, 74158 87269, 74366 87056, 74490 86790, 74751 86614, 74842 86321, 75052 86118, 75172 85910, 75414 85663, 75586 85342, 75753 85195, 75831 84986, 75890 84935, 75892 84867, 76051 84683, 76151 84452, 76400 84186, 76416 83886, 76045 83614, 76455 83800, 76693 83674, 76742 83404, 76493 83186, 76788 83356, 77054 83222, 77088 82926, 76818 82710, 77116 82887, 77368 82740, 77440 82448, 77383 82402, 77447 82439, 77697 82269, 77769 81978, 77711 81932, 77775 81971, 78020 81796, 78084 81513, 77892 81361, 78102 81489, 78338 81321, 78351 81060, 78077 80795, 78424 80965, 78699 80838, 78675 80543, 78386 80310, 78744 80431, 79000 80292, 79000 80005, 78699 79770, 79064 79897, 79354 79822, 79306 79528, 78978 79218, 78848 79262, 78973 79173, 79389 79407, 79628 79318, 79632 79063, 79392 78802, 79719 78942, 79941 78842, 79980 78596, 79874 78447, 80051 78504, 80310 78408, 80284 78140, 79913 78126, 79601 78254, 79207 78320, 78862 78307, 78495 78475, 78090 78328, 77955 78416, 77909 78599, 77741 78644, 77503 78511, 77333 78476, 76820 78521, 76577 78635, 76490 78634, 76402 78919, 76238 79022, 76065 79028, 76124 79193, 76079 79388, 75729 79527, 75782 79695, 75741 79889, 75589 80020, 75403 80067, 75460 80241, 75425 80432, 75263 80507, 75018 80523, 75115 80938, 74695 80991, 74795 81409, 74623 81581, 74533 81575, 74570 81658, 74462 81873, 74295 82050, 74210 82046, 74238 82126, 73966 82515, 73882 82516, 73911 82597, 73638 82987, 73553 82987, 73587 83066, 73309 83445, 73196 83456, 73245 83555, 73134 83775, 72983 83943, 72837 83958, 72892 84090, 72809 84293, 72663 84467, 72532 84469, 72576 84591, 72411 85023, 72437 85100, 72355 85103, 72163 85263, 72097 85495, 72123 85584, 72029 85591, 71839 85740, 71752 85974, 71774 86045, 71699 86048, 71486 86200, 71424 86509, 71162 86681, 71059 86962, 70845 87169, 70713 87431, 70505 87654, 70422 87957, 70178 88152, 70088 88445, 69853 88639, 69913 89027, 69752 89045, 69542 89131, 69584 89509, 69425 89528, 69216 89616, 69204 89844, 69239 89981, 68860 90081, 68869 90333, 68811 90469, 68467 90626, 68208 91289, 67924 91755, 67889 91859, 67614 92110, 67586 92235, 67399 92455, 67230 92871, 67048 93012, 66897 93037, 66861 93210, 66695 93431, 66593 93670, 66371 94119, 66317 94292, 66134 94416, 65977 94447, 65926 94628, 65786 94834, 65618 95279, 65360 95558, 65142 96006, 64885 96268, 64693 96653, 64456 96973, 64179 97250, 64108 97453, 63799 98093, 63580 98287, 63484 98289, 63457 98407, 63274 98651, 63205 98864, 62769 99521, 62560 99662, 62509 99829, 62285 100278, 61994 100746, 61964 100827, 61669 101067, 61619 101236, 61463 101463, 61284 101891, 61057 102231, 60771 102476, 60726 102644, 60564 102859, 60370 103268, 60131 103601, 59835 103829, 59471 104666, 59279 104871, 59183 104915, 59165 105010, 58967 105284, 58896 105471, 58612 105937, 58574 106077, 58277 106306, 58237 106427, 58040 106637, 57870 107078, 57662 107450, 57339 107630, 57289 107850, 57002 108493, 56792 108641, 56660 108643, 56618 108809, 56446 109020, 56283 109471, 55796 110063, 55763 110206, 55149 111046, 55057 111046, 55093 111165, 54918 111601, 54739 111901, 54466 112068, 54283 111621, 53961 111087, 53952 110845, 53872 110725, 53693 110678, 53332 110313, 53381 110472, 53115 110638, 53065 110946, 52785 111411, 52561 111950, 52215 112089, 52082 112517, 51884 112870, 51572 113104, 51511 113310, 51346 113528, 51151 113945, 50940 114261, 50649 114467, 50578 114729, 50290 115196, 50066 115645, 50042 115752, 49679 115868, 49567 116299, 49390 116681, 49047 116850, 48923 117121, 48671 117578, 48439 118029, 48434 118074, 48128 118259, 48069 118518, 47780 118984, 47433 119476, 47132 119666, 47044 120102, 46553 120871, 46272 121137, 45929 121818, 45924 121913, 45580 122047, 45551 122309, 45488 122467, 45325 122635, 45169 122626, 45168 122802, 45016 122973, 44947 123250, 44577 123772, 44408 124172, 44399 124309, 44020 124404, 43929 124811, 43764 125153, 43440 125428, 43152 125835, 42871 125863, 42992 126112, 42948 126271, 42757 126560, 42488 126775, 42464 127032, 42514 127191, 42050 127241, 42166 127617, 41770 127708, 41824 128091, 41467 128209, 41470 128467, 41302 128901, 41348 128996, 41239 129002, 40994 129108, 40901 129250, 40695 129252, 40792 129428, 40610 129707, 40394 129713, 40495 129897, 40365 130056, 40330 130495, 39925 130565, 39967 130994, 39797 131046, 39517 131051, 39642 131294, 39669 131462, 39206 131510, 39327 131768, 39284 131926, 39129 132056, 38922 132043, 38941 132262, 38837 132424, 38777 132694, 38829 132820, 38416 132897, 38471 133255, 38132 133381, 38142 133744, 37792 133869, 37741 134279, 37605 134345, 37360 134374, 37358 134634, 37301 134773, 37169 134912, 36983 134925, 37001 135119, 36884 135285, 36838 135551, 36879 135680, 36473 135759, 36491 136105, 36156 136227, 36149 136575, 35821 136719, 35844 136987, 35800 137143, 35652 137268, 35446 137262, 35471 137477, 35410 137628, 35292 137742, 35065 137746, 35152 137952, 35090 138101, 34972 138208, 34739 138216, 34824 138429, 34734 138584, 34658 138955, 34318 139085, 34333 139491, 33904 139557, 34003 139964, 33585 140038, 33654 140300, 33636 140444, 33491 140611, 33338 140613, 33362 140768, 33220 140941, 33107 141226, 33122 141272, 32815 141416, 32815 141764, 32486 141894, 32439 142220, 32147 142395, 32109 142786, 31985 142882, 31768 142917, 31804 143134, 31751 143295, 31617 143402, 31401 143411, 31469 143613, 31406 143768, 31278 143877, 31056 143886, 31124 144095, 30896 144489, 30815 144482, 30829 144564, 30624 144738, 30573 145021, 30600 145117, 30221 145216, 30305 145630, 29882 145700, 29932 146114, 29517 146182, 29530 146608, 29397 146674, 29140 146695, 29136 147087, 29026 147227, 28847 147248, 28868 147427, 28676 147675, 28486 147724, 28501 147916, 28403 148041, 28319 148382, 28012 148539, 28002 148939, 27892 149048, 27675 149078, 27736 149288, 27643 149457, 27503 149570, 27271 149560, 27325 149789, 27141 150187, 27073 150175, 27098 150238, 26888 150412, 26785 150663, 26720 150662, 26746 150722, 26538 150912, 26492 151278, 26131 151389, 26171 151808, 26024 151878, 25775 151892, 25836 152135, 25803 152287, 25665 152359, 25419 152381, 25474 152622, 25430 152774, 25294 152920, 25105 152914, 25146 153099, 25038 153258, 24951 153583, 24649 153736, 24677 154136, 24304 154238, 24300 154620, 23915 154714, 23960 154975, 23940 155126, 23800 155238, 23583 155241, 23631 155453, 23438 155900, 23166 156080, 23172 156471, 22797 156572, 22780 156964, 22089 156891, 22096 156834, 21811 156510, 22079 156115, 21751 156033, 22130 155726, 22312 155687, 21437 155357, 21606 155241, 21213 154979, 21671 154823, 22703 154562, 22683 153811, 23054 153981, 23059 153675, 23426 153602, 23674 153763, 23456 153563, 23432 153199, 23284 153222, 23281 152914, 23442 153180, 23805 153124, 24028 153254, 23850 153067, 23800 152701, 23563 152635, 23799 152586, 23879 152284, 23876 151586, 24112 151606, 24545 151548, 24558 151331, 24995 151279, 24947 151216, 24917 150840, 25287 150782, 25398 150818, 25333 150722, 25279 150355, 25647 150303, 25844 150397, 25685 150239, 25652 149897, 25393 149930, 25400 149656, 25662 149540, 25692 149849, 26025 149796, 26267 149952, 26071 149745, 26036 149417, 25722 149452, 25494 148935, 26045 149108, 26063 148985, 26442 148888, 26442 148485, 26901 148450, 26854 148367, 26796 147997, 27173 147930, 27344 148016, 27206 147884, 27151 147529, 26950 147565, 26986 147182, 27164 147508, 27525 147452, 27840 147633, 27570 147396, 27538 147056, 27012 146882, 27555 146653, 27930 146541, 27916 146142, 28287 146083, 28407 146123, 28333 146024, 28270 145663, 28636 145603, 28756 145641, 28661 145546, 28655 145163, 29024 145104, 29153 145164, 29070 145046, 29051 144666, 29420 144609, 29605 144714, 29484 144546, 29399 144206, 29168 144244, 29151 144011, 29369 143803, 29265 143303, 29756 143432, 29770 143309, 29868 143277, 29887 142993, 30150 142990, 30175 142817, 30586 142747, 30557 142701, 30881 142238, 31068 142353, 30890 142222, 30848 141850, 31220 141800, 31588 141996, 31257 141733, 31247 141351, 31614 141269, 31818 141422, 31636 141242, 31647 140871, 31525 140884, 31547 140782, 31636 140709, 31622 140479, 31716 140445, 31688 140173, 31962 140162, 31972 140013, 32323 139962, 32378 139876, 32360 139507, 32708 139537, 32775 139441, 32760 138998, 33124 138960, 33252 139002, 33174 138882, 33091 138520, 33466 138474, 33793 138634, 33511 138403, 33417 138082, 33126 138120, 32896 137582, 33438 137777, 33451 138032, 33789 137993, 34081 138135, 33834 137926, 33823 137543, 33887 137163, 34207 137313, 34277 137077, 34190 136668, 34563 136590, 34651 136623, 34584 136557, 34508 136193, 34880 136119, 34967 136149, 34904 136082, 34923 135692, 35283 135648, 35400 135689, 35338 135575, 35337 135198, 35182 135229, 35191 135051, 35353 135066, 35394 134794, 35759 134695, 35813 134285, 36178 134236, 36376 134356, 36238 134166, 36135 133813, 36509 133762, 36808 133896, 36544 133694, 36441 133337, 36816 133267, 37067 133392, 36842 133226, 36862 132834, 36820 132842, 36874 132751, 36864 132831, 37231 132779, 37502 132981, 37327 132705, 37306 132337, 37342 132313, 37249 131969, 37609 131881, 37547 131493, 37760 131423, 37706 131192, 37939 131148, 37966 130980, 38327 130933, 38457 130994, 38369 130868, 38401 130474, 38764 130423, 39004 130597, 38821 130357, 38702 130004, 39083 129945, 39387 130085, 39117 129888, 38999 129543, 38849 129573, 38875 129413, 39011 129440, 39004 129532, 39378 129483, 39623 129581, 39442 129411, 39431 129040, 39313 129059, 39276 128870, 39495 128645, 39681 128959, 39815 128934, 39900 128543, 39803 128155, 40170 128066, 40330 128144, 40183 128045, 40088 127686, 40509 127614, 40523 127184, 40452 127196, 40533 127129, 40527 127176, 40881 127171, 41059 127240, 40935 127064, 40963 126708, 40711 126737, 40333 126299, 40933 126503, 40911 126317, 41090 126246, 40977 126040, 41196 125947, 41178 125843, 41341 125789, 41225 125410, 41623 125279, 41555 125730, 41920 125681, 42177 125785, 41957 125621, 42070 124820, 42488 124766, 42344 124353, 42726 124285, 42986 124400, 42748 124241, 42622 123892, 42997 123825, 43043 123772, 43057 123444, 42546 123213, 43137 123050, 43128 123362, 43427 123341, 43561 123407, 43481 123265, 43610 122474, 43585 122460, 43621 122422, 43618 122452, 43980 122396, 44076 122444, 44017 122342, 44084 121941, 44189 121908, 44171 121782, 43937 121257, 44505 121202, 44726 121367, 45035 120900, 45071 120537, 44717 120612, 44687 120698, 44447 120520, 44503 120271, 44715 119904, 44906 120006, 44904 120162, 45131 120285, 45185 120094, 45647 120091, 45595 119951, 46071 119082, 46196 119135, 46288 119006, 46681 118717, 46569 118542, 46655 118144, 46803 117844, 46678 117736, 46786 117368, 46872 117295, 47051 116795, 47168 117215, 47434 117265, 47536 117186, 47737 116287, 47977 115840, 48224 115960, 48363 115769, 48591 115299, 48935 115180, 48699 114858, 48989 115044, 49282 114846, 49249 114409, 49697 114510, 49883 114317, 49947 114127, 49883 113997, 49654 113909, 49752 113684, 49871 113624, 50022 113344, 50274 112493, 50638 112399, 50867 112712, 50862 112779, 50929 112695, 50886 112700, 50648 112383, 51075 111498, 51098 111541, 51583 110951, 51720 110540, 51962 110086, 52146 109687, 52456 109639, 52502 109561, 52638 109614, 52567 109532, 52503 109544, 52787 108702, 53157 108600, 53458 107738, 53660 107306, 54016 107213, 54218 106754, 54542 105900, 54906 105798, 55275 104920, 55645 104819, 56162 103519, 56524 103420, 56639 103132, 56554 103011, 56782 102774, 57061 102110, 57386 102009, 57383 101920, 57439 101973, 57773 101129, 58149 101028, 58685 99735, 59046 99619, 59376 98796, 59332 98717, 59419 98693, 59584 98316, 59946 98241, 60279 97362, 60246 97348, 60267 97298, 60303 97303, 60479 96912, 60848 96794, 61385 95497, 61728 95408, 61908 94984, 61879 94962, 61943 94900, 62284 94098, 62637 94003, 62811 93545, 63183 93446, 63510 92581, 63891 91709, 64251 91616, 64220 91221, 64595 91117, 64541 90734, 64914 90634, 64871 90254, 65112 90180, 64828 89959, 64518 89948, 64479 89645, 64779 89567, 64966 89826, 65213 89938, 65193 89759, 65564 89645, 65551 89544, 65132 89188, 65379 88903, 65369 88814, 65456 88785, 65680 89216, 65894 89163, 65845 88779, 66222 88683, 66173 88300, 66551 88205, 66499 87820, 66873 87724, 66625 87293, 66817 87278, 66940 87312, 67201 87247, 67154 86869, 67327 86823, 67077 86468, 67510 86636, 67483 86396, 67780 86289, 67704 86178, 67835 86144, 67804 85882, 68179 85752, 68128 85366, 68503 85274, 68455 84891, 68831 84801, 68789 84423, 69160 84330, 69072 83571, 69236 83523, 69211 83321, 69268 83124, 69118 82908, 69358 82854, 69688 83379, 69807 83333, 69761 82950, 70131 82801, 70079 82413, 70384 82277, 70435 82173, 70368 81565, 70737 81491, 70692 81095, 71064 81009, 71023 80630, 71397 80543, 71353 80169, 71722 80085, 71677 79703, 72072 79612, 72007 79244, 72372 79093, 72346 78703, 72690 78542, 72652 78139, 73397 77980, 73301 77214, 73681 77141, 73630 76756, 74010 76685, 73960 76302, 74290 76236, 74326 76151, 74289 75847, 74667 75784, 74620 75398, 75345 75012, 75329 74888, 74936 74629, 75270 74416, 75250 74241, 75507 74193, 75520 74093, 75619 74109, 75581 73790, 75904 73731, 75636 73136, 75893 73218, 76287 73273, 76246 72895, 76622 72829, 76576 72451, 76954 72386, 76903 72002, 77287 71942, 77237 71563, 77610 71335, 77549 70989, 77504 70990, 77498 70581, 77575 70947, 77907 70756, 77863 70363, 78241 70302, 78192 69917, 78570 69860, 78523 69479, 78903 69421, 78808 68675, 78761 68663, 78750 68574, 78849 68651, 79195 68601, 79150 68231, 79521 68175, 79494 67807, 79853 67743, 80071 67589, 80108 67462, 80198 67402, 80163 67118, 80404 66950, 80330 66807, 80505 66764, 80472 66489, 80852 66439, 80805 66056, 81041 66024, 81148 65720, 81135 65624, 81335 65368, 81419 65158, 81502 65155, 81806 64771, 82158 64512, 82113 64131, 82464 63868, 83473 62574, 83432 62202, 83753 61793, 83753 61782, 84441 60932, 84391 60574, 85077 59989, 85376 59613, 85405 59527, 85372 59187, 85913 58509, 85793 58165, 86115 58231, 86710 57583, 87085 57139, 86994 56761, 87344 56466, 87701 56111, 87653 55739, 88314 54933, 89017 54108, 88945 53799, 88710 53884, 88924 53632, 89046 53628, 89457 53147, 89436 52970, 89592 52789, 89773 52806, 89962 52619, 89914 52239, 90259 51889, 90909 51129, 90882 51104, 90928 51081, 90892 50722, 91559 49947, 92249 49196, 92201 48820, 92534 48456, 92896 46537, 93135 45885, 93274 45832, 93915 45830, 94437 45851, 94824 45830, 95063 46013, 95473 45629, 99087 45628) (143176 214170, 143101 214582, 143307 214236, 143295 214045, 143080 213805) (148068 213383, 148076 213601, 147968 214050, 148426 214061, 148793 213405, 148359 213075) (144676 213608, 144677 213926, 144905 213970, 144846 213711, 144909 213384) (148802 210301, 148740 210555, 148923 210390, 148917 210148, 148762 210131) (145180 209356, 145037 209868, 145189 210129, 145253 210139, 145114 209760, 145239 209287) (155600 209489, 155731 209728, 155803 209579, 155857 209278) (155588 208940, 155851 209008, 155784 208741, 155703 208627) (148541 207104, 148535 207485, 148713 207395, 148676 207235, 148724 207017) (155679 204372, 155689 204701, 155825 204500, 155860 204252) (155601 201072, 155748 201322, 155870 200999, 155646 200780) (155572 200305, 155641 200567, 155853 200228, 155699 199919) (128324 199634, 128234 200049, 128475 199744, 128437 199603, 128511 199343, 128245 199340) (155529 199377, 155697 199845, 155833 199458, 155866 199216) (121190 199160, 121198 199362, 121436 199587, 121345 199219, 121411 198810) (155517 198935, 155860 198910, 155805 198653, 155699 198472) (130227 198243, 130242 198409, 130405 198566, 130318 198312, 130362 198087) (128414 197670, 128231 197868, 128283 198240, 128524 198349, 128418 198057, 128557 197596) (131709 195216, 131716 195481, 131855 195564, 131764 195780, 131802 195966, 131728 196386, 132070 197055, 131745 197863, 131753 197969, 131941 198237, 131828 197898, 132074 197051, 131747 196364, 132039 195901, 132112 195640, 132089 195500, 132255 195067) (155499 197838, 155693 198192, 155789 197957, 155825 197697) (121129 197605, 121123 197886, 121334 197957, 121288 197685, 121411 197139) (124642 196588, 124760 196734, 124666 196965, 124706 197227, 124824 197155, 125005 196794, 125033 196438, 124959 196291, 124666 196263) (128170 196186, 128158 196281, 128234 196557, 128189 196833, 128480 196816, 128462 196495, 128599 196309, 128576 195912) (130113 195267, 130122 195398, 130394 195651, 130395 195189) (104353 195349, 104482 195523, 104782 195376, 104876 195268, 104845 195211) (128199 195015, 128201 195125, 128329 195368, 128545 195442, 128546 195309, 128471 195322, 128246 194998) (177330 188306, 177371 188515, 177312 188772, 177326 189690, 177391 189949, 177317 190298, 177351 190459, 177305 190772, 177375 191156, 177307 191246, 177357 191460, 177250 191750, 177263 192250, 177324 192791, 177423 193028, 177380 193164, 177386 193409, 177437 193537, 177149 194091, 177090 194406, 177495 194684, 177589 194691, 177813 194597, 177858 194196, 177818 194155, 177785 193828, 177558 193504, 177654 193197, 177634 192707, 177559 192478, 177658 192167, 177610 191939, 177634 191657, 177557 191259, 177578 191172, 177500 190914, 177596 190583, 177557 190402, 177608 190110, 177532 189634, 177394 189284, 177568 188549, 177564 188124) (174621 193971, 174571 194413, 174731 194665, 175180 194542, 175146 193934) (170728 193079, 170795 193419, 170733 193823, 170528 194267, 170606 194305, 170682 194614, 170729 194628, 171295 194445, 171256 194067, 171121 193717, 171127 193635, 170946 193377, 171137 193097, 171151 192856, 170913 192849) (172355 194245, 172312 194553, 172708 194480, 172790 194522, 172996 194366, 172519 194228) (166988 186294, 166942 186721, 167149 187441, 167015 187837, 166934 188274, 166994 188695, 167130 188997, 166916 189715, 166913 189957, 166978 190201, 167140 190544, 167057 190918, 166948 190985, 166868 191174, 166947 191372, 166866 191687, 166790 192190, 166867 192558, 166840 192724, 166909 192934, 166910 193398, 166645 194169, 166698 194542, 167076 194474, 167159 194518, 167370 194358, 167371 193944, 167193 193705, 167030 193674, 167051 193282, 167166 193014, 167201 192644, 167161 192476, 166907 192159, 167038 191796, 167119 191713, 167157 191491, 167125 191324, 167248 190566, 167199 190005, 167126 189772, 167213 189017, 167152 188602, 167208 188398, 167082 188233, 167165 187965, 167124 187835, 167155 187443, 166950 186719, 167110 186391, 167115 185868) (57360 192252, 57298 192742, 57323 192770, 57448 193411, 57316 193900, 57196 194090, 57149 194333, 57420 194466, 57847 194530, 57979 194301, 57805 193855, 57691 193797, 57682 193617, 57558 193160, 57819 192977, 57420 192708, 57829 192249, 57846 191965, 57805 191827, 57420 191575) (165290 184073, 164827 184880, 164791 184986, 164453 185556, 164463 185850, 164402 186257, 164651 186575, 164403 187010, 164390 187662, 164391 188197, 164361 188592, 164432 188961, 164385 189473, 164730 189655, 164410 190039, 164378 190523, 164434 190983, 164810 191183, 164441 191582, 164457 192900, 164564 193377, 164521 193588, 164263 194046, 164563 194352, 164963 194288, 165032 194350, 165261 194321, 165402 194510, 165581 194460, 165670 193944, 165418 192540, 165588 191822, 165614 191397, 165185 191080, 165466 190228, 165299 189498, 165299 188978, 165345 188635, 165326 188512, 165298 187948, 165362 187278, 165334 187009, 165315 186393, 165409 186049, 165425 185587, 165517 185141, 165136 184891, 165506 184436, 165447 184030, 165488 183604) (39449 193702, 39335 194021, 39332 194178, 39436 194509, 39867 194249, 39744 193950, 39694 193691, 39453 193262) (35693 185464, 35733 186248, 35666 187042, 35756 187792, 35653 188210, 35631 188488, 35687 188898, 35661 188982, 35742 189347, 35639 189763, 35652 190416, 35606 190547, 35663 190919, 35641 191313, 35587 191530, 35649 191955, 35577 192106, 35616 192482, 35585 192878, 35606 193648, 35284 194124, 35480 194459, 35906 194503, 36146 194276, 36080 193913, 35815 193591, 35848 193194, 35951 192536, 35903 192126, 35934 192008, 35882 191360, 35917 190967, 35908 190465, 35865 190205, 35901 189691, 35851 189009, 35882 188922, 35843 188545, 35866 188268, 35782 187132, 35849 186714, 35851 186216, 35736 185496, 35745 185055) (59075 193980, 58921 194085, 58863 194252, 58964 194256, 59421 194497, 59576 194444, 59631 194291, 59505 193836) (37069 194022, 37140 194391, 37419 194490, 37620 194472, 37792 194386, 37872 194190, 37206 193720) (31530 193835, 31455 194011, 31480 194203, 31555 194371, 31802 194469, 32013 194460, 32166 194359, 32179 194200, 32055 193706, 31906 193659) (168521 193823, 168458 194059, 168478 194442, 168857 194366, 168983 194466, 168968 194221, 168737 193757) (161631 193182, 161248 193226, 161085 193754, 161097 194139, 161346 194459, 161479 194465, 161701 194361, 161801 194259, 161885 193923, 161752 193571, 161717 193089) (156902 193996, 156853 194139, 157080 194465, 157260 194415, 157354 194076, 157660 193918, 157338 193881) (64030 185814, 63951 186243, 64014 186638, 64160 186984, 63967 187769, 64008 188189, 64129 188544, 64032 188905, 63932 188985, 63905 189209, 63961 189365, 63901 189565, 64059 189967, 64188 190078, 64069 190450, 63997 190518, 63915 190732, 63923 191121, 64197 191626, 64057 191981, 63978 192074, 63917 192246, 63995 192845, 63914 193286, 64070 193600, 63797 193826, 63666 194098, 63812 194446, 64198 194369, 64551 194243, 64244 193552, 64273 193256, 64037 193221, 64287 193117, 64296 192612, 64226 192393, 64266 192116, 64299 191553, 64238 191227, 64270 191064, 64231 190841, 64288 190116, 64202 189589, 64123 189320, 64271 188586, 64184 188140, 64212 187977, 64079 187781, 64168 187476, 64139 187378, 64213 186928, 64175 186447, 64027 186245, 64118 185912, 64094 185840, 64156 185428) (47874 193775, 47671 193857, 47796 194184, 48137 194440, 48343 194267, 48413 193787, 48708 193830, 48407 193482, 48184 193444) (62442 194433, 62734 194353, 62667 194173, 62344 194085) (29773 193309, 29541 193874, 29214 193807, 29232 194232, 29582 194288, 29814 194159, 30093 194385, 30249 194423, 30335 194160, 30128 193987, 29784 193307, 29789 193047) (42266 193592, 42239 193769, 41916 194086, 41853 194262, 42114 194375, 42438 194420, 42539 193803, 42450 193365) (175714 194126, 175722 194394, 176015 194394, 175964 194107) (61163 194009, 61203 194385, 61626 194321, 61848 194208, 61777 193840, 61553 193739, 61230 193722) (33350 193879, 33328 194273, 33488 194346, 33761 194297, 33782 193761, 33543 193469) (158081 192731, 158197 192995, 158095 193411, 157684 193911, 157875 194247, 158021 194319, 158262 194344, 158405 194226, 158489 194078, 158465 193697, 158185 193386, 158294 192918, 158209 192604, 158227 192466, 158045 192345) (46073 193881, 46125 194254, 46556 194344, 46730 194273, 46924 194034, 46246 193516) (159606 193665, 159488 194192, 159785 194343, 160152 194217, 160277 193976, 160165 193721, 159756 193643) (44271 193392, 44004 193379, 44254 193874, 44231 193998, 44374 194038, 44517 194307, 44804 194341, 45072 194232, 45162 194130, 45040 193776, 44842 193569, 44649 193138) (163144 192776, 163068 192823, 162975 193075, 163009 193227, 162828 193660, 162720 194082, 162877 194300, 163205 194316, 163455 194073, 163470 193876, 163243 193550, 163162 193185, 163253 192518) (26004 193508, 25922 193589, 25951 193694, 26057 193801, 26238 194279, 26420 194296, 26551 194193, 26223 193678, 26053 193185) (27439 193844, 27542 194044, 27814 194235, 27961 194228, 28203 194030, 28218 193736, 27697 193402) (24493 185403, 24479 185887, 24541 186990, 24509 187727, 24430 188269, 24481 189333, 24422 189740, 24452 190503, 24451 191171, 24397 192123, 24503 193203, 24449 193496, 24284 193754, 24185 194065, 24558 194220, 24865 194198, 25045 193943, 25055 193827, 24932 193545, 24839 193498, 24653 193162, 24771 192577, 24764 191969, 24714 191595, 24707 190978, 24727 190816, 24710 189658, 24642 189289, 24678 188174, 24608 187420, 24547 186989, 24636 186277, 24621 185500, 24544 185238) (49842 193859, 49657 194061, 49978 194217, 50100 194045, 50131 193931, 49879 193245) (23018 191672, 22943 192080, 22932 192471, 23060 193128, 23090 192459, 23060 191118) (26043 190067, 26015 191212, 26035 192008, 26017 192761, 26051 193120, 26093 192818, 26110 191988, 26089 191219, 26102 190439, 26058 190069, 26041 189459) (44476 192139, 44668 192327, 44655 193023, 44756 192765, 44727 192699, 44817 192375, 44694 191992) (159598 192107, 159671 192592, 159647 192999, 160017 192873, 159961 192512, 160066 192284, 160052 192033, 159805 192007) (31991 191129, 32052 191898, 32005 192683, 32022 192755, 32068 191910, 32011 191004) (37262 192419, 37268 192670, 37351 192428, 37316 192090) (42281 192071, 42458 192623, 42447 191718) (29579 185477, 29703 186302, 29524 186923, 29515 187178, 29676 187884, 29510 188456, 29500 188733, 29632 189398, 29528 190016, 29530 190275, 29803 190975, 29583 191605, 29576 191813, 29812 192500, 30042 191949, 30027 191690, 29812 190973, 30065 190421, 29989 189374, 30059 188755, 29916 187933, 30011 187200, 29884 186404, 29918 185683, 29772 185070) (161196 192009, 161202 192336, 161456 192401, 161350 192131, 161450 191795) (170763 191756, 170736 192146, 170891 191972, 170854 191852, 170887 191712) (159881 190521, 159635 190771, 159644 191339, 159781 191399, 160016 191369, 160066 190841, 160005 190520) (163143 190705, 163179 190854, 163092 191124, 163299 190965, 163299 190653) (161589 189739, 161154 190610, 161192 190706, 161380 190809, 161290 190597, 161773 189833, 161836 189672, 161765 189552, 161495 189434) (44755 189912, 44788 189969, 44725 190777, 44855 189982, 44735 189364) (49935 189333, 49487 189800, 49438 190214, 49462 190717, 49815 190775, 49941 190680, 49938 190108, 49971 189300, 49926 189296) (22994 187415, 23006 188131, 23047 188563, 23038 189319, 22984 190130, 23058 190731, 23080 190104, 23061 188559, 23075 188184, 23073 187005, 23058 186673) (57410 190727, 57778 190678, 57745 190293, 57421 190132) (170864 189523, 170735 190290, 170744 190441, 170865 190429, 170833 190307, 171216 189818, 171101 189459, 170853 189190) (46273 189561, 46219 190366, 46652 189848, 46339 189220, 46418 189135, 46253 189085) (158089 190319, 158129 190356, 158093 190311, 158228 189934, 158225 189841, 158160 189790) (31985 189581, 32045 190194, 32004 189439) (142628 185723, 142888 186338, 142558 186796, 142628 187184, 142576 187611, 142845 187901, 142621 188368, 142669 188724, 142641 189099, 142921 189430, 142968 189968, 143357 189637, 143359 188953, 143292 188552, 143367 188157, 143405 187249, 143350 186986, 143385 186202, 143309 185469) (159607 189243, 159635 189500, 159611 189802, 159699 189871, 159995 189839, 159993 189661, 159842 189443, 159946 189026) (163150 188821, 163029 189067, 163085 189330, 163041 189619, 163187 189782, 163372 189755, 163312 189267, 163371 188864, 163354 188747) (44706 188030, 44801 188414, 44776 188712, 44823 188420, 44709 187756) (46278 187978, 46223 188368, 46238 188565, 46328 188422, 46374 187984, 46267 187725) (163224 187312, 162843 187350, 162868 187451, 162822 187849, 162846 188366, 163129 188309, 163330 188171, 163275 187726, 163318 187231) (170841 188301, 171059 188117, 171000 187936, 170864 187788) (44701 187254, 44704 187604, 44799 187315, 44794 186900) (177618 186130, 177419 186565, 177371 186827, 177566 187314, 177526 186963, 177626 186122, 177455 185383) (57537 186474, 57428 187289, 57676 186550, 57495 186090) (53693 186336, 53653 186763, 53757 187140, 53688 186768, 53783 186392, 53780 186140) (161523 186449, 161546 186650, 161453 187000, 161722 186778, 161714 186432) (155590 186345, 155567 186630, 155615 186726, 155593 186809, 155684 186836, 155665 186712, 155779 186336, 155774 186202) (163174 185763, 162816 185810, 162768 186315, 162835 186685, 162819 186817, 163186 186813, 163329 186722, 163305 186168, 163319 185558) (170825 186705, 170949 186486, 170819 186173) (49677 186003, 49801 186269, 49965 186474, 50089 186338, 50017 186210, 49967 185923) (141011 185896, 140982 186084, 141020 186255, 141238 186264, 141191 186028, 141363 185497) (35720 183697, 35761 183560, 35763 183112) (165480 180095, 165380 180532, 165318 180577, 165198 180808, 165227 181148, 165304 181357, 165532 181681, 165380 182066, 165300 182433, 165303 182607, 165411 182912, 165499 182967, 165499 182809, 165419 182487, 165551 181684, 165408 180939, 165535 180053) (44586 182124, 44668 182248, 44714 182500, 44812 182284, 44698 181912) (136162 182001, 136254 182342, 136394 182479, 136409 182156, 136226 181961, 136340 181596, 136348 181416) (23017 180389, 23035 181174, 23015 182369, 23070 182439, 23062 179954) (158220 181360, 158095 181758, 158081 181996, 158182 181825, 158244 181340, 158206 181265) (48339 180080, 48302 180423, 48367 180847, 48454 181017, 48369 180480, 48442 180094, 48437 179871) (44645 180626, 44710 180854, 44769 180714, 44678 180351) (143611 179937, 143294 180644, 143707 180012, 143708 179790, 143545 179764) (136215 179946, 136222 180155, 136352 180125, 136330 179995, 136389 179572) (52087 176988, 52120 177105, 51989 177457, 51913 177837, 52195 178625, 52114 179032, 51970 179350, 51985 179468, 52125 179712, 52147 179036, 52215 178630, 52125 177951, 52177 177477, 52212 176932) (165350 178440, 165421 178611, 165360 178814, 165555 178822, 165564 178245) (143527 178410, 143446 178743, 143709 178566, 143708 178123, 143426 178119) (143314 176484, 143312 176919, 143273 177065, 143271 177467, 143779 177295, 143732 176802, 143779 176492, 143759 176275) (165449 176605, 165350 176927, 165362 177137, 165295 177335, 165552 177366, 165540 177028, 165598 176688, 165582 176489) (39530 176961, 39587 176664, 39471 176107) (165360 175423, 165367 175621, 165475 175920, 165561 175952, 165480 175493, 165484 175278) (143396 175088, 143461 175327, 143437 175544, 143607 175733, 143733 175731, 143643 175022) (44687 174858, 44791 175237, 44731 175686, 44795 175239, 44679 174577) (44657 173310, 44753 173697, 44665 174078, 44676 174456, 44760 174133, 44795 173709, 44677 173137) (137774 171960, 137979 172178, 137837 172568, 137847 172646, 137987 172170, 137969 171792, 137756 171616) (152083 171801, 152018 172261, 152160 171813, 152171 171648) (141575 171563, 141422 171621, 141312 171780, 141426 172007, 141398 172155, 141553 172174, 141529 171980, 141624 171488) (155577 171618, 155554 172044, 155607 172103, 155601 171999, 155724 171646, 155737 171334) (38656 163287, 38350 163400, 38268 163378, 38214 163473, 38392 163932, 38651 164128, 38559 164541, 38566 164927, 38634 165150, 38481 165411, 38551 165706, 38548 166094, 38680 166718, 38544 167003, 38484 167388, 38614 167872, 38472 168053, 38819 168346, 38509 168819, 38496 168933, 38586 169185, 38545 169708, 38744 170692, 38624 171113, 38591 171428, 38632 171886, 38737 172072, 38766 171850, 38716 171476, 38768 170981, 38695 169976, 38805 169650, 38777 169521, 38836 168729, 38818 168003, 38798 167650, 38885 167178, 38793 166109, 38883 165774, 38851 165624, 38867 164959, 38783 164565, 38791 164089, 39089 163621, 39201 163292, 39142 163218) (148457 170801, 148364 171277, 148515 170778) (152025 170266, 151961 170613, 152022 171043, 152183 171199, 152165 170935, 152035 170650, 152141 170287, 152143 170086) (137890 170651, 137818 171074, 138018 170727, 138007 170518, 137831 170353) (44670 170557, 44701 170611, 44697 170908, 44764 170622, 44682 170280) (141487 170053, 141433 170435, 141540 170814, 141610 170872, 141604 170762, 141460 170448, 141599 170075, 141666 169670) (33504 166659, 33479 167051, 33489 167836, 33542 168227, 33477 169012, 33526 169757, 33500 170191, 33495 170754, 33586 170222, 33601 169777, 33520 169045, 33573 168234, 33496 167488, 33579 166681, 33488 166037) (158069 170132, 158053 170419, 158163 170200, 158202 169766) (146912 169728, 146797 170091, 146799 170278, 146914 170230, 146897 170121, 146972 169674, 146846 169438) (34994 168973, 35034 169350, 35021 169930, 35200 169338, 35160 168962, 34994 168630) (151900 164557, 151889 164875, 151832 165136, 151878 165267, 151840 165422, 151898 165649, 151844 166148, 151902 166423, 151893 166626, 151959 166795, 151903 167001, 151923 167192, 151860 167486, 151857 167722, 151925 167968, 152116 168302, 151883 169017, 151897 169249, 151986 169502, 152159 169681, 152198 169278, 152137 169072, 152189 168836, 152144 168682, 152225 168196, 152184 167895, 152219 167640, 152165 167513, 152215 167360, 152180 167122, 152241 166857, 152226 166595, 152157 166352, 151986 166013, 152185 165570, 152240 165350, 152232 164988, 152174 164797, 152246 164401) (148361 169084, 148388 169514, 148645 169642, 148717 169636, 148573 169273, 148715 168922, 148718 168805, 148587 168802) (137804 169125, 137756 169617, 137891 169488, 138019 169237, 138014 169067, 138114 168698, 137718 168623) (159637 169617, 159909 169552, 159834 169288, 159859 169054, 159583 168898) (141864 163286, 141587 163273, 141434 163320, 141183 163482, 141105 163479, 141070 163577, 141299 163903, 141303 164299, 141335 164839, 141380 165044, 141319 165238, 141260 165727, 141271 165965, 141362 166212, 141303 166506, 141355 166601, 141294 166706, 141364 166985, 141325 167469, 141382 167757, 141643 168071, 141443 168461, 141354 168539, 141326 168805, 141359 168925, 141328 169071, 141403 169301, 141671 169583, 141600 169161, 141488 168890, 141609 168589, 141647 168073, 141601 167696, 141664 167433, 141559 167319, 141672 167169, 141607 166919, 141692 166375, 141623 166139, 141639 165873, 141597 165758, 141654 165647, 141649 165357, 141702 165146, 141665 164965, 141685 164782, 141587 164599, 141675 164200, 141560 164218, 141680 164179, 141986 163434, 141962 163164) (41997 168589, 42010 168852, 42379 169053, 42396 168635, 42281 168339) (158040 167732, 158030 167869, 158156 168198, 158071 168666, 158192 168204, 158104 167823, 158172 167658) (155746 167656, 155427 167766, 155425 167837, 155563 168133, 155407 168406, 155414 168621, 155551 168601, 155830 168452, 155754 168080, 155849 167520) (34980 167460, 35015 167798, 34994 168232, 34994 168611, 35142 168191, 35199 167788, 35199 167400, 34983 167077) (136341 167976, 136235 168440, 136272 168415, 136395 167926, 136266 167607, 136301 167483, 136176 167478) (159559 167397, 159593 167804, 159563 168277, 159600 168201, 159869 167997, 159856 167732, 159988 167479, 159988 167239, 159787 167238) (148451 167369, 148331 167555, 148338 168036, 148680 168091, 148758 167600, 148699 167237) (150453 167595, 150416 168031, 150465 168061, 150562 167498) (137720 167181, 137781 167581, 137737 168015, 138125 167876, 138017 167515, 138132 167168, 138130 167057, 137970 167038) (44641 167525, 44666 167766, 44751 167554, 44809 166797) (28173 167388, 28287 167762, 28321 167400, 28282 167017) (158109 166659, 158019 167050, 158033 167165, 158151 167168, 158097 167051, 158179 166598, 158107 166505) (35302 164207, 34992 164324, 34994 164743, 34941 165145, 34961 165914, 35013 166288, 34986 166683, 34983 167070, 35406 166592, 35402 166398, 35253 166222, 35265 166072, 35404 165996, 35409 165759, 34978 165522, 35423 165069, 35405 164691, 35124 164440, 35391 164441, 35401 164207) (155697 166108, 155402 166229, 155496 166601, 155441 166978, 155844 167054, 155765 166527, 155854 165827) (144789 165936, 144779 166343, 144934 166395, 144789 166546, 144820 166813, 144787 166972, 145021 166867, 145160 166432, 145226 165927) (136333 166426, 136208 166864, 136338 166428, 136316 166375) (159548 166669, 159763 166369, 159765 166032, 159568 165981) (148343 166141, 148319 166439, 148470 166341, 148442 166208, 148595 165826) (137689 165654, 137733 166043, 137717 166418, 138113 166365, 138130 166183, 138084 165946, 138126 165705, 138104 165498) (28148 163377, 27772 163478, 27736 163631, 27901 163928, 27982 163952, 28206 164278, 28179 164623, 28275 165014, 28153 165815, 28286 166291, 28326 165859, 28307 165026, 28340 164693, 28289 164255, 28359 163943, 28637 163384, 28281 163301) (43965 163427, 43888 163397, 43474 163474, 43530 163651, 43845 163698, 44003 163622, 44369 163910, 44580 164441, 44569 164752, 44663 165069, 44734 165175, 44678 165539, 44694 165901, 44795 165607, 44844 165192, 44700 164408, 44808 164093, 45024 163839, 45089 163526, 45067 163450, 44834 163209, 44710 163208) (33087 163294, 32745 163421, 33417 164013, 33459 164776, 33449 165486, 33483 165873, 33623 165213, 33504 164376, 33571 164052, 33754 163787, 33831 163511, 33515 163431, 33269 163277) (158037 165129, 158015 165573, 158077 165575, 158054 165512, 158188 165180, 158176 165011, 158006 164722) (136197 164757, 136230 164904, 136135 165253, 136135 165451, 136290 165449, 136287 165276, 136383 164990, 136343 164873, 136358 164680) (150327 164843, 150418 165280, 150545 165402, 150531 165197, 150416 164891, 150467 164544) (146780 165346, 146957 165229, 146918 165076, 146936 164930, 146755 164841) (144826 164480, 144816 164877, 144768 165037, 144806 165332, 145245 165214, 145176 164777, 145201 164398) (42363 164969, 42468 165261, 42485 164622) (139739 164614, 139691 164920, 139786 165092, 139974 165134, 139974 164989, 139873 164681, 139916 164309) (159605 164663, 159603 164750, 160160 163772, 160159 163756) (156939 163901, 156948 163967, 157246 164184, 157084 164515, 157077 164732, 157596 164475, 157252 164174, 157138 163824, 157327 163709, 157466 163347, 157352 163210, 157172 163198) (178576 164017, 178620 164138, 178577 164538, 178633 164718, 178756 164101, 178677 163848) (157727 163649, 157700 163603, 157569 163707, 157943 164225, 158183 164179, 158234 163912, 158345 163842, 158458 163463, 158168 163433) (177401 163625, 177538 164063, 177557 163655, 177477 163564) (42039 163918, 42055 164030, 42506 164026, 42621 163613, 42777 163385, 42417 163441, 42277 163359, 42060 163432, 41705 163291) (37140 163326, 36819 163429, 36717 163382, 36506 163553, 36811 163918, 37250 163858, 37493 163283) (163316 163542, 163302 163913, 163474 163639, 163504 163416) (35027 163889, 35602 163689, 35673 163394, 35366 163435, 35212 163348) (40231 163266, 39875 163405, 40214 163806, 40379 163857, 40774 163756, 40911 163509, 40621 163420, 40445 163248) (134976 163447, 135128 163749, 135237 163626, 135248 163274) (165497 159946, 165290 160753, 165485 161496, 165299 162341, 165570 162971, 165549 162368, 165688 161587, 165497 160857, 165598 159977, 165429 159537) (46189 156962, 46282 156684, 46058 156363) (72014 149212, 72042 149548, 71951 149946, 72015 150332, 71963 150596, 72017 151106, 72010 151507, 72055 151871, 72011 152423, 72025 152655, 72007 153158, 72061 153420, 72028 153629, 72081 154190, 72062 154662, 72106 154959, 72076 155555, 72143 155847, 71960 156492, 72029 156586, 72339 156530, 72632 156752, 72952 156710, 73070 156856, 73230 156588, 73084 155852, 73085 155443, 73012 155097, 73221 154265, 72875 153570, 73079 152753, 72829 152043, 72976 151231, 72700 150590, 72578 150564, 72713 150401, 72916 149697, 72679 149054) (76012 156600, 76214 156766, 76451 156744, 76631 156432, 76435 156222, 76129 156180) (68803 155863, 68667 156289, 68825 156633, 69051 156741, 69393 156562, 69487 156451, 69353 155672, 68812 155616) (65655 154692, 65621 155020, 65858 155120, 65665 155322, 65766 155532, 65413 156017, 65296 156279, 65306 156434, 65628 156668, 65991 156651, 66143 156205, 65918 155949, 65805 155909, 65861 155621, 65843 155512, 65945 155084, 65741 154764, 65916 154326) (67526 154954, 67624 155030, 67182 155806, 67014 156354, 67071 156431, 67696 156584, 67789 156521, 67358 155888, 67706 155072, 67701 154936, 67288 154501) (51234 147818, 51198 148021, 51427 148610, 51053 149132, 51090 149476, 51062 149845, 51514 150136, 50897 150476, 50854 151092, 50903 151466, 50837 151815, 51378 151724, 50837 151926, 50862 152455, 50889 152633, 50891 153313, 51468 153250, 51067 153688, 51213 154095, 50916 154527, 51032 155061, 50908 155143, 50873 155279, 50889 155444, 51349 155609, 51137 156416, 51305 156573, 52008 156222, 52010 156167, 51603 155538, 52019 154821, 52012 154481, 51731 153953, 51623 153275, 51602 153213, 51841 152372, 51578 151653, 51734 150851, 51524 150133, 51750 149296, 51541 148569, 51717 148205, 51724 147752, 51324 147690) (70457 155407, 70600 155759, 70395 155991, 70310 156225, 70362 156418, 70992 156476, 71069 156406, 70945 155889, 70787 155707, 70863 155211) (63732 155747, 63840 156256, 64085 156353, 64012 156014, 64054 155690) (53588 153375, 53471 153818, 53398 153884, 53329 154115, 53343 154451, 53592 154993, 53452 155344, 53375 155440, 53345 155641, 53380 155982, 53496 156183, 53629 156286, 53612 155762, 53683 155501, 53651 155365, 53705 154908, 53575 154222, 53624 153929, 53685 153219) (57235 153680, 57329 153970, 57197 154780, 57257 155153, 57237 155276, 57278 155534, 57257 156222, 57476 156070, 57492 155863, 57576 155657, 57606 155178, 57202 154779, 57396 154397, 57487 154314, 57538 154109, 57502 153922, 57657 153484, 57225 153423) (46263 151562, 46125 152377, 46288 153109, 46147 153921, 46303 154650, 46095 155971, 46482 155780, 46388 155417, 46447 155267, 46401 155026, 46427 154768, 46338 154268, 46234 153909, 46333 153728, 46410 153228, 46357 152713, 46288 152475, 46206 152366, 46272 152227, 46384 151679, 46277 151255, 46307 151176, 46141 150982) (63743 152778, 63749 153373, 63718 154237, 63777 154527, 63678 154929, 63717 155662, 64025 155544, 63882 155274, 64000 154947, 63737 154926, 64026 154757, 63961 154477, 64124 154045, 63807 153743, 64102 153275, 63910 152940, 63997 152536) (68831 154157, 68853 154511, 68935 154665, 68861 154859, 68823 155294, 69159 155148, 69341 154998, 69319 154108) (47717 154277, 47674 155049, 48183 154621, 48172 154277, 48081 154081, 48170 154031, 48167 153688, 47653 153550) (78490 153983, 78372 154126, 78395 154397, 78360 154795, 78784 154793, 78803 154464, 78711 154310, 78765 154059, 78730 153918, 78751 153796) (70710 153740, 70602 153819, 70493 153977, 70538 154225, 70496 154517, 70606 154594, 70854 154635, 70789 154155, 70896 153432) (69037 152560, 68793 152624, 68804 152991, 68882 153129, 68813 153309, 68817 153682, 69123 153612, 69302 153465, 69308 153011, 69360 152780, 69360 152303) (47856 152110, 47679 152215, 47697 152733, 47653 153508, 48209 153128, 48231 152586, 48180 152082) (70408 148868, 70473 149204, 70433 149748, 70471 149979, 70403 150238, 70412 150532, 70473 150754, 70432 150939, 70447 151357, 70512 151519, 70815 151823, 70537 152287, 70444 152994, 70475 153080, 70909 153309, 70908 152701, 70850 152588, 70914 152464, 70888 152191, 70919 151856, 70862 151422, 70886 151112, 70848 151038, 70888 150955, 70941 150187, 70841 149877, 70613 149552, 70820 149217, 70902 148698, 70884 148315, 70408 148189) (78545 152349, 78390 152715, 78335 153158, 78454 153219, 78723 153239, 78716 153033, 78637 152780, 78737 152562, 78736 152177) (57275 149332, 57541 150035, 57325 150858, 57466 151606, 57321 152420, 57232 152783, 57228 152979, 57338 152847, 57646 152732, 57454 152384, 57644 151656, 57633 151471, 57341 150865, 57547 150037, 57329 149297, 57376 149023) (74479 151949, 74536 152354, 74462 152912, 74790 152499, 74761 152292, 74869 151866) (67528 151948, 67377 152363, 67632 152025, 67622 151831, 67466 151766) (68878 149395, 68985 149612, 68912 149828, 68855 150348, 68892 150412, 69342 150676, 69067 151048, 68869 151245, 68918 151567, 68853 151982, 69357 152144, 69325 151675, 69263 151473, 69298 151219, 69347 150675, 69278 150305, 69288 150120, 69216 149935, 69282 149722, 69302 149134, 68856 148700) (53629 151451, 53544 151818, 53547 151994, 53674 152109, 53650 151877, 53734 151510, 53724 151378) (63741 151287, 63764 151429, 63720 151637, 63961 151716, 63874 151426, 63940 151381, 63929 151093) (47904 150608, 47847 150753, 48053 151003, 47733 150994, 47731 151398, 47881 151684, 48153 151552, 48163 151071, 48120 150596) (74517 150581, 74548 150799, 74523 151057, 74841 151108, 74731 150749, 74739 150511) (46255 150027, 46169 150509, 46259 150031, 46203 149654, 46151 149581) (63739 149111, 63881 149848, 63832 150253, 63972 149852, 63811 149478, 64105 149010, 63819 148746) (136812 149201, 136658 149819, 136793 149767, 136888 149605, 137001 149187) (65792 149323, 65714 149689, 65857 149351, 65852 149265, 65771 149181) (74569 149249, 74581 149258, 74769 148808) (72802 146626, 72577 147464, 72045 147978, 72063 148380, 72019 148575, 72012 149123, 72648 148921, 73014 148120, 72586 147462, 73053 146715, 73118 146142) (46124 149076, 46217 148908, 46230 148472) (67273 148777, 67294 149013, 67454 149069, 67414 148879, 67549 148451) (69177 147490, 69198 147615, 69009 148116, 69292 147675, 69294 147483) (70644 147044, 70626 147223, 70455 147463, 70407 147915, 70809 147754, 70848 147162, 70807 147009) (63912 147513, 63860 147762, 64010 147516, 64033 147374, 63872 147325) (179641 143901, 179269 144018, 178732 144497, 178796 144708, 178685 145126, 178868 145464, 178579 145612, 178731 146391, 178677 146679, 178925 146788, 179068 146714, 179193 146150, 179120 145937, 179508 145842, 179438 145472, 179811 145368, 180208 144892, 180234 144458, 180520 144273, 180440 143870, 180023 143838) (72854 144925, 72847 145230, 73096 145356, 73002 145022, 73091 144594) (29369 143801, 29414 144177, 29775 144161, 30074 144289, 29846 144059, 29741 143724) (72836 143128, 72748 143306, 72761 143536, 72673 143972, 73103 143923, 73102 143746, 73004 143469, 73096 143165, 73109 142870) (214087 143097, 213856 143626, 214142 143746, 214285 143897, 214509 143890, 214833 143746, 214531 143156, 214400 143089, 214172 142774) (215788 143249, 215606 143533, 215825 143862, 216001 143875, 216421 143745, 216392 142954) (196122 143060, 196145 143128, 196033 143726, 196105 143863, 196783 143655, 196187 142712) (210363 137606, 210295 138013, 210362 138859, 210273 139830, 210325 140248, 210287 140340, 210324 140717, 210219 141522, 210334 142654, 210280 142925, 210070 143158, 209988 143524, 210048 143550, 210253 143839, 210439 143846, 210806 143687, 210743 143317, 210486 142999, 210474 142615, 210568 141965, 210541 141434, 210531 140661, 210501 139895, 210556 139360, 210468 138353, 210511 138072, 210500 137657, 210380 136798) (208834 133733, 208849 134125, 208130 134105, 207982 134235, 207983 134382, 207914 134623, 207881 135185, 207785 135986, 207808 136755, 207765 137542, 207813 138305, 207766 139099, 207830 139509, 207762 139869, 207857 140231, 207873 141083, 207789 141388, 207860 141782, 207900 142282, 207957 142686, 207938 142922, 207678 143247, 207641 143391, 207955 143694, 208155 143668, 208252 143708, 208532 143593, 208830 143841, 208926 143843, 209133 143756, 208946 142640, 208963 141932, 208922 141491, 208943 141097, 208939 140097, 208805 139584, 208817 139525, 208806 138809, 208814 138770, 208741 137874, 208725 137280, 208732 137201, 208712 136508, 208673 136281, 208810 135706, 208841 134922, 208786 134815, 208878 134320, 208902 133760, 208906 133321) (211852 143319, 211732 143619, 211818 143797, 211917 143805, 212291 143684, 212355 143717, 212455 143459, 212051 143027, 211912 142911) (197247 143463, 197159 143551, 197275 143538, 197655 143804, 197723 143784, 197651 143379) (199039 143036, 198644 143375, 198594 143545, 199089 143798, 199253 143787, 199404 143711, 199403 143324, 199201 142992, 199195 142416) (192401 135137, 192451 135538, 192409 136552, 192478 137081, 192380 137496, 192344 138668, 192357 139440, 192301 140158, 192347 140994, 192303 141696, 192314 142165, 192368 142443, 192337 142935, 192016 143412, 192058 143782, 192445 143739, 192606 143792, 192880 143561, 192771 143139, 192529 142881, 192590 142478, 192582 142237, 192680 142065, 192627 141923, 192722 141196, 192568 140689, 192620 140531, 192578 140352, 192453 140190, 192619 139907, 192677 139620, 192505 139110, 192620 138981, 192362 138664, 192648 138058, 192569 137832, 192596 137577, 192519 136683, 192424 136321, 192569 135506, 192522 135131, 192415 134726) (204464 143160, 204482 143482, 204792 143784, 205070 143709, 205147 143630, 205151 142910) (190046 143400, 189933 143593, 190176 143603, 190456 143770, 190518 143433, 190470 143059, 190180 142766) (193816 143304, 193791 143699, 193977 143679, 194089 143743, 194339 143692, 194615 143473, 193921 143077) (188625 138913, 188485 139340, 188433 139740, 188487 140114, 188696 140444, 188479 140891, 188419 141295, 188461 141671, 188655 142005, 188595 142797, 188421 143108, 188396 143322, 188194 143417, 188161 143692, 188356 143669, 188466 143734, 188716 143686, 188952 143733, 188920 143484, 188806 143127, 188646 142802, 188751 142017, 188688 141291, 188746 140921, 188725 140824, 188717 140110, 188662 139736, 188732 139373, 188717 139275, 188747 138408) (202785 143172, 202878 143534, 203301 143711, 203536 143601, 203671 143310, 202949 142873) (201195 142717, 200890 142760, 201032 143162, 200957 143285, 201088 143286, 201240 143596, 201428 143619, 201616 143697, 201801 143542, 201869 143424, 201795 143055, 201410 142548) (206282 142731, 206250 142949, 206137 143232, 206122 143420, 206313 143632, 206542 143694, 206752 143636, 206870 143402, 206891 143210, 206662 142685) (181212 142495, 181065 142923, 180983 143333, 181147 143519, 181380 143612, 181584 143589, 181727 143345, 181749 143124, 181475 142985, 181236 142489, 181151 142092) (182863 143594, 183201 143612, 183286 143478, 182775 143100) (200234 143484, 200516 143602, 200647 143370, 200257 143328) (184893 142960, 184222 143169, 184102 143139, 184470 143541, 184630 143589, 184988 143082, 185158 143063, 184932 142716) (179573 143332, 179653 143398, 179928 143235, 179932 143101, 179675 142630) (51816 142917, 51852 143065, 51828 143222, 52000 143273, 51971 143033, 52026 142632) (214134 138896, 214126 140401, 214118 140477, 214138 141223, 214090 142012, 214172 142736, 214298 142482, 214369 142160, 214246 141969, 214230 141198, 214185 140435, 214229 139648, 214140 138897, 214165 138119, 214157 138007) (69390 142136, 69233 142635, 69412 142115, 69226 141773) (72913 139495, 72959 139583, 72733 140370, 72739 140512, 73116 141101, 72723 141810, 72733 142185, 73017 142321, 72922 141942, 72970 141825, 73161 141097, 72849 140402, 73175 139699, 73208 139294, 72753 138960) (201355 141206, 201321 141508, 201399 141613, 201362 141977, 201412 142168, 201498 142056, 201536 141667, 201467 141207, 201416 141161) (198788 141158, 198757 141556, 198796 141945, 199199 142075, 199227 141871, 199169 141480, 199205 141092, 199184 140881) (202921 141605, 202964 141185, 202941 141081) (199074 138325, 199190 139117, 199082 139872, 199125 140279, 199179 140431, 199152 139928, 199194 139119, 199156 138740, 199142 138062) (206426 134601, 206427 134809, 206586 135462, 206571 135892, 206431 136168, 206605 137019, 206563 137800, 206576 137868, 206576 138544, 206552 139334, 206683 140304, 206697 140150, 206673 139430, 206723 138652, 206771 138591, 206722 138558, 206655 137873, 206700 137089, 206730 137051, 206698 137032, 206700 136285, 206668 135906, 206697 135544, 206736 135499, 206705 135464, 206729 134764, 206636 134371) (182757 140117, 182978 139890, 182970 139688, 182756 139415) (46050 139560, 46244 139854, 46241 139565, 46121 139382) (72777 137718, 72692 138174, 72813 138483, 72738 138845, 72970 138501, 73088 138408, 73181 138255, 73130 137816, 72994 137658, 72760 137538) (182758 138438, 182931 138316, 182897 138157, 182758 137977) (188636 137310, 188685 137711, 188752 137882, 188755 137737, 188698 137158) (46121 137256, 46077 137283, 46084 137516, 46224 137243, 46194 136964) (210344 135647, 210405 136230, 210462 135641, 210385 135274, 210391 134870) (72906 134969, 72736 135436, 72941 134937, 72764 134691) (74361 134456, 74384 134644, 74477 134648, 74470 134540, 74596 134115) (81455 133200, 81485 133392, 81339 133738, 81316 133962, 81478 133782, 81614 133460, 81630 133195) (70938 133183, 70805 133615, 71002 133220, 71022 133051, 70779 132835) (77847 131676, 77788 131955, 77850 132063, 77837 132269, 77906 132435, 77887 132550, 78169 132097, 78162 131851, 78033 131625, 77812 131490) (81292 131487, 81392 131868, 81389 132130, 81624 132031, 81603 131810, 81657 131454) (70718 131287, 70767 131679, 70750 132085, 71085 131900, 71044 131602, 71079 131244) (74386 131074, 74260 131394, 74268 131595, 74367 131855, 74604 131960, 74588 131629, 74422 131452, 74550 131149, 74551 130893) (77804 130253, 77939 130489, 77817 130784, 77812 131076, 78037 130849, 78132 130586, 78105 130443, 78157 130204, 78076 130062, 77802 130024) (81410 129924, 81311 130059, 81347 130329, 81269 130759, 81676 130674, 81578 130265, 81695 129686) (67444 130264, 67351 130615, 67542 130306, 67569 130084, 67344 129992) (70929 129619, 70760 129920, 70776 130126, 70693 130553, 71090 130462, 71066 130046, 71137 129825, 71099 129649, 71138 129420) (72724 130290, 72720 130466, 72864 130522, 72802 130346, 72915 129980) (74571 129085, 74220 129878, 74223 130039, 74422 130211, 74330 129927, 74637 129110, 74642 129003, 74406 128733) (79869 129183, 79730 129613, 79936 129208, 79941 129100, 79831 129039) (77774 128527, 77877 128955, 77793 129458, 78176 129201, 78123 128887, 78203 128434) (67151 128626, 67245 128768, 67173 128978, 67212 129164, 67177 129363, 67386 129198, 67560 128903, 67538 128483, 67444 128325, 67161 128256) (69288 128983, 69201 129289, 69346 129014, 69360 128877, 69243 128841) (81431 126754, 81150 126887, 81276 127434, 81376 127608, 81664 127916, 81464 128283, 81297 128404, 81253 128508, 81311 128788, 81309 129010, 81413 129149, 81700 129270, 81685 128903, 81604 128707, 81682 128490, 81662 128305, 81768 127937, 81656 127530, 81721 127167, 81598 126772, 81607 126582) (208804 128730, 208921 129178, 208937 128306, 208923 127968) (63990 128884, 63952 129150, 64113 128851, 63954 128684) (71047 127649, 71106 127709, 70819 128176, 70735 128764, 70831 128948, 71126 129085, 71096 128690, 70982 128518, 71111 128334, 71107 128097, 71183 127640, 70808 127105) (74255 125580, 73924 125774, 74301 126447, 74409 126804, 74283 127081, 74184 127651, 74255 128010, 74242 128326, 74529 128031, 74643 127670, 74630 127369, 74527 127158, 74609 126900, 74590 126715, 74858 125845, 74824 125528) (76402 127808, 76269 128267, 76330 128302, 76303 128223, 76481 127840, 76480 127726, 76330 127582) (65665 127994, 65663 128172, 65795 128146, 65782 128006, 65853 127725) (79797 127653, 79770 127860, 79953 127790, 79910 127516, 79752 127456) (77925 127003, 77798 127121, 77819 127420, 77781 127821, 78208 127795, 78237 127505, 78174 127322, 78198 127060, 78158 126885) (67259 125562, 66855 125773, 67081 126243, 67294 126429, 67179 126862, 67244 127218, 67169 127718, 67609 127555, 67622 127420, 67558 127130, 67552 126756, 67434 126777, 67547 126728, 67479 126378, 67675 126237, 67811 125899, 67704 125541) (69195 127624, 69365 127599, 69335 127262, 69160 127259) (63943 127346, 63911 127582, 64034 127383, 64190 127279, 64022 127265, 63912 127201) (72779 126862, 72701 127179, 72871 126906, 72865 126775, 72686 126594) (75992 125549, 75668 125683, 75799 126035, 76147 126328, 76186 126813, 76344 127049, 76463 127062, 76465 126956, 76298 126673, 76510 126432, 76690 125791, 76598 125786, 76470 125622, 76345 125596, 76310 125507) (46081 126428, 46176 126790, 46166 127047, 46379 126947, 46496 126702, 46439 126403, 46153 126355) (70541 125538, 70628 125685, 70609 126055, 70678 126401, 70863 126613, 70776 126992, 70805 127017, 71162 126966, 71169 126845, 71030 126566, 71233 126363, 71390 125689, 70936 125751, 70707 125486) (49675 126499, 49703 126669, 49842 126852, 49872 126552, 49820 126308) (68981 125524, 68651 125668, 68769 126024, 69026 126341, 69205 126680, 69170 126850, 69299 126767, 69277 126660, 69475 126343, 69661 125780, 69593 125776, 69369 125472) (65589 125667, 65253 125812, 65212 125765, 65142 125855, 65215 125900, 65405 126242, 65608 126503, 65578 126680, 65836 126784, 65735 126468, 65953 126284, 66138 125876, 66124 125586) (72563 125677, 72242 125847, 72643 126501, 72945 126299, 73144 125912, 73113 125609, 72943 125584) (77678 125907, 77647 126146, 77696 126374, 77872 126335, 78283 125907, 78337 125728, 77918 125800, 77792 125661) (64671 125560, 64367 125680, 64504 126021, 64818 125824, 64900 125534) (61578 125669, 61661 125862, 61853 126013, 62126 125713, 62132 125518) (57307 125677, 57331 125713, 57818 125704, 57827 125535) (50780 119092, 50641 119591, 50387 119820, 50572 119976, 50753 119874, 51023 119515, 51061 119248, 51035 118923) (52440 110342, 52318 110762, 52658 110283, 52481 110291, 52381 110176) (90492 73880, 90508 74097, 90745 74443, 90898 74412, 91006 74251, 91250 74080, 91317 73938, 90648 73370) (95409 74279, 95803 74309, 96000 74157, 95493 73769) (89095 73380, 89036 73436, 89041 73726, 88737 73881, 88840 74250, 89211 74302, 89346 74254, 89588 74015, 89348 73541, 89359 73292) (101213 71532, 101237 72214, 101296 72603, 101323 73291, 101161 73606, 101101 73936, 101134 74004, 101499 74244, 101612 74263, 101733 74170, 101926 73735, 101714 73229, 101616 72809, 101711 72599, 101678 72155, 101756 72135, 101745 71291, 101226 71130) (92948 73383, 92727 73994, 92893 74248, 93180 74242, 93302 74116, 93081 73553, 93314 73641, 93055 73379, 92931 73057) (96900 73796, 96690 73802, 96952 74201, 97020 74037, 97505 74035, 97612 73826, 97137 73654) (98362 73445, 97755 73851, 97925 74101, 98106 74134, 98210 74086, 98432 73470, 98397 73368) (99658 71587, 99664 72041, 99726 72328, 99707 72423, 99859 73116, 99716 73360, 99566 73417, 99467 73644, 99544 74021, 99650 74082, 100045 74129, 100243 73875, 100126 73509, 99968 73194, 99934 72477, 100006 72364, 100018 72192, 99907 71767, 99985 71590, 99917 71429, 100081 71347, 100079 71161, 99631 70867) (93951 73986, 94226 74112, 94284 73920, 94076 73750) (102889 72361, 102983 73121, 102920 73391, 102831 73543, 102790 73943, 103141 74099, 103377 74057, 103545 73782, 103350 73432, 103069 73103, 102980 72343, 102892 72123) (98110 71878, 98302 72616, 98266 71965, 98116 71143) (90761 71701, 90857 72063, 90827 72078, 90900 72333, 90888 72068, 90955 71667, 90812 71636) (95501 69458, 95481 69538, 95570 70204, 95530 70315, 95579 70560, 95545 70704, 95624 70940, 95723 71065, 95824 71437, 95810 71834, 95894 71964, 95828 71439, 95789 70716, 95801 70659, 95728 69976, 95753 69884, 95722 69623, 95746 69494, 95652 69119, 95502 68753, 95470 68554) (102856 66392, 102874 66939, 102964 67569, 102958 67907, 102886 68094, 102956 68591, 102847 68705, 102839 68908, 103170 69206, 103375 69813, 103364 69213, 103331 68484, 103270 67742, 103310 67551, 103243 67012, 103320 66728, 103311 66326, 103019 66098, 102850 65661) (101279 66021, 101325 66687, 101328 67182, 101446 67817, 101369 67957, 101441 68505, 101282 68592, 101267 69247, 101725 69460, 101797 69595, 101872 69518, 101820 69431, 101714 68364, 101664 67981, 101624 67258, 101656 67131, 101556 66517, 101681 66350, 101653 66245, 101750 66153, 101748 65922, 101289 65615) (99721 65930, 99940 67172, 99889 66588, 99841 65848, 99720 65436) (98163 65632, 98248 66055, 98212 65657, 98113 64989) (98218 59856, 98262 60034, 98199 59533) (97930 57562, 97989 57883, 98264 57538, 98224 57226) (98274 57069, 98352 56767, 98340 56650, 98212 56572)), ((225644 179887, 225630 181166, 225501 181198, 225501 201627, 225491 202402, 225469 202910, 225469 214698, 189190 214698, 189122 214369, 189502 214263, 189441 213910, 189797 213801, 189863 213394, 190234 213290, 190305 212881, 190232 212521, 190597 212416, 190527 212045, 190904 211955, 190968 211543, 191333 211450, 191398 211033, 191769 210930, 191702 210561, 192075 210458, 192010 210090, 192387 209987, 192509 209189, 192779 209101, 192659 208948, 192840 208898, 192807 208707, 193184 208605, 193131 208320, 192997 208265, 192914 208042, 193133 208105, 193491 208130, 193607 207330, 193974 207223, 194033 206825, 194399 206727, 194460 206322, 194830 206217, 194769 205845, 195094 205753, 195088 205710, 195137 205727, 195088 205374, 195460 205270, 195555 204465, 195925 204377, 195870 203991, 196248 203890, 196189 203517, 196562 203414, 196571 202978, 196982 202909, 197032 202509, 196980 202140, 197349 202039, 197301 201665, 197550 201591, 197462 201369, 197687 201403, 197718 201161, 198088 201065, 198164 200648, 198098 200293, 198459 200201, 198419 199815, 198786 199740, 198819 199692, 198820 199339, 198731 199328, 198742 199230, 199210 199075, 199243 198805, 199612 198706, 199570 198329, 199940 198226, 199894 197850, 200267 197748, 200313 197351, 200344 197336, 200361 196961, 200721 196845, 200705 196490, 201051 196387, 201007 195994, 201379 195890, 201419 195494, 201681 195420, 201733 195337, 201797 195323, 201850 195374, 202914 195085, 203286 195013, 203608 195279, 204380 195071, 204758 194997, 205145 195245, 205915 195038, 206292 194965, 206675 195213, 207472 195028, 207513 194984, 207433 194326, 208139 194763, 208187 194751, 208198 194796, 209310 194493, 209652 194785, 210783 194487, 211127 194769, 211887 194564, 211904 194572, 212647 194363, 212663 193969, 213028 193869, 213040 193607, 212897 193507, 212880 193203, 213194 193427, 213421 193366, 213402 192984, 213778 192883, 213784 192115, 214174 191995, 214180 191626, 214532 191562, 214522 191129, 214893 191026, 214877 190640, 215252 190538, 215271 190150, 215642 190045, 215655 189653, 215771 189619, 215781 189353, 216031 189376, 216044 189162, 216112 189138, 216050 188786, 216008 188778, 216004 188689, 216072 188762, 216421 188730, 216428 188669, 216798 188563, 216789 188184, 217163 188081, 217146 187723, 217067 187713, 217038 187607, 217146 187610, 217311 187424, 217524 187367, 217531 187200, 217904 187096, 217905 186326, 218274 186231, 218267 185837, 218640 185733, 218649 185345, 219023 185239, 219029 184851, 219401 184748, 219396 183984, 219761 183882, 219768 183486, 220141 183382, 220142 183149, 220015 183028, 219880 182796, 220142 182801, 220210 182976, 220523 182895, 220515 182507, 220895 182408, 220888 182020, 221261 181916, 221267 181139, 221642 181032, 221644 180654, 222008 180546, 222009 180160, 222387 180058, 222385 179669, 222756 179566)), ((188743 194702, 188639 195415, 187979 195596, 187463 195051, 187300 194412, 187962 194231)), ((191618 194689, 191729 195343, 191069 195524, 190334 195040, 190395 194339, 191054 194158)), ((185622 194782, 185772 195404, 185067 194934, 185117 194659, 185378 194526)), ((202513 194804, 202501 195148, 202174 195210, 201897 194972, 201465 194406, 202129 194224)), ((205441 194777, 205470 195090, 205161 195195, 204822 194945, 204525 194343, 205184 194161)), ((115949 193379, 115652 193181, 115715 193005, 116038 192923)), ((116700 192741, 116596 193015, 116359 193081, 116203 192877, 116394 192683, 116521 192667)), ((77515 185401, 77725 185593, 77537 185918, 77288 185961, 76960 185801, 77113 185262)), ((222757 179018, 222796 179176, 222834 179180, 222757 179400, 222524 179239, 222523 178999)), ((126075 177767, 125917 178099, 125649 178316, 125278 178528, 125164 178494, 125215 178384, 125585 178287, 125820 177765)), ((22835 173891, 22683 174001, 22336 173940, 22684 173657)), ((23062 172597, 23098 172656, 23435 172783, 23506 173007, 23433 173045, 23083 173072, 23138 173420, 23058 173608, 22788 173515, 22816 173257, 22943 173086, 22915 172943, 22945 172697, 22921 172558)), ((24493 172273, 23903 172529, 23686 172494, 23808 172066)), ((24475 170728, 24357 171043, 24352 171329, 23809 171154, 23712 170835, 23808 170583)), ((131176 170166, 130997 170524, 130804 170766, 130591 170824, 130405 170764, 130636 170654, 130806 170268, 130873 170243, 130909 170143)), ((87703 170065, 87660 170256, 87487 170304, 87320 169991, 87664 169896)), ((131726 168823, 131426 168980, 131353 168974, 131586 168499, 131745 168460)), ((91043 165273, 90853 165457, 90718 165509, 90523 165236, 90869 165141)), ((22740 165058, 22708 165423, 22614 165405, 22458 165000, 22685 164907)), ((152546 163146, 152437 163506, 152211 163429, 152010 163292, 152388 163115)), ((23180 162555, 23054 162803, 22692 162698, 22885 163023, 22753 163130, 22685 163270, 22142 163084, 22674 162691, 22697 162314, 23054 162234)), ((206641 162618, 206796 162618, 206808 162777, 206650 162820, 206360 162428)), ((30210 162566, 30322 162719, 29848 162664, 29897 162422, 30111 162273)), ((30545 162087, 30625 162207, 30181 162185, 30267 161930, 30497 161755)), ((31148 161146, 30929 161241, 30951 161675, 30542 161699, 30589 161371, 30882 160992)), ((31592 160378, 31742 160596, 31624 160760, 31258 160726, 31138 160372, 31214 160276)), ((32017 159366, 31997 159750, 32042 159807, 31822 159797, 31884 159673, 31940 159378, 32014 159263, 32380 159258)), ((32534 158827, 32462 158906, 32382 159256, 32162 158929, 32434 158544)), ((152430 153099, 152546 153564, 152446 153974, 152343 154012, 152176 154193, 151922 154317, 151807 154302, 151802 154433, 151495 154905, 151309 155116, 150914 155802, 150871 155804, 150870 155851, 150646 156077, 150562 156324, 150073 157020, 149641 157496, 149567 157759, 149356 158130, 149274 158138, 149254 158232, 149011 158461, 148837 158735, 148458 159215, 148556 158811, 148724 158379, 148883 158222, 148958 157926, 149103 157735, 149316 157655, 149359 157429, 149737 156738, 150003 156403, 150135 156024, 150417 155818, 150505 155564, 150599 155434, 150859 154975, 151128 154586, 151413 154383, 151556 154020, 151815 153788, 151902 153242, 151911 152990, 152256 152794)), ((209437 158793, 209460 159173, 209128 158877, 209263 158588)), ((83131 157752, 82774 158528, 82105 158742, 81770 158123, 82047 157317, 82720 157208)), ((33547 157387, 33627 157494, 33315 157450, 33355 157287, 33511 157131)), ((39116 145521, 39364 145607, 39465 145590, 39635 145639, 39593 145824, 39925 146523, 40177 146819, 40363 146603, 40306 146231, 40480 145992, 40628 146143, 40835 146156, 41032 146419, 41083 146572, 40564 146585, 40726 146890, 40702 147036, 40562 147117, 40287 147099, 40358 147379, 40157 147822, 40193 147892, 40111 147893, 39957 148076, 39861 148291, 39896 148368, 39807 148367, 39593 148514, 39544 148835, 39480 148838, 39246 149007, 39189 149406, 39031 149520, 38731 149427, 38695 149473, 38370 148754, 38200 147828, 38271 147564, 38208 147453, 38235 147390, 38584 147478, 38709 147555, 38773 147426, 38757 147127, 38603 146698, 38544 146326, 38576 145772, 38732 145464)), ((43859 142156, 43963 142503, 43646 142341, 43370 142289, 43457 141959)), ((44171 141682, 44007 141948, 43683 141581, 43880 141391)), ((24416 45497, 24693 45678, 25200 45679, 25466 45668, 25974 45669, 26239 45658, 26747 45659, 27020 45680, 27527 45681, 27792 45669, 28300 45670, 28566 45658, 29073 45659, 29338 45646, 29845 45647, 30119 45671, 30626 45672, 30892 45658, 31399 45659, 31664 45644, 32172 45645, 32446 45673, 32953 45674, 33218 45658, 33725 45659, 33989 45642, 34497 45643, 34773 45678, 35280 45679, 35544 45658, 36051 45659, 36315 45638, 36822 45639, 37086 45618, 37593 45619, 37870 45658, 38377 45659, 38639 45631, 39147 45632, 39409 45604, 39917 45605, 40196 45658, 40703 45658, 40963 45619, 41730 45617, 42226 45683, 42524 45767, 42787 45684, 43283 45687, 43545 45602, 44533 45603, 44832 45795, 59563 45794, 59688 45676, 60180 45673, 60322 45630, 60554 45847, 60716 46268, 60907 46296, 61682 46292, 61904 46485, 62076 46292, 63233 46292, 63455 46488, 67332 46486, 67504 46292, 68660 46292, 68883 46489, 69658 46488, 70039 46678, 78962 46675, 79133 46472, 79903 46483, 80127 48386, 80383 48432, 80159 48711, 80166 48815, 79153 49961, 79190 50343, 78293 51384, 78522 51502, 78206 51657, 78225 51863, 77930 52172, 78046 52480, 78186 52613, 77967 52832, 77830 52716, 77559 52668, 77515 52628, 76871 53397, 76911 53776, 76580 54130, 76297 54514, 76422 54717, 76353 54952, 75925 55085, 75942 55355, 75261 56022, 75284 56139, 75631 56439, 75354 56695, 75182 56552, 74638 57171, 74637 57198, 74304 57591, 73293 58838, 73343 59217, 73068 59463, 73003 59568, 73039 59902, 72696 60203, 72359 60608, 71013 62293, 71062 62667, 70726 63087, 70378 63374, 70424 63748, 70078 64026, 69343 64944, 69460 65598, 69208 65831, 68818 66330, 68532 66440, 68117 66973, 68167 67352, 67460 67858, 67504 68234, 67291 68267, 67356 68464, 67153 68491, 67216 69045, 66837 69105, 66881 69479, 66510 69535, 66538 69906, 66176 69964, 65816 70214, 65862 70591, 65510 70828, 65553 71203, 65254 71251, 65281 71726, 65668 72320, 64891 72061, 64935 72458, 64607 72515, 64612 72559, 64564 72547, 64598 72895, 64228 72956, 64272 73342, 63897 73399, 63944 73789, 63565 73847, 63609 74236, 63165 74504, 63485 74913, 62921 74883, 62936 75038, 62560 75104, 62624 75596, 62911 75825, 62944 76077, 62690 76122, 62461 76069, 62300 76096, 62320 76311, 61948 76379, 61984 76755, 61615 76819, 61663 77214, 61464 77254, 61486 77432, 61304 77417, 61330 77666, 60940 77749, 60997 78122, 60812 78228, 60856 78585, 61066 78879, 60326 78884, 60370 79264, 59992 79337, 60033 79627, 60176 79697, 60192 79828, 60061 79854, 59948 79740, 59662 79792, 59710 80174, 59417 80237, 59426 80317, 59344 80316, 59380 80631, 59006 80706, 59051 81093, 58935 81120, 58967 81381, 58707 81408, 58722 81553, 58336 81640, 58391 82016, 58246 82090, 58251 82304, 58053 82367, 58069 82570, 57710 82723, 57757 83119, 57543 83168, 57563 83329, 57396 83309, 57426 83580, 57212 83632, 57509 84009, 57085 83905, 57100 84046, 56906 84091, 56905 84257, 56745 84291, 56771 84511, 56557 84561, 56757 84851, 56409 84700, 56434 84976, 56076 85132, 56109 85511, 55749 85672, 55804 86049, 55424 86133, 55470 86511, 55094 86599, 55145 86982, 54763 87067, 54814 87449, 54438 87539, 54486 87922, 54111 88013, 54155 88392, 53782 88487, 53829 88871, 53459 89006, 53510 89393, 53137 89521, 53187 89903, 52802 89990, 52859 90376, 52703 90419, 52710 90624, 52515 90692, 52533 90854, 52151 90944, 52201 91272, 52306 91308, 52250 91667, 52034 91376, 51831 91427, 51879 91810, 51495 91900, 51551 92263, 51626 92274, 51566 92388, 51440 92321, 51177 92388, 51224 92772, 50962 92858, 50975 92967, 51310 93535, 50936 93537, 50649 93353, 50528 93387, 50577 93769, 50267 93859, 50165 94288, 50128 94307, 49991 94714, 49647 94794, 49270 95699, 48904 95815, 48694 96638, 48743 97052, 48853 97371, 48734 97692, 48458 97769, 48332 97513, 48248 97434, 48196 97549, 47810 97630, 47535 98478, 47611 98487, 47576 98586, 47522 98510, 47124 98568, 46867 99452, 46666 99899, 46336 99929, 46100 100429, 46451 100333, 46537 100189, 46563 100324, 46492 100589, 46239 100659, 46047 100588, 45956 100874, 45560 100944, 45274 101782, 45602 101736, 45688 101585, 45774 101826, 45571 101825, 45016 102298, 44728 102233, 44593 102414, 44398 103233, 44170 103691, 43893 103620, 43786 103749, 43552 104250, 43393 104889, 43475 105047, 43290 105457, 43260 105105, 42999 105123, 42516 105998, 42898 105981, 42778 106445, 42451 106217, 42462 106099, 42175 106075, 42048 106213, 41901 107029, 41647 107479, 41328 107496, 41263 107547, 40991 108053, 40938 108396, 41320 108589, 40870 108695, 40821 108864, 40461 108966, 40166 109442, 39916 109898, 39829 110305, 39431 110378, 39382 110798, 39549 110775, 39417 110972, 39457 111172, 39104 111284, 39169 111630, 38792 111757, 38588 111998, 38485 112383, 38346 112377, 38285 112664, 37909 112761, 37845 113179, 37734 113547, 37423 113581, 37397 113690, 37482 114047, 37105 114157, 37190 114514, 37029 114567, 37004 114799, 36791 114846, 36754 115023, 36402 115058, 36360 115100, 36322 115532, 35926 115607, 36030 116002, 35610 116075, 35729 116457, 35880 116433, 35978 116715, 35708 116634, 35719 116476, 35304 116542, 35299 116972, 35376 116958, 35363 117042, 35287 117063, 35230 117373, 34881 117419, 34856 117488, 34934 117850, 34546 117940, 34628 118322, 34232 118411, 34196 118820, 33802 118904, 33785 119312, 33929 119293, 33978 119588, 34239 119951, 33966 119909, 33504 120034, 33504 120164, 33090 120298, 33318 120877, 32753 120620, 32685 121180, 32362 121273, 32332 121391, 32369 121657, 31958 121737, 32041 122132, 31617 122202, 31633 122600, 31865 122572, 31839 122824, 31605 122889, 31559 123007, 31223 123099, 31217 123135, 30926 123216, 31072 123565, 31093 123746, 30912 123795, 30926 123985, 30558 124091, 30513 124480, 30154 124540, 30114 124986, 29712 125062, 29777 125465, 29366 125541, 29439 125946, 29018 126018, 29002 126835, 28643 126893, 28609 127338, 28206 127410, 28214 127831, 27819 127911, 27875 128275, 28093 128258, 28109 128478, 27946 128686, 27937 129141, 27518 129029, 27487 129175, 27139 129261, 27110 129681, 26752 129730, 26720 129765, 26763 130166, 26373 130253, 26413 130652, 26000 130726, 26028 131148, 25959 131496, 25646 131601, 25652 132019, 25406 132095, 25410 132217, 25290 132235, 25292 132505, 24925 132562, 24912 133001, 24503 133074, 24535 133496, 24127 133567, 24169 133977, 23759 134053, 23800 134466, 23409 134555, 23407 135337, 23055 135414, 23048 135448, 21448 135412, 21466 134830, 21477 133090, 21471 132505, 21483 127274, 21477 126689, 20543 126499, 20554 125724, 20740 125475, 20742 123147, 20552 123002, 20549 121848, 20739 121598, 20551 121452, 20549 120297, 20739 120048, 20551 119901, 20549 118747, 20739 118497, 20551 118351, 20549 117196, 20738 116947, 20742 113068, 20552 112923, 20549 111769, 20741 111519, 20551 111373, 20549 110219, 20739 109969, 20551 109823, 20549 108668, 20739 108419, 20551 108272, 20546 106531, 20263 106323, 20289 105938, 19975 105771, 19971 105529, 19902 105384, 19903 104888, 20107 104860, 20043 104711, 20055 104570, 20058 103937, 20048 103797, 20057 103019, 20053 101752, 19921 101506, 19914 101119, 20734 100873, 20732 80715, 20725 78390, 20733 77861, 20683 77391, 20673 74375, 20791 74122, 20766 73599, 20920 73346, 20888 72825, 20780 72572, 20826 72049, 20943 71796, 21012 71314, 21026 70499, 21067 69857, 21108 68560, 21174 68195, 21159 67397, 20693 67144, 20633 66757, 20627 65980, 20612 65460, 20611 64297, 20643 63656, 20651 62880, 20644 62747, 20643 61329, 20626 60556, 20633 60033, 20616 59647, 20612 59006, 20626 58617, 20635 57452, 20621 56933, 20637 56543, 20635 55902, 20623 55771, 20605 55130, 20613 54993, 20488 53580, 20498 53443, 20502 52802, 20483 52673, 20484 52032, 20495 51895, 20488 51253, 20464 51125, 20462 50484, 20438 50222, 20439 49193, 20980 48996, 20972 48796, 21054 48617, 22249 48387, 22365 48176, 22528 47991, 22803 46284, 23023 45522, 23179 45567, 23686 45577, 23908 45496) (27459 128386, 27528 128768, 27898 128695, 27847 128326)), ((46309 131406, 46100 132193, 45817 132066, 45755 131944, 45798 131545, 45735 131174, 46083 130719)), ((46265 129867, 46083 130664, 45720 130403, 45769 130003, 45853 129772, 46158 129536)), ((54828 117709, 54891 117423, 55016 117220)), ((56066 115552, 56016 115584, 55910 115981, 55820 116114, 55765 116020, 55985 115528, 56047 115473)), ((59963 111769, 59714 112290, 59647 112321, 59601 112256, 59642 112169, 59706 111568, 59949 111540)), ((62416 108104, 62244 108298, 62197 108054, 62278 107868, 62506 107656)), ((57993 100763, 57795 101073, 57770 100618, 58007 100553)), ((49407 98770, 49043 99607, 48336 99801, 48010 99151, 48287 98338, 48992 98144)), ((53524 90588, 53555 90831, 53318 90908, 53153 90576, 53273 90546)), ((56329 85838, 56370 86162, 55836 86037, 56054 85835)), ((222336 47944, 222395 48012, 222777 48153, 222736 48544, 222779 49314, 222736 49687, 222806 51559, 222701 52375, 222699 53594, 222734 53973, 222663 54767, 222651 55437, 222681 55925, 222655 56215, 222654 57483, 222627 58132, 222624 58654, 222568 59144, 222623 59817, 222677 60190, 222569 60413, 222370 60649, 222312 61066, 222756 61068, 223426 61317, 223377 61372, 222756 61414, 222007 61657, 221730 61613, 221633 61475, 221483 61525, 221260 61479, 221073 61600, 220593 61536, 220524 61179, 220568 61156, 220425 61014, 220480 61180, 220318 61410, 220141 61322, 219901 61479, 219414 61586, 219414 49194, 217175 49194, 217219 49066, 217149 48897, 217135 48627, 217222 48422, 217177 48323, 217350 48304, 218065 47960, 218125 47964, 218516 48221, 218898 48295, 219284 48120, 219664 47874, 220022 48066, 220456 48162, 220840 48174, 221181 48040, 221560 47983, 221979 47772)), ((86963 56778, 86303 57198, 86321 57587, 85769 57802, 85799 57221, 86214 56722, 86685 56693)), ((174552 46418, 188121 46412, 188256 46418, 191222 46411, 191357 46418, 194323 46409, 194458 46417, 197425 46407, 197560 46416, 199751 46409, 199886 46418, 201049 46413, 201302 46688, 201824 46740, 202094 46910, 202987 46913, 204017 46885, 204149 46822, 206044 46809, 206360 46660, 206474 46659, 206748 46390, 206861 46384, 207135 46236, 207249 46235, 207522 46465, 207636 46459, 207910 46560, 208023 46555, 208243 46722, 208436 48071, 208472 48065, 208520 48292, 209213 47870, 209605 48229, 209954 48401, 209935 48462, 210024 48635, 210019 48398, 210342 48113, 210415 48115, 210759 47945, 211151 48229, 211538 48432, 211577 48654, 211555 48434, 212313 47984, 212701 48021, 213120 48192, 213452 48383, 213454 48696, 213563 48746, 213515 48380, 213863 48181, 214304 47874, 214692 48624, 214728 48633, 215442 48174, 215865 47811, 216185 47831, 216603 48152, 216919 48328, 216984 48875, 216970 49194, 167425 49194, 168129 48436, 168490 46070, 168738 45582, 168888 45717, 170945 45706, 171214 45716, 174047 45702, 174299 45581))) \ No newline at end of file diff --git a/stress_benchmark/resources/016.settings b/stress_benchmark/resources/016.settings new file mode 100644 index 0000000000..63a8d5a7f4 --- /dev/null +++ b/stress_benchmark/resources/016.settings @@ -0,0 +1,627 @@ +material_bed_temperature=50 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=10 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=4 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.8 +raft_acceleration=500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=200 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=5 +material_break_temperature=50 +acceleration_support_interface=500 +adhesion_extruder_nr=0 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=2.4000240002400024 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=500 +speed_travel=150.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=50 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=45 +retraction_amount=5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=25.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=50 +speed_ironing=16.666666666666668 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=500 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.4 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=500 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.8 +speed_wall=25.0 +bottom_thickness=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5 +raft_margin=5 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +brim_gap=0 +acceleration_support_infill=500 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=18.75 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=8 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150.0 +acceleration_topbottom=500 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=50.0 +skin_overlap=10.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +support_interface_height=0.8 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=25.0 +material_print_temperature_layer_0=200 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=2.0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=500 +interlocking_orientation=22.5 +speed_wall_0_roofing=25.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=10 +infill_line_distance=12.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=30.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=45 +raft_base_speed=18.75 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=12.5 +skirt_brim_material_flow=100 +acceleration_support_roof=500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=250 +prime_tower_base_size=5 +infill_enable_travel_optimization=False +speed_support_infill=25.0 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.5 +jerk_wall_0=8 +mold_angle=40 +raft_speed=25.0 +prime_tower_wipe_enabled=True +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=500 +cool_min_temperature=200 +jerk_layer_0=8 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=False +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=10 +support_join_distance=2.0 +wipe_hop_amount=0.5 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=235 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +material_standby_temperature=180 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +material_final_print_temperature=200 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=off +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=12.5 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=12.5 +lightning_infill_straightening_angle=40 +speed_topbottom=25.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=20.0 +machine_max_jerk_z=0.4 +support_tree_angle=45 +expand_skins_expand_distance=0.8 +prime_tower_position_y=208.575 +mesh_position_x=0 +cross_infill_pocket_size=12.0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.2 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=500 +minimum_support_area=2 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=8 +adhesion_type=raft +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=30 +z_seam_x=117.5 +acceleration_travel=500 +ironing_enabled=True +support_bottom_material_flow=100 +acceleration_wall=500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.04 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=500 +retraction_hop_enabled=True +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=228.575 +bridge_wall_min_length=1 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.0 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=cubic +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=500 +material_end_of_filament_purge_length=20 +speed_print=50.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=100 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=10 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +raft_jerk=8 +speed_support=25.0 +jerk_support_interface=8 +minimum_roof_area=10 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=50 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=500 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=25.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +support_bottom_pattern=grid +support_roof_height=0.8 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=10 +support_fan_enable=False +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=True +retraction_min_travel=1.5 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=2.4000240002400024 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=500 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=12.5 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=8 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=3 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=100.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=500 +alternate_carve_order=True +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.6000000000000001 +machine_extruders_share_nozzle=False +acceleration_prime_tower=500 +retraction_hop_after_extruder_switch_height=0.5 +skirt_gap=10.0 +wall_0_material_flow_roofing=100 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=0 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=200 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=25.0 +time=09:29:32 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=8 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=25.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=25.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.1 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=25.0 +material_bed_temp_wait=True +machine_depth=235 +bridge_wall_material_flow=50 +jerk_travel=8 +retraction_speed=45 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=235 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=25.0 +material_name=empty +acceleration_wall_0=500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/016.wkt b/stress_benchmark/resources/016.wkt new file mode 100644 index 0000000000..65562fdd98 --- /dev/null +++ b/stress_benchmark/resources/016.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((147289 101492, 147197 101776, 147218 102093, 147259 102076, 147389 102138, 147398 102467, 147648 102288, 147623 102181, 148137 102295, 148172 102346, 148465 102254, 148577 102197, 148901 102061, 149036 102086, 149463 102125, 149272 102163, 148937 102366, 148938 102449, 149117 102596, 149219 102465, 149345 102594, 149476 102549, 149777 102548, 149863 102511, 150134 102496, 150233 102538, 150557 102570, 150547 102600, 150750 102934, 150801 102912, 151257 103199, 151451 103115, 151457 102826, 151757 102643, 152047 102912, 152261 103054, 152386 103243, 152530 103190, 152880 103207, 153247 103211, 154056 103406, 154393 103447, 154973 103599, 155060 103545, 155100 103604, 155982 103648, 156531 103905, 156918 103881, 157384 103888, 157677 103949, 157902 103873, 158295 103870, 158377 103782, 158054 103621, 158326 103620, 158921 103328, 158926 103578, 159080 103506, 159208 103335, 159407 103114, 159605 103018, 160226 102526, 160454 102824, 160833 102936, 161042 102897, 161218 103011, 161202 103295, 161303 103361, 162081 103119, 162153 102960, 162231 103020, 162468 102787, 162676 102742, 162742 102646, 162776 102466, 162854 102390, 162962 102559, 163249 102661, 163345 102847, 163504 102878, 163575 102980, 163720 102792, 164156 102649, 164176 102627, 164599 102346, 165092 102152, 165205 102150, 165383 102040, 165411 101809, 165746 101644, 165778 101795, 165696 102013, 165720 102318, 165786 102277, 166045 102366, 166018 102482, 166117 102372, 166544 102347, 166785 102276, 167055 102137, 167095 102097, 167417 101900, 167985 101878, 167815 101926, 167483 102191, 167483 102296, 167637 102372, 167713 102283, 167818 102353, 167973 102293, 168276 102247, 168355 102202, 168634 102137, 168729 102164, 169044 102134, 169038 102172, 169224 102475, 169279 102434, 169730 102645, 169936 102500, 169916 102187, 170186 101926, 170336 101993, 170532 102185, 170689 102264, 170892 102592, 170596 102599, 170492 102690, 170436 102843, 170787 103124, 170795 103080, 171025 103006, 171096 103077, 171105 103274, 171006 103584, 171207 103683, 171275 103662, 171241 103706, 171403 103852, 171735 103762, 171903 103865, 171927 103976, 171705 104095, 171743 104184, 172213 104283, 172262 104237, 172156 103914, 172619 103682, 172830 103639, 172900 103529, 173094 103391, 173509 103035, 173525 103033, 173757 102815, 173949 102709, 174009 102739, 173927 103058, 173943 103287, 173660 103472, 173661 103525, 173920 103551, 174155 103396, 174209 103301, 174318 103340, 174376 103452, 174456 103374, 174621 103431, 174679 103247, 174853 103089, 175105 103011, 175263 102982, 175356 102906, 175714 102690, 175405 102553, 175611 102412, 176108 102435, 176166 102572, 176510 102732, 176632 102730, 176986 102606, 177088 102927, 177133 102959, 177479 102784, 177730 102912, 178167 103227, 178270 103212, 178415 103103, 178539 103533, 178699 103628, 178735 103533, 178909 103540, 179152 103666, 179293 103595, 179307 103474, 179240 103402, 179321 103154, 179015 102954, 179038 102804, 179405 102930, 179596 103044, 179720 103036, 179802 103097, 180130 102994, 180399 102953, 180492 102849, 180553 102866, 180918 103314, 181124 103658, 181476 103909, 181365 103996, 181444 104116, 181416 104349, 181196 104523, 181401 104621, 181087 104844, 181307 105052, 181639 105108, 181766 104929, 181781 104659, 181904 104457, 182004 104371, 181932 104386, 181860 104168, 181689 104083, 181716 104147, 181611 104066, 181633 104042, 181561 103645, 181772 103522, 182052 103455, 182231 103334, 182687 103358, 182810 103445, 182509 103884, 182265 104017, 182458 104020, 182604 104079, 182724 103953, 182909 103883, 183029 103627, 183041 103537, 182807 103418, 183104 103015, 183072 102882, 183095 102773, 183434 102398, 183774 102329, 184013 102268, 184150 102313, 183900 102554, 183714 102959, 184390 102785, 184555 102987, 184729 103061, 184795 103005, 184985 103022, 185172 102952, 185044 102843, 185017 102948, 184776 102837, 184878 102638, 184946 102590, 185175 102594, 185526 102578, 185595 102639, 185644 102816, 185402 102978, 185495 103165, 185364 103320, 185415 103356, 185993 103497, 186163 103449, 186612 103530, 186680 103465, 186766 103478, 186777 103584, 187095 103697, 187163 103665, 187066 103457, 186900 103293, 186898 102946, 187172 103041, 187449 103056, 187568 103029, 187841 103144, 187874 103185, 188271 103377, 188289 103270, 188431 103097, 188494 103281, 188577 103346, 188718 103324, 188798 103355, 188824 103659, 188957 104299, 188699 104528, 188627 104557, 188605 104774, 188682 104938, 188386 105092, 188546 105183, 188772 105026, 188991 104966, 188852 105161, 188506 105245, 188520 105468, 188639 105778, 188726 105719, 188976 105697, 188978 105558, 189162 105369, 189126 105211, 189352 105060, 189442 105105, 189423 105158, 189636 105486, 189980 105363, 190089 105603, 190257 105596, 190431 105473, 190635 105410, 190804 105487, 190925 105394, 191167 105346, 191407 105385, 191426 105475, 191362 105505, 191270 105644, 191419 105725, 191378 106026, 191441 106239, 191247 106397, 191280 106566, 191357 106635, 191712 106619, 191707 106824, 191589 107117, 191591 107166, 191438 107518, 191486 107489, 191842 107548, 191945 107386, 192289 107018, 192412 106980, 192617 107052, 192768 107194, 192617 107366, 192273 107654, 192528 107597, 192618 107650, 192457 108077, 192327 108078, 192227 108154, 192315 108527, 192460 108725, 192530 108695, 192654 108509, 192824 108653, 192991 108649, 193128 108723, 193342 109074, 193377 109066, 193385 108738, 193412 108477, 193256 108025, 193338 107868, 193523 107742, 193774 108134, 193856 108785, 193928 109098, 193921 109623, 194041 109726, 194014 109968, 194186 109989, 194145 110534, 193970 110609, 193981 111037, 194090 111179, 194208 111406, 194186 111772, 194114 112237, 194141 112431, 193957 112520, 193762 112515, 193785 112803, 193721 112792, 193983 113062, 194376 113386, 194193 113681, 193803 114209, 193782 114331, 193977 114716, 194075 114877, 194258 115254, 194301 115516, 194336 115853, 194190 116248, 193808 116627, 193635 116898, 193616 117188, 193733 117256, 193797 117473, 193881 118035, 194031 118525, 194060 118432, 194108 118157, 194177 118380, 194186 118880, 194156 119052, 194084 119101, 194031 119307, 194017 119558, 194088 120051, 193901 120195, 193881 120255, 193983 120694, 193859 121226, 193808 121271, 193746 121535, 193908 121772, 193921 121907, 194002 121948, 194003 122292, 193919 122553, 193960 122713, 193902 123111, 193803 123527, 193912 124308, 193949 124428, 193696 124892, 193504 125134, 193367 125613, 193270 125520, 193126 125503, 193027 125235, 192970 125483, 192847 125120, 192753 125333, 192676 125797, 192772 125873, 193218 125870, 193261 125628, 193254 125811, 193502 125640, 193600 125861, 193876 125817, 193818 126110, 193718 126306, 193601 126318, 193680 126631, 193663 126855, 193715 126921, 193657 126955, 193649 127144, 193583 127153, 193513 127044, 193313 127280, 193067 127163, 193090 127406, 193269 127607, 193200 127699, 193042 127467, 192830 127658, 192849 127794, 192802 127831, 192756 127762, 192702 127763, 192870 128032, 192668 128408, 192444 128240, 192358 128149, 192245 128156, 192101 128238, 192095 128495, 192108 128781, 192122 128882, 192138 129206, 192122 129242, 192129 129802, 192277 130104, 191858 130546, 191556 130801, 191602 130860, 191494 131002, 191565 131169, 191466 131164, 191423 131224, 191143 131156, 191069 131173, 190979 131391, 191008 131524, 190728 131683, 190703 131723, 191109 131900, 190786 132216, 190699 132356, 190197 132439, 190033 132391, 189869 132499, 189476 132278, 189146 132444, 188863 132755, 188988 132913, 188790 133104, 188982 133184, 189187 133074, 189508 133076, 189871 133116, 190198 133123, 190478 133381, 190250 133530, 190102 133558, 189825 133438, 189535 133412, 189184 133729, 189013 133705, 188688 133186, 188417 133400, 188466 133800, 188343 133827, 188191 134088, 188443 133966, 188634 134119, 188473 134253, 188554 134441, 188748 134657, 188561 134858, 188196 134878, 188048 134714, 187913 134768, 187564 134617, 187037 134670, 186970 134843, 186426 134944, 186325 135023, 185814 134980, 185359 135030, 184937 135137, 184614 135285, 184509 135270, 184229 135295, 184054 135332, 183574 135274, 183031 135044, 182917 135076, 182745 135040, 182557 135142, 182388 135164, 182322 135235, 182611 135504, 182447 135467, 182050 135620, 182111 135323, 182091 135263, 181968 135321, 181618 135392, 181390 135620, 181116 135809, 180936 135876, 180546 136059, 180255 135599, 180163 135526, 179859 135421, 179759 135446, 179567 135417, 179486 135360, 179526 134997, 179438 134867, 179239 134691, 179081 134606, 178876 134648, 178566 134828, 178248 135146, 178103 135168, 178055 135464, 177807 135658, 177624 135329, 177652 135295, 177531 135243, 177372 135070, 177298 134846, 177067 134512, 176768 134856, 176657 134825, 176729 134889, 176593 134881, 176206 135111, 175924 135211, 175953 135492, 175788 135834, 175713 135442, 175715 135305, 175387 135299, 175289 135344, 175387 135388, 175293 135727, 175146 135656, 175151 135572, 175059 135428, 174951 135453, 174890 135224, 174820 135317, 174654 135173, 174554 135176, 174526 135533, 174328 135628, 174253 135554, 174341 135231, 174315 135183, 174377 135009, 174262 135070, 174318 135010, 174226 135030, 173986 134985, 173626 135116, 173525 135006, 173212 135289, 173185 135293, 173246 135038, 173338 134960, 173105 134747, 172823 134798, 172466 134944, 172110 135050, 172058 135122, 171899 135165, 171707 135114, 171739 134916, 171597 134656, 171452 134782, 171125 134705, 171063 134585, 170889 134653, 171053 134748, 170891 134901, 170633 134936, 170627 134984, 170357 135357, 170243 135310, 169999 135031, 170160 134980, 170330 134756, 170245 134710, 169763 134820, 169567 134677, 169650 134401, 169619 134343, 169695 134147, 169843 133896, 169706 133812, 169600 133874, 169504 133838, 169485 133732, 169348 133673, 169205 133740, 169071 133988, 169041 133807, 169099 133767, 169055 133580, 168495 133612, 168605 134014, 168099 134245, 167911 134560, 167522 134827, 167355 134991, 167175 135008, 166950 135205, 167010 134953, 166956 134754, 167304 134541, 167310 134511, 166920 134471, 166584 134722, 166503 134544, 166459 134577, 166188 134555, 166033 134684, 165978 134858, 165644 134971, 165513 134969, 165457 135112, 165298 135211, 165549 135401, 165275 135495, 164789 135472, 164656 135327, 164463 135262, 164191 135369, 163909 135388, 163842 135067, 163510 135313, 163449 135268, 163371 135354, 162878 135311, 162672 135246, 162452 135360, 162432 135304, 162561 135111, 162011 135115, 161929 135004, 161647 135029, 161618 135049, 161277 135037, 161390 135170, 161367 135272, 161047 135108, 160951 135204, 160784 135006, 160680 134934, 160618 135007, 160677 135147, 160984 135287, 161300 135544, 161713 135737, 161331 135585, 161067 135607, 160888 135453, 160693 135449, 160366 135346, 160138 135548, 160013 135259, 159835 134959, 159454 135107, 159302 135156, 158877 135405, 158833 135403, 158563 135456, 158353 135531, 157772 135541, 157337 135409, 157176 135474, 156947 135451, 156609 135642, 156715 135774, 156893 135886, 156671 135870, 156198 136100, 156259 135837, 156229 135744, 156127 135803, 155829 135893, 155574 136163, 155349 136334, 154918 136528, 154714 136680, 154542 136500, 154353 136231, 153984 136113, 153652 136120, 153552 136060, 153593 135690, 153306 135419, 153053 135341, 152580 135581, 152424 135744, 152010 136078, 151973 136256, 151750 136416, 151665 136297, 151649 136165, 151319 135935, 151244 135715, 150941 135293, 150655 135636, 150553 135647, 150201 135755, 150161 135787, 149841 135908, 149141 135992, 148757 136104, 148867 136170, 148843 136326, 148639 136420, 148607 136196, 148634 136111, 148587 135746, 148415 135444, 148211 135379, 148050 135457, 148114 135730, 147652 135706, 147599 135643, 147195 135813, 146749 136022, 146448 136017, 146441 135964, 146753 135735, 146754 135594, 146534 135468, 146203 135523, 146003 135606, 145554 135726, 145105 135802, 144993 135772, 145004 135675, 144940 135517, 144856 135457, 144819 135353, 144738 135411, 144258 135273, 144244 135247, 144182 135276, 144239 135309, 144026 135482, 143898 135483, 143882 135641, 143572 135967, 143240 135766, 143044 135494, 143258 135460, 143461 135255, 143530 134972, 142808 135181, 142614 135003, 142703 134579, 142911 134207, 142805 134129, 142630 134203, 142475 134117, 142442 133928, 142364 133881, 142278 133907, 142160 134105, 142168 134201, 142008 134222, 141982 133986, 142086 133926, 142018 133734, 141547 133613, 141440 133711, 141550 134115, 140958 134288, 140799 134562, 140406 134762, 140183 134934, 140023 134920, 139718 135114, 139790 134861, 139755 134588, 140088 134453, 140094 134400, 139750 134286, 139351 134492, 139248 134284, 138934 134214, 138818 134290, 138777 134473, 138691 134549, 138319 134615, 138165 134492, 138144 134732, 137948 134822, 138223 135040, 137946 135112, 137552 135086, 137343 135004, 137322 134941, 137022 134843, 136645 134999, 136493 135002, 136348 134700, 135940 134954, 135577 135006, 135229 134925, 135039 134916, 134877 135044, 134792 134959, 135057 134672, 134591 134852, 134455 134932, 134172 134918, 133779 135004, 133556 135085, 133748 135061, 133804 135177, 133694 135392, 133421 135386, 133726 135424, 134098 135563, 134086 135641, 133686 135616, 133556 135571, 133360 135662, 133229 135581, 132893 135712, 132594 135774, 132456 135925, 132364 135912, 132064 135512, 131960 135530, 131449 135373, 131078 135348, 130574 135691, 130880 135933, 130811 135921, 130474 136087, 130566 135694, 130433 135488, 130058 135503, 130241 135641, 130311 135805, 129948 135956, 129770 136171, 129365 136500, 128949 136741, 128626 136251, 128497 136199, 128446 136104, 128148 136173, 127886 136127, 127908 135993, 127839 135960, 127716 135989, 127651 136138, 127575 136144, 127158 135990, 126750 136006, 126603 136045, 126590 136114, 126404 136287, 126174 136390, 126088 136272, 126079 136077, 125907 135956, 125420 136013, 125204 136108, 125018 135838, 124939 135792, 124563 135511, 124353 135466, 124189 135599, 124265 135634, 124639 135626, 124729 135776, 124430 135901, 123754 135988, 123703 136011, 123347 136074, 123273 136052, 123213 135680, 123096 135477, 122819 135391, 122756 135337, 122691 135437, 122643 135651, 122510 135631, 121999 135800, 121844 135668, 121573 135898, 121568 135811, 121622 135769, 121623 135583, 121842 135658, 121902 135401, 121762 135410, 121620 135574, 121417 135449, 121133 135476, 121049 135569, 120658 135651, 120447 135748, 120258 135904, 120154 135874, 120086 136053, 119789 136279, 119473 136548, 119452 136500, 119534 136164, 119652 135882, 119635 135791, 119395 135980, 119227 135779, 118829 135851, 118509 136127, 118507 136190, 118428 136136, 118318 136180, 118197 136376, 118305 136615, 118228 136767, 117982 137027, 117776 137191, 117740 136950, 117886 136638, 118130 136633, 118132 136389, 117856 136399, 117602 136628, 117223 136550, 117160 136572, 117126 136516, 117339 136288, 117514 136185, 117251 136082, 117149 136004, 116952 136134, 116884 136454, 116808 136303, 116687 136216, 116557 136220, 116387 136459, 116383 136518, 116338 136531, 116224 136732, 116048 136740, 115806 136673, 115623 136472, 115752 136469, 115765 136210, 115875 136046, 115726 135924, 115616 135998, 115573 136442, 115313 136656, 115197 136803, 114946 136606, 114421 136372, 114395 136106, 114671 135974, 114756 135965, 114950 135593, 114637 135496, 114495 135317, 114420 135283, 114264 135411, 114337 135508, 114237 135738, 114010 135683, 114047 135454, 113922 135387, 114084 135177, 113709 135347, 113585 135286, 113801 134932, 113474 135105, 113328 135292, 113311 135076, 113061 135023, 112988 134932, 112800 135031, 112663 135274, 112815 135369, 112848 135467, 112723 135575, 112282 135653, 112477 135987, 112468 136249, 112200 136411, 112030 136397, 111744 136605, 111606 136329, 111528 136219, 111495 135947, 111474 135955, 111198 135736, 111206 135609, 111344 135288, 111483 135126, 111378 135091, 111296 135276, 110948 135073, 110853 135147, 110801 135336, 110750 135379, 110126 135364, 109900 135563, 109826 135582, 109902 135675, 109930 135813, 109898 135977, 109361 136059, 109070 135973, 108982 135753, 109018 135678, 108572 135701, 108359 135989, 108183 135787, 108007 135903, 108134 135651, 107993 135488, 107824 135440, 107510 135317, 107500 135251, 107380 135207, 107222 135217, 107036 135399, 106858 135430, 106661 135198, 106441 135242, 106302 135206, 106211 135075, 106038 135009, 106034 135111, 105955 135137, 105923 135311, 105951 135404, 106093 135454, 106136 135385, 106276 135341, 106506 135358, 106737 135520, 106855 135713, 106749 135924, 106291 135738, 106290 135663, 106137 135531, 106056 135633, 106235 135744, 106183 136032, 105943 136048, 105739 135953, 105482 136067, 105360 136075, 105289 136216, 105312 136288, 105166 136376, 104952 136050, 104665 136071, 104604 135981, 104366 135871, 104515 135755, 104145 135234, 104041 135248, 104085 135307, 103970 135500, 103984 135672, 103676 135965, 103449 135625, 103475 135258, 103084 135277, 102423 135413, 102316 135482, 101926 135658, 101223 136046, 101049 136013, 100672 136006, 100404 135965, 100242 135976, 100191 136146, 99730 135992, 99269 136011, 99195 136002, 98823 136033, 98693 135957, 98012 135998, 97790 136098, 97612 135850, 97310 135619, 96993 135447, 96728 135226, 96725 134880, 96456 134773, 96152 134807, 95843 134931, 95367 135283, 95072 135605, 94874 135414, 94584 135321, 94485 135118, 94285 134980, 93918 135156, 93644 135203, 93621 135244, 93579 135231, 93264 135493, 93001 135580, 92834 135678, 92670 136057, 92054 136536, 92030 136488, 92073 136227, 92244 135948, 92190 135752, 91918 136007, 91900 135879, 91802 135771, 91661 135828, 91347 135880, 91131 136093, 91116 136159, 91047 136117, 90919 136159, 90759 136374, 90872 136615, 90797 136764, 90339 137184, 90307 136950, 90453 136639, 90695 136634, 90694 136388, 90423 136398, 90176 136632, 89794 136550, 89727 136573, 89681 136498, 89972 136246, 90064 136244, 90142 136168, 90077 136100, 89848 135965, 89492 136145, 89455 136416, 89371 136306, 89125 136172, 89029 136302, 88890 136646, 88616 136740, 88374 136672, 88233 136483, 88321 136465, 88333 136214, 88462 136053, 88219 135897, 88161 136116, 88126 136435, 87745 136787, 87523 136611, 86989 136371, 86963 136104, 87240 135974, 87326 135965, 87517 135593, 87207 135496, 86971 135254, 86904 135507, 86806 135738, 86609 135713, 86527 135539, 86543 135406, 86505 135345, 86587 135239, 86398 135331, 86209 135346, 86166 135299, 86313 135035, 86129 134966, 86072 134981, 86005 134907, 85524 134979, 85431 135193, 85222 135242, 85375 135344, 85363 135419, 85430 135509, 85349 135505, 85235 135590, 84944 135622, 84874 135666, 85110 136117, 84884 136377, 84590 136411, 84297 136563, 84146 136283, 84165 136654, 84073 136578, 84008 136352, 83879 136374, 83968 136325, 83982 136146, 83780 136341, 83944 136147, 84002 136108, 84028 135950, 83831 135806, 83748 135631, 83148 135941, 82702 136044, 82544 136113, 82485 136088, 82156 136110, 81742 136005, 81304 136319, 81199 136183, 81247 136069, 81111 136096, 81017 136168, 81122 136274, 81174 136215, 81398 136618, 80878 136583, 80988 136446, 80919 136464, 80688 136602, 80607 136305, 80260 136390, 79838 136780, 79352 136963, 79204 137074, 78889 136647, 78575 136452, 78214 136412, 78091 136286, 78104 136094, 77898 136077, 77858 136221, 77880 136293, 77736 136379, 77573 136136, 77356 136219, 77570 136404, 77218 136500, 77255 136280, 77348 136219, 76993 136083, 76834 136041, 76765 135943, 76670 135934, 76675 136033, 76453 136336, 76225 136116, 76069 135927, 75919 135837, 75731 135667, 75605 135619, 75565 135543, 75543 135288, 75369 135409, 75321 135349, 75126 135313, 75060 135146, 74935 135097, 74810 135110, 74619 135231, 74763 135254, 75062 135388, 74744 135552, 73980 135632, 73536 135753, 73480 135413, 73331 135175, 73090 135141, 72995 135227, 72949 135405, 72736 135400, 72236 135639, 72169 135593, 71848 135917, 71689 135933, 71673 135823, 71862 135663, 71864 135511, 71654 135425, 71367 135493, 71288 135568, 71040 135604, 70993 135634, 70360 135763, 70193 135696, 70220 135539, 70079 135246, 69950 135326, 69544 135136, 69495 135038, 69386 135073, 69489 135154, 69314 135263, 69145 135215, 69111 135345, 69305 135639, 69276 135684, 68888 135662, 68444 135761, 68640 135448, 68572 135408, 68355 135051, 68640 134987, 68769 134819, 68580 134663, 68374 134979, 68064 135234, 67989 135225, 67971 135087, 68120 134737, 67881 134421, 67639 134362, 67512 134397, 67456 134334, 67372 134362, 67111 134592, 67228 134742, 67182 134910, 66807 135079, 66690 135304, 66570 135323, 66126 135241, 66073 135302, 66004 135591, 65754 135734, 65537 135657, 65272 135853, 65027 135919, 65005 135988, 65058 136145, 64870 136361, 64656 136047, 64453 136137, 64643 136213, 64809 136374, 64490 136586, 64183 136707, 64278 136212, 63953 136111, 63861 136118, 63817 136044, 63870 135938, 64210 135619, 63866 135287, 63785 135135, 63681 135233, 63617 135505, 63636 135779, 63183 136382, 62995 135952, 62927 135832, 62946 135473, 62925 135342, 62808 135451, 62588 135515, 62483 135489, 62333 135146, 62578 134986, 62457 134920, 62208 134847, 61895 134946, 61753 134798, 61578 134975, 61937 135253, 62069 135289, 61697 135292, 61571 135314, 61428 135229, 61397 135335, 61004 135622, 60241 135442, 60653 135209, 60659 135133, 60604 135054, 60260 134980, 60168 134994, 59960 135125, 59926 135360, 60026 135769, 60016 135836, 59667 135644, 59627 135507, 59680 135450, 59386 135416, 59179 135363, 59074 135411, 58765 135445, 58517 135731, 58152 135190, 58085 135149, 57916 134851, 57712 134842, 57447 135170, 57427 135213, 57215 135379, 57082 135597, 57001 135535, 56963 135331, 56899 135248, 56720 135236, 56064 134715, 55605 134667, 55515 134762, 55853 134970, 55757 135450, 55717 135488, 55293 135441, 55267 135392, 54937 135422, 54608 135618, 54543 135725, 54338 136007, 54046 135793, 53530 135623, 53191 135328, 53035 135288, 52979 135480, 53018 135612, 52670 135470, 52383 135414, 52152 135464, 52475 135204, 52428 135144, 52295 135118, 51984 135181, 51773 135125, 51500 135243, 50834 135326, 50687 135287, 50434 135276, 50007 135088, 49585 134979, 49066 134911, 48468 134977, 48441 134957, 47881 134850, 47829 134737, 47239 134728, 47050 134814, 46849 134739, 46622 134986, 46413 134986, 46104 134687, 46275 134378, 46224 134151, 46139 134047, 46249 133899, 46238 133784, 45899 133657, 45626 133769, 45444 133622, 45475 133565, 45347 133384, 44976 133405, 44788 133508, 44529 133467, 44104 133693, 44000 133560, 44091 133436, 44206 133376, 44307 133392, 44335 133296, 44590 133071, 45463 133039, 46008 133156, 45961 133109, 45997 132799, 46025 132770, 45976 132712, 45725 132659, 45581 132482, 45236 132696, 45414 133008, 44857 132757, 44977 132539, 44958 132473, 44826 132404, 44601 132411, 44171 132353, 43769 131871, 43981 131810, 44119 131716, 43838 131518, 43861 131195, 43582 131142, 43466 131189, 43302 131170, 43324 131094, 43161 130950, 43196 130752, 43155 130663, 43383 130419, 43398 130353, 43323 130074, 43239 130062, 43301 129994, 43359 129445, 43225 129258, 43140 128928, 43217 128724, 43144 128657, 42940 128748, 42735 128567, 42877 128329, 42755 128222, 42669 128220, 42706 128570, 42589 128595, 42378 128809, 42407 128597, 42614 128199, 42483 128185, 42245 128300, 42148 128040, 42073 127995, 42155 127678, 42024 127417, 41939 127445, 41801 127704, 41694 127430, 41860 127106, 41683 126831, 41577 126917, 41452 127192, 41401 127192, 41263 126609, 41298 126498, 41365 125897, 41421 125628, 41539 125708, 41655 125570, 41501 125574, 41381 125345, 41326 125721, 41338 125846, 41251 125989, 41168 125910, 41230 125788, 41146 125605, 41042 125635, 40885 125517, 41079 125226, 41275 125115, 41340 125126, 41344 125038, 40969 124437, 40961 124074, 40972 123976, 40753 123596, 40812 123528, 40853 123552, 40876 123274, 40961 123455, 41052 123377, 40945 122880, 40909 122549, 41037 122550, 41096 122750, 41233 122723, 41310 122893, 41447 122850, 41470 122764, 41329 122150, 41112 121736, 41210 121353, 41117 121282, 40935 120693, 41055 120283, 40984 120078, 40891 120080, 40927 119761, 40902 119326, 40808 118962, 40775 118936, 40690 119317, 40642 119292, 40617 119136, 40666 118864, 40733 118575, 40747 118274, 40765 118204, 40822 118479, 40855 118554, 40940 118159, 41015 117994, 41038 117660, 41078 117340, 41284 116909, 41231 116854, 41170 116552, 41279 116484, 41140 116433, 40929 116541, 40868 116284, 40897 116124, 40745 116071, 40634 115906, 40632 115767, 40705 115521, 40730 115062, 40927 115022, 40990 115139, 40968 115320, 41035 115494, 41054 115226, 41119 115118, 41169 114738, 41259 114825, 41472 114524, 41525 114208, 41451 114180, 40917 113420, 40937 113343, 41219 113156, 41362 112973, 41270 112849, 41254 112554, 41194 112394, 41062 112384, 40975 112475, 40838 112528, 40816 112401, 40718 112361, 40745 112192, 40690 111957, 40598 111447, 40890 110922, 40889 110737, 40836 110775, 40757 110641, 40757 110459, 40731 110070, 40799 109881, 40874 109845, 40904 109699, 40875 109313, 40974 109296, 40990 109049, 41118 108830, 41130 108710, 41238 108243, 41150 107885, 41279 107595, 41556 107763, 41693 107879, 41557 108359, 41595 108818, 41673 108695, 41919 108567, 42073 108574, 42132 108654, 42286 108579, 42330 108646, 42440 108693, 42350 108523, 42438 108401, 42579 108519, 42637 108229, 42424 108110, 42221 107667, 42411 107536, 42181 107261, 42537 106908, 42767 107048, 42936 107335, 43055 107368, 43097 107513, 43366 107437, 43306 107073, 43182 106849, 43123 106812, 43063 106560, 43083 106441, 43331 106232, 43509 105528, 43637 105160, 43807 105021, 44351 104509, 44803 104559, 45345 104667, 45660 104709, 45785 104635, 46197 104955, 46251 104962, 46215 104945, 46234 104628, 46193 104483, 46273 104392, 46445 104532, 46628 104818, 46807 104657, 46802 104408, 46536 104297, 46374 104104, 46424 104051, 46462 103793, 46414 103721, 46151 103924, 46246 104365, 46082 104371, 46014 104302, 46079 103798, 46092 103325, 46245 103267, 46320 103282, 46370 103240, 46466 102961, 46654 103216, 46984 103089, 47079 103117, 47153 102995, 47334 102916, 47398 102930, 47791 102908, 47842 102889, 48162 102825, 48214 102889, 48058 102998, 48060 103341, 47898 103671, 48048 103640, 48074 103360, 48304 103328, 48459 103485, 48675 103443, 48921 103487, 48971 103424, 49012 103489, 49517 103390, 49313 103137, 49322 103118, 49073 102855, 49329 102621, 49495 102572, 49800 102575, 50067 102637, 50227 102894, 50528 102716, 50971 102866, 51195 102861, 51121 102672, 50655 102231, 51226 102367, 51573 102497, 51601 102525, 51897 102661, 51821 103018, 51929 103206, 52348 103245, 52419 103082, 52872 103051, 53058 103002, 53396 103083, 53372 102914, 53495 102723, 53679 102970, 53652 103076, 54044 103042, 54297 103001, 54488 102914, 54460 102886, 54772 102835, 54989 102481, 55098 102519, 55176 102722, 55297 102770, 55169 102855, 55529 102907, 55885 102741, 55913 102928, 55881 103089, 56057 103132, 56097 103022, 56248 102854, 56401 102766, 56440 102841, 56715 102836, 57046 102692, 57122 102419, 57278 102597, 57290 102727, 57353 102766, 57302 102812, 57354 102803, 57439 102630, 57593 102515, 57585 102421, 57664 102434, 57617 102266, 57786 101936, 57868 102121, 57971 102427, 58260 102239, 58317 101953, 58389 101991, 58462 102115, 58439 102199, 58521 102252, 58907 102200, 58954 102445, 59046 102440, 59109 102376, 59151 102163, 59105 102169, 59146 102062, 59356 102113, 59338 102205, 59260 102274, 59335 102416, 59345 102374, 59505 102441, 59446 102506, 59439 102771, 59465 102798, 59508 102742, 59616 102722, 59677 102788, 59543 102874, 59665 102972, 59914 102988, 60241 102811, 60840 102283, 61082 102235, 61133 101982, 61256 101889, 61397 102096, 61731 102268, 61738 102342, 61969 102451, 62118 102641, 62319 102503, 62687 102504, 63194 102340, 63358 102348, 63760 102288, 63878 102311, 64214 102268, 64083 102141, 64090 102040, 64390 101954, 64426 102126, 64367 102265, 64389 102596, 64543 102642, 64489 102807, 64596 102940, 64810 102777, 64823 102707, 65313 102750, 65707 102604, 66086 102383, 66205 102382, 66480 102342, 66088 102710, 66230 102849, 66332 102750, 66499 102802, 66889 102649, 66991 102574, 67293 102447, 67360 102447, 67701 102324, 67773 102544, 67887 102633, 67922 102597, 68384 102610, 68597 102382, 68614 102129, 68909 101754, 69031 101768, 69191 101854, 69327 101871, 69537 102127, 69233 102238, 69011 102701, 69384 102672, 69683 102467, 69779 102550, 69782 102799, 69655 103141, 69818 103191, 69618 103248, 69591 103373, 69858 103211, 70062 103377, 70373 103214, 70474 103282, 70555 103452, 70344 103586, 70391 103728, 70782 103798, 70905 103793, 70806 103354, 71297 103174, 71380 103089, 71462 103114, 71547 102957, 71793 102809, 72140 102520, 72186 102525, 72389 102362, 72580 102289, 72611 102315, 72535 102670, 72544 102884, 72236 103047, 72237 103073, 72525 103168, 72779 103052, 72823 102984, 72898 103039, 72928 103153, 73222 103288, 73295 103018, 73450 103029, 73644 102977, 73847 103010, 73875 102978, 74186 102898, 73915 102651, 74090 102604, 74571 102715, 74661 102889, 75004 103075, 75258 102974, 75439 102956, 75574 103240, 75956 103031, 76299 103060, 76515 103140, 76538 103184, 76809 103118, 76849 103084, 77240 102993, 77126 102706, 77356 102978, 77510 102976, 77507 102741, 77545 102710, 77663 102759, 77668 102946, 77858 102996, 77952 102741, 77609 102635, 77617 102522, 78023 102499, 78169 102538, 78325 102498, 78414 102540, 78762 102372, 79051 102271, 79150 102138, 79262 102170, 79478 102422, 79801 102043, 79885 102001, 80155 101803, 80254 101746, 80463 101586, 80611 101435, 80893 101793, 81238 101890, 81507 101843, 81662 101912, 81631 102200, 81719 102293, 81773 102114, 82047 101849, 82564 101937, 82706 102044, 82503 102174, 82391 102373, 82538 102309, 82913 101946, 83139 101911, 83193 101633, 83349 101514, 83440 101736, 83685 101935, 83760 101964, 83767 102077, 84077 102548, 84232 102322, 84631 102230, 84758 102536, 84960 102557, 85068 102451, 84941 102429, 84633 102228, 85126 102036, 85398 102015, 85573 101974, 85741 102024, 85931 101954, 86115 101955, 86016 101867, 86041 101723, 86244 101661, 86275 101877, 86245 101972, 86283 102339, 86450 102662, 86643 102768, 86769 102683, 86710 102436, 87155 102575, 87202 102648, 87595 102571, 87633 102615, 87740 102547, 87998 102474, 88271 102533, 88261 102606, 87960 102785, 88128 103007, 88202 102956, 88359 103045, 88680 102998, 89222 102938, 89243 102945, 89515 102924, 89615 102963, 89597 103055, 89690 103240, 89800 103320, 90333 103420, 90539 103256, 90597 103254, 90617 103077, 90900 102750, 91275 102945, 91463 103176, 91227 103240, 91092 103378, 91052 103481, 91291 103610, 91450 103581, 91650 103467, 91780 103562, 91783 103738, 91573 104311, 91611 104328, 91828 104210, 92044 104293, 92381 104155, 92471 104306, 92325 104416, 92377 104554, 92824 104574, 92899 104492, 92802 104159, 93307 103878, 93406 103844, 93510 103666, 93781 103441, 94089 103147, 94193 103134, 94364 102956, 94571 102807, 94470 103223, 94514 103381, 94248 103537, 94233 103632, 94499 103667, 94804 103460, 94827 103413, 94875 103437, 94915 103557, 95238 103695, 95351 103341, 95871 103225, 95882 103192, 96179 103030, 95913 102815, 96138 102733, 96544 102770, 96659 102821, 96700 102937, 97014 103062, 97223 102945, 97520 102892, 97608 103156, 97855 103060, 97955 102968, 98727 102806, 99483 102970, 99748 103059, 100038 102960, 99956 102800, 100051 102566, 100266 102601, 100058 102551, 100064 102492, 100030 102541, 99694 102416, 99708 102322, 100109 102392, 100361 102334, 100532 102386, 100784 102279, 101072 102229, 101240 102046, 101637 102556, 101816 102918, 102184 103285, 102019 103454, 102085 103588, 102066 103736, 101839 103973, 102074 104144, 101846 104344, 101760 104385, 101864 104564, 101945 104543, 102014 104450, 102275 104489, 102405 104459, 102376 104629, 102411 104678, 102451 104256, 102680 103942, 102346 103467, 102341 103247, 102250 102982, 102397 102895, 102731 102853, 102740 102888, 102996 102768, 103387 102987, 103486 103101, 103596 102948, 103455 102870, 103467 102836, 103736 102747, 103805 102415, 104035 102223, 104464 102286, 104663 102434, 104518 102525, 104297 102945, 104345 102967, 104680 102838, 105340 102801, 106125 102719, 106282 102724, 106681 102516, 106957 102500, 107141 102447, 107720 102513, 108053 102656, 108224 102608, 108469 102660, 108685 102551, 108635 102442, 108419 102265, 108640 102325, 108840 102275, 109154 102140, 109114 102339, 109152 102472, 109410 102392, 109797 102037, 110142 101906, 110458 101691, 110661 101924, 110765 102084, 111114 102197, 111396 102219, 111501 102275, 111484 102645, 111727 102914, 112139 102810, 112410 102597, 112739 102249, 112982 102181, 113035 101905, 113178 101773, 113348 102030, 113410 102047, 113648 102337, 113692 102355, 113916 102639, 114059 102420, 114480 102269, 114973 102008, 115149 101988, 115499 101861, 115628 101866, 116006 101756, 115861 101625, 115867 101540, 116101 101437, 116138 101639, 116099 101740, 116127 102098, 116295 102422, 116429 102475, 116596 102410, 116547 102246, 116621 102164, 117011 102215, 117057 102284, 117824 102077, 118150 102196, 118156 102230, 117818 102363, 117817 102486, 118028 102702, 118051 102670, 118271 102766, 118416 102736, 119023 102833, 119058 102857, 119321 102918, 119410 102985, 119393 103074, 119563 103446, 119649 103408, 120081 103746, 120339 103633, 120339 103450, 120649 103177, 121048 103536, 121230 103840, 120986 103834, 120856 103931, 120813 104036, 121072 104265, 121171 104277, 121402 104204, 121525 104322, 121508 104565, 121326 105001, 121363 105024, 121595 104957, 121781 105075, 122112 104983, 122173 105016, 122181 105173, 122280 105173, 122155 105241, 122165 105339, 122595 105444, 122672 105409, 122547 105080, 122838 105009, 123056 104896, 123159 104884, 123260 104743, 123520 104572, 123827 104332, 123913 104329, 124291 104057, 124200 104427, 124245 104553, 124007 104664, 123989 104751, 124252 104784, 124514 104627, 124538 104582, 124626 104611, 124694 104710, 124941 104777, 124983 104567, 125106 104449, 125553 104351, 125575 104284, 125845 104127, 125573 103988, 125783 103882, 126295 103875, 126431 103973, 126632 104017, 126860 103899, 127125 103831, 127269 104068, 127597 103827, 127626 103849, 127675 103799, 128244 103837, 128406 103915, 128605 103677, 128647 103712, 128759 104020, 128874 103995, 128916 104046, 128974 104043, 129029 103893, 129275 103787, 129447 103791, 129671 103577, 129602 103440, 129713 103206, 129320 103146, 129335 103050, 129719 103003, 129862 103020, 130041 102895, 130164 102932, 130487 102739, 130799 102594, 130951 102403, 131045 102444, 131276 102732, 131415 102812, 131561 103097, 131815 103267, 131982 103425, 131825 103585, 131872 103711, 131816 103924, 131616 104110, 131841 104234, 131829 104315, 131938 104364, 132261 104347, 132445 104089, 132609 104040, 132419 104033, 132330 103782, 132117 103600, 132132 103546, 132005 103154, 132245 103050, 132452 103073, 132708 102981, 133070 103149, 133247 103344, 133509 103064, 133475 102915, 133554 102723, 133791 102553, 134311 102779, 134788 103006, 134819 103028, 134408 102897, 134285 102945, 134096 103200, 134206 103391, 134413 103369, 134601 103463, 135139 103493, 135192 103373, 135744 103302, 135773 103279, 136353 103379, 136882 103330, 137201 103288, 137623 103123, 137969 103106, 138563 103213, 138786 103317, 138974 103260, 139246 103310, 139402 103231, 139102 102993, 139340 103043, 139565 102966, 139877 102792, 139845 102935, 139898 103096, 140036 103041, 140375 102674, 140862 102398, 141105 102152, 141382 102472, 141741 102568, 142001 102545, 142150 102604, 142135 102943, 142396 103154, 142942 102885, 143193 102610, 143529 102283, 143763 102185, 143838 102080, 143878 101879, 143969 101790, 144119 101959, 144311 102032, 144524 102223, 144678 102262, 144829 102401, 144974 102233, 145163 102159, 145511 102099, 145541 102073, 145998 101872, 146354 101835, 146500 101798, 146645 101832, 146867 101744, 146901 101517, 147271 101389) (143581 135001, 143976 135192, 143940 135078, 144043 134952, 144013 134901, 143594 134807) (68879 134758, 69248 134988, 69214 134862, 69298 134787, 69215 134663, 68774 134519) (65782 134382, 65714 134660, 65735 134790, 65796 134809, 66043 134707, 66253 134741, 66493 134669, 66828 134926, 67017 134614, 66814 134713, 66601 134499, 66540 134559, 66487 134521, 66270 134667, 66058 134661, 65904 134347, 65827 134312) (164793 134568, 164770 134690, 164905 134902, 164993 134817, 165283 134808, 165433 134869, 165622 134594, 165601 134517, 165139 134610, 164916 134441) (143356 134540, 143449 134773, 143588 134782, 143708 134502, 143559 134451) (170249 134097, 170241 134167, 170413 134497, 170597 134585, 170823 134629, 170854 134376, 170475 134334, 170593 134042, 170406 134003) (137415 134174, 137526 134449, 137609 134353, 138162 134483, 138362 134150, 137891 134139, 137765 134170, 137577 134038) (45978 133615, 46251 133757, 46366 133686, 46383 133467, 46213 133333) (189640 132105, 190033 132258, 190139 132148, 189973 132090) (193713 118969, 193757 118982, 193790 118915, 193726 118073, 193676 118023) (191372 108040, 191400 108103, 191304 108436, 191327 108481, 191556 108335, 191594 108247, 191510 107981, 191407 107912) (188119 105974, 188080 106056, 188126 106140, 188400 105920, 188318 105909) (188652 105805, 188679 106125, 189087 106087, 188973 105793) (189497 105786, 189534 105812, 189535 105925, 189583 105823, 189784 105774, 189926 105683, 189733 105606) (131571 104488, 131787 104761, 131925 104881, 132137 104879, 132179 104738, 132085 104738, 131680 104507, 131686 104442) (188398 103912, 188405 103992, 188567 104111, 188360 104298, 188335 104303, 188064 104441, 188048 104640, 188235 104846, 188465 104447, 188408 104330, 188567 104256, 188638 104158, 188640 104046, 188713 103903, 188484 103780) (126133 104488, 125891 104479, 125575 104527, 125512 104660, 125931 104638, 126033 104613, 126166 104672, 126253 104598, 126251 104514, 126186 104425) (187466 104348, 187379 104462, 187442 104536, 187763 104398, 187558 104297, 187570 104259, 187375 104173) (120287 104169, 120666 104304, 120664 104164, 120395 103967) (133346 103832, 133312 103838, 133367 104088, 133469 104201, 133668 104192, 133560 104017, 133663 103708, 133512 103644) (182922 103927, 182951 104078, 183087 104160, 183256 104093, 183573 103898, 183598 103833, 183459 103611, 183514 103412) (133024 103609, 132839 103701, 132613 103652, 132648 103884, 132899 103876, 133002 103960, 133310 103833, 133476 103591, 133254 103347) (90511 103764, 90906 103803, 90904 103660, 90610 103549) (95768 103681, 96057 103732, 96358 103662, 96506 103784, 96595 103702, 96614 103587, 96533 103461, 96475 103535, 96214 103469, 95938 103429) (183989 103559, 184007 103692, 183892 103752, 184037 103736, 184199 103460, 184055 103448) (73775 103408, 73759 103427, 74218 103505, 74486 103509, 74513 103446, 74456 103334, 74390 103386, 74146 103310) (103243 103402, 103363 103347, 103697 103417, 103838 103273, 103639 103293, 103500 103088) (175394 103184, 175246 103409, 175829 103298, 175863 103262, 176009 103310, 176077 103263, 176079 103189, 176037 103148) (59468 102800, 59496 102829, 59618 102772) (114617 102545, 114800 102539, 114898 102432, 114783 102428, 114493 102288)), ((108850 136644, 108348 136570, 108610 136156)), ((104897 136284, 104997 136403, 104652 136500, 104722 136201)), ((174305 135194, 174168 135529, 174037 135603, 174086 135371, 174158 135328, 174135 135113)), ((136146 135168, 135649 135133, 135649 135090, 135940 134969)), ((41043 121936, 41186 122120, 41202 122554, 40944 122100, 40904 121929, 40928 121890)), ((123856 103788, 123975 104015, 123854 104135, 123736 103997, 123463 103841, 123678 103718)), ((181388 103391, 181538 103439, 181342 103486, 181240 103467, 181357 103063)), ((119724 102830, 119639 103036, 119662 103128, 119569 103134, 119480 102926, 119554 102702)), ((173519 102386, 173602 102512, 173609 102599, 173728 102771, 173514 102996, 173313 102755, 172941 102588, 173164 102419, 173266 102414, 173364 102332)), ((94131 102562, 94237 102760, 94123 102883, 94024 102765, 93841 102777, 93907 102672, 93790 102609, 93947 102512)), ((150965 102382, 150913 102507, 150983 102711, 150743 102752, 150574 102561, 150694 102218)), ((68054 101957, 67990 102150, 68030 102280, 67838 102396, 67733 102292, 67830 101952)), ((72160 101873, 72322 102233, 72151 102379, 71998 102153, 71724 102100, 71823 101958, 71736 101883, 71999 101784)), ((169448 101850, 169401 101987, 169460 102194, 169226 102286, 169062 102121, 169154 101882, 169174 101745))) \ No newline at end of file diff --git a/stress_benchmark/resources/017.settings b/stress_benchmark/resources/017.settings new file mode 100644 index 0000000000..dee1eba618 --- /dev/null +++ b/stress_benchmark/resources/017.settings @@ -0,0 +1,628 @@ +material_bed_temperature=60 +support_tree_rest_preference=buildplate +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.84 +clean_between_layers=False +support_interface_skip_height=0.12 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=3 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=0 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=4 +top_bottom_pattern=lines +skirt_brim_line_width=0.42 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.96 +raft_acceleration=500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.24 +meshfix_union_all=True +layer_height_0=0.12 +support_initial_layer_line_distance=0 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=12.0 +wall_overhang_speed_factor=100 +support_roof_line_width=0.42 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=205.0 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=5 +material_break_temperature=50 +acceleration_support_interface=500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.12 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=12.0 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=2.5200252002520025 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=500 +speed_travel=150.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.12 +material_bed_temperature_layer_0=65 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=45 +retraction_amount=5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=12.0 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.42 +meshfix_union_all_remove_holes=False +support_wall_count=1 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=25.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=50 +speed_ironing=16.666666666666668 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=500 +wall_extruder_nr=-1 +support_structure=tree +support_xy_distance_overhang=0.42 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.42 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.38 +support_interface_offset=0.0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=500 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.84 +speed_wall=25.0 +bottom_thickness=0.84 +raft_interface_jerk=12.0 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.12 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=205.0 +brim_gap=0 +acceleration_support_infill=500 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=18.75 +jerk_prime_tower=12.0 +skin_outline_count=0 +mold_enabled=False +jerk_travel_layer_0=12.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150.0 +acceleration_topbottom=500 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=60 +skin_overlap=30.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=95.0 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +support_interface_height=0.96 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=outside_in +wall_0_material_flow=95.0 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=30 +material_print_temperature_layer_0=205.0 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.42 +jerk_wall_x_roofing=12.0 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=500 +interlocking_orientation=22.5 +speed_wall_0_roofing=25.0 +sub_div_rad_add=0.42 +bottom_skin_preshrink=0.84 +minimum_bottom_area=10 +infill_line_distance=5.04 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=33.333333333333336 +support_interface_line_width=0.42 +support_skip_zag_per_mm=20 +support_angle=40 +raft_base_speed=18.75 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.38 +hole_xy_offset=0 +jerk_print_layer_0=12.0 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=12.5 +skirt_brim_material_flow=95.0 +acceleration_support_roof=500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=250 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=25.0 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.2 +jerk_wall_0=12.0 +mold_angle=40 +raft_speed=25.0 +prime_tower_wipe_enabled=True +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=500 +cool_min_temperature=205.0 +jerk_layer_0=12.0 +support_offset=0.0 +material_flow=95.0 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.12 +fill_outline_gaps=True +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.04 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=10 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=235 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +material_standby_temperature=180 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.42 +retract_at_layer_change=False +wall_transition_length=0.42 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.84 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +material_final_print_temperature=205.0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.42 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=noskin +wall_material_flow=95.0 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.381 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=12.5 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.126 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.24 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=12.5 +lightning_infill_straightening_angle=40 +speed_topbottom=25.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=30 +machine_max_jerk_z=0.4 +support_tree_angle=50 +expand_skins_expand_distance=0.84 +prime_tower_position_y=203.535 +mesh_position_x=0 +cross_infill_pocket_size=5.04 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.42 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.84 +support_bottom_distance=0 +wall_thickness=1.26 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=500 +minimum_support_area=0 +brim_width=8.0 +small_skin_width=0.76 +shell=0 +jerk_print=12.0 +adhesion_type=skirt +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=30 +z_seam_x=0.0 +acceleration_travel=500 +ironing_enabled=False +support_bottom_material_flow=95.0 +acceleration_wall=500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.42 +raft_interface_layers=1 +adaptive_layer_height_variation=0.04 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=7 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=500 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=223.535 +bridge_wall_min_length=2.24 +experimental=0 +bottom_layers=7 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.0 +skin_edge_support_layers=0 +support_type=buildplate +support_skip_some_zags=False +support_line_width=0.42 +ooze_shield_enabled=False +raft_base_thickness=0.144 +roofing_extruder_nr=-1 +jerk_support=12.0 +wall_line_width_x=0.42 +support_bottom_wall_count=0 +connect_skin_polygons=True +meshfix_fluid_motion_enabled=True +infill_pattern=cubic +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=500 +material_end_of_filament_purge_length=20 +speed_print=50.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +raft_surface_thickness=0.12 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=12.0 +skin_material_flow=95.0 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=25.0 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +raft_jerk=12.0 +speed_support=25.0 +jerk_support_interface=12.0 +minimum_roof_area=10 +raft_surface_jerk=12.0 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=12.0 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.84 +acceleration_ironing=500 +prime_tower_flow=95.0 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=95.0 +speed_prime_tower=25.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=95.0 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +support_bottom_pattern=grid +support_roof_height=0.96 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.84 +min_skin_width_for_expansion=5.143516556418883e-17 +wall_x_material_flow=95.0 +infill_material_flow=95.0 +ironing_monotonic=False +retraction_extrusion_window=10 +support_fan_enable=False +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=concentric +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=2.5200252002520025 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=95.0 +quality_changes_name=GG_Best_Dragon_1 +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=500 +wall_transition_angle=10 +top_thickness=0.84 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=12.5 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=12.0 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=2 +infill_mesh=False +layer_height=0.12 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=35 +support_tree_branch_reach_limit=30 +min_feature_size=0.105 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.42 +support_roof_material_flow=95.0 +machine_max_feedrate_y=500 +alternate_carve_order=True +jerk_roofing=12.0 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.36 +machine_extruders_share_nozzle=False +acceleration_prime_tower=500 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=10.0 +wall_0_material_flow_roofing=95.0 +jerk_support_roof=12.0 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=True +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=215.0 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=0 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=12.0 +speed_wall_x=30 +time=09:31:42 +machine_buildplate_type=glass +top_layers=7 +jerk_ironing=12.0 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=0.84 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.18 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=25.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=25.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=25.0 +material_bed_temp_wait=True +machine_depth=235 +bridge_wall_material_flow=50 +jerk_travel=12.0 +retraction_speed=45 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.84 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=12.0 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=0 +bottom_skin_expand_distance=0.84 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=25.0 +material_name=empty +acceleration_wall_0=500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=12.0 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/017.wkt b/stress_benchmark/resources/017.wkt new file mode 100644 index 0000000000..b4544fd166 --- /dev/null +++ b/stress_benchmark/resources/017.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((122284 113666, 123049 114043, 123644 114573, 123807 114741, 124013 114851, 124694 115297, 125303 115758, 125477 115916, 126470 116593, 126877 117068, 127118 117496, 127198 117898, 127150 118483, 126911 119186, 126592 119585, 126417 119840, 126185 120009, 125875 120468, 125791 120830, 125570 121185, 125128 121546, 124505 121795, 123592 122108, 122792 122222, 122110 122359, 121721 122424, 120491 122690, 119083 122846, 117862 122758, 117763 122775, 117366 122773, 116401 122835, 115909 122763, 115524 122727, 114931 122571, 114688 122469, 114006 122066, 113525 121558, 113382 121190, 113331 120902, 113336 120423, 113435 120180, 113374 120162, 113261 119886, 113154 119124, 113056 119101, 112971 119049, 112951 119060, 112876 119015, 112876 117562, 112971 117561, 112971 117581, 113031 117580, 113199 117645, 113050 118095, 113047 118359, 113154 119124, 113313 119161, 113541 119143, 113730 118986, 113813 118820, 113829 118625, 113794 118331, 113720 118108, 113577 117902, 113387 117718, 113199 117645, 113418 116985, 113977 116351, 114630 115714, 115362 115246, 115786 115120, 116516 114855, 116827 114768, 117946 114378, 118613 114172, 118991 114040, 119480 113927, 119738 113857, 120380 113725, 120965 113662, 121646 113640) (121614 114261, 121064 114303, 120370 114429, 119460 114711, 118653 115046, 118123 115255, 117656 115587, 117471 115816, 117219 116158, 117211 116172, 117318 116184, 117780 116466, 118028 116856, 118121 117139, 118359 117797, 118565 118631, 118396 119434, 118187 119501, 117265 119777, 116604 119962, 116111 120021, 115697 120189, 115503 120202, 115046 120688, 114756 120572, 114589 120522, 114404 120312, 113986 119566, 114172 119488, 114407 119307, 114880 119168, 115414 118856, 115515 118521, 115805 118174, 115983 117895, 116510 117229, 116889 116730, 117211 116172, 116544 116099, 114823 116276, 114301 116789, 114029 117705, 113932 118116, 113853 118575, 113966 119530, 113986 119566, 113882 119610, 113707 119727, 113444 120158, 113435 120180, 114589 120522, 114708 120658, 115015 120868, 115439 121034, 115919 121203, 116646 121197, 117222 120978, 117287 120917, 117671 120679, 117893 120404, 118315 119816, 118396 119434, 119119 119201, 120958 118521, 121156 118424, 121146 118347, 121156 118119, 121735 116490, 122179 116091, 122487 115947, 123304 115941, 123897 116077, 123827 116268, 123534 116772, 123219 117125, 122819 117483, 122461 117739, 122053 117985, 121156 118424, 121271 119318, 121374 119471, 121819 120261, 122060 120458, 122199 120633, 122737 120931, 123273 121039, 123624 120983, 124108 120884, 124503 120664, 124823 120383, 125303 119692, 125384 119374, 125532 118648, 125478 117748, 125332 116868, 124898 116307, 123897 116077, 123943 115953, 124020 115582, 124018 115263, 123972 115012, 123840 114774, 123807 114741, 123458 114553, 122968 114387, 122292 114251))) \ No newline at end of file diff --git a/stress_benchmark/resources/018.settings b/stress_benchmark/resources/018.settings new file mode 100644 index 0000000000..e92d385fed --- /dev/null +++ b/stress_benchmark/resources/018.settings @@ -0,0 +1,629 @@ +material_bed_temperature=55 +support_tree_rest_preference=buildplate +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=10 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=4 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.8 +raft_acceleration=500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=203.0 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=50 +acceleration_support_interface=500 +adhesion_extruder_nr=0 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=2.4000240002400024 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=500 +speed_travel=150.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=55 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=6.5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=25.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=16.666666666666668 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=500 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.4 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=500 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.8 +speed_wall=25.0 +bottom_thickness=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5 +raft_margin=5.0 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=False +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=203.0 +brim_gap=0 +acceleration_support_infill=500 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=18.75 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=8 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150.0 +acceleration_topbottom=500 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=50.0 +skin_overlap=10.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +support_interface_height=0.8 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=25.0 +material_print_temperature_layer_0=203.0 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=2.0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=500 +interlocking_orientation=22.5 +speed_wall_0_roofing=25.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=10 +infill_line_distance=17.142857142857142 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=43.333333333333336 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=65.0 +raft_base_speed=18.75 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=12.5 +skirt_brim_material_flow=100 +acceleration_support_roof=500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=340 +prime_tower_base_size=5.0 +infill_enable_travel_optimization=False +speed_support_infill=25.0 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.2 +jerk_wall_0=8 +mold_angle=40 +raft_speed=25.0 +prime_tower_wipe_enabled=True +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=500 +cool_min_temperature=203.0 +jerk_layer_0=8 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=False +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=10 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=300 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=25 +roofing_pattern=lines +material_bed_temp_prepend=False +material=0 +infill_before_walls=False +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +material_final_print_temperature=203.0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=noskin +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=12.5 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=12.5 +lightning_infill_straightening_angle=40 +speed_topbottom=25.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=20.0 +machine_max_jerk_z=0.4 +support_tree_angle=65.0 +expand_skins_expand_distance=0.8 +prime_tower_position_y=273.575 +mesh_position_x=0 +cross_infill_pocket_size=17.142857142857142 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=500 +minimum_support_area=2 +brim_width=3 +small_skin_width=0.8 +shell=0 +jerk_print=8 +adhesion_type=raft +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=30 +z_seam_x=150.0 +acceleration_travel=500 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.04 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=500 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=293.575 +bridge_wall_min_length=2.2 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.0 +skin_edge_support_layers=0 +support_type=buildplate +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=cubic +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=500 +material_end_of_filament_purge_length=20 +speed_print=50.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=100 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=7 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +raft_jerk=8 +speed_support=25.0 +jerk_support_interface=8 +machine_disallowed_areas=[] +minimum_roof_area=10 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=55 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=500 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=25.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=grid +support_roof_height=0.8 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=10 +support_fan_enable=False +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=2.4000240002400024 +brim_line_count=8 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=500 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=12.5 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=8 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=3 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=100.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=500 +alternate_carve_order=True +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.6000000000000001 +machine_extruders_share_nozzle=False +acceleration_prime_tower=500 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=10.0 +wall_0_material_flow_roofing=100 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=0 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=203.0 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=25.0 +time=09:32:51 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=8 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=25.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=25.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=25.0 +material_bed_temp_wait=True +machine_depth=300 +bridge_wall_material_flow=50 +jerk_travel=8 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=300 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=25.0 +material_name=empty +acceleration_wall_0=500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/018.wkt b/stress_benchmark/resources/018.wkt new file mode 100644 index 0000000000..6bf799f16d --- /dev/null +++ b/stress_benchmark/resources/018.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((141081 74767, 139636 77164, 138734 78622, 138930 78626, 138596 78845, 138357 79231, 138300 79321, 138304 79324, 138764 79424, 139451 79535, 142110 79915, 141982 79855, 141655 79585, 141469 79233, 141469 78896, 139809 78693, 139071 78628, 138930 78626, 138958 78607, 140775 77476, 141587 77005, 141880 76912, 142155 76872, 142553 76905, 142876 76950, 143745 77097, 145375 77400, 146659 77660, 147211 77782, 147673 77899, 148001 78086, 148047 78174, 148028 78473, 147871 78965, 147712 79401, 147609 79651, 147583 79655, 147254 79658, 146851 79625, 145886 79499, 143608 79182, 143633 79124, 143635 78737, 143448 78377, 143123 78109, 142720 77959, 142300 77965, 141925 78144, 141634 78455, 141469 78838, 141469 78896, 142087 78971, 143608 79182, 143469 79508, 143180 79819, 142805 79999, 142748 80006, 143423 80102, 144866 80295, 146043 80434, 146451 80468, 146906 80478, 147144 80409, 147318 80291, 147493 79930, 147609 79651, 147926 79601, 148244 79455, 148516 79287, 150182 78096, 151043 77527, 151666 77151, 152317 76797, 152649 76634, 152984 76483, 153321 76346, 153659 76225, 153995 76120, 154330 76028, 154987 75884, 155622 75783, 156508 75692, 157046 75662, 157532 75648, 158286 75648, 158571 75663, 158889 75706, 159172 75789, 159439 75895, 159981 76160, 161249 76845, 165147 78983, 165747 79291, 166054 79432, 166371 79550, 166735 79613, 167182 79559, 167799 79441, 169169 79158, 170165 78975, 170407 78965, 170605 79024, 170797 79187, 171003 79486, 171244 79956, 171384 80266, 171714 81056, 172128 82101, 174013 86953, 175420 90540, 176953 94371, 178546 98254, 179748 101101, 181309 104695, 182056 106367, 182770 107934, 183753 110043, 184603 111809, 185282 113164, 185644 113848, 185919 114332, 186170 114709, 186357 114919, 186517 115023, 186672 115055, 186938 115029, 188500 114761, 188797 114726, 188973 114750, 189167 114885, 189337 115073, 189575 115434, 189761 115743, 190236 116597, 194244 124274, 196451 128433, 199325 133767, 204481 143245, 205724 145561, 206981 147940, 208247 150381, 209512 152882, 210769 155438, 212015 158046, 213248 160700, 214463 163393, 215659 166120, 216828 168870, 217971 171636, 219085 174408, 220165 177173, 221210 179922, 222219 182647, 223187 185334, 224113 187971, 224997 190549, 225851 193099, 226633 195490, 227386 197847, 228095 200129, 228764 202337, 229395 204476, 229989 206549, 230550 208561, 231077 210516, 231597 212501, 232048 214272, 232493 216082, 233059 218470, 233703 221298, 234428 224638, 234772 226283, 235426 229526, 235864 231800, 231779 231800, 231243 229069, 230917 227461, 230220 224149, 229491 220854, 229096 219140, 228242 215603, 227779 213772, 227289 211892, 226768 209959, 226216 207968, 225629 205914, 225006 203794, 224344 201604, 223642 199342, 222897 197002, 222108 194583, 221275 192086, 220397 189518, 219477 186889, 218450 184032, 217515 181496, 216482 178756, 215414 176000, 214317 173241, 213193 170492, 211988 167626, 210879 165059, 209651 162292, 208502 159774, 207299 157208, 206093 154701, 204889 152258, 203689 149883, 202504 147576, 201331 145321, 197505 138025, 195071 133318, 193856 130934, 192051 127327, 190830 124845, 189099 121277, 188517 120105, 188107 119325, 187939 119035, 187726 118703, 187553 118511, 187316 118352, 186950 118356, 186289 118419, 185066 118554, 184775 118565, 184510 118473, 184308 118292, 184057 117975, 183906 117754, 183535 117162, 182767 115832, 182052 114550, 180876 112386, 179999 110731, 178606 108022, 177655 106110, 176706 104150, 175780 102171, 175332 101184, 174473 99228, 173675 97321, 172941 95478, 172594 94579, 171947 92834, 171356 91176, 170823 89624, 170346 88184, 169228 84692, 168851 83574, 168661 83081, 168503 82757, 168300 82521, 168114 82478, 167535 82727, 166455 83227, 166001 83414, 165762 83463, 165508 83454, 165144 83324, 164567 83059, 163379 82445, 159201 80220, 158265 79754, 157900 79607, 157531 79511, 157003 79493, 156740 79496, 156274 79529, 155916 79577, 155412 79676, 154860 79846, 154372 80038, 154114 80157, 153571 80440, 153006 80773, 152432 81138, 151594 81706, 149808 82983, 149526 83172, 149192 83352, 148867 83433, 148562 83455, 148195 83439, 147033 83296, 143540 82813, 141898 82605, 140916 82493, 140360 82441, 139962 82417, 139500 82423, 139227 82529, 139075 82640, 138818 82948, 137896 84307, 137446 84946, 137043 85489, 136758 85722, 136513 85729, 136300 85632, 135896 85372, 135526 85116, 134981 84716, 134876 84634, 134786 84771, 133406 86820, 131393 85694, 132948 83442, 134101 81726, 135307 79891, 136390 78210, 137522 76415, 139013 73988))) \ No newline at end of file diff --git a/stress_benchmark/resources/019.settings b/stress_benchmark/resources/019.settings new file mode 100644 index 0000000000..42fd9c7708 --- /dev/null +++ b/stress_benchmark/resources/019.settings @@ -0,0 +1,629 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=10 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=4 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.8 +raft_acceleration=500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=225.0 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=5 +material_break_temperature=50 +acceleration_support_interface=500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=2.4000240002400024 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=500 +speed_travel=200.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=45 +retraction_amount=5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=40.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=26.666666666666668 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=500 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.4 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=500 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.8 +speed_wall=40.0 +bottom_thickness=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=225.0 +brim_gap=0 +acceleration_support_infill=500 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=30.0 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=8 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=200.0 +acceleration_topbottom=500 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=80.0 +skin_overlap=10.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=40.0 +machine_max_acceleration_x=500 +support_interface_height=0.8 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=40.0 +material_print_temperature_layer_0=225.0 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=2.0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=500 +interlocking_orientation=22.5 +speed_wall_0_roofing=40.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=10 +infill_line_distance=6.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=30.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=45 +raft_base_speed=30.0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=20.0 +skirt_brim_material_flow=100 +acceleration_support_roof=500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=305.0 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=40.0 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.2 +jerk_wall_0=8 +mold_angle=40 +raft_speed=40.0 +prime_tower_wipe_enabled=True +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=500 +cool_min_temperature=225.0 +jerk_layer_0=8 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=False +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=10 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=220 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +material_standby_temperature=180.0 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +material_final_print_temperature=225.0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=noskin +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=20.0 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=225.0 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=20.0 +lightning_infill_straightening_angle=40 +speed_topbottom=40.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=20.0 +machine_max_jerk_z=0.4 +support_tree_angle=45 +expand_skins_expand_distance=0.8 +prime_tower_position_y=187.375 +mesh_position_x=0 +cross_infill_pocket_size=6.0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.2 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=500 +minimum_support_area=2 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=8 +adhesion_type=skirt +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=30 +z_seam_x=110.0 +acceleration_travel=500 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.04 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=500 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=207.375 +bridge_wall_min_length=2.2 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.0 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=cubic +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=500 +material_end_of_filament_purge_length=20 +speed_print=80.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=100 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=20 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +raft_jerk=8 +speed_support=40.0 +jerk_support_interface=8 +machine_disallowed_areas=[] +minimum_roof_area=10 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=500 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=40.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +support_bottom_pattern=grid +support_roof_height=0.8 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=10 +support_fan_enable=False +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=a55a7c05-b00d-42fc-953e-95b01860e05c +support_roof_line_distance=2.4000240002400024 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=500 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=20.0 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=8 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=3 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=100.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=500 +alternate_carve_order=True +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.6000000000000001 +machine_extruders_share_nozzle=False +acceleration_prime_tower=500 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=10.0 +wall_0_material_flow_roofing=100 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=225.0 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=40.0 +time=09:34:51 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=8 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=40.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=40.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=40.0 +material_bed_temp_wait=True +machine_depth=220 +bridge_wall_material_flow=50 +jerk_travel=8 +retraction_speed=45 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=220 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=40.0 +material_name=empty +acceleration_wall_0=500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/019.wkt b/stress_benchmark/resources/019.wkt new file mode 100644 index 0000000000..df74539f00 --- /dev/null +++ b/stress_benchmark/resources/019.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((120264 173957, 120384 174108, 110615 174109, 110736 173957, 111261 172596, 119739 172595)), ((109264 173957, 109384 174108, 99615 174109, 99736 173957, 100261 172596, 108739 172595)), ((98264 173957, 98384 174108, 88616 174108, 88736 173957, 89261 172596, 97739 172595)), ((131264 173957, 131384 174108, 121616 174108, 121736 173957, 122261 172596, 130739 172595)), ((174108 131384, 173957 131264, 172596 130739, 172596 122260, 173957 121736, 174108 121616)), ((46043 121736, 47404 122261, 47405 130739, 46043 131264, 45892 131384, 45892 121616)), ((174109 120385, 173957 120264, 172596 119739, 172596 111260, 173957 110736, 174108 110616)), ((46043 110736, 47404 111261, 47405 119739, 46043 120264, 45892 120384, 45891 110615)), ((174109 109385, 173957 109264, 172596 108739, 172596 100260, 173957 99736, 174108 99616)), ((46043 99736, 47404 100261, 47405 108739, 46043 109264, 45892 109384, 45891 99615)), ((46043 88736, 47404 89261, 47405 97739, 46043 98264, 45892 98384, 45892 88616)), ((174108 98384, 173957 98264, 172596 97739, 172596 89260, 173957 88736, 174108 88616)), ((98264 46043, 97739 47404, 89260 47404, 88736 46043, 88616 45892, 98384 45892)), ((131264 46043, 130739 47404, 122260 47404, 121736 46043, 121616 45892, 131384 45892)), ((120264 46043, 119739 47404, 111260 47404, 110736 46043, 110616 45892, 120385 45891)), ((109264 46043, 108739 47404, 100260 47404, 99736 46043, 99616 45892, 109385 45891)), ((165002 41351, 165002 42361, 177640 42360, 177639 55002, 178648 55002, 178655 55358, 178649 77573, 178655 77646, 178649 78002, 177639 78002, 177639 80000, 176630 80000, 176630 81000, 177639 81000, 177640 139000, 176630 139000, 176630 140000, 177639 140000, 177640 142002, 178648 142002, 178655 142358, 178649 164573, 178655 164646, 178649 165002, 177639 165002, 177640 177640, 164998 177639, 164998 178648, 164642 178655, 142427 178649, 142354 178655, 141998 178649, 141998 177639, 140000 177639, 140000 176630, 139000 176630, 139000 177639, 81000 177640, 81000 176630, 80000 176630, 80000 177639, 77998 177640, 77998 178648, 77642 178655, 55427 178649, 55354 178655, 54998 178649, 54998 177639, 42360 177640, 42361 164998, 41352 164998, 41345 164642, 41351 142427, 41345 142354, 41351 141998, 42361 141998, 42361 140000, 43369 140000, 43370 139000, 42361 139000, 42360 81000, 43370 81000, 43370 80000, 42361 80000, 42360 77998, 41352 77998, 41345 77642, 41351 55427, 41345 55354, 41351 54998, 42361 54998, 42360 42360, 55002 42361, 55002 41352, 55358 41345, 77573 41351, 77646 41345, 78002 41351, 78002 42361, 80000 42361, 80000 43370, 81000 43370, 81000 42361, 139000 42360, 139000 43370, 140000 43370, 140000 42361, 142002 42360, 142002 41352, 142358 41345, 164573 41351, 164646 41345) (80000 45891, 87384 45892, 87264 46043, 86739 47404, 47405 47405, 47405 86739, 46043 87264, 45892 87384, 45891 80000, 44379 80000, 44378 140000, 45891 140000, 45892 132616, 46043 132736, 47404 133261, 47404 172596, 86739 172595, 87264 173957, 87384 174108, 80000 174109, 80000 175621, 140000 175622, 140000 174109, 132616 174108, 132736 173957, 133261 172596, 172596 172596, 172595 133261, 173957 132736, 174108 132616, 174109 140000, 175621 140000, 175622 80000, 174109 80000, 174108 87384, 173957 87264, 172596 86739, 172596 47404, 133261 47405, 132736 46043, 132616 45892, 140000 45891, 140000 44379, 80000 44378))) \ No newline at end of file diff --git a/stress_benchmark/resources/020.settings b/stress_benchmark/resources/020.settings new file mode 100644 index 0000000000..aa4cb141d8 --- /dev/null +++ b/stress_benchmark/resources/020.settings @@ -0,0 +1,629 @@ +material_bed_temperature=60 +support_tree_rest_preference=buildplate +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.25 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=4 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.8 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.75 +raft_acceleration=3000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.52 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.25 +meshfix_union_all=True +layer_height_0=0.3 +support_initial_layer_line_distance=4.444444444444445 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.8 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=265 +min_even_wall_line_width=0.68 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=2.0 +material_break_temperature=50 +acceleration_support_interface=3000 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.3 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=0.8421052631578947 +support_bottom_stair_step_height=0.25 +acceleration_wall_x_roofing=3000 +speed_travel=500 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.3 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=2.4000000000000004 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=35 +retraction_amount=2.0 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.8 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=60 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=40.0 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.35 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.8 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.8 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3000 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.4 +speed_wall=60 +bottom_thickness=0.8 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=0.0 +wall_line_count=1 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.2 +material_break_preparation_temperature=265 +brim_gap=0 +acceleration_support_infill=3000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=30.0 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=30.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=120 +acceleration_topbottom=3000 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=80 +skin_overlap=5 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=53.333333333333336 +machine_max_acceleration_x=9000 +support_interface_height=0.75 +skirt_height=3 +support_roof_pattern=concentric +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=70 +material_print_temperature_layer_0=265 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.8 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=4.444444444444445 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=False +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3000 +interlocking_orientation=22.5 +speed_wall_0_roofing=60 +sub_div_rad_add=0.8 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1.0 +infill_line_distance=0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=36.666666666666664 +support_interface_line_width=0.8 +support_skip_zag_per_mm=20 +support_angle=55 +raft_base_speed=30.0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.8 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=30.0 +skirt_brim_material_flow=100 +acceleration_support_roof=3000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=900.0 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=80 +raft_base_line_spacing=3.2 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=35 +wipe_pause=0 +prime_tower_raft_base_line_spacing=3.2 +support_bottom_stair_step_width=5.0 +support_interface_density=95 +retraction_hop=1 +jerk_wall_0=20 +mold_angle=40 +raft_speed=40.0 +prime_tower_wipe_enabled=True +support_roof_density=95 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=3000 +cool_min_temperature=265 +jerk_layer_0=20 +support_offset=1.2000000000000002 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.3 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.8 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=1 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=800.0 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=35 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.8 +retract_at_layer_change=False +wall_transition_length=0.8 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=1.6 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +material_final_print_temperature=265 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.8 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=3000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=no_outer_surfaces +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.76 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=30.0 +roofing_layer_count=1 +speed_slowdown_layers=1 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.08 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=1.6 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.25 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=30.0 +lightning_infill_straightening_angle=40 +speed_topbottom=60 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=40.0 +machine_max_jerk_z=0.4 +support_tree_angle=55 +expand_skins_expand_distance=0.8 +prime_tower_position_y=770.175 +mesh_position_x=0 +cross_infill_pocket_size=0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.8 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=1.6 +support_bottom_distance=0 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=3000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.68 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=3000 +minimum_support_area=0.0 +brim_width=8.0 +small_skin_width=1.6 +shell=0 +jerk_print=20 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=0 +z_seam_x=-2000 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=3000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.8 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=concentric +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=3000 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=35 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=790.175 +bridge_wall_min_length=1.8 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.4 +skin_edge_support_layers=0 +support_type=buildplate +support_skip_some_zags=False +support_line_width=0.8 +ooze_shield_enabled=False +raft_base_thickness=0.36 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.8 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=grid +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=3000 +material_end_of_filament_purge_length=20 +speed_print=80 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3000 +carve_multiple_volumes=False +raft_surface_thickness=0.3 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=5000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=20 +skin_material_flow=100 +support_bottom_density=95 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=0 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=40.0 +raft_jerk=20 +speed_support=80 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=20 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=3000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=80 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=35 +support_bottom_pattern=concentric +support_roof_height=0.75 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=7.347880794884119e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=2.0 +support_fan_enable=False +infill_wipe_dist=0.2 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.68 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.6 +acceleration_layer_0=3000 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=0.8421052631578947 +brim_line_count=10 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +machine_nozzle_size=0.8 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=3000 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=30.0 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=1 +infill_mesh=False +layer_height=0.3 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=250.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.45 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.8 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=1.6 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.3 +machine_extruders_share_nozzle=False +machine_name=Unknown +acceleration_prime_tower=3000 +retraction_hop_after_extruder_switch_height=1 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=265 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=3000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=18 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=20 +speed_wall_x=70 +time=09:35:50 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.44999999999999996 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=900.0 +support_bottom_extruder_nr=0 +speed_support_roof=53.333333333333336 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=60 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=53.333333333333336 +material_bed_temp_wait=True +machine_depth=800.0 +bridge_wall_material_flow=50 +jerk_travel=30 +retraction_speed=35 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=1.6 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=-2000 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=40.0 +raft_surface_speed=40.0 +material_name=empty +acceleration_wall_0=3000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/020.wkt b/stress_benchmark/resources/020.wkt new file mode 100644 index 0000000000..f60f1015df --- /dev/null +++ b/stress_benchmark/resources/020.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((402121 100550, 402567 100684, 402759 100844, 402807 101064, 401914 110025, 400645 123031, 400840 125036, 412494 125403, 412515 125536, 412689 125681, 412692 125682, 412697 125681, 412886 125554, 412921 125416, 412494 125403, 412482 125323, 412824 123054, 412443 115525, 411786 101283, 411841 101065, 412038 100914, 412374 100830, 412847 100812, 413937 100844, 415387 100946, 415816 101100, 415997 101269, 416032 101492, 414220 113794, 412824 123054, 412940 125344, 412921 125416, 417267 125553, 426762 126450, 426775 126570, 426932 126714, 427112 126603, 427148 126487, 426762 126450, 426751 126354, 427169 124222, 427138 113717, 427083 102299, 427152 102085, 427359 101944, 427819 101854, 429295 101967, 430768 102138, 431204 102315, 431380 102493, 431406 102716, 429574 111944, 427169 124222, 427175 126397, 427148 126487, 434465 127178, 438949 127888, 438957 128037, 439116 128200, 439121 128202, 439139 128201, 439338 128092, 439387 127958, 438949 127888, 438946 127822, 439526 125509, 439883 118011, 440616 103833, 440691 103621, 440900 103490, 441350 103419, 442776 103601, 444194 103840, 444602 104034, 444763 104219, 444776 104444, 441784 116510, 439526 125509, 439413 127888, 439387 127958, 451528 129881, 453033 130218, 453033 130219, 453037 130437, 453189 130606, 453204 130612, 453217 130612, 453421 130512, 453500 130322, 453033 130218, 453735 127862, 454687 117762, 455749 106320, 455838 106115, 456054 105994, 456514 105947, 457942 106195, 459360 106501, 459772 106719, 459927 106913, 459930 107138, 457215 116176, 453735 127862, 453504 130312, 453500 130322, 465054 132905, 465046 133079, 465187 133256, 465208 133266, 465235 133267, 465444 133176, 465522 133010, 465054 132905, 465056 132863, 465895 130508, 466965 123133, 469045 109151, 469142 108948, 469360 108836, 469816 108811, 471211 109126, 472593 109500, 472981 109732, 473123 109933, 473114 110157, 468964 121890, 465895 130508, 465536 132980, 465522 133010, 468387 133650, 478829 136684, 478819 136820, 478954 137004, 478982 137019, 479010 137021, 479223 136940, 479289 136817, 478829 136684, 478835 136602, 479825 134163, 481707 124432, 483880 113088, 483987 112892, 484212 112791, 484668 112787, 486052 113167, 487422 113606, 487801 113860, 487935 114067, 487915 114291, 484347 123023, 479825 134163, 479325 136749, 479289 136817, 484977 138470, 490555 140478, 490535 140616, 490658 140806, 490677 140817, 490703 140821, 490919 140751, 490989 140635, 490555 140478, 490566 140402, 491622 138152, 493407 130870, 496812 117182, 496927 116988, 497157 116899, 497614 116918, 498978 117368, 500325 117876, 500688 118145, 500811 118358, 500781 118581, 495501 129890, 491622 138152, 491031 140565, 490989 140635, 501231 144322, 503912 145482, 503880 145664, 503996 145860, 504027 145880, 504057 145886, 504276 145826, 504372 145681, 503912 145482, 503918 145450, 505153 143088, 507945 133654, 511214 122536, 511340 122350, 511572 122271, 512024 122311, 513360 122820, 514675 123386, 515028 123675, 515139 123893, 515099 124114, 510728 132424, 505153 143088, 504396 145645, 504372 145681, 515236 150382, 515187 150582, 515293 150782, 515299 150787, 515309 150789, 515531 150741, 515660 150567, 515660 150566, 515236 150382, 515239 150372, 516429 148368, 518954 141146, 523657 127844, 523790 127663, 524030 127597, 524486 127662, 525818 128250, 527119 128887, 527464 129196, 527568 129421, 527518 129640, 521140 140434, 516429 148368, 515660 150566, 517085 151182, 528024 156756, 527986 156893, 528083 157099, 528106 157117, 528123 157122, 528347 157083, 528441 156968, 528024 156756, 528044 156684, 529450 154528, 533167 145343, 537498 134570, 537642 134398, 537881 134342, 538331 134426, 539613 135064, 540873 135757, 541196 136078, 541286 136307, 541225 136523, 536114 144308, 529450 154528, 528484 156915, 528441 156968, 532478 159025, 538810 162770, 538769 162884, 538847 163072, 539049 163048, 539129 162959, 538810 162770, 538842 162681, 540043 161044, 543360 153855, 549332 141033, 549483 140867, 549730 140826, 550192 140942, 551479 141667, 552739 142442, 553059 142786, 553144 143022, 553072 143235, 545636 153423, 540043 161044, 539193 162887, 539129 162959, 547347 167819, 550927 170252, 550876 170385, 550956 170601, 550969 170613, 550983 170619, 551211 170605, 551307 170510, 550927 170252, 550954 170182, 552536 168209, 557140 159389, 562488 149077, 562648 148919, 562893 148889, 563332 149016, 564565 149785, 565763 150605, 566059 150959, 566129 151196, 566048 151406, 560268 158565, 552536 168209, 551365 170452, 551307 170510, 560945 177060, 560942 177064, 560852 177260, 560903 177435, 561088 177430, 561247 177285, 561255 177271, 560945 177060, 562203 175648, 566108 168965, 573440 156507, 573607 156356, 573857 156340, 574300 156495, 575510 157341, 576685 158230, 576970 158601, 577031 158844, 576940 159050, 568764 168284, 562203 175648, 561255 177271, 561635 177529, 572499 185956, 572428 186095, 572486 186318, 572497 186331, 572512 186339, 572741 186349, 572870 186244, 572499 185956, 572526 185902, 574302 184091, 579493 176182, 586095 166048, 586270 165906, 586518 165900, 586941 166069, 588093 166956, 589208 167890, 589465 168269, 589511 168512, 589410 168713, 583298 174914, 574302 184091, 572910 186211, 572870 186244, 575285 188117, 581473 193572, 581414 193674, 581453 193873, 581657 193888, 581751 193818, 581473 193572, 581522 193487, 583026 192096, 587296 186159, 595929 174219, 596110 174084, 596360 174092, 596791 174293, 597915 175252, 599003 176253, 599252 176653, 599290 176900, 599180 177097, 590390 185285, 583026 192096, 581830 193759, 581751 193818, 588244 199542, 592330 203628, 592260 203741, 592292 203967, 592303 203983, 592326 203998, 592553 204028, 592659 203957, 592330 203628, 592375 203557, 594360 201890, 600242 194598, 607827 185134, 608015 185010, 608261 185026, 608666 185235, 609712 186217, 610717 187240, 610936 187642, 610958 187887, 610837 188077, 604107 193705, 594360 201890, 592733 203907, 592659 203957, 600459 211757, 600650 211973, 600621 211995, 600495 212171, 600517 212397, 600521 212404, 600531 212411, 600755 212449, 600939 212336, 600954 212319, 600650 211973, 602485 210576, 607188 205222, 616865 194255, 617056 194138, 617301 194166, 617702 194400, 618713 195443, 619680 196524, 619883 196940, 619895 197188, 619766 197372, 610235 204676, 602485 210576, 600954 212319, 610434 223073, 610312 223232, 610321 223460, 610336 223487, 610366 223511, 610589 223562, 610776 223460, 610434 223073, 610444 223060, 612660 221538, 619121 214942, 627611 206226, 627810 206120, 628052 206159, 628436 206405, 629378 207478, 630277 208591, 630456 209011, 630453 209257, 630314 209433, 623059 214398, 612660 221538, 610780 223458, 610776 223460, 611883 224716, 617790 232330, 617705 232426, 617705 232653, 617715 232674, 617735 232691, 617954 232751, 618072 232694, 617790 232330, 617849 232263, 619975 230946, 625107 226135, 635748 216201, 635950 216102, 636190 216153, 636562 216419, 637459 217543, 638306 218697, 638467 219129, 638453 219375, 638306 219545, 628109 225907, 619975 230946, 618150 232657, 618072 232694, 622471 238365, 626502 244297, 626412 244391, 626401 244618, 626414 244649, 626436 244670, 626653 244740, 626770 244691, 626502 244297, 626562 244233, 628874 242955, 635949 237000, 645263 229120, 645471 229035, 645709 229097, 646070 229384, 646907 230546, 647699 231746, 647836 232181, 647809 232425, 647654 232588, 639979 236816, 628874 242955, 626853 244656, 626770 244691, 632181 252654, 633039 254105, 632884 254250, 632863 254477, 632873 254503, 632890 254521, 633102 254600, 633291 254530, 633039 254105, 633042 254102, 635301 252988, 640883 248688, 652412 239848, 652621 239770, 652856 239843, 653199 240141, 653981 241341, 654709 242569, 654826 243010, 654788 243252, 654625 243407, 643848 248771, 635301 252988, 633305 254525, 633291 254530, 640590 266871, 640569 266880, 640405 267022, 640374 267248, 640380 267266, 640388 267276, 640597 267367, 640805 267303, 640834 267283, 640590 266871, 642848 265895, 650574 260568, 660621 253605, 660837 253540, 661069 253627, 661401 253948, 662131 255203, 662812 256492, 662909 256940, 662860 257182, 662691 257330, 654711 260765, 642848 265895, 640834 267283, 640976 267523, 645990 277364, 645888 277443, 645846 277666, 645850 277683, 645857 277691, 646060 277790, 646190 277756, 645990 277364, 646059 277310, 648302 276461, 654364 272661, 666704 264972, 666920 264913, 667147 265010, 667462 265342, 668125 266614, 668735 267912, 668808 268363, 668747 268602, 668570 268740, 657295 273058, 648302 276461, 646270 277735, 646190 277756, 648819 282916, 652252 290851, 652156 290919, 652107 291127, 652292 291232, 652407 291208, 652252 290851, 652332 290794, 654418 290123, 662858 285428, 673543 279448, 673764 279405, 673988 279518, 674293 279879, 674907 281223, 675473 282592, 675530 283060, 675459 283300, 675277 283431, 667120 286039, 654418 290123, 652504 291188, 652407 291208, 655679 298770, 656720 301662, 656581 301751, 656517 301969, 656517 301971, 656521 301977, 656715 302100, 656869 302076, 656720 301662, 656764 301634, 658999 301031, 665426 297816, 678499 291333, 678720 291297, 678937 291417, 679217 291778, 679762 293127, 680248 294490, 680280 294952, 680197 295185, 680008 295308, 668352 298508, 658999 301031, 656928 302067, 656869 302076, 661531 315024, 661657 315456, 661640 315460, 661453 315567, 661390 315749, 661547 315858, 661761 315833, 661765 315831, 661657 315456, 663614 315025, 672997 310933, 683834 306177, 684059 306155, 684270 306288, 684536 306674, 685018 308067, 685448 309478, 685459 309947, 685366 310180, 685172 310293, 676374 312213, 663614 315025, 661765 315831, 665018 327028, 664898 327089, 664813 327299, 664816 327306, 664995 327447, 665137 327438, 665018 327028, 665092 326991, 667355 326615, 674397 323926, 687739 318900, 687963 318886, 688167 319026, 688412 319417, 688822 320810, 689171 322213, 689158 322677, 689052 322901, 688852 323004, 676591 325082, 667355 326615, 665211 327434, 665137 327438, 666350 331614, 668431 340921, 668321 340970, 668234 341163, 668394 341301, 668515 341298, 668431 340921, 668518 340881, 670671 340620, 680657 337344, 691499 333763, 691725 333763, 691923 333915, 692094 334223, 692239 334686, 692498 335764, 692791 337217, 692758 337687, 692643 337909, 692439 338003, 683096 339113, 670671 340620, 668610 341296, 668515 341298, 670119 348473, 670829 352957, 670690 353010, 670585 353210, 670585 353217, 670591 353233, 670756 353389, 670899 353394, 672822 365536, 672967 367070, 672964 367070, 672759 367140, 672645 367338, 672644 367353, 672649 367368, 672807 367531, 673012 367546, 674126 379333, 673957 379380, 673832 379568, 673829 379590, 673837 379618, 673987 379788, 674171 379812, 674447 382734, 674789 393602, 674656 393633, 674523 393819, 674517 393852, 674523 393878, 674666 394055, 674804 394080, 674990 400000, 674804 405926, 674666 405951, 674523 406126, 674518 406147, 674523 406173, 674656 406357, 674789 406388, 674447 417267, 674172 420176, 673988 420202, 673837 420373, 673828 420406, 673832 420438, 673957 420629, 674125 420676, 673011 432459, 672806 432475, 672648 432637, 672645 432645, 672646 432654, 672760 432851, 672966 432920, 672967 432920, 672821 434465, 670901 446591, 670758 446598, 670592 446756, 670583 446781, 670583 446797, 670689 446999, 670828 447053, 670119 451528, 668514 458708, 668608 458710, 670538 459347, 678399 460280, 692438 461998, 692643 462090, 692758 462313, 692792 462786, 692498 464236, 692152 465673, 691923 466085, 691725 466237, 691500 466236, 679513 462311, 670538 459347, 668521 459108, 668433 459069, 668514 458708, 668393 458705, 668239 458836, 668324 459020, 668433 459069, 666350 468387, 665142 472544, 665217 472548, 667582 473443, 677393 475097, 688853 476995, 689052 477099, 689158 477323, 689171 477783, 688822 479190, 688414 480580, 688167 480974, 687963 481114, 687738 481101, 679143 477816, 667582 473443, 665088 473022, 665014 472984, 665142 472544, 665000 472537, 664819 472680, 664811 472697, 664810 472710, 664895 472923, 665014 472984, 661763 484175, 663496 484936, 671060 486585, 685171 489708, 685366 489820, 685460 490053, 685449 490522, 685018 491933, 684535 493328, 684270 493712, 684059 493845, 683835 493822, 672526 488900, 663496 484936, 661658 484535, 661763 484175, 661758 484173, 661544 484149, 661393 484252, 661455 484426, 661643 484532, 661658 484535, 661530 484977, 656873 497913, 656933 497922, 659203 499051, 668330 501545, 680009 504692, 680197 504815, 680280 505048, 680248 505507, 679762 506873, 679219 508220, 678937 508583, 678720 508703, 678498 508668, 670712 504772, 659203 499051, 656757 498382, 656714 498354, 656873 497913, 656718 497890, 656526 498012, 656514 498031, 656512 498044, 656575 498265, 656714 498354, 655678 501231, 652402 508801, 652499 508822, 654288 509823, 661252 512049, 675276 516570, 675459 516700, 675530 516940, 675472 517412, 674907 518777, 674293 520120, 673988 520482, 673764 520595, 673544 520551, 663040 514721, 654288 509823, 652335 509199, 652255 509142, 652402 508801, 652288 508776, 652111 508875, 652159 509075, 652255 509142, 648818 517085, 646194 522235, 646275 522255, 648471 523626, 657227 526969, 668571 531258, 668747 531398, 668808 531637, 668735 532086, 668125 533386, 667463 534656, 667147 534990, 666920 535086, 666703 535029, 659271 530369, 648471 523626, 646053 522703, 645983 522649, 646194 522235, 646064 522202, 645860 522303, 645847 522320, 645840 522345, 645882 522570, 645983 522649, 640975 532478, 640829 532726, 642728 534042, 649269 536858, 662690 542671, 662860 542818, 662909 543060, 662812 543510, 662131 544797, 661399 546053, 661069 546373, 660837 546460, 660622 546394, 650730 539587, 642728 534042, 640594 533123, 640829 532726, 640799 532705, 640593 532639, 640385 532730, 640380 532736, 640376 532748, 640408 532972, 640573 533114, 640594 533123, 633295 545464, 633309 545469, 635428 547096, 643713 551210, 654626 556592, 654788 556748, 654826 556990, 654710 557430, 653981 558659, 653200 559858, 652856 560157, 652621 560230, 652411 560153, 645448 554789, 635428 547096, 633036 545908, 633033 545906, 633295 545464, 633105 545395, 632892 545475, 632869 545499, 632857 545532, 632878 545759, 633033 545906, 632181 547347, 626764 555317, 626846 555353, 628746 556960, 634917 560360, 647653 567413, 647809 567575, 647836 567819, 647698 568255, 646907 569454, 646069 570617, 645709 570903, 645470 570966, 645264 570879, 636062 563148, 628746 556960, 626566 555759, 626506 555697, 626764 555317, 626648 555266, 626432 555336, 626414 555353, 626404 555377, 626415 555604, 626506 555697, 622470 561635, 618075 567301, 618154 567339, 620082 569141, 627935 574031, 638307 580454, 638452 580626, 638467 580871, 638306 581302, 637459 582457, 636564 583580, 636191 583847, 635950 583897, 635747 583799, 629355 577807, 620082 569141, 617842 567746, 617783 567678, 618075 567301, 617958 567245, 617738 567304, 617713 567326, 617700 567353, 617700 567582, 617783 567678, 611883 575285, 610768 576549, 610771 576551, 612524 578350, 618342 582333, 630313 590568, 630453 590743, 630456 590989, 630277 591409, 629378 592522, 628432 593597, 628052 593841, 627810 593880, 627612 593773, 619180 585181, 612524 578350, 610451 576931, 610442 576920, 610768 576549, 610581 576447, 610359 576495, 610339 576511, 610326 576535, 610316 576761, 610442 576920, 600959 587675, 602586 589521, 610039 595223, 619767 602626, 619895 602812, 619883 603060, 619680 603474, 618713 604557, 617701 605601, 617301 605833, 617056 605862, 616864 605746, 611130 599219, 602586 589521, 600642 588035, 600959 587675, 600944 587658, 600758 587547, 600534 587586, 600519 587597, 600512 587608, 600489 587835, 600614 588013, 600642 588035, 600458 588244, 592649 596053, 592722 596103, 594220 597971, 599709 602564, 610836 611924, 610958 612112, 610936 612358, 610717 612760, 609712 613783, 608670 614762, 608261 614974, 608015 614990, 607828 614865, 600237 605475, 594220 597971, 592383 596434, 592338 596364, 592649 596053, 592543 595981, 592318 596009, 592305 596017, 592298 596028, 592265 596253, 592338 596364, 588243 600459, 581757 606177, 581837 606236, 583121 608015, 590192 614589, 599181 622902, 599290 623100, 599252 623347, 599003 623747, 597915 624748, 597070 625469, 596680 625759, 596360 625908, 596110 625915, 595928 625782, 590928 618831, 583121 608015, 581514 606521, 581465 606434, 581757 606177, 581662 606108, 581449 606124, 581407 606332, 581465 606434, 575284 611883, 572856 613767, 572896 613800, 574158 615736, 579203 620856, 589409 631288, 589511 631488, 589465 631731, 589208 632109, 588093 633044, 586942 633930, 586518 634100, 586270 634093, 586096 633952, 579450 623855, 574158 615736, 572536 614090, 572509 614036, 572856 613767, 572729 613662, 572501 613669, 572495 613676, 572438 613896, 572509 614036, 561635 622471, 561262 622724, 562280 624457, 569068 632112, 576941 640949, 577031 641156, 576970 641399, 576685 641771, 575510 642659, 574299 643505, 573857 643660, 573607 643644, 573439 643494, 568895 635719, 562280 624457, 560939 622944, 561262 622724, 561254 622710, 561093 622566, 560901 622562, 560846 622744, 560936 622941, 560939 622944, 551295 629497, 551353 629556, 552411 631595, 557144 637459, 566047 648595, 566129 648804, 566059 649041, 565764 649395, 564564 650215, 563334 650984, 562893 651111, 562648 651080, 562488 650922, 556723 639904, 552411 631595, 550969 629808, 550942 629738, 551295 629497, 551201 629402, 550975 629387, 550972 629388, 550968 629392, 550890 629606, 550942 629738, 547346 632181, 539138 637036, 539203 637107, 540120 639081, 546317 647559, 553073 656764, 553144 656978, 553059 657214, 552819 657472, 552424 657752, 551479 658332, 550190 659059, 549730 659173, 549484 659133, 549331 658968, 545389 650425, 540120 639081, 538835 637323, 538804 637233, 539138 637036, 539056 636948, 538845 636924, 538765 637119, 538804 637233, 532477 640976, 528432 643037, 528475 643090, 529366 645306, 533482 651576, 541224 663478, 541286 663693, 541196 663922, 540874 664241, 539613 664936, 538333 665573, 537881 665658, 537642 665602, 537499 665429, 532828 653909, 529366 645306, 528056 643309, 528036 643239, 528432 643037, 528339 642921, 528115 642883, 528108 642885, 528094 642896, 527997 643101, 528036 643239, 517084 648819, 515671 649430, 516491 651759, 521652 660480, 527518 670359, 527568 670579, 527464 670804, 527118 671114, 525818 671750, 524484 672338, 524030 672403, 523791 672337, 523656 672157, 520540 663247, 516491 651759, 515233 649632, 515230 649621, 515671 649430, 515670 649428, 515539 649255, 515315 649208, 515301 649212, 515289 649220, 515182 649422, 515230 649621, 504365 654323, 504388 654358, 505096 656762, 508563 663353, 515098 675886, 515139 676107, 515028 676325, 514674 676613, 513360 677180, 512026 677689, 511572 677729, 511340 677650, 511215 677463, 507676 665531, 505096 656762, 503929 654545, 503923 654514, 504365 654323, 504269 654177, 504051 654116, 504029 654120, 504005 654136, 503890 654331, 503923 654514, 501230 655679, 491000 659362, 491042 659431, 491675 661988, 495873 670964, 500782 681418, 500811 681642, 500688 681855, 500323 682126, 498978 682632, 497611 683082, 497157 683101, 496927 683012, 496811 682819, 494565 673657, 491675 661988, 490559 659601, 490549 659525, 491000 659362, 490928 659246, 490710 659177, 490675 659182, 490653 659195, 490530 659386, 490549 659525, 484976 661531, 479282 663185, 479318 663253, 479786 665695, 482622 672634, 487914 685710, 487935 685933, 487801 686140, 487423 686393, 486052 686832, 484668 687213, 484212 687209, 483987 687108, 483880 686911, 481505 674658, 479786 665695, 478846 663394, 478839 663314, 479282 663185, 479217 663061, 479006 662980, 478984 662982, 478961 662994, 478828 663178, 478839 663314, 468386 666350, 465535 666987, 465549 667016, 465939 669656, 469225 678927, 473115 689843, 473123 690067, 472981 690268, 472589 690503, 471211 690873, 469814 691189, 469360 691164, 469142 691052, 469044 690850, 467696 681557, 465939 669656, 465047 667140, 465045 667097, 465535 666987, 465453 666821, 465244 666731, 465208 666733, 465180 666746, 465039 666923, 465045 667097, 453494 669679, 453498 669690, 453713 672009, 455915 679337, 459929 692863, 459927 693087, 459772 693281, 459364 693497, 457942 693805, 456869 693992, 456398 694041, 456054 694006, 455838 693885, 455749 693679, 454565 681197, 453713 672009, 453043 669780, 453494 669679, 453416 669489, 453213 669388, 453207 669388, 453197 669392, 453044 669562, 453043 669779, 453043 669780, 451527 670119, 439401 672040, 439427 672108, 439557 674672, 441950 684295, 444777 695555, 444763 695781, 444601 695966, 444191 696162, 442776 696399, 441345 696580, 440899 696510, 440691 696379, 440615 696168, 440173 686864, 439557 674672, 438937 672181, 438941 672113, 439401 672040, 439351 671906, 439150 671797, 439124 671796, 439107 671802, 438949 671964, 438941 672113, 434464 672822, 427141 673514, 427168 673605, 427158 675639, 428700 683400, 431405 697285, 431380 697507, 431204 697685, 430772 697861, 429295 698033, 427824 698147, 427359 698056, 427152 697915, 427084 697700, 427113 685088, 427158 675639, 426762 673644, 426772 673549, 427141 673514, 427106 673397, 426933 673290, 426784 673429, 426772 673549, 417266 674447, 412939 674583, 412958 674654, 412839 677168, 414300 687025, 416033 698507, 415997 698731, 415816 698900, 415383 699056, 413937 699156, 412484 699197, 412038 699086, 411842 698935, 411785 698718, 412253 689528, 412839 677168, 412470 674679, 412482 674597, 412939 674583, 412902 674446, 412711 674318, 412693 674316, 412679 674319, 412502 674465, 412482 674597, 400833 674964, 400646 676836, 401416 684547, 402806 698935, 402759 699156, 402567 699316, 402231 699417, 401750 699458, 400642 699478, 399173 699451, 398719 699315, 398527 699155, 398480 698935, 399665 686658, 400646 676836, 400460 674976, 400833 674964, 400833 674959, 400792 674747, 400647 674635, 400500 674747, 400458 674959, 400460 674976, 400000 674990, 386256 674558, 386232 674403, 386056 674257, 386038 674253, 386022 674255, 385831 674382, 385789 674543, 386256 674558, 386266 674618, 385896 677117, 386344 686577, 386959 698656, 386901 698872, 386705 699023, 386264 699135, 384809 699096, 383363 698995, 382928 698839, 382747 698669, 382711 698447, 384011 689838, 385896 677117, 385776 674592, 385789 674543, 382734 674447, 374522 673671, 374509 673554, 374360 673415, 374185 673523, 374150 673636, 374522 673671, 374532 673768, 374131 675786, 374167 683091, 374201 697825, 374133 698040, 373927 698181, 373463 698272, 371988 698156, 370515 697985, 370082 697809, 369905 697631, 369878 697408, 372178 685618, 374131 675786, 374121 673730, 374150 673636, 365535 672822, 359825 671917, 359817 671783, 359658 671621, 359635 671613, 359611 671614, 359412 671724, 359367 671845, 359825 671917, 359830 672001, 359206 674510, 358733 683872, 358159 695988, 358081 696198, 357872 696329, 357424 696399, 355998 696220, 354585 695983, 354169 695786, 354008 695600, 353995 695376, 356130 686869, 359206 674510, 359336 671927, 359367 671845, 348472 670119, 348190 670056, 348201 670021, 348200 669805, 348050 669636, 348040 669632, 348030 669632, 347827 669733, 347743 669933, 347741 669956, 348190 670056, 347527 672267, 346869 679360, 345487 693921, 345400 694128, 345185 694249, 344720 694296, 343293 694045, 341873 693738, 341466 693523, 341311 693329, 341307 693104, 344726 681593, 347527 672267, 347741 669956, 333749 666827, 333756 666626, 333613 666448, 333583 666434, 333548 666432, 333338 666522, 333246 666715, 333749 666827, 333748 666843, 332854 669367, 331502 678511, 329756 690554, 329658 690755, 329439 690866, 328991 690892, 327591 690579, 326212 690208, 325818 689971, 325675 689771, 325685 689546, 328636 681266, 332854 669367, 333245 666718, 333246 666715, 331613 666350, 322358 663661, 322370 663535, 322238 663351, 322218 663340, 322191 663338, 321978 663418, 321917 663533, 322358 663661, 322350 663750, 321407 666059, 320082 672973, 317310 687265, 317204 687464, 316980 687565, 316521 687568, 315138 687186, 313770 686747, 313390 686495, 313256 686288, 313275 686064, 317785 674924, 321407 666059, 321876 663609, 321917 663533, 315023 661530, 308277 659101, 308293 658972, 308169 658781, 308141 658764, 308110 658760, 307893 658830, 307827 658939, 308277 659101, 308266 659188, 307143 661590, 304921 670558, 302018 682407, 301900 682598, 301672 682687, 301215 682668, 299851 682220, 298508 681716, 298138 681442, 298016 681229, 298046 681006, 301770 673074, 307143 661590, 307780 659016, 307827 658939, 298770 655678, 297222 655008, 297263 654800, 297148 654604, 297127 654590, 297099 654585, 296880 654645, 296769 654812, 297222 655008, 297221 655012, 296050 657240, 294061 664001, 289930 677929, 289806 678116, 289573 678195, 289119 678155, 287783 677644, 286470 677078, 286118 676790, 286006 676572, 286047 676351, 291614 665676, 296050 657240, 296760 654825, 296769 654812, 283610 649118, 283621 649099, 283669 648887, 283563 648687, 283546 648675, 283535 648672, 283312 648720, 283182 648894, 283170 648928, 283610 649118, 282357 651236, 279237 660086, 275202 671626, 275066 671805, 274826 671870, 274367 671804, 273041 671220, 271737 670582, 271391 670272, 271288 670047, 271339 669828, 275774 662359, 282357 651236, 283170 648928, 282916 648818, 273074 643804, 273110 643681, 273014 643476, 273002 643467, 272990 643463, 272766 643500, 272682 643604, 273074 643804, 273050 643888, 271734 645892, 269064 652530, 263600 666005, 263459 666180, 263219 666235, 262769 666151, 261484 665510, 260225 664816, 259904 664498, 259812 664269, 259874 664053, 266458 653932, 271734 645892, 272629 643669, 272682 643604, 267523 640975, 260080 636573, 260118 636462, 260036 636265, 259825 636289, 259746 636375, 260080 636573, 260048 636667, 258756 638435, 254686 647195, 249558 658313, 249403 658478, 249156 658518, 248699 658405, 247410 657679, 246151 656906, 245827 656559, 245743 656323, 245814 656110, 250880 649206, 258756 638435, 259678 636449, 259746 636375, 252654 632181, 250111 630453, 250171 630300, 250094 630086, 250093 630085, 250086 630082, 249858 630096, 249748 630206, 250111 630453, 250092 630501, 248642 632298, 245331 638680, 238563 651610, 238405 651770, 238159 651801, 237719 651673, 236486 650902, 235290 650083, 234994 649730, 234924 649492, 235005 649282, 242555 639842, 248642 632298, 249705 630249, 249748 630206, 238365 622471, 238009 622195, 238020 622183, 238108 621985, 238052 621801, 237862 621805, 237703 621952, 237701 621956, 238009 622195, 236679 623695, 231494 632521, 225521 642738, 225353 642887, 225103 642904, 224661 642750, 223453 641906, 222274 641015, 221990 640643, 221928 640400, 222019 640194, 228009 633470, 236679 623695, 237701 621956, 228488 614809, 228550 614690, 228494 614469, 228487 614465, 228259 614457, 228149 614547, 228488 614809, 228450 614882, 226837 616519, 222723 622831, 214883 634740, 214710 634883, 214463 634890, 214035 634718, 212886 633830, 211776 632901, 211516 632519, 211469 632276, 211571 632075, 220268 623187, 226837 616519, 228092 614594, 228149 614547, 224715 611883, 217561 605576, 217621 605471, 217577 605263, 217367 605247, 217270 605320, 217561 605576, 217514 605660, 215919 607143, 209772 615657, 203105 624926, 202923 625058, 202673 625051, 202245 624852, 201121 623894, 200029 622890, 199781 622490, 199743 622244, 199853 622047, 206759 615659, 215919 607143, 217194 605377, 217270 605320, 211756 600458, 208546 597248, 208627 597124, 208595 596900, 208591 596894, 208576 596884, 208351 596855, 208233 596934, 208546 597248, 208509 597305, 206681 598835, 201985 604690, 193058 615731, 192872 615857, 192627 615842, 192222 615633, 191173 614649, 190169 613625, 189953 613226, 189931 612980, 190052 612791, 199564 604788, 206681 598835, 208171 596976, 208233 596934, 199542 588243, 198522 587087, 198523 587086, 198647 586907, 198624 586680, 198616 586668, 198603 586658, 198379 586619, 198205 586727, 198522 587087, 196563 588585, 189862 596191, 182278 604823, 182085 604938, 181839 604908, 181440 604678, 180430 603636, 179458 602548, 179257 602136, 179246 601889, 179375 601705, 186884 595989, 196563 588585, 198195 586733, 198205 586727, 190375 577846, 190484 577711, 190475 577484, 190465 577466, 190443 577448, 190220 577398, 190057 577486, 190375 577846, 190349 577879, 188282 579294, 183084 584629, 173184 594718, 172987 594825, 172745 594787, 172364 594543, 171417 593465, 170520 592353, 170342 591934, 170345 591689, 170484 591512, 180738 584459, 188282 579294, 190029 577501, 190057 577486, 188117 575285, 181452 566693, 181541 566589, 181540 566360, 181527 566333, 181504 566313, 181285 566254, 181159 566315, 181452 566693, 181400 566754, 179166 568145, 171924 574913, 163499 582812, 163295 582909, 163054 582858, 162682 582593, 161787 581471, 160937 580313, 160778 579884, 160792 579638, 160939 579468, 168957 574502, 179166 568145, 181089 566348, 181159 566315, 177529 561635, 174196 556730, 174293 556630, 174305 556404, 174296 556384, 174278 556366, 174062 556296, 173937 556349, 174196 556730, 174142 556786, 171963 557987, 166241 562827, 155440 571900, 155235 571989, 154996 571926, 154638 571643, 153798 570476, 153009 569280, 152871 568842, 152898 568598, 153053 568435, 163971 562390, 171963 557987, 173862 556380, 173937 556349, 167819 547346, 166332 544831, 166464 544702, 166485 544476, 166471 544439, 166452 544419, 166239 544340, 166076 544399, 166332 544831, 166308 544854, 163917 546041, 156116 552030, 146937 559103, 146726 559180, 146491 559107, 146234 558883, 145952 558509, 145368 557611, 144637 556381, 144520 555940, 144559 555698, 144721 555542, 153142 551389, 163917 546041, 166036 544414, 166076 544399, 160051 534212, 160207 534079, 160240 533854, 160237 533845, 160232 533839, 160023 533747, 159816 533813, 159815 533813, 160051 534212, 160042 534219, 157898 535143, 151613 539498, 139990 547495, 139776 547563, 139544 547475, 139213 547156, 138480 545897, 137801 544611, 137705 544163, 137753 543920, 137922 543772, 149426 538791, 157898 535143, 159815 533813, 159025 532477, 153451 521537, 153562 521448, 153603 521223, 153596 521197, 153586 521184, 153382 521084, 153239 521122, 153451 521537, 153393 521584, 150990 522501, 142583 527748, 132747 533917, 132529 533972, 132302 533877, 131990 533548, 131326 532276, 130715 530975, 130640 530524, 130701 530286, 130878 530147, 139590 526853, 150990 522501, 153173 521139, 153239 521122, 151182 517084, 148260 510332, 148360 510264, 148408 510067, 148231 509968, 148113 509993, 148260 510332, 148182 510386, 146247 511004, 139339 514871, 126971 521734, 126751 521779, 126527 521667, 126223 521304, 125607 519959, 125044 518595, 124986 518124, 125057 517884, 125240 517753, 137244 513883, 146247 511004, 148019 510013, 148113 509993, 144321 501230, 142855 497157, 142974 497079, 143036 496858, 143033 496841, 143025 496828, 142832 496705, 142699 496725, 142855 497157, 142793 497198, 140351 497865, 131443 502294, 121056 507493, 120834 507526, 120616 507407, 120334 507042, 119793 505699, 119304 504328, 119272 503871, 119356 503638, 119544 503517, 128429 501122, 140351 497865, 142618 496738, 142699 496725, 138751 485761, 138756 485760, 138945 485654, 139007 485482, 138855 485377, 138640 485402, 138624 485409, 138751 485761, 136906 486163, 129817 489276, 116562 495045, 116339 495068, 116127 494935, 115862 494550, 115377 493154, 114949 491742, 114938 491276, 115032 491043, 115226 490930, 127267 488265, 136906 486163, 138624 485409, 138469 484977, 134634 471774, 134773 471701, 134856 471488, 134854 471467, 134848 471454, 134668 471313, 134503 471323, 134634 471774, 134581 471801, 132080 472222, 123230 475569, 111933 479887, 111707 479899, 111503 479759, 111259 479370, 110850 477978, 110497 476567, 110512 476109, 110617 475885, 110817 475783, 119407 474358, 132080 472222, 134451 471326, 134503 471323, 133650 468387, 131850 460336, 131958 460289, 132043 460106, 131887 459972, 131769 459974, 131850 460336, 131759 460375, 129731 460616, 122782 462911, 108778 467496, 108554 467499, 108356 467346, 108126 466930, 107779 465494, 107560 464405, 107497 463926, 107522 463575, 107636 463351, 107841 463257, 119764 461799, 129731 460616, 131671 459975, 131769 459974, 129881 451528, 128977 445818, 129101 445768, 129206 445567, 129207 445545, 129198 445522, 129032 445365, 128904 445360, 127178 434464, 127151 434178, 127187 434177, 127394 434109, 127508 433914, 127509 433905, 127505 433894, 127347 433732, 127131 433714, 127108 433719, 127151 434178, 124846 434229, 117894 435797, 103619 438982, 103395 438963, 103214 438796, 103028 438375, 102821 436933, 102711 435850, 102696 435375, 102756 435035, 102892 434827, 103105 434754, 115108 434447, 124846 434229, 127108 433719, 125759 419445, 125953 419390, 126078 419199, 126082 419165, 126073 419132, 125922 418961, 125711 418933, 125553 417266, 125250 407635, 125375 407607, 125509 407423, 125513 407400, 125507 407374, 125365 407197, 125236 407174, 125010 400000, 125235 392832, 125364 392809, 125508 392631, 125515 392601, 125509 392569, 125375 392384, 125250 392355, 125553 382733, 125712 381055, 125923 381029, 126074 380858, 126081 380834, 126077 380807, 125952 380617, 125758 380563, 127107 366288, 124707 365751, 115326 365519, 103104 365247, 102892 365173, 102756 364965, 102676 364509, 102821 363066, 103026 361629, 103214 361204, 103395 361037, 103620 361017, 112094 362927, 124707 365751, 127152 365811, 127107 366288, 127129 366293, 127346 366274, 127504 366111, 127510 366093, 127509 366079, 127394 365882, 127189 365812, 127152 365811, 127178 365535, 128906 354625, 129034 354621, 129200 354467, 129205 354453, 129205 354440, 129100 354239, 128975 354191, 129881 348472, 131768 340033, 131669 340032, 129594 339351, 119997 338186, 107840 336744, 107636 336649, 107522 336425, 107489 335956, 107779 334506, 108124 333073, 108356 332654, 108554 332501, 108779 332502, 116910 335187, 129594 339351, 131762 339614, 131852 339654, 131768 340033, 131886 340034, 132047 339894, 131960 339702, 131852 339654, 133650 331613, 134508 328661, 134457 328658, 132296 327833, 125206 326657, 110818 324216, 110617 324114, 110512 323890, 110497 323429, 110850 322022, 111261 320627, 111503 320241, 111707 320101, 111932 320113, 123244 324376, 132296 327833, 134577 328211, 134630 328239, 134508 328661, 134672 328671, 134851 328532, 134852 328529, 134853 328522, 134769 328310, 134630 328239, 138470 315023, 138622 314600, 136783 313797, 126788 311593, 115225 309071, 115032 308957, 114939 308724, 114950 308258, 115377 306846, 115860 305453, 116127 305065, 116339 304932, 116563 304954, 124809 308573, 136783 313797, 138755 314232, 138622 314600, 138637 314606, 138852 314629, 139010 314519, 138947 314339, 138759 314233, 138755 314232, 142704 303262, 142623 303249, 140566 302220, 133293 300258, 119545 296483, 119356 296362, 119272 296129, 119304 295670, 119793 294301, 120336 292956, 120616 292593, 120834 292474, 121055 292508, 132196 298033, 140566 302220, 142786 302819, 142849 302860, 142704 303262, 142836 303284, 143029 303163, 143030 303162, 143031 303155, 142968 302936, 142849 302860, 144322 298770, 148109 290017, 148015 289997, 146115 288940, 136115 285723, 125239 282248, 125057 282116, 124986 281876, 125044 281408, 125607 280041, 126221 278698, 126527 278333, 126751 278221, 126972 278265, 135182 282859, 146115 288940, 148185 289606, 148263 289661, 148109 290017, 148227 290041, 148412 289936, 148362 289731, 148263 289661, 151182 282915, 153243 278870, 153178 278852, 151161 277587, 144139 274931, 130879 269851, 130701 269714, 130640 269475, 130713 269027, 131326 267724, 131990 266453, 132302 266123, 132529 266027, 132746 266083, 143297 272657, 151161 277587, 153386 278429, 153445 278475, 153243 278870, 153386 278908, 153590 278809, 153593 278806, 153598 278786, 153557 278562, 153445 278475, 159025 267523, 159810 266195, 157779 264795, 148478 260773, 137921 256228, 137753 256080, 137705 255836, 137800 255391, 138480 254103, 139212 252845, 139544 252525, 139776 252438, 139991 252504, 147748 257878, 157779 264795, 160046 265775, 160054 265782, 159810 266195, 159811 266196, 160019 266259, 160228 266167, 160237 266156, 160242 266141, 160210 265916, 160054 265782, 166080 255593, 166041 255578, 164061 254053, 157377 250756, 144722 244457, 144559 244302, 144520 244060, 144638 243618, 145368 242389, 146148 241191, 146491 240893, 146726 240820, 146936 240898, 156813 248471, 164061 254053, 166301 255158, 166325 255180, 166080 255593, 166243 255654, 166455 255575, 166470 255559, 166480 255533, 166459 255306, 166325 255180, 167819 252653, 173931 243660, 173855 243629, 171839 241932, 163168 237138, 153052 231566, 152898 231402, 152871 231158, 153008 230722, 153798 229524, 154637 228358, 154996 228074, 155235 228011, 155441 228099, 162643 234191, 171839 241932, 174147 243208, 174200 243264, 173931 243660, 174057 243711, 174274 243640, 174297 243618, 174308 243592, 174296 243365, 174200 243264, 177529 238365, 181163 233680, 181093 233646, 179276 231943, 172907 227998, 160940 220531, 160792 220361, 160778 220116, 160937 219687, 161787 218528, 162681 217408, 163054 217142, 163295 217091, 163498 217188, 172622 225705, 179276 231943, 181393 233254, 181446 233315, 181163 233680, 181288 233742, 181507 233684, 181522 233670, 181534 233647, 181535 233419, 181446 233315, 188117 224715, 190050 222523, 190021 222508, 188153 220600, 180047 215032, 170483 208489, 170345 208311, 170342 208066, 170520 207645, 171417 206535, 172361 205459, 172745 205213, 172987 205175, 173185 205281, 179737 212006, 188153 220600, 190355 222113, 190381 222147, 190050 222523, 190214 222609, 190436 222560, 190465 222537, 190479 222511, 190489 222283, 190381 222147, 198209 213268, 198200 213262, 196662 211512, 190574 206877, 179376 198294, 179245 198112, 179257 197864, 179463 197445, 180430 196364, 181439 195323, 181839 195091, 182085 195062, 182278 195177, 190571 204578, 196662 211512, 198514 212922, 198209 213268, 198383 213376, 198607 213338, 198612 213334, 198618 213325, 198642 213098, 198515 212922, 198514 212922, 199542 211756, 208223 203075, 208161 203034, 206545 201031, 198957 194658, 190051 187210, 189931 187019, 189953 186774, 190168 186376, 191173 185351, 192223 184367, 192627 184158, 192872 184143, 193059 184268, 198884 191535, 206545 201031, 208517 202687, 208554 202744, 208223 203075, 208342 203154, 208569 203123, 208591 203108, 208601 203094, 208634 202869, 208554 202744, 211757 199541, 217276 194676, 217200 194618, 216010 192963, 210203 187593, 199854 177952, 199743 177756, 199781 177509, 200028 177111, 201121 176106, 202243 175150, 202673 174949, 202923 174941, 203104 175075, 210495 185296, 216010 192963, 217506 194347, 217554 194430, 217276 194676, 217371 194749, 217573 194735, 217614 194534, 217554 194430, 224716 188117, 228136 185464, 228077 185417, 226689 183302, 219725 176197, 211570 167926, 211469 167724, 211516 167481, 211711 167196, 212052 166868, 212886 166170, 214036 165282, 214463 165110, 214710 165117, 214884 165259, 219907 172969, 226689 183302, 228460 185109, 228498 185183, 228136 185464, 228247 185553, 228476 185543, 228494 185533, 228502 185524, 228559 185302, 228498 185183, 237707 178040, 236754 176411, 231603 170629, 222020 159805, 221928 159600, 221990 159357, 222274 158986, 223453 158094, 224660 157251, 225103 157096, 225353 157113, 225520 157263, 231776 167891, 236754 176411, 238002 177811, 237707 178040, 237709 178044, 237867 178190, 238051 178195, 238103 178019, 238013 177823, 238002 177811, 238365 177529, 249738 169801, 249694 169758, 248522 167512, 242603 160128, 235005 150718, 234924 150507, 234994 150270, 235291 149916, 236486 149098, 237721 148326, 238159 148199, 238405 148230, 238564 148389, 242573 156118, 248522 167512, 250106 169489, 250125 169538, 249738 169801, 249849 169910, 250077 169924, 250097 169916, 250106 169907, 250185 169691, 250125 169538, 252654 167819, 259754 163620, 259687 163546, 258826 161681, 254503 155790, 245815 143889, 245743 143677, 245827 143441, 246149 143096, 247411 142320, 248698 141596, 249156 141482, 249404 141522, 249557 141688, 254626 152577, 258826 161681, 260042 163337, 260074 163431, 259754 163620, 259832 163707, 260034 163731, 260111 163542, 260074 163431, 267523 159025, 272674 156400, 272621 156336, 271652 153940, 266530 146086, 259873 135947, 259813 135731, 259904 135502, 260226 135183, 261484 134489, 262773 133849, 263219 133765, 263459 133820, 263601 133994, 266875 142132, 271652 153940, 273063 156104, 273087 156190, 272674 156400, 272759 156503, 272983 156541, 273004 156535, 273024 156519, 273122 156312, 273087 156190, 282916 151181, 283179 151067, 282417 148889, 278779 142763, 271340 130171, 271288 129953, 271391 129728, 271736 129419, 273041 128780, 274364 128196, 274826 128130, 275066 128195, 275202 128375, 279202 139697, 282417 148889, 283602 150884, 283179 151067, 283191 151101, 283320 151276, 283541 151325, 283549 151323, 283559 151316, 283665 151115, 283614 150904, 283602 150884, 296761 145190, 296753 145178, 295994 142611, 291711 134417, 286046 123649, 286006 123428, 286118 123209, 286473 122920, 287783 122356, 289117 121845, 289573 121805, 289806 121884, 289931 122070, 292412 130503, 295994 142611, 297233 144982, 297234 144986, 296761 145190, 296874 145358, 297093 145418, 297126 145412, 297156 145392, 297273 145196, 297234 144986, 298770 144321, 307837 141057, 307792 140980, 307198 138557, 304205 132183, 298047 118993, 298016 118771, 298138 118558, 298506 118286, 299851 117780, 301212 117332, 301672 117313, 301901 117402, 302017 117594, 304917 129257, 307198 138557, 308258 140815, 308270 140901, 307837 141057, 307902 141167, 308117 141237, 308141 141234, 308164 141220, 308289 141030, 308270 140901, 315024 138469, 321910 136469, 321869 136393, 321368 133799, 317890 125229, 313274 113937, 313257 113712, 313390 113505, 313772 113251, 315138 112814, 316525 112431, 316980 112435, 317204 112536, 317312 112734, 318961 121340, 321368 133799, 322361 136246, 322368 136336, 321910 136469, 321972 136584, 322185 136664, 322219 136661, 322245 136647, 322379 136462, 322368 136336, 331614 133650, 333259 133282, 333257 133278, 332896 130791, 330530 124151, 325686 110452, 325675 110229, 325818 110029, 326209 109794, 327591 109421, 328987 109107, 329439 109134, 329658 109245, 329755 109447, 331526 121355, 332896 130791, 333740 133160, 333741 133175, 333259 133282, 333349 133475, 333557 133566, 333582 133565, 333607 133553, 333748 133377, 333741 133175, 347734 130046, 347503 127600, 344824 118604, 341306 106897, 341311 106671, 341466 106477, 341876 106260, 343293 105955, 344366 105767, 344840 105716, 345185 105750, 345400 105872, 345488 106078, 346291 114729, 347503 127600, 348201 129942, 347734 130046, 347736 130069, 347821 130268, 348025 130368, 348044 130368, 348056 130363, 348208 130193, 348211 129976, 348201 129942, 348472 129881, 359381 128153, 359351 128069, 359237 125678, 357496 118736, 353996 104623, 354008 104400, 354169 104214, 354580 104019, 355998 103779, 357066 103645, 357533 103618, 357872 103671, 358081 103802, 358158 104013, 358780 116071, 359237 125678, 359820 128002, 359816 128084, 359381 128153, 359424 128274, 359623 128384, 359636 128385, 359649 128380, 359809 128218, 359816 128084, 365536 127178, 374143 126365, 374114 126272, 374121 124079, 372264 114602, 369878 102593, 369905 102368, 370082 102191, 370409 102058, 370885 101971, 371988 101844, 373467 101729, 373927 101818, 374133 101959, 374202 102174, 374161 110738, 374121 124079, 374542 126230, 374531 126328, 374143 126365, 374179 126477, 374361 126589, 374518 126445, 374531 126328, 382734 125553, 385807 125456, 385794 125406, 385911 123101, 384838 115989, 382712 101552, 382747 101331, 382928 101161, 383359 101007, 384809 100904, 386259 100864, 386705 100977, 386901 101128, 386959 101345, 386401 113422, 385911 123101, 386255 125384, 386246 125443, 385807 125456, 385848 125617, 386036 125745, 386044 125743, 386221 125598, 386246 125443, 400000 125010, 400451 125024, 400449 125042, 400494 125253, 400647 125369, 400798 125253, 400841 125042, 400840 125036, 400451 125024, 400645 123031, 399653 112841, 398479 101064, 398526 100845, 398719 100685, 399055 100584, 399537 100543, 400642 100522) (400683 674518, 401566 674424, 400639 674448, 399705 674415) (411964 674186, 412596 674222, 412700 674223, 413216 674142) (385923 674150, 386021 674161, 386546 674132, 385306 674053) (374375 673307, 374501 673311, 375300 673310, 374174 673229, 373423 673119) (426913 673119, 425968 673179, 426948 673183, 427848 673003) (438602 671730, 439015 671711, 439143 671700, 439816 671528) (359520 671499, 359615 671519, 360134 671544, 358926 671349) (348057 669539, 348198 669558, 348984 669638, 348060 669481, 347134 669268) (453171 669240, 452237 669391, 453193 669296, 453289 669272, 454089 669036) (464477 666755, 465078 666666, 465200 666643, 465668 666477) (333467 666306, 333590 666344, 334294 666450, 333088 666173) (322250 663254, 322383 663285, 323155 663441, 322252 663196, 321354 662898) (478933 662843, 478020 663084, 478947 662898, 479062 662857, 479823 662553) (489947 659275, 490539 659128, 490654 659094, 491118 658879) (308037 658625, 308165 658678, 308854 658851, 307678 658459) (297180 654514, 297294 654553, 297847 654720, 296527 654178) (503960 653989, 503076 654315, 503975 654045, 504092 653989, 504816 653616) (514755 649310, 515163 649167, 515251 649132, 515873 648766) (283468 648526, 283592 648593, 284259 648827, 283128 648326) (273077 643401, 273162 643439, 273914 643742, 273073 643331, 272254 642866) (528020 642757, 527168 643166, 528034 642818, 528141 642754, 528832 642304) (538301 637063, 538714 636876, 538775 636845, 539366 636409) (259984 636105, 260087 636174, 260737 636470, 259649 635858) (250162 630018, 250240 630062, 250971 630438, 250170 629946, 249394 629397) (550875 629262, 550061 629753, 550909 629316, 550990 629256, 551647 628725) (560206 622832, 560811 622488, 561205 622128) (238150 621724, 238732 622056, 237724 621354) (228540 614385, 228623 614444, 229331 614905, 228582 614337, 227863 613714) (572392 613554, 571630 614122, 572453 613588, 572524 613523, 573108 612944) (580945 606363, 581282 606123, 581379 606047, 581861 605520) (217583 605123, 217634 605174, 218227 605599, 217280 604792) (208632 596804, 208726 596885, 209366 597403, 208684 596770, 208033 596086) (592198 595908, 591504 596543, 592266 595926, 592328 595858, 592848 595236) (600050 587894, 600353 587626, 600455 587528, 600883 586968) (198615 586523, 198674 586594, 199216 587074, 198355 586182) (190522 577393, 190608 577484, 191188 578059, 190568 577360, 189984 576618) (610225 576419, 609593 577121, 610279 576443, 610356 576340, 610809 575689) (617282 567669, 617549 567381, 617637 567279, 618016 566674) (181533 566183, 181600 566282, 182082 566800, 181317 565838) (174363 556321, 174440 556420, 174964 557050, 174413 556293, 173901 555498) (626290 555275, 625727 556037, 626344 555295, 626415 555178, 626802 554491) (632472 545884, 632713 545569, 632784 545468, 633104 544827) (166496 544297, 166556 544407, 166983 544964, 166315 543933) (160321 533804, 160375 533890, 160846 534578, 160368 533768, 159936 532927) (640241 532672, 639752 533487, 640297 532691, 640357 532566, 640676 531842) (645477 522753, 645702 522397, 645750 522312, 646008 521632) (153643 521069, 153692 521183, 154065 521774, 153493 520673) (148515 510047, 148964 510848, 148564 509994, 148216 509114) (651876 508997, 651539 509675, 652011 508830, 652055 508709, 652301 507948) (656188 498486, 656382 498104, 656423 498012, 656610 497309) (143092 496718, 143124 496821, 143477 497525, 143158 496767, 142930 496107) (139124 485467, 139491 486291, 139182 485417, 138924 484519) (661213 484201, 660894 485080, 661288 484192, 661477 483312) (664534 473170, 664693 472759, 664724 472667, 664840 471952) (134919 471329, 134941 471432, 135202 472107, 134851 470903) (132149 460080, 132185 460207, 132435 460966, 132209 460057, 132036 459122) (668029 459004, 667833 459719, 668134 458804, 668146 458725, 668247 457878) (670361 447255, 670469 446858, 670498 446735, 670543 446041) (129280 445399, 129291 445497, 129483 446197, 129253 444973) (127601 433888, 127627 434031, 127795 434803, 127628 433664, 127575 432929) (672473 432836, 672349 433566, 672552 432627, 672558 432529, 672583 431695) (673657 420911, 673724 420512, 673740 420388, 673724 419686) (126168 419016, 126170 419142, 126289 419847, 126178 418610) (125603 407404, 125614 407542, 125706 408324, 125660 407389, 125667 406442) (674371 406339, 674318 407097, 674426 406158, 674422 406034, 674370 405217) (674394 394384, 674424 393966, 674427 393848, 674342 393146) (125615 392458, 125604 392594, 125653 393304, 125662 392065) (126170 380858, 126168 380982, 126185 381775, 126237 380644, 126326 379902) (673683 379615, 673720 380557, 673741 379615, 673725 379490, 673592 378684) (672569 367909, 672559 367471, 672552 367368, 672397 366671) (127627 365971, 127602 366106, 127590 366611, 127755 365390) (129291 354503, 129281 354595, 129239 355196, 129484 353786) (670436 353262, 670561 354198, 670499 353266, 670471 353145, 670256 352350) (668218 341916, 668141 341217, 667973 340715) (132184 339798, 132150 339917, 132069 340626, 132314 339409) (134939 328571, 134920 328664, 134788 329475, 135008 328561, 135290 327653) (664664 327355, 664879 328282, 664727 327337, 664695 327244, 664392 326455) (661394 316309, 661265 315754, 660989 315144) (139126 314527, 139018 315049, 139413 313891) (143123 303181, 143093 303277, 142873 304093, 143183 303205, 143553 302329) (656373 302037, 656680 302939, 656425 301991, 656385 301902, 656014 301168) (652176 291675, 652054 291286, 652012 291170, 651659 290549) (148501 290001, 148293 290657, 148768 289506) (153692 278816, 153645 278928, 153350 279697, 153740 278853, 154189 278022) (645713 277747, 646101 278604, 645742 277666, 645274 276921) (640593 267978, 640356 267432, 640296 267307, 640012 266897) (160375 266110, 160323 266191, 160036 266852, 160620 265755) (166559 255589, 166497 255703, 166129 256431, 166712 255441, 167127 254841) (632748 254581, 633221 255398, 632784 254531, 632714 254432, 632234 253800) (626607 245167, 626415 244822, 626343 244705, 625886 244160) (174441 243579, 174366 243675, 174023 244291, 174700 243270) (181603 233715, 181534 233817, 181096 234509, 181646 233751, 182244 233019) (617603 232770, 618154 233539, 617636 232720, 617550 232619, 617016 232040) (610693 224149, 610357 223661, 610280 223559, 609919 223204) (190610 222514, 190521 222608, 190124 223184, 190900 222229) (198678 213401, 198615 213477, 198106 214138, 198728 213433, 199395 212762) (600417 212515, 601041 213232, 600455 212472, 600351 212372, 599762 211846) (592602 204472, 592332 204146, 592264 204071, 591698 203618) (208728 203113, 208635 203194, 208313 203581, 209207 202729) (217640 194821, 217583 194878, 217003 195504, 217841 194722, 218421 194257) (581347 194009, 582036 194664, 581376 193950, 581278 193874, 580629 193406) (572841 186793, 572529 186482, 572455 186414, 571843 186019) (228626 185554, 228540 185615, 228174 185980, 229158 185210) (238097 178306, 237431 178906, 238166 178343, 238941 177819) (560967 177707, 561536 178166, 560824 177525, 560747 177477, 560036 177066) (551335 171024, 550992 170745, 550910 170684, 550270 170357) (250247 169934, 250160 169984, 249595 170444, 250393 169901, 250864 169614) (260087 163826, 259981 163897, 259335 164370, 260130 163874, 260966 163421) (538763 163222, 539561 163729, 538787 163163, 538712 163125, 537938 162767) (528657 157585, 528144 157248, 528041 157186, 527577 157000) (273166 156559, 273079 156598, 272469 156998, 273554 156405) (283593 151406, 283467 151474, 282784 151873, 283623 151456, 284498 151084) (515425 151008, 516083 151354, 515252 150869, 515162 150833, 514376 150553) (504456 146200, 504094 146012, 503977 145956, 503307 145757) (297296 145446, 297179 145486, 296542 145818, 297691 145329) (308165 141321, 308038 141374, 307322 141703, 308198 141370, 309099 141084) (490637 140959, 491518 141301, 490654 140906, 490540 140873, 489746 140670) (479437 137295, 479063 137144, 478949 137103, 478258 136966) (322384 136713, 322247 136746, 321590 137012, 322781 136635) (333587 133656, 333468 133693, 332720 133954, 333622 133707, 334544 133510) (465368 133452, 466093 133668, 465206 133360, 465078 133336, 464272 133211) (453692 130850, 453288 130729, 453197 130706, 452478 130635) (348195 130442, 348057 130461, 347574 130606, 348788 130386) (359597 128481, 358740 128697, 359659 128536, 360595 128430) (439119 128356, 440049 128527, 439140 128299, 439018 128289, 438196 128246) (426210 126823, 427460 126921, 426899 126819) (374370 126692, 373874 126795, 375106 126694, 374495 126688) (385118 125975, 386056 125902, 387007 125890, 386010 125837) (412600 125778, 411756 125821, 412696 125841, 413644 125922, 412696 125777) (400160 125539, 401369 125559, 400672 125482)), ((673461 447259, 683344 447956, 694928 448746, 695135 448830, 695263 449040, 695321 449489, 695113 450910, 694842 452321, 694636 452729, 694447 452886, 694223 452894, 685239 450439, 673461 447259, 670891 447078, 670828 447053, 670901 446591, 670975 446588)), ((128904 445360, 128977 445818, 128900 445849, 126322 446030, 117269 448474, 105570 451672, 105345 451662, 105155 451505, 104948 451093, 104681 449688, 104470 448265, 104528 447816, 104655 447605, 104864 447523, 113615 446924, 126322 446030, 128816 445357)), ((675302 432972, 682946 433143, 697047 433503, 697262 433575, 697397 433783, 697478 434241, 697329 435684, 697125 437123, 696939 437543, 696757 437711, 696533 437731, 684298 435000, 675302 432972, 672967 432920, 673011 432459, 673021 432458)), ((698467 420091, 698613 420288, 698715 420727, 698644 422158, 698512 423583, 698346 424009, 698173 424182, 697950 424213, 688697 422623, 676833 420617, 686667 420357, 698251 420030)), ((110448 419045, 123071 419378, 113953 420919, 101962 422980, 101738 422949, 101565 422775, 101399 422350, 101268 420928, 101196 419493, 101297 419055, 101444 418857, 101660 418797)), ((676833 420617, 674166 420687, 674125 420676, 674172 420176, 674204 420172)), ((125711 418933, 125759 419445, 125745 419449, 123071 419378, 125707 418933)), ((113126 406765, 122672 407470, 115691 408346, 101241 410127, 101021 410088, 100856 409905, 100712 409477, 100644 408036, 100639 406609, 100763 406160, 100919 405970, 101138 405918)), ((699112 404728, 699268 404918, 699360 405248, 699390 405717, 699384 406795, 699318 408236, 699175 408662, 699010 408845, 698789 408885, 686401 407358, 677348 406223, 684822 405670, 698892 404678)), ((125236 407174, 125250 407635, 125162 407654, 122672 407470, 125151 407159)), ((677348 406223, 674868 406406, 674789 406388, 674804 405926, 674879 405913)), ((699010 391155, 699175 391338, 699320 391769, 699384 393205, 699391 394642, 699268 395082, 699112 395272, 698893 395323, 689486 394628, 677491 393771, 687329 392552, 698788 391114)), ((677491 393771, 674880 394094, 674804 394080, 674789 393602, 674867 393583)), ((109936 390962, 122529 392523, 113304 393182, 101137 394083, 100919 394029, 100763 393839, 100640 393396, 100644 391964, 100711 390527, 100856 390095, 101021 389912, 101242 389871)), ((125250 392355, 125235 392832, 125150 392848, 122529 392523, 125164 392335)), ((113833 379017, 123231 380630, 116185 380828, 101661 381202, 101444 381142, 101297 380945, 101195 380503, 101268 379072, 101400 377646, 101565 377225, 101738 377051, 101961 377021)), ((125758 380563, 125712 381055, 125709 381055, 123231 380630, 125744 380559)), ((698173 375818, 698346 375991, 698511 376413, 698644 377841, 698716 379268, 698613 379711, 698467 379909, 698250 379969, 685809 379648, 676670 379392, 684012 378131, 697951 375788)), ((676670 379392, 674202 379816, 674171 379812, 674126 379333, 674167 379322)), ((696757 362289, 696939 362457, 697079 362773, 697177 363238, 697329 364316, 697440 365401, 697457 365877, 697397 366217, 697262 366424, 697048 366498, 687613 366709, 675426 367009, 673023 367547, 673012 367546, 672967 367070, 675426 367009, 685323 364795, 696532 362268)), ((117229 351464, 126509 353997, 128898 354161, 128975 354191, 128906 354625, 128819 354628, 126509 353997, 119368 353508, 104865 352476, 104655 352395, 104528 352184, 104469 351731, 104681 350312, 104950 348904, 105155 348495, 105345 348338, 105569 348329)), ((694447 347114, 694636 347271, 694840 347673, 695113 349090, 695322 350507, 695263 350960, 695135 351170, 694927 351253, 682527 352136, 673265 352771, 670972 353397, 670899 353394, 670829 352957, 670893 352933, 673265 352771, 680510 350791, 694224 347106))) \ No newline at end of file diff --git a/stress_benchmark/resources/021.settings b/stress_benchmark/resources/021.settings new file mode 100644 index 0000000000..bec147df9c --- /dev/null +++ b/stress_benchmark/resources/021.settings @@ -0,0 +1,632 @@ +material_bed_temperature=85 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=0.5 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.15 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=0 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=11 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.3 +raft_acceleration=2500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +wipe_hop_enable=True +zig_zaggify_support=True +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.3 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=0 +cool_min_speed=4 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=30 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=1.0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +material_print_temperature=200 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=3 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=2500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=0.6 +infill_sparse_thickness=0.15 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_none +jerk_wall_x=30 +infill=0 +coasting_speed=90 +bridge_skin_density=80 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=2500 +speed_travel=150 +layer_0_z_overlap=0.125 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.15 +material_bed_temperature_layer_0=85 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.04 +wipe_retraction_speed=45 +retraction_amount=6.5 +bridge_skin_density_2=100 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=1 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0.6 +material_diameter=2.85 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=20 +raft_surface_fan_speed=100 +default_material_bed_temperature=85 +speed_ironing=20 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=2500 +wall_extruder_nr=-1 +support_structure=tree +support_xy_distance_overhang=0.2 +skin_angles=[] +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=2500 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=True +support_xy_distance=0.7 +speed_wall=50 +bottom_thickness=1.2 +raft_interface_jerk=30 +material_shrinkage_percentage=100.1 +support_interface_wall_count=1 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.08 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +brim_gap=0.14500000000000002 +acceleration_support_infill=1429 +support_meshes_present=False +travel_avoid_distance=3 +raft_interface_speed=32.5 +jerk_prime_tower=30 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=20.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150 +acceleration_topbottom=2500 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=50 +skin_overlap=20 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=95.0 +skin_material_flow_layer_0=95 +bridge_skin_material_flow_2=95.0 +speed_support_interface=20 +machine_max_acceleration_x=9000 +support_interface_height=0.3 +skirt_height=3 +support_roof_pattern=zigzag +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=100 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=35 +material_print_temperature_layer_0=200 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=30 +machine_max_feedrate_e=45 +retraction_enable=True +support_line_distance=0 +extruder_prime_pos_abs=True +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=2500 +interlocking_orientation=22.5 +speed_wall_0_roofing=20 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.4 +minimum_bottom_area=1.0 +infill_line_distance=5.333333333333333 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=40.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=60 +raft_base_speed=15 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=1.3 +bridge_skin_speed=30 +skirt_brim_material_flow=100 +acceleration_support_roof=2500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=300 +prime_tower_base_size=3 +infill_enable_travel_optimization=False +speed_support_infill=20 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=2 +jerk_wall_0=20 +mold_angle=40 +raft_speed=15 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=True +top_bottom=0 +machine_max_feedrate_z=40 +acceleration_support=1429 +cool_min_temperature=190 +jerk_layer_0=20 +support_offset=0.0 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.15 +fill_outline_gaps=True +meshfix_maximum_resolution=0.7 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=1.9 +raft_interface_line_spacing=0.8 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=6 +support_join_distance=2.0 +wipe_hop_amount=2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=300 +machine_width=330 +extruder_prime_pos_y=6 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +material_standby_temperature=100 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=True +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.6000000000000001 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=110.00000000000001 +quality_name=Normal +material_final_print_temperature=185 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.91 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=False +acceleration_skirt_brim=1000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=infill +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=100 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=50 +roofing_layer_count=1 +speed_slowdown_layers=1 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.25 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.3 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=50 +lightning_infill_straightening_angle=40 +speed_topbottom=50 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=False +material_maximum_park_duration=7200 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=35 +machine_max_jerk_z=0.4 +support_tree_angle=60 +expand_skins_expand_distance=0.8 +prime_tower_position_y=214.0 +mesh_position_x=0 +cross_infill_pocket_size=5.333333333333333 +interlocking_enable=True +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=25 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.3 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=0.5 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +raft_surface_acceleration=2500 +minimum_support_area=0.0 +brim_width=7 +small_skin_width=4 +shell=0 +jerk_print=30 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=15 +z_seam_x=80 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=95.0 +acceleration_wall=2500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=95.0 +support_interface_pattern=zigzag +initial_bottom_layers=8 +bridge_fan_speed_2=100 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +retraction_hop_enabled=True +layer_start_y=228.0 +extruder_prime_pos_x=-3 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=False +extruder_prime_pos_z=2 +support_tower_roof_angle=0 +prime_tower_position_x=305 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=8 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.8 +skin_edge_support_layers=4 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.3 +roofing_extruder_nr=-1 +jerk_support=30 +wall_line_width_x=0.4 +support_bottom_wall_count=1 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=grid +material_alternate_walls=False +material_break_preparation_speed=50 +acceleration_support_bottom=2500 +material_end_of_filament_purge_length=20 +speed_print=50 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=2500 +carve_multiple_volumes=True +raft_surface_thickness=0.15 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=2000.0 +speed_equalize_flow_width_factor=110.0 +wipe_brush_pos_x=100 +jerk_wall_0_roofing=20 +skin_material_flow=95.0 +support_bottom_density=100 +bridge_skin_density_3=100 +support_interface_enable=True +support_roof_wall_count=1 +infill_sparse_density=15 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=50 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=95.0 +speed_print_layer_0=35 +raft_jerk=30 +speed_support=20 +jerk_support_interface=30 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=30 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=False +jerk_support_bottom=30 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=85 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=1000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1.0 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=20 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +support_bottom_pattern=zigzag +support_roof_height=0.3 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1.2 +min_skin_width_for_expansion=1.2 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=1 +support_fan_enable=False +infill_wipe_dist=0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=1000 +material_shrinkage_percentage_z=100.1 +material_guid=2433b8fb-dcd6-4e36-9cd5-9f4ee551c04c +support_roof_line_distance=0.4 +brim_line_count=18 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=1000 +wall_transition_angle=10 +top_thickness=1.2 +machine_center_is_zero=False +extruders_enabled_count=2 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=30 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=30 +wall_transition_filter_distance=100 +raft_interface_fan_speed=50.0 +bridge_wall_coast=0 +skirt_line_count=1 +infill_mesh=False +layer_height=0.15 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=150 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=95.0 +machine_max_feedrate_y=300 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +acceleration_prime_tower=1429 +retraction_hop_after_extruder_switch_height=2 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=30 +machine_extruder_count=2 +xy_offset_layer_0=-0.095 +skirt_brim_extruder_nr=-1 +z_seam_relative=True +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=190 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=True +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=2500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=0 +material_shrinkage_percentage_xy=100.1 +bridge_skin_material_flow=95.0 +raft_base_jerk=30 +speed_wall_x=35 +time=09:44:20 +machine_buildplate_type=glass +top_layers=8 +machine_gcode_flavor=Griffin +roofing_angles=[] +jerk_ironing=30 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.4 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.22499999999999998 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=55 +support_bottom_extruder_nr=0 +speed_support_roof=20 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=3000 +speed_roofing=35 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=20 +material_bed_temp_wait=True +machine_depth=240 +bridge_wall_material_flow=100 +jerk_travel=30 +retraction_speed=45 +xy_offset=-0.015 +print_temperature=200 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=30 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=120 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=35 +raft_surface_speed=50 +material_name=empty +acceleration_wall_0=1000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=30 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/021.wkt b/stress_benchmark/resources/021.wkt new file mode 100644 index 0000000000..b50ff734a9 --- /dev/null +++ b/stress_benchmark/resources/021.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((177889 97484, 178963 98582, 180026 99763, 180835 100714, 181606 101663, 182372 102644, 183111 103632, 184234 105213, 185288 106773, 186272 108309, 187170 109769, 187982 111152, 188762 112509, 189519 113859, 190270 115255, 191531 117669, 192150 118889, 193358 121356, 194528 123828, 195895 126814, 197454 130332, 198899 133686, 200251 136869, 205262 148813, 205263 148813, 206731 152368, 207615 154523, 207611 154523, 208479 156683, 209333 158837, 210354 161475, 211358 164120, 211354 164120, 212161 166302, 212968 168534, 212969 168534, 213765 170805, 214523 173044, 215185 175067, 215833 177127, 215832 177127, 216457 179201, 216758 180244, 217210 181869, 217645 183572, 217732 183641, 216888 183642, 216039 180958, 216037 180958, 215295 178759, 214559 176689, 213973 175123, 213976 175123, 212957 172524, 212152 170566, 211007 167889, 210055 165766, 209043 163584, 209043 163583, 208353 162136, 207638 160682, 206851 159120, 206096 157649, 205317 156171, 204522 154697, 203658 153135, 202830 151673, 201988 150218, 201170 148839, 201171 148835, 200224 147282, 199355 145876, 198480 144500, 197601 143142, 197601 143137, 196662 141720, 195778 140404, 194894 139113, 193951 137760, 192173 135264, 190405 132851, 188670 130540, 186962 128316, 185285 126175, 184437 125114, 182004 122112, 180485 120275, 178163 117529, 176687 115821, 174583 113427, 174575 113418, 173219 111904, 171262 109756, 176562 96208)), ((165739 91654, 166407 91847, 167042 92164, 167767 92713, 168311 93433, 168630 94069, 168819 94740, 168884 95485, 168820 96215, 168627 96882, 168311 97517, 167760 98243, 167042 98786, 166404 99107, 165729 99295, 164988 99360, 164257 99296, 163595 99107, 162957 98786, 162232 98237, 161688 97517, 161368 96878, 161179 96203, 161115 95476, 161181 94728, 161372 94068, 161688 93433, 162239 92707, 162957 92164, 163595 91843, 164269 91655, 165012 91590)), ((152763 77567, 153342 77793, 153935 78164, 154617 78773, 155288 79483, 156009 80374, 156587 81138, 157597 82505, 157599 82503, 158151 83231, 158857 84102, 159658 85013, 154573 90610, 153522 88778, 152886 87503, 152885 87503, 152401 86408, 151993 85342, 151662 84348, 151392 83334, 151182 82322, 151036 81240, 151016 80221, 151077 79444, 151231 78706, 151548 78004, 151815 77707, 152185 77540))) \ No newline at end of file diff --git a/stress_benchmark/resources/022.settings b/stress_benchmark/resources/022.settings new file mode 100644 index 0000000000..f9d345efde --- /dev/null +++ b/stress_benchmark/resources/022.settings @@ -0,0 +1,631 @@ +material_bed_temperature=65 +support_tree_rest_preference=buildplate +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8400000000000001 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=2 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.42000000000000004 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=1 +raft_acceleration=1000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=8.400000000000002 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.42000000000000004 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=215.0 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=1 +material_break_temperature=50 +acceleration_support_interface=1000 +adhesion_extruder_nr=0 +mold_width=5 +gradual_support_infill_step_height=5 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=1.2600126001260015 +support_bottom_stair_step_height=0.3 +acceleration_wall_x_roofing=2000 +speed_travel=150 +layer_0_z_overlap=0.125 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=65 +support_tree_limit_branch_reach=True +support_brim_width=0.8400000000000002 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=1 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.42000000000000004 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=44 +raft_surface_fan_speed=100 +default_material_bed_temperature=60 +speed_ironing=23.333333333333332 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=1000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.32000000000000006 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.42000000000000004 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.42000000000000004 +support_interface_offset=0.0 +machine_max_acceleration_y=700 +support_tree_min_height_to_model=3 +acceleration_infill=1000 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.68 +speed_wall=48 +bottom_thickness=0.8 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15.0 +roofing_monotonic=True +skin_overlap_mm=0.084 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=215.0 +brim_gap=0.1 +acceleration_support_infill=1000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=18.0 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=30.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150 +acceleration_topbottom=1000 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=83 +skin_overlap=20 +print_sequence=all_at_once +infill_overlap=0 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=58.666666666666664 +machine_max_acceleration_x=700 +support_interface_height=1 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=100 +infill_support_enabled=False +support_brim_line_count=2 +blackmagic=0 +speed_wall_x_roofing=63 +material_print_temperature_layer_0=215.0 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.42000000000000004 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=8.400000000000002 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=1 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=1000 +interlocking_orientation=22.5 +speed_wall_0_roofing=44 +sub_div_rad_add=0.42000000000000004 +bottom_skin_preshrink=0.8400000000000001 +minimum_bottom_area=10 +infill_line_distance=4.200000000000001 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=33.333333333333336 +support_interface_line_width=0.42000000000000004 +support_skip_zag_per_mm=20 +support_angle=50 +raft_base_speed=12.0 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.42000000000000004 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=0.75 +bridge_skin_speed=17.5 +skirt_brim_material_flow=100 +acceleration_support_roof=1000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=410 +prime_tower_base_size=15.0 +infill_enable_travel_optimization=False +speed_support_infill=88 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.2 +jerk_wall_0=20 +mold_angle=40 +raft_speed=30 +prime_tower_wipe_enabled=False +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=1000 +cool_min_temperature=215.0 +jerk_layer_0=20 +support_offset=0.8200000000000001 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.2 +fill_outline_gaps=False +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=1.6 +raft_interface_line_spacing=1.04 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=330 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=25 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.42000000000000004 +retract_at_layer_change=False +wall_transition_length=0.42000000000000004 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8400000000000001 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +quality_name=Fast +material_final_print_temperature=215.0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.5 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=no_outer_surfaces +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.399 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=17.5 +roofing_layer_count=0 +speed_slowdown_layers=0 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.0 +mesh_position_z=0 +machine_max_jerk_xy=8.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8400000000000001 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.25 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=17.5 +lightning_infill_straightening_angle=40 +speed_topbottom=35 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=30.0 +machine_max_jerk_z=0.4 +support_tree_angle=50 +expand_skins_expand_distance=0.8400000000000001 +prime_tower_position_y=283.555 +mesh_position_x=0 +cross_infill_pocket_size=4.200000000000001 +interlocking_enable=False +support_tree_top_rate=10 +wall_line_width_0=0.42000000000000004 +retraction_count_max=80 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8400000000000001 +support_bottom_distance=0 +wall_thickness=0.84 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=left +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=1000 +minimum_support_area=3 +brim_width=5 +small_skin_width=0.8400000000000001 +support_infill_angles=[65] +shell=0 +jerk_print=20 +adhesion_type=raft +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=11.3 +z_seam_x=0 +acceleration_travel=1000 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=2000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.5 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=lines +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +retraction_hop_enabled=True +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=True +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=313.555 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=buildplate +support_skip_some_zags=False +support_line_width=0.42000000000000004 +ooze_shield_enabled=False +raft_base_thickness=0.30000000000000004 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.42000000000000004 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=gyroid +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=1000 +material_end_of_filament_purge_length=20 +speed_print=60.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=2000 +carve_multiple_volumes=False +raft_surface_thickness=0.15000000000000002 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=20 +skin_material_flow=100 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=False +support_roof_wall_count=0 +infill_sparse_density=10.0 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=30.0 +raft_jerk=20 +speed_support=88 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=10 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=20 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=65 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8400000000000001 +acceleration_ironing=1000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=5 +roofing_material_flow=100 +speed_prime_tower=60.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=95.0 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=lines +support_roof_height=1 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=1 +support_fan_enable=False +infill_wipe_dist=0.10500000000000001 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8400000000000001 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=2.520025200252003 +brim_line_count=12 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=2000 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=-0.4 +bridge_wall_speed=22.0 +support_roof_enable=False +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=1 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=100 +support_tree_branch_reach_limit=30 +min_feature_size=0.10500000000000001 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.42000000000000004 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +acceleration_prime_tower=1000 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=0 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=215.0 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=False +dual=0 +raft_interface_acceleration=1000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=5 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=20 +speed_wall_x=63 +time=09:45:42 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8400000000000001 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=30 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=390 +support_bottom_extruder_nr=0 +speed_support_roof=58.666666666666664 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=700 +speed_roofing=35 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=58.666666666666664 +material_bed_temp_wait=True +machine_depth=330 +bridge_wall_material_flow=50 +jerk_travel=30 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8400000000000001 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=67.5 +z_seam_y=165.0 +bottom_skin_expand_distance=0.8400000000000001 +infill_support_angle=40 +speed_layer_0=30.0 +raft_surface_speed=30 +material_name=empty +acceleration_wall_0=2000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/022.wkt b/stress_benchmark/resources/022.wkt new file mode 100644 index 0000000000..4cd6217887 --- /dev/null +++ b/stress_benchmark/resources/022.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((223054 229087, 222524 229740, 222407 229171, 221701 230007, 222284 230030, 221604 230859, 221479 230257, 220871 230953, 221511 230974, 220696 231938, 220665 231937, 220549 231313, 220010 231923, 220665 231937, 220671 231965, 219762 232944, 219645 232324, 219081 232926, 219757 232921, 219762 232943, 218884 233837, 218764 233256, 218097 233945, 218779 233946, 217999 234714, 217877 234167, 217102 234947, 217745 234969, 217087 235610, 216973 235081, 216113 235953, 216704 235970, 216175 236502, 216068 235979, 215147 236835, 215170 236969, 215001 236966, 214228 237691, 214286 237986, 214625 237995, 214343 238260, 214286 237988, 213895 237977, 213303 238510, 213404 239018, 212759 238999, 212382 239327, 212496 239895, 212327 240041, 211563 240015, 211458 240102, 211570 240664, 211068 241065, 210570 241045, 210531 240856, 210300 241041, 210570 241045, 210642 241387, 209716 242123, 209603 241587, 208998 242065, 209707 242099, 209712 242123, 208782 242827, 208677 242319, 207749 243014, 207768 243101, 208373 243125, 207845 243523, 207768 243107, 207633 243100, 206816 243716, 206895 244161, 206180 244134, 205865 244356, 205968 244904, 205544 245209, 204959 245188, 204926 245001, 204663 245174, 204958 245190, 205025 245571, 204076 246194, 203978 245615, 203051 246216, 203968 246263, 203127 246781, 203035 246248, 202084 246818, 202166 247296, 201358 247259, 201133 247388, 201227 247949, 200514 248359, 200244 248346, 200178 247931, 199502 248303, 200243 248346, 200268 248498, 199308 249000, 199224 248454, 198267 248976, 198333 249394, 197501 249348, 197305 249445, 197392 249981, 196426 250458, 195461 250894, 195391 250393, 195390 250393, 195388 250372, 195391 250393, 196426 250458, 196349 249930, 195388 250371, 195388 250372, 194426 250815, 194483 251284, 193977 251504, 193494 251475, 193459 251234, 192971 251446, 193494 251475, 193526 251716, 192555 252162, 192488 251639, 191526 252039, 191583 252560, 190560 252508, 190603 252908, 189625 253230, 189578 252736, 188601 253058, 188658 253609, 187643 253558, 187683 253951, 186704 254247, 186652 253670, 185679 253957, 185720 254508, 185174 254652, 184733 254630, 184700 254233, 183717 254483, 183724 254590, 184733 254630, 184744 254758, 183768 255048, 183724 254588, 183347 254574, 182744 254725, 182780 255300, 181798 255516, 181760 254942, 180782 255158, 180812 255687, 179820 255638, 179800 255361, 178818 255532, 178821 255599, 179820 255638, 179834 255873, 178847 256085, 178818 255601, 178507 255587, 177839 255711, 177863 256267, 176874 256416, 176853 255859, 175876 256000, 175890 256532, 174902 256643, 174887 256133, 173905 256245, 173918 256654, 174624 256681, 173923 256786, 173917 256655, 172921 256623, 172913 256366, 171936 256441, 171935 256592, 170952 256564, 170954 257045, 169967 257083, 169963 256589, 168973 256639, 168983 257161, 167995 257215, 167988 256685, 167004 256710, 167003 257250, 166015 257255, 166021 256730, 165030 256748, 165031 257230, 164046 257257, 164050 256732, 163062 256716, 163049 257250, 162062 257218, 162077 256685, 161093 256641, 161072 257166, 160083 257084, 160107 256603, 159119 256519, 159100 257049, 158115 256993, 158132 256444, 157154 256373, 157128 256910, 156141 256793, 156171 256313, 156741 256315, 156175 256255, 156171 256313, 155181 256301, 155189 256156, 154207 256014, 154190 256301, 153199 256303, 153192 256425, 152389 256308, 153200 256301, 153221 255871, 152244 255725, 152203 256280, 151218 256100, 151265 255548, 150282 255375, 150237 255890, 149261 255709, 149302 255176, 148854 255079, 148319 255082, 148329 254964, 147351 254748, 147319 255085, 146319 255089, 146381 254502, 145404 254261, 145346 254785, 144372 254529, 144431 253987, 144104 253893, 143439 253897, 143459 253701, 142490 253425, 142428 253903, 142177 253905, 141446 253652, 141522 253099, 140556 252780, 140492 253277, 139521 252949, 139548 252735, 140366 252719, 139588 252430, 139548 252735, 138923 252742, 138553 252610, 138622 252073, 137659 251723, 137587 252222, 136628 251789, 136662 251580, 137346 251574, 136708 251307, 136661 251583, 136207 251588, 135667 251339, 135751 250897, 134796 250454, 134711 250966, 133757 250544, 133772 250455, 134742 250429, 133849 250021, 133769 250455, 133579 250460, 132806 250085, 132904 249550, 132420 249310, 131918 249315, 131956 249103, 131011 248582, 130912 249110, 129964 248621, 130049 248195, 130297 248191, 130073 248069, 130047 248198, 129239 248217, 129026 248096, 129132 247540, 128359 247084, 128180 247084, 128199 246987, 127262 246420, 127158 246952, 126220 246376, 126295 245995, 125633 246000, 125292 245778, 125401 245215, 124917 244893, 124417 244896, 124479 244588, 123552 243952, 123443 244456, 122575 243816, 123328 243804, 122632 243299, 122527 243781, 121606 243126, 121693 242725, 121861 242722, 121719 242617, 121693 242725, 121089 242729, 120692 242431, 120816 241921, 120478 241652, 119803 241661, 119910 241209, 119120 240578, 118984 240576, 119005 240483, 118106 239735, 117977 240294, 117087 239537, 117852 239526, 117202 238976, 117073 239525, 116178 238741, 116242 238471, 115878 238468, 115283 237905, 115402 237415, 114771 237411, 114398 237046, 114516 236523, 114350 236370, 113685 236367, 113504 236199, 113628 235684, 113266 235322, 112623 235330, 112755 234804, 112245 234292, 111789 234296, 111878 233930, 111238 233262, 110947 233260, 111005 233015, 110265 232239, 110094 232233, 110132 232075, 109369 231225, 109235 231219, 109262 231105, 108487 230223, 108360 230220, 108387 230107, 108010 229671, 107625 229205, 107493 229201, 107394 229629, 107042 229185, 107492 229200, 107523 229077, 106810 228194, 106648 228190, 106685 228039, 106030 227210, 105773 227205, 105834 226959, 105277 226243, 104869 226246, 104972 225812, 104593 225282, 103968 225270, 104121 224617, 103918 224323, 103308 224296, 103135 224012, 103287 223413, 103246 223349, 102729 223331, 102322 222752, 102418 222366, 102623 222371, 102474 222142, 102418 222366, 102038 222357, 101487 221541, 101520 221400, 102022 221413, 101657 220821, 101514 221395, 101396 221392, 100855 220441, 101449 220461, 100933 219522, 100805 219513, 100842 219355, 100428 218579, 99884 218550, 100055 217857, 99961 217638, 99485 217627, 99135 216892, 99180 216704, 99541 216711, 99301 216165, 99194 216701, 99016 216693, 98780 216266, 98465 215845, 98484 215759, 98562 215761, 98152 215744, 98026 216129, 97882 216080, 97779 216640, 97413 216181, 97106 215714, 97257 215720, 97428 215258, 97221 214806, 97003 215512, 96793 214777, 97201 214798, 97170 214670, 96706 214533, 96668 214436, 96932 213969, 96910 213873, 96562 213850, 96441 213269, 96492 213083, 96437 212819, 96410 212836, 96423 212032, 96485 212035, 96525 211651, 96619 211116, 96467 211100, 96472 211037, 96645 210965, 96657 210893, 96745 210904, 96843 210466, 96690 210254, 96813 209864, 96580 209668, 96820 209378, 96632 209321, 96398 209095, 96226 208654, 95893 208938, 95791 207737, 96049 207594, 96036 207436, 95772 207246, 95733 206477, 95985 206370, 95972 205677, 95743 205520, 95738 205195, 95975 205118, 95991 204517, 96025 203943, 95934 203882, 96030 203856, 96091 202980, 96142 202598, 95962 202516, 96026 202250, 96198 202169, 96339 201341, 96196 201250, 96377 200577, 96580 200461, 96677 200173, 96496 200033, 96836 198854, 97300 197735, 97536 197982, 98005 196883, 97930 196800, 98075 196704, 98455 195785, 98209 195520, 98374 195102, 98872 194765, 98906 194684, 98646 194410, 99082 193297, 99340 193571, 99625 192824, 99130 193175, 99503 192179, 99766 192453, 100172 191313, 99990 191127, 99832 191241, 99902 191034, 99990 191127, 100321 190890, 100564 190170, 100289 189885, 100468 189335, 100927 188992, 100663 188729, 101013 187546, 101297 187823, 101510 187092, 101042 187442, 101352 186360, 101641 186637, 101963 185422, 101871 185333, 102025 185227, 102265 184195, 101963 183928, 102012 183713, 102468 183334, 102542 182974, 102240 182701, 102418 181876, 102706 181629, 102504 181456, 102725 180189, 103035 180448, 103164 179695, 102747 180061, 102931 178905, 103242 179161, 103423 177904, 103015 178283, 103101 177600, 103429 177863, 103582 176556, 103358 176384, 103225 176509, 103247 176298, 103361 176385, 103621 176147, 103706 175262, 103371 174977, 103384 174794, 103762 174464, 103800 173960, 103459 173672, 103491 173055, 103870 172679, 103877 172511, 103534 172282, 103557 171368, 103823 171088, 103573 170929, 103584 169697, 103672 169601, 103944 169765, 103943 169301, 103672 169601, 103587 169550, 103581 168146, 103942 168351, 103899 167663, 103854 167441, 103518 168066, 102769 166870, 102889 166617, 102695 166732, 101602 166004, 101665 165781, 101422 165595, 101257 165652, 100730 164879, 100916 164745, 100897 164342, 100674 164389, 100777 163345, 100998 163448, 101096 162937, 100856 162975, 101090 162020, 101299 162167, 101528 161494, 101288 161503, 101564 160911, 101754 161096, 102043 160825, 102232 160763, 102543 160753, 102580 160506, 103580 160723, 103546 160936, 104558 161186, 104604 160955, 105140 161101, 105944 159777, 106711 158555, 107439 158811, 108193 159015, 108943 159149, 109194 159155, 112364 154071, 112148 153690, 111575 152949, 111029 152386, 111343 151976, 111640 151737, 111753 151738, 112013 151903, 112460 152402, 113296 153503, 113732 153885, 114041 153972, 114219 153971, 114645 153869, 115159 153658, 115306 153676, 115143 154043, 114655 154720, 113399 156330, 112861 157042, 112221 157914, 111250 159273, 110586 160225, 109249 162203, 108216 163806, 108024 164017, 107822 164139, 107476 164102, 107391 164155, 107849 164509, 108244 164858, 108537 165180, 108781 165650, 108901 166135, 108935 166915, 108927 167587, 108884 168419, 108799 169436, 108681 170622, 108525 171953, 108337 173408, 108119 174968, 107869 176614, 107594 178327, 107292 180084, 106965 181875, 106609 183692, 106227 185538, 105807 187414, 105356 189314, 104858 191250, 104272 193412, 103748 195205, 103119 197228, 102439 199286, 101696 201386, 100866 203583, 100668 204073, 100858 204735, 101200 205736, 101508 206461, 102274 208182, 103431 210510, 104730 212895, 105372 213988, 106197 215362, 107334 217117, 107876 217935, 108847 219293, 109814 220620, 111426 222673, 112045 223439, 113363 224969, 114634 226408, 115969 227818, 117661 229565, 119608 231404, 121289 232928, 123421 234696, 125563 236376, 127341 237634, 129325 238955, 131318 240198, 133328 241328, 135361 242380, 137420 243364, 139417 244235, 141651 245089, 143828 245832, 146050 246500, 148319 247088, 150633 247598, 152978 248027, 155347 248379, 157760 248659, 160219 248852, 160317 249127, 160452 249136, 160524 248915, 160788 249035, 160528 248901, 160837 249012, 160875 248979, 160667 248874, 160913 248884, 161040 248953, 161210 249172, 161325 249177, 161342 248907, 162572 248968, 163432 248982, 163466 249029, 163467 249255, 163642 249188, 163757 248986, 164114 248992, 164213 249267, 164348 249266, 164381 249169, 164755 248999, 164743 249066, 164886 249005, 165076 249192, 165111 249278, 165234 249275, 165246 249004, 166942 248978, 167929 248948, 167925 248942, 169845 248848, 170773 248774, 170872 249038, 171007 249032, 171072 248921, 171469 248945, 171554 248986, 171742 248972, 171430 248725, 172262 248658, 174652 248380, 177021 248028, 179366 247599, 181680 247089, 183950 246500, 186171 245831, 188348 245088, 190582 244236, 192580 243364, 194638 242379, 196672 241328, 198682 240198, 200674 238954, 202659 237634, 204435 236378, 206578 234695, 208710 232929, 210392 231404, 212338 229566, 214032 227819, 215365 226409, 216636 224968, 217954 223440, 218574 222673, 220185 220621, 221152 219292, 222123 217936, 222666 217117, 223802 215363, 225269 212896, 226568 210511, 227725 208183, 228492 206461, 228805 205724, 229141 204734, 229325 204062, 229112 203531, 228305 201387, 227562 199287, 226882 197229, 226252 195205, 225672 193213, 225142 191250, 224645 189313, 224194 187413, 223769 185517, 223391 183692, 223035 181875, 222708 180084, 222406 178327, 222132 176613, 221882 174967, 221663 173408, 221475 171953, 221320 170621, 221201 169436, 221116 168419, 221073 167587, 221064 166916, 221099 166115, 221325 165395, 221515 165098, 221995 164633, 222607 164154, 222524 164101, 222347 164146, 222102 164109, 221832 163877, 220736 162180, 219721 160669, 218773 159306, 217469 157488, 216568 156286, 215243 154586, 214837 154010, 214695 153677, 214841 153658, 215354 153870, 215780 153972, 215958 153973, 216267 153886, 216702 153505, 217541 152403, 217905 151981, 218125 151791, 218298 151729, 218550 151834, 218972 152394, 218427 152956, 217861 153689, 217664 154002, 217656 154087, 220824 159170, 221605 159073, 222568 158812, 223281 158561, 224092 159835, 224860 161102, 225397 160956, 225441 161185, 226452 160937, 226419 160720, 227421 160507, 227463 160753, 227770 160765, 227956 160827, 228234 161085, 228436 160911, 228711 161502, 228474 161481, 228698 162163, 228910 162020, 229143 162974, 228901 162931, 228998 163446, 229223 163345, 229325 164388, 229101 164338, 229097 164676, 229270 164879, 228744 165651, 228601 165572, 228334 165781, 228399 166003, 227315 166725, 227113 166616, 227231 166867, 226778 167614, 226482 168066, 226164 167394, 226100 167663, 226057 168350, 226419 168146, 226416 169550, 226330 169601, 226054 169296, 226052 169769, 226330 169601, 226419 169697, 226428 170928, 226177 171087, 226071 170975, 226071 171159, 226176 171087, 226444 171366, 226470 172277, 226119 172513, 226129 172683, 226506 173057, 226540 173676, 226201 173961, 226236 174462, 226616 174793, 226630 174976, 226297 175263, 226377 176148, 226640 176385, 226419 176557, 226573 177861, 226898 177600, 226983 178278, 226577 177903, 226760 179162, 227068 178904, 227260 180067, 226836 179695, 226964 180448, 227280 180181, 227503 181450, 227295 181632, 227591 181881, 227763 182701, 227459 182976, 227538 183339, 227987 183712, 228037 183929, 227737 184195, 227977 185230, 228130 185335, 228039 185423, 228361 186636, 228648 186360, 228957 187441, 228487 187088, 228703 187823, 228987 187546, 229337 188729, 229068 188992, 229531 189334, 229712 189885, 229434 190171, 229681 190892, 230006 191130, 229830 191315, 230235 192450, 230498 192178, 230869 193174, 230384 192831, 230658 193570, 230918 193297, 231354 194412, 231094 194685, 231127 194764, 231628 195101, 231795 195520, 231544 195786, 231919 196698, 232072 196800, 231997 196882, 232457 197959, 232701 197735, 233159 198843, 232720 198599, 232919 199071, 233158 198844, 233505 200032, 233336 200201, 233429 200509, 233622 200576, 233805 201249, 233658 201390, 233817 202225, 233973 202249, 234039 202515, 233885 202645, 233972 203850, 234066 203882, 233976 203931, 234025 205091, 234263 205192, 234258 205519, 234026 205646, 234014 206342, 234267 206477, 234228 207246, 233962 207409, 233954 207575, 234210 207738, 234106 208934, 233764 208696, 233601 209095, 233367 209320, 233186 209385, 233420 209668, 233184 209864, 233309 210253, 233156 210479, 233250 210887, 233344 210893, 233443 211476, 233536 211477, 233521 212357, 233370 212368, 233594 212669, 233472 213261, 233489 213261, 233457 213861, 233202 213413, 233068 213961, 233184 214172, 233380 214171, 233397 214261, 233120 215082, 232654 215100, 232582 215242, 232797 215861, 232544 215942, 232547 216009, 232331 216007, 231974 216129, 231935 216004, 231738 216000, 231714 215653, 231375 215189, 231129 215247, 231095 215174, 231079 215205, 231243 215816, 231194 215953, 230783 215959, 230390 216860, 230849 216861, 230456 217747, 230312 217046, 229981 217772, 230446 217765, 230029 218676, 229520 218685, 229467 218785, 229612 219546, 229589 219597, 229022 219602, 228598 220374, 228624 220521, 228530 220522, 227959 221449, 228567 221452, 227952 222388, 227844 222386, 227731 221810, 227374 222377, 227844 222386, 227869 222507, 227293 223320, 226887 223317, 226969 223853, 226731 224240, 226136 224253, 225934 224540, 226038 225190, 225468 225201, 225024 225818, 225085 226166, 224779 226163, 224155 226979, 224184 227129, 224682 227128, 224295 227618, 224184 227131, 224035 227130, 223267 228100, 223281 228083, 223285 228100, 223897 228114, 223417 228675, 223285 228100, 223267 228100, 222503 229061) (187115 253536, 187643 253558, 187624 253377) (161972 249118, 161921 249199, 162466 249235, 162387 249108, 162180 249037) (172363 248922, 172895 248862, 172761 248753, 172277 248689) (126296 245995, 126596 245989, 126332 245817) (116241 238469, 116647 238468, 116312 238162) (98873 215243, 98631 215190, 98585 215254, 98616 215762, 99138 215774, 98905 215174) (96838 198852, 97073 199095, 97269 198626) (103825 171087, 103929 171159, 103932 170973)), ((172922 256624, 172930 256904, 171945 256988, 171936 256589)), ((155156 256647, 154175 256540, 154189 256305, 155181 256301)), ((148279 255530, 147296 255319, 147318 255087, 148319 255080)), ((143397 254273, 142421 253987, 142430 253907, 143438 253898)), ((131862 249594, 131341 249333, 131918 249315)), ((128084 247533, 127388 247098, 128178 247086)), ((124361 245142, 124027 244899, 124415 244898)), ((118881 241017, 118341 240593, 118983 240577)), ((215675 236979, 215255 237377, 215171 236970)), ((110947 233260, 110867 233587, 110540 233256)), ((110093 232234, 109990 232676, 109574 232230)), ((109233 231221, 109118 231716, 108687 231215)), ((108359 230221, 108255 230683, 107853 230200)), ((106534 228615, 106170 228194, 106647 228191)), ((105676 227579, 105383 227208, 105772 227206)), ((225153 226495, 225085 226166, 225417 226154)), ((228756 221149, 228624 220521, 229108 220519)), ((100804 219516, 100665 220081, 100355 219495)), ((231722 216010, 231711 216197, 231935 216136, 231937 216518, 231711 216201, 231702 216430, 231465 216331, 231103 215960)), ((96506 209586, 96540 209659, 96317 209881, 95952 209042)), ((233683 209881, 233460 209659, 234048 209042)), ((97929 196799, 97607 196997, 97759 196622)), ((232390 196993, 232073 196799, 232241 196629)), ((230171 191246, 230008 191130, 230099 191035)), ((230008 191130, 230007 191131, 230006 191130, 230007 191129)), ((228434 185571, 228131 185334, 228326 185153)), ((101871 185333, 101566 185571, 101677 185155)), ((226775 176510, 226643 176385, 226753 176298)), ((226643 176385, 226641 176386, 226640 176385, 226642 176384)), ((164425 108417, 165337 108395, 165343 108049, 166264 108063, 166247 108437, 167158 108489, 167174 108142, 168097 108205, 168078 108521, 167444 108514, 168072 108573, 168077 108522, 168992 108522, 168980 108674, 169894 108789, 169919 108519, 168993 108522, 169009 108316, 169924 108459, 169919 108519, 170309 108516, 170838 108595, 170808 108954, 171715 109123, 171745 108798, 172664 108968, 172629 109303, 173537 109525, 173583 109190, 174494 109424, 174450 109737, 175407 109714, 175359 110000, 176263 110266, 176316 109945, 177228 110217, 177173 110546, 178076 110842, 178132 110521, 179042 110832, 179036 110862, 178240 110891, 178982 111153, 179036 110862, 179111 110858, 179938 111162, 179879 111465, 180777 111823, 180845 111514, 181706 111876, 181687 111963, 181214 112001, 181642 112185, 181687 111963, 181845 111945, 182557 112296, 182497 112575, 183273 112975, 183208 112907, 183118 112629, 183453 112122, 183622 112487, 183800 112271, 183852 111787, 183927 111742, 184126 111775, 184227 111735, 184228 111812, 184380 111881, 184975 111910, 185135 111952, 185128 111996, 185791 112231, 185661 112512, 185952 112631, 186021 112312, 186872 112726, 186864 112754, 187339 113036, 187458 113184, 187648 113309, 187556 113575, 187852 113958, 188118 114117, 187980 114231, 188223 114216, 188051 114479, 188252 115275, 188435 115247, 188662 116296, 188456 116325, 188675 117376, 188875 117347, 188974 117840, 188830 118122, 188893 118428, 189093 118397, 189319 119450, 189116 119479, 189301 120316, 189480 120515, 189546 120504, 189567 120610, 192261 123543, 191840 124136, 191249 125100, 191019 125664, 195094 130107, 195685 129913, 196315 129619, 196828 129348, 197398 129006, 198710 130389, 198824 130669, 198820 130801, 198694 131107, 198170 131754, 197418 132641, 196751 133481, 196589 133527, 196461 133490, 196120 133252, 194783 131890, 192877 129919, 190774 127716, 189133 125973, 186962 123606, 186504 123028, 186338 122683, 186298 122125, 185578 121644, 184998 121166, 184471 120601, 184020 119945, 183649 119231, 183374 118538, 182810 118420, 181931 118200, 181018 117935, 180070 117631, 177061 116582, 175907 116189, 174948 115874, 173870 115556, 172785 115275, 171685 115023, 170583 114810, 169473 114631, 168360 114490, 167241 114390, 166121 114328, 165002 114306, 163880 114327, 162760 114389, 161641 114489, 160528 114630, 159418 114809, 158316 115022, 157216 115274, 156131 115555, 155046 115876, 153989 116223, 152940 116581, 151711 117017, 149931 117630, 148983 117934, 148033 118209, 147191 118419, 146626 118538, 146351 119230, 145981 119944, 145530 120600, 145003 121165, 144423 121643, 143700 122123, 143686 122585, 143528 123008, 143038 123606, 140874 125967, 139227 127715, 135935 131149, 133880 133254, 133538 133491, 133397 133528, 133246 133481, 132583 132642, 131542 131401, 131199 130870, 131175 130668, 131262 130459, 131518 130139, 132607 129006, 133184 129349, 134172 129859, 134848 130099, 134925 130094, 138981 125674, 138812 125237, 138307 124330, 137747 123535, 140432 120607, 140453 120505, 140516 120515, 140701 120308, 140882 119480, 140682 119449, 140907 118397, 141103 118427, 141168 118121, 141025 117841, 141124 117348, 141327 117374, 141543 116327, 141339 116295, 141441 115793, 141565 115247, 141756 115277, 142006 114246, 141882 114117, 141951 114074, 141902 113961, 142120 113747, 142257 113430, 142501 113445, 142412 113208, 142630 113039, 143275 112655, 143459 112906, 144104 112607, 144050 112290, 144898 111986, 144889 111949, 145152 111860, 145722 111738, 145734 111827, 146072 111742, 146148 111787, 146237 112243, 146488 112245, 146401 112528, 146429 112595, 146636 112583, 146660 113002, 146732 112973, 146687 112641, 147239 112369, 147413 112412, 147452 112598, 147742 112461, 147413 112412, 147384 112303, 148212 111910, 148280 112216, 149127 111862, 149061 111547, 149431 111405, 149995 111462, 149949 111207, 150824 110878, 150877 111199, 151769 110890, 151720 110575, 152270 110387, 152626 110414, 152655 110599, 153136 110451, 152626 110414, 152604 110272, 153508 109999, 153553 110318, 154445 110057, 154404 109725, 155310 109472, 155348 109809, 156248 109576, 156224 109378, 155800 109349, 156211 109247, 156225 109376, 156911 109420, 157149 109362, 157122 109017, 158030 108841, 158059 109157, 158964 108994, 158938 108638, 159851 108481, 159873 108841, 160781 108689, 160763 108343, 161685 108377, 161692 108594, 162604 108508, 162601 108413, 163512 108446, 163500 108074, 164425 108045) (142508 113446, 142514 113446, 142551 113479, 142596 113441)), ((162601 108413, 161685 108377, 161680 108225, 162591 108162))) \ No newline at end of file diff --git a/stress_benchmark/resources/023.settings b/stress_benchmark/resources/023.settings new file mode 100644 index 0000000000..8ef7f56f7e --- /dev/null +++ b/stress_benchmark/resources/023.settings @@ -0,0 +1,630 @@ +material_bed_temperature=60 +support_tree_rest_preference=buildplate +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=1 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=5 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=3 +top_bottom_pattern=lines +skirt_brim_line_width=0.44 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.6 +raft_acceleration=8000.0 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.3 +support_initial_layer_line_distance=4.4 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=35.0 +jerk_support_infill=10.0 +wall_overhang_speed_factor=60.0 +support_roof_line_width=0.44 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=210 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=0.6 +material_break_temperature=50 +acceleration_support_interface=8000.0 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=10.0 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=3.6666666666666665 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=5000.0 +speed_travel=400.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=8.8 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=40 +retraction_amount=0.6 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=10.0 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.44 +meshfix_union_all_remove_holes=False +support_wall_count=1 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=120.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=80.0 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=8000.0 +wall_extruder_nr=-1 +support_structure=tree +support_xy_distance_overhang=0.2 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.44 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.44 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=8000.0 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=2.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.5 +speed_wall=120.0 +bottom_thickness=0.6 +raft_interface_jerk=10.0 +material_shrinkage_percentage=100.0 +support_interface_wall_count=1 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.044000000000000004 +small_feature_max_length=15.707963267948966 +wall_line_count=2 +material_print_temp_prepend=False +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +brim_gap=0 +acceleration_support_infill=8000.0 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=56.25 +jerk_prime_tower=10.0 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=100.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=400.0 +acceleration_topbottom=6000.0 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=350.0 +skin_overlap=10 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=100 +machine_max_acceleration_x=9000 +support_interface_height=0.6 +skirt_height=3 +support_roof_pattern=zigzag +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=280.0 +material_print_temperature_layer_0=210 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.44 +jerk_wall_x_roofing=10.0 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=4.4 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=8000.0 +interlocking_orientation=22.5 +speed_wall_0_roofing=120.0 +sub_div_rad_add=0.44 +bottom_skin_preshrink=0.8 +minimum_bottom_area=2.0 +infill_line_distance=8.8 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=5.0 +support_tree_angle_slow=33.333333333333336 +support_interface_line_width=0.44 +support_skip_zag_per_mm=20 +support_angle=50 +raft_base_speed=56.25 +raft_remove_inside_corners=False +ironing_only_highest_layer=True +roofing_line_width=0.44 +hole_xy_offset=0 +jerk_print_layer_0=10.0 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=60 +skirt_brim_material_flow=100 +acceleration_support_roof=8000.0 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=410 +prime_tower_base_size=6.6 +infill_enable_travel_optimization=False +speed_support_infill=350 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=40 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=12 +retraction_hop=0.3 +jerk_wall_0=5.0 +mold_angle=40 +raft_speed=75.0 +prime_tower_wipe_enabled=True +support_roof_density=50 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=8000.0 +cool_min_temperature=210 +jerk_layer_0=10.0 +support_offset=0.0 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.2 +fill_outline_gaps=False +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.08 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=0.3 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=300 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=40 +roofing_pattern=lines +material_bed_temp_prepend=False +material=0 +infill_before_walls=False +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.44 +retract_at_layer_change=False +wall_transition_length=0.44 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.88 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +quality_name=Normal +material_final_print_temperature=210 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.44 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=8000.0 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=noskin +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=True +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.41800000000000004 +speed_z_hop=50.0 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=60 +roofing_layer_count=1 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.044000000000000004 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.5 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=60 +lightning_infill_straightening_angle=40 +speed_topbottom=120.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=False +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=25 +machine_max_jerk_z=0.4 +support_tree_angle=50 +expand_skins_expand_distance=0.8 +prime_tower_position_y=124.61500000000001 +mesh_position_x=0 +cross_infill_pocket_size=8.8 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.44 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.88 +support_bottom_distance=0 +wall_thickness=0.88 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=8000.0 +z_seam_position=backright +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=8000.0 +minimum_support_area=2.0 +brim_width=6.6 +small_skin_width=0.88 +shell=0 +jerk_print=10.0 +adhesion_type=skirt +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=10 +z_seam_x=150.0 +acceleration_travel=8000.0 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=5000.0 +raft_base_extruder_nr=0 +raft_surface_line_width=0.44 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=zigzag +initial_bottom_layers=3 +bridge_fan_speed_2=0 +support_use_towers=False +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=6000.0 +retraction_hop_enabled=True +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=40 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=160.0 +bridge_wall_min_length=1.94 +experimental=0 +bottom_layers=3 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=buildplate +support_skip_some_zags=False +support_line_width=0.44 +ooze_shield_enabled=False +raft_base_thickness=0.36 +roofing_extruder_nr=-1 +jerk_support=10.0 +wall_line_width_x=0.44 +support_bottom_wall_count=1 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=grid +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=8000.0 +material_end_of_filament_purge_length=20 +speed_print=400.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=5000.0 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=8000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=5.0 +skin_material_flow=100 +support_bottom_density=12 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=1 +infill_sparse_density=10 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=25 +raft_jerk=10.0 +speed_support=350 +jerk_support_interface=10.0 +machine_disallowed_areas=[] +minimum_roof_area=2.0 +raft_surface_jerk=10.0 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=10.0 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=6000.0 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=400.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=12 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=40 +support_bottom_pattern=zigzag +support_roof_height=0.6 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.6 +min_skin_width_for_expansion=6.123233995736766e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=0.6 +support_fan_enable=False +infill_wipe_dist=0.11 +machine_shape=elliptic +support_pattern=lines +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.88 +acceleration_layer_0=8000.0 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=0.88 +brim_line_count=15 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=5000.0 +wall_transition_angle=10 +top_thickness=1 +machine_center_is_zero=True +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=60 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=10.0 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=4 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=50.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.11 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.44 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=10.0 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.6 +machine_extruders_share_nozzle=False +machine_name=Unknown +acceleration_prime_tower=8000.0 +retraction_hop_after_extruder_switch_height=0.3 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=10.0 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=60.0 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=210 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=8000.0 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=10 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=10.0 +speed_wall_x=280.0 +time=09:47:39 +machine_buildplate_type=glass +top_layers=5 +jerk_ironing=10.0 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=50.0 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=60.0 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=0 +support_bottom_extruder_nr=0 +speed_support_roof=100 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=120.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=100 +material_bed_temp_wait=True +machine_depth=300 +bridge_wall_material_flow=100.0 +jerk_travel=100.0 +retraction_speed=40 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.88 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=10.0 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=150.0 +bottom_skin_expand_distance=0.8 +infill_support_angle=50 +speed_layer_0=25 +raft_surface_speed=75.0 +material_name=empty +acceleration_wall_0=5000.0 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=100.0 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/023.wkt b/stress_benchmark/resources/023.wkt new file mode 100644 index 0000000000..9d4f96a13a --- /dev/null +++ b/stress_benchmark/resources/023.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((-30982 -26911, -30986 -25821, -30913 -25649, -39879 -25649, -40000 -25817, -40000 -26973, -31031 -26973)), ((39999 -25822, 39884 -25651, 31226 -25649, 31272 -25829, 31272 -26970, 39999 -26973))) \ No newline at end of file diff --git a/stress_benchmark/resources/024.settings b/stress_benchmark/resources/024.settings new file mode 100644 index 0000000000..ca30eecf44 --- /dev/null +++ b/stress_benchmark/resources/024.settings @@ -0,0 +1,632 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.1 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=3.0 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=2 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=4 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=110.0 +support_bottom_height=1 +raft_acceleration=500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=True +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=False +layer_height_0=0.2 +support_initial_layer_line_distance=8.0 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=10.0 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.02 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=220.0 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=0.3 +material_break_temperature=50 +acceleration_support_interface=500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=3 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=4.0 +support_bottom_stair_step_height=0.3 +acceleration_wall_x_roofing=500 +speed_travel=175.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=0.3 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=25.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=23.333333333333332 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=500 +wall_extruder_nr=-1 +support_structure=tree +support_xy_distance_overhang=0.4 +skin_angles=[] +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=500 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=1 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.8 +speed_wall=35.0 +bottom_thickness=1.2 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=1 +machine_max_jerk_e=5 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.08 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=False +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=220.0 +brim_gap=0 +acceleration_support_infill=500 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=26.25 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=8 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=200.0 +acceleration_topbottom=250 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=70 +skin_overlap=20.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=60 +skin_material_flow_layer_0=110.0 +bridge_skin_material_flow_2=100 +speed_support_interface=35.0 +machine_max_acceleration_x=500 +support_interface_height=1 +skirt_height=3 +support_roof_pattern=triangles +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=95 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=True +support_brim_line_count=9 +blackmagic=0 +speed_wall_x_roofing=35.0 +material_print_temperature_layer_0=220.0 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=8.0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=500 +interlocking_orientation=22.5 +speed_wall_0_roofing=25.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1 +infill_line_distance=4.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=40.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=45 +raft_base_speed=26.25 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=17.5 +skirt_brim_material_flow=100 +acceleration_support_roof=500 +support_roof_offset=0 +travel_retract_before_outer_wall=False +machine_height=300 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=True +speed_support_infill=100 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=30 +retraction_hop=0.2 +jerk_wall_0=8 +mold_angle=40 +raft_speed=35.0 +prime_tower_wipe_enabled=True +support_roof_density=30 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=500 +cool_min_temperature=220.0 +jerk_layer_0=8 +support_offset=0 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.2 +fill_outline_gaps=True +meshfix_maximum_resolution=0.1 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=False +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=220 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=25 +roofing_pattern=lines +material_bed_temp_prepend=False +material=0 +infill_before_walls=False +material_standby_temperature=180.0 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=450 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=110.0 +material_final_print_temperature=220.0 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=25 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=110.0 +retraction_combing=all +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=10.0 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=17.5 +roofing_layer_count=1 +speed_slowdown_layers=2 +default_material_print_temperature=225.0 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.1 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=17.5 +lightning_infill_straightening_angle=40 +speed_topbottom=35.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=20.0 +machine_max_jerk_z=0.4 +support_tree_angle=60.0 +expand_skins_expand_distance=0.8 +prime_tower_position_y=191.0 +mesh_position_x=0 +cross_infill_pocket_size=4.0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=5.0 +interlocking_beam_width=0.8 +support_bottom_distance=0.2 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=500 +minimum_support_area=0 +brim_width=8 +small_skin_width=0.8 +support_infill_angles=[] +shell=0 +jerk_print=8 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=30 +z_seam_x=110.0 +acceleration_travel=1000 +ironing_enabled=False +support_bottom_material_flow=60 +acceleration_wall=500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.08 +bridge_skin_material_flow_3=110 +support_interface_pattern=triangles +initial_bottom_layers=6 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=250 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=True +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=211.0 +bridge_wall_min_length=2.2 +experimental=0 +bottom_layers=6 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=True +wall_0_wipe_dist=0.4 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=1 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=gyroid +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=500 +material_end_of_filament_purge_length=20 +speed_print=70 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=10.0 +acceleration_travel_layer_0=1000 +speed_equalize_flow_width_factor=100 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=100 +support_bottom_density=30 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=1 +infill_sparse_density=10 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=110.0 +speed_print_layer_0=20.0 +raft_jerk=8 +speed_support=100 +jerk_support_interface=8 +machine_disallowed_areas=[] +minimum_roof_area=1 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=250 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=35.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=100 +support_material_flow=90 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=triangles +support_roof_height=1 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1.2 +min_skin_width_for_expansion=7.34788079488412e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=0.5 +support_fan_enable=True +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=gyroid +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=d2af194b-ecf5-4d5e-873a-b57dea74bfa2 +support_roof_line_distance=4.0 +brim_line_count=19 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=Test_Me +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=500 +wall_transition_angle=10 +top_thickness=1.2 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0 +bridge_wall_speed=12.5 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=4 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=3 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=100.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=60 +machine_max_feedrate_y=500 +alternate_carve_order=False +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=False +cool_fan_full_at_height=0.6000000000000001 +machine_extruders_share_nozzle=False +acceleration_prime_tower=500 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=10.0 +wall_0_material_flow_roofing=95 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=220.0 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=False +dual=0 +raft_interface_acceleration=500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=5 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=35.0 +time=09:49:12 +machine_buildplate_type=glass +top_layers=6 +roofing_angles=[] +jerk_ironing=4 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=35.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=35.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=1.474 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=35.0 +material_bed_temp_wait=True +machine_depth=220 +bridge_wall_material_flow=50 +jerk_travel=8 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=110 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=35.0 +material_name=empty +acceleration_wall_0=500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=True +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/024.wkt b/stress_benchmark/resources/024.wkt new file mode 100644 index 0000000000..cf3db88cb2 --- /dev/null +++ b/stress_benchmark/resources/024.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((81072 131116, 81371 131193, 81650 131326, 81892 131510, 82374 131672, 82673 132840, 82303 133216, 82168 133495, 81980 133742, 81748 133949, 81480 134107, 81187 134210, 80887 134255, 80578 134239, 80271 134162, 79999 134032, 79751 133848, 79544 133619, 79384 133346, 79283 133054, 79242 132755, 79260 132439, 79336 132145, 79475 131859, 79663 131612, 79894 131405, 80162 131247, 80455 131144, 80763 131100)), ((114096 96925, 115636 97380, 115724 97450, 115177 97683, 114710 97750, 114173 97922, 115582 98296, 116444 98935, 116859 99261, 117571 99945, 118181 100504, 117864 100649, 117412 101033, 116916 101175, 115788 100975, 115288 101139, 115098 101140, 115857 101688, 116282 102379, 117040 104395, 117568 105419, 117973 106366, 117516 107162, 117544 107536, 117542 107937, 117826 108213, 118473 108780, 118808 108320, 117973 106366, 118626 105229, 119073 105472, 119319 105583, 119665 105889, 120358 106447, 121161 107499, 121706 108172, 122315 109016, 122908 111170, 122988 111292, 123107 111573, 123029 112085, 122790 113917, 122148 115021, 121816 115724, 121086 116503, 120942 116566, 120762 116665, 120456 116809, 120295 116930, 119655 117265, 119567 117365, 119420 117495, 118714 117832, 118180 118174, 117997 118389, 117898 118638, 117706 119034, 117548 119543, 117416 119602, 117235 119658, 117062 119782, 116899 119914, 116744 120441, 116340 121947, 115976 122682, 115875 122860, 115729 122982, 115053 123737, 113886 124588, 113714 124812, 112624 125195, 111829 125398, 111291 125195, 110535 124944, 109260 124294, 109859 121944, 109925 121722, 109938 121713, 111631 121691, 111827 121675, 111959 121392, 112189 120592, 111678 121223, 110799 121123, 110344 121427, 109938 121713, 109187 121723, 107625 121041, 106237 120641, 105005 119678, 104013 119061, 103406 117922, 102988 116903, 103118 116284, 103257 115865, 103345 115807, 103787 114730, 103723 114869, 103430 115342, 103257 115865, 103045 116005, 102597 116416, 102035 116674, 101807 116751, 100364 117430, 100226 116912, 100198 116770, 100229 113454, 101105 110156, 101252 109826, 101648 108756, 101982 108304, 102039 108244, 102404 107745, 102511 107616, 102489 107614, 102372 107385, 102412 107178, 103254 106261, 103533 105985, 103664 105839, 103843 105718, 104139 105490, 104484 105255, 104656 105159, 105418 104577, 105795 104619, 105904 104699, 105861 104722, 105653 104897, 105468 105114, 105184 105372, 104235 105979, 103797 106357, 103599 106609, 103580 106614, 102832 107273, 102786 107283, 102511 107616, 102785 107644, 102900 107586, 103134 107494, 103393 107340, 103966 107035, 104485 106726, 104928 106363, 105172 106124, 105562 105708, 106032 105170, 106013 104780, 105904 104699, 106156 104564, 106602 104404, 107068 104202, 107116 104196, 107629 103936, 108655 103789, 108994 103698, 111077 103478, 111601 103444, 111658 103426, 111656 102799, 112191 101516, 111919 101604, 111607 101636, 110793 101941, 110080 102408, 109739 102452, 109363 102303, 108821 102267, 109314 101119, 109544 100506, 109717 100145, 110141 99431, 111529 98330, 111066 98316, 110455 98420, 109835 98348, 111017 97388, 112392 96455) (111923 103342, 111658 103426, 111661 104229, 111821 105261, 111828 105448, 111915 105845, 112306 107480, 112688 107839, 112765 107948, 112843 107958, 112962 107661, 113364 107285, 113525 106684, 113599 106318, 113571 105967, 113570 105125, 113540 104713, 113537 104324, 113515 103988, 113512 103609, 113500 103435, 113037 103275)), ((118804 73402, 118999 73472, 119176 73557, 119359 73671, 119506 73784, 119992 74208, 120133 74297, 120255 74330, 120352 74295, 120453 74340, 120501 74337, 120881 74715, 121119 74923, 121333 75092, 121681 75329, 121866 75430, 122127 75536, 122268 75564, 122270 75586, 122447 75609, 122596 75582, 122825 75557, 123100 75625, 123321 75696, 123694 75891, 124499 76492, 124831 76695, 125146 76841, 125392 76752, 125668 76824, 126243 77185, 128189 78464, 128363 78608, 128768 78978, 129389 79590, 129887 80050, 130477 80571, 131237 81451, 131791 82055, 132055 82313, 132357 82578, 133034 83135, 133732 83923, 134290 84590, 134563 84954, 134602 85048, 134864 85300, 135017 85485, 135235 85726, 135518 86075, 135918 86605, 136327 87209, 136521 87541, 136623 87750, 136692 87946, 136726 88140, 136723 88312, 136691 88489, 136602 88756, 136405 89173, 136276 89407, 136076 89736, 135872 90034, 135634 90323, 135501 90440, 135365 90492, 135228 90487, 135031 90366, 134821 90180, 134553 89917, 134195 89539, 133586 88857, 131971 86961, 131157 86039, 130622 85450, 129603 84357, 127436 82072, 127399 82019, 127217 81846, 126954 81621, 126577 81349, 126521 81325, 126127 81087, 124165 79840, 123045 79163, 122576 78894, 121819 78441, 120299 77488, 120003 77316, 119657 77130, 119358 76990, 118699 76622, 117990 76207, 117380 75821, 116891 75470, 116716 75311, 116625 75176, 116608 75033, 116667 74875, 116730 74770, 116861 74603, 117011 74438, 117384 74082, 117583 73912, 117952 73632, 118239 73461, 118416 73392, 118600 73372))) \ No newline at end of file diff --git a/stress_benchmark/resources/025.settings b/stress_benchmark/resources/025.settings new file mode 100644 index 0000000000..3239862a7f --- /dev/null +++ b/stress_benchmark/resources/025.settings @@ -0,0 +1,631 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.1 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=8 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=1 +raft_acceleration=3000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.1 +meshfix_union_all=True +layer_height_0=0.3 +support_initial_layer_line_distance=2.6666666666666665 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=200 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=50 +acceleration_support_interface=3000 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.1 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0.3 +acceleration_wall_x_roofing=3000 +speed_travel=120 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.1 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=6.5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=30.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=20.0 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3000 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.7 +speed_wall=30.0 +bottom_thickness=0.8 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.02 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +brim_gap=0 +acceleration_support_infill=3000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=22.5 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=30.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=120 +acceleration_topbottom=3000 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=60 +skin_overlap=5 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=40.0 +machine_max_acceleration_x=9000 +support_interface_height=1 +skirt_height=3 +support_roof_pattern=concentric +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=60.0 +material_print_temperature_layer_0=200 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=2.6666666666666665 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3000 +interlocking_orientation=22.5 +speed_wall_0_roofing=30.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1.0 +infill_line_distance=4.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=33.333333333333336 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=50 +raft_base_speed=22.5 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=15.0 +skirt_brim_material_flow=100 +acceleration_support_roof=3000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=250 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=60 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=1 +jerk_wall_0=20 +mold_angle=40 +raft_speed=30.0 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=3000 +cool_min_temperature=200 +jerk_layer_0=20 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.1 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=1 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=220 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=25 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +quality_name=Fine +material_final_print_temperature=185 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=3000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=all +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=15.0 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.1 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=15.0 +lightning_infill_straightening_angle=40 +speed_topbottom=30.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=30.0 +machine_max_jerk_z=0.4 +support_tree_angle=50 +expand_skins_expand_distance=0.8 +prime_tower_position_y=190.575 +mesh_position_x=0 +cross_infill_pocket_size=4.0 +interlocking_enable=False +support_tree_top_rate=10 +wall_line_width_0=0.4 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.1 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=3000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=3000 +minimum_support_area=0.0 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=20 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=0 +z_seam_x=110.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=3000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=concentric +initial_bottom_layers=8 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=3000 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=210.575 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=8 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.36 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=grid +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=3000 +material_end_of_filament_purge_length=20 +speed_print=60 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3000 +carve_multiple_volumes=False +raft_surface_thickness=0.1 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=5000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=20 +skin_material_flow=100 +support_bottom_density=100 +bridge_skin_density_3=80 +support_interface_enable=False +support_roof_wall_count=0 +infill_sparse_density=20 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=30.0 +raft_jerk=20 +speed_support=60 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=20 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=3000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=60 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=concentric +support_roof_height=1 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=6.5 +support_fan_enable=False +infill_wipe_dist=0.1 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=3000 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=0.4 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=3000 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=15.0 +support_roof_enable=False +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=1 +infill_mesh=False +layer_height=0.1 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=60.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.3 +machine_extruders_share_nozzle=False +machine_name=Unknown +acceleration_prime_tower=3000 +retraction_hop_after_extruder_switch_height=1 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=190 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=False +dual=0 +raft_interface_acceleration=3000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=20 +speed_wall_x=60.0 +time=09:53:09 +machine_buildplate_type=glass +top_layers=8 +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.15000000000000002 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=30 +support_bottom_extruder_nr=0 +speed_support_roof=40.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=30.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=40.0 +material_bed_temp_wait=True +machine_depth=220 +bridge_wall_material_flow=50 +jerk_travel=30 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=220 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=30.0 +raft_surface_speed=30.0 +material_name=empty +acceleration_wall_0=3000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/025.wkt b/stress_benchmark/resources/025.wkt new file mode 100644 index 0000000000..949fde4520 --- /dev/null +++ b/stress_benchmark/resources/025.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((124092 135655, 124492 136222, 124546 136262, 125073 136985, 124357 137909, 123408 138621, 123181 138712, 122002 137845, 121894 137430, 121972 136898, 122185 136404, 122519 135979, 122950 135655, 123448 135450, 123698 135416)), ((124564 133406, 125497 133789, 126295 134396, 126902 135185, 127277 136104, 127396 137089, 127323 137572, 127621 137508, 128032 137495, 128382 137591, 128813 137487, 128878 137816, 129899 137925, 130378 138079, 130701 138296, 130940 138624, 131011 138881, 130947 139183, 130848 139392, 130343 139824, 129955 140017, 129458 140145, 128922 140297, 128768 140902, 128725 141158, 128494 141702, 128005 142404, 128045 142475, 128189 142448, 128504 142587, 128916 143032, 129285 143743, 129478 144286, 129665 144954, 129763 145484, 129831 146314, 129779 147332, 130514 147949, 131024 148350, 131272 148872, 131540 149349, 131341 149533, 130400 149904, 130438 150184, 130360 150557, 130097 150943, 129783 151157, 129171 151361, 128566 151392, 127989 151346, 127866 151309, 127799 151746, 127641 151943, 127185 152252, 126777 152415, 126312 152476, 126119 152392, 125505 151741, 124290 152430, 123664 152699, 123508 152798, 122773 153031, 122196 153235, 121692 153396, 121243 153672, 120675 154042, 120581 154090, 119907 154824, 119190 155503, 119077 155589, 118498 156123, 117512 156812, 117066 157032, 116729 157001, 116545 157040, 116274 156893, 113796 158483, 113015 158949, 112220 159375, 111061 159829, 110854 159879, 110383 160065, 109956 159900, 110025 159481, 110016 159217, 110662 158009, 110743 157931, 111602 156811, 111774 156569, 113070 154955, 111571 154623, 109718 154190, 107970 153742, 106926 153330, 106160 152862, 105696 152528, 105503 152015, 105679 151730, 105821 151368, 106599 150806, 107532 150374, 113086 148825, 111078 146659, 110355 145658, 110285 145314, 110316 144686, 110891 144378, 111670 144405, 112356 144519, 113428 144815, 115324 145372, 116325 145708, 119873 147094, 121314 147561, 121096 147878, 121766 147097, 122184 146707, 121869 146091, 121542 145321, 121391 144790, 121300 144508, 121156 143853, 121008 142837, 121009 142398, 120582 142023, 119924 142226, 119389 142290, 118939 142303, 118226 142120, 117924 141932, 117750 141703, 117709 141418, 117798 141017, 118034 140619, 118345 140298, 118808 139964, 118889 139787, 119133 139565, 119500 139378, 119979 139231, 120252 139184, 120095 138977, 119719 138058, 119601 137073, 119750 136088, 120153 135170, 120784 134383, 121601 133779, 122546 133401, 123557 133275) (122999 135152, 122504 135351, 122076 135667, 121745 136080, 121534 136561, 121456 137077, 121517 137593, 121713 138075, 122031 138490, 122449 138808, 122939 139008, 123467 139077, 123997 139010, 124484 138822, 124921 138495, 125252 138082, 125463 137601, 125541 137085, 125480 136569, 125284 136086, 124966 135672, 124547 135355, 124057 135154, 123530 135085)), ((87162 126364, 87660 126696, 88549 126437, 89223 126315, 89779 126352, 90296 126505, 90411 126652, 90440 126900, 90393 127180, 90306 127371, 90040 127518, 88788 127730, 87987 127942, 87394 128076, 86515 128432, 87127 128584, 87334 128684, 87284 128777, 86925 128942, 87540 128835, 88650 128521, 89816 128941, 90109 129103, 90062 129223, 90024 130246, 90328 131224, 90947 132060, 91817 132673, 92860 133007, 93966 133024, 94076 132992, 94607 132992, 94674 133085, 95198 134787, 95136 136562, 94952 137074, 93559 137465, 93568 137488, 92549 138115, 91860 138938, 91481 139906, 91443 140928, 91674 141670, 91528 141811, 90092 142802, 89254 142774, 88904 142800, 88324 143101, 88807 143193, 89503 143248, 90396 143250, 91958 143147, 92269 143236, 92481 143610, 92532 143848, 92453 144065, 92006 144328, 91355 144516, 90909 144559, 89849 144515, 89448 144960, 88679 145309, 88427 145362, 87716 145549, 86743 145623, 86119 145613, 85779 145557, 85202 145303, 84516 144845, 83951 144273, 83645 143875, 83363 143527, 82989 142910, 82915 142704, 82701 142469, 82339 141726, 81934 141500, 81484 141172, 81120 140756, 80958 140450, 80895 140146, 80981 139953, 81395 139940, 81955 139821, 82134 139746, 82142 139705, 82423 139557, 82902 139210, 83214 138917, 83574 138434, 83757 138117, 83960 137547, 84046 136586, 83916 135946, 83821 135688, 83394 135036, 83283 134849, 82830 134445, 82060 134001, 81418 133797, 81231 133769, 80908 133032, 80557 133041, 80049 133153, 80011 132965, 80048 132647, 80134 132350, 80609 131637, 81063 131208, 81238 130371, 81385 130078, 81606 129225, 81711 129075, 81796 128819, 81998 128355, 82436 127622, 82960 127059, 83458 126672, 83775 126536, 84395 126354, 85324 126229, 86333 126211) (83409 142480, 83831 142934, 84368 143244, 85173 143393, 85841 143434, 86228 143402, 85550 143335, 84975 143216, 84476 143048, 83934 142799, 83512 142483, 83332 142191) (84034 128717, 83396 128917, 82647 129258, 82205 129689, 81854 130315, 81888 130559, 82008 130196, 82336 129795, 82993 129268, 83774 128883, 84416 128653)), ((73311 125782, 73811 125844, 74406 125943, 75327 126220, 75968 126575, 76099 126631, 76514 127133, 77432 127146, 78124 127245, 78576 127414, 79072 127752, 79133 127844, 79096 128161, 78957 128439, 78811 128585, 78458 128630, 77334 128463, 75818 128357, 74930 128417, 75477 128761, 75651 128915, 75566 128985, 75088 129025, 75745 129123, 76895 129165, 77856 129913, 78097 130171, 78024 130259, 77672 131220, 77659 132245, 77988 133232, 78628 134086, 79515 134723, 80563 135081, 80678 135085, 81159 135241, 81193 135356, 81168 137134, 80558 138805, 80223 139237, 78803 139179, 78805 139204, 77634 139488, 76732 140055, 76073 140858, 75720 141818, 75711 142581, 75504 142682, 73866 143176, 73069 142887, 72785 142818, 72114 142933, 72562 143169, 73427 143513, 74129 143734, 75492 144070, 75768 144233, 75875 144733, 75845 144933, 75707 145096, 75308 145194, 74631 145219, 74067 145095, 73072 144740, 72522 145030, 71680 145116, 71517 145088, 70705 145040, 69630 144774, 69184 144612, 68856 144433, 68417 144039, 67914 143409, 67522 142629, 67211 141799, 67170 141489, 67012 140799, 66918 140581, 66789 139746, 66599 139541, 66165 138963, 65954 138470, 65896 138141, 65930 137820, 66113 137664, 66467 137767, 67037 137827, 67256 137810, 67272 137778, 67566 137728, 68112 137553, 68594 137309, 69005 137016, 69278 136771, 69680 136246, 70025 135406, 70100 134754, 70089 134479, 69895 133760, 69837 133513, 69509 132967, 68932 132328, 68385 131938, 68238 131865, 68161 131067, 67804 130961, 67296 130913, 67311 130706, 67438 130424, 67619 130158, 67926 129944, 68140 129734, 68619 129460, 68784 129391, 69341 128492, 69464 128415, 69536 128252, 69810 127907, 69965 127637, 70330 127232, 71110 126530, 71219 126408, 71922 126010, 72474 125811, 72825 125768) (67976 141379, 68375 141828, 69095 142206, 69753 142452, 69140 142160, 68792 141942, 68131 141398, 67884 141118, 67735 140877) (71688 127975, 70997 128074, 70519 128313, 70103 128690, 70588 128391, 71085 128205, 71548 128084, 72361 127972)), ((35087 134501, 35589 134697, 36025 135016, 36364 135435, 36587 135926, 36629 136174, 36403 136577, 35851 136996, 35813 137052, 35109 137604, 34160 136920, 33416 135997, 33316 135773, 34142 134564, 34553 134442)), ((19696 118736, 20061 118865, 20651 119623, 21115 120534, 22857 126037, 24952 123954, 25927 123197, 26269 123115, 26897 123124, 27225 123688, 27225 124467, 27135 125157, 26579 127426, 26387 128154, 26085 129165, 24824 132759, 24417 134221, 24075 134003, 24891 134654, 25291 135055, 25897 134720, 26654 134366, 27179 134197, 27458 134095, 27948 133965, 29103 133745, 29557 133731, 29917 133291, 29691 132641, 29609 132109, 29579 131660, 29738 130940, 29915 130632, 30138 130449, 30422 130399, 30826 130474, 31231 130696, 31562 130996, 31913 131447, 32092 131521, 32323 131758, 32522 132117, 32687 132592, 32742 132862, 32944 132698, 33849 132291, 34829 132138, 35820 132252, 36751 132623, 37559 133227, 38191 134022, 38602 134954, 38764 135959, 38667 136970, 38318 137916, 37739 138734, 36971 139369, 36066 139775, 35087 139928, 34601 139873, 34675 140168, 34702 140578, 34618 140932, 34737 141359, 34412 141436, 34336 142463, 34201 142944, 33987 143280, 33675 143524, 33421 143605, 33117 143551, 32905 143459, 32455 142969, 32249 142588, 32104 142096, 31933 141566, 31323 141434, 31066 141399, 30513 141187, 29796 140722, 29725 140766, 29757 140909, 29631 141228, 29200 141655, 28503 142049, 27966 142261, 27305 142471, 26778 142588, 25951 142684, 24931 142668, 24340 143424, 23958 143947, 23446 144214, 22978 144498, 22787 144306, 22453 143540, 22407 143374, 22105 143425, 21729 143361, 21335 143112, 21110 142805, 20884 142201, 20832 141597, 20858 141020, 20891 140895, 20452 140843, 20250 140692, 19925 140246, 19748 139846, 19670 139382, 19747 139186, 20376 138550, 19642 137353, 19355 136743, 19252 136591, 18992 135865, 18767 135295, 18589 134797, 18298 134358, 17909 133804, 17858 133711, 17100 133063, 16397 132370, 16306 132260, 15753 131701, 15057 130786, 14794 130301, 14814 129963, 14768 129781, 14906 129504, 14533 128976, 13230 127084, 12737 126319, 12283 125540, 11789 124397, 11733 124193, 11530 123728, 11680 123296, 12101 123349, 12367 123331, 13595 123935, 13675 124013, 14825 124833, 15072 124996, 16730 126234, 17010 124726, 17379 122858, 17768 121087, 18140 120037, 18581 119256, 18899 118781, 19405 118570) (34377 134071, 33902 134283, 33499 134616, 33196 135045, 33012 135542, 32962 136072, 33047 136600, 33252 137080, 33595 137504, 34018 137820, 34507 138015, 35024 138075, 35539 137995, 36015 137783, 36417 137451, 36720 137021, 36903 136524, 36954 135994, 36869 135467, 36652 134979, 36321 134562, 35897 134246, 35409 134052, 34891 133992)), ((170689 142892, 171410 143026, 171653 143115, 171637 143176, 171097 143439, 170547 143588, 169808 143507, 169405 143326, 168946 143358, 168597 143243, 168568 143118, 168662 142898, 168767 142818, 169351 142775, 169939 142673, 170044 142633)), ((160907 142110, 161562 142170, 161979 142473, 162850 142936, 162827 143032, 162483 143109, 161881 143141, 161141 142892, 160825 142626, 160402 142540, 160139 142358, 160136 142277, 160286 142050, 160431 142018)), ((174616 135985, 175060 136201, 175419 136522, 175670 136923, 175795 137380, 175785 137861, 175631 138348, 175259 138337, 174655 138500, 174600 138535, 173815 138759, 173280 137922, 173027 136952, 173036 136732, 174185 136024, 174275 135919)), ((170062 132671, 170453 132766, 170576 132850, 170532 132915, 169947 133171, 169368 133461, 169780 133339, 170541 133435, 171199 133757, 171442 133582, 171976 133419, 172324 133433, 172705 133612, 173125 134041, 173413 134612, 173940 134499, 174839 134531, 175692 134771, 176442 135203, 177038 135797, 177437 136514, 177614 137303, 177558 138113, 177270 138884, 176772 139569, 176094 140118, 175288 140494, 174405 140672, 174149 140661, 174042 140888, 173902 141429, 173579 141935, 173243 142191, 172891 142278, 172349 142228, 171950 142053, 171510 142396, 170759 142667, 170221 142624, 169834 142449, 169691 142311, 168850 141963, 169004 141574, 169745 140936, 170341 140054, 170667 139067, 170699 138046, 170436 137056, 169895 136169, 169114 135441, 168308 135014, 168208 134673, 168097 134516, 168669 134102, 168928 133737, 169022 133667, 168534 133661, 167801 133754, 167618 133617, 167562 133516, 167558 133374, 167714 133247, 167985 133160, 168341 133112, 168690 132859, 169221 132685, 169499 132633) (173771 135824, 173473 135929, 173099 136140, 172847 136363, 172522 136803, 172393 137144, 172346 137626, 172454 138110, 172748 138594, 173139 138927, 173671 139162, 174074 139232, 174463 139228, 174771 139171, 174891 139250, 174870 139315, 175327 139101, 175723 138777, 176029 138364, 176194 137916, 176228 137499, 176162 137000, 175921 136519, 175568 136157, 175171 135925, 174716 135784, 174312 135750)), ((167562 137186, 167902 137503, 168138 137892, 168253 138322, 168240 138769, 168098 139198, 167815 139603, 167519 139503, 166917 139484, 166856 139500, 166048 139486, 165797 138566, 165832 137603, 165898 137407, 167181 137071, 167251 137022)), ((164120 132915, 164410 133110, 164398 133162, 163358 133370, 163691 133363, 164369 133634, 164937 134135, 165262 134012, 165779 133992, 166099 134091, 166399 134347, 166676 134835, 166807 135470, 167309 135502, 168150 135760, 168895 136203, 169495 136801, 169906 137513, 170102 138291, 170070 139082, 169812 139832, 169345 140489, 168700 141009, 167922 141356, 167064 141507, 166183 141452, 165924 141366, 165528 142070, 165115 142448, 164751 142599, 164404 142593, 163929 142416, 163559 142119, 163003 142352, 162269 142414, 161784 142245, 161473 141989, 161294 141695, 160695 141236, 160915 140948, 161813 140512, 162591 139834, 163144 138993, 163431 138043, 163433 137051, 163149 136084, 162599 135208, 161933 134587, 161926 134283, 161854 134088, 162387 133886, 162431 133836, 162837 133504, 162463 133399, 161761 133297, 161683 133235, 161606 133029, 161640 132897, 161820 132816, 162346 132841, 162755 132697, 163536 132689) (166507 136762, 166108 136865, 165646 137127, 165406 137338, 165202 137623, 165039 138058, 165018 138535, 165171 139062, 165451 139467, 165889 139819, 166244 139984, 166600 140075, 167094 140097, 167022 140199, 167421 140129, 167833 139943, 168238 139631, 168490 139311, 168678 138913, 168742 138428, 168636 137916, 168394 137489, 168084 137178, 167702 136938, 167168 136770, 166812 136739)), ((180603 140702, 180065 141164, 179695 141375, 179326 141489, 178815 141584, 178353 141526, 177868 141713, 177471 141709, 177407 141595, 177433 141350, 177515 141224, 178125 140984, 178629 140725, 178775 140615, 179474 140673, 180185 140589, 180607 140575)), ((62889 122041, 63363 122244, 63896 122510, 64744 123059, 65344 123649, 65564 124188, 66453 124486, 67085 124764, 67521 125103, 67863 125519, 67873 125721, 67762 125927, 67567 126133, 67387 126243, 67088 126217, 65932 125693, 65146 125419, 64586 125201, 63655 125003, 64074 125470, 64190 125669, 64096 125718, 63707 125654, 64277 125911, 65373 126271, 66104 127272, 66256 127568, 66150 127642, 65546 128468, 65252 129451, 65297 130489, 65677 131487, 66353 132344, 67261 132976, 67370 133011, 67810 133309, 67813 133424, 67297 135126, 66251 136565, 65813 136885, 64440 136430, 64435 136455, 63231 136405, 62208 136701, 61353 137292, 60750 138118, 60526 138863, 60325 138899, 58582 138917, 57902 138424, 57597 138251, 56949 138176, 57298 138521, 57843 138956, 58464 139387, 59422 139944, 59983 140295, 60144 140493, 60106 140945, 60019 141148, 59833 141283, 59315 141252, 58671 141044, 58277 140829, 57421 140202, 56840 140345, 56465 140297, 55894 140169, 55769 140109, 55065 139860, 54109 139308, 53716 139025, 53459 138780, 53125 138246, 52817 137493, 52670 136717, 52597 135754, 52634 135032, 52687 134823, 52643 134552, 52765 133707, 52546 133275, 52357 132751, 52287 132202, 52324 131858, 52442 131570, 52621 131459, 52971 131679, 53520 131900, 53693 131933, 53722 131903, 54039 131936, 54630 131918, 55051 131849, 55620 131650, 55950 131490, 56437 131130, 57061 130360, 57296 129778, 57361 129512, 57370 128766, 57384 128512, 57233 127926, 56845 127129, 56427 126600, 56286 126472, 56431 125681, 56136 125493, 55651 125301, 55725 125124, 55933 124881, 56171 124683, 56955 124361, 57580 124255, 58193 123660, 58477 123499, 59139 122915, 59349 122825, 59523 122685, 59949 122414, 60715 122053, 61472 121876, 62101 121834) (53222 134911, 53317 135523, 53588 136082, 54172 136656, 54704 137063, 55042 137253, 54519 136819, 54108 136398, 53788 135979, 53478 135470, 53306 134972, 53319 134630) (59376 123634, 58734 123958, 58626 124178, 58928 123945, 59425 123795, 60020 123747, 60545 123760, 61127 123843, 61788 124013, 61435 123851, 60794 123659, 59986 123525)), ((100546 121861, 100682 122333, 100647 122597, 100397 122824, 99313 123390, 99170 123506, 98475 123964, 98158 124146, 97406 124773, 98034 124724, 98262 124754, 98244 124857, 97956 125127, 98506 124831, 99459 124181, 100699 124210, 101028 124271, 101021 124399, 101309 125381, 101907 126211, 102759 126809, 103782 127115, 104874 127100, 105928 126764, 106023 126699, 106527 126531, 106620 126599, 107657 128045, 108162 129749, 108149 130293, 106951 131105, 106967 131124, 106196 132048, 105808 133040, 105756 134078, 106043 135060, 106498 135690, 106405 135871, 105357 137266, 104553 137505, 104231 137641, 103807 138091, 104189 138063, 104835 137900, 105592 137646, 106501 137319, 107030 137076, 107304 136993, 107560 136986, 107897 137292, 108027 137607, 107994 137708, 107598 138166, 107204 138442, 106690 138672, 105670 138968, 105430 139517, 105163 139785, 104715 140161, 104590 140222, 103964 140631, 102944 141051, 102480 141190, 102130 141247, 101502 141186, 100717 140972, 100114 140667, 99533 140282, 99205 140090, 98654 139621, 98520 139451, 98279 139321, 97977 139049, 97813 138839, 97650 138709, 97395 138666, 97095 138548, 96668 138448, 96197 138173, 95948 137934, 95792 137666, 95812 137455, 96201 137311, 96710 137010, 96840 136893, 96834 136852, 97054 136622, 97398 136142, 97601 135766, 97791 135193, 97863 134833, 97875 134174, 97652 133292, 97325 132724, 97153 132510, 96568 132049, 96371 131882, 95817 131644, 95419 131533, 94949 131470, 94274 131477, 94087 131511, 93548 130915, 93063 131129, 92771 131304, 92677 131137, 92609 130823, 92599 130515, 92660 130201, 92862 129619, 93117 129139, 93105 128933, 93053 128817, 93017 128288, 93063 127964, 93002 127083, 93054 126489, 93249 125544, 93266 125353, 93598 124600, 93948 124076, 94205 123846, 94725 123502, 95426 123125, 96420 122741, 97357 122607, 97940 122766, 98741 122211, 99211 121958, 99884 121768, 100380 121749) (98925 139096, 99460 139378, 100070 139502, 100879 139387, 101525 139214, 101890 139059, 101218 139212, 100344 139308, 99515 139217, 99119 139106, 98744 138828) (95140 125833, 94601 126224, 94000 126785, 93716 127333, 93582 128039, 93691 128260, 93689 127885, 93873 127392, 94335 126680, 94948 126072, 95485 125651)), ((160677 136473, 160910 136848, 161030 137261, 161030 137682, 160909 138088, 160674 138447, 160306 138752, 160081 138602, 159526 138434, 159466 138434, 158705 138216, 158701 137300, 158974 136411, 159082 136249, 160373 136257, 160416 136233)), ((157060 130960, 157457 130949, 158078 131139, 158280 131265, 158725 131699, 158726 131759, 158682 131783, 157928 131709, 158144 131770, 158691 132227, 159086 132864, 159475 132839, 159935 132961, 160202 133142, 160398 133454, 160513 133964, 160446 134627, 160888 134788, 161600 135271, 162171 135899, 162560 136629, 162742 137414, 162703 138198, 162446 138929, 161990 139557, 161365 140037, 160613 140340, 159786 140442, 158939 140338, 158131 140034, 157937 139892, 157344 140457, 156872 140681, 156505 140719, 156190 140616, 155819 140332, 155530 139905, 154912 139970, 154222 139822, 153831 139539, 153619 139219, 153487 138728, 153145 138260, 153397 138080, 154405 137921, 155319 137514, 156069 136891, 156604 136092, 156888 135174, 156899 134195, 156638 133226, 156183 132441, 156252 132194, 156240 131973, 156717 131943, 157265 131687, 157004 131520, 156413 131252, 156317 131150, 156308 130931, 156369 130820, 156563 130801) (158877 135859, 158596 135986, 158328 136190, 158055 136545, 157901 136978, 157894 137505, 158038 137959, 158342 138407, 158622 138657, 158949 138853, 159391 139005, 159350 139034, 159661 139074, 160058 139027, 160549 138883, 160884 138667, 161167 138354, 161361 137929, 161406 137422, 161301 136958, 161104 136589, 160822 136264, 160379 135960, 160058 135830, 159770 135766, 159375 135749)), ((181541 132724, 182048 132868, 182484 133138, 182823 133514, 183038 133970, 183116 134477, 183052 135000, 182611 135065, 182022 135341, 181972 135386, 181248 135739, 180544 134976, 180112 134028, 180080 133795, 181095 132892, 181198 132718)), ((176409 130723, 176464 130790, 175794 131356, 175342 131787, 175697 131573, 176509 131443, 177152 131545, 177225 131510, 177357 131340, 177840 131015, 178189 130924, 178637 130985, 179199 131294, 179499 131602, 179692 131734, 180146 131486, 181028 131252, 181926 131231, 182781 131428, 183534 131828, 184135 132404, 184540 133117, 184725 133917, 184675 134753, 184395 135564, 183901 136297, 183230 136900, 182427 137334, 182182 137399, 182131 137805, 182144 138230, 181974 138849, 181708 139214, 181383 139410, 180822 139525, 180419 139483, 180087 139936, 179420 140425, 178883 140541, 178442 140483, 178301 140411, 178248 140443, 177330 140356, 177349 139878, 177868 139072, 178188 138024, 178213 136955, 177936 135941, 177380 135045, 176581 134335, 175593 133855, 174711 133684, 174478 133329, 174338 133221, 174868 132515, 174957 132239, 175080 132073, 174523 132234, 173815 132546, 173685 132516, 173490 132364, 173453 132246, 173564 132078, 173825 131893, 174195 131732, 174476 131358, 174899 131057, 175236 130872, 175795 130725, 176247 130696) (180878 132458, 180982 132513, 180924 132499, 180353 132783, 180090 132977, 179781 133300, 179507 133808, 179409 134136, 179384 134513, 179485 135006, 179740 135456, 180180 135846, 180668 136057, 181266 136131, 181690 136078, 182269 135856, 182470 135975, 182463 136057, 182956 135615, 183270 135145, 183450 134628, 183482 134096, 183364 133585, 183105 133129, 182734 132772, 182259 132516, 181757 132394, 181222 132392)), ((152640 138889, 153047 139103, 153632 139355, 153898 139726, 154498 140357, 154505 140407, 154460 140443, 153827 140353, 153612 140274, 153086 139908, 152833 139545, 152508 139371, 152335 139179, 152322 139090, 152446 138937, 152544 138885)), ((104396 108493, 104829 108740, 105125 109234, 105257 109640, 105323 110060, 105323 110353, 105190 111193, 105262 111497, 105285 112197, 105348 112233, 105429 112421, 105408 112670, 105289 112942, 105065 113218, 104830 113406, 104936 113792, 104953 114257, 104880 114760, 104714 115290, 104464 115829, 104106 116405, 118382 130695, 119049 130283, 119587 130032, 120115 129867, 120620 129793, 121085 129811, 121472 129917, 121660 129675, 121936 129457, 122208 129339, 122457 129318, 122645 129398, 122683 129459, 123382 129484, 123684 129555, 124522 129423, 124817 129422, 125237 129490, 125592 129602, 126137 129918, 126386 130349, 126390 130809, 126079 131427, 125997 131502, 125491 132039, 125602 132542, 125422 132494, 124804 132501, 124369 132665, 124026 132620, 122777 132783, 121609 133263, 120598 134026, 119818 135023, 119319 136182, 119135 137428, 119156 137611, 119006 137813, 118793 138306, 118745 138843, 118784 139014, 118519 138948, 118185 139230, 117781 139626, 117266 139873, 116951 139974, 116328 139693, 116272 139684, 115975 139193, 115843 138785, 115777 138365, 115778 138056, 115951 136973, 115883 136644, 115889 136279, 115734 136213, 115636 136045, 115642 135814, 115753 135555, 116045 135214, 116325 135054, 116246 134507, 116247 134037, 116340 133532, 116524 133005, 116793 132473, 117014 132142, 102676 117815, 102231 118106, 101742 118352, 101214 118537, 100708 118630, 100238 118631, 99714 118552, 99531 118832, 99191 119123, 98931 119234, 98699 119241, 98530 119144, 98464 118989, 98010 118980, 97772 118928, 96710 119096, 96380 119101, 95960 119033, 95605 118921, 95060 118605, 95052 118549, 94771 117926, 94872 117610, 95117 117097, 95805 116393, 95730 116093, 95901 116132, 96438 116085, 96932 115872, 97133 115723, 97317 115744, 98563 115560, 99723 115060, 100719 114279, 101481 113269, 101962 112101, 102124 110853, 102078 110510, 102244 110074, 102261 109496, 102205 109281, 102703 109394, 103318 108800, 103937 108488)), ((53418 106745, 53939 106972, 54358 107355, 54695 107627, 54964 107550, 54931 107721, 54996 108257, 55227 108743, 55382 108938, 55368 109124, 55596 110363, 56136 111504, 56951 112472, 57988 113199, 59171 113638, 60424 113757, 60765 113699, 61207 113849, 61785 113847, 61998 113782, 61901 114284, 62517 114879, 62850 115486, 62862 115945, 62629 116385, 62151 116697, 61745 116844, 61327 116926, 61036 116937, 60191 116833, 59890 116915, 59191 116963, 59157 117027, 58972 117114, 58723 117102, 58447 116993, 58164 116779, 57967 116550, 57585 116669, 57121 116704, 56614 116647, 56079 116500, 55533 116269, 54944 115932, 41162 130697, 41596 131350, 41866 131878, 42050 132400, 42141 132902, 42139 133368, 42046 133758, 42295 133939, 42523 134206, 42650 134473, 42680 134721, 42607 134913, 42546 134952, 42546 135652, 42486 135956, 42648 136790, 42658 137084, 42604 137506, 42505 137865, 42208 138420, 41787 138685, 41327 138704, 40698 138415, 40622 138336, 40066 137849, 39567 137977, 39609 137796, 39580 137178, 39400 136750, 39435 136404, 39228 135162, 38707 134012, 37909 133029, 36885 132284, 35710 131825, 34459 131684, 34277 131712, 34070 131569, 33569 131373, 33031 131344, 32862 131390, 32918 131122, 32625 130799, 32215 130408, 31950 129903, 31838 129591, 32097 128958, 32104 128903, 32581 128590, 32987 128444, 33405 128362, 33714 128352, 34802 128487, 35128 128408, 35494 128401, 35554 128243, 35718 128140, 35950 128138, 36212 128239, 36563 128519, 36733 128794, 37277 128695, 37746 128679, 38254 128755, 38788 128921, 39330 129171, 39668 129381, 53486 114551, 53180 114117, 52916 113635, 52713 113115, 52602 112613, 52585 112143, 52645 111616, 52359 111443, 52056 111113, 51936 110859, 51921 110626, 52012 110455, 52165 110383, 52159 109928, 52202 109689, 51997 108634, 51980 108304, 52034 107882, 52133 107523, 52420 106989, 53098 106655)), ((188611 136357, 188558 136523, 188092 137083, 187780 137316, 186892 137700, 186614 137731, 186428 137707, 185904 138026, 185620 138101, 185478 138094, 185419 138027, 185381 137747, 185422 137597, 186062 137204, 186485 136873, 186679 136689, 187385 136619, 188597 136246)), ((154267 133574, 154459 133866, 154567 134271, 154562 134676, 154445 135059, 154223 135393, 153910 135653, 153484 135829, 153338 135651, 152875 135340, 152819 135324, 152169 134901, 152422 134058, 152924 133318, 153068 133199)), ((141037 120394, 141690 120560, 142286 120810, 143142 121272, 143270 121367, 143815 121729, 144349 122177, 144596 122346, 145107 122339, 145158 122357, 145736 122464, 146339 122644, 146616 122770, 147099 122961, 147259 123075, 147860 123381, 148008 123484, 148851 124018, 149230 124352, 149552 124591, 150101 125052, 150411 125482, 150628 125915, 150796 126540, 150780 126891, 150854 127260, 150848 127577, 150796 127830, 150975 128033, 151366 128580, 151503 128829, 151537 128659, 151886 128726, 152200 128603, 152504 128566, 152384 128432, 151861 128002, 151809 127891, 151877 127647, 151938 127607, 152124 127641, 152437 127857, 152929 127995, 153283 128240, 153597 128650, 153660 128908, 153387 128829, 153769 129371, 153962 130005, 153974 130142, 154473 130246, 154837 130455, 155041 130689, 155135 131010, 155118 131482, 154921 132027, 154838 132159, 155192 132409, 155744 133048, 156126 133788, 156310 134580, 156283 135369, 156047 136102, 155618 136730, 155027 137210, 154312 137506, 153522 137602, 152711 137489, 151935 137176, 151247 136683, 151088 136500, 150876 136682, 150356 136959, 149890 137044, 149559 136994, 149295 136822, 149041 136493, 148842 135928, 148163 135820, 147584 135522, 147301 135179, 147185 134837, 147214 134183, 146621 133944, 146030 133623, 145808 133470, 145249 133598, 144872 133568, 144527 133628, 143920 133518, 143435 133384, 142973 133123, 142189 132406, 142084 132232, 141483 131649, 141033 131096, 140656 130539, 140524 130393, 140117 129678, 139752 128845, 139601 127938, 138870 127251, 138405 126685, 137800 125856, 137443 125219, 137236 124689, 137157 124330, 137190 124074, 137380 123920, 137715 123845, 137869 123880, 137563 123237, 137306 122662, 137229 122373, 137207 121635, 137263 121533, 137168 121192, 137225 121042, 138201 120639, 138531 120565, 139259 120646, 140261 120984, 140291 120630, 140422 120424, 140672 120359) (152726 132992, 152425 133116, 152084 133377, 151833 133739, 151694 134231, 151714 134688, 151888 135183, 152083 135483, 152305 135718, 152726 136006, 152988 136112, 153331 136187, 153819 136173, 154192 136052, 154529 135832, 154813 135487, 154982 135020, 155001 134594, 154904 134171, 154726 133806, 154392 133414, 153869 133080, 153507 132966, 153196 132940) (151102 130149, 150586 130472, 150117 130869, 149710 131330, 149372 131844, 149116 132396, 148945 132974, 148867 133563, 148873 133713, 149317 133645, 150179 133246, 150885 132628, 151384 131834, 151641 130917, 151633 129920)), ((188853 128251, 189309 128537, 189664 128941, 189893 129437, 189977 129976, 189506 130188, 188997 130633, 188960 130692, 188367 131225, 187444 130659, 186740 129837, 186639 129607, 187370 128453, 187438 128192, 187767 128105, 188326 128104)), ((189034 126728, 189854 126994, 190553 127462, 191083 128101, 191408 128865, 191504 129705, 191367 130564, 191004 131380, 190442 132101, 189718 132675, 189469 132790, 189517 133340, 189579 133640, 189517 134324, 189303 134755, 189004 135015, 188446 135238, 188072 135269, 187830 135751, 187588 136033, 187221 136381, 186693 136593, 186140 136586, 186055 136660, 185092 136737, 185060 136342, 184999 136204, 185358 135339, 185496 134222, 185330 133138, 184870 132161, 184149 131356, 183214 130780, 182130 130472, 181260 130457, 180908 130083, 180765 130008, 181237 129077, 181260 128931, 181393 128662, 180786 128960, 180097 129421, 179787 129319, 179681 129168, 179761 128981, 180010 128723, 180423 128441, 180615 128033, 181326 127378, 181714 127166, 182365 126989, 182630 127056, 181951 127865, 181587 128367, 181534 128463, 181900 128108, 182719 127825, 183288 127813, 183463 127686, 183508 127602, 183945 127185, 184286 127028, 184767 127007, 185415 127228, 185666 127406, 186016 127575, 186418 127247, 187255 126859, 188147 126681) (187489 127855, 187139 128019, 187214 128044, 187164 128209, 186819 128465, 186587 128709, 186329 129096, 186197 129428, 186099 130019, 186141 130409, 186333 130896, 186677 131311, 187190 131628, 187733 131757, 188355 131724, 188782 131594, 189257 131320, 189534 131451, 189542 131537, 189687 131420, 190071 130930, 190318 130372, 190412 129788, 190346 129215, 190125 128691, 189765 128255, 189292 127938, 188733 127756, 188142 127723)), ((146435 134213, 146697 134472, 147140 134819, 147308 135253, 147602 135874, 147336 135848, 146858 135570, 146591 135268, 146394 134810, 146143 134549, 146075 134348, 146129 134267, 146345 134185)), ((55254 116892, 55568 117460, 55656 117595, 55742 118230, 56285 118593, 56901 119048, 57153 119342, 57440 119788, 57572 120116, 57533 120301, 57350 120488, 57128 120617, 56788 120646, 56443 120407, 55937 119977, 55260 119456, 54844 119170, 54493 118887, 53652 118450, 54009 119215, 53968 119267, 53541 119100, 54016 119503, 54971 120150, 55398 121316, 55462 121641, 55340 121683, 54531 122311, 53978 123174, 53735 124184, 53825 125248, 54239 126258, 54937 127116, 55033 127181, 55375 127589, 55346 127700, 54381 129194, 52980 130289, 52470 130477, 51274 129659, 51262 129681, 50126 129304, 49054 129305, 48069 129637, 47261 130264, 46840 130920, 46639 130899, 44956 130436, 44439 129774, 44192 129521, 43586 129267, 44036 129990, 44428 130515, 44956 131131, 45224 131371, 45745 131923, 45981 132236, 45976 132576, 45858 132816, 45619 133044, 45358 133007, 45191 132915, 44943 132850, 44511 132559, 43768 131730, 43469 131350, 42892 131329, 42156 130979, 41887 130795, 44699 127784, 53934 117857, 54431 117264, 55016 116629)), ((195937 129768, 195860 130057, 195632 130505, 195593 130613, 195378 130877, 194858 131337, 194579 131533, 194302 131644, 194131 131667, 193651 132176, 193398 132331, 193184 132352, 193027 132045, 193022 131952, 193089 131823, 193592 131274, 193883 130860, 194066 130560, 194726 130292, 195750 129587, 195901 129521)), ((103853 119766, 104288 120210, 104125 120469, 103934 121173, 103919 121408, 104012 122022, 104210 122278, 104083 121935, 104093 121343, 104396 120318, 114444 130360, 113692 130598, 113134 130698, 112826 130679, 112464 130548, 112647 130740, 113145 130828, 113446 130836, 113955 130766, 114545 130472, 115925 131852, 115131 131920, 114302 131825, 113793 131694, 113357 131595, 112679 131334, 112497 131219, 112218 131175, 111462 130799, 110844 130890, 110260 130884, 109881 130792, 109567 130651, 109329 130450, 109278 130248, 109597 129983, 109967 129542, 110060 129375, 110041 129338, 110321 128548, 110395 128104, 110400 127630, 110339 127089, 110104 126427, 109624 125706, 109116 125270, 108891 125135, 108150 124883, 107949 124805, 107148 124754, 106406 124907, 105812 125135, 105668 125220, 104960 124837, 104569 125207, 104360 125460, 104214 125336, 104047 125063, 103934 124776, 103881 124504, 103873 123895, 103965 123302, 103590 122546, 103545 122267, 103422 122065, 103169 121405, 102926 120351, 102854 119700, 102910 118835)), ((194074 121463, 194608 121670, 195061 122018, 195400 122490, 195591 123021, 195108 123363, 194678 123917, 194652 123985, 194182 124608, 193119 124215, 192238 123517, 192086 123297, 192587 122017, 192609 121677, 192912 121532, 193494 121416)), ((194392 120184, 195194 120442, 195879 120910, 196402 121556, 196727 122336, 196831 123199, 196707 124085, 196365 124932, 195828 125684, 195594 125885, 195767 126123, 195984 126716, 196122 127434, 196027 127937, 195802 128285, 195303 128672, 194983 128799, 194884 129306, 194501 130066, 193978 130480, 193493 130634, 193403 130773, 192455 131129, 192317 130762, 192173 130590, 192276 129681, 192095 128541, 191625 127518, 190895 126684, 189955 126094, 188869 125790, 187711 125792, 186899 126010, 186379 125701, 186237 125672, 186541 124091, 185966 124611, 185452 125221, 185356 125287, 185103 125265, 184910 125142, 184934 124937, 185117 124586, 185484 124165, 185482 123975, 185553 123687, 185759 123300, 186091 122804, 186322 122554, 186424 122501, 186835 122211, 187112 122095, 187361 122097, 187323 122249, 186886 123093, 186642 123792, 186603 123948, 186878 123465, 187556 122989, 188084 122799, 188310 122530, 188617 122005, 188913 121752, 189398 121587, 190126 121623, 190299 121681, 190853 121804, 191160 121375, 191858 120772, 192666 120355, 193531 120154) (192874 121155, 192270 121467, 191798 121877, 191953 121884, 192017 122121, 191657 122702, 191509 123163, 191483 123791, 191543 124152, 191698 124528, 192030 124960, 192492 125276, 193097 125446, 193674 125420, 194285 125209, 194674 124954, 195012 124622, 195387 124705, 195423 124880, 195641 124578, 195895 123944, 195988 123283, 195909 122639, 195668 122055, 195277 121571, 194765 121220, 194166 121028, 193521 121006)), ((108523 113957, 108693 114122, 108882 114589, 108740 114897, 108213 115455, 107268 116594, 107270 116609, 106835 117251, 106538 117774, 107133 117500, 107346 117455, 107363 117560, 107187 117905, 107605 117444, 108285 116513, 109466 116126, 109792 116074, 109830 116198, 110429 117027, 111272 117611, 112274 117889, 113336 117836, 114363 117458, 115245 116790, 115312 116697, 115733 116369, 115843 116402, 117303 117419, 118347 118857, 118517 119374, 117658 120541, 117680 120553, 117264 121676, 117227 122747, 117524 123743, 118123 124572, 118762 125015, 118735 125215, 118214 126882, 117534 127375, 117273 127614, 116994 128217, 117215 128109, 118130 127520, 119340 126517, 119863 126025, 120173 125881, 120607 126046, 120800 126234, 120849 126383, 120624 126980, 120346 127370, 119465 128114, 119076 128399, 119034 128978, 118660 129697, 118463 129962, 104799 116303, 105087 116091, 105784 115729, 106383 115684, 106774 115146, 107167 114651, 107444 114378, 107880 114094, 108342 113912)), ((52464 114857, 51138 116285, 50521 116016, 49862 115965, 49263 116073, 49062 116278, 49554 116116, 49967 116139, 50520 116248, 51029 116402, 42945 125074, 41892 126224, 41353 126794, 41070 126070, 40968 125476, 40984 125118, 41083 124841, 40881 125087, 40893 125171, 40825 125717, 40924 126300, 41237 126901, 40819 127359, 39905 128327, 39849 127907, 39825 127362, 39880 126680, 40086 125831, 40076 125746, 40263 125311, 40456 124734, 40492 124501, 40805 123823, 40709 123348, 40705 122390, 40887 121924, 41079 121680, 41280 121621, 41517 121887, 41924 122219, 42282 122412, 43015 122605, 43435 122661, 44113 122633, 44473 122571, 45073 122348, 45829 121809, 46247 121286, 46375 121057, 46673 120097, 46695 119280, 46529 118594, 46280 118002, 46179 117839, 46537 117118, 46163 116748, 45892 116540, 46012 116389, 46279 116213, 46562 116089, 46832 116026, 47416 115998, 48035 116068, 48222 115982, 48313 115889, 48781 115666, 49057 115612, 49236 115488, 49903 115207, 50453 115049, 51086 114893, 52121 114825)), ((201591 121329, 201627 121560, 201607 121976, 201418 122564, 201282 122813, 200850 123375, 200557 123677, 200317 123828, 200116 123893, 200051 124032, 199734 124541, 199507 124752, 199325 124830, 199173 124704, 199032 124463, 199077 124295, 199479 123636, 199852 122747, 200450 122338, 200822 121965, 201287 121445, 201533 121250)), ((198517 113820, 199071 114068, 199538 114473, 199862 114956, 199418 115463, 199118 116127, 199108 116202, 198802 116906, 197628 116767, 196567 116275, 196355 116085, 196545 114715, 196477 114306, 196732 114097, 197307 113834, 197917 113738)), ((198923 112461, 199677 112786, 200308 113316, 200771 114013, 201034 114832, 201082 115714, 200909 116603, 200529 117434, 200350 117661, 200391 117781, 200711 118062, 200945 118499, 201236 119219, 201236 119764, 201074 120165, 200385 120949, 200374 121331, 200135 122181, 199674 122719, 199282 122944, 199196 123164, 198292 123721, 198089 123391, 197856 123202, 197782 122314, 197377 121200, 196702 120261, 195802 119563, 194741 119152, 193586 119059, 192418 119287, 191690 119643, 191030 119407, 190903 119406, 190903 118160, 190951 118098, 190950 117746, 191169 117039, 191766 116419, 192180 116158, 192356 115830, 192446 115770, 192628 115255, 192879 114937, 193350 114666, 194279 114533, 194678 114551, 194892 114629, 194966 114602, 195181 114130, 195744 113414, 196451 112856, 197253 112498, 198096 112362) (197354 113042, 196685 113338, 196095 113803, 195625 114405, 195582 114499, 195877 114455, 195936 114566, 196002 114576, 195972 114618, 196032 114718, 195819 115301, 195759 115806, 195856 116450, 195989 116805, 196222 117157, 196649 117532, 197181 117763, 197830 117815, 198413 117674, 198998 117335, 199341 117000, 199577 116662, 200032 116702, 200142 117035, 200403 116468, 200547 115727, 200507 114990, 200286 114308, 199901 113725, 199375 113283, 198748 113012, 198058 112929)), ((40267 105213, 40904 105374, 41401 105591, 41711 105541, 41770 105497, 42242 105424, 42513 105454, 42722 105390, 43441 105314, 43889 105331, 44392 105336, 45235 105451, 45965 105715, 46515 106023, 46736 106230, 47170 106761, 47696 107633, 48064 108489, 48247 109310, 48138 109882, 48931 110926, 49168 111391, 49284 111758, 49341 112251, 49251 112415, 49048 112538, 48548 112599, 48273 112371, 47818 111643, 47102 110619, 46768 110235, 46200 109616, 46090 109523, 46192 110217, 46178 110376, 46073 110366, 45792 110118, 46118 110627, 46843 111525, 46911 112763, 46877 113094, 46748 113098, 45791 113461, 45010 114124, 44481 115020, 44257 116063, 44357 117150, 44775 118176, 44847 118265, 45054 118753, 44994 118852, 43635 119999, 41974 120636, 41431 120665, 40527 119535, 40510 119553, 39533 118861, 38507 118548, 37468 118577, 36513 118941, 35919 119443, 35732 119364, 34262 118439, 33958 117646, 33792 117328, 33314 116949, 33364 117271, 33725 118340, 34253 119472, 34679 120272, 34716 120582, 34557 120834, 34397 120993, 34220 121095, 34019 121095, 33536 120733, 33233 120362, 32744 119320, 32568 118868, 32020 118678, 31400 118109, 30786 117289, 30295 116322, 30119 115870, 30035 115525, 30047 114895, 30199 114095, 30506 113350, 30944 112601, 30960 112518, 31383 111934, 31544 111785, 31686 111464, 32221 110892, 32242 110521, 32427 109822, 32652 109361, 32848 109119, 33139 108912, 33321 108931, 33499 109316, 33822 109776, 33961 109911, 34002 109902, 34228 110089, 34690 110375, 35100 110563, 35732 110725, 36096 110769, 36755 110729, 37642 110429, 38157 110067, 38356 109878, 38795 109221, 38923 109045, 39181 108286, 39220 107596, 39159 106928, 39110 106743, 39663 106159, 39518 105840, 39217 105417, 39374 105308, 39604 105225, 39988 105183) (31929 112161, 31766 112517, 31616 113323, 31792 114132, 32016 114763, 32199 115112, 31968 114351, 31865 113781, 31843 113139, 31888 112540, 31982 112248, 32178 111968) (42345 106094, 42620 106061, 42995 106127, 43659 106448, 44485 107046, 45067 107677, 44858 107350, 44465 106883, 43795 106279, 43039 106011, 42647 105975)), ((98483 110332, 98523 110386, 99090 110786, 99328 111180, 99295 111430, 99091 111929, 98766 112360, 98340 112692, 97846 112905, 97315 112984, 96900 112877, 96033 111698, 96125 111471, 96835 110522, 97758 109804)), ((91080 98864, 91415 99335, 91519 99975, 91702 100917, 92619 101364, 93312 101828, 93728 102169, 94221 102657, 94603 103090, 95046 103757, 95236 104332, 95204 104676, 95111 104789, 95158 104868, 95966 104768, 96592 104833, 96839 104920, 97441 105078, 98186 104311, 98544 104066, 99114 103852, 99396 103847, 99693 103936, 99883 104123, 100053 104493, 100087 104879, 99992 105365, 99591 106319, 99845 106535, 99546 106861, 99461 107215, 99250 107568, 99049 107798, 99506 107969, 100311 108550, 100934 109322, 101330 110236, 101474 111228, 101356 112231, 100983 113176, 100382 113998, 99592 114640, 98668 115062, 97673 115232, 96676 115140, 95743 114793, 94938 114212, 94314 113439, 94211 113201, 94038 113416, 93677 113763, 93337 113993, 93017 114100, 92829 114085, 92312 114328, 91882 114444, 91420 114458, 91026 114343, 90799 114170, 90680 113904, 90661 113549, 90862 112812, 91076 112450, 91392 112013, 91889 111536, 91768 110982, 91362 110758, 90440 110042, 90064 109704, 89860 109487, 89469 109098, 88955 108439, 88565 107860, 88026 108039, 87011 108248, 87402 108211, 87109 109699, 86602 113471, 86411 114512, 86253 115246, 85717 117522, 85485 118174, 85132 118869, 84585 119225, 84019 118947, 83750 118718, 83225 117601, 82305 114794, 78255 118905, 77426 119507, 76559 119915, 76174 119866, 75838 119880, 75484 119464, 75471 119130, 75417 118896, 75377 118000, 75524 116891, 75981 115140, 76499 113309, 76934 111837, 74804 112201, 74602 112221, 73205 112428, 73097 112462, 71727 112441, 71500 112306, 71101 112162, 71162 111710, 71556 111386, 71697 111231, 72658 110437, 73415 109949, 74202 109492, 76794 108095, 76795 107786, 76921 107645, 77055 107335, 77510 107022, 78544 106523, 79293 106275, 79424 106218, 80363 105921, 81333 105687, 81420 105628, 82020 105309, 82479 105052, 82864 104690, 83322 104283, 83882 103754, 84045 103665, 84615 103229, 85774 102520, 85501 101667, 85524 101457, 85803 101079, 86143 100802, 86635 100553, 86884 100509, 87299 100663, 87325 100537, 87565 100010, 87878 99501, 88360 99060, 88700 98889, 89165 98847, 89529 98959, 89755 99129, 90537 98483, 90792 98401) (97078 109451, 96579 109673, 96179 110009, 95864 110441, 95669 110936, 95607 111460, 95683 111980, 95890 112460, 96216 112865, 96638 113170, 97127 113353, 97650 113401, 98172 113311, 98656 113090, 99070 112753, 99385 112321, 99580 111826, 99642 111302, 99567 110782, 99359 110302, 99033 109896, 98612 109592, 98122 109409, 97598 109361)), ((114973 104031, 115269 104438, 115202 104792, 114787 105540, 114238 106663, 114065 107142, 113797 107938, 113770 108078, 114327 107654, 114474 107589, 114515 107685, 114435 108051, 114722 107519, 115156 106451, 116206 105790, 116512 105660, 116578 105771, 117360 106431, 118319 106793, 119358 106821, 120379 106512, 121281 105897, 121976 105035, 122018 104928, 122345 104510, 122461 104515, 124123 105148, 125485 106292, 125775 106752, 125224 108091, 125249 108097, 125116 109287, 125340 110336, 125869 111230, 126650 111890, 127378 112165, 127400 112368, 127296 114109, 126757 114753, 126559 115051, 126459 115653, 126716 115454, 127476 114619, 128210 113609, 128675 112892, 128957 112665, 129255 112682, 129472 112745, 129645 112850, 129743 113026, 129660 113623, 129474 114094, 128810 115002, 128499 115375, 128599 115947, 128402 116765, 127982 117700, 127374 118598, 127034 119002, 126802 119211, 126247 119507, 125473 119761, 124686 119854, 124174 119850, 123725 119860, 123007 119771, 122801 119704, 122452 119736, 121692 119546, 121368 119701, 120590 119908, 120143 119911, 119837 119858, 119514 119703, 119442 119534, 119693 119192, 119945 118669, 119990 118500, 119962 118469, 120015 118179, 120044 117636, 120016 117280, 119906 116763, 119706 116216, 119350 115660, 118658 115028, 118092 114754, 117830 114670, 117042 114606, 116827 114579, 116031 114724, 115415 115020, 114861 115400, 114723 115532, 113944 115331, 113736 115612, 113512 116081, 113339 115996, 113156 115836, 112931 115521, 112823 115262, 112657 114627, 112604 114086, 112410 113840, 112343 113810, 112051 113432, 111945 113179, 111787 113028, 111374 112437, 111171 112036, 110931 111593, 110641 110846, 110500 110035, 110502 109404, 110590 109072, 110832 108474, 111336 107595, 111909 106855, 112538 106297, 113091 106114, 113672 104798, 114177 104202, 114579 103913, 114767 103912) (124839 118091, 124390 118457, 123968 118726, 123341 119022, 122994 119098, 122654 119062, 122943 119186, 123334 119156, 124111 118896, 124733 118350, 125176 117849, 125393 117519) (112467 110211, 112249 110781, 112045 111659, 112178 112452, 112336 112811, 112586 113018, 112424 112792, 112300 112432, 112258 111655, 112383 110684, 112652 109869)), ((191444 115423, 191420 115640, 191282 116073, 191072 116807, 190992 117420, 190987 117576, 190414 118388, 190021 119092, 189913 119196, 189714 119210, 189473 119150, 189423 118923, 189544 118500, 189864 117973, 189819 117767, 189832 117464, 189945 117078, 190275 116280, 190778 115723, 191128 115498, 191346 115413)), ((205470 111663, 205593 111977, 205674 112463, 205622 113015, 205535 113332, 205205 114071, 205002 114393, 204802 114597, 204604 114716, 204560 114947, 204372 115506, 204264 115686, 204004 115901, 203750 115743, 203632 115593, 203636 115420, 203771 115007, 203916 114454, 204064 113546, 204157 113494, 204594 112966, 205202 111841, 205387 111601)), ((198004 106383, 198207 106366, 198145 106516, 198238 106588, 198180 107146, 198244 107680, 198498 108300, 198719 108625, 199039 108924, 199561 109201, 200156 109304, 200825 109198, 201378 108916, 201883 108434, 202152 108008, 202280 107680, 202787 107615, 203174 108151, 203390 108601, 203887 108883, 204526 109786, 204659 110347, 204592 110794, 204413 111140, 204391 111274, 204151 111844, 204187 112080, 204153 112993, 203810 113664, 203533 113935, 203493 114245, 202706 115039, 202435 114768, 202094 114605, 201820 113783, 201148 112768, 200249 111992, 199181 111509, 198023 111354, 196845 111539, 195736 112046, 195099 112572, 195010 112530, 194340 112456, 194234 112480, 193930 111208, 193992 111071, 193935 110812, 193975 110104, 194034 109926, 194431 109251, 194715 108945, 194825 108548, 194958 108357, 195007 107923, 195184 107540, 195601 107142, 196260 106883, 196531 106755, 196797 106707, 197044 106749, 197150 106680, 197966 106341)), ((59597 107782, 60571 108460, 61320 109358, 60817 110100, 60765 110142, 60386 110721, 60000 110974, 59748 110950, 59242 110763, 58800 110453, 58454 110039, 58223 109552, 58127 109024, 58219 108606, 59367 107699)), ((58487 82844, 58824 83226, 58984 83361, 59812 84294, 60326 85033, 60810 85804, 62296 88346, 62605 88336, 62750 88457, 63065 88580, 63393 89023, 63928 90040, 64202 90780, 64264 90909, 64593 91837, 64861 92798, 64924 92884, 65263 93471, 65536 93921, 65911 94294, 66334 94737, 66879 95276, 66976 95438, 67438 96000, 68182 97126, 69024 96824, 69235 96839, 69622 97104, 69911 97435, 70177 97918, 70230 98165, 70090 98584, 70217 98606, 70753 98828, 71273 99124, 71729 99590, 71912 99923, 71971 100385, 71870 100754, 71710 100985, 72382 101744, 72473 101997, 72020 102302, 71561 102653, 70925 102779, 69990 102994, 69575 103926, 69136 104636, 68809 105063, 68339 105573, 67920 105969, 67269 106434, 66700 106645, 66356 106625, 66239 106536, 66169 106581, 66288 107427, 66247 108018, 66171 108259, 66032 108875, 66441 109254, 66824 109593, 67082 109942, 67314 110504, 67330 110785, 67252 111086, 67071 111283, 66719 111462, 66324 111513, 65834 111435, 64866 111066, 64659 111328, 64323 111041, 63967 110968, 63607 110769, 63370 110577, 63214 111040, 62662 111864, 61912 112514, 61012 112942, 60026 113120, 59020 113037, 58063 112698, 57220 112125, 56551 111358, 56097 110449, 55892 109462, 55949 108462, 56264 107517, 56816 106692, 57567 106043, 57801 105931, 57580 105766, 57221 105417, 56979 105084, 56861 104769, 56869 104580, 56608 104072, 56478 103646, 56448 103185, 56550 102784, 56713 102554, 56975 102426, 57329 102395, 58043 102555, 58442 102771, 58890 103072, 59384 103551, 59934 103412, 60133 103017, 60727 102181, 61151 101663, 61361 101452, 61736 101049, 62377 100512, 62941 100102, 62743 99566, 62500 98561, 62551 98951, 61053 98711, 57265 98335, 56218 98181, 54278 97816, 53186 97593, 52526 97383, 51821 97055, 51445 96519, 51703 95945, 51922 95669, 53020 95106, 55793 94087, 51542 90179, 50913 89376, 50475 88523, 50511 88137, 50485 87802, 50889 87433, 51221 87409, 51454 87346, 52349 87276, 53465 87385, 55227 87779, 57075 88233, 58562 88617, 58123 86501, 58096 86299, 57841 84910, 57803 84804, 57776 83435, 57903 83202, 58034 82798) (59072 107358, 58600 107583, 58207 107922, 57916 108354, 57752 108850, 57721 109375, 57829 109893, 58066 110369, 58419 110771, 58862 111070, 59363 111248, 59889 111292, 60406 111198, 60878 110975, 61271 110634, 61562 110203, 61727 109707, 61757 109182, 61649 108664, 61409 108174, 61060 107786, 60617 107487, 60116 107308, 59589 107265)), ((193915 108472, 193861 109094, 193827 109883, 193892 110456, 193922 110518, 193488 111614, 193272 112368, 193190 112498, 193009 112559, 192735 112561, 192657 112487, 192607 112231, 192636 111876, 192850 111233, 192750 111025, 192693 110746, 192697 110302, 192823 109567, 192917 109260, 193179 108761, 193260 108703, 193646 108282, 193789 108202, 193891 108195)), ((36699 92895, 36958 93002, 37525 93334, 37944 93679, 38256 93716, 38325 93690, 38799 93750, 39051 93855, 39268 93848, 39981 93975, 40408 94115, 40897 94261, 41668 94602, 42297 95056, 42741 95503, 42915 95801, 43169 96401, 43432 97374, 43550 98301, 43491 99158, 43238 99660, 43442 100169, 43757 101001, 43822 101780, 43741 102270, 43609 102402, 43380 102465, 42902 102397, 42696 102143, 42445 101265, 42038 100084, 41822 99623, 41448 98871, 41368 98751, 41274 99446, 41216 99595, 41118 99557, 40917 99241, 41090 99820, 41539 100882, 41264 102092, 41140 102402, 41015 102369, 39995 102455, 39061 102876, 38306 103592, 37803 104533, 37600 105605, 37718 106706, 37763 106812, 37828 107339, 37743 107417, 36119 108144, 34348 108299, 33818 108178, 33260 106842, 33239 106854, 32486 105914, 31591 105337, 30585 105078, 29566 105164, 28857 105483, 28699 105356, 27540 104052, 27466 103216, 27396 102864, 27040 102368, 26999 102691, 27048 103780, 27247 105052, 27437 105943, 27386 106247, 27022 106533, 26769 106603, 26574 106548, 26211 106067, 26020 105627, 25837 104491, 25794 104008, 25317 103672, 24880 102954, 24517 102001, 24311 100933, 24265 100450, 24278 100106, 24463 99498, 24832 98766, 25330 98136, 25688 97783, 25998 97460, 26566 97015, 26762 96916, 26936 96707, 27657 96244, 27778 95904, 28181 95209, 28495 94891, 28749 94713, 29087 94594, 29256 94663, 29322 95082, 29514 95630, 29602 95780, 29644 95783, 29810 96026, 30174 96429, 30446 96662, 30983 97010, 31417 97194, 32062 97336, 33000 97293, 33591 97087, 33836 96961, 34439 96450, 34610 96317, 35068 95654, 35296 95006, 35420 94346, 35424 94156, 36117 93747, 36066 93400, 35892 92910, 36074 92849, 36317 92832) (27028 97384, 26772 97681, 26408 98415, 26353 99240, 26395 99908, 26475 100295, 26462 99498, 26520 98922, 26676 98299, 26884 97736, 27054 97482, 27321 97267) (38713 94422, 38987 94467, 39328 94634, 39879 95125, 40503 95922, 40893 96695, 40782 96323, 40533 95765, 40056 95000, 39402 94534, 39036 94391)), ((121686 92539, 121884 92665, 122160 93076, 122023 93508, 121858 93786, 121612 94235, 121143 95171, 120717 96333, 120650 96657, 121194 96250, 121313 96206, 121345 96314, 121292 96503, 121590 96023, 122020 94994, 123098 94329, 123337 94229, 123420 94372, 124167 95014, 125086 95372, 126087 95407, 127070 95119, 127946 94533, 128622 93709, 128664 93607, 129030 93149, 129130 93154, 130718 93788, 132026 94890, 132295 95326, 131724 96679, 131746 96685, 131609 97836, 131816 98840, 132318 99706, 133065 100348, 133825 100643, 133705 102494, 133173 103122, 132886 103543, 132794 104063, 133086 103843, 133880 102978, 134502 102137, 134964 101440, 135287 101124, 135757 101173, 135964 101285, 136061 101458, 135974 102027, 135809 102449, 134888 103683, 134965 104251, 134799 104943, 134567 105516, 134270 106035, 134256 106078, 133863 106656, 133329 107290, 132646 107647, 131962 107861, 131195 107941, 130571 107927, 130298 107902, 130190 107937, 129669 107818, 129490 107684, 129860 107609, 130546 107369, 131100 106893, 131198 106758, 131629 106284, 132095 105565, 132155 105328, 131868 105725, 131286 106315, 130671 106808, 129847 107227, 129405 107322, 129033 107264, 128910 107283, 128715 107400, 129158 107664, 129007 107725, 128740 107734, 128348 107601, 127921 107807, 127166 108004, 126570 107991, 126090 107787, 126049 107697, 126326 107325, 126611 106751, 126559 106689, 126625 106350, 126657 105836, 126632 105477, 126532 104983, 126344 104455, 126006 103915, 125346 103302, 124656 102961, 123811 102881, 123596 102852, 122815 102988, 122226 103265, 121695 103620, 121505 103797, 120745 103598, 120583 103811, 120357 104278, 120055 104048, 119849 103753, 119738 103497, 119582 102885, 119538 102203, 119322 101948, 119241 101911, 119128 101670, 119113 101508, 119389 101721, 119552 101774, 119566 101554, 119522 101432, 119350 101213, 119194 100796, 119172 100097, 119315 99081, 119590 98269, 119839 97761, 119662 97922, 119222 98679, 118919 99425, 118745 100133, 118846 100865, 118945 101221, 118746 101122, 118403 100713, 118384 100600, 118238 100368, 117943 99818, 117664 99099, 117545 98384, 117556 97617, 117859 96886, 118244 96212, 118521 95789, 118976 95246, 119518 94783, 120067 94590, 120652 93334, 121126 92807, 121507 92538)), ((201018 104760, 201629 105016, 202099 105394, 201789 106118, 201706 106870, 201720 106947, 201647 107705, 200437 107940, 199233 107794, 198956 107671, 198710 106301, 198685 106309, 198466 105831, 198635 105568, 199135 105107, 199728 104807, 200370 104689)), ((194064 100544, 194191 100868, 194204 101015, 194347 101650, 194562 102424, 194810 102880, 194828 103018, 194769 103424, 194723 104249, 194746 104998, 194708 105162, 194540 105289, 194276 105375, 194154 105315, 194013 105010, 193947 104708, 193959 103978, 193786 103802, 193654 103568, 193465 102846, 193391 102322, 193382 101936, 193446 101504, 193685 100944, 193970 100537)), ((206769 100603, 207034 101148, 207119 101561, 207133 101962, 207088 102489, 206936 103220, 206818 103461, 206653 103650, 206696 104009, 206687 104506, 206635 104751, 206450 105055, 206143 104987, 205969 104869, 205922 104707, 205906 104004, 205817 103137, 205739 102752, 205745 102591, 205817 102508, 206066 101711, 206133 101316, 206254 100700, 206260 100555, 206369 100222, 206461 100210)), ((203186 97693, 203584 98142, 203953 98178, 204211 98282, 204503 98566, 204938 98889, 205254 99412, 205332 99878, 205301 100080, 205367 100518, 205302 101127, 205481 101635, 205580 102041, 205593 102285, 205560 102382, 205476 102911, 205332 103202, 205398 103581, 205111 104185, 204884 104634, 204547 104463, 204037 104395, 203566 103756, 202593 102983, 201477 102513, 200291 102382, 199115 102597, 198033 103146, 197117 103988, 196689 104661, 196493 104634, 195807 104777, 195730 104823, 195032 103679, 195052 103435, 194922 103095, 194763 102553, 194764 102324, 194936 101552, 195081 101218, 195051 100782, 195136 100373, 195083 100111, 195134 99675, 195423 99137, 195840 98793, 196113 98496, 196387 98363, 196628 98336, 196736 98202, 197310 97668, 197687 97509, 197666 97781, 197784 97811, 197895 98296, 198134 98809, 198582 99338, 198903 99587, 199316 99779, 199921 99885, 200542 99796, 201167 99479, 201623 99020, 201971 98371, 202098 97874, 202114 97584, 202631 97352)), ((200711 95064, 201328 95309, 201276 95430, 201192 96200, 201337 96973, 201375 97045, 201523 97778, 200389 98382, 199148 98603, 198829 98564, 198189 97318, 198180 97324, 197733 96853, 197813 96569, 198182 95939, 198695 95446, 199317 95123, 200004 94992)), ((191937 92877, 191986 93019, 192107 93162, 192247 93504, 192541 94034, 192898 94594, 193277 94983, 193355 95150, 193417 95704, 193640 96510, 193870 97205, 193882 97371, 193749 97558, 193517 97716, 193371 97693, 193103 97387, 192972 97138, 192759 96384, 192540 96267, 192319 96062, 191867 95297, 191678 94879, 191490 94196, 191534 93536, 191664 93014, 191751 92822, 191861 92794)), ((129542 81423, 129723 81572, 129944 82004, 129790 82362, 129570 82668, 129239 83165, 128793 83892, 128293 84945, 128154 85387, 128712 85051, 128809 85032, 128820 85145, 129051 84930, 129638 83812, 130791 83233, 130971 83176, 131056 83357, 131719 84036, 132570 84455, 133526 84573, 134497 84379, 135383 83891, 136101 83158, 136150 83063, 136573 82617, 136661 82631, 138127 83378, 139293 84539, 139517 84959, 138826 86266, 138846 86273, 138618 87366, 138733 88346, 139142 89219, 139804 89897, 140538 90258, 140268 92022, 139702 92586, 139422 92930, 139170 93529, 139546 93276, 140409 92488, 140972 91851, 141338 91407, 141579 91088, 141878 90837, 142018 90827, 142358 90923, 142532 91027, 142613 91206, 142481 91741, 142289 92128, 141345 93178, 141366 93757, 141180 94344, 140884 94931, 140529 95447, 140505 95503, 140061 96023, 139626 96457, 138942 96785, 138290 96952, 137336 96960, 136823 96876, 136751 96705, 137195 96415, 137430 96145, 137942 95682, 138046 95519, 138590 94845, 138836 94245, 138218 94963, 137613 95484, 136962 95920, 136052 96308, 135625 96337, 135133 96249, 134275 96596, 133509 96735, 132942 96681, 132484 96452, 132462 96387, 132776 96031, 133061 95562, 133014 95497, 133124 95117, 133196 94634, 133204 94272, 133151 93796, 133015 93272, 132735 92726, 132149 92079, 131516 91696, 130724 91552, 130513 91505, 129753 91569, 129168 91784, 128635 92075, 128379 92277, 127654 92020, 127527 92159, 127266 92594, 127028 92371, 126781 91888, 126646 91081, 126726 90180, 126714 89933, 126557 89690, 126440 89314, 126446 88692, 126694 87547, 127056 86724, 127574 85910, 127075 86318, 126586 87037, 126462 87185, 126169 87810, 125980 88112, 125832 88623, 125647 88603, 125500 88343, 125326 87828, 125145 87225, 125113 86552, 125226 85807, 125554 85171, 125929 84643, 126318 84152, 126797 83693, 127301 83347, 127860 83196, 128535 82043, 128995 81629, 129374 81410)), ((199636 87270, 200055 87402, 200643 87780, 200912 87704, 201255 87732, 201711 87979, 202058 88103, 202539 88536, 202766 89036, 202859 89176, 203157 89805, 203193 90289, 203635 90975, 203733 91245, 203730 91368, 203804 91898, 203758 92172, 203972 92591, 203796 93783, 203429 93719, 202782 93825, 202205 93397, 201024 92933, 199796 92808, 198599 93034, 197517 93594, 196624 94452, 195982 95548, 195777 96286, 195480 96336, 194842 96686, 194795 96739, 194151 96167, 193764 95798, 193702 95497, 193614 95412, 193271 94859, 193192 94753, 193103 94455, 193052 93699, 193078 93391, 192890 92935, 192826 92356, 192701 91826, 192824 91190, 193026 90885, 193230 90425, 193488 90190, 193706 90092, 194001 89429, 194314 89019, 194513 88880, 194597 89243, 194724 89240, 194948 89611, 195351 90058, 195948 90440, 196343 90589, 196810 90656, 197443 90577, 198035 90298, 198396 89940, 198556 89794, 198871 89199, 199020 88438, 198994 87918, 198941 87697, 199417 87293, 199444 87305, 199421 87258)), ((27547 62860, 27755 62916, 28010 63503, 28421 64264, 28703 64697, 28851 65255, 30076 67453, 30168 67579, 30568 68287, 30818 68757, 31731 70617, 31787 70800, 32035 71087, 32493 71869, 35546 75922, 36500 77328, 36609 77586, 37399 78699, 37887 79408, 38364 79508, 39215 79856, 39695 80194, 39817 80262, 39995 80535, 39942 80622, 39702 80737, 39282 80671, 39147 80685, 38752 80591, 39952 82011, 41094 83434, 41509 84013, 42091 84787, 43174 86621, 43339 87211, 43496 87994, 43385 88351, 43242 88604, 42565 88851, 41363 88791, 41208 88801, 40379 88660, 39813 88522, 39211 88362, 39581 89376, 39612 89544, 38888 89738, 38535 89981, 38166 90122, 37776 90185, 37393 90165, 37041 90065, 36746 89891, 36512 89658, 36369 89379, 36353 89068, 36412 88864, 36174 88898, 35278 89321, 34544 90045, 34053 90993, 33869 92068, 34006 93162, 34053 93267, 34120 93748, 34032 93831, 32426 94585, 30664 94769, 30127 94657, 29566 93377, 29544 93390, 28778 92465, 27876 91905, 26869 91665, 25854 91769, 25541 91915, 25728 92232, 25744 92543, 25658 92861, 25490 93161, 25235 93423, 24912 93632, 24543 93772, 24154 93835, 23731 93801, 23210 93940, 23104 93508, 22900 93304, 22766 92963, 22267 93442, 21618 93979, 21479 94048, 20469 94699, 19760 94825, 19508 94680, 19234 94425, 18978 93668, 18833 93102, 18825 91565, 19034 89274, 19224 88036, 19657 85604, 18869 86240, 18650 86278, 18538 86214, 18553 85889, 18807 85373, 19150 84856, 19506 84457, 19634 84340, 19673 83764, 19831 82085, 19797 81805, 19920 80110, 20542 75035, 20551 74124, 20476 73693, 20347 71903, 20310 70526, 20363 69960, 20416 69198, 20400 68162, 20150 67165, 20162 65932, 20214 65387, 20164 64950, 20791 64463, 21270 64114, 21829 63926, 22668 63450, 23682 62964, 23777 62988, 25804 62860, 26380 62745)), ((204081 88860, 204499 89199, 204936 89704, 205196 90366, 205294 90805, 205393 91691, 205340 91986, 205235 92212, 205411 92603, 205540 93062, 205568 93345, 205475 93711, 205152 93744, 204934 93676, 204843 93535, 204621 92884, 204400 92320, 204165 91818, 204022 91594, 203978 91401, 204037 91210, 204013 90494, 203911 89603, 203818 89246, 203826 89058, 203781 88916, 203793 88804, 203896 88759)), ((187180 86278, 187812 86970, 188415 87486, 188791 87738, 189147 87916, 189311 88074, 189542 88579, 190127 89399, 190558 89954, 190630 90129, 190562 90362, 190398 90584, 190240 90613, 189870 90409, 189639 90203, 189154 89520, 188656 89385, 187996 88862, 187563 88434, 187247 88032, 187103 87766, 186945 87245, 186855 86613, 186900 86275, 186989 86185)), ((197168 85399, 197155 85626, 197347 86408, 197763 87110, 197826 87167, 198210 87794, 197312 88791, 196180 89447, 195847 89524, 194812 88565, 194805 88575, 194111 88229, 194090 87955, 194231 87185, 194567 86501, 195075 85950, 195718 85566, 196455 85379)), ((195006 78233, 195267 78255, 195901 78514, 196494 78983, 196918 79399, 197265 79943, 197273 80045, 197787 80444, 198002 80701, 198047 80835, 198298 81309, 198339 81534, 198749 81914, 198999 83129, 198649 83191, 197950 83583, 197336 83402, 196042 83367, 194819 83678, 193751 84312, 192908 85226, 192352 86360, 192118 87635, 192176 88369, 191819 88569, 191286 89177, 190729 88957, 189975 88628, 189775 88296, 189725 88274, 189069 87779, 188854 87489, 188548 86794, 188504 86632, 188075 86133, 187579 85132, 187468 84456, 187511 84275, 187542 83671, 187706 83350, 187895 83154, 187907 82356, 188023 81937, 188233 81618, 188497 82010, 188616 81962, 188909 82194, 189475 82491, 190184 82648, 190621 82654, 191100 82553, 191691 82249, 192169 81765, 192397 81284, 192498 81092, 192594 80398, 192562 80020, 192466 79591, 192258 79103, 192169 78969, 192506 78395, 192420 78310, 192666 78230, 193109 78210, 193905 78397, 194133 78236, 194454 78153)), ((149673 84246, 149988 84518, 150010 84710, 149732 85157, 149443 85451, 148322 86112, 148157 86654, 147956 86987, 147318 87635, 146857 87983, 146808 88039, 146322 88327, 145797 88588, 145166 88707, 144489 88680, 143739 88479, 143323 88285, 143267 88152, 143642 87918, 144319 87625, 144913 87203, 145443 86790, 145961 86167, 146207 85829, 146470 85787, 146597 85702, 147623 85240, 148195 84903, 148746 84552, 149120 84292, 149423 84163)), ((141736 74085, 142141 74903, 142796 75540, 143075 75670, 142937 77070, 143179 78287, 143747 79370, 144603 80245, 145688 80851, 146930 81146, 147306 81137, 147395 81857, 147800 82674, 148387 83246, 147616 84780, 146758 85218, 146369 85686, 146037 85911, 145782 86200, 145415 86506, 144834 86861, 144142 87157, 143507 87337, 142671 87456, 142333 87439, 141966 87358, 141608 87138, 141423 87100, 140729 87151, 140009 87054, 139506 86848, 139140 86502, 139138 86460, 139556 86214, 139901 85916, 139873 85835, 140129 85469, 140336 85058, 140457 84713, 140570 84061, 140578 83745, 140487 83161, 140145 82399, 139680 81858, 138999 81492, 138812 81381, 138109 81216, 137503 81238, 136937 81343, 136570 81477, 135972 81021, 135501 81402, 135373 81158, 135296 80599, 135375 80038, 135467 79723, 135717 79153, 135752 78929, 135678 78646, 135670 78295, 135927 77510, 136418 76707, 136921 76113, 137589 75535, 138075 75238, 138405 75127, 139012 74999, 139070 75012, 139500 74815, 140286 74050, 141704 73834)), ((179929 81377, 181071 82011, 181536 82212, 182145 82371, 182505 82407, 182720 82539, 183202 83032, 184056 83642, 184606 84000, 184755 84178, 184754 84442, 184675 84689, 184526 84775, 184089 84698, 183776 84566, 183053 84043, 182519 84065, 181865 83859, 181116 83509, 180675 83222, 180390 82959, 180116 82572, 179841 82064, 179700 81505, 179755 81351)), ((185989 71080, 186832 71314, 187349 71556, 187727 71816, 188014 72145, 188428 72296, 188756 72493, 188854 72622, 189246 72988, 189334 73143, 189928 73406, 190579 74504, 190285 74667, 189764 75253, 189713 75378, 189089 75406, 187830 75801, 186753 76508, 185932 77476, 185423 78638, 185263 79917, 185461 81227, 185742 81871, 185396 82260, 185082 83027, 183616 82909, 183248 82599, 182619 82387, 182450 82343, 182109 82109, 181583 81532, 181142 81308, 180525 80759, 180178 80316, 180131 80274, 179784 79633, 179584 78950, 179625 78601, 179749 78306, 179569 77942, 179442 77477, 179414 77008, 179526 76627, 179992 76957, 180083 76878, 180380 76982, 181051 77083, 181789 76998, 182218 76856, 182654 76594, 183133 76096, 183431 75537, 183501 74899, 183534 74685, 183395 73972, 183232 73609, 182987 73214, 182556 72737, 182695 72093, 182501 71993, 182721 71812, 183130 71645, 183568 71567, 184105 71526, 184257 71329, 184523 71154, 185168 71037)), ((158603 79840, 158846 80069, 158963 80265, 158936 80450, 158567 80796, 158141 81048, 157095 81299, 156780 81789, 156315 82161, 155697 82525, 155202 82722, 154693 82883, 154179 82995, 153418 82932, 152895 82769, 152286 82421, 152015 82198, 152053 82072, 152302 81994, 152786 81921, 153349 81698, 154293 81294, 154951 80819, 155194 80600, 155289 80615, 155523 80535, 156508 80388, 157059 80235, 157754 80015, 158232 79842, 158477 79805)), ((197496 78135, 198100 78371, 198607 78673, 198799 78843, 199120 79241, 199441 79761, 199802 80524, 199821 81037, 200176 81401, 200431 81761, 200586 82086, 200638 82355, 200614 82446, 200324 82595, 200083 82612, 199943 82516, 199511 81991, 198821 81205, 198384 80869, 198259 80668, 198236 80471, 197979 79837, 197640 79155, 197107 78384, 197058 78176, 197167 78112)), ((189641 77564, 190094 78267, 190740 78817, 190821 78852, 191377 79310, 190831 80598, 189941 81626, 189634 81818, 188334 81244, 188330 81256, 187433 81139, 187331 80903, 187206 80078, 187307 79270, 187628 78536, 188144 77925, 188823 77480, 189555 77251)), ((153900 68227, 153862 68501, 154035 69362, 154392 69961, 154194 70248, 153744 71521, 153656 72834, 153942 74098, 154578 75229, 155523 76146, 156712 76789, 157219 76912, 157188 77138, 157361 77999, 157782 78706, 156683 79939, 155900 80112, 155320 80501, 154845 80661, 154716 80681, 154494 80808, 153874 81093, 152847 81277, 152163 81287, 151337 81183, 151044 81090, 150573 80822, 150270 80502, 149645 80376, 149587 80339, 149034 80123, 148615 79817, 148349 79388, 148825 79255, 149152 79096, 149145 79001, 149528 78690, 149819 78365, 150026 78061, 150294 77484, 150379 77195, 150439 76630, 150316 75862, 150015 75220, 149478 74714, 149327 74559, 148709 74227, 148148 74099, 147602 74053, 147152 74094, 146700 73513, 146227 73735, 146184 73513, 146268 72929, 146471 72454, 146965 71780, 147011 71609, 147011 71316, 147084 71006, 147300 70610, 147592 70216, 148232 69610, 148818 69207, 149449 68892, 150033 68710, 150398 68666, 150765 68680, 150916 68630, 151144 68629, 151687 68538, 152516 68074)), ((148236 76183, 148957 77593, 149036 78038, 147985 79059, 148000 79071, 147467 80005, 147269 80995, 146961 81001, 145758 80713, 144705 80126, 143874 79278, 143321 78229, 143087 77048, 143217 75737, 143637 75933, 144582 76043, 145539 75861, 146414 75403, 146487 75331, 147067 75016)), ((171574 78868, 172654 79109, 173112 79158, 173708 79138, 174015 79066, 174288 79155, 174994 79533, 176053 79892, 176637 80061, 176867 80217, 176923 80386, 176933 80736, 176807 80871, 176348 80928, 175992 80895, 175545 80762, 175056 80567, 174551 80750, 173963 80765, 172984 80633, 172449 80468, 171943 80230, 171344 79672, 171079 79302, 170941 78996, 170906 78770, 171031 78763)), ((165636 78432, 166154 78477, 166956 78497, 167620 78486, 167821 78588, 167910 78716, 168032 79073, 167948 79252, 167506 79450, 167139 79526, 166753 79527, 166078 79451, 165617 79807, 165057 80000, 164330 80146, 163630 80185, 162912 80093, 162193 79786, 161751 79451, 161419 79073, 161286 78847, 161370 78745, 161706 78789, 163322 78667, 163730 78594, 164317 78407, 164539 78278, 164722 78260)), ((175125 66843, 175666 66918, 176216 67092, 176682 67359, 177264 67474, 177412 67581, 177894 67817, 177985 67903, 178725 67992, 179696 68876, 179477 69104, 179137 69844, 179109 70153, 178600 70332, 177503 71086, 176672 72084, 176167 73258, 176019 74528, 176242 75811, 176818 77014, 177223 77486, 176926 78131, 176854 78951, 175356 79282, 174816 79047, 174224 79026, 174028 79035, 173644 78915, 173101 78611, 172459 78493, 171711 78151, 171142 77749, 170586 77218, 170408 76990, 170215 76637, 170136 76311, 170176 76124, 170152 75978, 169835 75644, 169547 75188, 169387 74758, 169390 74298, 170026 74498, 170085 74401, 170669 74384, 171049 74305, 171746 73998, 172129 73727, 172482 73335, 172806 72694, 172933 72050, 172808 71389, 172777 71175, 172485 70581, 172147 70193, 171776 69870, 171285 69581, 171234 68887, 170920 68832, 171119 68528, 171424 68278, 171841 68053, 172344 67895, 172480 67792, 172555 67592, 172777 67351, 173340 67068, 173777 66938, 174607 66828)), ((163354 65760, 163970 65910, 164343 65895, 164536 65960, 165068 66044, 165131 66076, 165962 65926, 167184 66505, 167051 66769, 166938 67608, 167039 68097, 166682 68361, 165847 69411, 165341 70616, 165200 71895, 165431 73163, 166023 74330, 166932 75319, 167380 75606, 167258 76511, 167426 77319, 166041 78097, 165340 78015, 164843 78144, 164635 78217, 164184 78215, 163807 78140, 163652 78166, 163030 78226, 162216 78133, 161448 77881, 160720 77521, 160211 77073, 160069 76851, 160012 76620, 159926 76483, 159475 76226, 159024 75832, 158734 75431, 158609 74971, 159101 74999, 159373 74967, 159400 74866, 159909 74687, 160269 74489, 160859 73977, 161155 73592, 161387 73096, 161515 72359, 161445 71685, 161116 71058, 161024 70862, 160560 70363, 160097 70076, 159623 69865, 159126 69743, 158885 69069, 158463 69119, 158484 68946, 158584 68703, 158775 68407, 159123 68039, 159668 67666, 159772 67521, 159830 67238, 159982 66993, 160377 66621, 160796 66339, 161548 66001, 162142 65838, 162703 65750)), ((140985 71884, 141050 72024, 141126 72408, 141111 72508, 140890 72752, 140545 73005, 140012 73426, 139507 73857, 138736 74677, 138613 74771, 138490 75005, 138089 75129, 137332 75413, 136769 75781, 136177 76205, 135679 76749, 135335 77029, 135228 76934, 135179 76477, 135232 75703, 135425 75059, 135744 74496, 136218 74025, 136664 73690, 137100 73395, 137956 72977, 138345 72892, 138927 72914, 139633 72265, 139906 72064, 140380 71859, 140783 71774)), ((179717 72178, 180380 72738, 181189 73088, 181280 73098, 181933 73368, 181782 74819, 181208 76111, 180958 76401, 179536 76229, 179536 76244, 178590 76402, 178465 76467, 178295 76267, 177902 75447, 177751 74576, 177850 73711, 178194 72911, 178760 72232, 179448 71753)), ((159420 72057, 159739 73548, 159702 73974, 158433 74683, 158444 74697, 157722 75429, 157500 75873, 157218 75805, 156279 75297, 155532 74572, 155030 73681, 154804 72684, 154872 71648, 155188 70701, 156021 71031, 156956 71100, 157884 70892, 157969 70843, 158627 70686)), ((168223 69749, 169052 70105, 169962 70206, 170055 70189, 170744 70255, 171035 71748, 170857 73204, 170694 73574, 169274 73829, 169279 73844, 168386 74288, 168164 74507, 167931 74359, 167264 73632, 166830 72775, 166659 71844, 166762 70906, 167133 70021, 167695 69297)), ((188065 70094, 188613 70212, 188891 70327, 189336 70604, 189972 71136, 190425 71618, 190641 72135, 191145 72391, 191499 72639, 191807 72961, 191926 73162, 191933 73274, 191720 73507, 191483 73619, 191259 73559, 190734 73235, 189787 72697, 189144 72472, 188926 72330, 188835 72127, 188404 71632, 187961 71197, 186889 70408, 186807 70283, 186922 70169, 187216 70092, 187648 70057)), ((153566 66090, 153724 66238, 153751 66438, 153717 66770, 153646 66879, 153436 67011, 152990 67184, 152295 67484, 151791 67723, 150936 68267, 150708 68360, 150646 68434, 150319 68427, 149515 68499, 148534 68814, 147964 69016, 147550 69280, 147311 69383, 147199 69314, 147257 68968, 147488 68304, 147776 67840, 148308 67293, 148941 66939, 149769 66648, 150468 66520, 151065 66494, 151623 66658, 152371 66264, 152711 66137, 153181 66069)), ((176689 65221, 177297 65372, 178130 65744, 178626 66060, 178964 66477, 179618 66594, 180009 66715, 180358 66900, 180621 67112, 180660 67299, 180539 67509, 180336 67709, 180060 67724, 179506 67579, 178394 67334, 177585 67292, 177298 67229, 177137 67050, 176612 66716, 176155 66489, 175106 66139, 174587 65950, 174482 65880, 174627 65706, 174905 65515, 175407 65306, 176324 65183)), ((164637 63872, 165206 64035, 165682 64363, 166411 64249, 166798 64246, 167224 64327, 167560 64462, 167656 64641, 167609 64859, 167470 65136, 167277 65248, 166643 65272, 165502 65358, 164539 65593, 164207 65620, 163991 65503, 163385 65344, 162973 65294, 161354 65257, 161021 65317, 160930 65221, 161050 64989, 161363 64592, 161422 64555, 161801 64226, 162487 63893, 163013 63795, 163773 63762))) \ No newline at end of file diff --git a/stress_benchmark/resources/026.settings b/stress_benchmark/resources/026.settings new file mode 100644 index 0000000000..7e20bd7a6f --- /dev/null +++ b/stress_benchmark/resources/026.settings @@ -0,0 +1,631 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.06 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=3 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=11 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.12 +raft_acceleration=3500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=True +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=6.0 +cool_min_speed=5 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +material_print_temperature=195 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=1500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=0.24 +infill_sparse_thickness=0.06 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_none +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=80 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=1500 +speed_travel=150 +layer_0_z_overlap=0.0 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.18 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.04 +wipe_retraction_speed=45 +retraction_amount=6.5 +bridge_skin_density_2=100 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=1 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0.24 +material_diameter=2.85 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=24 +raft_surface_fan_speed=50 +default_material_bed_temperature=60 +speed_ironing=23.333333333333332 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3500 +wall_extruder_nr=-1 +support_structure=tree +support_xy_distance_overhang=0.2 +skin_angles=[] +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3500 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.7 +speed_wall=35 +bottom_thickness=1 +raft_interface_jerk=20 +material_shrinkage_percentage=100.2 +support_interface_wall_count=1 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.08 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +brim_gap=0.136 +acceleration_support_infill=2000 +support_meshes_present=False +travel_avoid_distance=3 +raft_interface_speed=17.5 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=20.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150 +acceleration_topbottom=1000 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=50 +skin_overlap=20 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=95.0 +skin_material_flow_layer_0=95 +bridge_skin_material_flow_2=95.0 +speed_support_interface=20 +machine_max_acceleration_x=9000 +support_interface_height=0.12 +skirt_height=3 +support_roof_pattern=zigzag +support_mesh=False +inset_direction=outside_in +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=100 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=35 +material_print_temperature_layer_0=195 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=45 +retraction_enable=True +support_line_distance=6.0 +extruder_prime_pos_abs=True +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3500 +interlocking_orientation=22.5 +speed_wall_0_roofing=24 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1.0 +infill_line_distance=6.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=30.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=45 +raft_base_speed=15 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=0.75 +bridge_skin_speed=35 +skirt_brim_material_flow=100 +acceleration_support_roof=1500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=300 +prime_tower_base_size=3 +infill_enable_travel_optimization=False +speed_support_infill=25 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=2 +jerk_wall_0=20 +mold_angle=40 +raft_speed=15 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=True +top_bottom=0 +machine_max_feedrate_z=40 +acceleration_support=2000 +cool_min_temperature=185 +jerk_layer_0=20 +support_offset=0.0 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.06 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=1.6 +raft_interface_line_spacing=0.8 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=6 +support_join_distance=2.0 +wipe_hop_amount=2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=300 +machine_width=330 +extruder_prime_pos_y=6 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=100 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=True +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.6000000000000001 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=110.00000000000001 +material_final_print_temperature=180 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.91 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=False +acceleration_skirt_brim=1000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=no_outer_surfaces +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=100 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=35 +roofing_layer_count=1 +speed_slowdown_layers=1 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=35 +lightning_infill_straightening_angle=40 +speed_topbottom=35 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=False +material_maximum_park_duration=7200 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=7.199999999999999 +machine_max_jerk_z=0.4 +support_tree_angle=45 +expand_skins_expand_distance=0.8 +prime_tower_position_y=217.0 +mesh_position_x=0 +cross_infill_pocket_size=6.0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=25 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +raft_surface_acceleration=3500 +minimum_support_area=0.0 +brim_width=7 +small_skin_width=0.8 +shell=0 +jerk_print=20 +adhesion_type=none +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=15 +z_seam_x=165.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=95.0 +acceleration_wall=1500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=95.0 +support_interface_pattern=zigzag +initial_bottom_layers=17 +bridge_fan_speed_2=100 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +retraction_hop_enabled=True +layer_start_y=228.0 +extruder_prime_pos_x=333 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=True +extruder_prime_pos_z=2 +support_tower_roof_angle=0 +prime_tower_position_x=308 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=17 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=4 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.3 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=1 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=triangles +material_alternate_walls=False +material_break_preparation_speed=50 +acceleration_support_bottom=100 +material_end_of_filament_purge_length=20 +speed_print=50 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=1500 +carve_multiple_volumes=True +raft_surface_thickness=0.06 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=1428.5714285714287 +speed_equalize_flow_width_factor=110.0 +wipe_brush_pos_x=100 +jerk_wall_0_roofing=20 +skin_material_flow=95.0 +support_bottom_density=100 +bridge_skin_density_3=100 +support_interface_enable=True +support_roof_wall_count=1 +infill_sparse_density=20 +infill_extruder_nr=1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=95.0 +speed_print_layer_0=7.199999999999999 +raft_jerk=20 +speed_support=25 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=False +jerk_support_bottom=20 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=1000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1.0 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=35 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +support_bottom_pattern=zigzag +support_roof_height=0.12 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1 +min_skin_width_for_expansion=6.245698675651501e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=1 +support_fan_enable=False +infill_wipe_dist=0 +machine_shape=rectangular +support_pattern=triangles +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=1000 +material_shrinkage_percentage_z=100.2 +material_guid=44a029e6-e31b-4c9e-a12f-9282e29a92ff +support_roof_line_distance=0.4 +brim_line_count=18 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=1500 +wall_transition_angle=10 +top_thickness=1 +machine_center_is_zero=False +extruders_enabled_count=2 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=35 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=25.0 +bridge_wall_coast=0 +skirt_line_count=1 +infill_mesh=False +layer_height=0.06 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=150 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=95.0 +machine_max_feedrate_y=300 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +acceleration_prime_tower=2000 +retraction_hop_after_extruder_switch_height=2 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=2 +xy_offset_layer_0=-0.08600000000000001 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=185 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=3500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +material_shrinkage_percentage_xy=100.2 +bridge_skin_material_flow=95.0 +raft_base_jerk=20 +speed_wall_x=35 +time=10:25:13 +machine_buildplate_type=glass +top_layers=17 +machine_gcode_flavor=Griffin +roofing_angles=[] +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.18 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=55 +support_bottom_extruder_nr=0 +speed_support_roof=20 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=3000 +speed_roofing=35 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=20 +material_bed_temp_wait=True +machine_depth=240 +bridge_wall_material_flow=100 +jerk_travel=20 +retraction_speed=45 +xy_offset=-0.006 +print_temperature=200 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=240 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=7.199999999999999 +raft_surface_speed=20 +material_name=empty +acceleration_wall_0=1500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/026.wkt b/stress_benchmark/resources/026.wkt new file mode 100644 index 0000000000..5512c8ee4d --- /dev/null +++ b/stress_benchmark/resources/026.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((227245 67069, 226990 67069, 226984 67075, 226984 67237, 226990 67243, 227245 67243, 227245 67582, 226990 67580, 226984 67586, 226984 67756, 226990 67762, 227245 67761, 227245 67860, 226990 67860, 226984 67866, 226984 68073, 226990 68079, 227245 68080, 227245 68588, 226990 68588, 226984 68594, 226984 68891, 226989 68897, 227163 68921, 226990 68921, 226984 68927, 226984 69286, 226990 69292, 227245 69291, 227245 70569, 226990 70569, 226984 70575, 226984 70797, 226990 70803, 227245 70807, 227245 71296, 226991 71296, 226985 71302, 226984 71369, 226990 71375, 227245 71375, 227245 71470, 226990 71470, 226984 71476, 226984 71587, 226990 71593, 227245 71593, 227245 71978, 226990 71975, 226984 71981, 226984 72080, 226990 72086, 227245 72088, 227245 72294, 226990 72294, 226984 72300, 226984 72518, 226990 72524, 227245 72524, 227245 72747, 226990 72746, 226984 72752, 226984 72819, 226990 72825, 227245 72825, 227245 73542, 225453 73542, 225447 73548, 225440 74559, 225506 75224, 225462 75588, 225479 76255, 225508 76618, 225501 77646, 225446 78404, 225452 78410, 226437 78410, 226445 78908, 226193 78909, 226187 78915, 226187 79310, 226193 79316, 226445 79317, 226445 79550, 226193 79551, 226187 79557, 226187 79884, 226193 79890, 226445 79891, 226445 80275, 226193 80275, 226187 80281, 226187 80856, 226193 80862, 226445 80863, 226445 81175, 226193 81176, 226187 81182, 226187 81812, 226193 81818, 226445 81819, 226445 83066, 226193 83067, 226187 83073, 226187 83255, 225493 83255, 225487 83261, 225491 83821, 225438 84850, 225456 85517, 225478 85879, 225453 86391, 225459 86397, 226126 86402, 225873 86995, 225879 87003, 226102 87001, 226102 88114, 226108 88120, 226328 88120, 226328 88152, 226101 88149, 226095 88155, 226095 88307, 226101 88313, 226328 88314, 226328 89584, 226108 89584, 226102 89590, 226102 89704, 226108 89710, 226328 89708, 226328 91149, 226223 91150, 226217 91156, 226217 91908, 226223 91914, 226328 91920, 226328 92963, 226223 92963, 226217 92969, 226217 93103, 225964 93104, 225958 93110, 225958 93161, 225964 93167, 226217 93167, 226217 95188, 225416 95189, 225410 95195, 225426 95804, 225446 96167, 225360 97076, 225437 97818, 225443 97824, 226102 97824, 226102 98907, 225845 98911, 225839 98917, 225839 99189, 225845 99195, 226102 99194, 226102 99575, 225845 99576, 225839 99582, 225839 99747, 225845 99753, 226102 99753, 226102 100735, 225845 100736, 225839 100742, 225839 101172, 225845 101178, 226102 101187, 226102 101794, 225849 101795, 225843 101801, 225843 102079, 225849 102085, 226102 102085, 226102 102671, 226108 102677, 226328 102677, 226328 103417, 226078 103418, 226072 103424, 226072 103529, 226078 103535, 226328 103536, 226328 103876, 226078 103876, 226072 103882, 226072 103965, 226078 103971, 226328 103972, 226328 105663, 226078 105664, 226072 105670, 226102 106506, 226108 106512, 226326 106515, 226328 107522, 225845 107522, 225839 107528, 225839 108097, 225845 108103, 226102 108104, 226102 109286, 225849 109295, 225843 109301, 225839 109506, 225845 109512, 226102 109512, 226102 110132, 225848 110133, 225842 110139, 225839 110519, 225845 110525, 226101 110528, 226102 110781, 225845 110782, 225840 110791, 225907 110931, 225912 110934, 226102 110932, 226102 111002, 225354 111011, 225348 111017, 225348 112385, 225354 112391, 227245 112391, 227245 112760, 226990 112761, 226984 112767, 226984 112929, 226990 112935, 227245 112943, 227245 113270, 226990 113271, 226984 113277, 226984 113441, 226990 113447, 227245 113446, 227245 113551, 226990 113551, 226984 113557, 226984 113766, 226990 113772, 227245 113773, 227245 114277, 226990 114277, 226984 114283, 226984 114583, 226989 114589, 227170 114615, 226990 114616, 226984 114622, 226984 114977, 226990 114983, 227245 114984, 227245 118010, 226990 118007, 226984 118013, 226984 118131, 226990 118137, 227245 118132, 227245 118384, 226990 118384, 226984 118390, 226984 118639, 226990 118645, 227245 118645, 227245 119233, 226108 119235, 226102 119241, 226102 120595, 225845 120595, 225839 120601, 225839 120718, 225845 120724, 226102 120724, 226102 121461, 225845 121461, 225839 121467, 225839 121665, 225845 121671, 226102 121671, 226102 122121, 225845 122121, 225839 122127, 225839 122298, 225845 122304, 226102 122304, 226102 124096, 226108 124102, 226442 124102, 226445 124697, 226193 124697, 226187 124703, 226187 125088, 226193 125094, 226445 125095, 226445 125523, 226193 125523, 226187 125529, 226187 126249, 226193 126255, 226445 126255, 226445 126627, 226193 126628, 226187 126634, 226187 126890, 226193 126896, 226445 126897, 226445 127186, 226193 127186, 226187 127192, 226187 127798, 226193 127804, 226445 127804, 226445 128946, 224785 128946, 224779 128952, 224779 129517, 224785 129523, 226649 129521, 226398 129955, 226403 129964, 226653 129967, 226653 131422, 226403 131430, 226397 131436, 226397 131958, 226403 131964, 226653 131963, 226653 132046, 226403 132045, 226397 132051, 226397 132594, 226403 132600, 226653 132600, 226653 134381, 226223 134381, 226217 134387, 226217 135971, 226142 134388, 226136 134382, 224785 134382, 224779 134388, 224779 137945, 224785 137951, 226223 137953, 226229 137947, 226229 136503, 226294 137947, 226300 137953, 226712 137957, 226712 139626, 226455 139626, 226449 139632, 226449 139900, 226455 139906, 226712 139906, 226712 141083, 226455 141082, 226449 141088, 226449 141134, 226455 141140, 226712 141140, 226712 141277, 226455 141277, 226449 141283, 226449 141825, 226455 141831, 226712 141831, 226712 142331, 226455 142332, 226449 142338, 226449 142401, 226455 142407, 226712 142407, 226712 142615, 226455 142616, 226449 142622, 226459 142744, 226465 142750, 226711 142751, 226712 142796, 224785 142802, 224779 142808, 224779 143516, 224785 143522, 226102 143522, 226102 145446, 225845 145446, 225839 145452, 225839 145935, 225845 145941, 226102 145942, 226102 146021, 225845 146021, 225839 146027, 225839 146451, 225845 146457, 226099 146458, 226102 147972, 225845 147969, 225839 147974, 225840 147978, 226103 148372, 226108 148375, 226316 148375, 226328 149112, 226078 149112, 226072 149118, 226072 149361, 226078 149367, 226328 149368, 226328 153220, 226108 153220, 226102 153226, 226102 154927, 225845 154928, 225839 154934, 225839 155171, 225845 155177, 226102 155177, 226102 156352, 225845 156352, 225839 156358, 225839 156420, 225845 156426, 226102 156427, 226102 156561, 225845 156562, 225839 156568, 225839 157112, 225845 157118, 226102 157121, 226102 157615, 225845 157617, 225839 157623, 225839 157675, 225845 157681, 226102 157680, 226102 157885, 225845 157886, 225839 157892, 225849 158015, 225855 158021, 226102 158022, 226102 158077, 226108 158083, 227245 158083, 227244 158453, 226990 158448, 226984 158454, 226984 158620, 226990 158626, 227245 158632, 227245 158961, 226990 158962, 226984 158968, 226984 159133, 226990 159139, 227245 159139, 227245 159242, 226990 159242, 226984 159248, 226984 159457, 226990 159463, 227245 159476, 227245 159968, 226990 159968, 226984 159974, 226984 160270, 226989 160276, 227170 160304, 226990 160303, 226984 160309, 226984 160670, 226990 160676, 227245 160674, 227245 167473, 226990 167474, 226984 167480, 226984 168402, 226990 168408, 227245 168408, 227245 168479, 226990 168478, 226984 168484, 226984 169332, 226990 169338, 227245 169325, 227245 169495, 224469 169495, 224469 169241, 224463 169235, 223759 169235, 223753 169241, 223749 169495, 222914 169495, 222914 169241, 222908 169235, 221659 169235, 221653 169241, 221652 169495, 221007 169495, 221006 169241, 221000 169235, 220380 169235, 220374 169241, 220375 169495, 219261 169495, 219261 168649, 219255 168643, 208976 168643, 208970 168649, 208970 169036, 206691 169036, 206691 168649, 206685 168643, 196409 168642, 196403 168648, 196403 169269, 195311 169269, 195311 169014, 195305 169008, 194631 169008, 194625 169014, 194625 169269, 192872 169269, 192873 169014, 192867 169008, 192673 169008, 192667 169014, 192667 169269, 192297 169269, 192299 169014, 192293 169008, 192088 169008, 192082 169014, 192082 169269, 189562 169269, 189562 168649, 189556 168643, 180417 168642, 180411 168648, 180411 169036, 178136 169036, 178135 168216, 178129 168210, 175932 168209, 175926 168215, 175943 168640, 173850 168644, 173849 168641, 173843 168637, 171956 168643, 171547 168400, 171546 168399, 170399 168034, 170397 168034, 168420 168029, 168414 168035, 168414 169036, 166140 169036, 166140 168646, 166134 168640, 157003 168641, 156997 168647, 156997 169269, 156085 169269, 156088 169014, 156082 169008, 155625 169008, 155619 169014, 155621 169269, 154599 169269, 154603 169014, 154597 169008, 154534 169008, 154528 169014, 154528 169269, 154490 169269, 154489 169014, 154483 169008, 154298 169008, 154292 169014, 154292 169269, 152655 169269, 152654 169014, 152648 169008, 152525 169008, 152519 169014, 152516 169269, 151890 169269, 151890 169014, 151884 169008, 151736 169008, 151730 169014, 151730 169269, 150150 169269, 150150 168649, 150144 168643, 139866 168642, 139860 168648, 139860 169036, 137585 169036, 137585 167495, 137579 167489, 137058 167491, 137052 167499, 137397 168640, 127296 168642, 127290 168648, 127290 169495, 126418 169495, 126418 169241, 126412 169235, 126036 169235, 126030 169241, 126035 169495, 125232 169495, 125232 169241, 125226 169235, 124834 169235, 124828 169241, 124828 169495, 124577 169495, 124577 169241, 124571 169235, 124083 169235, 124077 169241, 124077 169495, 122883 169495, 122883 169241, 122877 169235, 122176 169235, 122170 169241, 122171 169495, 122090 169495, 122090 169241, 122084 169235, 121255 169235, 121249 169241, 121249 169495, 119308 169495, 119308 165781, 119591 165784, 119597 165778, 119597 165480, 119591 165474, 119308 165474, 119308 163404, 119521 163406, 119527 163401, 119522 163394, 119308 163352, 119308 159313, 119563 159311, 119569 159305, 119569 159189, 119563 159183, 119308 159184, 119308 158933, 119563 158932, 119569 158926, 119569 158681, 119563 158675, 119308 158675, 119308 158083, 127290 158083, 127290 158200, 127043 158201, 127037 158207, 127037 158549, 127043 158555, 127290 158555, 127290 158659, 127043 158659, 127037 158665, 127037 158939, 127043 158945, 127290 158945, 127290 158983, 127043 158983, 127037 158989, 127037 159644, 127043 159650, 127290 159651, 127290 160412, 127043 160413, 127037 160419, 127037 160720, 127043 160726, 127290 160729, 127290 162555, 127296 162561, 127861 162525, 128427 162475, 128590 162505, 128592 162505, 129210 162420, 129891 162457, 130618 162512, 130619 162512, 130783 162484, 131352 162505, 131515 162540, 131517 162540, 132154 162460, 132814 162549, 132815 162549, 132977 162540, 133623 162615, 133626 162615, 134279 162417, 134374 162442, 134465 162875, 134398 163326, 134403 163333, 134678 163379, 134680 163379, 135079 163315, 135084 163309, 135084 162492, 135735 162516, 135898 162510, 136467 162516, 137191 162498, 138043 162546, 138044 162546, 138654 162459, 140111 162372, 140503 162437, 140510 162433, 140509 162428, 140101 161648, 139893 160969, 139880 160697, 140338 160134, 141078 159828, 141293 159776, 142020 159562, 142172 159500, 142699 159443, 143513 159519, 143515 159519, 144637 159393, 145596 159154, 145951 159158, 146133 159275, 146444 159683, 146715 160227, 146776 160783, 146655 161124, 146112 161461, 146111 161462, 145990 161586, 145496 161966, 144801 162259, 144610 162372, 144606 162380, 144611 162384, 145222 162476, 145385 162487, 145953 162553, 145956 162552, 146112 162481, 146112 162482, 146684 162399, 146846 162449, 146848 162449, 147578 162465, 148141 162498, 148304 162486, 148998 162564, 148999 162564, 149605 162411, 150143 162472, 150150 162466, 150150 161511, 151678 161511, 151698 161761, 151704 161767, 151962 161767, 151968 161761, 151969 161511, 152625 161511, 152625 161761, 152631 161767, 152732 161767, 152738 161761, 152738 161511, 154268 161511, 154268 161761, 154274 161767, 154854 161767, 154860 161761, 154859 161511, 155741 161511, 155738 161761, 155744 161767, 156146 161767, 156152 161761, 156153 161511, 156997 161511, 156997 162479, 157002 162485, 157680 162589, 157682 162589, 158669 162428, 159645 162455, 160580 162398, 161423 162492, 162350 162458, 163285 162466, 163379 162476, 164315 162453, 165298 162384, 165298 163176, 165300 163181, 165556 163384, 164994 163384, 164988 163389, 164991 163395, 165549 163674, 165553 163675, 166485 163496, 167428 163719, 167431 163719, 168361 163400, 168365 163393, 168359 163388, 166187 163384, 166456 163181, 166458 163176, 166455 162472, 167112 162564, 167114 162564, 167951 162480, 168885 162541, 169913 162562, 170756 162473, 171693 162528, 172628 162505, 173555 162444, 173646 162450, 174491 162382, 175428 162428, 175519 162417, 176454 162408, 177299 162446, 177395 162443, 178234 162491, 179163 162419, 179253 162434, 179254 162434, 180188 162395, 181123 162508, 182059 162449, 182904 162528, 183929 162518, 184769 162587, 185703 162463, 185794 162471, 186637 162447, 186728 162464, 187574 162535, 187575 162535, 188300 162510, 188388 162735, 188389 162736, 188795 163369, 188798 163371, 188909 163420, 188913 163421, 189430 163272, 189430 165717, 157004 165717, 156998 165723, 156997 166072, 157003 166078, 189556 166078, 189562 166072, 189562 161511, 191348 161511, 191349 161761, 191355 161767, 192311 161767, 192317 161761, 192317 161511, 193982 161511, 193982 161761, 193988 161767, 194499 161767, 194505 161761, 194505 161511, 195337 161511, 195337 161761, 195343 161767, 195749 161767, 195755 161761, 195754 161511, 196098 161511, 196098 161761, 196105 161767, 196297 161722, 196302 161716, 196296 161511, 196403 161511, 196403 162457, 196410 162463, 196900 162404, 197629 162425, 198360 162496, 198362 162496, 198641 162446, 199706 162536, 200549 162486, 200828 162530, 201559 162544, 202291 162522, 203473 162451, 204200 162520, 204202 162520, 204479 162466, 205211 162515, 205942 162505, 205943 162505, 206674 162390, 207124 162505, 207126 162505, 207405 162458, 208136 162488, 208137 162488, 208310 162452, 208308 163176, 208310 163180, 208516 163390, 208522 163392, 208721 163316, 208723 163314, 208852 163180, 208854 163176, 208851 162429, 209590 162419, 210043 162520, 210044 162520, 210594 162475, 210600 162467, 210346 161818, 210371 161465, 211497 161539, 211438 162437, 211444 162443, 212510 162450, 213235 162392, 213965 162501, 214696 162406, 215235 162523, 215237 162523, 216161 162429, 216614 162487, 217623 162463, 218640 162594, 218642 162594, 219256 162493, 219261 162487, 219261 161492, 219515 161120, 219514 161113, 219510 161111, 219261 161114, 219261 160157, 219510 160157, 219516 160151, 219516 159857, 219510 159851, 219261 159850, 219261 159793, 219510 159793, 219516 159787, 219516 159487, 219510 159481, 219261 159480, 219261 158083, 220320 158083, 220326 158078, 220440 157452, 220440 157450, 220346 156631, 220325 156106, 220283 155605, 220198 155079, 220338 154584, 220454 154062, 220454 154059, 220358 153042, 220356 152016, 220288 151516, 220262 150836, 220297 149974, 220363 149479, 220382 148957, 220382 148956, 220354 148457, 220328 147648, 220428 146906, 220428 146905, 220326 144750, 220412 143848, 220388 143345, 220269 142612, 220241 141795, 220357 141301, 220357 141300, 220387 140778, 220341 140283, 220350 139761, 220345 139258, 220412 138728, 220382 138231, 220363 137707, 220416 137210, 220416 137209, 220352 136686, 220408 135667, 220369 135170, 220416 134646, 220416 134645, 220343 134005, 220337 134000, 220332 134002, 219840 134589, 219514 135107, 219514 135108, 219268 135632, 218960 135837, 218600 135853, 218764 134811, 218764 134810, 218730 134202, 218703 134013, 218682 133256, 218751 132744, 218978 132119, 219163 131926, 219319 131914, 220301 132315, 220309 132310, 220392 131562, 220915 132039, 220916 132040, 221190 132185, 221199 132182, 221298 131884, 221298 131880, 221102 131391, 221284 130411, 221284 130409, 221157 129838, 221294 129343, 221294 129339, 221096 128808, 221095 128806, 220713 128313, 220825 127788, 220878 127295, 221223 126269, 221223 126266, 221014 125734, 221035 125240, 221034 124711, 221057 123989, 221051 123983, 220774 124006, 220516 123795, 220453 123591, 220495 123160, 220796 122897, 221048 122925, 221312 123196, 221320 123197, 221322 123190, 221094 122662, 221093 122660, 220732 122171, 221247 121143, 221248 121140, 221271 120612, 221271 120611, 221201 120118, 221201 120117, 220975 119586, 220907 119242, 220901 119237, 219261 119233, 219261 119119, 219510 119118, 219516 119112, 219516 118766, 219510 118760, 219261 118760, 219261 118659, 219510 118659, 219516 118653, 219516 118382, 219510 118376, 219261 118376, 219261 118338, 219510 118338, 219516 118332, 219516 117672, 219510 117666, 219261 117665, 219261 116906, 219510 116905, 219516 116899, 219516 116598, 219510 116592, 219261 116592, 219262 114315, 219510 114306, 219516 114301, 219510 114294, 219261 114295, 219261 112391, 220841 112391, 220847 112387, 221050 111839, 221050 111837, 221014 111387, 221022 110806, 220952 110353, 220952 110351, 220750 109767, 220762 109043, 220760 109038, 220453 108776, 220405 108436, 220457 108195, 220699 107922, 220852 107919, 220858 107914, 220989 107261, 220989 107258, 220791 106679, 220842 106226, 221239 105646, 221239 105640, 221156 105505, 221147 105504, 216915 109727, 216033 109405, 214963 108409, 214452 107979, 214451 107978, 213681 107594, 213371 107375, 212547 106935, 211403 106009, 211562 105698, 212552 104750, 213538 103841, 214308 103230, 215723 102292, 216185 102093, 216188 102091, 216287 101957, 216337 103856, 216349 105765, 216349 105767, 216447 106048, 216512 106854, 216587 107247, 216593 107253, 216597 107251, 220091 103755, 220811 104470, 220820 104469, 221263 103584, 221263 103579, 221059 103129, 220871 102551, 220947 102098, 220971 101514, 221067 101064, 221071 100687, 221067 100680, 221061 100682, 220750 100992, 220256 101278, 220274 100887, 220410 100296, 220410 100294, 220319 99858, 220225 99273, 220317 98834, 220416 98242, 220416 98240, 220352 97801, 220287 97211, 220312 96773, 220321 96183, 220351 95746, 220359 95157, 220325 94719, 220321 94129, 220366 93690, 220348 93097, 220304 92656, 220339 92062, 220357 90818, 220357 90817, 220242 90014, 220319 89575, 220378 88983, 220378 88981, 220285 88540, 220282 87945, 220291 87509, 220271 86485, 220305 85897, 220356 85458, 220282 84563, 220331 83830, 220315 83392, 220329 82802, 220310 82365, 220361 81456, 220302 80312, 220290 79718, 220313 79278, 220275 78685, 220325 78250, 220361 77664, 220209 76490, 220384 75561, 220384 75560, 220281 74137, 220277 73548, 220271 73542, 219261 73542, 219261 73001, 219510 73001, 219516 72995, 219516 72676, 219510 72670, 219261 72670, 219261 72463, 219510 72462, 219516 72456, 219516 72363, 219510 72357, 219261 72357, 219261 71786, 219510 71786, 219516 71780, 219516 71703, 219510 71697, 219261 71694, 219261 71498, 219510 71497, 219516 71491, 219516 71440, 219510 71434, 219261 71434, 219261 70120, 219515 69761, 219514 69754, 219510 69752, 219261 69759, 219261 68779, 219510 68780, 219516 68774, 219516 68408, 219510 68402, 219261 68402, 219261 68364, 219510 68363, 219516 68357, 219516 68034, 219510 68028, 219261 68027, 219261 66700, 227245 66700) (144376 167490, 144370 167495, 144372 167501, 145656 168487, 145665 168486, 146401 167499, 146400 167491, 146396 167489) (172799 163384, 172793 163389, 172797 163396, 173032 163462, 173034 163462, 173970 163489, 174906 163551, 175836 163689, 176780 163706, 177705 163647, 177708 163646, 178100 163395, 178102 163387, 178097 163384) (183060 163384, 183054 163389, 183057 163395, 183301 163540, 183305 163541, 184248 163435, 185182 163643, 185184 163643, 186167 163396, 186172 163389, 186166 163384) (199854 163384, 199848 163389, 199852 163396, 200299 163570, 200302 163570, 200517 163552, 201029 163551, 201243 163531, 201760 163641, 201762 163641, 201975 163614, 202737 163580, 202739 163579, 203118 163395, 203121 163388, 203115 163384) (217539 163384, 217533 163389, 217537 163396, 218039 163566, 218044 163565, 218344 163395, 218347 163388, 218341 163384) (179270 163384, 179264 163389, 179267 163395, 179567 163563, 179570 163564, 180513 163491, 180515 163491, 180852 163396, 180856 163389, 180850 163384) (169846 163384, 169840 163389, 169844 163396, 170235 163552, 170239 163552, 170763 163396, 170767 163389, 170761 163384) (203735 163384, 203729 163389, 203733 163396, 204163 163545, 204168 163544, 204471 163395, 204474 163388, 204468 163384) (197345 163384, 197339 163389, 197344 163396, 197592 163444, 197593 163444, 198102 163431, 198320 163542, 198326 163542, 198646 163395, 198649 163388, 198643 163384) (137874 163384, 137868 163389, 137872 163396, 138235 163507, 138239 163507, 138561 163396, 138565 163389, 138559 163384) (206747 163384, 206741 163389, 206745 163396, 207083 163506, 207088 163505, 207258 163395, 207260 163387, 207255 163384)), ((169671 152745, 170202 153253, 170927 154227, 171257 154872, 172153 156116, 172154 156117, 172595 156617, 172917 156954, 173092 157304, 172987 157689, 172694 158108, 171814 158747, 171209 159113, 168206 162129, 167381 161300, 168670 160011, 168668 160001, 168308 159867, 168306 159867, 168001 159850, 167818 159755, 167815 159754, 166727 159747, 164129 158681, 164503 158259, 165428 157177, 166125 156075, 167136 154902, 167137 154901, 167379 154495, 168150 153502, 168929 152985, 169515 152732)), ((100335 154873, 100340 154879, 100345 154877, 100551 154669, 100556 161492, 99605 161493, 99601 161445, 99595 161439, 99589 161445, 99586 161493, 98435 161494, 98436 161278, 98430 161272, 98139 161270, 98133 161276, 98133 161494, 96286 161493, 96282 159681, 96419 159684, 96425 159678, 96423 159138, 96417 159132, 96282 159132, 96282 157636, 96416 157636, 96422 157630, 96422 156997, 96416 156991, 96282 156991, 96282 156341, 96416 156341, 96422 156335, 96422 156136, 96416 156130, 96282 156131, 96282 155856, 96416 155857, 96422 155851, 96422 155697, 96416 155691, 96282 155692, 96282 155622, 96416 155614, 96422 155608, 96416 155602, 96282 155601, 96283 154664, 98837 154659, 98852 154874, 98858 154880, 98864 154874, 98865 154659, 100335 154658)), ((113941 158262, 113941 158347, 113947 158353, 114063 158357, 114069 158351, 114069 158266, 115991 158269, 115992 158353, 116001 158358, 116150 158269, 116153 161190, 115333 161187, 115308 161095, 115301 161091, 115296 161097, 115297 161188, 114461 161184, 114461 161101, 114454 161095, 114400 161101, 114395 161107, 114399 161186, 112729 161180, 112734 160582, 112838 160582, 112844 160576, 112843 160173, 112837 160167, 112730 160167, 112734 159565, 112836 159562, 112842 159556, 112843 159414, 112837 159408, 112733 159408, 112729 159098, 112834 159099, 112840 159093, 112842 158918, 112836 158912, 112731 158911, 112728 158786, 112832 158787, 112838 158781, 112840 158710, 112834 158704, 112745 158703, 112810 158668, 112813 158661, 112807 158657, 112729 158655, 112723 158260)), ((212508 156972, 213258 157082, 214087 157279, 214550 157455, 214547 157486, 214552 157493, 214990 157537, 214510 157514, 214506 157516, 212112 159731, 211970 159822, 211968 159823, 211598 160294, 210953 161072, 210811 161123, 210611 161054, 210559 160792, 210558 160790, 210322 160346, 210131 159148, 209693 157491, 209679 156920, 209750 156738, 209938 156695)), ((203880 156686, 203601 159222, 196085 157828, 196554 157073, 197215 156043, 197543 155514)), ((195255 155681, 195043 157633, 193835 157414, 194047 155461)), ((159674 152760, 159585 152853, 159587 152863, 160214 153127, 160220 153125, 160317 153030, 160382 153055, 160285 153144, 160287 153154, 160903 153412, 160909 153410, 161010 153319, 162717 154035, 162622 154119, 162621 154126, 162625 154129, 163265 154271, 162240 155265, 162212 155281, 162211 155282, 161826 155652, 161787 155703, 160816 156619, 160196 157240, 158599 156572, 158686 156482, 158684 156472, 158540 156414, 158534 156416, 158434 156506, 157501 156113, 157589 156026, 157587 156017, 157411 155940, 157405 155941, 157314 156035, 156754 155802, 156837 155709, 156835 155699, 156653 155622, 156647 155624, 156545 155717, 154422 154829, 155476 153824, 155672 153893, 155679 153890, 155676 153882, 155498 153803, 156117 153176, 156316 153262, 156322 153260, 156453 153142, 156451 153132, 156262 153060, 156331 152993, 156521 153066, 156527 153064, 156837 152754, 156835 152744, 156662 152677, 157046 152315, 157252 152362, 157259 152358, 157256 152351, 157202 152325, 157244 152341, 157251 152338, 157249 152330, 157093 152252, 157515 151856)), ((191588 155004, 191377 156957, 190166 156733, 190372 154777)), ((187923 154328, 187711 156278, 186494 156055, 186708 154102)), ((184316 153071, 184042 155601, 181606 155154, 181880 152620)), ((100281 128668, 100286 128674, 100292 128671, 100566 128252, 100575 139194, 100569 140910, 100578 141934, 100041 141938, 99816 141814, 99807 141819, 99812 141946, 99440 141938, 99410 141503, 99404 141497, 99398 141503, 99399 141939, 99298 141939, 99297 141500, 99291 141494, 99078 141507, 99072 141513, 99076 141937, 98910 141942, 98910 141508, 98904 141502, 98610 141494, 98604 141500, 98588 141940, 98449 141946, 98449 141508, 98443 141502, 97975 141499, 97969 141505, 97986 141941, 97882 141933, 97882 141504, 97876 141498, 97530 141503, 97524 141509, 97523 141943, 96297 141941, 96298 136253, 96433 136229, 96438 136223, 96432 136217, 96298 136218, 96294 134335, 96425 134335, 96431 134329, 96435 133824, 96429 133818, 96296 133818, 96296 133498, 96429 133499, 96435 133493, 96431 132123, 96425 132117, 96294 132117, 96295 130523, 96426 130522, 96432 130516, 96432 130278, 96426 130272, 96294 130271, 96294 130167, 96426 130149, 96431 130143, 96425 130137, 96296 130137, 96291 128241, 98238 128239, 98228 128673, 98234 128679, 98423 128681, 98429 128675, 98430 128241, 98690 128239, 98682 128668, 98688 128674, 98875 128685, 98881 128679, 98877 128239, 100284 128238)), ((134104 134524, 134096 134617, 134094 135586, 133961 135587, 133955 135593, 133944 136150, 133950 136156, 134088 136155, 134082 137640, 133950 137642, 133944 137648, 133934 138279, 133940 138285, 134077 138285, 134071 138940, 133937 138942, 133931 138948, 133933 139151, 133939 139157, 134071 139158, 134069 139431, 133934 139430, 133928 139436, 133928 139588, 133934 139594, 134067 139597, 134068 139664, 133933 139671, 133927 139677, 133933 139683, 134071 139685, 134062 140630, 131483 140627, 131485 140411, 131480 140405, 131473 140410, 131450 140626, 129961 140628, 129963 140412, 129958 140406, 129953 140408, 129742 140616, 129772 134800, 129779 134754, 129781 133789, 130738 133790, 130750 133856, 130756 133861, 130762 133855, 130764 133790, 131924 133792, 131925 134004, 131931 134010, 132224 134006, 132230 134000, 132227 133788, 134105 133785)), ((127290 70902, 127043 70901, 127037 70907, 127037 71203, 127043 71209, 127290 71210, 127290 71973, 127043 71974, 127037 71980, 127037 72634, 127043 72640, 127290 72640, 127290 72678, 127043 72678, 127037 72684, 127037 72964, 127043 72970, 127290 72971, 127290 73066, 127043 73066, 127037 73072, 127037 73419, 127043 73425, 127290 73426, 127290 73542, 126559 73542, 126553 73548, 126548 74588, 126527 74969, 126577 75563, 126554 76539, 126516 76920, 126617 77895, 126585 78484, 126585 78485, 126653 78861, 126620 79451, 126559 79837, 126559 79838, 126627 80432, 126607 81407, 126532 82382, 126532 82383, 126581 82763, 126522 83737, 126509 84329, 126542 84708, 126543 85301, 126501 85681, 126525 86275, 126485 86656, 126507 87630, 126558 88605, 126582 89302, 126508 90174, 126508 90175, 126565 90551, 126566 91143, 126513 91524, 126513 91525, 126541 92154, 126547 92160, 126553 92156, 126792 91430, 127165 90747, 128084 89250, 128269 89002, 128689 88086, 128918 87864, 129285 87746, 129763 87887, 130898 88455, 131162 88717, 131240 89104, 130912 90689, 130841 91624, 130841 91626, 130857 91810, 130825 92385, 130594 92945, 130324 94060, 129803 94870, 129489 95137, 129206 95118, 128285 94748, 127305 94241, 126558 93935, 126550 93941, 126572 94454, 126581 95673, 125859 95662, 125854 95664, 125641 95949, 125640 95955, 125713 96210, 125714 96212, 125854 96389, 125859 96391, 126604 96387, 126593 96998, 126607 97373, 126483 98116, 126582 98939, 126567 99317, 126585 100293, 126580 101266, 126656 102080, 126517 103083, 126639 104050, 126508 104898, 126598 106135, 126540 106737, 126577 108014, 126471 109066, 126463 109660, 126586 110636, 126586 110637, 126644 111017, 126620 111612, 126623 112385, 126629 112391, 127290 112391, 127290 113789, 127043 113789, 127037 113795, 127037 114097, 127043 114103, 127290 114104, 127290 114159, 127043 114160, 127037 114166, 127037 114462, 127043 114468, 127290 114468, 127290 115425, 127043 115424, 127037 115429, 127038 115433, 127289 115795, 127038 116195, 127043 116204, 127290 116200, 127290 117156, 127043 117156, 127037 117162, 127037 117457, 127043 117463, 127290 117464, 127290 117520, 127043 117520, 127037 117526, 127037 117833, 127043 117839, 127290 117840, 127290 119233, 120514 119233, 120508 119239, 120508 126033, 120248 125720, 120240 125719, 120237 125724, 120235 126046, 119619 126042, 119615 125700, 119609 125694, 119477 125686, 119471 125692, 119469 126039, 119370 126043, 119370 125698, 119364 125692, 119226 125688, 119220 125694, 119215 126046, 118221 126041, 118221 123016, 118293 123016, 118299 123010, 118299 122013, 118293 122007, 118221 122006, 118221 119650, 118293 119649, 118299 119643, 118299 119309, 118293 119303, 118221 119303, 118222 118862, 118292 118871, 118299 118865, 118299 118051, 118293 118045, 118221 118046, 118221 115882, 118217 115876, 117796 115734, 117788 115739, 117780 115797, 117155 115655, 117180 115551, 117175 115544, 117022 115508, 117015 115513, 117003 115618, 116029 115391, 116034 115289, 116029 115283, 115914 115256, 115907 115262, 115900 115360, 115224 115210, 115206 115092, 115200 115087, 115194 115093, 115187 115201, 113211 114744, 113353 113598, 113515 113613, 113522 113608, 113517 113601, 113349 113562, 113372 113377, 113538 113415, 113545 113409, 113549 113360, 113544 113354, 113380 113315, 113436 112812, 113605 112850, 113612 112845, 113628 112704, 113624 112697, 113457 112649, 113465 112534, 113635 112576, 113642 112571, 113677 112313, 113672 112306, 113504 112267, 113552 111806, 113757 111851, 113764 111847, 113759 111839, 113555 111790, 113609 111331, 115799 111831, 115782 111935, 115787 111942, 116275 112053, 116282 112048, 116302 111946, 116479 111990, 116472 112096, 116477 112102, 116855 112185, 116862 112180, 116872 112073, 118319 112412, 118300 112496, 118306 112503, 118985 112541, 118792 114128, 118792 114130, 118795 114160, 118675 115090, 118681 115097, 119195 115090, 119186 115443, 119192 115449, 119302 115451, 119308 115445, 119308 114981, 119563 114983, 119569 114977, 119569 114623, 119564 114617, 119374 114585, 119563 114585, 119569 114579, 119569 114282, 119563 114276, 119308 114275, 119308 113773, 119563 113773, 119569 113767, 119569 113559, 119563 113553, 119308 113553, 119308 113446, 119563 113445, 119569 113439, 119569 113279, 119563 113273, 119308 113274, 119308 112936, 119563 112936, 119569 112930, 119569 112766, 119563 112760, 119308 112747, 119308 112391, 121064 112391, 121070 112385, 121070 111017, 121064 111011, 120339 111003, 120339 110935, 120528 110934, 120534 110930, 120595 110790, 120589 110782, 120339 110782, 120339 110529, 120589 110528, 120595 110522, 120595 110142, 120589 110136, 120339 110135, 120339 109516, 120589 109515, 120595 109509, 120595 109302, 120589 109296, 120339 109296, 120339 108103, 120589 108103, 120595 108097, 120595 107528, 120589 107522, 120108 107522, 120109 106516, 120333 106516, 120339 106510, 120368 105670, 120362 105664, 120108 105663, 120108 103972, 120362 103971, 120368 103965, 120368 103883, 120362 103877, 120108 103878, 120108 103535, 120362 103535, 120368 103529, 120368 103424, 120362 103418, 120108 103417, 120108 102684, 120445 102684, 120450 102682, 120710 102377, 120709 102369, 120705 102367, 120451 102367, 120451 100763, 120705 100762, 120711 100756, 120711 100584, 120705 100578, 120451 100578, 120451 100249, 120705 100248, 120711 100242, 120711 100078, 120705 100072, 120451 100072, 120451 97825, 120445 97819, 120225 97819, 120225 94918, 120475 94918, 120481 94912, 120481 94307, 120475 94301, 120225 94303, 120225 92975, 120333 92975, 120339 92969, 120339 90006, 120334 90000, 119658 89826, 119508 89550, 119501 89547, 119498 89550, 119350 89866, 118706 89695, 118706 89429, 118701 89423, 118321 89327, 118314 89333, 118315 89593, 117453 89371, 117451 89106, 117446 89100, 117439 89106, 117433 89366, 117299 89321, 117286 89060, 117282 89054, 116903 88954, 116895 88960, 116889 89225, 115928 88974, 115782 88581, 115773 88578, 115624 88657, 115159 88533, 115158 88272, 115154 88266, 114924 88206, 114916 88212, 114919 88474, 114399 88334, 114402 88074, 114397 88068, 114276 88041, 114269 88047, 114266 88302, 113590 88128, 113590 87864, 113585 87858, 113448 87835, 113441 87841, 113440 88075, 113253 88039, 113248 87775, 113243 87769, 112999 87709, 112992 87715, 112989 87975, 112194 87762, 112048 87608, 112039 87609, 111894 87925, 111534 87833, 111531 87566, 111526 87560, 111376 87522, 111369 87528, 111365 87780, 111037 87686, 111042 87439, 111038 87433, 110882 87392, 110874 87398, 110867 87657, 110653 87601, 110652 87340, 110648 87334, 110520 87295, 110512 87301, 110510 87566, 109960 87422, 109960 87159, 109956 87153, 109704 87084, 109696 87090, 109693 87353, 109622 87333, 109619 87069, 109614 87063, 109257 86971, 109250 86977, 109247 87237, 108474 87038, 108319 86640, 108321 85961, 108317 85955, 108276 85943, 108272 83803, 108420 83605, 110132 84051, 110137 84304, 110142 84310, 110149 84304, 110156 84055, 110917 84255, 110954 84526, 110960 84531, 110966 84525, 110968 84268, 111843 84496, 111991 84768, 111998 84771, 112001 84768, 112148 84458, 112781 84618, 112782 84885, 112787 84891, 113161 84984, 113168 84978, 113168 84722, 114017 84941, 114053 85218, 114059 85223, 114065 85217, 114063 84952, 114204 84994, 114203 85253, 114207 85259, 114567 85354, 114575 85348, 114574 85084, 115572 85343, 115717 85738, 115726 85741, 115877 85663, 116339 85795, 116335 86038, 116340 86044, 116574 86097, 116581 86091, 116581 85847, 117101 85978, 117099 86240, 117103 86246, 117225 86284, 117233 86278, 117231 86018, 117913 86194, 117915 86456, 117920 86462, 118053 86495, 118060 86489, 118061 86230, 118249 86281, 118255 86545, 118259 86551, 118500 86619, 118508 86613, 118507 86348, 119303 86552, 119455 86713, 119464 86711, 119606 86394, 119971 86487, 119967 86752, 119972 86758, 120127 86797, 120134 86791, 120133 86529, 120455 86616, 120457 86739, 120463 86745, 120623 86748, 120629 86742, 120632 86661, 120704 86677, 120711 86671, 120711 86560, 120705 86554, 120451 86558, 120451 86218, 120705 86220, 120711 86214, 120711 85908, 120705 85902, 120451 85906, 120451 85661, 120705 85661, 120711 85655, 120711 85464, 120705 85458, 120451 85454, 120451 85065, 120705 85064, 120711 85058, 120711 84740, 120705 84734, 120451 84736, 120451 84629, 120705 84627, 120711 84621, 120711 84441, 120705 84435, 120458 84436, 120451 83756, 120705 83758, 120711 83752, 120711 83445, 120705 83439, 120451 83442, 120451 83261, 120445 83255, 120225 83255, 120225 82211, 120475 82209, 120481 82203, 120480 81454, 120474 81448, 120225 81447, 120225 80000, 120445 80004, 120451 79998, 120451 79882, 120445 79876, 120225 79876, 120225 78608, 120445 78605, 120451 78599, 120451 78453, 120445 78447, 120225 78446, 120225 78410, 120445 78410, 120451 78404, 120451 77298, 120672 77297, 120678 77289, 120426 76693, 121064 76692, 121070 76686, 121070 73548, 121064 73542, 119308 73541, 119308 72955, 119563 72957, 119569 72951, 119569 72700, 119563 72694, 119308 72694, 119308 72441, 119563 72444, 119569 72438, 119569 72326, 119563 72320, 119308 72319, 119308 70131, 127290 70131) (125639 111254, 125574 111562, 125574 111564, 125639 111922, 125645 111927, 125651 111921, 125651 111255, 125646 111249) (125639 107979, 125467 108647, 125467 108650, 125639 109048, 125647 109052, 125651 109046, 125651 107980, 125646 107974) (125640 103498, 125489 103765, 125489 103771, 125640 104058, 125647 104061, 125651 104055, 125651 103501, 125646 103495) (120967 90172, 120967 92963, 120776 92963, 120770 92969, 120770 97825, 120776 97831, 120997 97831, 120997 102678, 121003 102684, 121064 102684, 121070 102678, 121070 90200, 121066 90194, 120975 90166) (125639 93577, 125521 94029, 125522 94034, 125640 94256, 125647 94259, 125651 94253, 125651 93579, 125646 93573) (125639 89557, 125489 90129, 125489 90133, 125639 90540, 125646 90544, 125651 90538, 125651 89559, 125646 89553) (125639 84375, 125464 84970, 125464 84972, 125482 85263, 125483 85943, 125506 86233, 125394 86918, 125394 86920, 125420 87208, 125442 87893, 125438 88188, 125438 88189, 125639 88721, 125646 88725, 125651 88719, 125651 84377, 125646 84371) (125639 81031, 125592 81362, 125605 82042, 125490 82336, 125490 82340, 125639 82764, 125646 82768, 125651 82762, 125651 81032, 125646 81026)), ((133160 117222, 133497 117540, 134001 117977, 135242 118878, 135243 118879, 135886 119204, 136877 119957, 137371 120469, 137383 120620, 137127 121210, 136608 121986, 135614 122753, 135212 122990, 134052 123994, 132964 124688, 131433 126003, 130368 123404, 130361 122317, 130360 122314, 130258 122133, 130244 121832, 130244 121830, 130116 121463, 130106 121461, 128811 122755, 127988 121932, 131000 118928, 131001 118927, 131367 118328, 132002 117447, 132424 117143, 132806 117046)), ((173001 106432, 172901 106683, 172908 106691, 173144 106663, 173149 106659, 173217 106431, 173457 106433, 173379 106682, 173385 106690, 173530 106696, 173536 106692, 173612 106435, 174122 106434, 174207 106445, 174817 106453, 174739 106705, 174745 106713, 175220 106710, 175226 106706, 175301 106453, 176045 106469, 175997 106642, 176001 106650, 176009 106646, 176065 106457, 176814 106478, 175733 110127, 175566 110109, 175559 110113, 175446 110495, 175452 110503, 175621 110498, 175556 110712, 175393 110699, 175387 110703, 175349 110820, 175353 110701, 175348 110695, 174531 110486, 174526 110488, 174234 110769, 174106 110115, 174100 110110, 173697 110114, 173694 110115, 173418 110270, 173258 110160, 173268 109657, 173267 109654, 173208 109565, 173201 109562, 172928 109645, 172925 109648, 172863 109736, 172498 109618, 172450 109147, 172448 109143, 172321 109040, 172316 109039, 171603 109106, 171281 109027, 171118 108767, 171113 108764, 171009 108771, 170683 108585, 170932 107736, 170952 107691, 171327 106408)), ((203706 94221, 205206 94725, 205208 94725, 205770 94754, 206543 94904, 206896 94930, 207648 95049, 208116 95175, 209084 95347, 209153 95631, 208206 97880, 207967 98325, 207598 99150, 206823 100343, 206822 100344, 206770 100479, 206773 100486, 206779 100486, 208023 99767, 209219 99091, 210762 98244, 211337 99195, 210383 100078, 210382 100085, 210386 100088, 210951 100151, 211142 100463, 211082 100937, 210794 101544, 210636 101745, 210250 102310, 209606 103017, 209408 103252, 208815 103842, 207624 101866, 207616 101864, 207255 102096, 206774 101837, 206397 101395, 206351 101139, 206345 101134, 206340 101137, 206108 101593, 206108 101599, 206386 102016, 206393 102525, 206441 102819, 206365 103319, 206339 104057, 206213 104935, 206118 105046, 206117 105050, 206143 108401, 205930 108925, 205477 108566, 203557 107317, 202864 106733, 202462 106436, 201893 105908, 200693 104824, 200605 104488, 201065 104171, 201776 103630, 202413 103204, 202717 103036, 203360 102573, 203754 102368, 205018 101221, 205497 101011, 205607 101065, 205615 101063, 205616 101058, 205377 100495, 204302 98164, 204300 98162, 203979 97823, 203700 97349, 203368 96703, 202992 96129, 202984 96001, 202983 95999, 202776 95534, 202929 94534, 203179 94251, 203378 94197)), ((134377 86878, 134263 87029, 134264 87037, 134273 87037, 134390 86888, 134867 87240, 134775 87364, 134776 87373, 135070 87597, 135079 87596, 135171 87470, 135251 87531, 135161 87650, 135162 87659, 135318 87773, 135327 87772, 135416 87654, 135946 88054, 135883 88189, 135885 88197, 135893 88196, 135986 88071, 137430 89156, 136425 90502, 136319 90418, 136310 90419, 136247 90503, 136248 90512, 136355 90595, 135977 91102, 135868 91024, 135859 91025, 135799 91105, 135800 91114, 135907 91199, 135410 91868, 135303 91781, 135294 91782, 135221 91880, 135222 91889, 135332 91974, 134535 93041, 133556 92326, 132107 91240, 132068 91219, 130992 90411, 131343 90174, 131344 90164, 131236 90086, 132134 88878, 132243 88959, 132252 88958, 132559 88550, 132558 88542, 132502 88481, 132566 88529, 132575 88528, 132920 88062, 132919 88053, 132810 87969, 133893 86519)), ((100555 70099, 100022 70097, 99795 70036, 99787 70042, 99790 70097, 99424 70097, 99393 69884, 99387 69879, 99381 69885, 99380 70101, 99278 70101, 99278 69885, 99272 69879, 99065 69879, 99059 69885, 99058 70101, 98891 70095, 98890 69885, 98884 69879, 98580 69879, 98574 69885, 98574 70101, 98434 70095, 98433 69885, 98427 69879, 97967 69879, 97961 69885, 97960 70101, 97864 70101, 97864 69885, 97858 69879, 97513 69879, 97507 69885, 97508 70101, 96282 70098, 96282 67772, 96417 67752, 96422 67746, 96416 67740, 96282 67740, 96282 67327, 96416 67326, 96422 67320, 96422 67253, 96416 67247, 96282 67248, 96282 66213, 96416 66212, 96422 66206, 96422 65893, 96416 65887, 96282 65887, 96282 65685, 96416 65685, 96422 65679, 96422 65160, 96416 65154, 96280 65154, 96297 64228, 96444 64222, 96450 64217, 96444 64210, 96280 64211, 96276 63271, 97847 63266, 97847 63480, 97853 63486, 98330 63486, 98336 63480, 98338 63268, 98407 63269, 98407 63480, 98413 63486, 98864 63486, 98870 63480, 98871 63266, 100140 63272, 100135 63483, 100144 63488, 100554 63264))) \ No newline at end of file diff --git a/stress_benchmark/resources/027.settings b/stress_benchmark/resources/027.settings new file mode 100644 index 0000000000..bfb55d304d --- /dev/null +++ b/stress_benchmark/resources/027.settings @@ -0,0 +1,632 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=2 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.15 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=40 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=11 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.3 +raft_acceleration=3500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +wipe_hop_enable=True +zig_zaggify_support=True +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=0.5 +cool_min_speed=6 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +material_print_temperature=215 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=1500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=0.6 +infill_sparse_thickness=0.15 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_none +jerk_wall_x=50.0 +infill=0 +coasting_speed=90 +bridge_skin_density=80 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=3500 +speed_travel=150 +layer_0_z_overlap=0.125 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.3 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.04 +wipe_retraction_speed=45 +retraction_amount=6.5 +bridge_skin_density_2=100 +support_tower_diameter=3.0 +jerk_skirt_brim=30 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=2.85 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=30 +raft_surface_fan_speed=100 +default_material_bed_temperature=60 +speed_ironing=20 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3500 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +skin_angles=[] +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.8 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3500 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=True +support_xy_distance=0.7 +speed_wall=100 +bottom_thickness=1 +raft_interface_jerk=50.0 +material_shrinkage_percentage=100.3 +support_interface_wall_count=1 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.08 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=230 +brim_gap=0.14500000000000002 +acceleration_support_infill=2000 +support_meshes_present=False +travel_avoid_distance=3 +raft_interface_speed=57.5 +jerk_prime_tower=50.0 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=30.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150 +acceleration_topbottom=3500 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=100 +skin_overlap=20 +print_sequence=all_at_once +infill_overlap=0 +support_interface_material_flow=95.0 +skin_material_flow_layer_0=95 +bridge_skin_material_flow_2=95.0 +speed_support_interface=20 +machine_max_acceleration_x=9000 +support_interface_height=0.3 +skirt_height=3 +support_roof_pattern=zigzag +support_mesh=False +inset_direction=outside_in +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=100 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=45 +material_print_temperature_layer_0=215 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=50.0 +machine_max_feedrate_e=45 +retraction_enable=True +support_line_distance=0.5 +extruder_prime_pos_abs=True +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=1 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3500 +interlocking_orientation=22.5 +speed_wall_0_roofing=30 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1.0 +infill_line_distance=0.4 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=30.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=45 +raft_base_speed=15 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=30 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=1.3 +bridge_skin_speed=30 +skirt_brim_material_flow=100 +acceleration_support_roof=1500 +support_roof_offset=0.8 +travel_retract_before_outer_wall=False +machine_height=300 +prime_tower_base_size=3 +infill_enable_travel_optimization=False +speed_support_infill=25 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=2 +jerk_wall_0=30 +mold_angle=40 +raft_speed=15 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=40 +acceleration_support=2000 +cool_min_temperature=205 +jerk_layer_0=30 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=1 +acceleration_enabled=True +prime_tower_base_height=0.15 +fill_outline_gaps=True +meshfix_maximum_resolution=0.7 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=1.9 +raft_interface_line_spacing=0.8 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=6 +support_join_distance=2.0 +wipe_hop_amount=2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=300 +machine_width=330 +extruder_prime_pos_y=6 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=115 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=True +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.6000000000000001 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=110.00000000000001 +quality_name=Normal +material_final_print_temperature=200 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.93 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=False +acceleration_skirt_brim=1500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=no_outer_surfaces +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=100 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=100 +roofing_layer_count=1 +speed_slowdown_layers=1 +default_material_print_temperature=215 +conical_overhang_angle=50 +infill_overlap_mm=0 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=1 +wall_distribution_count=1 +raft_airgap=0.25 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=100 +lightning_infill_straightening_angle=40 +speed_topbottom=100 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=False +material_maximum_park_duration=7200 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=45 +machine_max_jerk_z=0.4 +support_tree_angle=45 +expand_skins_expand_distance=0.8 +prime_tower_position_y=213.2 +mesh_position_x=0 +cross_infill_pocket_size=0.4 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=25 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=1500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=2 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +raft_surface_acceleration=3500 +minimum_support_area=0.0 +brim_width=7 +small_skin_width=4 +shell=0 +jerk_print=50.0 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=15 +z_seam_x=0.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=95.0 +acceleration_wall=3500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=95.0 +support_interface_pattern=zigzag +initial_bottom_layers=7 +bridge_fan_speed_2=100 +support_use_towers=True +support_extruder_nr=1 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=1500 +retraction_hop_enabled=True +layer_start_y=228.0 +extruder_prime_pos_x=-3 +build_volume_temperature=24 +retraction_retract_speed=45 +zig_zaggify_infill=True +extruder_prime_pos_z=2 +support_tower_roof_angle=0 +prime_tower_position_x=305 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=7 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.8 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.3 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=1 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=zigzag +material_alternate_walls=False +material_break_preparation_speed=50 +acceleration_support_bottom=100 +material_end_of_filament_purge_length=20 +speed_print=100 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3500 +carve_multiple_volumes=True +raft_surface_thickness=0.15 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=2142.8571428571427 +speed_equalize_flow_width_factor=110.0 +wipe_brush_pos_x=100 +jerk_wall_0_roofing=30 +skin_material_flow=95.0 +support_bottom_density=100 +bridge_skin_density_3=100 +support_interface_enable=True +support_roof_wall_count=1 +infill_sparse_density=100 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=50 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=95.0 +speed_print_layer_0=45 +raft_jerk=50.0 +speed_support=25 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=50.0 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=False +jerk_support_bottom=20 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=1000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1.0 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=30 +support_infill_extruder_nr=1 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +support_bottom_pattern=zigzag +support_roof_height=0.3 +gradual_support_infill_steps=2 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1 +min_skin_width_for_expansion=6.429395695523605e-17 +wall_x_material_flow=100 +infill_material_flow=95.0 +ironing_monotonic=False +retraction_extrusion_window=1 +support_fan_enable=False +infill_wipe_dist=0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=1500 +material_shrinkage_percentage_z=100.3 +material_guid=03f24266-0291-43c2-a6da-5211892a2699 +support_roof_line_distance=0.4 +brim_line_count=18 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=1500 +wall_transition_angle=10 +top_thickness=1 +machine_center_is_zero=False +extruders_enabled_count=2 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.8 +bridge_wall_speed=30 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=50.0 +wall_transition_filter_distance=100 +raft_interface_fan_speed=50.0 +bridge_wall_coast=0 +skirt_line_count=1 +infill_mesh=False +layer_height=0.15 +material_break_preparation_retracted_position=-14 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=150 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=95.0 +machine_max_feedrate_y=300 +alternate_carve_order=True +jerk_roofing=30 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +acceleration_prime_tower=2000 +retraction_hop_after_extruder_switch_height=2 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=2 +xy_offset_layer_0=-0.095 +skirt_brim_extruder_nr=-1 +z_seam_relative=True +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=205 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=3500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=80 +material_shrinkage_percentage_xy=100.3 +bridge_skin_material_flow=95.0 +raft_base_jerk=50.0 +speed_wall_x=100 +time=10:26:42 +machine_buildplate_type=glass +top_layers=7 +machine_gcode_flavor=Griffin +roofing_angles=[] +jerk_ironing=50.0 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.22499999999999998 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=55 +support_bottom_extruder_nr=1 +speed_support_roof=20 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=3000 +speed_roofing=45 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=20 +material_bed_temp_wait=True +machine_depth=240 +bridge_wall_material_flow=100 +jerk_travel=50.0 +retraction_speed=45 +xy_offset=-0.015 +print_temperature=200 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=50.0 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=120.0 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=45 +raft_surface_speed=100 +material_name=empty +acceleration_wall_0=1500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=50.0 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/027.wkt b/stress_benchmark/resources/027.wkt new file mode 100644 index 0000000000..026926c0a1 --- /dev/null +++ b/stress_benchmark/resources/027.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((165176 119605, 165191 119612, 165809 119528, 165814 119526, 166113 119374, 165603 119864, 165598 119875, 165593 120336, 165253 120350, 165240 120359, 165003 120937, 165002 120942, 164985 121273, 164816 120588, 164809 120579, 164413 120346, 164568 120044, 164567 120028, 164186 119536, 164182 119532, 163901 119349, 164580 119545, 164591 119544, 164992 119317))) \ No newline at end of file diff --git a/stress_benchmark/resources/028.settings b/stress_benchmark/resources/028.settings new file mode 100644 index 0000000000..b8537c9277 --- /dev/null +++ b/stress_benchmark/resources/028.settings @@ -0,0 +1,631 @@ +material_bed_temperature=60 +support_tree_rest_preference=buildplate +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=1.6 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=8 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=zigzag +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=1 +raft_acceleration=3000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=False +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.1 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.6666666666666665 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100.0 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=220 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=4.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=50 +acceleration_support_interface=3000 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0.3 +acceleration_wall_x_roofing=3000 +speed_travel=120 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=25 +retraction_amount=6.5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=30.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=20.0 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3000 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.7 +speed_wall=30.0 +bottom_thickness=0.8 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.1 +small_feature_max_length=0.0 +wall_line_count=4 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=220 +brim_gap=0 +acceleration_support_infill=3000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=22.5 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=30.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=120 +acceleration_topbottom=3000 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=60 +skin_overlap=25 +print_sequence=all_at_once +infill_overlap=0 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=40.0 +machine_max_acceleration_x=9000 +support_interface_height=1 +skirt_height=3 +support_roof_pattern=concentric +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=60.0 +material_print_temperature_layer_0=220 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=2.6666666666666665 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=False +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3000 +interlocking_orientation=22.5 +speed_wall_0_roofing=30.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=1.6 +minimum_bottom_area=1.0 +infill_line_distance=0.4 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=33.333333333333336 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=50 +raft_base_speed=22.5 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=50 +skirt_brim_material_flow=100 +acceleration_support_roof=3000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=900 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=60 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=25 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=1 +jerk_wall_0=20 +mold_angle=40 +raft_speed=30.0 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=3000 +cool_min_temperature=220 +jerk_layer_0=20 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=5 +support_join_distance=2.0 +wipe_hop_amount=1 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=450 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=25 +roofing_pattern=zigzag +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +quality_name=Coarse +material_final_print_temperature=220 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=3000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=no_outer_surfaces +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=True +cool_fan_speed_min=100.0 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=50 +roofing_layer_count=1 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.1 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=50 +lightning_infill_straightening_angle=40 +speed_topbottom=30.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=False +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=30.0 +machine_max_jerk_z=0.4 +support_tree_angle=50 +expand_skins_expand_distance=1.6 +prime_tower_position_y=280.575 +mesh_position_x=0 +cross_infill_pocket_size=0.4 +interlocking_enable=False +support_tree_top_rate=10 +wall_line_width_0=0.4 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=3000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=3000 +minimum_support_area=0.0 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=20 +adhesion_type=brim +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=0 +z_seam_x=225.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=3000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=concentric +initial_bottom_layers=5 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=3000 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=25 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=440.575 +bridge_wall_min_length=3.0 +experimental=0 +bottom_layers=5 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=buildplate +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=zigzag +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=3000 +material_end_of_filament_purge_length=20 +speed_print=60 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3000 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100.0 +acceleration_travel_layer_0=5000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=20 +skin_material_flow=100 +support_bottom_density=100 +bridge_skin_density_3=80 +support_interface_enable=False +support_roof_wall_count=0 +infill_sparse_density=100 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=30.0 +raft_jerk=20 +speed_support=60 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=20 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=1.6 +acceleration_ironing=3000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=60 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=25 +support_bottom_pattern=concentric +support_roof_height=1 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=6.123233995736766e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=6.5 +support_fan_enable=False +infill_wipe_dist=0.1 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=3000 +material_shrinkage_percentage_z=100.0 +material_guid=4f14d5fb-3b32-4bc4-adc2-e83693b02d69 +support_roof_line_distance=0.4 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=3000 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=50 +support_roof_enable=False +alternate_extra_perimeter=False +remove_empty_first_layers=False +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=0.0 +skirt_line_count=1 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=60.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.32 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=False +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=zigzag +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +machine_name=Unknown +acceleration_prime_tower=3000 +retraction_hop_after_extruder_switch_height=1 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=220 +material_break_retracted_position=-50 +slicing_tolerance=exclusive +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=False +dual=0 +raft_interface_acceleration=3000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=95 +raft_base_jerk=20 +speed_wall_x=60.0 +time=10:42:02 +machine_buildplate_type=glass +top_layers=5 +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=1.6 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=900 +support_bottom_extruder_nr=0 +speed_support_roof=40.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=30.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=40.0 +material_bed_temp_wait=True +machine_depth=310 +bridge_wall_material_flow=95 +jerk_travel=30 +retraction_speed=25 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=310 +bottom_skin_expand_distance=1.6 +infill_support_angle=40 +speed_layer_0=30.0 +raft_surface_speed=30.0 +material_name=empty +acceleration_wall_0=3000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/028.wkt b/stress_benchmark/resources/028.wkt new file mode 100644 index 0000000000..f412731098 --- /dev/null +++ b/stress_benchmark/resources/028.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((302030 234958, 302026 234978, 302005 234946)), ((302414 234417, 302456 234464, 302244 234612, 302232 234624, 302254 234461, 302238 234162)), ((302610 234480, 302659 234533, 302572 234595, 302456 234464, 302497 234436, 302561 234409)), ((304291 234278, 304213 234268, 304209 234256)), ((303386 234037, 303762 234137, 303742 234134, 303322 234200, 303292 234178, 302566 233851)), ((261951 233033, 261878 233014, 261873 233007, 261913 232965)), ((262907 232282, 262967 232628, 262960 232632, 262400 232746, 262069 232713, 261974 232459, 261695 232330, 261767 232262, 261783 232237, 262224 232153, 262682 231886, 262912 231700)), ((261976 232704, 262069 232713, 262077 232734, 261867 232713, 261836 232635)), ((263149 232614, 263148 232634, 262998 232699, 262943 232710, 262943 232707, 263148 232615, 262970 232644, 262967 232628, 263142 232543)), ((261348 232329, 261441 232372, 261502 232439, 261348 232329, 261314 232313, 261317 232307)), ((261783 232237, 261655 232261, 261624 232297, 261615 232293, 261479 232148, 261491 232138, 261896 232053)), ((299479 230332, 299507 230343, 299507 230350, 299403 230309)), ((299508 79655, 299479 79666, 299438 79678, 299508 79652)), ((262957 77366, 262964 77370, 262906 77716, 262914 78301, 262683 78114, 262224 77843, 261781 77760, 261767 77737, 261649 77624, 261695 77513, 262043 77288, 262396 77252)), ((261658 77737, 261781 77760, 261894 77945, 261600 77885, 261615 77705, 261620 77693)), ((262054 77281, 262043 77288, 261974 77295, 261619 77469, 261578 77532, 261557 77500, 261619 77469, 261665 77400, 261834 77290, 262061 77267)), ((263124 77377, 263123 77447, 262964 77370, 262969 77342, 262951 77331)), ((262992 77297, 263124 77354, 263124 77373, 263147 77383, 263124 77377, 263124 77373, 262944 77291, 262944 77287)), ((262946 77330, 262946 77335, 262861 77308)), ((303745 75860, 303776 75856, 303387 75956, 302604 76139, 303293 75819, 303316 75802)), ((302460 75532, 302421 75575, 302239 75837, 302255 75537, 302228 75340)), ((304210 75744, 304213 75732, 304293 75722)), ((302660 75466, 302618 75511, 302565 75588, 302495 75561, 302460 75532, 302573 75405)), ((302030 75040, 302005 75052, 302026 75021)), ((261929 231714, 261987 231728, 262024 231737, 261965 231743, 261964 231744)), ((250196 167964, 249781 166859, 249410 165810, 249081 164806, 248793 163847, 248543 162928, 248439 162511, 262246 162511, 262246 168087, 250245 168087)), ((305216 72882, 305560 73066, 305700 73216, 305897 73538, 306025 73910, 306110 74342, 306156 75147, 306100 75885, 305989 76355, 305715 76779, 305339 76921, 304832 76999, 304294 77123, 304267 77144, 304080 77197, 303969 77285, 303697 77688, 303528 78403, 303414 79639, 303369 80568, 303339 81658, 303323 82898, 303325 84270, 303369 86547, 303397 87358, 303528 89914, 303591 90804, 303668 91710, 303854 93596, 304101 95597, 304408 97735, 304779 100038, 305211 102530, 306306 108720, 306487 109788, 307077 113114, 307393 114843, 307734 116601, 307905 117411, 308096 118380, 308491 120165, 308913 121954, 309364 123737, 309834 125506, 310319 127258, 310813 128987, 312343 134172, 313076 136688, 313419 137910, 314054 140279, 314339 141436, 314606 142579, 314850 143690, 315071 144790, 315270 145874, 315445 146948, 315600 148007, 315798 149673, 315895 150763, 315971 151836, 316025 152897, 316055 153951, 316066 155001, 316056 156050, 316026 157103, 315972 158163, 315899 159238, 315800 160328, 315672 161438, 315523 162570, 315342 163732, 315128 164926, 314883 166156, 314606 167431, 314341 168572, 314053 169732, 313415 172123, 313070 173356, 310757 181334, 309795 184805, 309319 186608, 308844 188503, 308440 190211, 308048 191988, 307688 193743, 307350 195468, 307020 197265, 305399 206425, 304634 210849, 304318 212884, 304177 213866, 303972 215419, 303855 216403, 303735 217578, 303582 219329, 303523 220188, 303395 222678, 303368 223473, 303325 225730, 303323 227102, 303339 228345, 303369 229447, 303415 230384, 303515 231442, 303696 232309, 303969 232714, 304079 232800, 304253 232843, 304293 232874, 304846 233003, 305339 233077, 305714 233219, 305988 233642, 306101 234115, 306157 234852, 306111 235657, 306025 236088, 305896 236459, 305699 236782, 305560 236932, 305216 237117, 304835 237208, 304239 237208, 302574 236772, 301388 236477, 301232 236389, 300898 236109, 300621 235716, 300542 235522, 300465 235050, 300404 234233, 300146 233851, 299741 233580, 299454 233446, 299403 233412, 298276 232989, 296892 232594, 296145 232401, 294585 232023, 292872 231635, 291692 231379, 289967 231021, 288559 230741, 287192 230491, 285869 230262, 284591 230057, 283361 229876, 282181 229725, 281049 229604, 279970 229519, 278939 229465, 277941 229438, 277759 229440, 277753 229440, 276812 229450, 275737 229502, 275048 229557, 274219 229649, 273422 229764, 272629 229903, 271914 230058, 271196 230236, 270499 230430, 269819 230644, 269273 230830, 268608 231079, 267813 231406, 267049 231756, 266203 232196, 265990 232357, 265887 232417, 265332 232837, 265209 233013, 265059 233419, 265036 234114, 264979 234392, 264857 234696, 264634 235032, 264177 235377, 263873 235517, 263334 235629, 262603 235728, 262046 235760, 261408 235740, 260889 235690, 260723 235616, 260343 235428, 260134 235267, 259792 234815, 259562 234352, 259380 233797, 259269 233264, 259181 232697, 259113 232069, 259074 231561, 259016 230110, 259004 228898, 259019 227750, 259041 226885, 259099 225548, 259181 224640, 259274 224177, 259396 224038, 259698 224941, 259733 225006, 260028 226214, 260202 226811, 260392 227378, 260616 227890, 260905 228396, 261193 228637, 261323 228675, 261482 228422, 261563 228144, 261683 227331, 261746 226527, 261789 225624, 261826 224293, 261851 222906, 261879 218451, 261871 215290, 261836 212973, 261804 211948, 261757 210868, 261691 209746, 261598 208543, 261478 207374, 261315 206101, 261104 204760, 260825 203337, 260468 201827, 260035 200241, 259521 198591, 258935 196896, 258288 195182, 257604 193474, 256880 191776, 256141 190108, 255388 188464, 253865 185263, 249426 176269, 248752 174867, 248111 173501, 247507 172176, 246950 170896, 246435 169668, 245966 168488, 245553 167371, 245176 166292, 244841 165262, 244549 164268, 244287 163311, 244066 162387, 243870 161495, 243710 160626, 243573 159781, 243460 158954, 243370 158145, 243301 157347, 243254 156559, 243228 155776, 243218 155001, 243229 154221, 243256 153438, 243302 152651, 243371 151852, 243462 151043, 243574 150218, 243711 149371, 243867 148549, 244066 147611, 244291 146686, 244550 145729, 244847 144738, 245180 143706, 245554 142627, 245982 141486, 246438 140330, 246950 139104, 247511 137822, 248115 136498, 249429 133729, 250130 132296, 252346 127832, 253868 124737, 254631 123148, 255390 121532, 256143 119889, 256889 118205, 257607 116522, 258294 114814, 258938 113103, 259524 111405, 260036 109754, 260471 108169, 260824 106661, 261103 105239, 261317 103895, 261479 102623, 261602 101406, 261708 99998, 261807 98046, 261837 97000, 261871 94990, 261879 91213, 261850 87057, 261827 85704, 261794 84484, 261747 83470, 261662 82420, 261525 81647, 261325 81326, 261194 81362, 260906 81601, 260615 82106, 260392 82622, 260201 83187, 260027 83785, 259733 84992, 259698 85057, 259396 85960, 259274 85820, 259181 85358, 259098 84451, 259040 83114, 259018 82250, 259004 81100, 259011 80104, 259061 78666, 259113 77929, 259182 77301, 259268 76736, 259387 76177, 259561 75647, 259729 75291, 260122 74745, 260153 74715, 260341 74571, 260866 74311, 261407 74258, 262046 74239, 262609 74271, 263179 74346, 263857 74475, 264177 74623, 264650 74985, 264857 75302, 265017 75700, 265059 76580, 265209 76986, 265329 77159, 265886 77581, 265990 77641, 266195 77797, 267048 78243, 267813 78593, 268607 78920, 269272 79167, 269817 79355, 270497 79567, 271195 79762, 271913 79941, 272653 80097, 273422 80236, 274218 80348, 275047 80440, 275911 80508, 276812 80546, 277398 80553, 277967 80560, 279057 80528, 279970 80480, 281049 80394, 282180 80273, 283361 80122, 284591 79941, 285869 79736, 287192 79508, 288645 79241, 291414 78680, 292898 78358, 294678 77955, 296227 77578, 296892 77405, 298273 77010, 299404 76585, 299412 76580, 299607 76507, 300146 76147, 300403 75767, 300449 75372, 300472 74861, 300543 74475, 300621 74281, 300898 73889, 301233 73608, 301383 73524, 302575 73228, 304239 72792, 304833 72791) (261929 231714, 261815 231869, 261491 232138, 261473 232142, 261479 232148, 261464 232161, 261514 232364, 261537 232399, 261527 232412, 261555 232425, 261580 232463, 261557 232499, 261535 232489, 261503 232440, 261527 232412, 261441 232372, 261397 232324, 261324 232296, 261340 232264, 261464 232161, 261460 232145, 261473 232142, 261454 232121, 261434 232040, 261433 231585, 261202 231130, 261143 231064, 260943 230531, 261123 231113, 261372 231789, 261434 232040, 261434 232100, 261454 232121, 261460 232145, 261313 232176, 261267 232173, 261255 231907, 261235 231842, 261235 231735, 261148 231561, 261235 231842, 261234 232171, 260707 232135, 260500 232146, 260195 232032, 260659 232224, 260839 232270, 260514 232266, 260846 232412, 261315 232529, 261207 233099, 260978 233427, 260959 233960, 261147 233615, 261169 233592, 261165 233955, 261254 233874, 261275 233908, 261585 233447, 261797 233294, 261851 233321, 261931 233281, 262078 233066, 262020 233051, 262384 232996, 262385 232995, 262025 233047, 261913 232965, 261724 232680, 261771 232703, 261867 232713, 261926 232855, 262382 232816, 262475 232788, 262557 232782, 262583 232785, 262839 232732, 262385 232995, 262394 233015, 262556 233386, 262910 233532, 262915 233420, 263131 233508, 263126 232977, 263148 232634, 263928 232297, 264009 232272, 264592 231851, 264957 231443, 265357 230738, 265627 229813, 265721 229181, 265913 229104, 266100 228983, 266701 228705, 267340 228435, 268028 228170, 268512 227998, 269299 227742, 270122 227506, 270978 227290, 271873 227097, 272803 226929, 273771 226788, 274774 226679, 275815 226599, 276892 226553, 277816 226542, 278959 226567, 280151 226631, 281382 226730, 282647 226864, 283937 227027, 285258 227221, 286608 227438, 288091 227699, 289400 227941, 291118 228283, 292176 228505, 294154 228941, 295925 229357, 297482 229751, 298179 229946, 299323 230286, 299323 230339, 299442 231105, 299579 231856, 299709 232345, 300025 233088, 300296 233534, 300712 234052, 301305 234598, 301680 234847, 302102 235029, 302808 235463, 303548 235703, 303554 235704, 303748 235767, 304317 235856, 304836 235961, 304392 235839, 304060 235608, 303624 235362, 303007 234909, 302659 234533, 302674 234522, 303082 234345, 303350 234301, 303775 234619, 304101 234785, 304116 234755, 304296 234865, 304455 234488, 304318 234025, 304030 233437, 303593 232824, 303030 232249, 302406 231755, 301776 231353, 301176 231036, 300591 230769, 299507 230343, 299520 229894, 299471 228916, 299441 227799, 299427 226543, 299436 225160, 299463 223659, 299516 222050, 299604 220352, 299661 219447, 299804 217648, 299894 216704, 299999 215734, 300253 213713, 300560 211563, 300930 209263, 301170 207855, 301828 204138, 302909 198139, 303548 194805, 303904 193073, 304289 191305, 304706 189509, 305157 187694, 305632 185874, 306130 184059, 307164 180480, 307431 179607, 307684 178736, 309375 173174, 310066 170803, 310686 168545, 310964 167452, 311218 166379, 311454 165324, 311664 164286, 311854 163268, 312029 162194, 312165 161267, 312308 160063, 312408 159027, 312482 158007, 312535 156998, 312567 155996, 312577 155001, 312568 154000, 312536 152999, 312483 151991, 312407 150970, 312309 149933, 312185 148879, 312031 147803, 311848 146697, 311634 145556, 311385 144375, 311106 143154, 310793 141885, 310443 140566, 310061 139193, 309381 136884, 307711 131444, 306649 127914, 306174 126251, 305681 124470, 305206 122672, 304755 120864, 304339 119061, 303952 117271, 303592 115506, 303236 113668, 302644 110456, 301573 104465, 300985 101076, 300561 98442, 300344 96958, 300091 95041, 299982 94112, 299800 92300, 299659 90526, 299604 89698, 299520 88038, 299487 87131, 299437 84951, 299427 83561, 299440 82287, 299469 81144, 299521 80105, 299508 79655, 299667 79592, 299817 79536, 300221 79375, 300591 79230, 301176 78964, 301782 78641, 302407 78243, 303023 77755, 303592 77174, 304035 76560, 304319 75974, 304456 75509, 304295 75136, 304114 75245, 304100 75216, 303775 75379, 303330 75713, 303268 75705, 302672 75475, 302660 75466, 303011 75089, 303617 74641, 304057 74392, 304390 74161, 304835 74040, 304314 74144, 303758 74230, 303561 74294, 303558 74294, 302800 74539, 302101 74970, 301684 75151, 301309 75399, 300708 75953, 300297 76464, 300025 76908, 299709 77653, 299511 78397, 299386 79390, 299324 79658, 299324 79712, 298179 80053, 296732 80442, 295714 80693, 294020 81087, 292835 81349, 290841 81770, 289400 82057, 287861 82342, 286607 82560, 285258 82777, 283937 82970, 282646 83135, 281382 83270, 280152 83366, 278959 83431, 277848 83458, 276893 83446, 275816 83400, 274775 83322, 273772 83211, 272804 83069, 271874 82902, 270979 82709, 270123 82494, 269300 82258, 268512 82001, 268033 81832, 267341 81565, 266702 81295, 266101 81017, 265914 80894, 265722 80818, 265658 80316, 265520 79737, 265291 79067, 264957 78554, 264588 78147, 264013 77728, 263927 77701, 263124 77354, 263131 76492, 262915 76579, 262910 76468, 262554 76613, 262397 76981, 262387 77004, 262839 77266, 262578 77214, 262555 77216, 262499 77213, 262382 77182, 261924 77144, 261853 77278, 261834 77290, 261769 77297, 261715 77323, 261904 77034, 261869 76995, 261880 76978, 261956 76954, 261904 77034, 261909 77039, 262035 76947, 262281 76986, 262387 77004, 262386 77003, 262281 76986, 262003 76940, 262072 76918, 261930 76715, 261850 76676, 261802 76706, 261586 76552, 261274 76089, 261252 76122, 261164 76044, 261169 76404, 261148 76382, 260961 76066, 260979 76573, 261206 76901, 261316 77469, 260842 77586, 260521 77727, 260763 77740, 260634 77771, 260475 77844, 260970 77874, 261266 77830, 261254 78095, 261150 78432, 261262 78203, 261294 77826, 261300 77825, 261457 77857, 261371 78209, 261121 78884, 260937 79484, 261203 78868, 261202 78777, 261431 78236, 261583 78083, 261594 77947, 261496 77864, 261457 77857, 261462 77836, 261339 77733, 261318 77692, 261397 77673, 261502 77559, 261317 77691, 261307 77671, 261311 77629, 261362 77596, 261532 77512, 261502 77559, 261536 77598, 261512 77634, 261462 77836, 261496 77864, 261600 77885, 261594 77947, 261811 78129, 261928 78287, 261987 78273, 261965 78258, 262027 78264, 261987 78273, 262471 78615, 263191 79238, 263821 79697, 264400 80082, 264448 80111, 264597 80211, 265106 80514, 265254 80631, 265398 80688, 265516 80758, 265530 80850, 265610 81669, 265674 82772, 265715 83889, 265752 85703, 265768 87402, 265780 90850, 265772 94751, 265736 97143, 265702 98213, 265653 99316, 265585 100463, 265489 101662, 265362 102915, 265197 104237, 264970 105638, 264684 107126, 264304 108745, 263853 110392, 263296 112182, 262634 114092, 261875 116100, 261025 118181, 260125 120263, 259217 122286, 258065 124756, 256995 126990, 253465 134224, 252118 137065, 251506 138403, 250948 139681, 250437 140899, 249970 142057, 249559 143157, 249189 144206, 248865 145195, 248575 146164, 248322 147084, 248104 147968, 247915 148836, 247760 149647, 247627 150451, 247518 151237, 247434 152008, 247367 152768, 247321 153516, 247294 154260, 247284 155001, 247293 155738, 247322 156482, 247368 157233, 247434 157991, 247519 158761, 247626 159549, 247761 160354, 247933 161257, 248102 162032, 248221 162511, 247648 162511, 248072 164408, 248073 168087, 250026 168087, 250431 169099, 250941 170318, 251504 171594, 252113 172933, 252767 174325, 254190 177277, 256994 183015, 258309 185769, 259046 187350, 260121 189733, 261019 191813, 261869 193894, 262631 195905, 263274 197756, 263848 199603, 264309 201286, 264683 202870, 264970 204360, 265197 205762, 265362 207083, 265490 208337, 265585 209535, 265653 210682, 265702 211786, 265737 212856, 265770 214883, 265781 216800, 265767 222819, 265753 224298, 265711 226256, 265668 227372, 265595 228581, 265515 229242, 265310 229337, 265286 229354, 265255 229367, 265128 229467, 264596 229789, 264428 229902, 264401 229918, 263818 230302, 263194 230755, 262829 231086, 262433 231417, 261989 231726, 262091 231654))) \ No newline at end of file diff --git a/stress_benchmark/resources/029.settings b/stress_benchmark/resources/029.settings new file mode 100644 index 0000000000..38caf27106 --- /dev/null +++ b/stress_benchmark/resources/029.settings @@ -0,0 +1,631 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=1.2000000000000002 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=8 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=2 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.6 +raft_acceleration=3000 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=True +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.6666666666666665 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=220 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=50 +acceleration_support_interface=3000 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_inner +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=1.3333333333333333 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=3000 +speed_travel=180 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=4.0 +meshfix_maximum_deviation=0.025 +wipe_retraction_speed=40 +retraction_amount=6.5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=1 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=75.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=60 +speed_ironing=46.666666666666664 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3000 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3000 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.5 +speed_wall=75.0 +bottom_thickness=1.0 +raft_interface_jerk=20 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=15.707963267948966 +wall_line_count=3 +material_print_temp_prepend=False +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=220 +brim_gap=0 +acceleration_support_infill=3000 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=56.25 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=20 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=180 +acceleration_topbottom=3000 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=150 +skin_overlap=10 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=53.333333333333336 +machine_max_acceleration_x=9000 +support_interface_height=0.6 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=150.0 +material_print_temperature_layer_0=220 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=299792458000 +retraction_enable=True +support_line_distance=2.6666666666666665 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3000 +interlocking_orientation=22.5 +speed_wall_0_roofing=75.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=1.2000000000000002 +minimum_bottom_area=1.0 +infill_line_distance=5.333333333333333 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=5 +support_tree_angle_slow=40.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=60 +raft_base_speed=56.25 +raft_remove_inside_corners=False +ironing_only_highest_layer=True +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=35.0 +skirt_brim_material_flow=100 +acceleration_support_roof=3000 +support_roof_offset=0.0 +travel_retract_before_outer_wall=False +machine_height=320 +prime_tower_base_size=4.0 +infill_enable_travel_optimization=False +speed_support_infill=80 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=40 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=60 +retraction_hop=0.3 +jerk_wall_0=10 +mold_angle=40 +raft_speed=75.0 +prime_tower_wipe_enabled=True +support_roof_density=60 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=299792458000 +acceleration_support=3000 +cool_min_temperature=220 +jerk_layer_0=20 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=4 +support_join_distance=2.0 +wipe_hop_amount=0.3 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=299792458000 +machine_width=264 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=40 +roofing_pattern=lines +material_bed_temp_prepend=False +material=0 +infill_before_walls=False +material_standby_temperature=175 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=True +wall_0_material_flow_layer_0=100 +quality_name=Normal +material_final_print_temperature=220 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=3000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=noskin +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=50 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=35.0 +roofing_layer_count=0 +speed_slowdown_layers=5 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.6 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=35.0 +lightning_infill_straightening_angle=40 +speed_topbottom=70 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=25 +machine_max_jerk_z=0.4 +support_tree_angle=60 +expand_skins_expand_distance=1.2000000000000002 +prime_tower_position_y=106.775 +mesh_position_x=0 +cross_infill_pocket_size=5.333333333333333 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=90 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.2 +wall_thickness=1.2000000000000002 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=3000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=3000 +minimum_support_area=0.0 +brim_width=4.0 +small_skin_width=0.8 +shell=0 +jerk_print=20 +adhesion_type=skirt +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=10 +z_seam_x=0.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=3000 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=5 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=3000 +retraction_hop_enabled=True +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=40 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=142.0 +bridge_wall_min_length=1.9 +experimental=0 +bottom_layers=5 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=grid +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=3000 +material_end_of_filament_purge_length=20 +speed_print=150 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=3000 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=5000.0 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=10 +skin_material_flow=100 +support_bottom_density=60 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=15 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=25 +raft_jerk=20 +speed_support=80 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=20 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=1.2000000000000002 +acceleration_ironing=3000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=150 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=40 +support_bottom_pattern=grid +support_roof_height=0.6 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1.0 +min_skin_width_for_expansion=6.123233995736766e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=6.5 +support_fan_enable=False +infill_wipe_dist=0.1 +machine_shape=elliptic +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=3000 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=1.3333333333333333 +brim_line_count=10 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=3000 +wall_transition_angle=10 +top_thickness=1.0 +machine_center_is_zero=True +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=37.5 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=2 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=True +conical_overhang_enabled=False +speed_travel_layer_0=50 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=299792458000 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.2 +machine_extruders_share_nozzle=False +machine_name=Unknown +acceleration_prime_tower=3000 +retraction_hop_after_extruder_switch_height=0.3 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=60 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=220 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=3000 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=15 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=20 +speed_wall_x=150.0 +time=10:51:35 +machine_buildplate_type=glass +top_layers=5 +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=50 +top_skin_preshrink=1.2000000000000002 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=60 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=0 +support_bottom_extruder_nr=0 +speed_support_roof=53.333333333333336 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=4000 +speed_roofing=70 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=53.333333333333336 +material_bed_temp_wait=True +machine_depth=264 +bridge_wall_material_flow=50 +jerk_travel=25 +retraction_speed=40 +xy_offset=0 +print_temperature=220 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=132.0 +bottom_skin_expand_distance=1.2000000000000002 +infill_support_angle=50 +speed_layer_0=25 +raft_surface_speed=75.0 +material_name=empty +acceleration_wall_0=3000 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/029.wkt b/stress_benchmark/resources/029.wkt new file mode 100644 index 0000000000..ba3c3f48af --- /dev/null +++ b/stress_benchmark/resources/029.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((1211 -19762, 662 -10796, 985 -10781, 1537 -10716, 1628 -10701, 2978 -19575, 4683 -19074, 2581 -10513, 2598 -10509, 3105 -10371, 3513 -10238, 6373 -18578, 4683 -19074, 4721 -19228, 6425 -18728, 6373 -18578, 8078 -18077, 4416 -9881, 4574 -9812, 5045 -9579, 5284 -9445, 4882 -8726, 5645 -8253, 6107 -8929, 5948 -9046, 5503 -9323, 5284 -9445, 9666 -17279, 11176 -16344, 6107 -8929, 6795 -8427, 6886 -8350, 6362 -7714, 7027 -7113, 7608 -7701, 7579 -7730, 7196 -8088, 6886 -8350, 12596 -15276, 13915 -14085, 7608 -7701, 7944 -7354, 8267 -6988, 7636 -6455, 8184 -5745, 8859 -6219, 8619 -6551, 8292 -6960, 8267 -6988, 15122 -12781, 16206 -11374, 8859 -6219, 8926 -6126, 9213 -5686, 9380 -5399, 8666 -4988, 9078 -4191, 9826 -4536, 9725 -4757, 9477 -5233, 9380 -5399, 17160 -9875, 17977 -8297, 9826 -4536, 9949 -4269, 10149 -3768, 10324 -3258, 10474 -2740, 10597 -2215, 10694 -1684, 10764 -1149, 10811 -576, 10826 0, 10822 177, 19796 323, 19688 2096, 10761 1146, 10810 728, 10822 177, 9998 164, 9943 1059, 10761 1146, 10716 1537, 10623 2086, 10509 2599, 10386 3050, 18998 5579, 18421 7259, 10070 3968, 10209 3603, 10371 3105, 10386 3050, 9594 2818, 9303 3666, 10070 3968, 10022 4094, 9812 4574, 9673 4855, 17696 8881, 16829 10432, 9198 5703, 9046 5948, 8643 6499, 15825 11898, 14695 13269, 8034 7254, 7730 7579, 7354 7944, 7352 7946, 13446 14533, 11992 15553, 12089 15679, 10636 16700, 10550 16565, 11992 15553, 6610 8572, 6960 8292, 7352 7946, 6790 7339, 6106 7918, 6610 8572, 6551 8619, 6126 8926, 5815 9129, 10550 16565, 9095 17586, 4972 9613, 5233 9477, 5686 9213, 5815 9129, 5372 8434, 4594 8881, 4972 9613, 4757 9725, 4269 9949, 4090 10020, 7482 18331, 5809 18928, 3176 10348, 3258 10324, 3768 10149, 4090 10020, 3779 9257, 2934 9559, 3176 10348, 2740 10474, 2236 10592, 4089 19372, 2336 19661, 1277 10747, 1684 10694, 2214 10597, 2236 10592, 2065 9783, 1180 9929, 1277 10747, 1149 10764, 575 10811, 308 10818, 564 19791, -1211 19762, -662 10796, -985 10781, -1537 10716, -1628 10701, -1504 9885, -2384 9711, -2581 10513, -2086 10623, -1628 10701, -2978 19575, -4683 19074, -2581 10513, -2599 10509, -3105 10371, -3513 10238, -3245 9458, -4080 9129, -4416 9881, -4094 10022, -3603 10209, -3513 10238, -6373 18578, -4683 19074, -4721 19228, -6425 18728, -6373 18578, -8078 18077, -4416 9881, -4574 9812, -5045 9579, -5284 9445, -9666 17279, -11176 16344, -6107 8929, -6795 8427, -6886 8350, -12595 15274, -13915 14085, -7608 7701, -7944 7354, -8267 6988, -7636 6455, -8184 5745, -8859 6219, -8619 6551, -8292 6960, -8267 6988, -15122 12781, -16206 11374, -8859 6219, -8926 6126, -9213 5686, -9380 5399, -8666 4988, -9078 4191, -9826 4536, -9725 4757, -9477 5233, -9380 5399, -17160 9875, -17977 8297, -9826 4536, -9949 4269, -10149 3768, -10324 3258, -10474 2740, -10597 2215, -10694 1684, -10764 1149, -10811 576, -10826 0, -10818 -177, -19795 -323, -19688 -2096, -10762 -1146, -10716 -1537, -10623 -2086, -10509 -2599, -10386 -3050, -18998 -5579, -18421 -7259, -10070 -3968, -10209 -3603, -10371 -3105, -10386 -3050, -9594 -2818, -9303 -3666, -10070 -3968, -10022 -4094, -9812 -4574, -9579 -5045, -9323 -5503, -9199 -5703, -16829 -10432, -15825 -11898, -8643 -6499, -9046 -5948, -9199 -5703, -8499 -5269, -7992 -6009, -8643 -6499, -8427 -6795, -8088 -7196, -8034 -7254, -14695 -13269, -13447 -14533, -7352 -7946, -7354 -7944, -7730 -7579, -8034 -7254, -7421 -6701, -6791 -7339, -7352 -7946, -6960 -8292, -6610 -8572, -12089 -15679, -10636 -16700, -5815 -9129, -6126 -8926, -6551 -8619, -6610 -8572, -6106 -7918, -5372 -8434, -5815 -9129, -5686 -9213, -5233 -9477, -4757 -9725, -4269 -9949, -4090 -10020, -7482 -18331, -5809 -18928, -3176 -10348, -2740 -10474, -2236 -10592, -4089 -19372, -2336 -19661, -1277 -10747, -1684 -10694, -2215 -10597, -2236 -10592, -2065 -9783, -1180 -9929, -1277 -10747, -1149 -10764, -576 -10811, -308 -10818, -564 -19791) (-662 10796, 0 10826, 308 10818, 285 9995, -612 9980) (-308 -10818, -285 -9995, 612 -9980, 662 -10796, 0 -10826)), ((1831 -37382, 3665 -37248, 5489 -37022, 7297 -36709, 9092 -36306, 10860 -35816, 12608 -35239, 14320 -34579, 16000 -33834, 17641 -33008, 19240 -32103, 20792 -31120, 22294 -30062, 23743 -28932, 25134 -27732, 26465 -26465, 27732 -25134, 28910 -23770, 30063 -22293, 31119 -20793, 32104 -19239, 33008 -17642, 33835 -15998, 34578 -14322, 35241 -12604, 35815 -10863, 36307 -9088, 36708 -7301, 37023 -5485, 37247 -3668, 37382 -1829, 37412 0, 37383 1832, 37247 3665, 37022 5489, 36709 7297, 36306 9092, 35816 10860, 35239 12608, 34579 14320, 33834 16000, 33008 17641, 32103 19240, 31120 20792, 30062 22294, 28932 23743, 27732 25134, 26465 26465, 25134 27732, 23770 28910, 22293 30063, 20793 31119, 19238 32104, 17642 33008, 15998 33835, 14322 34578, 12604 35241, 10863 35815, 9088 36307, 7301 36708, 5485 37023, 3668 37247, 1829 37382, 0 37427, -1831 37382, -3665 37248, -5489 37022, -7297 36709, -9092 36306, -10860 35816, -12608 35239, -14320 34579, -16001 33834, -17641 33008, -19240 32103, -20792 31120, -22294 30062, -23743 28932, -25134 27732, -26465 26465, -27732 25134, -28910 23770, -30063 22293, -31119 20793, -32104 19239, -33008 17642, -33835 15998, -34578 14322, -35241 12604, -35815 10863, -36307 9088, -36708 7301, -37023 5485, -37247 3668, -37382 1829, -37412 0, -37383 -1832, -37248 -3665, -37022 -5489, -36709 -7297, -36306 -9092, -35816 -10860, -35239 -12608, -34579 -14320, -33834 -16000, -33009 -17641, -32103 -19240, -31120 -20792, -30062 -22294, -28932 -23743, -27732 -25134, -26465 -26465, -25134 -27732, -23770 -28910, -22293 -30063, -20793 -31119, -19238 -32104, -17643 -33008, -15998 -33835, -14322 -34578, -12604 -35241, -10863 -35815, -9088 -36307, -7301 -36708, -5485 -37023, -3668 -37247, -1829 -37382, 0 -37427) (-968 -19849, -1936 -19778, -2862 -19666, -3797 -19506, -4737 -19300, -5678 -19044, -6617 -18739, -7550 -18383, -8473 -17976, -9374 -17523, -10242 -17030, -11088 -16492, -11911 -15908, -12706 -15281, -13469 -14613, -14198 -13905, -14890 -13162, -15541 -12385, -16152 -11578, -16717 -10746, -17237 -9890, -17711 -9015, -18136 -8125, -18513 -7223, -18844 -6313, -19126 -5398, -19361 -4483, -19549 -3570, -19701 -2611, -19804 -1654, -19859 -701, -19873 0, -19849 968, -19779 1936, -19666 2862, -19506 3797, -19300 4737, -19044 5678, -18739 6617, -18383 7550, -17976 8473, -17523 9374, -17030 10242, -16492 11088, -15908 11911, -15281 12706, -14613 13469, -13905 14198, -13162 14890, -12385 15541, -11578 16152, -10746 16717, -9890 17237, -9015 17711, -8125 18136, -7223 18513, -6313 18844, -5398 19126, -4483 19361, -3570 19549, -2611 19701, -1654 19804, -701 19859, 0 19873, 968 19849, 1936 19778, 2862 19666, 3797 19506, 4737 19300, 5678 19044, 6617 18739, 7550 18383, 8473 17976, 9374 17523, 10242 17030, 11088 16492, 11911 15908, 12706 15281, 13469 14613, 14198 13905, 14889 13162, 15541 12385, 16152 11578, 16717 10746, 17237 9890, 17711 9015, 18136 8125, 18513 7223, 18844 6313, 19126 5398, 19361 4483, 19549 3570, 19701 2611, 19804 1654, 19859 701, 19872 -21, 19849 -968, 19778 -1936, 19666 -2862, 19506 -3797, 19300 -4737, 19044 -5678, 18739 -6617, 18383 -7550, 17976 -8473, 17523 -9374, 17030 -10242, 16492 -11088, 15908 -11911, 15281 -12706, 14613 -13469, 13905 -14198, 13162 -14890, 12385 -15541, 11578 -16152, 10746 -16717, 9890 -17237, 9015 -17711, 8125 -18136, 7223 -18513, 6313 -18844, 5398 -19126, 4483 -19361, 3570 -19549, 2610 -19701, 1654 -19804, 701 -19859, 0 -19873))) \ No newline at end of file diff --git a/stress_benchmark/resources/030.settings b/stress_benchmark/resources/030.settings new file mode 100644 index 0000000000..433def02f4 --- /dev/null +++ b/stress_benchmark/resources/030.settings @@ -0,0 +1,632 @@ +material_bed_temperature=60 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.1 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=True +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=40 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=11 +cool_fan_full_layer=1 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.2 +raft_acceleration=3500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=False +zig_zaggify_support=True +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.30000000000000004 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=0.5 +cool_min_speed=4 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=20 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=15 +layer_start_x=330.0 +material_print_temperature=200 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=6.5 +material_break_temperature=60 +acceleration_support_interface=1000 +adhesion_extruder_nr=0 +mold_width=5 +gradual_support_infill_step_height=0.4 +infill_sparse_thickness=0.1 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_none +jerk_wall_x=20 +infill=0 +coasting_speed=90 +bridge_skin_density=80 +support_bottom_line_distance=0.4 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=1500 +speed_travel=150 +layer_0_z_overlap=0.125 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.1 +material_bed_temperature_layer_0=60 +support_tree_limit_branch_reach=True +support_brim_width=1.2000000000000002 +meshfix_maximum_deviation=3 +wipe_retraction_speed=45 +retraction_amount=6.5 +bridge_skin_density_2=100 +support_tower_diameter=3.0 +jerk_skirt_brim=20 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0.4 +material_diameter=2.85 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=20 +raft_surface_fan_speed=100 +default_material_bed_temperature=60 +speed_ironing=20.0 +machine_max_acceleration_e=10000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=3500 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.2 +skin_angles=[] +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.8 +machine_max_acceleration_y=9000 +support_tree_min_height_to_model=3 +acceleration_infill=3500 +travel_avoid_supports=False +draft_shield_enabled=False +minimum_interface_area=1.0 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.7 +speed_wall=30 +bottom_thickness=1 +raft_interface_jerk=20 +material_shrinkage_percentage=100.2 +support_interface_wall_count=1 +machine_max_jerk_e=5.0 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.08 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=210 +brim_gap=0.14 +acceleration_support_infill=2000 +support_meshes_present=False +travel_avoid_distance=0.75 +raft_interface_speed=22.5 +jerk_prime_tower=20 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=20.0 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150 +acceleration_topbottom=1000 +machine_settings=0 +prime_tower_brim_enable=True +gradual_infill_step_height=1.5 +speed_infill=70 +skin_overlap=20 +print_sequence=all_at_once +infill_overlap=10 +support_interface_material_flow=95.0 +skin_material_flow_layer_0=95 +bridge_skin_material_flow_2=95.0 +speed_support_interface=30 +machine_max_acceleration_x=9000 +support_interface_height=0.2 +skirt_height=3 +support_roof_pattern=zigzag +support_mesh=False +inset_direction=outside_in +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=100 +infill_support_enabled=False +support_brim_line_count=3 +blackmagic=0 +speed_wall_x_roofing=30 +material_print_temperature_layer_0=200 +bridge_settings_enabled=True +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=20 +machine_max_feedrate_e=45 +retraction_enable=True +support_line_distance=0.5 +extruder_prime_pos_abs=True +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=3500 +interlocking_orientation=22.5 +speed_wall_0_roofing=20 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=1.0 +infill_line_distance=6.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=40.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=60 +raft_base_speed=15 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=20 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=0.75 +bridge_skin_speed=30 +skirt_brim_material_flow=100 +acceleration_support_roof=1000 +support_roof_offset=0.8 +travel_retract_before_outer_wall=False +machine_height=300 +prime_tower_base_size=15 +infill_enable_travel_optimization=False +speed_support_infill=20 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=100 +retraction_hop=2 +jerk_wall_0=20 +mold_angle=40 +raft_speed=15 +prime_tower_wipe_enabled=True +support_roof_density=100 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=40 +acceleration_support=2000 +cool_min_temperature=190 +jerk_layer_0=20 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=True +prime_tower_base_height=0.1 +fill_outline_gaps=True +meshfix_maximum_resolution=0.5 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=1.6 +raft_interface_line_spacing=0.8 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=6 +support_join_distance=2.0 +wipe_hop_amount=2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=300 +machine_width=330 +extruder_prime_pos_y=6 +retraction_extra_prime_amount=0 +z_seam_type=sharpest_corner +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=True +material_standby_temperature=100 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=True +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.6000000000000001 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=110.00000000000001 +quality_name=Fine +material_final_print_temperature=185 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.91 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=False +acceleration_skirt_brim=1000 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=no_outer_surfaces +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=100 +ironing_inset=0.38 +speed_z_hop=10 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=30 +roofing_layer_count=1 +speed_slowdown_layers=1 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.04 +mesh_position_z=0 +machine_max_jerk_xy=20.0 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.8 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.25 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.30000000000000004 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=30 +lightning_infill_straightening_angle=40 +speed_topbottom=30 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=False +material_maximum_park_duration=7200 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=10.0 +machine_max_jerk_z=0.4 +support_tree_angle=60 +expand_skins_expand_distance=0.8 +prime_tower_position_y=203.45 +mesh_position_x=0 +cross_infill_pocket_size=6.0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=25 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.30000000000000004 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=1000 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=50 +raft_surface_acceleration=3500 +minimum_support_area=0.0 +brim_width=7 +small_skin_width=0.8 +shell=0 +jerk_print=20 +adhesion_type=raft +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=15 +z_seam_x=165.0 +acceleration_travel=5000 +ironing_enabled=False +support_bottom_material_flow=95.0 +acceleration_wall=1500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.1 +bridge_skin_material_flow_3=95.0 +support_interface_pattern=zigzag +initial_bottom_layers=10 +bridge_fan_speed_2=100 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=1000 +retraction_hop_enabled=False +layer_start_y=237.0 +extruder_prime_pos_x=-3 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=True +extruder_prime_pos_z=2 +support_tower_roof_angle=0 +prime_tower_position_x=313.45 +bridge_wall_min_length=2.1 +experimental=0 +bottom_layers=10 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.2 +skin_edge_support_layers=4 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.3 +roofing_extruder_nr=-1 +jerk_support=20 +wall_line_width_x=0.4 +support_bottom_wall_count=1 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=triangles +material_alternate_walls=False +material_break_preparation_speed=50 +acceleration_support_bottom=1000 +material_end_of_filament_purge_length=20 +speed_print=70 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=1500 +carve_multiple_volumes=False +raft_surface_thickness=0.1 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=1428.5714285714287 +speed_equalize_flow_width_factor=110.0 +wipe_brush_pos_x=100 +jerk_wall_0_roofing=20 +skin_material_flow=95.0 +support_bottom_density=100 +bridge_skin_density_3=100 +support_interface_enable=True +support_roof_wall_count=1 +infill_sparse_density=20 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=95.0 +speed_print_layer_0=10.0 +raft_jerk=20 +speed_support=20 +jerk_support_interface=20 +machine_disallowed_areas=[] +minimum_roof_area=1.0 +raft_surface_jerk=20 +adaptive_layer_height_variation_step=0.01 +support_conical_min_width=5.0 +acceleration_travel_enabled=False +jerk_support_bottom=20 +jerk_travel_enabled=False +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=60 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=1000 +prime_tower_flow=100 +support_xy_overrides_z=z_overrides_xy +machine_nozzle_tip_outer_diameter=1.0 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=30 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0 +wipe_retraction_retract_speed=45 +support_bottom_pattern=zigzag +support_roof_height=0.2 +gradual_support_infill_steps=2 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=1 +min_skin_width_for_expansion=6.123233995736766e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=1 +support_fan_enable=False +infill_wipe_dist=0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=0.8 +acceleration_layer_0=1000 +material_shrinkage_percentage_z=100.1 +material_guid=506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 +support_roof_line_distance=0.4 +brim_line_count=18 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=1500 +wall_transition_angle=10 +top_thickness=1 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.8 +bridge_wall_speed=30 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=20 +wall_transition_filter_distance=100 +raft_interface_fan_speed=50.0 +bridge_wall_coast=0 +skirt_line_count=1 +infill_mesh=False +layer_height=0.1 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=150 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=95.0 +machine_max_feedrate_y=300 +alternate_carve_order=True +jerk_roofing=20 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0 +machine_extruders_share_nozzle=False +acceleration_prime_tower=2000 +retraction_hop_after_extruder_switch_height=2 +skirt_gap=3 +wall_0_material_flow_roofing=100 +jerk_support_roof=20 +machine_extruder_count=2 +xy_offset_layer_0=-0.09 +skirt_brim_extruder_nr=0 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=190 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=3500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=80 +material_shrinkage_percentage_xy=100.2 +bridge_skin_material_flow=95.0 +raft_base_jerk=20 +speed_wall_x=30 +time=11:54:33 +machine_buildplate_type=glass +top_layers=10 +machine_gcode_flavor=Griffin +roofing_angles=[] +jerk_ironing=20 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=10 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.2 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=55 +support_bottom_extruder_nr=0 +speed_support_roof=30 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=True +magic_fuzzy_skin_enabled=False +machine_acceleration=3000 +speed_roofing=30 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=True +speed_support_bottom=30 +material_bed_temp_wait=True +machine_depth=240 +bridge_wall_material_flow=100 +jerk_travel=20 +retraction_speed=45 +xy_offset=-0.010000000000000002 +print_temperature=200 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=20 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=240 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=10.0 +raft_surface_speed=30 +material_name=empty +acceleration_wall_0=1500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=20 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/030.wkt b/stress_benchmark/resources/030.wkt new file mode 100644 index 0000000000..0772ef253f --- /dev/null +++ b/stress_benchmark/resources/030.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((165545 104990, 166144 105023, 166739 105081, 167332 105162, 167922 105267, 168506 105395, 169505 105667, 170226 105918, 170226 105917, 171059 106256, 171602 106509, 172135 106783, 173046 107311, 173905 107904, 174613 108458, 175285 109054, 175699 109458, 176112 109894, 176504 110344, 176881 110811, 177238 111293, 177576 111788, 177893 112296, 178191 112816, 178466 113347, 178721 113890, 179119 114861, 179118 114861, 179437 115859, 179591 116439, 179778 117318, 179873 117909, 179944 118505, 180007 119400, 180020 120000, 180007 120599, 179947 121473, 179873 122091, 179778 122682, 179597 123539, 179437 124140, 179260 124712, 179061 125278, 179062 125278, 178721 126109, 178466 126652, 178190 127183, 177666 128079, 177238 128706, 176881 129188, 176504 129655, 176112 130105, 175684 130556, 175034 131176, 174581 131567, 174111 131939, 173628 132294, 172877 132787, 172099 133235, 171564 133508, 170744 133877, 169924 134190, 169334 134381, 169334 134380, 168466 134613, 167880 134740, 167290 134843, 166420 134952, 165502 135010, 164903 135020, 164006 134987, 163408 134935, 162518 134813, 161929 134703, 161055 134492, 160194 134230, 160194 134231, 159632 134029, 159076 133803, 158532 133557, 158532 133556, 157732 133144, 157213 132843, 156707 132523, 156214 132183, 155503 131636, 154823 131047, 154405 130646, 153989 130215, 153397 129539, 152847 128827, 152505 128336, 152182 127831, 151736 127050, 151466 126516, 151101 125694, 150884 125135, 150883 125135, 150691 124570, 150442 123705, 150306 123123, 150307 123123, 150147 122238, 150070 121643, 150002 120899, 149980 120150, 149996 119273, 150070 118355, 150147 117760, 150307 116876, 150443 116293, 150692 115428, 150884 114863, 150885 114862, 150885 114861, 151217 114028, 151466 113482, 151737 112948, 152183 112167, 152506 111662, 152847 111171, 153397 110459, 153788 110005, 154195 109566, 154853 108923, 155304 108529, 155768 108151, 156248 107792, 156742 107452, 157249 107135, 157768 106835, 158300 106557, 158841 106300, 159797 105904, 160521 105663, 160521 105664, 161386 105421, 161970 105288, 162560 105180, 163320 105070, 164326 104995, 164945 104980) (164828 109971, 164229 110000, 163633 110063, 163631 110063, 163041 110163, 162456 110297, 162455 110297, 161879 110466, 161316 110670, 161315 110671, 160764 110907, 160229 111177, 160228 111177, 159710 111477, 159209 111809, 159208 111810, 158730 112171, 158273 112560, 158272 112561, 157854 112960, 157345 113509, 157344 113510, 156884 114104, 156458 114730, 156457 114731, 156097 115379, 155836 115919, 155836 115920, 155609 116474, 155415 117042, 155414 117043, 155255 117621, 155130 118207, 155130 118209, 155041 118802, 154974 119557, 154974 120299, 155010 120897, 155010 120898, 155077 121472, 155188 122084, 155188 122085, 155330 122667, 155553 123388, 155554 123390, 155836 124079, 156097 124619, 156097 124620, 156388 125144, 156795 125780, 156796 125781, 157251 126369, 157750 126940, 157751 126941, 158303 127466, 158761 127853, 158762 127854, 159242 128213, 159726 128532, 159727 128533, 160264 128841, 160782 129101, 160783 129101, 161353 129343, 161918 129545, 161919 129546, 162495 129712, 163080 129844, 163081 129844, 163797 129963, 164548 130019, 164550 130019, 165170 130028, 165769 129999, 165770 129999, 166366 129936, 166956 129836, 166957 129836, 167543 129702, 168118 129533, 168119 129532, 168682 129328, 169359 129038, 169361 129038, 170033 128676, 170542 128359, 170543 128358, 171015 128025, 171500 127637, 171501 127636, 171945 127235, 172351 126822, 172352 126822, 172747 126370, 173114 125896, 173114 125895, 173451 125400, 173759 124885, 173760 124884, 174036 124352, 174280 123804, 174280 123803, 174544 123097, 174743 122379, 174744 122377, 174868 121791, 174957 121198, 174957 121197, 175011 120600, 175030 120001, 175030 120000, 175013 119422, 174943 118650, 174943 118648, 174782 117759, 174584 117044, 174583 117043, 174389 116475, 174162 115921, 174162 115920, 173902 115380, 173610 114856, 173609 114855, 173202 114219, 172747 113631, 172747 113629, 172248 113058, 171696 112533, 171694 112532, 171237 112145, 170756 111786, 170272 111467, 169735 111159, 169733 111158, 169215 110898, 168645 110656, 168644 110656, 168079 110454, 167504 110288, 167503 110287, 166917 110155, 166201 110036, 166200 110036, 165449 109980, 164829 109971))) \ No newline at end of file diff --git a/stress_benchmark/resources/031.settings b/stress_benchmark/resources/031.settings new file mode 100644 index 0000000000..25fa556794 --- /dev/null +++ b/stress_benchmark/resources/031.settings @@ -0,0 +1,628 @@ +material_bed_temperature=50 +support_tree_rest_preference=graceful +relative_extrusion=False +wall_0_inset=0 +resolution=0 +_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1 +skin_preshrink=0.8 +clean_between_layers=False +support_interface_skip_height=0.2 +machine_feeder_wheel_diameter=10.0 +retraction_hop_only_when_collides=False +machine_steps_per_mm_y=50 +support_tree_branch_diameter=5 +smooth_spiralized_contours=True +mold_roof_height=0.5 +support_zag_skip_count=10 +material_type=empty +cooling=0 +cool_min_layer_time_fan_speed_max=10 +cool_fan_full_layer=4 +top_bottom_pattern=lines +skirt_brim_line_width=0.4 +center_object=False +support_mesh_drop_down=True +infill_multiplier=1 +initial_layer_line_width_factor=100.0 +support_bottom_height=0.8 +raft_acceleration=500 +material_is_support_material=False +machine_minimum_feedrate=0.0 +optimize_wall_printing_order=True +wipe_hop_enable=False +zig_zaggify_support=False +min_bead_width=0.34 +switch_extruder_prime_speed=20 +wall_x_extruder_nr=-1 +machine_firmware_retract=False +switch_extruder_retraction_speeds=20 +support_z_distance=0.2 +meshfix_union_all=True +layer_height_0=0.2 +support_initial_layer_line_distance=2.0 +cool_min_speed=10 +cool_fan_enabled=True +cool_fan_speed_max=100 +wall_overhang_angle=90 +jerk_support_infill=8 +wall_overhang_speed_factor=100 +support_roof_line_width=0.4 +switch_extruder_extra_prime_amount=0 +draft_shield_dist=10 +coasting_volume=0.064 +machine_endstop_positive_direction_z=True +machine_min_cool_heat_time_window=50.0 +layer_start_x=0.0 +material_print_temperature=200 +min_even_wall_line_width=0.34 +interlocking_boundary_avoidance=2 +minimum_polygon_circumference=1.0 +raft_base_wall_count=1 +wipe_retraction_amount=5 +material_break_temperature=50 +acceleration_support_interface=500 +adhesion_extruder_nr=-1 +mold_width=5 +gradual_support_infill_step_height=1 +infill_sparse_thickness=0.2 +brim_smart_ordering=True +z_seam_corner=z_seam_corner_weighted +jerk_wall_x=8 +infill=0 +coasting_speed=90 +bridge_skin_density=100 +support_bottom_line_distance=2.4000240002400024 +support_bottom_stair_step_height=0 +acceleration_wall_x_roofing=500 +speed_travel=150.0 +layer_0_z_overlap=0.15 +infill_mesh_order=0 +support=0 +ironing_pattern=zigzag +support_infill_sparse_thickness=0.2 +material_bed_temperature_layer_0=50 +support_tree_limit_branch_reach=True +support_brim_width=4 +meshfix_maximum_deviation=2.9 +wipe_retraction_speed=45 +retraction_amount=5 +bridge_skin_density_2=75 +support_tower_diameter=3.0 +jerk_skirt_brim=8 +machine_heat_zone_length=16 +top_bottom_extruder_nr=-1 +machine_steps_per_mm_x=50 +support_bottom_line_width=0.4 +meshfix_union_all_remove_holes=False +support_wall_count=0 +machine_max_acceleration_z=100 +skin_edge_support_thickness=0 +material_diameter=1.75 +flow_rate_max_extrusion_offset=0 +max_skin_angle_for_expansion=90 +machine_extruders_share_heater=False +cool_lift_head=False +speed_wall_0=25.0 +raft_surface_fan_speed=0 +default_material_bed_temperature=50 +speed_ironing=16.666666666666668 +machine_max_acceleration_e=5000 +_plugin__curaenginegradualflow__0_1_0__reset_flow_duration=2.0 +travel=0 +connect_infill_polygons=False +raft_base_acceleration=500 +wall_extruder_nr=-1 +support_structure=normal +support_xy_distance_overhang=0.4 +machine_steps_per_mm_z=50 +support_tree_bp_diameter=7.5 +infill_line_width=0.4 +magic_fuzzy_skin_outside_only=False +skin_line_width=0.4 +support_interface_offset=0.0 +machine_max_acceleration_y=500 +support_tree_min_height_to_model=3 +acceleration_infill=500 +travel_avoid_supports=True +draft_shield_enabled=False +minimum_interface_area=10 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_enabled=False +support_xy_distance=0.8 +speed_wall=25.0 +bottom_thickness=0.8 +raft_interface_jerk=8 +material_shrinkage_percentage=100.0 +support_interface_wall_count=0 +machine_max_jerk_e=5 +raft_margin=15 +roofing_monotonic=True +skin_overlap_mm=0.04 +small_feature_max_length=0.0 +wall_line_count=2 +material_print_temp_prepend=True +wall_transition_filter_deviation=0.1 +material_break_preparation_temperature=200 +brim_gap=0 +acceleration_support_infill=500 +support_meshes_present=False +travel_avoid_distance=0.625 +raft_interface_speed=18.75 +jerk_prime_tower=8 +skin_outline_count=1 +mold_enabled=False +jerk_travel_layer_0=8 +platform_adhesion=0 +ooze_shield_dist=2 +speed=0 +travel_speed=150.0 +acceleration_topbottom=500 +machine_settings=0 +prime_tower_brim_enable=False +gradual_infill_step_height=1.5 +speed_infill=50.0 +skin_overlap=10.0 +print_sequence=all_at_once +infill_overlap=30.0 +support_interface_material_flow=100 +skin_material_flow_layer_0=100 +bridge_skin_material_flow_2=100 +speed_support_interface=25.0 +machine_max_acceleration_x=500 +support_interface_height=0.8 +skirt_height=3 +support_roof_pattern=grid +support_mesh=False +inset_direction=inside_out +wall_0_material_flow=100 +meshfix_maximum_extrusion_area_deviation=50000 +cool_fan_speed_0=0 +infill_support_enabled=False +support_brim_line_count=10 +blackmagic=0 +speed_wall_x_roofing=25.0 +material_print_temperature_layer_0=200 +bridge_settings_enabled=False +raft_base_fan_speed=0 +prime_tower_line_width=0.4 +jerk_wall_x_roofing=8 +machine_max_feedrate_e=50 +retraction_enable=True +support_line_distance=2.0 +extruder_prime_pos_abs=False +material_adhesion_tendency=0 +machine_extruders_shared_nozzle_initial_retraction=0 +prime_tower_base_curve_magnitude=4 +support_tower_maximum_supported_diameter=3.0 +support_interface_extruder_nr=0 +nozzle_disallowed_areas=[] +machine_heated_bed=True +machine_use_extruder_offset_to_offset_coords=True +acceleration_print=500 +interlocking_orientation=22.5 +speed_wall_0_roofing=25.0 +sub_div_rad_add=0.4 +bottom_skin_preshrink=0.8 +minimum_bottom_area=10 +infill_line_distance=6.0 +wall_0_extruder_nr=-1 +hole_xy_offset_max_diameter=0 +small_hole_max_size=0 +support_tree_angle_slow=30.0 +support_interface_line_width=0.4 +support_skip_zag_per_mm=20 +support_angle=45 +raft_base_speed=18.75 +raft_remove_inside_corners=False +ironing_only_highest_layer=False +roofing_line_width=0.4 +hole_xy_offset=0 +jerk_print_layer_0=8 +material_anti_ooze_retracted_position=-4 +machine_nozzle_cool_down_speed=2.0 +bridge_skin_speed=12.5 +skirt_brim_material_flow=100 +acceleration_support_roof=500 +support_roof_offset=0.0 +travel_retract_before_outer_wall=True +machine_height=250 +prime_tower_base_size=8.0 +infill_enable_travel_optimization=False +speed_support_infill=25.0 +raft_base_line_spacing=1.6 +max_extrusion_before_wipe=10 +ironing_line_spacing=0.1 +wipe_retraction_prime_speed=45 +wipe_pause=0 +prime_tower_raft_base_line_spacing=1.6 +support_bottom_stair_step_width=5.0 +support_interface_density=33.333 +retraction_hop=0.2 +jerk_wall_0=8 +mold_angle=40 +raft_speed=25.0 +prime_tower_wipe_enabled=True +support_roof_density=33.333 +prime_tower_enable=False +top_bottom=0 +machine_max_feedrate_z=10 +acceleration_support=500 +cool_min_temperature=200 +jerk_layer_0=8 +support_offset=0.8 +material_flow=100 +support_roof_extruder_nr=0 +acceleration_enabled=False +prime_tower_base_height=0.2 +fill_outline_gaps=False +meshfix_maximum_resolution=0.25 +wipe_repeat_count=5 +brim_inside_margin=2.5 +machine_nozzle_heat_up_speed=2.0 +raft_interface_line_spacing=1.0 +material_flush_purge_length=60 +wipe_retraction_enable=True +day=Thu +cool_min_layer_time=10 +support_join_distance=2.0 +wipe_hop_amount=0.2 +meshfix_fluid_motion_shift_distance=0.1 +machine_max_feedrate_x=500 +machine_width=235 +extruder_prime_pos_y=0 +retraction_extra_prime_amount=0 +z_seam_type=back +retraction_prime_speed=45 +roofing_pattern=lines +material_bed_temp_prepend=True +material=0 +infill_before_walls=False +material_standby_temperature=180 +brim_outside_only=True +support_conical_angle=30 +machine_heated_build_volume=False +wall_line_width=0.4 +retract_at_layer_change=False +wall_transition_length=0.4 +command_line_settings=0 +raft_surface_layers=2 +skirt_brim_minimal_length=250 +raft_interface_line_width=0.8 +small_skin_on_surface=False +skin_no_small_gaps_heuristic=False +wall_0_material_flow_layer_0=100 +material_final_print_temperature=200 +machine_endstop_positive_direction_x=False +ooze_shield_angle=60 +raft_surface_line_spacing=0.4 +material_no_load_move_factor=0.940860215 +infill_wall_line_count=0 +support_supported_skin_fan_speed=100 +nozzle_offsetting_for_disallowed_areas=True +acceleration_skirt_brim=500 +meshfix=0 +material_flow_layer_0=100 +retraction_combing=noskin +wall_material_flow=100 +meshfix_keep_open_polygons=False +skin_monotonic=False +cool_fan_speed_min=100 +wipe_move_distance=20 +bridge_fan_speed_3=0 +ironing_inset=0.38 +speed_z_hop=5 +magic_fuzzy_skin_point_dist=0.8 +bridge_skin_speed_3=12.5 +roofing_layer_count=0 +speed_slowdown_layers=2 +default_material_print_temperature=200 +conical_overhang_angle=50 +infill_overlap_mm=0.12 +mesh_position_z=0 +machine_max_jerk_xy=10 +cutting_mesh=False +meshfix_maximum_travel_resolution=0.25 +support_extruder_nr_layer_0=0 +wall_distribution_count=1 +raft_airgap=0.3 +material_flush_purge_speed=0.5 +material_print_temp_wait=True +support_top_distance=0.2 +retraction_hop_after_extruder_switch=True +bridge_skin_speed_2=12.5 +lightning_infill_straightening_angle=40 +speed_topbottom=25.0 +raft_smoothing=5 +anti_overhang_mesh=False +bridge_enable_more_layers=True +material_maximum_park_duration=300 +machine_nozzle_temp_enabled=True +switch_extruder_retraction_amount=16 +skirt_brim_speed=20.0 +machine_max_jerk_z=0.4 +support_tree_angle=45 +expand_skins_expand_distance=0.8 +prime_tower_position_y=202.375 +mesh_position_x=0 +cross_infill_pocket_size=6.0 +interlocking_enable=False +support_tree_top_rate=30 +wall_line_width_0=0.4 +retraction_count_max=100 +material_id=empty_material +support_tree_branch_diameter_angle=7 +interlocking_beam_width=0.8 +support_bottom_distance=0.2 +wall_thickness=0.8 +machine_steps_per_mm_e=1600 +material_crystallinity=False +travel_avoid_other_parts=True +acceleration_print_layer_0=500 +z_seam_position=back +_plugin__curaenginegradualflow__0_1_0__max_flow_acceleration=1 +machine_nozzle_expansion_angle=45 +min_odd_wall_line_width=0.34 +support_conical_enabled=False +material_anti_ooze_retraction_speed=5 +raft_surface_acceleration=500 +minimum_support_area=2 +brim_width=8.0 +small_skin_width=0.8 +shell=0 +jerk_print=8 +adhesion_type=skirt +draft_shield_height=10 +machine_always_write_active_tool=False +retraction_combing_max_distance=30 +z_seam_x=117.5 +acceleration_travel=500 +ironing_enabled=False +support_bottom_material_flow=100 +acceleration_wall=500 +raft_base_extruder_nr=0 +raft_surface_line_width=0.4 +raft_interface_layers=1 +adaptive_layer_height_variation=0.04 +bridge_skin_material_flow_3=110 +support_interface_pattern=grid +initial_bottom_layers=4 +bridge_fan_speed_2=0 +support_use_towers=True +support_extruder_nr=0 +switch_extruder_retraction_speed=20 +raft_surface_extruder_nr=0 +acceleration_roofing=500 +retraction_hop_enabled=False +layer_start_y=0.0 +extruder_prime_pos_x=0 +build_volume_temperature=28 +retraction_retract_speed=45 +zig_zaggify_infill=False +extruder_prime_pos_z=0 +support_tower_roof_angle=65 +prime_tower_position_x=222.375 +bridge_wall_min_length=2.2 +experimental=0 +bottom_layers=4 +infill_offset_y=0 +magic_fuzzy_skin_thickness=0.3 +meshfix_extensive_stitching=False +wall_0_wipe_dist=0.0 +skin_edge_support_layers=0 +support_type=everywhere +support_skip_some_zags=False +support_line_width=0.4 +ooze_shield_enabled=False +raft_base_thickness=0.24 +roofing_extruder_nr=-1 +jerk_support=8 +wall_line_width_x=0.4 +support_bottom_wall_count=0 +connect_skin_polygons=False +meshfix_fluid_motion_enabled=True +infill_pattern=cubic +material_alternate_walls=False +material_break_preparation_speed=2 +acceleration_support_bottom=500 +material_end_of_filament_purge_length=20 +speed_print=50.0 +flow_rate_extrusion_offset_factor=100 +acceleration_wall_x=500 +carve_multiple_volumes=False +raft_surface_thickness=0.2 +coasting_min_volume=0.8 +cool_fan_speed=100 +acceleration_travel_layer_0=500 +speed_equalize_flow_width_factor=100.0 +wipe_brush_pos_x=100 +machine_nozzle_id=unknown +jerk_wall_0_roofing=8 +skin_material_flow=100 +support_bottom_density=33.333 +bridge_skin_density_3=80 +support_interface_enable=True +support_roof_wall_count=0 +infill_sparse_density=20 +infill_extruder_nr=-1 +interlocking_beam_layer_count=2 +bridge_sparse_infill_max_density=0 +draft_shield_height_limitation=full +wall_x_material_flow_layer_0=100 +speed_print_layer_0=20.0 +raft_jerk=8 +speed_support=25.0 +jerk_support_interface=8 +minimum_roof_area=10 +raft_surface_jerk=8 +adaptive_layer_height_variation_step=0.04 +support_conical_min_width=5.0 +acceleration_travel_enabled=True +jerk_support_bottom=8 +jerk_travel_enabled=True +conical_overhang_hole_size=0 +group_outer_walls=True +print_bed_temperature=50 +lightning_infill_support_angle=40 +_plugin__curaenginegradualflow__0_1_0__gradual_flow_discretisation_step_size=0.2 +raft_fan_speed=0 +magic_mesh_surface_mode=normal +lightning_infill_prune_angle=40 +top_skin_expand_distance=0.8 +acceleration_ironing=500 +prime_tower_flow=100 +support_xy_overrides_z=xy_overrides_z +machine_nozzle_tip_outer_diameter=1 +min_infill_area=0 +roofing_material_flow=100 +speed_prime_tower=25.0 +support_infill_extruder_nr=0 +support_tree_max_diameter=25 +support_material_flow=100 +bridge_fan_speed=100 +multiple_mesh_overlap=0.15 +wipe_retraction_retract_speed=45 +support_bottom_pattern=grid +support_roof_height=0.8 +gradual_support_infill_steps=0 +meshfix_fluid_motion_small_distance=0.01 +top_bottom_thickness=0.8 +min_skin_width_for_expansion=4.898587196589413e-17 +wall_x_material_flow=100 +infill_material_flow=100 +ironing_monotonic=False +retraction_extrusion_window=10 +support_fan_enable=False +infill_wipe_dist=0.0 +machine_shape=rectangular +support_pattern=zigzag +min_wall_line_width=0.34 +support_connect_zigzags=True +adaptive_layer_height_enabled=False +retraction_min_travel=1.5 +acceleration_layer_0=500 +material_shrinkage_percentage_z=100.0 +material_guid=0ff92885-617b-4144-a03c-9989872454bc +support_roof_line_distance=2.4000240002400024 +brim_line_count=20 +interlocking_depth=2 +wall_x_material_flow_roofing=100 +quality_changes_name=empty +machine_nozzle_size=0.4 +material_extrusion_cool_down_speed=0.7 +acceleration_wall_0_roofing=500 +wall_transition_angle=10 +top_thickness=0.8 +machine_center_is_zero=False +extruders_enabled_count=1 +machine_scale_fan_speed_zero_to_one=False +support_bottom_offset=0.0 +bridge_wall_speed=12.5 +support_roof_enable=True +alternate_extra_perimeter=False +remove_empty_first_layers=True +jerk_topbottom=8 +wall_transition_filter_distance=100 +raft_interface_fan_speed=0 +bridge_wall_coast=100 +skirt_line_count=3 +infill_mesh=False +layer_height=0.2 +material_break_preparation_retracted_position=-16 +support_enable=False +conical_overhang_enabled=False +speed_travel_layer_0=100.0 +support_tree_branch_reach_limit=30 +min_feature_size=0.1 +support_tree_max_diameter_increase_by_merges_when_support_to_model=1 +line_width=0.4 +support_roof_material_flow=100 +machine_max_feedrate_y=500 +alternate_carve_order=True +jerk_roofing=8 +raft_base_line_width=0.8 +top_bottom_pattern_0=lines +support_brim_enable=True +cool_fan_full_at_height=0.6000000000000001 +machine_extruders_share_nozzle=False +acceleration_prime_tower=500 +retraction_hop_after_extruder_switch_height=0.2 +skirt_gap=10.0 +wall_0_material_flow_roofing=100 +jerk_support_roof=8 +machine_extruder_count=1 +xy_offset_layer_0=0 +skirt_brim_extruder_nr=-1 +z_seam_relative=False +small_feature_speed_factor=50 +raft_interface_extruder_nr=0 +material_break_speed=25 +material_initial_print_temperature=200 +material_break_retracted_position=-50 +slicing_tolerance=middle +infill_randomize_start_location=False +mesh_position_y=0 +support_bottom_enable=True +dual=0 +raft_interface_acceleration=500 +magic_fuzzy_skin_point_density=1.25 +support_infill_rate=20 +material_shrinkage_percentage_xy=100.0 +bridge_skin_material_flow=60 +raft_base_jerk=8 +speed_wall_x=25.0 +time=11:55:41 +machine_buildplate_type=glass +top_layers=4 +jerk_ironing=8 +machine_nozzle_head_distance=3 +date=23-11-2023 +wipe_hop_speed=5 +top_skin_preshrink=0.8 +meshfix_fluid_motion_angle=15 +machine_endstop_positive_direction_y=False +raft_interface_thickness=0.30000000000000004 +prime_tower_size=20 +lightning_infill_overhang_angle=40 +small_feature_speed_factor_0=50 +machine_show_variants=False +gradual_infill_steps=0 +material_surface_energy=100 +gantry_height=25 +support_bottom_extruder_nr=0 +speed_support_roof=25.0 +support_bottom_stair_step_min_slope=10.0 +jerk_enabled=False +magic_fuzzy_skin_enabled=False +machine_acceleration=500 +speed_roofing=25.0 +ironing_flow=10.0 +adaptive_layer_height_threshold=0.2 +material_end_of_filament_purge_speed=0.5 +infill_offset_x=0 +brim_replaces_support=False +speed_support_bottom=25.0 +material_bed_temp_wait=True +machine_depth=235 +bridge_wall_material_flow=50 +jerk_travel=8 +retraction_speed=45 +xy_offset=0 +print_temperature=210 +wipe_retraction_extra_prime_amount=0 +support_tree_tip_diameter=0.8 +material_brand=empty_brand +prime_blob_enable=False +jerk_wall=8 +bridge_skin_support_threshold=50 +prime_tower_min_volume=6 +z_seam_y=235 +bottom_skin_expand_distance=0.8 +infill_support_angle=40 +speed_layer_0=20.0 +raft_surface_speed=25.0 +material_name=empty +acceleration_wall_0=500 +magic_spiralize=False +support_interface_priority=interface_area_overwrite_support_area +coasting_enable=False +jerk_infill=8 +initial_extruder_nr=0 diff --git a/stress_benchmark/resources/031.wkt b/stress_benchmark/resources/031.wkt new file mode 100644 index 0000000000..4fcd765f04 --- /dev/null +++ b/stress_benchmark/resources/031.wkt @@ -0,0 +1 @@ +MULTIPOLYGON (((97927 134531, 98345 134621, 98747 134771, 99122 134976, 99464 135232, 99768 135536, 100024 135878, 100229 136253, 100379 136655, 100469 137071, 100500 137500, 100469 137929, 100379 138345, 100229 138747, 100024 139122, 99768 139464, 99464 139768, 99122 140024, 98747 140229, 98345 140379, 97927 140469, 97500 140500, 97073 140469, 96655 140379, 96253 140229, 95878 140024, 95536 139768, 95232 139464, 94976 139122, 94771 138747, 94621 138345, 94531 137929, 94500 137500, 94531 137071, 94621 136655, 94771 136253, 94976 135878, 95232 135536, 95536 135232, 95878 134976, 96253 134771, 96655 134621, 97073 134531, 97500 134500)), ((137927 134531, 138345 134621, 138747 134771, 139122 134976, 139464 135232, 139768 135536, 140024 135878, 140229 136253, 140379 136655, 140469 137071, 140500 137500, 140469 137929, 140379 138345, 140229 138747, 140024 139122, 139768 139464, 139464 139768, 139122 140024, 138747 140229, 138345 140379, 137927 140469, 137500 140500, 137073 140469, 136655 140379, 136253 140229, 135878 140024, 135536 139768, 135232 139464, 134976 139122, 134771 138747, 134621 138345, 134531 137929, 134500 137500, 134531 137071, 134621 136655, 134771 136253, 134976 135878, 135232 135536, 135536 135232, 135878 134976, 136253 134771, 136655 134621, 137073 134531, 137500 134500)), ((117927 114531, 118345 114621, 118747 114771, 119122 114976, 119464 115232, 119768 115536, 120024 115878, 120229 116253, 120379 116655, 120469 117071, 120500 117500, 120469 117929, 120379 118345, 120229 118747, 120024 119122, 119768 119464, 119464 119768, 119122 120024, 118747 120229, 118345 120379, 117927 120469, 117500 120500, 117073 120469, 116655 120379, 116253 120229, 115878 120024, 115536 119768, 115232 119464, 114976 119122, 114771 118747, 114621 118345, 114531 117929, 114500 117500, 114531 117071, 114621 116655, 114771 116253, 114976 115878, 115232 115536, 115536 115232, 115878 114976, 116253 114771, 116655 114621, 117073 114531, 117500 114500)), ((118197 109531, 118889 109622, 119572 109773, 120237 109982, 120882 110250, 121501 110573, 122091 110948, 122644 111373, 123159 111845, 123630 112360, 124055 112914, 124430 113503, 124752 114123, 125019 114768, 125227 115428, 125379 116116, 125469 116805, 125500 117500, 125469 118200, 125378 118889, 125227 119572, 125018 120237, 124750 120882, 124427 121501, 124052 122091, 123627 122644, 123155 123159, 122640 123630, 122086 124055, 121497 124430, 120877 124752, 120232 125019, 119572 125227, 118884 125379, 118192 125469, 117500 125500, 116803 125469, 116111 125378, 115428 125227, 114763 125018, 114118 124750, 113499 124427, 112909 124052, 112356 123627, 111841 123155, 111370 122640, 110945 122086, 110570 121497, 110248 120877, 109981 120232, 109773 119572, 109621 118884, 109531 118195, 109500 117500, 109531 116800, 109622 116111, 109773 115428, 109982 114763, 110250 114118, 110573 113499, 110948 112909, 111373 112356, 111845 111841, 112360 111370, 112914 110945, 113503 110570, 114123 110248, 114768 109981, 115428 109773, 116116 109621, 116808 109531, 117500 109500) (117166 110508, 116504 110571, 115849 110698, 115211 110885, 114591 111133, 114001 111438, 113439 111798, 112916 112210, 112433 112670, 111998 113173, 111611 113716, 111278 114292, 111001 114899, 110784 115528, 110626 116175, 110532 116832, 110500 117500, 110532 118168, 110626 118825, 110784 119472, 111001 120101, 111278 120708, 111611 121284, 111998 121827, 112433 122330, 112916 122790, 113439 123202, 114001 123562, 114591 123867, 115211 124115, 115849 124302, 116504 124429, 117166 124492, 117834 124492, 118496 124429, 119151 124302, 119789 124115, 120409 123867, 120999 123562, 121561 123202, 122084 122790, 122567 122330, 123002 121827, 123389 121284, 123722 120708, 123999 120101, 124216 119472, 124374 118825, 124468 118168, 124500 117500, 124468 116832, 124374 116175, 124216 115528, 123999 114899, 123722 114292, 123389 113716, 123002 113173, 122567 112670, 122084 112210, 121561 111798, 120999 111438, 120409 111133, 119789 110885, 119151 110698, 118496 110571, 117834 110508)), ((118147 102071, 118563 102195, 118956 102377, 119320 102615, 119645 102903, 119925 103234, 120155 103603, 120329 104001, 120443 104418, 120496 104850, 121366 105088, 122211 105384, 123035 105737, 123835 106148, 124603 106612, 125339 107129, 126035 107695, 126692 108308, 127305 108965, 127871 109661, 128388 110397, 128852 111165, 129263 111965, 129616 112789, 129912 113634, 130150 114504, 130574 114555, 130999 114671, 131397 114845, 131766 115075, 132097 115355, 132385 115680, 132623 116044, 132805 116437, 132929 116853, 132992 117283, 132992 117717, 132929 118147, 132805 118563, 132623 118956, 132385 119320, 132097 119645, 131766 119925, 131397 120155, 130999 120329, 130582 120443, 130150 120496, 129912 121366, 129616 122211, 129263 123035, 128852 123835, 128388 124603, 127871 125339, 127305 126035, 126692 126692, 126035 127305, 125339 127871, 124603 128388, 123835 128852, 123035 129263, 122211 129616, 121366 129912, 120496 130150, 120445 130574, 120329 130999, 120155 131397, 119925 131766, 119645 132097, 119320 132385, 118956 132623, 118563 132805, 118147 132929, 117717 132992, 117283 132992, 116853 132929, 116437 132805, 116044 132623, 115680 132385, 115355 132097, 115075 131766, 114845 131397, 114671 130999, 114557 130582, 114504 130150, 113634 129912, 112789 129616, 111965 129263, 111165 128852, 110397 128388, 109661 127871, 108965 127305, 108308 126692, 107695 126035, 107129 125339, 106612 124603, 106148 123835, 105737 123035, 105384 122211, 105088 121366, 104850 120496, 104426 120445, 104001 120329, 103603 120155, 103234 119925, 102903 119645, 102615 119320, 102377 118956, 102195 118563, 102071 118147, 102008 117717, 102008 117283, 102071 116853, 102195 116437, 102377 116044, 102615 115680, 102903 115355, 103234 115075, 103603 114845, 104001 114671, 104418 114557, 104850 114504, 105088 113634, 105384 112789, 105737 111965, 106148 111165, 106612 110397, 107129 109661, 107695 108965, 108308 108308, 108965 107695, 109661 107129, 110397 106612, 111165 106148, 111965 105737, 112789 105384, 113634 105088, 114504 104850, 114555 104426, 114671 104001, 114845 103603, 115075 103234, 115355 102903, 115680 102615, 116044 102377, 116437 102195, 116853 102071, 117283 102008, 117717 102008) (120226 106252, 120022 106625, 119765 106967, 119462 107269, 119120 107525, 118745 107730, 118344 107879, 117927 107969, 117500 108000, 117073 107969, 116656 107879, 116255 107730, 115880 107525, 115538 107269, 115235 106967, 114978 106625, 114774 106252, 114623 105850, 113785 106090, 112971 106388, 112179 106744, 111414 107158, 110682 107625, 109984 108145, 109328 108713, 108713 109328, 108145 109984, 107625 110682, 107158 111414, 106744 112179, 106388 112971, 106090 113785, 105850 114623, 106252 114774, 106625 114978, 106967 115235, 107269 115538, 107525 115880, 107730 116255, 107879 116656, 107969 117073, 108000 117500, 107969 117927, 107879 118344, 107730 118745, 107525 119120, 107269 119462, 106967 119765, 106625 120022, 106252 120226, 105850 120377, 106090 121215, 106388 122029, 106744 122821, 107158 123586, 107625 124318, 108145 125016, 108713 125672, 109328 126287, 109984 126855, 110682 127375, 111414 127842, 112179 128256, 112971 128612, 113785 128910, 114623 129150, 114774 128748, 114978 128375, 115235 128033, 115538 127731, 115880 127475, 116255 127270, 116656 127121, 117073 127031, 117500 127000, 117927 127031, 118344 127121, 118745 127270, 119120 127475, 119462 127731, 119765 128033, 120022 128375, 120226 128748, 120377 129150, 121215 128910, 122029 128612, 122821 128256, 123586 127842, 124318 127375, 125016 126855, 125672 126287, 126287 125672, 126855 125016, 127375 124318, 127842 123586, 128256 122821, 128612 122029, 128910 121215, 129150 120377, 128748 120226, 128375 120022, 128033 119765, 127731 119462, 127475 119120, 127270 118745, 127121 118344, 127031 117927, 127000 117500, 127031 117073, 127121 116656, 127270 116255, 127475 115880, 127731 115538, 128033 115235, 128375 114978, 128748 114774, 129150 114623, 128910 113785, 128612 112971, 128256 112179, 127842 111414, 127375 110682, 126855 109984, 126287 109328, 125672 108713, 125016 108145, 124318 107625, 123586 107158, 122821 106744, 122029 106388, 121215 106090, 120377 105850)), ((118575 99031, 119649 99125, 120712 99281, 121767 99499, 122806 99777, 123827 100116, 124828 100513, 125802 100968, 126751 101479, 127665 102043, 128547 102661, 129392 103329, 130195 104043, 130957 104805, 131671 105608, 132339 106453, 132957 107335, 133521 108249, 134032 109198, 134487 110172, 134884 111173, 135223 112194, 135501 113233, 135719 114288, 135875 115351, 135968 116421, 136000 117500, 135968 118579, 135875 119649, 135719 120712, 135501 121767, 135223 122806, 134884 123827, 134487 124828, 134032 125802, 133521 126751, 132957 127665, 132339 128547, 131671 129392, 130957 130195, 130195 130957, 129392 131671, 128547 132339, 127665 132957, 126751 133521, 125802 134032, 124828 134487, 123827 134884, 122806 135223, 121767 135501, 120712 135719, 119649 135875, 118575 135969, 117500 136000, 116425 135969, 115351 135875, 114288 135719, 113233 135501, 112194 135223, 111173 134884, 110172 134487, 109198 134032, 108249 133521, 107335 132957, 106453 132339, 105608 131671, 104805 130957, 104043 130195, 103329 129392, 102661 128547, 102043 127665, 101479 126751, 100968 125802, 100513 124828, 100116 123827, 99777 122806, 99499 121767, 99281 120712, 99125 119649, 99032 118579, 99000 117500, 99032 116421, 99125 115351, 99281 114288, 99499 113233, 99777 112194, 100116 111173, 100513 110172, 100968 109198, 101479 108249, 102043 107335, 102661 106453, 103329 105608, 104043 104805, 104805 104043, 105608 103329, 106453 102661, 107335 102043, 108249 101479, 109198 100968, 110172 100513, 111173 100116, 112194 99777, 113233 99499, 114288 99281, 115351 99125, 116425 99031, 117500 99000) (116444 100032, 115390 100128, 114346 100287, 113311 100509, 112294 100792, 111294 101137, 110318 101542, 109368 102004, 108446 102524, 107560 103097, 106707 103725, 105896 104401, 105126 105126, 104401 105896, 103725 106707, 103097 107560, 102524 108446, 102004 109368, 101542 110318, 101137 111294, 100792 112294, 100509 113311, 100287 114346, 100128 115389, 100032 116440, 100000 117500, 100032 118560, 100128 119611, 100287 120654, 100509 121689, 100792 122706, 101137 123706, 101542 124682, 102004 125632, 102524 126554, 103097 127440, 103725 128293, 104401 129104, 105126 129874, 105896 130599, 106707 131275, 107560 131903, 108446 132476, 109368 132996, 110318 133458, 111294 133863, 112294 134208, 113311 134491, 114346 134713, 115390 134872, 116444 134968, 117500 135000, 118556 134968, 119610 134872, 120654 134713, 121689 134491, 122706 134208, 123706 133863, 124682 133458, 125632 132996, 126554 132476, 127440 131903, 128293 131275, 129104 130599, 129874 129874, 130599 129104, 131275 128293, 131903 127440, 132476 126554, 132996 125632, 133458 124682, 133863 123706, 134208 122706, 134491 121689, 134713 120654, 134872 119611, 134968 118560, 135000 117500, 134968 116440, 134872 115389, 134713 114346, 134491 113311, 134208 112294, 133863 111294, 133458 110318, 132996 109368, 132476 108446, 131903 107560, 131275 106707, 130599 105896, 129874 105126, 129104 104401, 128293 103725, 127440 103097, 126554 102524, 125632 102004, 124682 101542, 123706 101137, 122706 100792, 121689 100509, 120654 100287, 119610 100128, 118556 100032, 117500 100000)), ((137927 94531, 138345 94621, 138747 94771, 139122 94976, 139464 95232, 139768 95536, 140024 95878, 140229 96253, 140379 96655, 140469 97071, 140500 97500, 140469 97929, 140379 98345, 140229 98747, 140024 99122, 139768 99464, 139464 99768, 139122 100024, 138747 100229, 138345 100379, 137927 100469, 137500 100500, 137073 100469, 136655 100379, 136253 100229, 135878 100024, 135536 99768, 135232 99464, 134976 99122, 134771 98747, 134621 98345, 134531 97929, 134500 97500, 134531 97071, 134621 96655, 134771 96253, 134976 95878, 135232 95536, 135536 95232, 135878 94976, 136253 94771, 136655 94621, 137073 94531, 137500 94500)), ((97927 94531, 98345 94621, 98747 94771, 99122 94976, 99464 95232, 99768 95536, 100024 95878, 100229 96253, 100379 96655, 100469 97071, 100500 97500, 100469 97929, 100379 98345, 100229 98747, 100024 99122, 99768 99464, 99464 99768, 99122 100024, 98747 100229, 98345 100379, 97927 100469, 97500 100500, 97073 100469, 96655 100379, 96253 100229, 95878 100024, 95536 99768, 95232 99464, 94976 99122, 94771 98747, 94621 98345, 94531 97929, 94500 97500, 94531 97071, 94621 96655, 94771 96253, 94976 95878, 95232 95536, 95536 95232, 95878 94976, 96253 94771, 96655 94621, 97073 94531, 97500 94500))) \ No newline at end of file From 92ea208ec8802331370441bc542f04d667026766 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 23 Nov 2023 12:51:15 +0100 Subject: [PATCH 464/470] Fix setting writing CURA-11378 --- src/WallsComputation.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WallsComputation.cpp b/src/WallsComputation.cpp index 17e8c44316..ff40e0ce93 100644 --- a/src/WallsComputation.cpp +++ b/src/WallsComputation.cpp @@ -107,6 +107,10 @@ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) { continue; } + if (value.find(' ') != std::string::npos) + { + continue; + } SettingsFile << key << "=" << value << std::endl; } SettingsFile.close(); From ebf2c68a5404869d0d5c5c76da36550ab4958d9e Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Thu, 23 Nov 2023 12:51:30 +0100 Subject: [PATCH 465/470] Remove debug wkt writing CURA-11378 --- src/WallsComputation.cpp | 57 ---------------------------------------- 1 file changed, 57 deletions(-) diff --git a/src/WallsComputation.cpp b/src/WallsComputation.cpp index ff40e0ce93..248dffb9ce 100644 --- a/src/WallsComputation.cpp +++ b/src/WallsComputation.cpp @@ -96,63 +96,6 @@ void WallsComputation::generateWalls(SliceLayerPart* part, SectionType section_t */ void WallsComputation::generateWalls(SliceLayer* layer, SectionType section) { - // TODO remove this block before merging PR! - // This code exists to generate the test wkt, and setting files - { - std::ofstream SettingsFile("settings.txt"); - SettingsFile.clear(); - for (auto [key, value] : settings.getFlattendSettings()) - { - if (value == "") - { - continue; - } - if (value.find(' ') != std::string::npos) - { - continue; - } - SettingsFile << key << "=" << value << std::endl; - } - SettingsFile.close(); - - std::ofstream PolygonFile("slice_polygon.wkt"); - PolygonFile.clear(); - - std::vector multi_polygons; - for (const auto& part : layer->parts) - { - multi_polygons.push_back(part.outline); - } - - PolygonFile << "MULTIPOLYGON ("; - const auto paths_str = multi_polygons - | ranges::views::transform( - [](const auto& path) - { - const auto path_str = path - | ranges::views::transform( - [](const auto& path) - { - const auto path_str = path - | ranges::views::transform( - [](const auto& point) - { - return fmt::format("{} {}", point.X, point.Y); - }) - | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); - return "(" + path_str + ")"; - }) - | ranges::views::join(ranges::views::c_str(" ")) | ranges::to(); - return "(" + path_str + ")"; - }) - | ranges::views::join(ranges::views::c_str(", ")) | ranges::to(); - - PolygonFile << paths_str; - PolygonFile << ")"; - - PolygonFile.close(); - } - for (SliceLayerPart& part : layer->parts) { generateWalls(&part, section); From 49f8400403d510997c89e328ede0208709c7cec4 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 24 Nov 2023 21:27:52 +0100 Subject: [PATCH 466/470] Fix issue where part of raft was missing CURA-11355 --- src/FffGcodeWriter.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index a42d12889d..bb803e6a73 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -929,9 +929,37 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) skip_some_zags, zag_skip_count, pocket_size); + std::vector raft_paths; // Should remain empty, since we have no walls. infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); - gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); + + const auto wipe_dist = 0; + const auto spiralize = false; + const auto flow_ratio = 1.0_r; + const auto enable_travel_optimization = false; + const auto always_retract = false; + const auto reverse_order = false; + + gcode_layer.addLinesByOptimizer( + raft_lines, + gcode_layer.configs_storage.raft_surface_config, + SpaceFillType::Lines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + last_planned_position + ); + gcode_layer.addPolygonsByOptimizer( + raft_polygons, + gcode_layer.configs_storage.raft_surface_config, + ZSeamConfig(), + wipe_dist, + spiralize, + flow_ratio, + always_retract, + reverse_order, + gcode_layer.getLastPlannedPositionOrStartingPosition() + ); raft_polygons.clear(); raft_lines.clear(); From 1d7038b8a67d7eb76bd16ae3782935da4b731636 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Fri, 24 Nov 2023 20:28:24 +0000 Subject: [PATCH 467/470] Applied clang-format. --- src/FffGcodeWriter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index bb803e6a73..e9694634f8 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -947,8 +947,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) enable_travel_optimization, wipe_dist, flow_ratio, - last_planned_position - ); + last_planned_position); gcode_layer.addPolygonsByOptimizer( raft_polygons, gcode_layer.configs_storage.raft_surface_config, @@ -958,8 +957,7 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) flow_ratio, always_retract, reverse_order, - gcode_layer.getLastPlannedPositionOrStartingPosition() - ); + gcode_layer.getLastPlannedPositionOrStartingPosition()); raft_polygons.clear(); raft_lines.clear(); From e1b96412e4176fe24d14fe2e7ce65f2d2f52ac9c Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Sat, 25 Nov 2023 11:12:03 +0100 Subject: [PATCH 468/470] Remove `ReadTestSettings` class CURA-11378 --- CMakeLists.txt | 2 +- tests/ReadTestSettings.cpp | 43 -------------------------------------- tests/ReadTestSettings.h | 13 ------------ 3 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 tests/ReadTestSettings.cpp delete mode 100644 tests/ReadTestSettings.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c5109f8ce6..82b2319188 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,7 +245,7 @@ target_compile_definitions(CuraEngine PRIVATE VERSION=\"${CURA_ENGINE_VERSION}\" # Compiling the test environment. if (ENABLE_TESTING OR ENABLE_BENCHMARKS) - set(TESTS_HELPERS_SRC tests/ReadTestPolygons.cpp tests/ReadTestSettings.cpp) + set(TESTS_HELPERS_SRC tests/ReadTestPolygons.cpp) set(TESTS_SRC_ARCUS) if (ENABLE_ARCUS) diff --git a/tests/ReadTestSettings.cpp b/tests/ReadTestSettings.cpp deleted file mode 100644 index 8c384e5053..0000000000 --- a/tests/ReadTestSettings.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher. - -#include "ReadTestSettings.h" -#include -#include - -namespace cura -{ - -bool readTestSettings(const std::string& filename, Settings& settings) -{ - spdlog::info("filename: {}", filename); - - FILE* handle = std::fopen(filename.c_str(), "r"); - if (! handle) - { - spdlog::error("Failed to open file: {}", filename); - return false; - } - - while (true) - { - char key[100]; - char value[100]; - - int read = std::fscanf(handle, "%[a-zA-Z0-9_]=%[][a-zA-Z0-9_-.,:()/; ]\n", key, value); - - if (read == EOF) - { - break; - } - else if (read <= 0) - { - return false; - } - - settings.add(std::string(key), std::string(value)); - } - - return true; -} -} // namespace cura \ No newline at end of file diff --git a/tests/ReadTestSettings.h b/tests/ReadTestSettings.h deleted file mode 100644 index 63f8d6d6fd..0000000000 --- a/tests/ReadTestSettings.h +++ /dev/null @@ -1,13 +0,0 @@ - -// Copyright (c) 2023 UltiMaker -// CuraEngine is released under the terms of the AGPLv3 or higher. - - -#include "settings/Settings.h" -#include -#include - -namespace cura -{ -bool readTestSettings(const std::string& filename, Settings& settings_out); -} \ No newline at end of file From edffb9762ead06e0ef543bf778ae281dcb62487b Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 28 Nov 2023 13:32:19 +0100 Subject: [PATCH 469/470] Exclude Windows from stress-benchmark (uses 'fork') + fix copy-folder. done as part of CURA-11378 --- CMakeLists.txt | 4 +++- conanfile.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82b2319188..5f69116126 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,7 +274,9 @@ endif () if (ENABLE_BENCHMARKS) add_subdirectory(benchmark) - add_subdirectory(stress_benchmark) + if (NOT WIN32) + add_subdirectory(stress_benchmark) + endif() endif () if (ENABLE_TESTING) diff --git a/conanfile.py b/conanfile.py index 5764da2ff0..1a606e0fb1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -51,7 +51,8 @@ def export_sources(self): copy(self, "*", path.join(self.recipe_folder, "src"), path.join(self.export_sources_folder, "src")) copy(self, "*", path.join(self.recipe_folder, "include"), path.join(self.export_sources_folder, "include")) copy(self, "*", path.join(self.recipe_folder, "benchmark"), path.join(self.export_sources_folder, "benchmark")) - copy(self, "*", path.join(self.recipe_folder, "stress_benchmark"), path.join(self.export_sources_folder, "benchmark")) + if self.settings.os != "Windows": + copy(self, "*", path.join(self.recipe_folder, "stress_benchmark"), path.join(self.export_sources_folder, "stress_benchmark")) copy(self, "*", path.join(self.recipe_folder, "tests"), path.join(self.export_sources_folder, "tests")) def config_options(self): From 686fc0bb7be8156bcc739a72161c9707bfe3a110 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 28 Nov 2023 13:48:28 +0100 Subject: [PATCH 470/470] ... but _don't_ exclude anything when exporting sources. part of CURA-11378 --- conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 1a606e0fb1..81c20f819a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -51,8 +51,7 @@ def export_sources(self): copy(self, "*", path.join(self.recipe_folder, "src"), path.join(self.export_sources_folder, "src")) copy(self, "*", path.join(self.recipe_folder, "include"), path.join(self.export_sources_folder, "include")) copy(self, "*", path.join(self.recipe_folder, "benchmark"), path.join(self.export_sources_folder, "benchmark")) - if self.settings.os != "Windows": - copy(self, "*", path.join(self.recipe_folder, "stress_benchmark"), path.join(self.export_sources_folder, "stress_benchmark")) + copy(self, "*", path.join(self.recipe_folder, "stress_benchmark"), path.join(self.export_sources_folder, "stress_benchmark")) copy(self, "*", path.join(self.recipe_folder, "tests"), path.join(self.export_sources_folder, "tests")) def config_options(self):