Skip to content

Commit

Permalink
[Polygon] fix extractVectrices by reseting segments
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed May 11, 2023
1 parent a737840 commit 7c47773
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Geometry/Polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ void Polygon::extractVectrices(const std::vector<segement_t>& segments_out, cons
std::vector<point_t>& inner, std::vector<point_t>& outer,
const std::vector<point_t>& base)
{
inner.clear();
inner.reserve(base.size());
outer.clear();
outer.reserve(base.size());
for (unsigned int i = 0, j = segments_out.size() - 1; i < segments_out.size(); j = i++)
{
//the order of the points is really important
Expand Down

0 comments on commit 7c47773

Please sign in to comment.