This commit is contained in:
Matthias Koefferlein 2025-04-20 20:07:47 +02:00
parent f71210c64a
commit 7f0b2d532d
2 changed files with 4 additions and 2 deletions

View File

@ -443,6 +443,7 @@ Polygon::init ()
if (area > db::epsilon) {
std::reverse (mp_v.begin (), mp_v.end ());
std::reverse (mp_e.begin (), mp_e.end ());
std::rotate (mp_e.begin (), ++mp_e.begin (), mp_e.end ());
}
// link the polygon to the edges

View File

@ -264,8 +264,9 @@ SquareCountingRExtractor::extract (const db::Polygon &polygon, const std::vector
// 2. vertex ports
for (size_t i = 0; i < plc_poly->internal_vertexes (); ++i) {
db::Point loc = inv_trans * *plc_poly->internal_vertex (i);
ports.push_back (std::make_pair (PortDefinition (pex::RNode::VertexPort, loc, i), (pex::RNode *) 0));
auto v = plc_poly->internal_vertex (i);
db::Point loc = inv_trans * *v;
ports.push_back (std::make_pair (PortDefinition (pex::RNode::VertexPort, loc, v->id ()), (pex::RNode *) 0));
}
// 3. polygon ports