OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::OverhangCluster Struct Reference
Collaboration diagram for Slic3r::OverhangCluster:

Public Member Functions

 OverhangCluster (ExPolygon *overhang, int layer_nr, coordf_t offset_scaled)
void insert (ExPolygon *overhang_new, int layer_nr)
int height ()
bool intersects (const ExPolygon &overhang_new, int layer_nr)

Public Attributes

std::map< int, std::vector< ExPolygon * > > layer_overhangs
ExPolygons merged_overhangs_dilated
int min_layer = 1e7
int max_layer = 0
coordf_t offset_scaled = 0
bool is_cantilever = false
bool is_sharp_tail = false
bool is_small_overhang = false

Detailed Description

Constructor & Destructor Documentation

◆ OverhangCluster()

Slic3r::OverhangCluster::OverhangCluster ( ExPolygon * overhang,
int layer_nr,
coordf_t offset_scaled )
inline
2125 {
2127 insert(overhang, layer_nr);
2128 }
void insert(ExPolygon *overhang_new, int layer_nr)
Definition SupportMaterial.cpp:2130
coordf_t offset_scaled
Definition SupportMaterial.cpp:2120

References insert(), and offset_scaled.

Here is the call graph for this function:

Member Function Documentation

◆ height()

int Slic3r::OverhangCluster::height ( )
inline
2144 {
2145 return max_layer - min_layer + 1;
2146 }
int max_layer
Definition SupportMaterial.cpp:2119
int min_layer
Definition SupportMaterial.cpp:2118

References max_layer, and min_layer.

◆ insert()

void Slic3r::OverhangCluster::insert ( ExPolygon * overhang_new,
int layer_nr )
inline
2130 {
2131 if (layer_overhangs.find(layer_nr) != layer_overhangs.end()) {
2132 layer_overhangs[layer_nr].push_back(overhang_new);
2133 }
2134 else {
2135 layer_overhangs.emplace(layer_nr, std::vector<ExPolygon*>{ overhang_new });
2136 }
2137 ExPolygons overhang_dilated = offset_scaled > EPSILON ? offset_ex(*overhang_new, offset_scaled) : ExPolygons{ *overhang_new };
2138 if (!overhang_dilated.empty())
2140 min_layer = std::min(min_layer, layer_nr);
2141 max_layer = std::max(max_layer, layer_nr);
2142 }
#define EPSILON
Definition ColorUtils.cpp:64
std::vector< ExPolygon > ExPolygons
Definition ExPolygon.hpp:20
Slic3r::ExPolygons offset_ex(const Slic3r::Polygons &polygons, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:605
Slic3r::ExPolygons union_ex(const Slic3r::Polygons &subject, PolyFillType fill_type)
Definition ClipperUtils.cpp:1011
std::map< int, std::vector< ExPolygon * > > layer_overhangs
Definition SupportMaterial.cpp:2116
ExPolygons merged_overhangs_dilated
Definition SupportMaterial.cpp:2117

References EPSILON, layer_overhangs, max_layer, merged_overhangs_dilated, min_layer, Slic3r::offset_ex(), offset_scaled, and Slic3r::union_ex().

Referenced by OverhangCluster().

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

◆ intersects()

bool Slic3r::OverhangCluster::intersects ( const ExPolygon & overhang_new,
int layer_nr )
inline
2148 {
2149 if (layer_nr < 1)
2150 return false;
2151
2152 //auto it = layer_overhangs.find(layer_nr - 1);
2153 //if (it == layer_overhangs.end())
2154 // return false;
2155 //ExPolygons overhangs_lower;
2156 //for (ExPolygon* poly : it->second) {
2157 // overhangs_lower.push_back(*poly);
2158 //}
2159 if (layer_nr<min_layer - 1 || layer_nr>max_layer + 1)
2160 return false;
2161 const ExPolygons overhang_dilated = offset_ex(overhang_new, offset_scaled);
2162 return overlaps(overhang_dilated, merged_overhangs_dilated);
2163 }
bool overlaps(const ExPolygons &expolys1, const ExPolygons &expolys2)
Definition ExPolygon.cpp:192

References max_layer, merged_overhangs_dilated, Slic3r::offset_ex(), offset_scaled, and Slic3r::overlaps().

Here is the call graph for this function:

Member Data Documentation

◆ is_cantilever

bool Slic3r::OverhangCluster::is_cantilever = false

◆ is_sharp_tail

bool Slic3r::OverhangCluster::is_sharp_tail = false

◆ is_small_overhang

bool Slic3r::OverhangCluster::is_small_overhang = false

◆ layer_overhangs

std::map<int, std::vector<ExPolygon*> > Slic3r::OverhangCluster::layer_overhangs

Referenced by insert().

◆ max_layer

int Slic3r::OverhangCluster::max_layer = 0

Referenced by height(), insert(), and intersects().

◆ merged_overhangs_dilated

ExPolygons Slic3r::OverhangCluster::merged_overhangs_dilated

Referenced by insert(), and intersects().

◆ min_layer

int Slic3r::OverhangCluster::min_layer = 1e7

Referenced by height(), and insert().

◆ offset_scaled

coordf_t Slic3r::OverhangCluster::offset_scaled = 0

Referenced by OverhangCluster(), insert(), and intersects().


The documentation for this struct was generated from the following file: