PyObject* BezierSurfacePy::setPole(PyObject *args)
{
    int uindex,vindex;
    PyObject* obj;
    double weight=0.0;
    if (!PyArg_ParseTuple(args, "iiO!|d",&uindex,&vindex,&(Base::VectorPy::Type),&obj,&weight))
        return 0;
    try {
        Base::Vector3d pole = static_cast<Base::VectorPy*>(obj)->value();
        Handle_Geom_BezierSurface surf = Handle_Geom_BezierSurface::DownCast
            (getGeometryPtr()->handle());
        if (weight <= gp::Resolution())
            surf->SetPole(uindex,vindex,gp_Pnt(pole.x,pole.y,pole.z));
        else
            surf->SetPole(uindex,vindex,gp_Pnt(pole.x,pole.y,pole.z),weight);
        Py_Return;
    }
    catch (Standard_Failure) {
        Handle_Standard_Failure e = Standard_Failure::Caught();
        PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
        return 0;
    }
}