OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{SupportCommon.cpp} Namespace Reference

Functions

int object_layer_id_at_z (const PrintObject &object, const coordf_t print_z)
bool support_layer_uses_interface_material (const SupportGeneratorLayer &layer)
void trim_polygons (Polygons &polygons, const Polygons &excluded)

Function Documentation

◆ object_layer_id_at_z()

int Slic3r::anonymous_namespace{SupportCommon.cpp}::object_layer_id_at_z ( const PrintObject & object,
const coordf_t print_z )
62{
63 const ConstLayerPtrsAdaptor layers = object.layers();
64 if (layers.empty())
65 return -1;
66 const auto it = std::lower_bound(layers.begin(), layers.end(), print_z - EPSILON,
67 [](const Layer *layer, const coordf_t z) { return layer->print_z < z; });
68 return int(it == layers.end() ? layers.size() - 1 : size_t(it - layers.begin()));
69}
#define EPSILON
Definition ColorUtils.cpp:64
Definition Print.hpp:223
T *const * begin() const
Definition Print.hpp:205
T *const * end() const
Definition Print.hpp:206
size_t size() const
Definition Print.hpp:210
bool empty() const
Definition Print.hpp:211
Definition Layer.hpp:138
double coordf_t
Definition GUI_ObjectList.hpp:46

References Slic3r::ConstVectorOfPtrsAdaptor< T >::begin(), Slic3r::ConstVectorOfPtrsAdaptor< T >::empty(), Slic3r::ConstVectorOfPtrsAdaptor< T >::end(), EPSILON, object_layer_id_at_z(), and Slic3r::ConstVectorOfPtrsAdaptor< T >::size().

Referenced by object_layer_id_at_z().

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

◆ support_layer_uses_interface_material()

bool Slic3r::anonymous_namespace{SupportCommon.cpp}::support_layer_uses_interface_material ( const SupportGeneratorLayer & layer)
72{
73 return one_of(layer.layer_type, {
74 SupporLayerType::RaftInterface,
75 SupporLayerType::BottomContact,
76 SupporLayerType::BottomInterface,
77 SupporLayerType::TopContact,
78 SupporLayerType::TopInterface });
79}
SupporLayerType layer_type
Definition SupportLayer.hpp:93
bool one_of(const ValueType &v, const ContainerType &c)
Definition libslic3r.h:295

References Slic3r::SupportGeneratorLayer::layer_type, Slic3r::one_of(), and support_layer_uses_interface_material().

Referenced by support_layer_uses_interface_material().

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

◆ trim_polygons()

void Slic3r::anonymous_namespace{SupportCommon.cpp}::trim_polygons ( Polygons & polygons,
const Polygons & excluded )
82{
83 if (!polygons.empty() && !excluded.empty())
84 polygons = diff(polygons, excluded, ApplySafetyOffset::Yes);
85}
@ Yes
Definition ClipperUtils.hpp:51
Slic3r::Polygons diff(const Slic3r::Polygon &subject, const Slic3r::Polygon &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:731

References Slic3r::diff(), trim_polygons(), and Slic3r::Yes.

Referenced by trim_polygons().

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