mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Incomplete work for using Boost.Polygon to compute medial axis
This commit is contained in:
@@ -22,14 +22,20 @@ Lines
|
||||
Polygon::lines() const
|
||||
{
|
||||
Lines lines;
|
||||
lines.reserve(this->points.size());
|
||||
for (Points::const_iterator it = this->points.begin(); it != this->points.end()-1; ++it) {
|
||||
lines.push_back(Line(*it, *(it + 1)));
|
||||
}
|
||||
lines.push_back(Line(this->points.back(), this->points.front()));
|
||||
this->lines(&lines);
|
||||
return lines;
|
||||
}
|
||||
|
||||
void
|
||||
Polygon::lines(Lines* lines) const
|
||||
{
|
||||
lines->reserve(lines->size() + this->points.size());
|
||||
for (Points::const_iterator it = this->points.begin(); it != this->points.end()-1; ++it) {
|
||||
lines->push_back(Line(*it, *(it + 1)));
|
||||
}
|
||||
lines->push_back(Line(this->points.back(), this->points.front()));
|
||||
}
|
||||
|
||||
Polyline*
|
||||
Polygon::split_at(const Point* point) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user