00001
00002
00003
00004
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,
00023 "Part.GeomBezierSurface",
00024 sizeof(BezierSurfacePy),
00025 0,
00026
00027 PyDestructor,
00028 0,
00029 __getattr,
00030 __setattr,
00031 0,
00032 __repr,
00033 0,
00034 0,
00035 0,
00036 0,
00037 0,
00038 0,
00039 0,
00040 0,
00041
00042 0,
00043
00044 Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_CLASS,
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 " ",
00049 0,
00050 0,
00051 0,
00052 0,
00053 0,
00054 0,
00055 Part::BezierSurfacePy::Methods,
00056 0,
00057 Part::BezierSurfacePy::GetterSetter,
00058 &Part::GeometrySurfacePy::Type,
00059 0,
00060 0,
00061 0,
00062 0,
00063 __PyInit,
00064 0,
00065 Part::BezierSurfacePy::PyMake,
00066 0,
00067 0,
00068 0,
00069 0,
00070 0,
00071 0,
00072 0,
00073 0
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}
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}
00261 };
00262
00263
00264
00265
00266 PyObject * BezierSurfacePy::staticCallback_bounds (PyObject *self, PyObject *args)
00267 {
00268
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
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 {
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)
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)
00297 {
00298 std::string str;
00299 str += "File system exception thrown (";
00300
00301
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
00311 return NULL;
00312 }
00313 catch(const char* e)
00314 {
00315 Base::Console().Error(e);
00316 PyErr_SetString(PyExc_Exception,e);
00317 return NULL;
00318 }
00319
00320 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00321 catch(const std::exception& e)
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(...)
00332 {
00333 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00334 return NULL;
00335 }
00336 #endif
00337 }
00338
00339
00340
00341
00342 PyObject * BezierSurfacePy::staticCallback_isURational (PyObject *self, PyObject *args)
00343 {
00344
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
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 {
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)
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)
00373 {
00374 std::string str;
00375 str += "File system exception thrown (";
00376
00377
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
00387 return NULL;
00388 }
00389 catch(const char* e)
00390 {
00391 Base::Console().Error(e);
00392 PyErr_SetString(PyExc_Exception,e);
00393 return NULL;
00394 }
00395
00396 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00397 catch(const std::exception& e)
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(...)
00408 {
00409 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00410 return NULL;
00411 }
00412 #endif
00413 }
00414
00415
00416
00417
00418 PyObject * BezierSurfacePy::staticCallback_isVRational (PyObject *self, PyObject *args)
00419 {
00420
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
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 {
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)
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)
00449 {
00450 std::string str;
00451 str += "File system exception thrown (";
00452
00453
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
00463 return NULL;
00464 }
00465 catch(const char* e)
00466 {
00467 Base::Console().Error(e);
00468 PyErr_SetString(PyExc_Exception,e);
00469 return NULL;
00470 }
00471
00472 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00473 catch(const std::exception& e)
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(...)
00484 {
00485 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00486 return NULL;
00487 }
00488 #endif
00489 }
00490
00491
00492
00493
00494 PyObject * BezierSurfacePy::staticCallback_isUPeriodic (PyObject *self, PyObject *args)
00495 {
00496
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
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 {
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)
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)
00525 {
00526 std::string str;
00527 str += "File system exception thrown (";
00528
00529
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
00539 return NULL;
00540 }
00541 catch(const char* e)
00542 {
00543 Base::Console().Error(e);
00544 PyErr_SetString(PyExc_Exception,e);
00545 return NULL;
00546 }
00547
00548 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00549 catch(const std::exception& e)
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(...)
00560 {
00561 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00562 return NULL;
00563 }
00564 #endif
00565 }
00566
00567
00568
00569
00570 PyObject * BezierSurfacePy::staticCallback_isVPeriodic (PyObject *self, PyObject *args)
00571 {
00572
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
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 {
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)
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)
00601 {
00602 std::string str;
00603 str += "File system exception thrown (";
00604
00605
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
00615 return NULL;
00616 }
00617 catch(const char* e)
00618 {
00619 Base::Console().Error(e);
00620 PyErr_SetString(PyExc_Exception,e);
00621 return NULL;
00622 }
00623
00624 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00625 catch(const std::exception& e)
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(...)
00636 {
00637 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00638 return NULL;
00639 }
00640 #endif
00641 }
00642
00643
00644
00645
00646 PyObject * BezierSurfacePy::staticCallback_isUClosed (PyObject *self, PyObject *args)
00647 {
00648
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
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 {
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)
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)
00677 {
00678 std::string str;
00679 str += "File system exception thrown (";
00680
00681
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
00691 return NULL;
00692 }
00693 catch(const char* e)
00694 {
00695 Base::Console().Error(e);
00696 PyErr_SetString(PyExc_Exception,e);
00697 return NULL;
00698 }
00699
00700 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00701 catch(const std::exception& e)
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(...)
00712 {
00713 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00714 return NULL;
00715 }
00716 #endif
00717 }
00718
00719
00720
00721
00722 PyObject * BezierSurfacePy::staticCallback_isVClosed (PyObject *self, PyObject *args)
00723 {
00724
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
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 {
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)
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)
00753 {
00754 std::string str;
00755 str += "File system exception thrown (";
00756
00757
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
00767 return NULL;
00768 }
00769 catch(const char* e)
00770 {
00771 Base::Console().Error(e);
00772 PyErr_SetString(PyExc_Exception,e);
00773 return NULL;
00774 }
00775
00776 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00777 catch(const std::exception& e)
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(...)
00788 {
00789 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00790 return NULL;
00791 }
00792 #endif
00793 }
00794
00795
00796
00797
00798 PyObject * BezierSurfacePy::staticCallback_increase (PyObject *self, PyObject *args)
00799 {
00800
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
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 {
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)
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)
00829 {
00830 std::string str;
00831 str += "File system exception thrown (";
00832
00833
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
00843 return NULL;
00844 }
00845 catch(const char* e)
00846 {
00847 Base::Console().Error(e);
00848 PyErr_SetString(PyExc_Exception,e);
00849 return NULL;
00850 }
00851
00852 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00853 catch(const std::exception& e)
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(...)
00864 {
00865 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00866 return NULL;
00867 }
00868 #endif
00869 }
00870
00871
00872
00873
00874 PyObject * BezierSurfacePy::staticCallback_insertPoleColAfter (PyObject *self, PyObject *args)
00875 {
00876
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
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 {
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)
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)
00905 {
00906 std::string str;
00907 str += "File system exception thrown (";
00908
00909
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
00919 return NULL;
00920 }
00921 catch(const char* e)
00922 {
00923 Base::Console().Error(e);
00924 PyErr_SetString(PyExc_Exception,e);
00925 return NULL;
00926 }
00927
00928 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00929 catch(const std::exception& e)
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(...)
00940 {
00941 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00942 return NULL;
00943 }
00944 #endif
00945 }
00946
00947
00948
00949
00950 PyObject * BezierSurfacePy::staticCallback_insertPoleRowAfter (PyObject *self, PyObject *args)
00951 {
00952
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
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 {
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)
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)
00981 {
00982 std::string str;
00983 str += "File system exception thrown (";
00984
00985
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
00995 return NULL;
00996 }
00997 catch(const char* e)
00998 {
00999 Base::Console().Error(e);
01000 PyErr_SetString(PyExc_Exception,e);
01001 return NULL;
01002 }
01003
01004 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01005 catch(const std::exception& e)
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(...)
01016 {
01017 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01018 return NULL;
01019 }
01020 #endif
01021 }
01022
01023
01024
01025
01026 PyObject * BezierSurfacePy::staticCallback_insertPoleColBefore (PyObject *self, PyObject *args)
01027 {
01028
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
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 {
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)
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)
01057 {
01058 std::string str;
01059 str += "File system exception thrown (";
01060
01061
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
01071 return NULL;
01072 }
01073 catch(const char* e)
01074 {
01075 Base::Console().Error(e);
01076 PyErr_SetString(PyExc_Exception,e);
01077 return NULL;
01078 }
01079
01080 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01081 catch(const std::exception& e)
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(...)
01092 {
01093 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01094 return NULL;
01095 }
01096 #endif
01097 }
01098
01099
01100
01101
01102 PyObject * BezierSurfacePy::staticCallback_insertPoleRowBefore (PyObject *self, PyObject *args)
01103 {
01104
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
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 {
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)
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)
01133 {
01134 std::string str;
01135 str += "File system exception thrown (";
01136
01137
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
01147 return NULL;
01148 }
01149 catch(const char* e)
01150 {
01151 Base::Console().Error(e);
01152 PyErr_SetString(PyExc_Exception,e);
01153 return NULL;
01154 }
01155
01156 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01157 catch(const std::exception& e)
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(...)
01168 {
01169 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01170 return NULL;
01171 }
01172 #endif
01173 }
01174
01175
01176
01177
01178 PyObject * BezierSurfacePy::staticCallback_removePoleCol (PyObject *self, PyObject *args)
01179 {
01180
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
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 {
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)
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)
01209 {
01210 std::string str;
01211 str += "File system exception thrown (";
01212
01213
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
01223 return NULL;
01224 }
01225 catch(const char* e)
01226 {
01227 Base::Console().Error(e);
01228 PyErr_SetString(PyExc_Exception,e);
01229 return NULL;
01230 }
01231
01232 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01233 catch(const std::exception& e)
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(...)
01244 {
01245 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01246 return NULL;
01247 }
01248 #endif
01249 }
01250
01251
01252
01253
01254 PyObject * BezierSurfacePy::staticCallback_removePoleRow (PyObject *self, PyObject *args)
01255 {
01256
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
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 {
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)
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)
01285 {
01286 std::string str;
01287 str += "File system exception thrown (";
01288
01289
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
01299 return NULL;
01300 }
01301 catch(const char* e)
01302 {
01303 Base::Console().Error(e);
01304 PyErr_SetString(PyExc_Exception,e);
01305 return NULL;
01306 }
01307
01308 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01309 catch(const std::exception& e)
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(...)
01320 {
01321 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01322 return NULL;
01323 }
01324 #endif
01325 }
01326
01327
01328
01329
01330 PyObject * BezierSurfacePy::staticCallback_segment (PyObject *self, PyObject *args)
01331 {
01332
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
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 {
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)
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)
01361 {
01362 std::string str;
01363 str += "File system exception thrown (";
01364
01365
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
01375 return NULL;
01376 }
01377 catch(const char* e)
01378 {
01379 Base::Console().Error(e);
01380 PyErr_SetString(PyExc_Exception,e);
01381 return NULL;
01382 }
01383
01384 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01385 catch(const std::exception& e)
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(...)
01396 {
01397 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01398 return NULL;
01399 }
01400 #endif
01401 }
01402
01403
01404
01405
01406 PyObject * BezierSurfacePy::staticCallback_setPole (PyObject *self, PyObject *args)
01407 {
01408
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
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 {
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)
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)
01437 {
01438 std::string str;
01439 str += "File system exception thrown (";
01440
01441
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
01451 return NULL;
01452 }
01453 catch(const char* e)
01454 {
01455 Base::Console().Error(e);
01456 PyErr_SetString(PyExc_Exception,e);
01457 return NULL;
01458 }
01459
01460 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01461 catch(const std::exception& e)
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(...)
01472 {
01473 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01474 return NULL;
01475 }
01476 #endif
01477 }
01478
01479
01480
01481
01482 PyObject * BezierSurfacePy::staticCallback_setPoleCol (PyObject *self, PyObject *args)
01483 {
01484
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
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 {
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)
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)
01513 {
01514 std::string str;
01515 str += "File system exception thrown (";
01516
01517
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
01527 return NULL;
01528 }
01529 catch(const char* e)
01530 {
01531 Base::Console().Error(e);
01532 PyErr_SetString(PyExc_Exception,e);
01533 return NULL;
01534 }
01535
01536 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01537 catch(const std::exception& e)
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(...)
01548 {
01549 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01550 return NULL;
01551 }
01552 #endif
01553 }
01554
01555
01556
01557
01558 PyObject * BezierSurfacePy::staticCallback_setPoleRow (PyObject *self, PyObject *args)
01559 {
01560
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
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 {
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)
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)
01589 {
01590 std::string str;
01591 str += "File system exception thrown (";
01592
01593
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
01603 return NULL;
01604 }
01605 catch(const char* e)
01606 {
01607 Base::Console().Error(e);
01608 PyErr_SetString(PyExc_Exception,e);
01609 return NULL;
01610 }
01611
01612 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01613 catch(const std::exception& e)
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(...)
01624 {
01625 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01626 return NULL;
01627 }
01628 #endif
01629 }
01630
01631
01632
01633
01634 PyObject * BezierSurfacePy::staticCallback_getPole (PyObject *self, PyObject *args)
01635 {
01636
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
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 {
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)
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)
01665 {
01666 std::string str;
01667 str += "File system exception thrown (";
01668
01669
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
01679 return NULL;
01680 }
01681 catch(const char* e)
01682 {
01683 Base::Console().Error(e);
01684 PyErr_SetString(PyExc_Exception,e);
01685 return NULL;
01686 }
01687
01688 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01689 catch(const std::exception& e)
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(...)
01700 {
01701 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01702 return NULL;
01703 }
01704 #endif
01705 }
01706
01707
01708
01709
01710 PyObject * BezierSurfacePy::staticCallback_getPoles (PyObject *self, PyObject *args)
01711 {
01712
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
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 {
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)
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)
01741 {
01742 std::string str;
01743 str += "File system exception thrown (";
01744
01745
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
01755 return NULL;
01756 }
01757 catch(const char* e)
01758 {
01759 Base::Console().Error(e);
01760 PyErr_SetString(PyExc_Exception,e);
01761 return NULL;
01762 }
01763
01764 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01765 catch(const std::exception& e)
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(...)
01776 {
01777 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01778 return NULL;
01779 }
01780 #endif
01781 }
01782
01783
01784
01785
01786 PyObject * BezierSurfacePy::staticCallback_setWeight (PyObject *self, PyObject *args)
01787 {
01788
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
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 {
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)
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)
01817 {
01818 std::string str;
01819 str += "File system exception thrown (";
01820
01821
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
01831 return NULL;
01832 }
01833 catch(const char* e)
01834 {
01835 Base::Console().Error(e);
01836 PyErr_SetString(PyExc_Exception,e);
01837 return NULL;
01838 }
01839
01840 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01841 catch(const std::exception& e)
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(...)
01852 {
01853 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01854 return NULL;
01855 }
01856 #endif
01857 }
01858
01859
01860
01861
01862 PyObject * BezierSurfacePy::staticCallback_setWeightCol (PyObject *self, PyObject *args)
01863 {
01864
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
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 {
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)
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)
01893 {
01894 std::string str;
01895 str += "File system exception thrown (";
01896
01897
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
01907 return NULL;
01908 }
01909 catch(const char* e)
01910 {
01911 Base::Console().Error(e);
01912 PyErr_SetString(PyExc_Exception,e);
01913 return NULL;
01914 }
01915
01916 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01917 catch(const std::exception& e)
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(...)
01928 {
01929 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01930 return NULL;
01931 }
01932 #endif
01933 }
01934
01935
01936
01937
01938 PyObject * BezierSurfacePy::staticCallback_setWeightRow (PyObject *self, PyObject *args)
01939 {
01940
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
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 {
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)
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)
01969 {
01970 std::string str;
01971 str += "File system exception thrown (";
01972
01973
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
01983 return NULL;
01984 }
01985 catch(const char* e)
01986 {
01987 Base::Console().Error(e);
01988 PyErr_SetString(PyExc_Exception,e);
01989 return NULL;
01990 }
01991
01992 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01993 catch(const std::exception& e)
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(...)
02004 {
02005 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02006 return NULL;
02007 }
02008 #endif
02009 }
02010
02011
02012
02013
02014 PyObject * BezierSurfacePy::staticCallback_getWeight (PyObject *self, PyObject *args)
02015 {
02016
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
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 {
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)
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)
02045 {
02046 std::string str;
02047 str += "File system exception thrown (";
02048
02049
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
02059 return NULL;
02060 }
02061 catch(const char* e)
02062 {
02063 Base::Console().Error(e);
02064 PyErr_SetString(PyExc_Exception,e);
02065 return NULL;
02066 }
02067
02068 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02069 catch(const std::exception& e)
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(...)
02080 {
02081 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02082 return NULL;
02083 }
02084 #endif
02085 }
02086
02087
02088
02089
02090 PyObject * BezierSurfacePy::staticCallback_getWeights (PyObject *self, PyObject *args)
02091 {
02092
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
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 {
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)
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)
02121 {
02122 std::string str;
02123 str += "File system exception thrown (";
02124
02125
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
02135 return NULL;
02136 }
02137 catch(const char* e)
02138 {
02139 Base::Console().Error(e);
02140 PyErr_SetString(PyExc_Exception,e);
02141 return NULL;
02142 }
02143
02144 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02145 catch(const std::exception& e)
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(...)
02156 {
02157 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02158 return NULL;
02159 }
02160 #endif
02161 }
02162
02163
02164
02165
02166 PyObject * BezierSurfacePy::staticCallback_getResolution (PyObject *self, PyObject *args)
02167 {
02168
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 {
02176 PyObject* ret = ((BezierSurfacePy*)self)->getResolution(args);
02177 return ret;
02178 }
02179 catch(const Base::Exception& e)
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)
02190 {
02191 std::string str;
02192 str += "File system exception thrown (";
02193
02194
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
02204 return NULL;
02205 }
02206 catch(const char* e)
02207 {
02208 Base::Console().Error(e);
02209 PyErr_SetString(PyExc_Exception,e);
02210 return NULL;
02211 }
02212
02213 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02214 catch(const std::exception& e)
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(...)
02225 {
02226 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02227 return NULL;
02228 }
02229 #endif
02230 }
02231
02232
02233
02234
02235 PyObject * BezierSurfacePy::staticCallback_exchangeUV (PyObject *self, PyObject *args)
02236 {
02237
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
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 {
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)
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)
02266 {
02267 std::string str;
02268 str += "File system exception thrown (";
02269
02270
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
02280 return NULL;
02281 }
02282 catch(const char* e)
02283 {
02284 Base::Console().Error(e);
02285 PyErr_SetString(PyExc_Exception,e);
02286 return NULL;
02287 }
02288
02289 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02290 catch(const std::exception& e)
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(...)
02301 {
02302 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02303 return NULL;
02304 }
02305 #endif
02306 }
02307
02308
02309
02310
02311 PyObject * BezierSurfacePy::staticCallback_uIso (PyObject *self, PyObject *args)
02312 {
02313
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
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 {
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)
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)
02342 {
02343 std::string str;
02344 str += "File system exception thrown (";
02345
02346
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
02356 return NULL;
02357 }
02358 catch(const char* e)
02359 {
02360 Base::Console().Error(e);
02361 PyErr_SetString(PyExc_Exception,e);
02362 return NULL;
02363 }
02364
02365 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02366 catch(const std::exception& e)
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(...)
02377 {
02378 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02379 return NULL;
02380 }
02381 #endif
02382 }
02383
02384
02385
02386
02387 PyObject * BezierSurfacePy::staticCallback_vIso (PyObject *self, PyObject *args)
02388 {
02389
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
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 {
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)
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)
02418 {
02419 std::string str;
02420 str += "File system exception thrown (";
02421
02422
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
02432 return NULL;
02433 }
02434 catch(const char* e)
02435 {
02436 Base::Console().Error(e);
02437 PyErr_SetString(PyExc_Exception,e);
02438 return NULL;
02439 }
02440
02441 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02442 catch(const std::exception& e)
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(...)
02453 {
02454 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02455 return NULL;
02456 }
02457 #endif
02458 }
02459
02460
02461
02462
02463 PyObject * BezierSurfacePy::staticCallback_getUDegree (PyObject *self, void * )
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
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 * , void * )
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
02493
02494
02495 PyObject * BezierSurfacePy::staticCallback_getVDegree (PyObject *self, void * )
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
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 * , void * )
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
02525
02526
02527 PyObject * BezierSurfacePy::staticCallback_getMaxDegree (PyObject *self, void * )
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
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 * , void * )
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
02557
02558
02559 PyObject * BezierSurfacePy::staticCallback_getNbUPoles (PyObject *self, void * )
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
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 * , void * )
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
02589
02590
02591 PyObject * BezierSurfacePy::staticCallback_getNbVPoles (PyObject *self, void * )
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
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 * , void * )
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
02624
02625 PyParentObject BezierSurfacePy::Parents[] = { PARENTSPartBezierSurfacePy };
02626
02627
02628
02629
02630 BezierSurfacePy::BezierSurfacePy(GeomBezierSurface *pcObject, PyTypeObject *T)
02631 : GeometrySurfacePy(reinterpret_cast<GeometrySurfacePy::PointerType>(pcObject), T)
02632 {
02633 }
02634
02635
02636
02637
02638
02639 BezierSurfacePy::~BezierSurfacePy()
02640 {
02641 }
02642
02643
02644
02645
02646 PyObject *BezierSurfacePy::_repr(void)
02647 {
02648 return Py_BuildValue("s", representation().c_str());
02649 }
02650
02651
02652
02653
02654 PyObject *BezierSurfacePy::_getattr(char *attr)
02655 {
02656 try {
02657
02658 PyObject *r = getCustomAttributes(attr);
02659 if(r) return r;
02660 }
02661 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02662 catch(const Base::Exception& e)
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)
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
02685 return NULL;
02686 }
02687 catch(...)
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)
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
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)
02723 {
02724 try {
02725
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)
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)
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
02753 return -1;
02754 }
02755 catch(...)
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)
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
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
02788
02789
02790
02791 PyObject *BezierSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *)
02792 {
02793
02794 return new BezierSurfacePy(new GeomBezierSurface);
02795 }
02796
02797
02798 int BezierSurfacePy::PyInit(PyObject* , PyObject* )
02799 {
02800 return 0;
02801 }
02802
02803
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
02988 throw Py::AttributeError("Not yet implemented");
02989 }
02990
02991 Py::Int BezierSurfacePy::getVDegree(void) const
02992 {
02993
02994 throw Py::AttributeError("Not yet implemented");
02995 }
02996
02997 Py::Int BezierSurfacePy::getMaxDegree(void) const
02998 {
02999
03000 throw Py::AttributeError("Not yet implemented");
03001 }
03002
03003 Py::Int BezierSurfacePy::getNbUPoles(void) const
03004 {
03005
03006 throw Py::AttributeError("Not yet implemented");
03007 }
03008
03009 Py::Int BezierSurfacePy::getNbVPoles(void) const
03010 {
03011
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