--- a/src/invert.cpp Wed Jun 29 14:11:58 2022 +0300 +++ b/src/invert.cpp Wed Jun 29 14:43:42 2022 +0300 @@ -41,10 +41,10 @@ visitPolygon<void>( [](LineSegment&) {}, [](Triangle& tri) { - std::swap(tri.p1, tri.p2); + invert(tri); }, [](Quadrilateral& quad) { - std::swap(quad.p1, quad.p3); + invert(quad); }, [](ConditionalEdge&) {}, polygon);