src/algorithms/invert.cpp

changeset 1305
31627acdd4b5
parent 1304
bb3f43293cf8
child 1313
4baed9f54de3
equal deleted inserted replaced
1304:bb3f43293cf8 1305:31627acdd4b5
126 // Subfile is not flat. Resort to invertnext. 126 // Subfile is not flat. Resort to invertnext.
127 reference->setInverted(not reference->isInverted()); 127 reference->setInverted(not reference->isInverted());
128 } 128 }
129 } 129 }
130 } 130 }
131
132 void invertPolygon(LDPolygon& polygon)
133 {
134 switch (polygon.numPolygonVertices())
135 {
136 case 2:
137 case 3:
138 std::swap(polygon.vertices[0], polygon.vertices[1]);
139 break;
140
141 case 4:
142 std::swap(polygon.vertices[1], polygon.vertices[3]);
143 break;
144 }
145 }

mercurial