mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-24 17:26:47 +00:00
* Fix calls to depreciated wxPen constructor * Fix use of wxTimerEvent * Fix unrecognized character escape sequence * Fix signed/unsigned mismatch At least as much as possible without significantly altering parts of the application * Clean unreferenced variables * fix mistyped namespace selector * Update deprecated calls * Fix preprocessor statement * Remove empty switch statements * Change int vector used as bool to bool vector * Remove empty control statements and related unused code * Change multi character constant to string constant * Fix discarded return value json::parse was being called on the object, rather than statically like it should be. Also, the value was not being captured. * Rename ICON_SIZE def used by MultiMachine By having the definition in the header, it causes issues when other files define ICON_SIZE. By renaming it to MM_ICON_SIZE, this lessens the issue. It would probably be ideal to have the definitions in the respective .cpp that use them, but it would make it less convenient to update the values if needed in the future. * Remove unused includes * Fix linux/macOS compilation * Hide unused-function errors on non-Windows systems * Disable signed/unsigned comparison mismatch error * Remove/Disable more unused variables Still TODO: check double for loop in Print.cpp * Remove unused variable that was missed * Remove unused variables in libraries in the src folder * Apply temporary fix for subobject linkage error * Remove/Disable last set of unused variables reported by GCC * remove redundant for loop * fix misspelled ifdef check * Update message on dialog * Fix hard-coded platform specific modifier keys * Remove duplicate for loop * Disable -Wmisleading-indentation warning * disable -Wswitch warning * Remove unused local typedefs * Fix -Wunused-value * Fix pragma error on Windows from subobject linkage fix * Fix -Waddress * Fix null conversions (-Wconversion-null) --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
54 lines
2.6 KiB
C++
54 lines
2.6 KiB
C++
//Copyright (c) 2022 Ultimaker B.V.
|
|
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
|
|
|
#include "BeadingStrategyFactory.hpp"
|
|
|
|
#include "LimitedBeadingStrategy.hpp"
|
|
#include "WideningBeadingStrategy.hpp"
|
|
#include "DistributedBeadingStrategy.hpp"
|
|
#include "RedistributeBeadingStrategy.hpp"
|
|
#include "OuterWallInsetBeadingStrategy.hpp"
|
|
|
|
#include <boost/log/trivial.hpp>
|
|
|
|
namespace Slic3r::Arachne
|
|
{
|
|
|
|
BeadingStrategyPtr BeadingStrategyFactory::makeStrategy(
|
|
const coord_t preferred_bead_width_outer,
|
|
const coord_t preferred_bead_width_inner,
|
|
const coord_t preferred_transition_length,
|
|
const float transitioning_angle,
|
|
const bool print_thin_walls,
|
|
const coord_t min_bead_width,
|
|
const coord_t min_feature_size,
|
|
const double wall_split_middle_threshold,
|
|
const double wall_add_middle_threshold,
|
|
const coord_t max_bead_count,
|
|
const coord_t outer_wall_offset,
|
|
const int inward_distributed_center_wall_count,
|
|
const double minimum_variable_line_ratio
|
|
)
|
|
{
|
|
BeadingStrategyPtr ret = std::make_unique<DistributedBeadingStrategy>(preferred_bead_width_inner, preferred_transition_length, transitioning_angle, wall_split_middle_threshold, wall_add_middle_threshold, inward_distributed_center_wall_count);
|
|
BOOST_LOG_TRIVIAL(debug) << "Applying the Redistribute meta-strategy with outer-wall width = " << preferred_bead_width_outer << ", inner-wall width = " << preferred_bead_width_inner << ".";
|
|
ret = std::make_unique<RedistributeBeadingStrategy>(preferred_bead_width_outer, minimum_variable_line_ratio, std::move(ret));
|
|
|
|
if (print_thin_walls) {
|
|
BOOST_LOG_TRIVIAL(debug) << "Applying the Widening Beading meta-strategy with minimum input width " << min_feature_size << " and minimum output width " << min_bead_width << ".";
|
|
ret = std::make_unique<WideningBeadingStrategy>(std::move(ret), min_feature_size, min_bead_width);
|
|
}
|
|
// Orca: we allow negative outer_wall_offset here
|
|
if (outer_wall_offset != 0)
|
|
{
|
|
BOOST_LOG_TRIVIAL(debug) << "Applying the OuterWallOffset meta-strategy with offset = " << outer_wall_offset << ".";
|
|
ret = std::make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, std::move(ret));
|
|
}
|
|
|
|
//Apply the LimitedBeadingStrategy last, since that adds a 0-width marker wall which other beading strategies shouldn't touch.
|
|
BOOST_LOG_TRIVIAL(debug) << "Applying the Limited Beading meta-strategy with maximum bead count = " << max_bead_count << ".";
|
|
ret = std::make_unique<LimitedBeadingStrategy>(max_bead_count, std::move(ret));
|
|
return ret;
|
|
}
|
|
} // namespace Slic3r::Arachne
|