Fixed a missing include problem in SLASupportAuto.hpp
This commit is contained in:
parent
2759c87e5b
commit
b7465e935e
2 changed files with 13 additions and 9 deletions
|
@ -499,6 +499,18 @@ void SLAAutoSupports::uniformly_cover(const ExPolygons& islands, Structure& stru
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float SLAAutoSupports::Structure::overlap_area(const Structure &rhs) const
|
||||||
|
{
|
||||||
|
double out = 0.;
|
||||||
|
if (this->bbox.overlap(rhs.bbox)) {
|
||||||
|
Polygons polys = intersection(to_polygons(*this->polygon), to_polygons(*rhs.polygon), false);
|
||||||
|
for (const Polygon &poly : polys)
|
||||||
|
out += poly.area();
|
||||||
|
}
|
||||||
|
|
||||||
|
return float(out);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SLA_AUTOSUPPORTS_DEBUG
|
#ifdef SLA_AUTOSUPPORTS_DEBUG
|
||||||
void SLAAutoSupports::output_structures(const std::vector<Structure>& structures)
|
void SLAAutoSupports::output_structures(const std::vector<Structure>& structures)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,15 +71,7 @@ public:
|
||||||
bool overlaps(const Structure &rhs) const {
|
bool overlaps(const Structure &rhs) const {
|
||||||
return this->bbox.overlap(rhs.bbox) && (this->polygon->overlaps(*rhs.polygon) || rhs.polygon->overlaps(*this->polygon));
|
return this->bbox.overlap(rhs.bbox) && (this->polygon->overlaps(*rhs.polygon) || rhs.polygon->overlaps(*this->polygon));
|
||||||
}
|
}
|
||||||
float overlap_area(const Structure &rhs) const {
|
float overlap_area(const Structure &rhs) const;
|
||||||
double out = 0.;
|
|
||||||
if (this->bbox.overlap(rhs.bbox)) {
|
|
||||||
Polygons polys = intersection(to_polygons(*this->polygon), to_polygons(*rhs.polygon), false);
|
|
||||||
for (const Polygon &poly : polys)
|
|
||||||
out += poly.area();
|
|
||||||
}
|
|
||||||
return float(out);
|
|
||||||
}
|
|
||||||
float area_below() const {
|
float area_below() const {
|
||||||
float area = 0.f;
|
float area = 0.f;
|
||||||
for (const Link &below : this->islands_below)
|
for (const Link &below : this->islands_below)
|
||||||
|
|
Loading…
Reference in a new issue