Added support for voronoi edges.
This commit is contained in:
committed by
sliptonic
parent
27238c3813
commit
6fc2af2adc
@@ -28,6 +28,7 @@
|
||||
#endif
|
||||
|
||||
#include "Mod/Path/App/Voronoi.h"
|
||||
#include "Mod/Path/App/VoronoiEdge.h"
|
||||
#include "Mod/Path/App/VoronoiVertex.h"
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/GeometryPyCXX.h>
|
||||
@@ -37,6 +38,7 @@
|
||||
// files generated out of VoronoiPy.xml
|
||||
#include "VoronoiPy.h"
|
||||
#include "VoronoiPy.cpp"
|
||||
#include "VoronoiEdgePy.h"
|
||||
#include "VoronoiVertexPy.h"
|
||||
|
||||
using namespace Path;
|
||||
@@ -149,6 +151,14 @@ Py::List VoronoiPy::getVertices(void) const {
|
||||
return list;
|
||||
}
|
||||
|
||||
Py::List VoronoiPy::getEdges(void) const {
|
||||
Py::List list;
|
||||
for (int i=0; i<getVoronoiPtr()->numEdges(); ++i) {
|
||||
list.append(Py::asObject(new VoronoiEdgePy(new VoronoiEdge(getVoronoiPtr()->vd, i))));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// custom attributes get/set
|
||||
|
||||
PyObject *VoronoiPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
Reference in New Issue
Block a user