Added support for voronoi cells
This commit is contained in:
committed by
sliptonic
parent
13742cca41
commit
bbd2c049a9
@@ -28,6 +28,7 @@
|
||||
#endif
|
||||
|
||||
#include "Mod/Path/App/Voronoi.h"
|
||||
#include "Mod/Path/App/VoronoiCell.h"
|
||||
#include "Mod/Path/App/VoronoiEdge.h"
|
||||
#include "Mod/Path/App/VoronoiVertex.h"
|
||||
#include <Base/Exception.h>
|
||||
@@ -38,6 +39,7 @@
|
||||
// files generated out of VoronoiPy.xml
|
||||
#include "VoronoiPy.h"
|
||||
#include "VoronoiPy.cpp"
|
||||
#include "VoronoiCellPy.h"
|
||||
#include "VoronoiEdgePy.h"
|
||||
#include "VoronoiVertexPy.h"
|
||||
|
||||
@@ -159,6 +161,14 @@ Py::List VoronoiPy::getEdges(void) const {
|
||||
return list;
|
||||
}
|
||||
|
||||
Py::List VoronoiPy::getCells(void) const {
|
||||
Py::List list;
|
||||
for (int i=0; i<getVoronoiPtr()->numCells(); ++i) {
|
||||
list.append(Py::asObject(new VoronoiCellPy(new VoronoiCell(getVoronoiPtr()->vd, i))));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// custom attributes get/set
|
||||
|
||||
PyObject *VoronoiPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
Reference in New Issue
Block a user