BezierSurfacePy.cpp

Go to the documentation of this file.
00001 
00002 // This file is generated by src/Tools/generateTemaplates/templateClassPyExport.py out of the .XML file
00003 // Every change you make here get lost at the next full rebuild!
00004 // This File is normaly build as an include in BezierSurfacePyImp.cpp! Its not intended to be in a project!
00005 
00006 #include <boost/filesystem/path.hpp>
00007 #include <boost/filesystem/operations.hpp>
00008 #include <boost/filesystem/exception.hpp>
00009 #include <Base/PyObjectBase.h>
00010 #include <Base/Console.h>
00011 #include <Base/Exception.h>
00012 #include <CXX/Objects.hxx>
00013 
00014 #define new DEBUG_CLIENTBLOCK
00015 
00016 using Base::streq;
00017 using namespace Part;
00018 
00020 PyTypeObject BezierSurfacePy::Type = {
00021     PyObject_HEAD_INIT(&PyType_Type)
00022     0,                                                /*ob_size*/
00023     "Part.GeomBezierSurface",     /*tp_name*/
00024     sizeof(BezierSurfacePy),                       /*tp_basicsize*/
00025     0,                                                /*tp_itemsize*/
00026     /* methods */
00027     PyDestructor,                                     /*tp_dealloc*/
00028     0,                                                /*tp_print*/
00029     __getattr,                                        /*tp_getattr*/
00030     __setattr,                                        /*tp_setattr*/
00031     0,                                                /*tp_compare*/
00032     __repr,                                           /*tp_repr*/
00033     0,                                                /*tp_as_number*/
00034     0,                                                /*tp_as_sequence*/
00035     0,                                                /*tp_as_mapping*/
00036     0,                                                /*tp_hash*/
00037     0,                                                /*tp_call */
00038     0,                                                /*tp_str  */
00039     0,                                                /*tp_getattro*/
00040     0,                                                /*tp_setattro*/
00041     /* --- Functions to access object as input/output buffer ---------*/
00042     0,                                                /* tp_as_buffer */
00043     /* --- Flags to define presence of optional/expanded features */
00044     Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_CLASS,        /*tp_flags */
00045     "Describes a rational or non-rational Bezier surface\n"
00046     "                           -- A non-rational Bezier surface is defined by a table of poles (also known as control points).\n"
00047     "                           -- A rational Bezier surface is defined by a table of poles with varying associated weights.\n"
00048     "                   ",           /*tp_doc */
00049     0,                                                /*tp_traverse */
00050     0,                                                /*tp_clear */
00051     0,                                                /*tp_richcompare */
00052     0,                                                /*tp_weaklistoffset */
00053     0,                                                /*tp_iter */
00054     0,                                                /*tp_iternext */
00055     Part::BezierSurfacePy::Methods,                     /*tp_methods */
00056     0,                                                /*tp_members */
00057     Part::BezierSurfacePy::GetterSetter,                     /*tp_getset */
00058     &Part::GeometrySurfacePy::Type,                        /*tp_base */
00059     0,                                                /*tp_dict */
00060     0,                                                /*tp_descr_get */
00061     0,                                                /*tp_descr_set */
00062     0,                                                /*tp_dictoffset */
00063     __PyInit,                                         /*tp_init */
00064     0,                                                /*tp_alloc */
00065     Part::BezierSurfacePy::PyMake,/*tp_new */
00066     0,                                                /*tp_free   Low-level free-memory routine */
00067     0,                                                /*tp_is_gc  For PyObject_IS_GC */
00068     0,                                                /*tp_bases */
00069     0,                                                /*tp_mro    method resolution order */
00070     0,                                                /*tp_cache */
00071     0,                                                /*tp_subclasses */
00072     0,                                                /*tp_weaklist */
00073     0                                                 /*tp_del */
00074 };
00075 
00077 PyMethodDef BezierSurfacePy::Methods[] = {
00078     {"bounds",
00079         (PyCFunction) staticCallback_bounds,
00080         METH_VARARGS,
00081         "\n                                     Returns the parametric bounds (U1, U2, V1, V2) of this Bezier surface.\n                                "
00082     },
00083     {"isURational",
00084         (PyCFunction) staticCallback_isURational,
00085         METH_VARARGS,
00086         "\n                                     Returns false if the equation of this Bezier surface is polynomial\n                                    (e.g. non-rational) in the u or v parametric direction.\n                                       In other words, returns false if for each row of poles, the associated\n                                        weights are identical\n                         "
00087     },
00088     {"isVRational",
00089         (PyCFunction) staticCallback_isVRational,
00090         METH_VARARGS,
00091         "\n                                     Returns false if the equation of this Bezier surface is polynomial\n                                    (e.g. non-rational) in the u or v parametric direction.\n                                       In other words, returns false if for each column of poles, the associated\n                                     weights are identical\n                         "
00092     },
00093     {"isUPeriodic",
00094         (PyCFunction) staticCallback_isUPeriodic,
00095         METH_VARARGS,
00096         "Returns false."
00097     },
00098     {"isVPeriodic",
00099         (PyCFunction) staticCallback_isVPeriodic,
00100         METH_VARARGS,
00101         "Returns false."
00102     },
00103     {"isUClosed",
00104         (PyCFunction) staticCallback_isUClosed,
00105         METH_VARARGS,
00106         "\n                                     Checks if this surface is closed in the u parametric direction.\n                                       Returns true if, in the table of poles the first row and the last\n                                     row are identical.\n                            "
00107     },
00108     {"isVClosed",
00109         (PyCFunction) staticCallback_isVClosed,
00110         METH_VARARGS,
00111         "\n                                     Checks if this surface is closed in the v parametric direction.\n                                       Returns true if, in the table of poles the first column and the\n                                       last column are identical.\n                            "
00112     },
00113     {"increase",
00114         (PyCFunction) staticCallback_increase,
00115         METH_VARARGS,
00116         "\n                                     increase(Int=DegreeU,Int=DegreeV)\n                                     Increases the degree of this Bezier surface in the two\n                                        parametric directions.\n                                "
00117     },
00118     {"insertPoleColAfter",
00119         (PyCFunction) staticCallback_insertPoleColAfter,
00120         METH_VARARGS,
00121         "\n                                     Inserts into the table of poles of this surface, after the column\n                                     of poles of index.\n                                    If this Bezier surface is non-rational, it can become rational if\n                                     the weights associated with the new poles are different from each\n                                     other, or collectively different from the existing weights in the\n                                     table.\n                                "
00122     },
00123     {"insertPoleRowAfter",
00124         (PyCFunction) staticCallback_insertPoleRowAfter,
00125         METH_VARARGS,
00126         "\n                                     Inserts into the table of poles of this surface, after the row\n                                        of poles of index.\n                                    If this Bezier surface is non-rational, it can become rational if\n                                     the weights associated with the new poles are different from each\n                                     other, or collectively different from the existing weights in the\n                                     table.\n                                "
00127     },
00128     {"insertPoleColBefore",
00129         (PyCFunction) staticCallback_insertPoleColBefore,
00130         METH_VARARGS,
00131         "\n                                     Inserts into the table of poles of this surface, before the column\n                                    of poles of index.\n                                    If this Bezier surface is non-rational, it can become rational if\n                                     the weights associated with the new poles are different from each\n                                     other, or collectively different from the existing weights in the\n                                     table.\n                                "
00132     },
00133     {"insertPoleRowBefore",
00134         (PyCFunction) staticCallback_insertPoleRowBefore,
00135         METH_VARARGS,
00136         "\n                                     Inserts into the table of poles of this surface, before the row\n                                       of poles of index.\n                                    If this Bezier surface is non-rational, it can become rational if\n                                     the weights associated with the new poles are different from each\n                                     other, or collectively different from the existing weights in the\n                                     table.\n                                "
00137     },
00138     {"removePoleCol",
00139         (PyCFunction) staticCallback_removePoleCol,
00140         METH_VARARGS,
00141         "\n                                     removePoleRow(int=VIndex)\n                                     Removes the column of poles of index VIndex from the table of\n                                 poles of this Bezier surface.\n                                 If this Bezier curve is rational, it can become non-rational.\n                         "
00142     },
00143     {"removePoleRow",
00144         (PyCFunction) staticCallback_removePoleRow,
00145         METH_VARARGS,
00146         "\n                                     removePoleRow(int=UIndex)\n                                     Removes the row of poles of index UIndex from the table of\n                                    poles of this Bezier surface.\n                                 If this Bezier curve is rational, it can become non-rational.\n                         "
00147     },
00148     {"segment",
00149         (PyCFunction) staticCallback_segment,
00150         METH_VARARGS,
00151         "\n                                     segment(double=U1,double=U2,double=V1,double=V2)\n                                      Modifies this Bezier surface by segmenting it between U1 and U2\n                                       in the u parametric direction, and between V1 and V2 in the v\n                                 parametric direction.\n                                 U1, U2, V1, and V2 can be outside the bounds of this surface.\n                                 \n                                      -- U1 and U2 isoparametric Bezier curves, segmented between\n                                      V1 and V2, become the two bounds of the surface in the v\n                                      parametric direction (0. and 1. u isoparametric curves).\n                                   -- V1 and V2 isoparametric Bezier curves, segmented between\n                                      U1 and U2, become the two bounds of the surface in the u\n                                      parametric direction (0. and 1. v isoparametric curves).\n                                   \n                                      The poles and weights tables are modified, but the degree of\n                                  this surface in the u and v parametric directions does not\n                                    change.U1 can be greater than U2, and V1 can be greater than V2.\n                                      In these cases, the corresponding parametric direction is inverted.\n                                   The orientation of the surface is inverted if one (and only one)\n                                      parametric direction is inverted.\n                             "
00152     },
00153     {"setPole",
00154         (PyCFunction) staticCallback_setPole,
00155         METH_VARARGS,
00156         "Set a pole of the Bezier surface."
00157     },
00158     {"setPoleCol",
00159         (PyCFunction) staticCallback_setPoleCol,
00160         METH_VARARGS,
00161         "Set the column of poles of the Bezier surface."
00162     },
00163     {"setPoleRow",
00164         (PyCFunction) staticCallback_setPoleRow,
00165         METH_VARARGS,
00166         "Set the row of poles of the Bezier surface."
00167     },
00168     {"getPole",
00169         (PyCFunction) staticCallback_getPole,
00170         METH_VARARGS,
00171         "Get a pole of index (UIndex,VIndex) of the Bezier surface."
00172     },
00173     {"getPoles",
00174         (PyCFunction) staticCallback_getPoles,
00175         METH_VARARGS,
00176         "Get all poles of the Bezier surface."
00177     },
00178     {"setWeight",
00179         (PyCFunction) staticCallback_setWeight,
00180         METH_VARARGS,
00181         "\n                                     Set the weight of pole of the index (UIndex, VIndex)\n                                  for the Bezier surface.\n                               "
00182     },
00183     {"setWeightCol",
00184         (PyCFunction) staticCallback_setWeightCol,
00185         METH_VARARGS,
00186         "\n                                     Set the weights of the poles in the column of poles\n                                   of index VIndex of the Bezier surface.\n                                "
00187     },
00188     {"setWeightRow",
00189         (PyCFunction) staticCallback_setWeightRow,
00190         METH_VARARGS,
00191         "\n                                     Set the weights of the poles in the row of poles\n                                      of index UIndex of the Bezier surface.\n                                "
00192     },
00193     {"getWeight",
00194         (PyCFunction) staticCallback_getWeight,
00195         METH_VARARGS,
00196         "\n                                     Get a weight of the pole of index (UIndex,VIndex)\n                                     of the Bezier surface.\n                                "
00197     },
00198     {"getWeights",
00199         (PyCFunction) staticCallback_getWeights,
00200         METH_VARARGS,
00201         "Get all weights of the Bezier surface."
00202     },
00203     {"getResolution",
00204         (PyCFunction) staticCallback_getResolution,
00205         METH_VARARGS,
00206         "\n                                     Computes two tolerance values for this Bezier surface, based on the\n                                   given tolerance in 3D space Tolerance3D. The tolerances computed are:\n                                 -- UTolerance in the u parametric direction and\n                                       -- VTolerance in the v parametric direction.\n\n                                        If f(u,v) is the equation of this Bezier surface, UTolerance and VTolerance\n                                   guarantee that:\n                                       |u1 - u0| < UTolerance\n                                        |v1 - v0| < VTolerance\n                                        ====> ||f(u1, v1) - f(u2, v2)|| < Tolerance3D\n                         "
00207     },
00208     {"exchangeUV",
00209         (PyCFunction) staticCallback_exchangeUV,
00210         METH_VARARGS,
00211         "\n                                     Exchanges the u and v parametric directions on this Bezier surface.\n                                   As a consequence:\n                                     -- the poles and weights tables are transposed,\n                                       -- degrees, rational characteristics and so on are exchanged between\n                                     the two parametric directions, and\n                                 -- the orientation of the surface is reversed.\n                                "
00212     },
00213     {"uIso",
00214         (PyCFunction) staticCallback_uIso,
00215         METH_VARARGS,
00216         "Builds the U isoparametric Bezier curve of this Bezier surface"
00217     },
00218     {"vIso",
00219         (PyCFunction) staticCallback_vIso,
00220         METH_VARARGS,
00221         "Builds the V isoparametric Bezier curve of this Bezier surface"
00222     },
00223     {NULL, NULL, 0, NULL}               /* Sentinel */
00224 };
00225 
00226 
00227 
00229 PyGetSetDef BezierSurfacePy::GetterSetter[] = {
00230     {"UDegree",
00231         (getter) staticCallback_getUDegree,
00232         (setter) staticCallback_setUDegree, 
00233         "\n                                     Returns the polynomial degree in u direction of this Bezier surface,\n                                  which is equal to the number of poles minus 1.\n                                ",
00234         NULL
00235     },
00236     {"VDegree",
00237         (getter) staticCallback_getVDegree,
00238         (setter) staticCallback_setVDegree, 
00239         "\n                                     Returns the polynomial degree in v direction of this Bezier surface,\n                                  which is equal to the number of poles minus 1.\n                                ",
00240         NULL
00241     },
00242     {"MaxDegree",
00243         (getter) staticCallback_getMaxDegree,
00244         (setter) staticCallback_setMaxDegree, 
00245         "\n                                     Returns the value of the maximum polynomial degree of any\n                                     Bezier surface. This value is 25.\n                             ",
00246         NULL
00247     },
00248     {"NbUPoles",
00249         (getter) staticCallback_getNbUPoles,
00250         (setter) staticCallback_setNbUPoles, 
00251         "\n                                     Returns the number of poles in u direction of this Bezier surface.\n                            ",
00252         NULL
00253     },
00254     {"NbVPoles",
00255         (getter) staticCallback_getNbVPoles,
00256         (setter) staticCallback_setNbVPoles, 
00257         "\n                                     Returns the number of poles in v direction of this Bezier surface.\n                            ",
00258         NULL
00259     },
00260     {NULL, NULL, NULL, NULL, NULL}              /* Sentinel */
00261 };
00262 
00263 // bounds() callback and implementer
00264 // PyObject*  BezierSurfacePy::bounds(PyObject *args){};
00265 // has to be implemented in BezierSurfacePyImp.cpp
00266 PyObject * BezierSurfacePy::staticCallback_bounds (PyObject *self, PyObject *args)
00267 {
00268     // test if twin object not allready deleted
00269     if (!((PyObjectBase*) self)->isValid()){
00270         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00271         return NULL;
00272     }
00273 
00274     // test if object is set Const
00275     if (((PyObjectBase*) self)->isConst()){
00276         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00277         return NULL;
00278     }
00279 
00280     try { // catches all exceptions coming up from c++ and generate a python exception
00281         PyObject* ret = ((BezierSurfacePy*)self)->bounds(args);
00282         if (ret != 0)
00283             ((BezierSurfacePy*)self)->startNotify();
00284         return ret;
00285     }
00286     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00287     {
00288         std::string str;
00289         str += "FreeCAD exception thrown (";
00290         str += e.what();
00291         str += ")";
00292         e.ReportException();
00293         PyErr_SetString(PyExc_Exception,str.c_str());
00294         return NULL;
00295     }
00296     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00297     {
00298         std::string str;
00299         str += "File system exception thrown (";
00300         //str += e.who();
00301         //str += ", ";
00302         str += e.what();
00303         str += ")\n";
00304         Base::Console().Error(str.c_str());
00305         PyErr_SetString(PyExc_Exception,str.c_str());
00306         return NULL;
00307     }
00308     catch(const Py::Exception&)
00309     {
00310         // The exception text is already set
00311         return NULL;
00312     }
00313     catch(const char* e) // catch simple string exceptions
00314     {
00315         Base::Console().Error(e);
00316         PyErr_SetString(PyExc_Exception,e);
00317         return NULL;
00318     }
00319     // in debug not all exceptions will be catched to get the attention of the developer!
00320 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00321     catch(const std::exception& e) // catch other c++ exceptions
00322     {
00323         std::string str;
00324         str += "FC++ exception thrown (";
00325         str += e.what();
00326         str += ")";
00327         Base::Console().Error(str.c_str());
00328         PyErr_SetString(PyExc_Exception,str.c_str());
00329         return NULL;
00330     }
00331     catch(...)  // catch the rest!
00332     {
00333         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00334         return NULL;
00335     }
00336 #endif
00337 }
00338 
00339 // isURational() callback and implementer
00340 // PyObject*  BezierSurfacePy::isURational(PyObject *args){};
00341 // has to be implemented in BezierSurfacePyImp.cpp
00342 PyObject * BezierSurfacePy::staticCallback_isURational (PyObject *self, PyObject *args)
00343 {
00344     // test if twin object not allready deleted
00345     if (!((PyObjectBase*) self)->isValid()){
00346         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00347         return NULL;
00348     }
00349 
00350     // test if object is set Const
00351     if (((PyObjectBase*) self)->isConst()){
00352         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00353         return NULL;
00354     }
00355 
00356     try { // catches all exceptions coming up from c++ and generate a python exception
00357         PyObject* ret = ((BezierSurfacePy*)self)->isURational(args);
00358         if (ret != 0)
00359             ((BezierSurfacePy*)self)->startNotify();
00360         return ret;
00361     }
00362     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00363     {
00364         std::string str;
00365         str += "FreeCAD exception thrown (";
00366         str += e.what();
00367         str += ")";
00368         e.ReportException();
00369         PyErr_SetString(PyExc_Exception,str.c_str());
00370         return NULL;
00371     }
00372     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00373     {
00374         std::string str;
00375         str += "File system exception thrown (";
00376         //str += e.who();
00377         //str += ", ";
00378         str += e.what();
00379         str += ")\n";
00380         Base::Console().Error(str.c_str());
00381         PyErr_SetString(PyExc_Exception,str.c_str());
00382         return NULL;
00383     }
00384     catch(const Py::Exception&)
00385     {
00386         // The exception text is already set
00387         return NULL;
00388     }
00389     catch(const char* e) // catch simple string exceptions
00390     {
00391         Base::Console().Error(e);
00392         PyErr_SetString(PyExc_Exception,e);
00393         return NULL;
00394     }
00395     // in debug not all exceptions will be catched to get the attention of the developer!
00396 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00397     catch(const std::exception& e) // catch other c++ exceptions
00398     {
00399         std::string str;
00400         str += "FC++ exception thrown (";
00401         str += e.what();
00402         str += ")";
00403         Base::Console().Error(str.c_str());
00404         PyErr_SetString(PyExc_Exception,str.c_str());
00405         return NULL;
00406     }
00407     catch(...)  // catch the rest!
00408     {
00409         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00410         return NULL;
00411     }
00412 #endif
00413 }
00414 
00415 // isVRational() callback and implementer
00416 // PyObject*  BezierSurfacePy::isVRational(PyObject *args){};
00417 // has to be implemented in BezierSurfacePyImp.cpp
00418 PyObject * BezierSurfacePy::staticCallback_isVRational (PyObject *self, PyObject *args)
00419 {
00420     // test if twin object not allready deleted
00421     if (!((PyObjectBase*) self)->isValid()){
00422         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00423         return NULL;
00424     }
00425 
00426     // test if object is set Const
00427     if (((PyObjectBase*) self)->isConst()){
00428         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00429         return NULL;
00430     }
00431 
00432     try { // catches all exceptions coming up from c++ and generate a python exception
00433         PyObject* ret = ((BezierSurfacePy*)self)->isVRational(args);
00434         if (ret != 0)
00435             ((BezierSurfacePy*)self)->startNotify();
00436         return ret;
00437     }
00438     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00439     {
00440         std::string str;
00441         str += "FreeCAD exception thrown (";
00442         str += e.what();
00443         str += ")";
00444         e.ReportException();
00445         PyErr_SetString(PyExc_Exception,str.c_str());
00446         return NULL;
00447     }
00448     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00449     {
00450         std::string str;
00451         str += "File system exception thrown (";
00452         //str += e.who();
00453         //str += ", ";
00454         str += e.what();
00455         str += ")\n";
00456         Base::Console().Error(str.c_str());
00457         PyErr_SetString(PyExc_Exception,str.c_str());
00458         return NULL;
00459     }
00460     catch(const Py::Exception&)
00461     {
00462         // The exception text is already set
00463         return NULL;
00464     }
00465     catch(const char* e) // catch simple string exceptions
00466     {
00467         Base::Console().Error(e);
00468         PyErr_SetString(PyExc_Exception,e);
00469         return NULL;
00470     }
00471     // in debug not all exceptions will be catched to get the attention of the developer!
00472 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00473     catch(const std::exception& e) // catch other c++ exceptions
00474     {
00475         std::string str;
00476         str += "FC++ exception thrown (";
00477         str += e.what();
00478         str += ")";
00479         Base::Console().Error(str.c_str());
00480         PyErr_SetString(PyExc_Exception,str.c_str());
00481         return NULL;
00482     }
00483     catch(...)  // catch the rest!
00484     {
00485         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00486         return NULL;
00487     }
00488 #endif
00489 }
00490 
00491 // isUPeriodic() callback and implementer
00492 // PyObject*  BezierSurfacePy::isUPeriodic(PyObject *args){};
00493 // has to be implemented in BezierSurfacePyImp.cpp
00494 PyObject * BezierSurfacePy::staticCallback_isUPeriodic (PyObject *self, PyObject *args)
00495 {
00496     // test if twin object not allready deleted
00497     if (!((PyObjectBase*) self)->isValid()){
00498         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00499         return NULL;
00500     }
00501 
00502     // test if object is set Const
00503     if (((PyObjectBase*) self)->isConst()){
00504         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00505         return NULL;
00506     }
00507 
00508     try { // catches all exceptions coming up from c++ and generate a python exception
00509         PyObject* ret = ((BezierSurfacePy*)self)->isUPeriodic(args);
00510         if (ret != 0)
00511             ((BezierSurfacePy*)self)->startNotify();
00512         return ret;
00513     }
00514     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00515     {
00516         std::string str;
00517         str += "FreeCAD exception thrown (";
00518         str += e.what();
00519         str += ")";
00520         e.ReportException();
00521         PyErr_SetString(PyExc_Exception,str.c_str());
00522         return NULL;
00523     }
00524     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00525     {
00526         std::string str;
00527         str += "File system exception thrown (";
00528         //str += e.who();
00529         //str += ", ";
00530         str += e.what();
00531         str += ")\n";
00532         Base::Console().Error(str.c_str());
00533         PyErr_SetString(PyExc_Exception,str.c_str());
00534         return NULL;
00535     }
00536     catch(const Py::Exception&)
00537     {
00538         // The exception text is already set
00539         return NULL;
00540     }
00541     catch(const char* e) // catch simple string exceptions
00542     {
00543         Base::Console().Error(e);
00544         PyErr_SetString(PyExc_Exception,e);
00545         return NULL;
00546     }
00547     // in debug not all exceptions will be catched to get the attention of the developer!
00548 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00549     catch(const std::exception& e) // catch other c++ exceptions
00550     {
00551         std::string str;
00552         str += "FC++ exception thrown (";
00553         str += e.what();
00554         str += ")";
00555         Base::Console().Error(str.c_str());
00556         PyErr_SetString(PyExc_Exception,str.c_str());
00557         return NULL;
00558     }
00559     catch(...)  // catch the rest!
00560     {
00561         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00562         return NULL;
00563     }
00564 #endif
00565 }
00566 
00567 // isVPeriodic() callback and implementer
00568 // PyObject*  BezierSurfacePy::isVPeriodic(PyObject *args){};
00569 // has to be implemented in BezierSurfacePyImp.cpp
00570 PyObject * BezierSurfacePy::staticCallback_isVPeriodic (PyObject *self, PyObject *args)
00571 {
00572     // test if twin object not allready deleted
00573     if (!((PyObjectBase*) self)->isValid()){
00574         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00575         return NULL;
00576     }
00577 
00578     // test if object is set Const
00579     if (((PyObjectBase*) self)->isConst()){
00580         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00581         return NULL;
00582     }
00583 
00584     try { // catches all exceptions coming up from c++ and generate a python exception
00585         PyObject* ret = ((BezierSurfacePy*)self)->isVPeriodic(args);
00586         if (ret != 0)
00587             ((BezierSurfacePy*)self)->startNotify();
00588         return ret;
00589     }
00590     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00591     {
00592         std::string str;
00593         str += "FreeCAD exception thrown (";
00594         str += e.what();
00595         str += ")";
00596         e.ReportException();
00597         PyErr_SetString(PyExc_Exception,str.c_str());
00598         return NULL;
00599     }
00600     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00601     {
00602         std::string str;
00603         str += "File system exception thrown (";
00604         //str += e.who();
00605         //str += ", ";
00606         str += e.what();
00607         str += ")\n";
00608         Base::Console().Error(str.c_str());
00609         PyErr_SetString(PyExc_Exception,str.c_str());
00610         return NULL;
00611     }
00612     catch(const Py::Exception&)
00613     {
00614         // The exception text is already set
00615         return NULL;
00616     }
00617     catch(const char* e) // catch simple string exceptions
00618     {
00619         Base::Console().Error(e);
00620         PyErr_SetString(PyExc_Exception,e);
00621         return NULL;
00622     }
00623     // in debug not all exceptions will be catched to get the attention of the developer!
00624 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00625     catch(const std::exception& e) // catch other c++ exceptions
00626     {
00627         std::string str;
00628         str += "FC++ exception thrown (";
00629         str += e.what();
00630         str += ")";
00631         Base::Console().Error(str.c_str());
00632         PyErr_SetString(PyExc_Exception,str.c_str());
00633         return NULL;
00634     }
00635     catch(...)  // catch the rest!
00636     {
00637         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00638         return NULL;
00639     }
00640 #endif
00641 }
00642 
00643 // isUClosed() callback and implementer
00644 // PyObject*  BezierSurfacePy::isUClosed(PyObject *args){};
00645 // has to be implemented in BezierSurfacePyImp.cpp
00646 PyObject * BezierSurfacePy::staticCallback_isUClosed (PyObject *self, PyObject *args)
00647 {
00648     // test if twin object not allready deleted
00649     if (!((PyObjectBase*) self)->isValid()){
00650         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00651         return NULL;
00652     }
00653 
00654     // test if object is set Const
00655     if (((PyObjectBase*) self)->isConst()){
00656         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00657         return NULL;
00658     }
00659 
00660     try { // catches all exceptions coming up from c++ and generate a python exception
00661         PyObject* ret = ((BezierSurfacePy*)self)->isUClosed(args);
00662         if (ret != 0)
00663             ((BezierSurfacePy*)self)->startNotify();
00664         return ret;
00665     }
00666     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00667     {
00668         std::string str;
00669         str += "FreeCAD exception thrown (";
00670         str += e.what();
00671         str += ")";
00672         e.ReportException();
00673         PyErr_SetString(PyExc_Exception,str.c_str());
00674         return NULL;
00675     }
00676     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00677     {
00678         std::string str;
00679         str += "File system exception thrown (";
00680         //str += e.who();
00681         //str += ", ";
00682         str += e.what();
00683         str += ")\n";
00684         Base::Console().Error(str.c_str());
00685         PyErr_SetString(PyExc_Exception,str.c_str());
00686         return NULL;
00687     }
00688     catch(const Py::Exception&)
00689     {
00690         // The exception text is already set
00691         return NULL;
00692     }
00693     catch(const char* e) // catch simple string exceptions
00694     {
00695         Base::Console().Error(e);
00696         PyErr_SetString(PyExc_Exception,e);
00697         return NULL;
00698     }
00699     // in debug not all exceptions will be catched to get the attention of the developer!
00700 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00701     catch(const std::exception& e) // catch other c++ exceptions
00702     {
00703         std::string str;
00704         str += "FC++ exception thrown (";
00705         str += e.what();
00706         str += ")";
00707         Base::Console().Error(str.c_str());
00708         PyErr_SetString(PyExc_Exception,str.c_str());
00709         return NULL;
00710     }
00711     catch(...)  // catch the rest!
00712     {
00713         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00714         return NULL;
00715     }
00716 #endif
00717 }
00718 
00719 // isVClosed() callback and implementer
00720 // PyObject*  BezierSurfacePy::isVClosed(PyObject *args){};
00721 // has to be implemented in BezierSurfacePyImp.cpp
00722 PyObject * BezierSurfacePy::staticCallback_isVClosed (PyObject *self, PyObject *args)
00723 {
00724     // test if twin object not allready deleted
00725     if (!((PyObjectBase*) self)->isValid()){
00726         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00727         return NULL;
00728     }
00729 
00730     // test if object is set Const
00731     if (((PyObjectBase*) self)->isConst()){
00732         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00733         return NULL;
00734     }
00735 
00736     try { // catches all exceptions coming up from c++ and generate a python exception
00737         PyObject* ret = ((BezierSurfacePy*)self)->isVClosed(args);
00738         if (ret != 0)
00739             ((BezierSurfacePy*)self)->startNotify();
00740         return ret;
00741     }
00742     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00743     {
00744         std::string str;
00745         str += "FreeCAD exception thrown (";
00746         str += e.what();
00747         str += ")";
00748         e.ReportException();
00749         PyErr_SetString(PyExc_Exception,str.c_str());
00750         return NULL;
00751     }
00752     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00753     {
00754         std::string str;
00755         str += "File system exception thrown (";
00756         //str += e.who();
00757         //str += ", ";
00758         str += e.what();
00759         str += ")\n";
00760         Base::Console().Error(str.c_str());
00761         PyErr_SetString(PyExc_Exception,str.c_str());
00762         return NULL;
00763     }
00764     catch(const Py::Exception&)
00765     {
00766         // The exception text is already set
00767         return NULL;
00768     }
00769     catch(const char* e) // catch simple string exceptions
00770     {
00771         Base::Console().Error(e);
00772         PyErr_SetString(PyExc_Exception,e);
00773         return NULL;
00774     }
00775     // in debug not all exceptions will be catched to get the attention of the developer!
00776 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00777     catch(const std::exception& e) // catch other c++ exceptions
00778     {
00779         std::string str;
00780         str += "FC++ exception thrown (";
00781         str += e.what();
00782         str += ")";
00783         Base::Console().Error(str.c_str());
00784         PyErr_SetString(PyExc_Exception,str.c_str());
00785         return NULL;
00786     }
00787     catch(...)  // catch the rest!
00788     {
00789         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00790         return NULL;
00791     }
00792 #endif
00793 }
00794 
00795 // increase() callback and implementer
00796 // PyObject*  BezierSurfacePy::increase(PyObject *args){};
00797 // has to be implemented in BezierSurfacePyImp.cpp
00798 PyObject * BezierSurfacePy::staticCallback_increase (PyObject *self, PyObject *args)
00799 {
00800     // test if twin object not allready deleted
00801     if (!((PyObjectBase*) self)->isValid()){
00802         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00803         return NULL;
00804     }
00805 
00806     // test if object is set Const
00807     if (((PyObjectBase*) self)->isConst()){
00808         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00809         return NULL;
00810     }
00811 
00812     try { // catches all exceptions coming up from c++ and generate a python exception
00813         PyObject* ret = ((BezierSurfacePy*)self)->increase(args);
00814         if (ret != 0)
00815             ((BezierSurfacePy*)self)->startNotify();
00816         return ret;
00817     }
00818     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00819     {
00820         std::string str;
00821         str += "FreeCAD exception thrown (";
00822         str += e.what();
00823         str += ")";
00824         e.ReportException();
00825         PyErr_SetString(PyExc_Exception,str.c_str());
00826         return NULL;
00827     }
00828     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00829     {
00830         std::string str;
00831         str += "File system exception thrown (";
00832         //str += e.who();
00833         //str += ", ";
00834         str += e.what();
00835         str += ")\n";
00836         Base::Console().Error(str.c_str());
00837         PyErr_SetString(PyExc_Exception,str.c_str());
00838         return NULL;
00839     }
00840     catch(const Py::Exception&)
00841     {
00842         // The exception text is already set
00843         return NULL;
00844     }
00845     catch(const char* e) // catch simple string exceptions
00846     {
00847         Base::Console().Error(e);
00848         PyErr_SetString(PyExc_Exception,e);
00849         return NULL;
00850     }
00851     // in debug not all exceptions will be catched to get the attention of the developer!
00852 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00853     catch(const std::exception& e) // catch other c++ exceptions
00854     {
00855         std::string str;
00856         str += "FC++ exception thrown (";
00857         str += e.what();
00858         str += ")";
00859         Base::Console().Error(str.c_str());
00860         PyErr_SetString(PyExc_Exception,str.c_str());
00861         return NULL;
00862     }
00863     catch(...)  // catch the rest!
00864     {
00865         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00866         return NULL;
00867     }
00868 #endif
00869 }
00870 
00871 // insertPoleColAfter() callback and implementer
00872 // PyObject*  BezierSurfacePy::insertPoleColAfter(PyObject *args){};
00873 // has to be implemented in BezierSurfacePyImp.cpp
00874 PyObject * BezierSurfacePy::staticCallback_insertPoleColAfter (PyObject *self, PyObject *args)
00875 {
00876     // test if twin object not allready deleted
00877     if (!((PyObjectBase*) self)->isValid()){
00878         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00879         return NULL;
00880     }
00881 
00882     // test if object is set Const
00883     if (((PyObjectBase*) self)->isConst()){
00884         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00885         return NULL;
00886     }
00887 
00888     try { // catches all exceptions coming up from c++ and generate a python exception
00889         PyObject* ret = ((BezierSurfacePy*)self)->insertPoleColAfter(args);
00890         if (ret != 0)
00891             ((BezierSurfacePy*)self)->startNotify();
00892         return ret;
00893     }
00894     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00895     {
00896         std::string str;
00897         str += "FreeCAD exception thrown (";
00898         str += e.what();
00899         str += ")";
00900         e.ReportException();
00901         PyErr_SetString(PyExc_Exception,str.c_str());
00902         return NULL;
00903     }
00904     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00905     {
00906         std::string str;
00907         str += "File system exception thrown (";
00908         //str += e.who();
00909         //str += ", ";
00910         str += e.what();
00911         str += ")\n";
00912         Base::Console().Error(str.c_str());
00913         PyErr_SetString(PyExc_Exception,str.c_str());
00914         return NULL;
00915     }
00916     catch(const Py::Exception&)
00917     {
00918         // The exception text is already set
00919         return NULL;
00920     }
00921     catch(const char* e) // catch simple string exceptions
00922     {
00923         Base::Console().Error(e);
00924         PyErr_SetString(PyExc_Exception,e);
00925         return NULL;
00926     }
00927     // in debug not all exceptions will be catched to get the attention of the developer!
00928 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
00929     catch(const std::exception& e) // catch other c++ exceptions
00930     {
00931         std::string str;
00932         str += "FC++ exception thrown (";
00933         str += e.what();
00934         str += ")";
00935         Base::Console().Error(str.c_str());
00936         PyErr_SetString(PyExc_Exception,str.c_str());
00937         return NULL;
00938     }
00939     catch(...)  // catch the rest!
00940     {
00941         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00942         return NULL;
00943     }
00944 #endif
00945 }
00946 
00947 // insertPoleRowAfter() callback and implementer
00948 // PyObject*  BezierSurfacePy::insertPoleRowAfter(PyObject *args){};
00949 // has to be implemented in BezierSurfacePyImp.cpp
00950 PyObject * BezierSurfacePy::staticCallback_insertPoleRowAfter (PyObject *self, PyObject *args)
00951 {
00952     // test if twin object not allready deleted
00953     if (!((PyObjectBase*) self)->isValid()){
00954         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00955         return NULL;
00956     }
00957 
00958     // test if object is set Const
00959     if (((PyObjectBase*) self)->isConst()){
00960         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00961         return NULL;
00962     }
00963 
00964     try { // catches all exceptions coming up from c++ and generate a python exception
00965         PyObject* ret = ((BezierSurfacePy*)self)->insertPoleRowAfter(args);
00966         if (ret != 0)
00967             ((BezierSurfacePy*)self)->startNotify();
00968         return ret;
00969     }
00970     catch(const Base::Exception& e) // catch the FreeCAD exceptions
00971     {
00972         std::string str;
00973         str += "FreeCAD exception thrown (";
00974         str += e.what();
00975         str += ")";
00976         e.ReportException();
00977         PyErr_SetString(PyExc_Exception,str.c_str());
00978         return NULL;
00979     }
00980     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
00981     {
00982         std::string str;
00983         str += "File system exception thrown (";
00984         //str += e.who();
00985         //str += ", ";
00986         str += e.what();
00987         str += ")\n";
00988         Base::Console().Error(str.c_str());
00989         PyErr_SetString(PyExc_Exception,str.c_str());
00990         return NULL;
00991     }
00992     catch(const Py::Exception&)
00993     {
00994         // The exception text is already set
00995         return NULL;
00996     }
00997     catch(const char* e) // catch simple string exceptions
00998     {
00999         Base::Console().Error(e);
01000         PyErr_SetString(PyExc_Exception,e);
01001         return NULL;
01002     }
01003     // in debug not all exceptions will be catched to get the attention of the developer!
01004 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01005     catch(const std::exception& e) // catch other c++ exceptions
01006     {
01007         std::string str;
01008         str += "FC++ exception thrown (";
01009         str += e.what();
01010         str += ")";
01011         Base::Console().Error(str.c_str());
01012         PyErr_SetString(PyExc_Exception,str.c_str());
01013         return NULL;
01014     }
01015     catch(...)  // catch the rest!
01016     {
01017         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01018         return NULL;
01019     }
01020 #endif
01021 }
01022 
01023 // insertPoleColBefore() callback and implementer
01024 // PyObject*  BezierSurfacePy::insertPoleColBefore(PyObject *args){};
01025 // has to be implemented in BezierSurfacePyImp.cpp
01026 PyObject * BezierSurfacePy::staticCallback_insertPoleColBefore (PyObject *self, PyObject *args)
01027 {
01028     // test if twin object not allready deleted
01029     if (!((PyObjectBase*) self)->isValid()){
01030         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01031         return NULL;
01032     }
01033 
01034     // test if object is set Const
01035     if (((PyObjectBase*) self)->isConst()){
01036         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01037         return NULL;
01038     }
01039 
01040     try { // catches all exceptions coming up from c++ and generate a python exception
01041         PyObject* ret = ((BezierSurfacePy*)self)->insertPoleColBefore(args);
01042         if (ret != 0)
01043             ((BezierSurfacePy*)self)->startNotify();
01044         return ret;
01045     }
01046     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01047     {
01048         std::string str;
01049         str += "FreeCAD exception thrown (";
01050         str += e.what();
01051         str += ")";
01052         e.ReportException();
01053         PyErr_SetString(PyExc_Exception,str.c_str());
01054         return NULL;
01055     }
01056     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01057     {
01058         std::string str;
01059         str += "File system exception thrown (";
01060         //str += e.who();
01061         //str += ", ";
01062         str += e.what();
01063         str += ")\n";
01064         Base::Console().Error(str.c_str());
01065         PyErr_SetString(PyExc_Exception,str.c_str());
01066         return NULL;
01067     }
01068     catch(const Py::Exception&)
01069     {
01070         // The exception text is already set
01071         return NULL;
01072     }
01073     catch(const char* e) // catch simple string exceptions
01074     {
01075         Base::Console().Error(e);
01076         PyErr_SetString(PyExc_Exception,e);
01077         return NULL;
01078     }
01079     // in debug not all exceptions will be catched to get the attention of the developer!
01080 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01081     catch(const std::exception& e) // catch other c++ exceptions
01082     {
01083         std::string str;
01084         str += "FC++ exception thrown (";
01085         str += e.what();
01086         str += ")";
01087         Base::Console().Error(str.c_str());
01088         PyErr_SetString(PyExc_Exception,str.c_str());
01089         return NULL;
01090     }
01091     catch(...)  // catch the rest!
01092     {
01093         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01094         return NULL;
01095     }
01096 #endif
01097 }
01098 
01099 // insertPoleRowBefore() callback and implementer
01100 // PyObject*  BezierSurfacePy::insertPoleRowBefore(PyObject *args){};
01101 // has to be implemented in BezierSurfacePyImp.cpp
01102 PyObject * BezierSurfacePy::staticCallback_insertPoleRowBefore (PyObject *self, PyObject *args)
01103 {
01104     // test if twin object not allready deleted
01105     if (!((PyObjectBase*) self)->isValid()){
01106         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01107         return NULL;
01108     }
01109 
01110     // test if object is set Const
01111     if (((PyObjectBase*) self)->isConst()){
01112         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01113         return NULL;
01114     }
01115 
01116     try { // catches all exceptions coming up from c++ and generate a python exception
01117         PyObject* ret = ((BezierSurfacePy*)self)->insertPoleRowBefore(args);
01118         if (ret != 0)
01119             ((BezierSurfacePy*)self)->startNotify();
01120         return ret;
01121     }
01122     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01123     {
01124         std::string str;
01125         str += "FreeCAD exception thrown (";
01126         str += e.what();
01127         str += ")";
01128         e.ReportException();
01129         PyErr_SetString(PyExc_Exception,str.c_str());
01130         return NULL;
01131     }
01132     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01133     {
01134         std::string str;
01135         str += "File system exception thrown (";
01136         //str += e.who();
01137         //str += ", ";
01138         str += e.what();
01139         str += ")\n";
01140         Base::Console().Error(str.c_str());
01141         PyErr_SetString(PyExc_Exception,str.c_str());
01142         return NULL;
01143     }
01144     catch(const Py::Exception&)
01145     {
01146         // The exception text is already set
01147         return NULL;
01148     }
01149     catch(const char* e) // catch simple string exceptions
01150     {
01151         Base::Console().Error(e);
01152         PyErr_SetString(PyExc_Exception,e);
01153         return NULL;
01154     }
01155     // in debug not all exceptions will be catched to get the attention of the developer!
01156 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01157     catch(const std::exception& e) // catch other c++ exceptions
01158     {
01159         std::string str;
01160         str += "FC++ exception thrown (";
01161         str += e.what();
01162         str += ")";
01163         Base::Console().Error(str.c_str());
01164         PyErr_SetString(PyExc_Exception,str.c_str());
01165         return NULL;
01166     }
01167     catch(...)  // catch the rest!
01168     {
01169         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01170         return NULL;
01171     }
01172 #endif
01173 }
01174 
01175 // removePoleCol() callback and implementer
01176 // PyObject*  BezierSurfacePy::removePoleCol(PyObject *args){};
01177 // has to be implemented in BezierSurfacePyImp.cpp
01178 PyObject * BezierSurfacePy::staticCallback_removePoleCol (PyObject *self, PyObject *args)
01179 {
01180     // test if twin object not allready deleted
01181     if (!((PyObjectBase*) self)->isValid()){
01182         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01183         return NULL;
01184     }
01185 
01186     // test if object is set Const
01187     if (((PyObjectBase*) self)->isConst()){
01188         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01189         return NULL;
01190     }
01191 
01192     try { // catches all exceptions coming up from c++ and generate a python exception
01193         PyObject* ret = ((BezierSurfacePy*)self)->removePoleCol(args);
01194         if (ret != 0)
01195             ((BezierSurfacePy*)self)->startNotify();
01196         return ret;
01197     }
01198     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01199     {
01200         std::string str;
01201         str += "FreeCAD exception thrown (";
01202         str += e.what();
01203         str += ")";
01204         e.ReportException();
01205         PyErr_SetString(PyExc_Exception,str.c_str());
01206         return NULL;
01207     }
01208     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01209     {
01210         std::string str;
01211         str += "File system exception thrown (";
01212         //str += e.who();
01213         //str += ", ";
01214         str += e.what();
01215         str += ")\n";
01216         Base::Console().Error(str.c_str());
01217         PyErr_SetString(PyExc_Exception,str.c_str());
01218         return NULL;
01219     }
01220     catch(const Py::Exception&)
01221     {
01222         // The exception text is already set
01223         return NULL;
01224     }
01225     catch(const char* e) // catch simple string exceptions
01226     {
01227         Base::Console().Error(e);
01228         PyErr_SetString(PyExc_Exception,e);
01229         return NULL;
01230     }
01231     // in debug not all exceptions will be catched to get the attention of the developer!
01232 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01233     catch(const std::exception& e) // catch other c++ exceptions
01234     {
01235         std::string str;
01236         str += "FC++ exception thrown (";
01237         str += e.what();
01238         str += ")";
01239         Base::Console().Error(str.c_str());
01240         PyErr_SetString(PyExc_Exception,str.c_str());
01241         return NULL;
01242     }
01243     catch(...)  // catch the rest!
01244     {
01245         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01246         return NULL;
01247     }
01248 #endif
01249 }
01250 
01251 // removePoleRow() callback and implementer
01252 // PyObject*  BezierSurfacePy::removePoleRow(PyObject *args){};
01253 // has to be implemented in BezierSurfacePyImp.cpp
01254 PyObject * BezierSurfacePy::staticCallback_removePoleRow (PyObject *self, PyObject *args)
01255 {
01256     // test if twin object not allready deleted
01257     if (!((PyObjectBase*) self)->isValid()){
01258         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01259         return NULL;
01260     }
01261 
01262     // test if object is set Const
01263     if (((PyObjectBase*) self)->isConst()){
01264         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01265         return NULL;
01266     }
01267 
01268     try { // catches all exceptions coming up from c++ and generate a python exception
01269         PyObject* ret = ((BezierSurfacePy*)self)->removePoleRow(args);
01270         if (ret != 0)
01271             ((BezierSurfacePy*)self)->startNotify();
01272         return ret;
01273     }
01274     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01275     {
01276         std::string str;
01277         str += "FreeCAD exception thrown (";
01278         str += e.what();
01279         str += ")";
01280         e.ReportException();
01281         PyErr_SetString(PyExc_Exception,str.c_str());
01282         return NULL;
01283     }
01284     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01285     {
01286         std::string str;
01287         str += "File system exception thrown (";
01288         //str += e.who();
01289         //str += ", ";
01290         str += e.what();
01291         str += ")\n";
01292         Base::Console().Error(str.c_str());
01293         PyErr_SetString(PyExc_Exception,str.c_str());
01294         return NULL;
01295     }
01296     catch(const Py::Exception&)
01297     {
01298         // The exception text is already set
01299         return NULL;
01300     }
01301     catch(const char* e) // catch simple string exceptions
01302     {
01303         Base::Console().Error(e);
01304         PyErr_SetString(PyExc_Exception,e);
01305         return NULL;
01306     }
01307     // in debug not all exceptions will be catched to get the attention of the developer!
01308 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01309     catch(const std::exception& e) // catch other c++ exceptions
01310     {
01311         std::string str;
01312         str += "FC++ exception thrown (";
01313         str += e.what();
01314         str += ")";
01315         Base::Console().Error(str.c_str());
01316         PyErr_SetString(PyExc_Exception,str.c_str());
01317         return NULL;
01318     }
01319     catch(...)  // catch the rest!
01320     {
01321         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01322         return NULL;
01323     }
01324 #endif
01325 }
01326 
01327 // segment() callback and implementer
01328 // PyObject*  BezierSurfacePy::segment(PyObject *args){};
01329 // has to be implemented in BezierSurfacePyImp.cpp
01330 PyObject * BezierSurfacePy::staticCallback_segment (PyObject *self, PyObject *args)
01331 {
01332     // test if twin object not allready deleted
01333     if (!((PyObjectBase*) self)->isValid()){
01334         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01335         return NULL;
01336     }
01337 
01338     // test if object is set Const
01339     if (((PyObjectBase*) self)->isConst()){
01340         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01341         return NULL;
01342     }
01343 
01344     try { // catches all exceptions coming up from c++ and generate a python exception
01345         PyObject* ret = ((BezierSurfacePy*)self)->segment(args);
01346         if (ret != 0)
01347             ((BezierSurfacePy*)self)->startNotify();
01348         return ret;
01349     }
01350     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01351     {
01352         std::string str;
01353         str += "FreeCAD exception thrown (";
01354         str += e.what();
01355         str += ")";
01356         e.ReportException();
01357         PyErr_SetString(PyExc_Exception,str.c_str());
01358         return NULL;
01359     }
01360     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01361     {
01362         std::string str;
01363         str += "File system exception thrown (";
01364         //str += e.who();
01365         //str += ", ";
01366         str += e.what();
01367         str += ")\n";
01368         Base::Console().Error(str.c_str());
01369         PyErr_SetString(PyExc_Exception,str.c_str());
01370         return NULL;
01371     }
01372     catch(const Py::Exception&)
01373     {
01374         // The exception text is already set
01375         return NULL;
01376     }
01377     catch(const char* e) // catch simple string exceptions
01378     {
01379         Base::Console().Error(e);
01380         PyErr_SetString(PyExc_Exception,e);
01381         return NULL;
01382     }
01383     // in debug not all exceptions will be catched to get the attention of the developer!
01384 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01385     catch(const std::exception& e) // catch other c++ exceptions
01386     {
01387         std::string str;
01388         str += "FC++ exception thrown (";
01389         str += e.what();
01390         str += ")";
01391         Base::Console().Error(str.c_str());
01392         PyErr_SetString(PyExc_Exception,str.c_str());
01393         return NULL;
01394     }
01395     catch(...)  // catch the rest!
01396     {
01397         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01398         return NULL;
01399     }
01400 #endif
01401 }
01402 
01403 // setPole() callback and implementer
01404 // PyObject*  BezierSurfacePy::setPole(PyObject *args){};
01405 // has to be implemented in BezierSurfacePyImp.cpp
01406 PyObject * BezierSurfacePy::staticCallback_setPole (PyObject *self, PyObject *args)
01407 {
01408     // test if twin object not allready deleted
01409     if (!((PyObjectBase*) self)->isValid()){
01410         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01411         return NULL;
01412     }
01413 
01414     // test if object is set Const
01415     if (((PyObjectBase*) self)->isConst()){
01416         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01417         return NULL;
01418     }
01419 
01420     try { // catches all exceptions coming up from c++ and generate a python exception
01421         PyObject* ret = ((BezierSurfacePy*)self)->setPole(args);
01422         if (ret != 0)
01423             ((BezierSurfacePy*)self)->startNotify();
01424         return ret;
01425     }
01426     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01427     {
01428         std::string str;
01429         str += "FreeCAD exception thrown (";
01430         str += e.what();
01431         str += ")";
01432         e.ReportException();
01433         PyErr_SetString(PyExc_Exception,str.c_str());
01434         return NULL;
01435     }
01436     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01437     {
01438         std::string str;
01439         str += "File system exception thrown (";
01440         //str += e.who();
01441         //str += ", ";
01442         str += e.what();
01443         str += ")\n";
01444         Base::Console().Error(str.c_str());
01445         PyErr_SetString(PyExc_Exception,str.c_str());
01446         return NULL;
01447     }
01448     catch(const Py::Exception&)
01449     {
01450         // The exception text is already set
01451         return NULL;
01452     }
01453     catch(const char* e) // catch simple string exceptions
01454     {
01455         Base::Console().Error(e);
01456         PyErr_SetString(PyExc_Exception,e);
01457         return NULL;
01458     }
01459     // in debug not all exceptions will be catched to get the attention of the developer!
01460 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01461     catch(const std::exception& e) // catch other c++ exceptions
01462     {
01463         std::string str;
01464         str += "FC++ exception thrown (";
01465         str += e.what();
01466         str += ")";
01467         Base::Console().Error(str.c_str());
01468         PyErr_SetString(PyExc_Exception,str.c_str());
01469         return NULL;
01470     }
01471     catch(...)  // catch the rest!
01472     {
01473         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01474         return NULL;
01475     }
01476 #endif
01477 }
01478 
01479 // setPoleCol() callback and implementer
01480 // PyObject*  BezierSurfacePy::setPoleCol(PyObject *args){};
01481 // has to be implemented in BezierSurfacePyImp.cpp
01482 PyObject * BezierSurfacePy::staticCallback_setPoleCol (PyObject *self, PyObject *args)
01483 {
01484     // test if twin object not allready deleted
01485     if (!((PyObjectBase*) self)->isValid()){
01486         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01487         return NULL;
01488     }
01489 
01490     // test if object is set Const
01491     if (((PyObjectBase*) self)->isConst()){
01492         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01493         return NULL;
01494     }
01495 
01496     try { // catches all exceptions coming up from c++ and generate a python exception
01497         PyObject* ret = ((BezierSurfacePy*)self)->setPoleCol(args);
01498         if (ret != 0)
01499             ((BezierSurfacePy*)self)->startNotify();
01500         return ret;
01501     }
01502     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01503     {
01504         std::string str;
01505         str += "FreeCAD exception thrown (";
01506         str += e.what();
01507         str += ")";
01508         e.ReportException();
01509         PyErr_SetString(PyExc_Exception,str.c_str());
01510         return NULL;
01511     }
01512     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01513     {
01514         std::string str;
01515         str += "File system exception thrown (";
01516         //str += e.who();
01517         //str += ", ";
01518         str += e.what();
01519         str += ")\n";
01520         Base::Console().Error(str.c_str());
01521         PyErr_SetString(PyExc_Exception,str.c_str());
01522         return NULL;
01523     }
01524     catch(const Py::Exception&)
01525     {
01526         // The exception text is already set
01527         return NULL;
01528     }
01529     catch(const char* e) // catch simple string exceptions
01530     {
01531         Base::Console().Error(e);
01532         PyErr_SetString(PyExc_Exception,e);
01533         return NULL;
01534     }
01535     // in debug not all exceptions will be catched to get the attention of the developer!
01536 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01537     catch(const std::exception& e) // catch other c++ exceptions
01538     {
01539         std::string str;
01540         str += "FC++ exception thrown (";
01541         str += e.what();
01542         str += ")";
01543         Base::Console().Error(str.c_str());
01544         PyErr_SetString(PyExc_Exception,str.c_str());
01545         return NULL;
01546     }
01547     catch(...)  // catch the rest!
01548     {
01549         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01550         return NULL;
01551     }
01552 #endif
01553 }
01554 
01555 // setPoleRow() callback and implementer
01556 // PyObject*  BezierSurfacePy::setPoleRow(PyObject *args){};
01557 // has to be implemented in BezierSurfacePyImp.cpp
01558 PyObject * BezierSurfacePy::staticCallback_setPoleRow (PyObject *self, PyObject *args)
01559 {
01560     // test if twin object not allready deleted
01561     if (!((PyObjectBase*) self)->isValid()){
01562         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01563         return NULL;
01564     }
01565 
01566     // test if object is set Const
01567     if (((PyObjectBase*) self)->isConst()){
01568         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01569         return NULL;
01570     }
01571 
01572     try { // catches all exceptions coming up from c++ and generate a python exception
01573         PyObject* ret = ((BezierSurfacePy*)self)->setPoleRow(args);
01574         if (ret != 0)
01575             ((BezierSurfacePy*)self)->startNotify();
01576         return ret;
01577     }
01578     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01579     {
01580         std::string str;
01581         str += "FreeCAD exception thrown (";
01582         str += e.what();
01583         str += ")";
01584         e.ReportException();
01585         PyErr_SetString(PyExc_Exception,str.c_str());
01586         return NULL;
01587     }
01588     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01589     {
01590         std::string str;
01591         str += "File system exception thrown (";
01592         //str += e.who();
01593         //str += ", ";
01594         str += e.what();
01595         str += ")\n";
01596         Base::Console().Error(str.c_str());
01597         PyErr_SetString(PyExc_Exception,str.c_str());
01598         return NULL;
01599     }
01600     catch(const Py::Exception&)
01601     {
01602         // The exception text is already set
01603         return NULL;
01604     }
01605     catch(const char* e) // catch simple string exceptions
01606     {
01607         Base::Console().Error(e);
01608         PyErr_SetString(PyExc_Exception,e);
01609         return NULL;
01610     }
01611     // in debug not all exceptions will be catched to get the attention of the developer!
01612 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01613     catch(const std::exception& e) // catch other c++ exceptions
01614     {
01615         std::string str;
01616         str += "FC++ exception thrown (";
01617         str += e.what();
01618         str += ")";
01619         Base::Console().Error(str.c_str());
01620         PyErr_SetString(PyExc_Exception,str.c_str());
01621         return NULL;
01622     }
01623     catch(...)  // catch the rest!
01624     {
01625         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01626         return NULL;
01627     }
01628 #endif
01629 }
01630 
01631 // getPole() callback and implementer
01632 // PyObject*  BezierSurfacePy::getPole(PyObject *args){};
01633 // has to be implemented in BezierSurfacePyImp.cpp
01634 PyObject * BezierSurfacePy::staticCallback_getPole (PyObject *self, PyObject *args)
01635 {
01636     // test if twin object not allready deleted
01637     if (!((PyObjectBase*) self)->isValid()){
01638         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01639         return NULL;
01640     }
01641 
01642     // test if object is set Const
01643     if (((PyObjectBase*) self)->isConst()){
01644         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01645         return NULL;
01646     }
01647 
01648     try { // catches all exceptions coming up from c++ and generate a python exception
01649         PyObject* ret = ((BezierSurfacePy*)self)->getPole(args);
01650         if (ret != 0)
01651             ((BezierSurfacePy*)self)->startNotify();
01652         return ret;
01653     }
01654     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01655     {
01656         std::string str;
01657         str += "FreeCAD exception thrown (";
01658         str += e.what();
01659         str += ")";
01660         e.ReportException();
01661         PyErr_SetString(PyExc_Exception,str.c_str());
01662         return NULL;
01663     }
01664     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01665     {
01666         std::string str;
01667         str += "File system exception thrown (";
01668         //str += e.who();
01669         //str += ", ";
01670         str += e.what();
01671         str += ")\n";
01672         Base::Console().Error(str.c_str());
01673         PyErr_SetString(PyExc_Exception,str.c_str());
01674         return NULL;
01675     }
01676     catch(const Py::Exception&)
01677     {
01678         // The exception text is already set
01679         return NULL;
01680     }
01681     catch(const char* e) // catch simple string exceptions
01682     {
01683         Base::Console().Error(e);
01684         PyErr_SetString(PyExc_Exception,e);
01685         return NULL;
01686     }
01687     // in debug not all exceptions will be catched to get the attention of the developer!
01688 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01689     catch(const std::exception& e) // catch other c++ exceptions
01690     {
01691         std::string str;
01692         str += "FC++ exception thrown (";
01693         str += e.what();
01694         str += ")";
01695         Base::Console().Error(str.c_str());
01696         PyErr_SetString(PyExc_Exception,str.c_str());
01697         return NULL;
01698     }
01699     catch(...)  // catch the rest!
01700     {
01701         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01702         return NULL;
01703     }
01704 #endif
01705 }
01706 
01707 // getPoles() callback and implementer
01708 // PyObject*  BezierSurfacePy::getPoles(PyObject *args){};
01709 // has to be implemented in BezierSurfacePyImp.cpp
01710 PyObject * BezierSurfacePy::staticCallback_getPoles (PyObject *self, PyObject *args)
01711 {
01712     // test if twin object not allready deleted
01713     if (!((PyObjectBase*) self)->isValid()){
01714         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01715         return NULL;
01716     }
01717 
01718     // test if object is set Const
01719     if (((PyObjectBase*) self)->isConst()){
01720         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01721         return NULL;
01722     }
01723 
01724     try { // catches all exceptions coming up from c++ and generate a python exception
01725         PyObject* ret = ((BezierSurfacePy*)self)->getPoles(args);
01726         if (ret != 0)
01727             ((BezierSurfacePy*)self)->startNotify();
01728         return ret;
01729     }
01730     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01731     {
01732         std::string str;
01733         str += "FreeCAD exception thrown (";
01734         str += e.what();
01735         str += ")";
01736         e.ReportException();
01737         PyErr_SetString(PyExc_Exception,str.c_str());
01738         return NULL;
01739     }
01740     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01741     {
01742         std::string str;
01743         str += "File system exception thrown (";
01744         //str += e.who();
01745         //str += ", ";
01746         str += e.what();
01747         str += ")\n";
01748         Base::Console().Error(str.c_str());
01749         PyErr_SetString(PyExc_Exception,str.c_str());
01750         return NULL;
01751     }
01752     catch(const Py::Exception&)
01753     {
01754         // The exception text is already set
01755         return NULL;
01756     }
01757     catch(const char* e) // catch simple string exceptions
01758     {
01759         Base::Console().Error(e);
01760         PyErr_SetString(PyExc_Exception,e);
01761         return NULL;
01762     }
01763     // in debug not all exceptions will be catched to get the attention of the developer!
01764 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01765     catch(const std::exception& e) // catch other c++ exceptions
01766     {
01767         std::string str;
01768         str += "FC++ exception thrown (";
01769         str += e.what();
01770         str += ")";
01771         Base::Console().Error(str.c_str());
01772         PyErr_SetString(PyExc_Exception,str.c_str());
01773         return NULL;
01774     }
01775     catch(...)  // catch the rest!
01776     {
01777         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01778         return NULL;
01779     }
01780 #endif
01781 }
01782 
01783 // setWeight() callback and implementer
01784 // PyObject*  BezierSurfacePy::setWeight(PyObject *args){};
01785 // has to be implemented in BezierSurfacePyImp.cpp
01786 PyObject * BezierSurfacePy::staticCallback_setWeight (PyObject *self, PyObject *args)
01787 {
01788     // test if twin object not allready deleted
01789     if (!((PyObjectBase*) self)->isValid()){
01790         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01791         return NULL;
01792     }
01793 
01794     // test if object is set Const
01795     if (((PyObjectBase*) self)->isConst()){
01796         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01797         return NULL;
01798     }
01799 
01800     try { // catches all exceptions coming up from c++ and generate a python exception
01801         PyObject* ret = ((BezierSurfacePy*)self)->setWeight(args);
01802         if (ret != 0)
01803             ((BezierSurfacePy*)self)->startNotify();
01804         return ret;
01805     }
01806     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01807     {
01808         std::string str;
01809         str += "FreeCAD exception thrown (";
01810         str += e.what();
01811         str += ")";
01812         e.ReportException();
01813         PyErr_SetString(PyExc_Exception,str.c_str());
01814         return NULL;
01815     }
01816     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01817     {
01818         std::string str;
01819         str += "File system exception thrown (";
01820         //str += e.who();
01821         //str += ", ";
01822         str += e.what();
01823         str += ")\n";
01824         Base::Console().Error(str.c_str());
01825         PyErr_SetString(PyExc_Exception,str.c_str());
01826         return NULL;
01827     }
01828     catch(const Py::Exception&)
01829     {
01830         // The exception text is already set
01831         return NULL;
01832     }
01833     catch(const char* e) // catch simple string exceptions
01834     {
01835         Base::Console().Error(e);
01836         PyErr_SetString(PyExc_Exception,e);
01837         return NULL;
01838     }
01839     // in debug not all exceptions will be catched to get the attention of the developer!
01840 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01841     catch(const std::exception& e) // catch other c++ exceptions
01842     {
01843         std::string str;
01844         str += "FC++ exception thrown (";
01845         str += e.what();
01846         str += ")";
01847         Base::Console().Error(str.c_str());
01848         PyErr_SetString(PyExc_Exception,str.c_str());
01849         return NULL;
01850     }
01851     catch(...)  // catch the rest!
01852     {
01853         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01854         return NULL;
01855     }
01856 #endif
01857 }
01858 
01859 // setWeightCol() callback and implementer
01860 // PyObject*  BezierSurfacePy::setWeightCol(PyObject *args){};
01861 // has to be implemented in BezierSurfacePyImp.cpp
01862 PyObject * BezierSurfacePy::staticCallback_setWeightCol (PyObject *self, PyObject *args)
01863 {
01864     // test if twin object not allready deleted
01865     if (!((PyObjectBase*) self)->isValid()){
01866         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01867         return NULL;
01868     }
01869 
01870     // test if object is set Const
01871     if (((PyObjectBase*) self)->isConst()){
01872         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01873         return NULL;
01874     }
01875 
01876     try { // catches all exceptions coming up from c++ and generate a python exception
01877         PyObject* ret = ((BezierSurfacePy*)self)->setWeightCol(args);
01878         if (ret != 0)
01879             ((BezierSurfacePy*)self)->startNotify();
01880         return ret;
01881     }
01882     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01883     {
01884         std::string str;
01885         str += "FreeCAD exception thrown (";
01886         str += e.what();
01887         str += ")";
01888         e.ReportException();
01889         PyErr_SetString(PyExc_Exception,str.c_str());
01890         return NULL;
01891     }
01892     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01893     {
01894         std::string str;
01895         str += "File system exception thrown (";
01896         //str += e.who();
01897         //str += ", ";
01898         str += e.what();
01899         str += ")\n";
01900         Base::Console().Error(str.c_str());
01901         PyErr_SetString(PyExc_Exception,str.c_str());
01902         return NULL;
01903     }
01904     catch(const Py::Exception&)
01905     {
01906         // The exception text is already set
01907         return NULL;
01908     }
01909     catch(const char* e) // catch simple string exceptions
01910     {
01911         Base::Console().Error(e);
01912         PyErr_SetString(PyExc_Exception,e);
01913         return NULL;
01914     }
01915     // in debug not all exceptions will be catched to get the attention of the developer!
01916 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01917     catch(const std::exception& e) // catch other c++ exceptions
01918     {
01919         std::string str;
01920         str += "FC++ exception thrown (";
01921         str += e.what();
01922         str += ")";
01923         Base::Console().Error(str.c_str());
01924         PyErr_SetString(PyExc_Exception,str.c_str());
01925         return NULL;
01926     }
01927     catch(...)  // catch the rest!
01928     {
01929         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01930         return NULL;
01931     }
01932 #endif
01933 }
01934 
01935 // setWeightRow() callback and implementer
01936 // PyObject*  BezierSurfacePy::setWeightRow(PyObject *args){};
01937 // has to be implemented in BezierSurfacePyImp.cpp
01938 PyObject * BezierSurfacePy::staticCallback_setWeightRow (PyObject *self, PyObject *args)
01939 {
01940     // test if twin object not allready deleted
01941     if (!((PyObjectBase*) self)->isValid()){
01942         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01943         return NULL;
01944     }
01945 
01946     // test if object is set Const
01947     if (((PyObjectBase*) self)->isConst()){
01948         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01949         return NULL;
01950     }
01951 
01952     try { // catches all exceptions coming up from c++ and generate a python exception
01953         PyObject* ret = ((BezierSurfacePy*)self)->setWeightRow(args);
01954         if (ret != 0)
01955             ((BezierSurfacePy*)self)->startNotify();
01956         return ret;
01957     }
01958     catch(const Base::Exception& e) // catch the FreeCAD exceptions
01959     {
01960         std::string str;
01961         str += "FreeCAD exception thrown (";
01962         str += e.what();
01963         str += ")";
01964         e.ReportException();
01965         PyErr_SetString(PyExc_Exception,str.c_str());
01966         return NULL;
01967     }
01968     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
01969     {
01970         std::string str;
01971         str += "File system exception thrown (";
01972         //str += e.who();
01973         //str += ", ";
01974         str += e.what();
01975         str += ")\n";
01976         Base::Console().Error(str.c_str());
01977         PyErr_SetString(PyExc_Exception,str.c_str());
01978         return NULL;
01979     }
01980     catch(const Py::Exception&)
01981     {
01982         // The exception text is already set
01983         return NULL;
01984     }
01985     catch(const char* e) // catch simple string exceptions
01986     {
01987         Base::Console().Error(e);
01988         PyErr_SetString(PyExc_Exception,e);
01989         return NULL;
01990     }
01991     // in debug not all exceptions will be catched to get the attention of the developer!
01992 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
01993     catch(const std::exception& e) // catch other c++ exceptions
01994     {
01995         std::string str;
01996         str += "FC++ exception thrown (";
01997         str += e.what();
01998         str += ")";
01999         Base::Console().Error(str.c_str());
02000         PyErr_SetString(PyExc_Exception,str.c_str());
02001         return NULL;
02002     }
02003     catch(...)  // catch the rest!
02004     {
02005         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02006         return NULL;
02007     }
02008 #endif
02009 }
02010 
02011 // getWeight() callback and implementer
02012 // PyObject*  BezierSurfacePy::getWeight(PyObject *args){};
02013 // has to be implemented in BezierSurfacePyImp.cpp
02014 PyObject * BezierSurfacePy::staticCallback_getWeight (PyObject *self, PyObject *args)
02015 {
02016     // test if twin object not allready deleted
02017     if (!((PyObjectBase*) self)->isValid()){
02018         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02019         return NULL;
02020     }
02021 
02022     // test if object is set Const
02023     if (((PyObjectBase*) self)->isConst()){
02024         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02025         return NULL;
02026     }
02027 
02028     try { // catches all exceptions coming up from c++ and generate a python exception
02029         PyObject* ret = ((BezierSurfacePy*)self)->getWeight(args);
02030         if (ret != 0)
02031             ((BezierSurfacePy*)self)->startNotify();
02032         return ret;
02033     }
02034     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02035     {
02036         std::string str;
02037         str += "FreeCAD exception thrown (";
02038         str += e.what();
02039         str += ")";
02040         e.ReportException();
02041         PyErr_SetString(PyExc_Exception,str.c_str());
02042         return NULL;
02043     }
02044     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
02045     {
02046         std::string str;
02047         str += "File system exception thrown (";
02048         //str += e.who();
02049         //str += ", ";
02050         str += e.what();
02051         str += ")\n";
02052         Base::Console().Error(str.c_str());
02053         PyErr_SetString(PyExc_Exception,str.c_str());
02054         return NULL;
02055     }
02056     catch(const Py::Exception&)
02057     {
02058         // The exception text is already set
02059         return NULL;
02060     }
02061     catch(const char* e) // catch simple string exceptions
02062     {
02063         Base::Console().Error(e);
02064         PyErr_SetString(PyExc_Exception,e);
02065         return NULL;
02066     }
02067     // in debug not all exceptions will be catched to get the attention of the developer!
02068 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02069     catch(const std::exception& e) // catch other c++ exceptions
02070     {
02071         std::string str;
02072         str += "FC++ exception thrown (";
02073         str += e.what();
02074         str += ")";
02075         Base::Console().Error(str.c_str());
02076         PyErr_SetString(PyExc_Exception,str.c_str());
02077         return NULL;
02078     }
02079     catch(...)  // catch the rest!
02080     {
02081         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02082         return NULL;
02083     }
02084 #endif
02085 }
02086 
02087 // getWeights() callback and implementer
02088 // PyObject*  BezierSurfacePy::getWeights(PyObject *args){};
02089 // has to be implemented in BezierSurfacePyImp.cpp
02090 PyObject * BezierSurfacePy::staticCallback_getWeights (PyObject *self, PyObject *args)
02091 {
02092     // test if twin object not allready deleted
02093     if (!((PyObjectBase*) self)->isValid()){
02094         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02095         return NULL;
02096     }
02097 
02098     // test if object is set Const
02099     if (((PyObjectBase*) self)->isConst()){
02100         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02101         return NULL;
02102     }
02103 
02104     try { // catches all exceptions coming up from c++ and generate a python exception
02105         PyObject* ret = ((BezierSurfacePy*)self)->getWeights(args);
02106         if (ret != 0)
02107             ((BezierSurfacePy*)self)->startNotify();
02108         return ret;
02109     }
02110     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02111     {
02112         std::string str;
02113         str += "FreeCAD exception thrown (";
02114         str += e.what();
02115         str += ")";
02116         e.ReportException();
02117         PyErr_SetString(PyExc_Exception,str.c_str());
02118         return NULL;
02119     }
02120     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
02121     {
02122         std::string str;
02123         str += "File system exception thrown (";
02124         //str += e.who();
02125         //str += ", ";
02126         str += e.what();
02127         str += ")\n";
02128         Base::Console().Error(str.c_str());
02129         PyErr_SetString(PyExc_Exception,str.c_str());
02130         return NULL;
02131     }
02132     catch(const Py::Exception&)
02133     {
02134         // The exception text is already set
02135         return NULL;
02136     }
02137     catch(const char* e) // catch simple string exceptions
02138     {
02139         Base::Console().Error(e);
02140         PyErr_SetString(PyExc_Exception,e);
02141         return NULL;
02142     }
02143     // in debug not all exceptions will be catched to get the attention of the developer!
02144 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02145     catch(const std::exception& e) // catch other c++ exceptions
02146     {
02147         std::string str;
02148         str += "FC++ exception thrown (";
02149         str += e.what();
02150         str += ")";
02151         Base::Console().Error(str.c_str());
02152         PyErr_SetString(PyExc_Exception,str.c_str());
02153         return NULL;
02154     }
02155     catch(...)  // catch the rest!
02156     {
02157         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02158         return NULL;
02159     }
02160 #endif
02161 }
02162 
02163 // getResolution() callback and implementer
02164 // PyObject*  BezierSurfacePy::getResolution(PyObject *args){};
02165 // has to be implemented in BezierSurfacePyImp.cpp
02166 PyObject * BezierSurfacePy::staticCallback_getResolution (PyObject *self, PyObject *args)
02167 {
02168     // test if twin object not allready deleted
02169     if (!((PyObjectBase*) self)->isValid()){
02170         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02171         return NULL;
02172     }
02173 
02174 
02175     try { // catches all exceptions coming up from c++ and generate a python exception
02176         PyObject* ret = ((BezierSurfacePy*)self)->getResolution(args);
02177         return ret;
02178     }
02179     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02180     {
02181         std::string str;
02182         str += "FreeCAD exception thrown (";
02183         str += e.what();
02184         str += ")";
02185         e.ReportException();
02186         PyErr_SetString(PyExc_Exception,str.c_str());
02187         return NULL;
02188     }
02189     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
02190     {
02191         std::string str;
02192         str += "File system exception thrown (";
02193         //str += e.who();
02194         //str += ", ";
02195         str += e.what();
02196         str += ")\n";
02197         Base::Console().Error(str.c_str());
02198         PyErr_SetString(PyExc_Exception,str.c_str());
02199         return NULL;
02200     }
02201     catch(const Py::Exception&)
02202     {
02203         // The exception text is already set
02204         return NULL;
02205     }
02206     catch(const char* e) // catch simple string exceptions
02207     {
02208         Base::Console().Error(e);
02209         PyErr_SetString(PyExc_Exception,e);
02210         return NULL;
02211     }
02212     // in debug not all exceptions will be catched to get the attention of the developer!
02213 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02214     catch(const std::exception& e) // catch other c++ exceptions
02215     {
02216         std::string str;
02217         str += "FC++ exception thrown (";
02218         str += e.what();
02219         str += ")";
02220         Base::Console().Error(str.c_str());
02221         PyErr_SetString(PyExc_Exception,str.c_str());
02222         return NULL;
02223     }
02224     catch(...)  // catch the rest!
02225     {
02226         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02227         return NULL;
02228     }
02229 #endif
02230 }
02231 
02232 // exchangeUV() callback and implementer
02233 // PyObject*  BezierSurfacePy::exchangeUV(PyObject *args){};
02234 // has to be implemented in BezierSurfacePyImp.cpp
02235 PyObject * BezierSurfacePy::staticCallback_exchangeUV (PyObject *self, PyObject *args)
02236 {
02237     // test if twin object not allready deleted
02238     if (!((PyObjectBase*) self)->isValid()){
02239         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02240         return NULL;
02241     }
02242 
02243     // test if object is set Const
02244     if (((PyObjectBase*) self)->isConst()){
02245         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02246         return NULL;
02247     }
02248 
02249     try { // catches all exceptions coming up from c++ and generate a python exception
02250         PyObject* ret = ((BezierSurfacePy*)self)->exchangeUV(args);
02251         if (ret != 0)
02252             ((BezierSurfacePy*)self)->startNotify();
02253         return ret;
02254     }
02255     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02256     {
02257         std::string str;
02258         str += "FreeCAD exception thrown (";
02259         str += e.what();
02260         str += ")";
02261         e.ReportException();
02262         PyErr_SetString(PyExc_Exception,str.c_str());
02263         return NULL;
02264     }
02265     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
02266     {
02267         std::string str;
02268         str += "File system exception thrown (";
02269         //str += e.who();
02270         //str += ", ";
02271         str += e.what();
02272         str += ")\n";
02273         Base::Console().Error(str.c_str());
02274         PyErr_SetString(PyExc_Exception,str.c_str());
02275         return NULL;
02276     }
02277     catch(const Py::Exception&)
02278     {
02279         // The exception text is already set
02280         return NULL;
02281     }
02282     catch(const char* e) // catch simple string exceptions
02283     {
02284         Base::Console().Error(e);
02285         PyErr_SetString(PyExc_Exception,e);
02286         return NULL;
02287     }
02288     // in debug not all exceptions will be catched to get the attention of the developer!
02289 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02290     catch(const std::exception& e) // catch other c++ exceptions
02291     {
02292         std::string str;
02293         str += "FC++ exception thrown (";
02294         str += e.what();
02295         str += ")";
02296         Base::Console().Error(str.c_str());
02297         PyErr_SetString(PyExc_Exception,str.c_str());
02298         return NULL;
02299     }
02300     catch(...)  // catch the rest!
02301     {
02302         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02303         return NULL;
02304     }
02305 #endif
02306 }
02307 
02308 // uIso() callback and implementer
02309 // PyObject*  BezierSurfacePy::uIso(PyObject *args){};
02310 // has to be implemented in BezierSurfacePyImp.cpp
02311 PyObject * BezierSurfacePy::staticCallback_uIso (PyObject *self, PyObject *args)
02312 {
02313     // test if twin object not allready deleted
02314     if (!((PyObjectBase*) self)->isValid()){
02315         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02316         return NULL;
02317     }
02318 
02319     // test if object is set Const
02320     if (((PyObjectBase*) self)->isConst()){
02321         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02322         return NULL;
02323     }
02324 
02325     try { // catches all exceptions coming up from c++ and generate a python exception
02326         PyObject* ret = ((BezierSurfacePy*)self)->uIso(args);
02327         if (ret != 0)
02328             ((BezierSurfacePy*)self)->startNotify();
02329         return ret;
02330     }
02331     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02332     {
02333         std::string str;
02334         str += "FreeCAD exception thrown (";
02335         str += e.what();
02336         str += ")";
02337         e.ReportException();
02338         PyErr_SetString(PyExc_Exception,str.c_str());
02339         return NULL;
02340     }
02341     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
02342     {
02343         std::string str;
02344         str += "File system exception thrown (";
02345         //str += e.who();
02346         //str += ", ";
02347         str += e.what();
02348         str += ")\n";
02349         Base::Console().Error(str.c_str());
02350         PyErr_SetString(PyExc_Exception,str.c_str());
02351         return NULL;
02352     }
02353     catch(const Py::Exception&)
02354     {
02355         // The exception text is already set
02356         return NULL;
02357     }
02358     catch(const char* e) // catch simple string exceptions
02359     {
02360         Base::Console().Error(e);
02361         PyErr_SetString(PyExc_Exception,e);
02362         return NULL;
02363     }
02364     // in debug not all exceptions will be catched to get the attention of the developer!
02365 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02366     catch(const std::exception& e) // catch other c++ exceptions
02367     {
02368         std::string str;
02369         str += "FC++ exception thrown (";
02370         str += e.what();
02371         str += ")";
02372         Base::Console().Error(str.c_str());
02373         PyErr_SetString(PyExc_Exception,str.c_str());
02374         return NULL;
02375     }
02376     catch(...)  // catch the rest!
02377     {
02378         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02379         return NULL;
02380     }
02381 #endif
02382 }
02383 
02384 // vIso() callback and implementer
02385 // PyObject*  BezierSurfacePy::vIso(PyObject *args){};
02386 // has to be implemented in BezierSurfacePyImp.cpp
02387 PyObject * BezierSurfacePy::staticCallback_vIso (PyObject *self, PyObject *args)
02388 {
02389     // test if twin object not allready deleted
02390     if (!((PyObjectBase*) self)->isValid()){
02391         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02392         return NULL;
02393     }
02394 
02395     // test if object is set Const
02396     if (((PyObjectBase*) self)->isConst()){
02397         PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02398         return NULL;
02399     }
02400 
02401     try { // catches all exceptions coming up from c++ and generate a python exception
02402         PyObject* ret = ((BezierSurfacePy*)self)->vIso(args);
02403         if (ret != 0)
02404             ((BezierSurfacePy*)self)->startNotify();
02405         return ret;
02406     }
02407     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02408     {
02409         std::string str;
02410         str += "FreeCAD exception thrown (";
02411         str += e.what();
02412         str += ")";
02413         e.ReportException();
02414         PyErr_SetString(PyExc_Exception,str.c_str());
02415         return NULL;
02416     }
02417     catch(const boost::filesystem::filesystem_error& e) // catch boost filesystem exception
02418     {
02419         std::string str;
02420         str += "File system exception thrown (";
02421         //str += e.who();
02422         //str += ", ";
02423         str += e.what();
02424         str += ")\n";
02425         Base::Console().Error(str.c_str());
02426         PyErr_SetString(PyExc_Exception,str.c_str());
02427         return NULL;
02428     }
02429     catch(const Py::Exception&)
02430     {
02431         // The exception text is already set
02432         return NULL;
02433     }
02434     catch(const char* e) // catch simple string exceptions
02435     {
02436         Base::Console().Error(e);
02437         PyErr_SetString(PyExc_Exception,e);
02438         return NULL;
02439     }
02440     // in debug not all exceptions will be catched to get the attention of the developer!
02441 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02442     catch(const std::exception& e) // catch other c++ exceptions
02443     {
02444         std::string str;
02445         str += "FC++ exception thrown (";
02446         str += e.what();
02447         str += ")";
02448         Base::Console().Error(str.c_str());
02449         PyErr_SetString(PyExc_Exception,str.c_str());
02450         return NULL;
02451     }
02452     catch(...)  // catch the rest!
02453     {
02454         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02455         return NULL;
02456     }
02457 #endif
02458 }
02459 
02460 // UDegree() callback and implementer
02461 // PyObject*  BezierSurfacePy::UDegree(PyObject *args){};
02462 // has to be implemented in BezierSurfacePyImp.cpp
02463 PyObject * BezierSurfacePy::staticCallback_getUDegree (PyObject *self, void * /*closure*/)
02464 {
02465     if (!((PyObjectBase*) self)->isValid()){
02466         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02467         return NULL;
02468     }
02469 
02470     try {
02471         return Py::new_reference_to(((BezierSurfacePy*)self)->getUDegree());
02472     } catch (const Py::Exception&) {
02473         // The exception text is already set
02474         return NULL;
02475     } catch (...) {
02476         PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'UDegree' of object 'GeomBezierSurface'");
02477         return NULL;
02478     }
02479 }
02480 
02481 int BezierSurfacePy::staticCallback_setUDegree (PyObject *self, PyObject * /*value*/, void * /*closure*/)
02482 {
02483     if (!((PyObjectBase*) self)->isValid()){
02484         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02485         return -1;
02486     }
02487 
02488     PyErr_SetString(PyExc_AttributeError, "Attribute 'UDegree' of object 'GeomBezierSurface' is read-only");
02489     return -1;
02490 }
02491 
02492 // VDegree() callback and implementer
02493 // PyObject*  BezierSurfacePy::VDegree(PyObject *args){};
02494 // has to be implemented in BezierSurfacePyImp.cpp
02495 PyObject * BezierSurfacePy::staticCallback_getVDegree (PyObject *self, void * /*closure*/)
02496 {
02497     if (!((PyObjectBase*) self)->isValid()){
02498         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02499         return NULL;
02500     }
02501 
02502     try {
02503         return Py::new_reference_to(((BezierSurfacePy*)self)->getVDegree());
02504     } catch (const Py::Exception&) {
02505         // The exception text is already set
02506         return NULL;
02507     } catch (...) {
02508         PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'VDegree' of object 'GeomBezierSurface'");
02509         return NULL;
02510     }
02511 }
02512 
02513 int BezierSurfacePy::staticCallback_setVDegree (PyObject *self, PyObject * /*value*/, void * /*closure*/)
02514 {
02515     if (!((PyObjectBase*) self)->isValid()){
02516         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02517         return -1;
02518     }
02519 
02520     PyErr_SetString(PyExc_AttributeError, "Attribute 'VDegree' of object 'GeomBezierSurface' is read-only");
02521     return -1;
02522 }
02523 
02524 // MaxDegree() callback and implementer
02525 // PyObject*  BezierSurfacePy::MaxDegree(PyObject *args){};
02526 // has to be implemented in BezierSurfacePyImp.cpp
02527 PyObject * BezierSurfacePy::staticCallback_getMaxDegree (PyObject *self, void * /*closure*/)
02528 {
02529     if (!((PyObjectBase*) self)->isValid()){
02530         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02531         return NULL;
02532     }
02533 
02534     try {
02535         return Py::new_reference_to(((BezierSurfacePy*)self)->getMaxDegree());
02536     } catch (const Py::Exception&) {
02537         // The exception text is already set
02538         return NULL;
02539     } catch (...) {
02540         PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'MaxDegree' of object 'GeomBezierSurface'");
02541         return NULL;
02542     }
02543 }
02544 
02545 int BezierSurfacePy::staticCallback_setMaxDegree (PyObject *self, PyObject * /*value*/, void * /*closure*/)
02546 {
02547     if (!((PyObjectBase*) self)->isValid()){
02548         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02549         return -1;
02550     }
02551 
02552     PyErr_SetString(PyExc_AttributeError, "Attribute 'MaxDegree' of object 'GeomBezierSurface' is read-only");
02553     return -1;
02554 }
02555 
02556 // NbUPoles() callback and implementer
02557 // PyObject*  BezierSurfacePy::NbUPoles(PyObject *args){};
02558 // has to be implemented in BezierSurfacePyImp.cpp
02559 PyObject * BezierSurfacePy::staticCallback_getNbUPoles (PyObject *self, void * /*closure*/)
02560 {
02561     if (!((PyObjectBase*) self)->isValid()){
02562         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02563         return NULL;
02564     }
02565 
02566     try {
02567         return Py::new_reference_to(((BezierSurfacePy*)self)->getNbUPoles());
02568     } catch (const Py::Exception&) {
02569         // The exception text is already set
02570         return NULL;
02571     } catch (...) {
02572         PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'NbUPoles' of object 'GeomBezierSurface'");
02573         return NULL;
02574     }
02575 }
02576 
02577 int BezierSurfacePy::staticCallback_setNbUPoles (PyObject *self, PyObject * /*value*/, void * /*closure*/)
02578 {
02579     if (!((PyObjectBase*) self)->isValid()){
02580         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02581         return -1;
02582     }
02583 
02584     PyErr_SetString(PyExc_AttributeError, "Attribute 'NbUPoles' of object 'GeomBezierSurface' is read-only");
02585     return -1;
02586 }
02587 
02588 // NbVPoles() callback and implementer
02589 // PyObject*  BezierSurfacePy::NbVPoles(PyObject *args){};
02590 // has to be implemented in BezierSurfacePyImp.cpp
02591 PyObject * BezierSurfacePy::staticCallback_getNbVPoles (PyObject *self, void * /*closure*/)
02592 {
02593     if (!((PyObjectBase*) self)->isValid()){
02594         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02595         return NULL;
02596     }
02597 
02598     try {
02599         return Py::new_reference_to(((BezierSurfacePy*)self)->getNbVPoles());
02600     } catch (const Py::Exception&) {
02601         // The exception text is already set
02602         return NULL;
02603     } catch (...) {
02604         PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'NbVPoles' of object 'GeomBezierSurface'");
02605         return NULL;
02606     }
02607 }
02608 
02609 int BezierSurfacePy::staticCallback_setNbVPoles (PyObject *self, PyObject * /*value*/, void * /*closure*/)
02610 {
02611     if (!((PyObjectBase*) self)->isValid()){
02612         PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02613         return -1;
02614     }
02615 
02616     PyErr_SetString(PyExc_AttributeError, "Attribute 'NbVPoles' of object 'GeomBezierSurface' is read-only");
02617     return -1;
02618 }
02619 
02620 
02621 
02622 //--------------------------------------------------------------------------
02623 // Parents structure
02624 //--------------------------------------------------------------------------
02625 PyParentObject BezierSurfacePy::Parents[] = { PARENTSPartBezierSurfacePy };
02626 
02627 //--------------------------------------------------------------------------
02628 // Constructor
02629 //--------------------------------------------------------------------------
02630 BezierSurfacePy::BezierSurfacePy(GeomBezierSurface *pcObject, PyTypeObject *T)
02631     : GeometrySurfacePy(reinterpret_cast<GeometrySurfacePy::PointerType>(pcObject), T)
02632 {
02633 }
02634 
02635 
02636 //--------------------------------------------------------------------------
02637 // destructor
02638 //--------------------------------------------------------------------------
02639 BezierSurfacePy::~BezierSurfacePy()                                // Everything handled in parent
02640 {
02641 }
02642 
02643 //--------------------------------------------------------------------------
02644 // BezierSurfacePy representation
02645 //--------------------------------------------------------------------------
02646 PyObject *BezierSurfacePy::_repr(void)
02647 {
02648     return Py_BuildValue("s", representation().c_str());
02649 }
02650 
02651 //--------------------------------------------------------------------------
02652 // BezierSurfacePy Attributes
02653 //--------------------------------------------------------------------------
02654 PyObject *BezierSurfacePy::_getattr(char *attr)                         // __getattr__ function: note only need to handle new state
02655 {
02656     try {
02657         // getter method for special Attributes (e.g. dynamic ones)
02658         PyObject *r = getCustomAttributes(attr);
02659         if(r) return r;
02660     }
02661 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02662     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02663     {
02664         std::string str;
02665         str += "FreeCAD exception thrown (";
02666         str += e.what();
02667         str += ")";
02668         e.ReportException();
02669         PyErr_SetString(PyExc_Exception,str.c_str());
02670         return NULL;
02671     }
02672     catch(const std::exception& e) // catch other c++ exceptions
02673     {
02674         std::string str;
02675         str += "FC++ exception thrown (";
02676         str += e.what();
02677         str += ")";
02678         Base::Console().Error(str.c_str());
02679         PyErr_SetString(PyExc_Exception,str.c_str());
02680         return NULL;
02681     }
02682     catch(const Py::Exception&)
02683     {
02684         // The exception text is already set
02685         return NULL;
02686     }
02687     catch(...)  // catch the rest!
02688     {
02689         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02690         return NULL;
02691     }
02692 #else  // DONT_CATCH_CXX_EXCEPTIONS  
02693     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02694     {
02695         std::string str;
02696         str += "FreeCAD exception thrown (";
02697         str += e.what();
02698         str += ")";
02699         e.ReportException();
02700         PyErr_SetString(PyExc_Exception,str.c_str());
02701         return NULL;
02702     }
02703     catch(const Py::Exception&)
02704     {
02705         // The exception text is already set
02706         return NULL;
02707     }
02708 #endif  // DONT_CATCH_CXX_EXCEPTIONS
02709 
02710     PyObject *rvalue = Py_FindMethod(Methods, this, attr);
02711     if (rvalue == NULL)
02712     {
02713         PyErr_Clear();
02714         return GeometrySurfacePy::_getattr(attr);
02715     }
02716     else
02717     {
02718         return rvalue;
02719     }
02720 }
02721 
02722 int BezierSurfacePy::_setattr(char *attr, PyObject *value)      // __setattr__ function: note only need to handle new state
02723 {
02724     try {
02725         // setter for  special Attributes (e.g. dynamic ones)
02726         int r = setCustomAttributes(attr, value);
02727         if(r==1) return 0;
02728     }
02729 #ifndef DONT_CATCH_CXX_EXCEPTIONS 
02730     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02731     {
02732         std::string str;
02733         str += "FreeCAD exception thrown (";
02734         str += e.what();
02735         str += ")";
02736         e.ReportException();
02737         PyErr_SetString(PyExc_Exception,str.c_str());
02738         return -1;
02739     }
02740     catch(const std::exception& e) // catch other c++ exceptions
02741     {
02742         std::string str;
02743         str += "FC++ exception thrown (";
02744         str += e.what();
02745         str += ")";
02746         Base::Console().Error(str.c_str());
02747         PyErr_SetString(PyExc_Exception,str.c_str());
02748         return -1;
02749     }
02750     catch(const Py::Exception&)
02751     {
02752         // The exception text is already set
02753         return -1;
02754     }
02755     catch(...)  // catch the rest!
02756     {
02757         PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02758         return -1;
02759     }
02760 #else  // DONT_CATCH_CXX_EXCEPTIONS  
02761     catch(const Base::Exception& e) // catch the FreeCAD exceptions
02762     {
02763         std::string str;
02764         str += "FreeCAD exception thrown (";
02765         str += e.what();
02766         str += ")";
02767         e.ReportException();
02768         PyErr_SetString(PyExc_Exception,str.c_str());
02769         return -1;
02770     }
02771     catch(const Py::Exception&)
02772     {
02773         // The exception text is already set
02774         return -1;
02775     }
02776 #endif  // DONT_CATCH_CXX_EXCEPTIONS
02777 
02778     return GeometrySurfacePy::_setattr(attr, value);
02779 }
02780 
02781 GeomBezierSurface *BezierSurfacePy::getGeomBezierSurfacePtr(void) const
02782 {
02783     return static_cast<GeomBezierSurface *>(_pcTwinPointer);
02784 }
02785 
02786 #if 0
02787 /* From here on come the methods you have to implement, but NOT in this module. Implement in BezierSurfacePyImp.cpp! This prototypes 
02788  * are just for convenience when you add a new method.
02789  */
02790 
02791 PyObject *BezierSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *)  // Python wrapper
02792 {
02793     // create a new instance of BezierSurfacePy and the Twin object 
02794     return new BezierSurfacePy(new GeomBezierSurface);
02795 }
02796 
02797 // constructor method
02798 int BezierSurfacePy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
02799 {
02800     return 0;
02801 }
02802 
02803 // returns a string which represents the object e.g. when printed in python
02804 std::string BezierSurfacePy::representation(void) const
02805 {
02806     return std::string("<GeomBezierSurface object>");
02807 }
02808 
02809 PyObject* BezierSurfacePy::bounds(PyObject *args)
02810 {
02811     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02812     return 0;
02813 }
02814 
02815 PyObject* BezierSurfacePy::isURational(PyObject *args)
02816 {
02817     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02818     return 0;
02819 }
02820 
02821 PyObject* BezierSurfacePy::isVRational(PyObject *args)
02822 {
02823     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02824     return 0;
02825 }
02826 
02827 PyObject* BezierSurfacePy::isUPeriodic(PyObject *args)
02828 {
02829     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02830     return 0;
02831 }
02832 
02833 PyObject* BezierSurfacePy::isVPeriodic(PyObject *args)
02834 {
02835     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02836     return 0;
02837 }
02838 
02839 PyObject* BezierSurfacePy::isUClosed(PyObject *args)
02840 {
02841     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02842     return 0;
02843 }
02844 
02845 PyObject* BezierSurfacePy::isVClosed(PyObject *args)
02846 {
02847     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02848     return 0;
02849 }
02850 
02851 PyObject* BezierSurfacePy::increase(PyObject *args)
02852 {
02853     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02854     return 0;
02855 }
02856 
02857 PyObject* BezierSurfacePy::insertPoleColAfter(PyObject *args)
02858 {
02859     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02860     return 0;
02861 }
02862 
02863 PyObject* BezierSurfacePy::insertPoleRowAfter(PyObject *args)
02864 {
02865     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02866     return 0;
02867 }
02868 
02869 PyObject* BezierSurfacePy::insertPoleColBefore(PyObject *args)
02870 {
02871     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02872     return 0;
02873 }
02874 
02875 PyObject* BezierSurfacePy::insertPoleRowBefore(PyObject *args)
02876 {
02877     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02878     return 0;
02879 }
02880 
02881 PyObject* BezierSurfacePy::removePoleCol(PyObject *args)
02882 {
02883     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02884     return 0;
02885 }
02886 
02887 PyObject* BezierSurfacePy::removePoleRow(PyObject *args)
02888 {
02889     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02890     return 0;
02891 }
02892 
02893 PyObject* BezierSurfacePy::segment(PyObject *args)
02894 {
02895     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02896     return 0;
02897 }
02898 
02899 PyObject* BezierSurfacePy::setPole(PyObject *args)
02900 {
02901     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02902     return 0;
02903 }
02904 
02905 PyObject* BezierSurfacePy::setPoleCol(PyObject *args)
02906 {
02907     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02908     return 0;
02909 }
02910 
02911 PyObject* BezierSurfacePy::setPoleRow(PyObject *args)
02912 {
02913     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02914     return 0;
02915 }
02916 
02917 PyObject* BezierSurfacePy::getPole(PyObject *args)
02918 {
02919     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02920     return 0;
02921 }
02922 
02923 PyObject* BezierSurfacePy::getPoles(PyObject *args)
02924 {
02925     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02926     return 0;
02927 }
02928 
02929 PyObject* BezierSurfacePy::setWeight(PyObject *args)
02930 {
02931     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02932     return 0;
02933 }
02934 
02935 PyObject* BezierSurfacePy::setWeightCol(PyObject *args)
02936 {
02937     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02938     return 0;
02939 }
02940 
02941 PyObject* BezierSurfacePy::setWeightRow(PyObject *args)
02942 {
02943     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02944     return 0;
02945 }
02946 
02947 PyObject* BezierSurfacePy::getWeight(PyObject *args)
02948 {
02949     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02950     return 0;
02951 }
02952 
02953 PyObject* BezierSurfacePy::getWeights(PyObject *args)
02954 {
02955     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02956     return 0;
02957 }
02958 
02959 PyObject* BezierSurfacePy::getResolution(PyObject *args)
02960 {
02961     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02962     return 0;
02963 }
02964 
02965 PyObject* BezierSurfacePy::exchangeUV(PyObject *args)
02966 {
02967     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02968     return 0;
02969 }
02970 
02971 PyObject* BezierSurfacePy::uIso(PyObject *args)
02972 {
02973     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02974     return 0;
02975 }
02976 
02977 PyObject* BezierSurfacePy::vIso(PyObject *args)
02978 {
02979     PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
02980     return 0;
02981 }
02982 
02983 
02984 
02985 Py::Int BezierSurfacePy::getUDegree(void) const
02986 {
02987     //return Py::Int();
02988     throw Py::AttributeError("Not yet implemented");
02989 }
02990 
02991 Py::Int BezierSurfacePy::getVDegree(void) const
02992 {
02993     //return Py::Int();
02994     throw Py::AttributeError("Not yet implemented");
02995 }
02996 
02997 Py::Int BezierSurfacePy::getMaxDegree(void) const
02998 {
02999     //return Py::Int();
03000     throw Py::AttributeError("Not yet implemented");
03001 }
03002 
03003 Py::Int BezierSurfacePy::getNbUPoles(void) const
03004 {
03005     //return Py::Int();
03006     throw Py::AttributeError("Not yet implemented");
03007 }
03008 
03009 Py::Int BezierSurfacePy::getNbVPoles(void) const
03010 {
03011     //return Py::Int();
03012     throw Py::AttributeError("Not yet implemented");
03013 }
03014 
03015 PyObject *BezierSurfacePy::getCustomAttributes(const char* attr) const
03016 {
03017     return 0;
03018 }
03019 
03020 int BezierSurfacePy::setCustomAttributes(const char* attr, PyObject *obj)
03021 {
03022     return 0; 
03023 }
03024 #endif
03025 
03026 
03027 

Generated on Wed Nov 23 18:59:58 2011 for FreeCAD by  doxygen 1.6.1