static PyObject * 
triangulate(PyObject *self, PyObject *args)
{
    PyObject *pcObj;
    if (!PyArg_ParseTuple(args, "O!", &(Points::PointsPy::Type), &pcObj))
        return NULL;
        
    Points::PointsPy* pPoints = static_cast<Points::PointsPy*>(pcObj);
    Points::PointKernel* points = pPoints->getPointKernelPtr();
    
    Mesh::MeshObject* mesh = new Mesh::MeshObject();
    SurfaceTriangulation tria(*points, *mesh);
    tria.perform();

    return new Mesh::MeshPy(mesh);
}
Esempio n. 2
0
    Py::Object triangulate(const Py::Tuple& args)
    {
        PyObject *pcObj;
        double searchRadius;
        double mu=2.5;
        if (!PyArg_ParseTuple(args.ptr(), "O!d|d", &(Points::PointsPy::Type), &pcObj, &searchRadius, &mu))
            throw Py::Exception();

        Points::PointsPy* pPoints = static_cast<Points::PointsPy*>(pcObj);
        Points::PointKernel* points = pPoints->getPointKernelPtr();
        
        Mesh::MeshObject* mesh = new Mesh::MeshObject();
        SurfaceTriangulation tria(*points, *mesh);
        tria.perform(searchRadius, mu);

        return Py::asObject(new Mesh::MeshPy(mesh));
    }