mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
New ExPolygon::triangulate() method
This commit is contained in:
parent
bb0ce3cccd
commit
37c7b958d4
5 changed files with 26 additions and 3 deletions
|
@ -176,6 +176,18 @@ ExPolygon::get_trapezoids(Polygons* polygons, double angle) const
|
|||
polygon->rotate(-(PI/2 - angle), Point(0,0));
|
||||
}
|
||||
|
||||
void
|
||||
ExPolygon::triangulate(Polygons* polygons) const
|
||||
{
|
||||
// first make trapezoids
|
||||
Polygons trapezoids;
|
||||
this->get_trapezoids(&trapezoids);
|
||||
|
||||
// then triangulate each trapezoid
|
||||
for (Polygons::iterator polygon = trapezoids.begin(); polygon != trapezoids.end(); ++polygon)
|
||||
polygon->triangulate_convex(polygons);
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
SV*
|
||||
ExPolygon::to_AV() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue