diff -r 6988973515d2 -r ca23936b455b src/ldrawalgorithm.h --- a/src/ldrawalgorithm.h Wed May 25 20:36:34 2022 +0300 +++ b/src/ldrawalgorithm.h Mon Jun 06 22:01:22 2022 +0300 @@ -1,5 +1,6 @@ #pragma once -#include "modeleditor.h" +#include "main.h" +#include "model.h" namespace ldraw { @@ -10,15 +11,13 @@ Diagonal_24 }; - // Splits the specified quadrilateral into triangles. - // If it is not a quadrilateral then no action is performed - auto splitQuadrilateral(ModelEditor& editor, - quadrilateralid_t quadrilateral_id, - Diagonal splitType = Diagonal::Diagonal_13 - ) -> std::optional>; + std::pair splitTriangles( + const Quadrilateral& q, + ldraw::Diagonal diagonal); - void invert(ModelEditor& editor, ldraw::id_t id, GetPolygonsContext *context); + /* void makeUnofficial(ModelEditor &editor); + */ template void circle(int segments, int divisions, Fn&& fn) @@ -34,3 +33,5 @@ } } } + +ModelElement inverted(const ModelElement &element);