OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Arachne::BeadingStrategyFactory Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Arachne/BeadingStrategy/BeadingStrategyFactory.hpp>

Static Public Member Functions

static BeadingStrategyPtr makeStrategy (coord_t preferred_bead_width_outer=scaled< coord_t >(0.0005), coord_t preferred_bead_width_inner=scaled< coord_t >(0.0005), coord_t preferred_transition_length=scaled< coord_t >(0.0004), float transitioning_angle=M_PI/4.0, bool print_thin_walls=false, coord_t min_bead_width=0, coord_t min_feature_size=0, double wall_split_middle_threshold=0.5, double wall_add_middle_threshold=0.5, coord_t max_bead_count=0, coord_t outer_wall_offset=0, int inward_distributed_center_wall_count=2, double minimum_variable_line_width=0.5)

Detailed Description

Member Function Documentation

◆ makeStrategy()

BeadingStrategyPtr Slic3r::Arachne::BeadingStrategyFactory::makeStrategy ( coord_t preferred_bead_width_outer = scaled<coord_t>(0.0005),
coord_t preferred_bead_width_inner = scaled<coord_t>(0.0005),
coord_t preferred_transition_length = scaled<coord_t>(0.0004),
float transitioning_angle = M_PI / 4.0,
bool print_thin_walls = false,
coord_t min_bead_width = 0,
coord_t min_feature_size = 0,
double wall_split_middle_threshold = 0.5,
double wall_add_middle_threshold = 0.5,
coord_t max_bead_count = 0,
coord_t outer_wall_offset = 0,
int inward_distributed_center_wall_count = 2,
double minimum_variable_line_width = 0.5 )
static
33{
34 // Handle a special case when there is just one external perimeter.
35 // Because big differences in bead width for inner and other perimeters cause issues with current beading strategies.
36 const coord_t optimal_width = max_bead_count <= 2 ? preferred_bead_width_outer : preferred_bead_width_inner;
37 BeadingStrategyPtr ret = std::make_unique<DistributedBeadingStrategy>(optimal_width, preferred_transition_length, transitioning_angle,
38 wall_split_middle_threshold, wall_add_middle_threshold,
39 inward_distributed_center_wall_count);
40
41 BOOST_LOG_TRIVIAL(trace) << "Applying the Redistribute meta-strategy with outer-wall width = " << preferred_bead_width_outer << ", inner-wall width = " << preferred_bead_width_inner << ".";
42 ret = std::make_unique<RedistributeBeadingStrategy>(preferred_bead_width_outer, minimum_variable_line_ratio, std::move(ret));
43
44 if (print_thin_walls) {
45 BOOST_LOG_TRIVIAL(trace) << "Applying the Widening Beading meta-strategy with minimum input width " << min_feature_size << " and minimum output width " << min_bead_width << ".";
46 ret = std::make_unique<WideningBeadingStrategy>(std::move(ret), min_feature_size, min_bead_width);
47 }
48 // Orca: we allow negative outer_wall_offset here
49 if (outer_wall_offset != 0) {
50 BOOST_LOG_TRIVIAL(trace) << "Applying the OuterWallOffset meta-strategy with offset = " << outer_wall_offset << ".";
51 ret = std::make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, std::move(ret));
52 }
53
54 // Apply the LimitedBeadingStrategy last, since that adds a 0-width marker wall which other beading strategies shouldn't touch.
55 BOOST_LOG_TRIVIAL(trace) << "Applying the Limited Beading meta-strategy with maximum bead count = " << max_bead_count << ".";
56 ret = std::make_unique<LimitedBeadingStrategy>(max_bead_count, std::move(ret));
57 return ret;
58}
int64_t coord_t
Definition libslic3r.h:48
std::unique_ptr< BeadingStrategy > BeadingStrategyPtr
Definition BeadingStrategy.hpp:118
void trace(unsigned int level, const char *message)
Definition utils.cpp:247

References Slic3r::trace().

Referenced by Slic3r::Arachne::WallToolPaths::generate().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: