Added support for voronoi cells

This commit is contained in:
Markus Lampert
2020-09-03 18:51:33 -07:00
committed by sliptonic
parent 13742cca41
commit bbd2c049a9
11 changed files with 413 additions and 18 deletions

View File

@@ -29,6 +29,8 @@
#include "Mod/Path/App/Voronoi.h"
#include "Mod/Path/App/Voronoi.h"
#include "Mod/Path/App/VoronoiCell.h"
#include "Mod/Path/App/VoronoiCellPy.h"
#include "Mod/Path/App/VoronoiEdge.h"
#include "Mod/Path/App/VoronoiEdgePy.h"
#include "Mod/Path/App/VoronoiVertex.h"
@@ -191,6 +193,13 @@ Py::Object VoronoiEdgePy::getRotatedPrev(void) const
return Py::asObject(new VoronoiEdgePy(new VoronoiEdge(e->dia, e->ptr->rot_prev())));
}
Py::Object VoronoiEdgePy::getCell(void) const
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this);
return Py::asObject(new VoronoiCellPy(new VoronoiCell(e->dia, e->ptr->cell())));
}
PyObject* VoronoiEdgePy::isFinite(PyObject *args)
{
VoronoiEdge *e = getVoronoiEdgeFromPy(this, args);