mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Incomplete work for using Boost.Polygon to compute medial axis
This commit is contained in:
parent
11f065ca5e
commit
bf91f3096a
1650 changed files with 307148 additions and 9 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue