Implemented avoid_crossing_perimeters with VisiLibity

This commit is contained in:
Alessandro Ranellucci 2014-05-13 20:06:01 +02:00
parent a02a7f1a0f
commit 5fe5021fd7
19 changed files with 6216 additions and 13 deletions

View file

@ -84,11 +84,14 @@ ExPolygon::is_valid() const
bool
ExPolygon::contains_line(const Line &line) const
{
Polylines pl;
pl.push_back(line);
return this->contains_polyline(line);
}
bool
ExPolygon::contains_polyline(const Polyline &polyline) const
{
Polylines pl_out;
diff(pl, *this, pl_out);
diff((Polylines)polyline, *this, pl_out);
return pl_out.empty();
}