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 BSplineCurvePy::Type = {
00021 PyObject_HEAD_INIT(&PyType_Type)
00022 0,
00023 "Part.GeomBSplineCurve",
00024 sizeof(BSplineCurvePy),
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 B-Spline curve in 3D space",
00046 0,
00047 0,
00048 0,
00049 0,
00050 0,
00051 0,
00052 Part::BSplineCurvePy::Methods,
00053 0,
00054 Part::BSplineCurvePy::GetterSetter,
00055 &Part::GeometryCurvePy::Type,
00056 0,
00057 0,
00058 0,
00059 0,
00060 __PyInit,
00061 0,
00062 Part::BSplineCurvePy::PyMake,
00063 0,
00064 0,
00065 0,
00066 0,
00067 0,
00068 0,
00069 0,
00070 0
00071 };
00072
00074 PyMethodDef BSplineCurvePy::Methods[] = {
00075 {"isRational",
00076 (PyCFunction) staticCallback_isRational,
00077 METH_VARARGS,
00078 "\n Returns true if this B-Spline curve is rational.\n A B-Spline curve is rational if, at the time of construction,\n the weight table has been initialized.\n "
00079 },
00080 {"isPeriodic",
00081 (PyCFunction) staticCallback_isPeriodic,
00082 METH_VARARGS,
00083 "Returns true if this BSpline curve is periodic."
00084 },
00085 {"isClosed",
00086 (PyCFunction) staticCallback_isClosed,
00087 METH_VARARGS,
00088 "\n Returns true if the distance between the start point and end point of\n this B-Spline curve is less than or equal to gp::Resolution().\n "
00089 },
00090 {"increaseDegree",
00091 (PyCFunction) staticCallback_increaseDegree,
00092 METH_VARARGS,
00093 "increase(Int=Degree)\nIncreases the degree of this B-Spline curve to Degree.\nAs a result, the poles, weights and multiplicities tables\nare modified; the knots table is not changed. Nothing is\ndone if Degree is less than or equal to the current degree."
00094 },
00095 {"increaseMultiplicity",
00096 (PyCFunction) staticCallback_increaseMultiplicity,
00097 METH_VARARGS,
00098 "Increases the multiplicity"
00099 },
00100 {"incrementMultiplicity",
00101 (PyCFunction) staticCallback_incrementMultiplicity,
00102 METH_VARARGS,
00103 "Increases the multiplicity"
00104 },
00105 {"insertKnot",
00106 (PyCFunction) staticCallback_insertKnot,
00107 METH_VARARGS,
00108 "Inserts knot."
00109 },
00110 {"insertKnots",
00111 (PyCFunction) staticCallback_insertKnots,
00112 METH_VARARGS,
00113 "Inserts knots."
00114 },
00115 {"removeKnot",
00116 (PyCFunction) staticCallback_removeKnot,
00117 METH_VARARGS,
00118 "\n Reduces the multiplicity of the knot of index Index to M.\n If M is equal to 0, the knot is removed.\n With a modification of this type, the array of poles is also modified.\n Two different algorithms are systematically used to compute the new\n poles of the curve. If, for each pole, the distance between the pole\n calculated using the first algorithm and the same pole calculated using\n the second algorithm, is less than Tolerance, this ensures that the curve\n is not modified by more than Tolerance. Under these conditions, true is\n returned; otherwise, false is returned.\n\n A low tolerance is used to prevent modification of the curve.\n A high tolerance is used to 'smooth' the curve.\n "
00119 },
00120 {"segment",
00121 (PyCFunction) staticCallback_segment,
00122 METH_VARARGS,
00123 "Modifies this B-Spline curve by segmenting it."
00124 },
00125 {"setKnot",
00126 (PyCFunction) staticCallback_setKnot,
00127 METH_VARARGS,
00128 "Set a knot of the B-Spline curve."
00129 },
00130 {"getKnot",
00131 (PyCFunction) staticCallback_getKnot,
00132 METH_VARARGS,
00133 "Get a knot of the B-Spline curve."
00134 },
00135 {"setKnots",
00136 (PyCFunction) staticCallback_setKnots,
00137 METH_VARARGS,
00138 "Set knots of the B-Spline curve."
00139 },
00140 {"getKnots",
00141 (PyCFunction) staticCallback_getKnots,
00142 METH_VARARGS,
00143 "Get all knots of the B-Spline curve."
00144 },
00145 {"setPole",
00146 (PyCFunction) staticCallback_setPole,
00147 METH_VARARGS,
00148 "Modifies this B-Spline curve by assigning P\nto the pole of index Index in the poles table."
00149 },
00150 {"getPole",
00151 (PyCFunction) staticCallback_getPole,
00152 METH_VARARGS,
00153 "Get a pole of the B-Spline curve."
00154 },
00155 {"getPoles",
00156 (PyCFunction) staticCallback_getPoles,
00157 METH_VARARGS,
00158 "Get all poles of the B-Spline curve."
00159 },
00160 {"setWeight",
00161 (PyCFunction) staticCallback_setWeight,
00162 METH_VARARGS,
00163 "Set a weight of the B-Spline curve."
00164 },
00165 {"getWeight",
00166 (PyCFunction) staticCallback_getWeight,
00167 METH_VARARGS,
00168 "Get a weight of the B-Spline curve."
00169 },
00170 {"getWeights",
00171 (PyCFunction) staticCallback_getWeights,
00172 METH_VARARGS,
00173 "Get all weights of the B-Spline curve."
00174 },
00175 {"getResolution",
00176 (PyCFunction) staticCallback_getResolution,
00177 METH_VARARGS,
00178 "Computes for this B-Spline curve the parametric tolerance (UTolerance)\nfor a given 3D tolerance (Tolerance3D).\nIf f(t) is the equation of this B-Spline curve, the parametric tolerance\nensures that:\n|t1-t0| < UTolerance =""==> |f(t1)-f(t0)| < Tolerance3D"
00179 },
00180 {"movePoint",
00181 (PyCFunction) staticCallback_movePoint,
00182 METH_VARARGS,
00183 "Moves the point of parameter U of this B-Spline curve to P.\nIndex1 and Index2 are the indexes in the table of poles of this B-Spline curve\nof the first and last poles designated to be moved.\nFirstModifiedPole and LastModifiedPole are the indexes of the first and last\npoles which are effectively modified."
00184 },
00185 {"setNotPeriodic",
00186 (PyCFunction) staticCallback_setNotPeriodic,
00187 METH_VARARGS,
00188 "Changes this B-Spline curve into a non-periodic curve.\nIf this curve is already non-periodic, it is not modified."
00189 },
00190 {"setPeriodic",
00191 (PyCFunction) staticCallback_setPeriodic,
00192 METH_VARARGS,
00193 "Changes this B-Spline curve into a periodic curve."
00194 },
00195 {"setOrigin",
00196 (PyCFunction) staticCallback_setOrigin,
00197 METH_VARARGS,
00198 "Assigns the knot of index Index in the knots table\nas the origin of this periodic B-Spline curve. As a consequence,\nthe knots and poles tables are modified."
00199 },
00200 {"getMultiplicity",
00201 (PyCFunction) staticCallback_getMultiplicity,
00202 METH_VARARGS,
00203 "Returns the multiplicity of the knot of index \nfrom the knots table of this B-Spline curve."
00204 },
00205 {"getMultiplicities",
00206 (PyCFunction) staticCallback_getMultiplicities,
00207 METH_VARARGS,
00208 "\n Returns the multiplicities table M of the knots of this B-Spline curve.\n "
00209 },
00210 {"approximate",
00211 (PyCFunction) staticCallback_approximate,
00212 METH_VARARGS,
00213 "\n Replaces this B-Spline curve by approximating a set of points.\n "
00214 },
00215 {"interpolate",
00216 (PyCFunction) staticCallback_interpolate,
00217 METH_VARARGS,
00218 "\n Replaces this B-Spline curve by interpolating a set of points.\n "
00219 },
00220 {"buildFromPoles",
00221 (PyCFunction) staticCallback_buildFromPoles,
00222 METH_VARARGS,
00223 "\n Builds a B-Spline by a list of poles.\n "
00224 },
00225 {"toBezier",
00226 (PyCFunction) staticCallback_toBezier,
00227 METH_VARARGS,
00228 "\n Build a list of Bezier splines.\n "
00229 },
00230 {"join",
00231 (PyCFunction) staticCallback_join,
00232 METH_VARARGS,
00233 "\n Build a new spline by joining this and a second spline.\n "
00234 },
00235 {"makeC1Continuous",
00236 (PyCFunction) staticCallback_makeC1Continuous,
00237 METH_VARARGS,
00238 "\n Tries to make the spline C1-continuous where possible.\n "
00239 },
00240 {NULL, NULL, 0, NULL}
00241 };
00242
00243
00244
00246 PyGetSetDef BSplineCurvePy::GetterSetter[] = {
00247 {"Degree",
00248 (getter) staticCallback_getDegree,
00249 (setter) staticCallback_setDegree,
00250 "Returns the polynomial degree of this B-Spline curve.",
00251 NULL
00252 },
00253 {"MaxDegree",
00254 (getter) staticCallback_getMaxDegree,
00255 (setter) staticCallback_setMaxDegree,
00256 "Returns the value of the maximum polynomial degree of any\nB-Spline curve curve. This value is 25.",
00257 NULL
00258 },
00259 {"NbPoles",
00260 (getter) staticCallback_getNbPoles,
00261 (setter) staticCallback_setNbPoles,
00262 "Returns the number of poles of this B-Spline curve.\n ",
00263 NULL
00264 },
00265 {"NbKnots",
00266 (getter) staticCallback_getNbKnots,
00267 (setter) staticCallback_setNbKnots,
00268 "\n Returns the number of knots of this B-Spline curve.\n ",
00269 NULL
00270 },
00271 {"StartPoint",
00272 (getter) staticCallback_getStartPoint,
00273 (setter) staticCallback_setStartPoint,
00274 "Returns the start point of this B-Spline curve.",
00275 NULL
00276 },
00277 {"EndPoint",
00278 (getter) staticCallback_getEndPoint,
00279 (setter) staticCallback_setEndPoint,
00280 "Returns the end point of this B-Spline curve.",
00281 NULL
00282 },
00283 {"FirstUKnotIndex",
00284 (getter) staticCallback_getFirstUKnotIndex,
00285 (setter) staticCallback_setFirstUKnotIndex,
00286 "Returns the index in the knot array of the knot\ncorresponding to the first or last parameter\nof this B-Spline curve.",
00287 NULL
00288 },
00289 {"LastUKnotIndex",
00290 (getter) staticCallback_getLastUKnotIndex,
00291 (setter) staticCallback_setLastUKnotIndex,
00292 "Returns the index in the knot array of the knot\ncorresponding to the first or last parameter\nof this B-Spline curve.",
00293 NULL
00294 },
00295 {"KnotSequence",
00296 (getter) staticCallback_getKnotSequence,
00297 (setter) staticCallback_setKnotSequence,
00298 "Returns the knots sequence of this B-Spline curve.",
00299 NULL
00300 },
00301 {NULL, NULL, NULL, NULL, NULL}
00302 };
00303
00304
00305
00306
00307 PyObject * BSplineCurvePy::staticCallback_isRational (PyObject *self, PyObject *args)
00308 {
00309
00310 if (!((PyObjectBase*) self)->isValid()){
00311 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00312 return NULL;
00313 }
00314
00315
00316 if (((PyObjectBase*) self)->isConst()){
00317 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00318 return NULL;
00319 }
00320
00321 try {
00322 PyObject* ret = ((BSplineCurvePy*)self)->isRational(args);
00323 if (ret != 0)
00324 ((BSplineCurvePy*)self)->startNotify();
00325 return ret;
00326 }
00327 catch(const Base::Exception& e)
00328 {
00329 std::string str;
00330 str += "FreeCAD exception thrown (";
00331 str += e.what();
00332 str += ")";
00333 e.ReportException();
00334 PyErr_SetString(PyExc_Exception,str.c_str());
00335 return NULL;
00336 }
00337 catch(const boost::filesystem::filesystem_error& e)
00338 {
00339 std::string str;
00340 str += "File system exception thrown (";
00341
00342
00343 str += e.what();
00344 str += ")\n";
00345 Base::Console().Error(str.c_str());
00346 PyErr_SetString(PyExc_Exception,str.c_str());
00347 return NULL;
00348 }
00349 catch(const Py::Exception&)
00350 {
00351
00352 return NULL;
00353 }
00354 catch(const char* e)
00355 {
00356 Base::Console().Error(e);
00357 PyErr_SetString(PyExc_Exception,e);
00358 return NULL;
00359 }
00360
00361 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00362 catch(const std::exception& e)
00363 {
00364 std::string str;
00365 str += "FC++ exception thrown (";
00366 str += e.what();
00367 str += ")";
00368 Base::Console().Error(str.c_str());
00369 PyErr_SetString(PyExc_Exception,str.c_str());
00370 return NULL;
00371 }
00372 catch(...)
00373 {
00374 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00375 return NULL;
00376 }
00377 #endif
00378 }
00379
00380
00381
00382
00383 PyObject * BSplineCurvePy::staticCallback_isPeriodic (PyObject *self, PyObject *args)
00384 {
00385
00386 if (!((PyObjectBase*) self)->isValid()){
00387 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00388 return NULL;
00389 }
00390
00391
00392 if (((PyObjectBase*) self)->isConst()){
00393 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00394 return NULL;
00395 }
00396
00397 try {
00398 PyObject* ret = ((BSplineCurvePy*)self)->isPeriodic(args);
00399 if (ret != 0)
00400 ((BSplineCurvePy*)self)->startNotify();
00401 return ret;
00402 }
00403 catch(const Base::Exception& e)
00404 {
00405 std::string str;
00406 str += "FreeCAD exception thrown (";
00407 str += e.what();
00408 str += ")";
00409 e.ReportException();
00410 PyErr_SetString(PyExc_Exception,str.c_str());
00411 return NULL;
00412 }
00413 catch(const boost::filesystem::filesystem_error& e)
00414 {
00415 std::string str;
00416 str += "File system exception thrown (";
00417
00418
00419 str += e.what();
00420 str += ")\n";
00421 Base::Console().Error(str.c_str());
00422 PyErr_SetString(PyExc_Exception,str.c_str());
00423 return NULL;
00424 }
00425 catch(const Py::Exception&)
00426 {
00427
00428 return NULL;
00429 }
00430 catch(const char* e)
00431 {
00432 Base::Console().Error(e);
00433 PyErr_SetString(PyExc_Exception,e);
00434 return NULL;
00435 }
00436
00437 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00438 catch(const std::exception& e)
00439 {
00440 std::string str;
00441 str += "FC++ exception thrown (";
00442 str += e.what();
00443 str += ")";
00444 Base::Console().Error(str.c_str());
00445 PyErr_SetString(PyExc_Exception,str.c_str());
00446 return NULL;
00447 }
00448 catch(...)
00449 {
00450 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00451 return NULL;
00452 }
00453 #endif
00454 }
00455
00456
00457
00458
00459 PyObject * BSplineCurvePy::staticCallback_isClosed (PyObject *self, PyObject *args)
00460 {
00461
00462 if (!((PyObjectBase*) self)->isValid()){
00463 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00464 return NULL;
00465 }
00466
00467
00468 if (((PyObjectBase*) self)->isConst()){
00469 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00470 return NULL;
00471 }
00472
00473 try {
00474 PyObject* ret = ((BSplineCurvePy*)self)->isClosed(args);
00475 if (ret != 0)
00476 ((BSplineCurvePy*)self)->startNotify();
00477 return ret;
00478 }
00479 catch(const Base::Exception& e)
00480 {
00481 std::string str;
00482 str += "FreeCAD exception thrown (";
00483 str += e.what();
00484 str += ")";
00485 e.ReportException();
00486 PyErr_SetString(PyExc_Exception,str.c_str());
00487 return NULL;
00488 }
00489 catch(const boost::filesystem::filesystem_error& e)
00490 {
00491 std::string str;
00492 str += "File system exception thrown (";
00493
00494
00495 str += e.what();
00496 str += ")\n";
00497 Base::Console().Error(str.c_str());
00498 PyErr_SetString(PyExc_Exception,str.c_str());
00499 return NULL;
00500 }
00501 catch(const Py::Exception&)
00502 {
00503
00504 return NULL;
00505 }
00506 catch(const char* e)
00507 {
00508 Base::Console().Error(e);
00509 PyErr_SetString(PyExc_Exception,e);
00510 return NULL;
00511 }
00512
00513 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00514 catch(const std::exception& e)
00515 {
00516 std::string str;
00517 str += "FC++ exception thrown (";
00518 str += e.what();
00519 str += ")";
00520 Base::Console().Error(str.c_str());
00521 PyErr_SetString(PyExc_Exception,str.c_str());
00522 return NULL;
00523 }
00524 catch(...)
00525 {
00526 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00527 return NULL;
00528 }
00529 #endif
00530 }
00531
00532
00533
00534
00535 PyObject * BSplineCurvePy::staticCallback_increaseDegree (PyObject *self, PyObject *args)
00536 {
00537
00538 if (!((PyObjectBase*) self)->isValid()){
00539 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00540 return NULL;
00541 }
00542
00543
00544 if (((PyObjectBase*) self)->isConst()){
00545 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00546 return NULL;
00547 }
00548
00549 try {
00550 PyObject* ret = ((BSplineCurvePy*)self)->increaseDegree(args);
00551 if (ret != 0)
00552 ((BSplineCurvePy*)self)->startNotify();
00553 return ret;
00554 }
00555 catch(const Base::Exception& e)
00556 {
00557 std::string str;
00558 str += "FreeCAD exception thrown (";
00559 str += e.what();
00560 str += ")";
00561 e.ReportException();
00562 PyErr_SetString(PyExc_Exception,str.c_str());
00563 return NULL;
00564 }
00565 catch(const boost::filesystem::filesystem_error& e)
00566 {
00567 std::string str;
00568 str += "File system exception thrown (";
00569
00570
00571 str += e.what();
00572 str += ")\n";
00573 Base::Console().Error(str.c_str());
00574 PyErr_SetString(PyExc_Exception,str.c_str());
00575 return NULL;
00576 }
00577 catch(const Py::Exception&)
00578 {
00579
00580 return NULL;
00581 }
00582 catch(const char* e)
00583 {
00584 Base::Console().Error(e);
00585 PyErr_SetString(PyExc_Exception,e);
00586 return NULL;
00587 }
00588
00589 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00590 catch(const std::exception& e)
00591 {
00592 std::string str;
00593 str += "FC++ exception thrown (";
00594 str += e.what();
00595 str += ")";
00596 Base::Console().Error(str.c_str());
00597 PyErr_SetString(PyExc_Exception,str.c_str());
00598 return NULL;
00599 }
00600 catch(...)
00601 {
00602 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00603 return NULL;
00604 }
00605 #endif
00606 }
00607
00608
00609
00610
00611 PyObject * BSplineCurvePy::staticCallback_increaseMultiplicity (PyObject *self, PyObject *args)
00612 {
00613
00614 if (!((PyObjectBase*) self)->isValid()){
00615 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00616 return NULL;
00617 }
00618
00619
00620 if (((PyObjectBase*) self)->isConst()){
00621 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00622 return NULL;
00623 }
00624
00625 try {
00626 PyObject* ret = ((BSplineCurvePy*)self)->increaseMultiplicity(args);
00627 if (ret != 0)
00628 ((BSplineCurvePy*)self)->startNotify();
00629 return ret;
00630 }
00631 catch(const Base::Exception& e)
00632 {
00633 std::string str;
00634 str += "FreeCAD exception thrown (";
00635 str += e.what();
00636 str += ")";
00637 e.ReportException();
00638 PyErr_SetString(PyExc_Exception,str.c_str());
00639 return NULL;
00640 }
00641 catch(const boost::filesystem::filesystem_error& e)
00642 {
00643 std::string str;
00644 str += "File system exception thrown (";
00645
00646
00647 str += e.what();
00648 str += ")\n";
00649 Base::Console().Error(str.c_str());
00650 PyErr_SetString(PyExc_Exception,str.c_str());
00651 return NULL;
00652 }
00653 catch(const Py::Exception&)
00654 {
00655
00656 return NULL;
00657 }
00658 catch(const char* e)
00659 {
00660 Base::Console().Error(e);
00661 PyErr_SetString(PyExc_Exception,e);
00662 return NULL;
00663 }
00664
00665 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00666 catch(const std::exception& e)
00667 {
00668 std::string str;
00669 str += "FC++ exception thrown (";
00670 str += e.what();
00671 str += ")";
00672 Base::Console().Error(str.c_str());
00673 PyErr_SetString(PyExc_Exception,str.c_str());
00674 return NULL;
00675 }
00676 catch(...)
00677 {
00678 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00679 return NULL;
00680 }
00681 #endif
00682 }
00683
00684
00685
00686
00687 PyObject * BSplineCurvePy::staticCallback_incrementMultiplicity (PyObject *self, PyObject *args)
00688 {
00689
00690 if (!((PyObjectBase*) self)->isValid()){
00691 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00692 return NULL;
00693 }
00694
00695
00696 if (((PyObjectBase*) self)->isConst()){
00697 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00698 return NULL;
00699 }
00700
00701 try {
00702 PyObject* ret = ((BSplineCurvePy*)self)->incrementMultiplicity(args);
00703 if (ret != 0)
00704 ((BSplineCurvePy*)self)->startNotify();
00705 return ret;
00706 }
00707 catch(const Base::Exception& e)
00708 {
00709 std::string str;
00710 str += "FreeCAD exception thrown (";
00711 str += e.what();
00712 str += ")";
00713 e.ReportException();
00714 PyErr_SetString(PyExc_Exception,str.c_str());
00715 return NULL;
00716 }
00717 catch(const boost::filesystem::filesystem_error& e)
00718 {
00719 std::string str;
00720 str += "File system exception thrown (";
00721
00722
00723 str += e.what();
00724 str += ")\n";
00725 Base::Console().Error(str.c_str());
00726 PyErr_SetString(PyExc_Exception,str.c_str());
00727 return NULL;
00728 }
00729 catch(const Py::Exception&)
00730 {
00731
00732 return NULL;
00733 }
00734 catch(const char* e)
00735 {
00736 Base::Console().Error(e);
00737 PyErr_SetString(PyExc_Exception,e);
00738 return NULL;
00739 }
00740
00741 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00742 catch(const std::exception& e)
00743 {
00744 std::string str;
00745 str += "FC++ exception thrown (";
00746 str += e.what();
00747 str += ")";
00748 Base::Console().Error(str.c_str());
00749 PyErr_SetString(PyExc_Exception,str.c_str());
00750 return NULL;
00751 }
00752 catch(...)
00753 {
00754 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00755 return NULL;
00756 }
00757 #endif
00758 }
00759
00760
00761
00762
00763 PyObject * BSplineCurvePy::staticCallback_insertKnot (PyObject *self, PyObject *args)
00764 {
00765
00766 if (!((PyObjectBase*) self)->isValid()){
00767 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00768 return NULL;
00769 }
00770
00771
00772 if (((PyObjectBase*) self)->isConst()){
00773 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00774 return NULL;
00775 }
00776
00777 try {
00778 PyObject* ret = ((BSplineCurvePy*)self)->insertKnot(args);
00779 if (ret != 0)
00780 ((BSplineCurvePy*)self)->startNotify();
00781 return ret;
00782 }
00783 catch(const Base::Exception& e)
00784 {
00785 std::string str;
00786 str += "FreeCAD exception thrown (";
00787 str += e.what();
00788 str += ")";
00789 e.ReportException();
00790 PyErr_SetString(PyExc_Exception,str.c_str());
00791 return NULL;
00792 }
00793 catch(const boost::filesystem::filesystem_error& e)
00794 {
00795 std::string str;
00796 str += "File system exception thrown (";
00797
00798
00799 str += e.what();
00800 str += ")\n";
00801 Base::Console().Error(str.c_str());
00802 PyErr_SetString(PyExc_Exception,str.c_str());
00803 return NULL;
00804 }
00805 catch(const Py::Exception&)
00806 {
00807
00808 return NULL;
00809 }
00810 catch(const char* e)
00811 {
00812 Base::Console().Error(e);
00813 PyErr_SetString(PyExc_Exception,e);
00814 return NULL;
00815 }
00816
00817 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00818 catch(const std::exception& e)
00819 {
00820 std::string str;
00821 str += "FC++ exception thrown (";
00822 str += e.what();
00823 str += ")";
00824 Base::Console().Error(str.c_str());
00825 PyErr_SetString(PyExc_Exception,str.c_str());
00826 return NULL;
00827 }
00828 catch(...)
00829 {
00830 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00831 return NULL;
00832 }
00833 #endif
00834 }
00835
00836
00837
00838
00839 PyObject * BSplineCurvePy::staticCallback_insertKnots (PyObject *self, PyObject *args)
00840 {
00841
00842 if (!((PyObjectBase*) self)->isValid()){
00843 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00844 return NULL;
00845 }
00846
00847
00848 if (((PyObjectBase*) self)->isConst()){
00849 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00850 return NULL;
00851 }
00852
00853 try {
00854 PyObject* ret = ((BSplineCurvePy*)self)->insertKnots(args);
00855 if (ret != 0)
00856 ((BSplineCurvePy*)self)->startNotify();
00857 return ret;
00858 }
00859 catch(const Base::Exception& e)
00860 {
00861 std::string str;
00862 str += "FreeCAD exception thrown (";
00863 str += e.what();
00864 str += ")";
00865 e.ReportException();
00866 PyErr_SetString(PyExc_Exception,str.c_str());
00867 return NULL;
00868 }
00869 catch(const boost::filesystem::filesystem_error& e)
00870 {
00871 std::string str;
00872 str += "File system exception thrown (";
00873
00874
00875 str += e.what();
00876 str += ")\n";
00877 Base::Console().Error(str.c_str());
00878 PyErr_SetString(PyExc_Exception,str.c_str());
00879 return NULL;
00880 }
00881 catch(const Py::Exception&)
00882 {
00883
00884 return NULL;
00885 }
00886 catch(const char* e)
00887 {
00888 Base::Console().Error(e);
00889 PyErr_SetString(PyExc_Exception,e);
00890 return NULL;
00891 }
00892
00893 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00894 catch(const std::exception& e)
00895 {
00896 std::string str;
00897 str += "FC++ exception thrown (";
00898 str += e.what();
00899 str += ")";
00900 Base::Console().Error(str.c_str());
00901 PyErr_SetString(PyExc_Exception,str.c_str());
00902 return NULL;
00903 }
00904 catch(...)
00905 {
00906 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00907 return NULL;
00908 }
00909 #endif
00910 }
00911
00912
00913
00914
00915 PyObject * BSplineCurvePy::staticCallback_removeKnot (PyObject *self, PyObject *args)
00916 {
00917
00918 if (!((PyObjectBase*) self)->isValid()){
00919 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00920 return NULL;
00921 }
00922
00923
00924 if (((PyObjectBase*) self)->isConst()){
00925 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00926 return NULL;
00927 }
00928
00929 try {
00930 PyObject* ret = ((BSplineCurvePy*)self)->removeKnot(args);
00931 if (ret != 0)
00932 ((BSplineCurvePy*)self)->startNotify();
00933 return ret;
00934 }
00935 catch(const Base::Exception& e)
00936 {
00937 std::string str;
00938 str += "FreeCAD exception thrown (";
00939 str += e.what();
00940 str += ")";
00941 e.ReportException();
00942 PyErr_SetString(PyExc_Exception,str.c_str());
00943 return NULL;
00944 }
00945 catch(const boost::filesystem::filesystem_error& e)
00946 {
00947 std::string str;
00948 str += "File system exception thrown (";
00949
00950
00951 str += e.what();
00952 str += ")\n";
00953 Base::Console().Error(str.c_str());
00954 PyErr_SetString(PyExc_Exception,str.c_str());
00955 return NULL;
00956 }
00957 catch(const Py::Exception&)
00958 {
00959
00960 return NULL;
00961 }
00962 catch(const char* e)
00963 {
00964 Base::Console().Error(e);
00965 PyErr_SetString(PyExc_Exception,e);
00966 return NULL;
00967 }
00968
00969 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00970 catch(const std::exception& e)
00971 {
00972 std::string str;
00973 str += "FC++ exception thrown (";
00974 str += e.what();
00975 str += ")";
00976 Base::Console().Error(str.c_str());
00977 PyErr_SetString(PyExc_Exception,str.c_str());
00978 return NULL;
00979 }
00980 catch(...)
00981 {
00982 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00983 return NULL;
00984 }
00985 #endif
00986 }
00987
00988
00989
00990
00991 PyObject * BSplineCurvePy::staticCallback_segment (PyObject *self, PyObject *args)
00992 {
00993
00994 if (!((PyObjectBase*) self)->isValid()){
00995 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00996 return NULL;
00997 }
00998
00999
01000 if (((PyObjectBase*) self)->isConst()){
01001 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01002 return NULL;
01003 }
01004
01005 try {
01006 PyObject* ret = ((BSplineCurvePy*)self)->segment(args);
01007 if (ret != 0)
01008 ((BSplineCurvePy*)self)->startNotify();
01009 return ret;
01010 }
01011 catch(const Base::Exception& e)
01012 {
01013 std::string str;
01014 str += "FreeCAD exception thrown (";
01015 str += e.what();
01016 str += ")";
01017 e.ReportException();
01018 PyErr_SetString(PyExc_Exception,str.c_str());
01019 return NULL;
01020 }
01021 catch(const boost::filesystem::filesystem_error& e)
01022 {
01023 std::string str;
01024 str += "File system exception thrown (";
01025
01026
01027 str += e.what();
01028 str += ")\n";
01029 Base::Console().Error(str.c_str());
01030 PyErr_SetString(PyExc_Exception,str.c_str());
01031 return NULL;
01032 }
01033 catch(const Py::Exception&)
01034 {
01035
01036 return NULL;
01037 }
01038 catch(const char* e)
01039 {
01040 Base::Console().Error(e);
01041 PyErr_SetString(PyExc_Exception,e);
01042 return NULL;
01043 }
01044
01045 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01046 catch(const std::exception& e)
01047 {
01048 std::string str;
01049 str += "FC++ exception thrown (";
01050 str += e.what();
01051 str += ")";
01052 Base::Console().Error(str.c_str());
01053 PyErr_SetString(PyExc_Exception,str.c_str());
01054 return NULL;
01055 }
01056 catch(...)
01057 {
01058 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01059 return NULL;
01060 }
01061 #endif
01062 }
01063
01064
01065
01066
01067 PyObject * BSplineCurvePy::staticCallback_setKnot (PyObject *self, PyObject *args)
01068 {
01069
01070 if (!((PyObjectBase*) self)->isValid()){
01071 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01072 return NULL;
01073 }
01074
01075
01076 if (((PyObjectBase*) self)->isConst()){
01077 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01078 return NULL;
01079 }
01080
01081 try {
01082 PyObject* ret = ((BSplineCurvePy*)self)->setKnot(args);
01083 if (ret != 0)
01084 ((BSplineCurvePy*)self)->startNotify();
01085 return ret;
01086 }
01087 catch(const Base::Exception& e)
01088 {
01089 std::string str;
01090 str += "FreeCAD exception thrown (";
01091 str += e.what();
01092 str += ")";
01093 e.ReportException();
01094 PyErr_SetString(PyExc_Exception,str.c_str());
01095 return NULL;
01096 }
01097 catch(const boost::filesystem::filesystem_error& e)
01098 {
01099 std::string str;
01100 str += "File system exception thrown (";
01101
01102
01103 str += e.what();
01104 str += ")\n";
01105 Base::Console().Error(str.c_str());
01106 PyErr_SetString(PyExc_Exception,str.c_str());
01107 return NULL;
01108 }
01109 catch(const Py::Exception&)
01110 {
01111
01112 return NULL;
01113 }
01114 catch(const char* e)
01115 {
01116 Base::Console().Error(e);
01117 PyErr_SetString(PyExc_Exception,e);
01118 return NULL;
01119 }
01120
01121 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01122 catch(const std::exception& e)
01123 {
01124 std::string str;
01125 str += "FC++ exception thrown (";
01126 str += e.what();
01127 str += ")";
01128 Base::Console().Error(str.c_str());
01129 PyErr_SetString(PyExc_Exception,str.c_str());
01130 return NULL;
01131 }
01132 catch(...)
01133 {
01134 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01135 return NULL;
01136 }
01137 #endif
01138 }
01139
01140
01141
01142
01143 PyObject * BSplineCurvePy::staticCallback_getKnot (PyObject *self, PyObject *args)
01144 {
01145
01146 if (!((PyObjectBase*) self)->isValid()){
01147 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01148 return NULL;
01149 }
01150
01151
01152 if (((PyObjectBase*) self)->isConst()){
01153 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01154 return NULL;
01155 }
01156
01157 try {
01158 PyObject* ret = ((BSplineCurvePy*)self)->getKnot(args);
01159 if (ret != 0)
01160 ((BSplineCurvePy*)self)->startNotify();
01161 return ret;
01162 }
01163 catch(const Base::Exception& e)
01164 {
01165 std::string str;
01166 str += "FreeCAD exception thrown (";
01167 str += e.what();
01168 str += ")";
01169 e.ReportException();
01170 PyErr_SetString(PyExc_Exception,str.c_str());
01171 return NULL;
01172 }
01173 catch(const boost::filesystem::filesystem_error& e)
01174 {
01175 std::string str;
01176 str += "File system exception thrown (";
01177
01178
01179 str += e.what();
01180 str += ")\n";
01181 Base::Console().Error(str.c_str());
01182 PyErr_SetString(PyExc_Exception,str.c_str());
01183 return NULL;
01184 }
01185 catch(const Py::Exception&)
01186 {
01187
01188 return NULL;
01189 }
01190 catch(const char* e)
01191 {
01192 Base::Console().Error(e);
01193 PyErr_SetString(PyExc_Exception,e);
01194 return NULL;
01195 }
01196
01197 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01198 catch(const std::exception& e)
01199 {
01200 std::string str;
01201 str += "FC++ exception thrown (";
01202 str += e.what();
01203 str += ")";
01204 Base::Console().Error(str.c_str());
01205 PyErr_SetString(PyExc_Exception,str.c_str());
01206 return NULL;
01207 }
01208 catch(...)
01209 {
01210 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01211 return NULL;
01212 }
01213 #endif
01214 }
01215
01216
01217
01218
01219 PyObject * BSplineCurvePy::staticCallback_setKnots (PyObject *self, PyObject *args)
01220 {
01221
01222 if (!((PyObjectBase*) self)->isValid()){
01223 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01224 return NULL;
01225 }
01226
01227
01228 if (((PyObjectBase*) self)->isConst()){
01229 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01230 return NULL;
01231 }
01232
01233 try {
01234 PyObject* ret = ((BSplineCurvePy*)self)->setKnots(args);
01235 if (ret != 0)
01236 ((BSplineCurvePy*)self)->startNotify();
01237 return ret;
01238 }
01239 catch(const Base::Exception& e)
01240 {
01241 std::string str;
01242 str += "FreeCAD exception thrown (";
01243 str += e.what();
01244 str += ")";
01245 e.ReportException();
01246 PyErr_SetString(PyExc_Exception,str.c_str());
01247 return NULL;
01248 }
01249 catch(const boost::filesystem::filesystem_error& e)
01250 {
01251 std::string str;
01252 str += "File system exception thrown (";
01253
01254
01255 str += e.what();
01256 str += ")\n";
01257 Base::Console().Error(str.c_str());
01258 PyErr_SetString(PyExc_Exception,str.c_str());
01259 return NULL;
01260 }
01261 catch(const Py::Exception&)
01262 {
01263
01264 return NULL;
01265 }
01266 catch(const char* e)
01267 {
01268 Base::Console().Error(e);
01269 PyErr_SetString(PyExc_Exception,e);
01270 return NULL;
01271 }
01272
01273 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01274 catch(const std::exception& e)
01275 {
01276 std::string str;
01277 str += "FC++ exception thrown (";
01278 str += e.what();
01279 str += ")";
01280 Base::Console().Error(str.c_str());
01281 PyErr_SetString(PyExc_Exception,str.c_str());
01282 return NULL;
01283 }
01284 catch(...)
01285 {
01286 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01287 return NULL;
01288 }
01289 #endif
01290 }
01291
01292
01293
01294
01295 PyObject * BSplineCurvePy::staticCallback_getKnots (PyObject *self, PyObject *args)
01296 {
01297
01298 if (!((PyObjectBase*) self)->isValid()){
01299 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01300 return NULL;
01301 }
01302
01303
01304 if (((PyObjectBase*) self)->isConst()){
01305 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01306 return NULL;
01307 }
01308
01309 try {
01310 PyObject* ret = ((BSplineCurvePy*)self)->getKnots(args);
01311 if (ret != 0)
01312 ((BSplineCurvePy*)self)->startNotify();
01313 return ret;
01314 }
01315 catch(const Base::Exception& e)
01316 {
01317 std::string str;
01318 str += "FreeCAD exception thrown (";
01319 str += e.what();
01320 str += ")";
01321 e.ReportException();
01322 PyErr_SetString(PyExc_Exception,str.c_str());
01323 return NULL;
01324 }
01325 catch(const boost::filesystem::filesystem_error& e)
01326 {
01327 std::string str;
01328 str += "File system exception thrown (";
01329
01330
01331 str += e.what();
01332 str += ")\n";
01333 Base::Console().Error(str.c_str());
01334 PyErr_SetString(PyExc_Exception,str.c_str());
01335 return NULL;
01336 }
01337 catch(const Py::Exception&)
01338 {
01339
01340 return NULL;
01341 }
01342 catch(const char* e)
01343 {
01344 Base::Console().Error(e);
01345 PyErr_SetString(PyExc_Exception,e);
01346 return NULL;
01347 }
01348
01349 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01350 catch(const std::exception& e)
01351 {
01352 std::string str;
01353 str += "FC++ exception thrown (";
01354 str += e.what();
01355 str += ")";
01356 Base::Console().Error(str.c_str());
01357 PyErr_SetString(PyExc_Exception,str.c_str());
01358 return NULL;
01359 }
01360 catch(...)
01361 {
01362 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01363 return NULL;
01364 }
01365 #endif
01366 }
01367
01368
01369
01370
01371 PyObject * BSplineCurvePy::staticCallback_setPole (PyObject *self, PyObject *args)
01372 {
01373
01374 if (!((PyObjectBase*) self)->isValid()){
01375 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01376 return NULL;
01377 }
01378
01379
01380 if (((PyObjectBase*) self)->isConst()){
01381 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01382 return NULL;
01383 }
01384
01385 try {
01386 PyObject* ret = ((BSplineCurvePy*)self)->setPole(args);
01387 if (ret != 0)
01388 ((BSplineCurvePy*)self)->startNotify();
01389 return ret;
01390 }
01391 catch(const Base::Exception& e)
01392 {
01393 std::string str;
01394 str += "FreeCAD exception thrown (";
01395 str += e.what();
01396 str += ")";
01397 e.ReportException();
01398 PyErr_SetString(PyExc_Exception,str.c_str());
01399 return NULL;
01400 }
01401 catch(const boost::filesystem::filesystem_error& e)
01402 {
01403 std::string str;
01404 str += "File system exception thrown (";
01405
01406
01407 str += e.what();
01408 str += ")\n";
01409 Base::Console().Error(str.c_str());
01410 PyErr_SetString(PyExc_Exception,str.c_str());
01411 return NULL;
01412 }
01413 catch(const Py::Exception&)
01414 {
01415
01416 return NULL;
01417 }
01418 catch(const char* e)
01419 {
01420 Base::Console().Error(e);
01421 PyErr_SetString(PyExc_Exception,e);
01422 return NULL;
01423 }
01424
01425 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01426 catch(const std::exception& e)
01427 {
01428 std::string str;
01429 str += "FC++ exception thrown (";
01430 str += e.what();
01431 str += ")";
01432 Base::Console().Error(str.c_str());
01433 PyErr_SetString(PyExc_Exception,str.c_str());
01434 return NULL;
01435 }
01436 catch(...)
01437 {
01438 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01439 return NULL;
01440 }
01441 #endif
01442 }
01443
01444
01445
01446
01447 PyObject * BSplineCurvePy::staticCallback_getPole (PyObject *self, PyObject *args)
01448 {
01449
01450 if (!((PyObjectBase*) self)->isValid()){
01451 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01452 return NULL;
01453 }
01454
01455
01456 if (((PyObjectBase*) self)->isConst()){
01457 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01458 return NULL;
01459 }
01460
01461 try {
01462 PyObject* ret = ((BSplineCurvePy*)self)->getPole(args);
01463 if (ret != 0)
01464 ((BSplineCurvePy*)self)->startNotify();
01465 return ret;
01466 }
01467 catch(const Base::Exception& e)
01468 {
01469 std::string str;
01470 str += "FreeCAD exception thrown (";
01471 str += e.what();
01472 str += ")";
01473 e.ReportException();
01474 PyErr_SetString(PyExc_Exception,str.c_str());
01475 return NULL;
01476 }
01477 catch(const boost::filesystem::filesystem_error& e)
01478 {
01479 std::string str;
01480 str += "File system exception thrown (";
01481
01482
01483 str += e.what();
01484 str += ")\n";
01485 Base::Console().Error(str.c_str());
01486 PyErr_SetString(PyExc_Exception,str.c_str());
01487 return NULL;
01488 }
01489 catch(const Py::Exception&)
01490 {
01491
01492 return NULL;
01493 }
01494 catch(const char* e)
01495 {
01496 Base::Console().Error(e);
01497 PyErr_SetString(PyExc_Exception,e);
01498 return NULL;
01499 }
01500
01501 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01502 catch(const std::exception& e)
01503 {
01504 std::string str;
01505 str += "FC++ exception thrown (";
01506 str += e.what();
01507 str += ")";
01508 Base::Console().Error(str.c_str());
01509 PyErr_SetString(PyExc_Exception,str.c_str());
01510 return NULL;
01511 }
01512 catch(...)
01513 {
01514 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01515 return NULL;
01516 }
01517 #endif
01518 }
01519
01520
01521
01522
01523 PyObject * BSplineCurvePy::staticCallback_getPoles (PyObject *self, PyObject *args)
01524 {
01525
01526 if (!((PyObjectBase*) self)->isValid()){
01527 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01528 return NULL;
01529 }
01530
01531
01532 if (((PyObjectBase*) self)->isConst()){
01533 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01534 return NULL;
01535 }
01536
01537 try {
01538 PyObject* ret = ((BSplineCurvePy*)self)->getPoles(args);
01539 if (ret != 0)
01540 ((BSplineCurvePy*)self)->startNotify();
01541 return ret;
01542 }
01543 catch(const Base::Exception& e)
01544 {
01545 std::string str;
01546 str += "FreeCAD exception thrown (";
01547 str += e.what();
01548 str += ")";
01549 e.ReportException();
01550 PyErr_SetString(PyExc_Exception,str.c_str());
01551 return NULL;
01552 }
01553 catch(const boost::filesystem::filesystem_error& e)
01554 {
01555 std::string str;
01556 str += "File system exception thrown (";
01557
01558
01559 str += e.what();
01560 str += ")\n";
01561 Base::Console().Error(str.c_str());
01562 PyErr_SetString(PyExc_Exception,str.c_str());
01563 return NULL;
01564 }
01565 catch(const Py::Exception&)
01566 {
01567
01568 return NULL;
01569 }
01570 catch(const char* e)
01571 {
01572 Base::Console().Error(e);
01573 PyErr_SetString(PyExc_Exception,e);
01574 return NULL;
01575 }
01576
01577 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01578 catch(const std::exception& e)
01579 {
01580 std::string str;
01581 str += "FC++ exception thrown (";
01582 str += e.what();
01583 str += ")";
01584 Base::Console().Error(str.c_str());
01585 PyErr_SetString(PyExc_Exception,str.c_str());
01586 return NULL;
01587 }
01588 catch(...)
01589 {
01590 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01591 return NULL;
01592 }
01593 #endif
01594 }
01595
01596
01597
01598
01599 PyObject * BSplineCurvePy::staticCallback_setWeight (PyObject *self, PyObject *args)
01600 {
01601
01602 if (!((PyObjectBase*) self)->isValid()){
01603 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01604 return NULL;
01605 }
01606
01607
01608 if (((PyObjectBase*) self)->isConst()){
01609 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01610 return NULL;
01611 }
01612
01613 try {
01614 PyObject* ret = ((BSplineCurvePy*)self)->setWeight(args);
01615 if (ret != 0)
01616 ((BSplineCurvePy*)self)->startNotify();
01617 return ret;
01618 }
01619 catch(const Base::Exception& e)
01620 {
01621 std::string str;
01622 str += "FreeCAD exception thrown (";
01623 str += e.what();
01624 str += ")";
01625 e.ReportException();
01626 PyErr_SetString(PyExc_Exception,str.c_str());
01627 return NULL;
01628 }
01629 catch(const boost::filesystem::filesystem_error& e)
01630 {
01631 std::string str;
01632 str += "File system exception thrown (";
01633
01634
01635 str += e.what();
01636 str += ")\n";
01637 Base::Console().Error(str.c_str());
01638 PyErr_SetString(PyExc_Exception,str.c_str());
01639 return NULL;
01640 }
01641 catch(const Py::Exception&)
01642 {
01643
01644 return NULL;
01645 }
01646 catch(const char* e)
01647 {
01648 Base::Console().Error(e);
01649 PyErr_SetString(PyExc_Exception,e);
01650 return NULL;
01651 }
01652
01653 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01654 catch(const std::exception& e)
01655 {
01656 std::string str;
01657 str += "FC++ exception thrown (";
01658 str += e.what();
01659 str += ")";
01660 Base::Console().Error(str.c_str());
01661 PyErr_SetString(PyExc_Exception,str.c_str());
01662 return NULL;
01663 }
01664 catch(...)
01665 {
01666 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01667 return NULL;
01668 }
01669 #endif
01670 }
01671
01672
01673
01674
01675 PyObject * BSplineCurvePy::staticCallback_getWeight (PyObject *self, PyObject *args)
01676 {
01677
01678 if (!((PyObjectBase*) self)->isValid()){
01679 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01680 return NULL;
01681 }
01682
01683
01684 if (((PyObjectBase*) self)->isConst()){
01685 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01686 return NULL;
01687 }
01688
01689 try {
01690 PyObject* ret = ((BSplineCurvePy*)self)->getWeight(args);
01691 if (ret != 0)
01692 ((BSplineCurvePy*)self)->startNotify();
01693 return ret;
01694 }
01695 catch(const Base::Exception& e)
01696 {
01697 std::string str;
01698 str += "FreeCAD exception thrown (";
01699 str += e.what();
01700 str += ")";
01701 e.ReportException();
01702 PyErr_SetString(PyExc_Exception,str.c_str());
01703 return NULL;
01704 }
01705 catch(const boost::filesystem::filesystem_error& e)
01706 {
01707 std::string str;
01708 str += "File system exception thrown (";
01709
01710
01711 str += e.what();
01712 str += ")\n";
01713 Base::Console().Error(str.c_str());
01714 PyErr_SetString(PyExc_Exception,str.c_str());
01715 return NULL;
01716 }
01717 catch(const Py::Exception&)
01718 {
01719
01720 return NULL;
01721 }
01722 catch(const char* e)
01723 {
01724 Base::Console().Error(e);
01725 PyErr_SetString(PyExc_Exception,e);
01726 return NULL;
01727 }
01728
01729 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01730 catch(const std::exception& e)
01731 {
01732 std::string str;
01733 str += "FC++ exception thrown (";
01734 str += e.what();
01735 str += ")";
01736 Base::Console().Error(str.c_str());
01737 PyErr_SetString(PyExc_Exception,str.c_str());
01738 return NULL;
01739 }
01740 catch(...)
01741 {
01742 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01743 return NULL;
01744 }
01745 #endif
01746 }
01747
01748
01749
01750
01751 PyObject * BSplineCurvePy::staticCallback_getWeights (PyObject *self, PyObject *args)
01752 {
01753
01754 if (!((PyObjectBase*) self)->isValid()){
01755 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01756 return NULL;
01757 }
01758
01759
01760 if (((PyObjectBase*) self)->isConst()){
01761 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01762 return NULL;
01763 }
01764
01765 try {
01766 PyObject* ret = ((BSplineCurvePy*)self)->getWeights(args);
01767 if (ret != 0)
01768 ((BSplineCurvePy*)self)->startNotify();
01769 return ret;
01770 }
01771 catch(const Base::Exception& e)
01772 {
01773 std::string str;
01774 str += "FreeCAD exception thrown (";
01775 str += e.what();
01776 str += ")";
01777 e.ReportException();
01778 PyErr_SetString(PyExc_Exception,str.c_str());
01779 return NULL;
01780 }
01781 catch(const boost::filesystem::filesystem_error& e)
01782 {
01783 std::string str;
01784 str += "File system exception thrown (";
01785
01786
01787 str += e.what();
01788 str += ")\n";
01789 Base::Console().Error(str.c_str());
01790 PyErr_SetString(PyExc_Exception,str.c_str());
01791 return NULL;
01792 }
01793 catch(const Py::Exception&)
01794 {
01795
01796 return NULL;
01797 }
01798 catch(const char* e)
01799 {
01800 Base::Console().Error(e);
01801 PyErr_SetString(PyExc_Exception,e);
01802 return NULL;
01803 }
01804
01805 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01806 catch(const std::exception& e)
01807 {
01808 std::string str;
01809 str += "FC++ exception thrown (";
01810 str += e.what();
01811 str += ")";
01812 Base::Console().Error(str.c_str());
01813 PyErr_SetString(PyExc_Exception,str.c_str());
01814 return NULL;
01815 }
01816 catch(...)
01817 {
01818 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01819 return NULL;
01820 }
01821 #endif
01822 }
01823
01824
01825
01826
01827 PyObject * BSplineCurvePy::staticCallback_getResolution (PyObject *self, PyObject *args)
01828 {
01829
01830 if (!((PyObjectBase*) self)->isValid()){
01831 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01832 return NULL;
01833 }
01834
01835
01836 try {
01837 PyObject* ret = ((BSplineCurvePy*)self)->getResolution(args);
01838 return ret;
01839 }
01840 catch(const Base::Exception& e)
01841 {
01842 std::string str;
01843 str += "FreeCAD exception thrown (";
01844 str += e.what();
01845 str += ")";
01846 e.ReportException();
01847 PyErr_SetString(PyExc_Exception,str.c_str());
01848 return NULL;
01849 }
01850 catch(const boost::filesystem::filesystem_error& e)
01851 {
01852 std::string str;
01853 str += "File system exception thrown (";
01854
01855
01856 str += e.what();
01857 str += ")\n";
01858 Base::Console().Error(str.c_str());
01859 PyErr_SetString(PyExc_Exception,str.c_str());
01860 return NULL;
01861 }
01862 catch(const Py::Exception&)
01863 {
01864
01865 return NULL;
01866 }
01867 catch(const char* e)
01868 {
01869 Base::Console().Error(e);
01870 PyErr_SetString(PyExc_Exception,e);
01871 return NULL;
01872 }
01873
01874 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01875 catch(const std::exception& e)
01876 {
01877 std::string str;
01878 str += "FC++ exception thrown (";
01879 str += e.what();
01880 str += ")";
01881 Base::Console().Error(str.c_str());
01882 PyErr_SetString(PyExc_Exception,str.c_str());
01883 return NULL;
01884 }
01885 catch(...)
01886 {
01887 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01888 return NULL;
01889 }
01890 #endif
01891 }
01892
01893
01894
01895
01896 PyObject * BSplineCurvePy::staticCallback_movePoint (PyObject *self, PyObject *args)
01897 {
01898
01899 if (!((PyObjectBase*) self)->isValid()){
01900 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01901 return NULL;
01902 }
01903
01904
01905 if (((PyObjectBase*) self)->isConst()){
01906 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01907 return NULL;
01908 }
01909
01910 try {
01911 PyObject* ret = ((BSplineCurvePy*)self)->movePoint(args);
01912 if (ret != 0)
01913 ((BSplineCurvePy*)self)->startNotify();
01914 return ret;
01915 }
01916 catch(const Base::Exception& e)
01917 {
01918 std::string str;
01919 str += "FreeCAD exception thrown (";
01920 str += e.what();
01921 str += ")";
01922 e.ReportException();
01923 PyErr_SetString(PyExc_Exception,str.c_str());
01924 return NULL;
01925 }
01926 catch(const boost::filesystem::filesystem_error& e)
01927 {
01928 std::string str;
01929 str += "File system exception thrown (";
01930
01931
01932 str += e.what();
01933 str += ")\n";
01934 Base::Console().Error(str.c_str());
01935 PyErr_SetString(PyExc_Exception,str.c_str());
01936 return NULL;
01937 }
01938 catch(const Py::Exception&)
01939 {
01940
01941 return NULL;
01942 }
01943 catch(const char* e)
01944 {
01945 Base::Console().Error(e);
01946 PyErr_SetString(PyExc_Exception,e);
01947 return NULL;
01948 }
01949
01950 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01951 catch(const std::exception& e)
01952 {
01953 std::string str;
01954 str += "FC++ exception thrown (";
01955 str += e.what();
01956 str += ")";
01957 Base::Console().Error(str.c_str());
01958 PyErr_SetString(PyExc_Exception,str.c_str());
01959 return NULL;
01960 }
01961 catch(...)
01962 {
01963 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01964 return NULL;
01965 }
01966 #endif
01967 }
01968
01969
01970
01971
01972 PyObject * BSplineCurvePy::staticCallback_setNotPeriodic (PyObject *self, PyObject *args)
01973 {
01974
01975 if (!((PyObjectBase*) self)->isValid()){
01976 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01977 return NULL;
01978 }
01979
01980
01981 if (((PyObjectBase*) self)->isConst()){
01982 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01983 return NULL;
01984 }
01985
01986 try {
01987 PyObject* ret = ((BSplineCurvePy*)self)->setNotPeriodic(args);
01988 if (ret != 0)
01989 ((BSplineCurvePy*)self)->startNotify();
01990 return ret;
01991 }
01992 catch(const Base::Exception& e)
01993 {
01994 std::string str;
01995 str += "FreeCAD exception thrown (";
01996 str += e.what();
01997 str += ")";
01998 e.ReportException();
01999 PyErr_SetString(PyExc_Exception,str.c_str());
02000 return NULL;
02001 }
02002 catch(const boost::filesystem::filesystem_error& e)
02003 {
02004 std::string str;
02005 str += "File system exception thrown (";
02006
02007
02008 str += e.what();
02009 str += ")\n";
02010 Base::Console().Error(str.c_str());
02011 PyErr_SetString(PyExc_Exception,str.c_str());
02012 return NULL;
02013 }
02014 catch(const Py::Exception&)
02015 {
02016
02017 return NULL;
02018 }
02019 catch(const char* e)
02020 {
02021 Base::Console().Error(e);
02022 PyErr_SetString(PyExc_Exception,e);
02023 return NULL;
02024 }
02025
02026 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02027 catch(const std::exception& e)
02028 {
02029 std::string str;
02030 str += "FC++ exception thrown (";
02031 str += e.what();
02032 str += ")";
02033 Base::Console().Error(str.c_str());
02034 PyErr_SetString(PyExc_Exception,str.c_str());
02035 return NULL;
02036 }
02037 catch(...)
02038 {
02039 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02040 return NULL;
02041 }
02042 #endif
02043 }
02044
02045
02046
02047
02048 PyObject * BSplineCurvePy::staticCallback_setPeriodic (PyObject *self, PyObject *args)
02049 {
02050
02051 if (!((PyObjectBase*) self)->isValid()){
02052 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02053 return NULL;
02054 }
02055
02056
02057 if (((PyObjectBase*) self)->isConst()){
02058 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02059 return NULL;
02060 }
02061
02062 try {
02063 PyObject* ret = ((BSplineCurvePy*)self)->setPeriodic(args);
02064 if (ret != 0)
02065 ((BSplineCurvePy*)self)->startNotify();
02066 return ret;
02067 }
02068 catch(const Base::Exception& e)
02069 {
02070 std::string str;
02071 str += "FreeCAD exception thrown (";
02072 str += e.what();
02073 str += ")";
02074 e.ReportException();
02075 PyErr_SetString(PyExc_Exception,str.c_str());
02076 return NULL;
02077 }
02078 catch(const boost::filesystem::filesystem_error& e)
02079 {
02080 std::string str;
02081 str += "File system exception thrown (";
02082
02083
02084 str += e.what();
02085 str += ")\n";
02086 Base::Console().Error(str.c_str());
02087 PyErr_SetString(PyExc_Exception,str.c_str());
02088 return NULL;
02089 }
02090 catch(const Py::Exception&)
02091 {
02092
02093 return NULL;
02094 }
02095 catch(const char* e)
02096 {
02097 Base::Console().Error(e);
02098 PyErr_SetString(PyExc_Exception,e);
02099 return NULL;
02100 }
02101
02102 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02103 catch(const std::exception& e)
02104 {
02105 std::string str;
02106 str += "FC++ exception thrown (";
02107 str += e.what();
02108 str += ")";
02109 Base::Console().Error(str.c_str());
02110 PyErr_SetString(PyExc_Exception,str.c_str());
02111 return NULL;
02112 }
02113 catch(...)
02114 {
02115 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02116 return NULL;
02117 }
02118 #endif
02119 }
02120
02121
02122
02123
02124 PyObject * BSplineCurvePy::staticCallback_setOrigin (PyObject *self, PyObject *args)
02125 {
02126
02127 if (!((PyObjectBase*) self)->isValid()){
02128 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02129 return NULL;
02130 }
02131
02132
02133 if (((PyObjectBase*) self)->isConst()){
02134 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02135 return NULL;
02136 }
02137
02138 try {
02139 PyObject* ret = ((BSplineCurvePy*)self)->setOrigin(args);
02140 if (ret != 0)
02141 ((BSplineCurvePy*)self)->startNotify();
02142 return ret;
02143 }
02144 catch(const Base::Exception& e)
02145 {
02146 std::string str;
02147 str += "FreeCAD exception thrown (";
02148 str += e.what();
02149 str += ")";
02150 e.ReportException();
02151 PyErr_SetString(PyExc_Exception,str.c_str());
02152 return NULL;
02153 }
02154 catch(const boost::filesystem::filesystem_error& e)
02155 {
02156 std::string str;
02157 str += "File system exception thrown (";
02158
02159
02160 str += e.what();
02161 str += ")\n";
02162 Base::Console().Error(str.c_str());
02163 PyErr_SetString(PyExc_Exception,str.c_str());
02164 return NULL;
02165 }
02166 catch(const Py::Exception&)
02167 {
02168
02169 return NULL;
02170 }
02171 catch(const char* e)
02172 {
02173 Base::Console().Error(e);
02174 PyErr_SetString(PyExc_Exception,e);
02175 return NULL;
02176 }
02177
02178 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02179 catch(const std::exception& e)
02180 {
02181 std::string str;
02182 str += "FC++ exception thrown (";
02183 str += e.what();
02184 str += ")";
02185 Base::Console().Error(str.c_str());
02186 PyErr_SetString(PyExc_Exception,str.c_str());
02187 return NULL;
02188 }
02189 catch(...)
02190 {
02191 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02192 return NULL;
02193 }
02194 #endif
02195 }
02196
02197
02198
02199
02200 PyObject * BSplineCurvePy::staticCallback_getMultiplicity (PyObject *self, PyObject *args)
02201 {
02202
02203 if (!((PyObjectBase*) self)->isValid()){
02204 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02205 return NULL;
02206 }
02207
02208
02209 if (((PyObjectBase*) self)->isConst()){
02210 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02211 return NULL;
02212 }
02213
02214 try {
02215 PyObject* ret = ((BSplineCurvePy*)self)->getMultiplicity(args);
02216 if (ret != 0)
02217 ((BSplineCurvePy*)self)->startNotify();
02218 return ret;
02219 }
02220 catch(const Base::Exception& e)
02221 {
02222 std::string str;
02223 str += "FreeCAD exception thrown (";
02224 str += e.what();
02225 str += ")";
02226 e.ReportException();
02227 PyErr_SetString(PyExc_Exception,str.c_str());
02228 return NULL;
02229 }
02230 catch(const boost::filesystem::filesystem_error& e)
02231 {
02232 std::string str;
02233 str += "File system exception thrown (";
02234
02235
02236 str += e.what();
02237 str += ")\n";
02238 Base::Console().Error(str.c_str());
02239 PyErr_SetString(PyExc_Exception,str.c_str());
02240 return NULL;
02241 }
02242 catch(const Py::Exception&)
02243 {
02244
02245 return NULL;
02246 }
02247 catch(const char* e)
02248 {
02249 Base::Console().Error(e);
02250 PyErr_SetString(PyExc_Exception,e);
02251 return NULL;
02252 }
02253
02254 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02255 catch(const std::exception& e)
02256 {
02257 std::string str;
02258 str += "FC++ exception thrown (";
02259 str += e.what();
02260 str += ")";
02261 Base::Console().Error(str.c_str());
02262 PyErr_SetString(PyExc_Exception,str.c_str());
02263 return NULL;
02264 }
02265 catch(...)
02266 {
02267 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02268 return NULL;
02269 }
02270 #endif
02271 }
02272
02273
02274
02275
02276 PyObject * BSplineCurvePy::staticCallback_getMultiplicities (PyObject *self, PyObject *args)
02277 {
02278
02279 if (!((PyObjectBase*) self)->isValid()){
02280 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02281 return NULL;
02282 }
02283
02284
02285 if (((PyObjectBase*) self)->isConst()){
02286 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02287 return NULL;
02288 }
02289
02290 try {
02291 PyObject* ret = ((BSplineCurvePy*)self)->getMultiplicities(args);
02292 if (ret != 0)
02293 ((BSplineCurvePy*)self)->startNotify();
02294 return ret;
02295 }
02296 catch(const Base::Exception& e)
02297 {
02298 std::string str;
02299 str += "FreeCAD exception thrown (";
02300 str += e.what();
02301 str += ")";
02302 e.ReportException();
02303 PyErr_SetString(PyExc_Exception,str.c_str());
02304 return NULL;
02305 }
02306 catch(const boost::filesystem::filesystem_error& e)
02307 {
02308 std::string str;
02309 str += "File system exception thrown (";
02310
02311
02312 str += e.what();
02313 str += ")\n";
02314 Base::Console().Error(str.c_str());
02315 PyErr_SetString(PyExc_Exception,str.c_str());
02316 return NULL;
02317 }
02318 catch(const Py::Exception&)
02319 {
02320
02321 return NULL;
02322 }
02323 catch(const char* e)
02324 {
02325 Base::Console().Error(e);
02326 PyErr_SetString(PyExc_Exception,e);
02327 return NULL;
02328 }
02329
02330 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02331 catch(const std::exception& e)
02332 {
02333 std::string str;
02334 str += "FC++ exception thrown (";
02335 str += e.what();
02336 str += ")";
02337 Base::Console().Error(str.c_str());
02338 PyErr_SetString(PyExc_Exception,str.c_str());
02339 return NULL;
02340 }
02341 catch(...)
02342 {
02343 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02344 return NULL;
02345 }
02346 #endif
02347 }
02348
02349
02350
02351
02352 PyObject * BSplineCurvePy::staticCallback_approximate (PyObject *self, PyObject *args)
02353 {
02354
02355 if (!((PyObjectBase*) self)->isValid()){
02356 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02357 return NULL;
02358 }
02359
02360
02361 if (((PyObjectBase*) self)->isConst()){
02362 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02363 return NULL;
02364 }
02365
02366 try {
02367 PyObject* ret = ((BSplineCurvePy*)self)->approximate(args);
02368 if (ret != 0)
02369 ((BSplineCurvePy*)self)->startNotify();
02370 return ret;
02371 }
02372 catch(const Base::Exception& e)
02373 {
02374 std::string str;
02375 str += "FreeCAD exception thrown (";
02376 str += e.what();
02377 str += ")";
02378 e.ReportException();
02379 PyErr_SetString(PyExc_Exception,str.c_str());
02380 return NULL;
02381 }
02382 catch(const boost::filesystem::filesystem_error& e)
02383 {
02384 std::string str;
02385 str += "File system exception thrown (";
02386
02387
02388 str += e.what();
02389 str += ")\n";
02390 Base::Console().Error(str.c_str());
02391 PyErr_SetString(PyExc_Exception,str.c_str());
02392 return NULL;
02393 }
02394 catch(const Py::Exception&)
02395 {
02396
02397 return NULL;
02398 }
02399 catch(const char* e)
02400 {
02401 Base::Console().Error(e);
02402 PyErr_SetString(PyExc_Exception,e);
02403 return NULL;
02404 }
02405
02406 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02407 catch(const std::exception& e)
02408 {
02409 std::string str;
02410 str += "FC++ exception thrown (";
02411 str += e.what();
02412 str += ")";
02413 Base::Console().Error(str.c_str());
02414 PyErr_SetString(PyExc_Exception,str.c_str());
02415 return NULL;
02416 }
02417 catch(...)
02418 {
02419 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02420 return NULL;
02421 }
02422 #endif
02423 }
02424
02425
02426
02427
02428 PyObject * BSplineCurvePy::staticCallback_interpolate (PyObject *self, PyObject *args)
02429 {
02430
02431 if (!((PyObjectBase*) self)->isValid()){
02432 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02433 return NULL;
02434 }
02435
02436
02437 if (((PyObjectBase*) self)->isConst()){
02438 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02439 return NULL;
02440 }
02441
02442 try {
02443 PyObject* ret = ((BSplineCurvePy*)self)->interpolate(args);
02444 if (ret != 0)
02445 ((BSplineCurvePy*)self)->startNotify();
02446 return ret;
02447 }
02448 catch(const Base::Exception& e)
02449 {
02450 std::string str;
02451 str += "FreeCAD exception thrown (";
02452 str += e.what();
02453 str += ")";
02454 e.ReportException();
02455 PyErr_SetString(PyExc_Exception,str.c_str());
02456 return NULL;
02457 }
02458 catch(const boost::filesystem::filesystem_error& e)
02459 {
02460 std::string str;
02461 str += "File system exception thrown (";
02462
02463
02464 str += e.what();
02465 str += ")\n";
02466 Base::Console().Error(str.c_str());
02467 PyErr_SetString(PyExc_Exception,str.c_str());
02468 return NULL;
02469 }
02470 catch(const Py::Exception&)
02471 {
02472
02473 return NULL;
02474 }
02475 catch(const char* e)
02476 {
02477 Base::Console().Error(e);
02478 PyErr_SetString(PyExc_Exception,e);
02479 return NULL;
02480 }
02481
02482 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02483 catch(const std::exception& e)
02484 {
02485 std::string str;
02486 str += "FC++ exception thrown (";
02487 str += e.what();
02488 str += ")";
02489 Base::Console().Error(str.c_str());
02490 PyErr_SetString(PyExc_Exception,str.c_str());
02491 return NULL;
02492 }
02493 catch(...)
02494 {
02495 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02496 return NULL;
02497 }
02498 #endif
02499 }
02500
02501
02502
02503
02504 PyObject * BSplineCurvePy::staticCallback_buildFromPoles (PyObject *self, PyObject *args)
02505 {
02506
02507 if (!((PyObjectBase*) self)->isValid()){
02508 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02509 return NULL;
02510 }
02511
02512
02513 if (((PyObjectBase*) self)->isConst()){
02514 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02515 return NULL;
02516 }
02517
02518 try {
02519 PyObject* ret = ((BSplineCurvePy*)self)->buildFromPoles(args);
02520 if (ret != 0)
02521 ((BSplineCurvePy*)self)->startNotify();
02522 return ret;
02523 }
02524 catch(const Base::Exception& e)
02525 {
02526 std::string str;
02527 str += "FreeCAD exception thrown (";
02528 str += e.what();
02529 str += ")";
02530 e.ReportException();
02531 PyErr_SetString(PyExc_Exception,str.c_str());
02532 return NULL;
02533 }
02534 catch(const boost::filesystem::filesystem_error& e)
02535 {
02536 std::string str;
02537 str += "File system exception thrown (";
02538
02539
02540 str += e.what();
02541 str += ")\n";
02542 Base::Console().Error(str.c_str());
02543 PyErr_SetString(PyExc_Exception,str.c_str());
02544 return NULL;
02545 }
02546 catch(const Py::Exception&)
02547 {
02548
02549 return NULL;
02550 }
02551 catch(const char* e)
02552 {
02553 Base::Console().Error(e);
02554 PyErr_SetString(PyExc_Exception,e);
02555 return NULL;
02556 }
02557
02558 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02559 catch(const std::exception& e)
02560 {
02561 std::string str;
02562 str += "FC++ exception thrown (";
02563 str += e.what();
02564 str += ")";
02565 Base::Console().Error(str.c_str());
02566 PyErr_SetString(PyExc_Exception,str.c_str());
02567 return NULL;
02568 }
02569 catch(...)
02570 {
02571 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02572 return NULL;
02573 }
02574 #endif
02575 }
02576
02577
02578
02579
02580 PyObject * BSplineCurvePy::staticCallback_toBezier (PyObject *self, PyObject *args)
02581 {
02582
02583 if (!((PyObjectBase*) self)->isValid()){
02584 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02585 return NULL;
02586 }
02587
02588
02589 if (((PyObjectBase*) self)->isConst()){
02590 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02591 return NULL;
02592 }
02593
02594 try {
02595 PyObject* ret = ((BSplineCurvePy*)self)->toBezier(args);
02596 if (ret != 0)
02597 ((BSplineCurvePy*)self)->startNotify();
02598 return ret;
02599 }
02600 catch(const Base::Exception& e)
02601 {
02602 std::string str;
02603 str += "FreeCAD exception thrown (";
02604 str += e.what();
02605 str += ")";
02606 e.ReportException();
02607 PyErr_SetString(PyExc_Exception,str.c_str());
02608 return NULL;
02609 }
02610 catch(const boost::filesystem::filesystem_error& e)
02611 {
02612 std::string str;
02613 str += "File system exception thrown (";
02614
02615
02616 str += e.what();
02617 str += ")\n";
02618 Base::Console().Error(str.c_str());
02619 PyErr_SetString(PyExc_Exception,str.c_str());
02620 return NULL;
02621 }
02622 catch(const Py::Exception&)
02623 {
02624
02625 return NULL;
02626 }
02627 catch(const char* e)
02628 {
02629 Base::Console().Error(e);
02630 PyErr_SetString(PyExc_Exception,e);
02631 return NULL;
02632 }
02633
02634 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02635 catch(const std::exception& e)
02636 {
02637 std::string str;
02638 str += "FC++ exception thrown (";
02639 str += e.what();
02640 str += ")";
02641 Base::Console().Error(str.c_str());
02642 PyErr_SetString(PyExc_Exception,str.c_str());
02643 return NULL;
02644 }
02645 catch(...)
02646 {
02647 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02648 return NULL;
02649 }
02650 #endif
02651 }
02652
02653
02654
02655
02656 PyObject * BSplineCurvePy::staticCallback_join (PyObject *self, PyObject *args)
02657 {
02658
02659 if (!((PyObjectBase*) self)->isValid()){
02660 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02661 return NULL;
02662 }
02663
02664
02665 if (((PyObjectBase*) self)->isConst()){
02666 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02667 return NULL;
02668 }
02669
02670 try {
02671 PyObject* ret = ((BSplineCurvePy*)self)->join(args);
02672 if (ret != 0)
02673 ((BSplineCurvePy*)self)->startNotify();
02674 return ret;
02675 }
02676 catch(const Base::Exception& e)
02677 {
02678 std::string str;
02679 str += "FreeCAD exception thrown (";
02680 str += e.what();
02681 str += ")";
02682 e.ReportException();
02683 PyErr_SetString(PyExc_Exception,str.c_str());
02684 return NULL;
02685 }
02686 catch(const boost::filesystem::filesystem_error& e)
02687 {
02688 std::string str;
02689 str += "File system exception thrown (";
02690
02691
02692 str += e.what();
02693 str += ")\n";
02694 Base::Console().Error(str.c_str());
02695 PyErr_SetString(PyExc_Exception,str.c_str());
02696 return NULL;
02697 }
02698 catch(const Py::Exception&)
02699 {
02700
02701 return NULL;
02702 }
02703 catch(const char* e)
02704 {
02705 Base::Console().Error(e);
02706 PyErr_SetString(PyExc_Exception,e);
02707 return NULL;
02708 }
02709
02710 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02711 catch(const std::exception& e)
02712 {
02713 std::string str;
02714 str += "FC++ exception thrown (";
02715 str += e.what();
02716 str += ")";
02717 Base::Console().Error(str.c_str());
02718 PyErr_SetString(PyExc_Exception,str.c_str());
02719 return NULL;
02720 }
02721 catch(...)
02722 {
02723 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02724 return NULL;
02725 }
02726 #endif
02727 }
02728
02729
02730
02731
02732 PyObject * BSplineCurvePy::staticCallback_makeC1Continuous (PyObject *self, PyObject *args)
02733 {
02734
02735 if (!((PyObjectBase*) self)->isValid()){
02736 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02737 return NULL;
02738 }
02739
02740
02741 if (((PyObjectBase*) self)->isConst()){
02742 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02743 return NULL;
02744 }
02745
02746 try {
02747 PyObject* ret = ((BSplineCurvePy*)self)->makeC1Continuous(args);
02748 if (ret != 0)
02749 ((BSplineCurvePy*)self)->startNotify();
02750 return ret;
02751 }
02752 catch(const Base::Exception& e)
02753 {
02754 std::string str;
02755 str += "FreeCAD exception thrown (";
02756 str += e.what();
02757 str += ")";
02758 e.ReportException();
02759 PyErr_SetString(PyExc_Exception,str.c_str());
02760 return NULL;
02761 }
02762 catch(const boost::filesystem::filesystem_error& e)
02763 {
02764 std::string str;
02765 str += "File system exception thrown (";
02766
02767
02768 str += e.what();
02769 str += ")\n";
02770 Base::Console().Error(str.c_str());
02771 PyErr_SetString(PyExc_Exception,str.c_str());
02772 return NULL;
02773 }
02774 catch(const Py::Exception&)
02775 {
02776
02777 return NULL;
02778 }
02779 catch(const char* e)
02780 {
02781 Base::Console().Error(e);
02782 PyErr_SetString(PyExc_Exception,e);
02783 return NULL;
02784 }
02785
02786 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02787 catch(const std::exception& e)
02788 {
02789 std::string str;
02790 str += "FC++ exception thrown (";
02791 str += e.what();
02792 str += ")";
02793 Base::Console().Error(str.c_str());
02794 PyErr_SetString(PyExc_Exception,str.c_str());
02795 return NULL;
02796 }
02797 catch(...)
02798 {
02799 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02800 return NULL;
02801 }
02802 #endif
02803 }
02804
02805
02806
02807
02808 PyObject * BSplineCurvePy::staticCallback_getDegree (PyObject *self, void * )
02809 {
02810 if (!((PyObjectBase*) self)->isValid()){
02811 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02812 return NULL;
02813 }
02814
02815 try {
02816 return Py::new_reference_to(((BSplineCurvePy*)self)->getDegree());
02817 } catch (const Py::Exception&) {
02818
02819 return NULL;
02820 } catch (...) {
02821 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Degree' of object 'GeomBSplineCurve'");
02822 return NULL;
02823 }
02824 }
02825
02826 int BSplineCurvePy::staticCallback_setDegree (PyObject *self, PyObject * , void * )
02827 {
02828 if (!((PyObjectBase*) self)->isValid()){
02829 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02830 return -1;
02831 }
02832
02833 PyErr_SetString(PyExc_AttributeError, "Attribute 'Degree' of object 'GeomBSplineCurve' is read-only");
02834 return -1;
02835 }
02836
02837
02838
02839
02840 PyObject * BSplineCurvePy::staticCallback_getMaxDegree (PyObject *self, void * )
02841 {
02842 if (!((PyObjectBase*) self)->isValid()){
02843 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02844 return NULL;
02845 }
02846
02847 try {
02848 return Py::new_reference_to(((BSplineCurvePy*)self)->getMaxDegree());
02849 } catch (const Py::Exception&) {
02850
02851 return NULL;
02852 } catch (...) {
02853 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'MaxDegree' of object 'GeomBSplineCurve'");
02854 return NULL;
02855 }
02856 }
02857
02858 int BSplineCurvePy::staticCallback_setMaxDegree (PyObject *self, PyObject * , void * )
02859 {
02860 if (!((PyObjectBase*) self)->isValid()){
02861 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02862 return -1;
02863 }
02864
02865 PyErr_SetString(PyExc_AttributeError, "Attribute 'MaxDegree' of object 'GeomBSplineCurve' is read-only");
02866 return -1;
02867 }
02868
02869
02870
02871
02872 PyObject * BSplineCurvePy::staticCallback_getNbPoles (PyObject *self, void * )
02873 {
02874 if (!((PyObjectBase*) self)->isValid()){
02875 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02876 return NULL;
02877 }
02878
02879 try {
02880 return Py::new_reference_to(((BSplineCurvePy*)self)->getNbPoles());
02881 } catch (const Py::Exception&) {
02882
02883 return NULL;
02884 } catch (...) {
02885 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'NbPoles' of object 'GeomBSplineCurve'");
02886 return NULL;
02887 }
02888 }
02889
02890 int BSplineCurvePy::staticCallback_setNbPoles (PyObject *self, PyObject * , void * )
02891 {
02892 if (!((PyObjectBase*) self)->isValid()){
02893 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02894 return -1;
02895 }
02896
02897 PyErr_SetString(PyExc_AttributeError, "Attribute 'NbPoles' of object 'GeomBSplineCurve' is read-only");
02898 return -1;
02899 }
02900
02901
02902
02903
02904 PyObject * BSplineCurvePy::staticCallback_getNbKnots (PyObject *self, void * )
02905 {
02906 if (!((PyObjectBase*) self)->isValid()){
02907 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02908 return NULL;
02909 }
02910
02911 try {
02912 return Py::new_reference_to(((BSplineCurvePy*)self)->getNbKnots());
02913 } catch (const Py::Exception&) {
02914
02915 return NULL;
02916 } catch (...) {
02917 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'NbKnots' of object 'GeomBSplineCurve'");
02918 return NULL;
02919 }
02920 }
02921
02922 int BSplineCurvePy::staticCallback_setNbKnots (PyObject *self, PyObject * , void * )
02923 {
02924 if (!((PyObjectBase*) self)->isValid()){
02925 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02926 return -1;
02927 }
02928
02929 PyErr_SetString(PyExc_AttributeError, "Attribute 'NbKnots' of object 'GeomBSplineCurve' is read-only");
02930 return -1;
02931 }
02932
02933
02934
02935
02936 PyObject * BSplineCurvePy::staticCallback_getStartPoint (PyObject *self, void * )
02937 {
02938 if (!((PyObjectBase*) self)->isValid()){
02939 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02940 return NULL;
02941 }
02942
02943 try {
02944 return Py::new_reference_to(((BSplineCurvePy*)self)->getStartPoint());
02945 } catch (const Py::Exception&) {
02946
02947 return NULL;
02948 } catch (...) {
02949 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'StartPoint' of object 'GeomBSplineCurve'");
02950 return NULL;
02951 }
02952 }
02953
02954 int BSplineCurvePy::staticCallback_setStartPoint (PyObject *self, PyObject * , void * )
02955 {
02956 if (!((PyObjectBase*) self)->isValid()){
02957 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02958 return -1;
02959 }
02960
02961 PyErr_SetString(PyExc_AttributeError, "Attribute 'StartPoint' of object 'GeomBSplineCurve' is read-only");
02962 return -1;
02963 }
02964
02965
02966
02967
02968 PyObject * BSplineCurvePy::staticCallback_getEndPoint (PyObject *self, void * )
02969 {
02970 if (!((PyObjectBase*) self)->isValid()){
02971 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02972 return NULL;
02973 }
02974
02975 try {
02976 return Py::new_reference_to(((BSplineCurvePy*)self)->getEndPoint());
02977 } catch (const Py::Exception&) {
02978
02979 return NULL;
02980 } catch (...) {
02981 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'EndPoint' of object 'GeomBSplineCurve'");
02982 return NULL;
02983 }
02984 }
02985
02986 int BSplineCurvePy::staticCallback_setEndPoint (PyObject *self, PyObject * , void * )
02987 {
02988 if (!((PyObjectBase*) self)->isValid()){
02989 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02990 return -1;
02991 }
02992
02993 PyErr_SetString(PyExc_AttributeError, "Attribute 'EndPoint' of object 'GeomBSplineCurve' is read-only");
02994 return -1;
02995 }
02996
02997
02998
02999
03000 PyObject * BSplineCurvePy::staticCallback_getFirstUKnotIndex (PyObject *self, void * )
03001 {
03002 if (!((PyObjectBase*) self)->isValid()){
03003 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03004 return NULL;
03005 }
03006
03007 try {
03008 return Py::new_reference_to(((BSplineCurvePy*)self)->getFirstUKnotIndex());
03009 } catch (const Py::Exception&) {
03010
03011 return NULL;
03012 } catch (...) {
03013 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'FirstUKnotIndex' of object 'GeomBSplineCurve'");
03014 return NULL;
03015 }
03016 }
03017
03018 int BSplineCurvePy::staticCallback_setFirstUKnotIndex (PyObject *self, PyObject * , void * )
03019 {
03020 if (!((PyObjectBase*) self)->isValid()){
03021 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03022 return -1;
03023 }
03024
03025 PyErr_SetString(PyExc_AttributeError, "Attribute 'FirstUKnotIndex' of object 'GeomBSplineCurve' is read-only");
03026 return -1;
03027 }
03028
03029
03030
03031
03032 PyObject * BSplineCurvePy::staticCallback_getLastUKnotIndex (PyObject *self, void * )
03033 {
03034 if (!((PyObjectBase*) self)->isValid()){
03035 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03036 return NULL;
03037 }
03038
03039 try {
03040 return Py::new_reference_to(((BSplineCurvePy*)self)->getLastUKnotIndex());
03041 } catch (const Py::Exception&) {
03042
03043 return NULL;
03044 } catch (...) {
03045 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'LastUKnotIndex' of object 'GeomBSplineCurve'");
03046 return NULL;
03047 }
03048 }
03049
03050 int BSplineCurvePy::staticCallback_setLastUKnotIndex (PyObject *self, PyObject * , void * )
03051 {
03052 if (!((PyObjectBase*) self)->isValid()){
03053 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03054 return -1;
03055 }
03056
03057 PyErr_SetString(PyExc_AttributeError, "Attribute 'LastUKnotIndex' of object 'GeomBSplineCurve' is read-only");
03058 return -1;
03059 }
03060
03061
03062
03063
03064 PyObject * BSplineCurvePy::staticCallback_getKnotSequence (PyObject *self, void * )
03065 {
03066 if (!((PyObjectBase*) self)->isValid()){
03067 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03068 return NULL;
03069 }
03070
03071 try {
03072 return Py::new_reference_to(((BSplineCurvePy*)self)->getKnotSequence());
03073 } catch (const Py::Exception&) {
03074
03075 return NULL;
03076 } catch (...) {
03077 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'KnotSequence' of object 'GeomBSplineCurve'");
03078 return NULL;
03079 }
03080 }
03081
03082 int BSplineCurvePy::staticCallback_setKnotSequence (PyObject *self, PyObject * , void * )
03083 {
03084 if (!((PyObjectBase*) self)->isValid()){
03085 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03086 return -1;
03087 }
03088
03089 PyErr_SetString(PyExc_AttributeError, "Attribute 'KnotSequence' of object 'GeomBSplineCurve' is read-only");
03090 return -1;
03091 }
03092
03093
03094
03095
03096
03097
03098 PyParentObject BSplineCurvePy::Parents[] = { PARENTSPartBSplineCurvePy };
03099
03100
03101
03102
03103 BSplineCurvePy::BSplineCurvePy(GeomBSplineCurve *pcObject, PyTypeObject *T)
03104 : GeometryCurvePy(reinterpret_cast<GeometryCurvePy::PointerType>(pcObject), T)
03105 {
03106 }
03107
03108
03109
03110
03111
03112 BSplineCurvePy::~BSplineCurvePy()
03113 {
03114 }
03115
03116
03117
03118
03119 PyObject *BSplineCurvePy::_repr(void)
03120 {
03121 return Py_BuildValue("s", representation().c_str());
03122 }
03123
03124
03125
03126
03127 PyObject *BSplineCurvePy::_getattr(char *attr)
03128 {
03129 try {
03130
03131 PyObject *r = getCustomAttributes(attr);
03132 if(r) return r;
03133 }
03134 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03135 catch(const Base::Exception& e)
03136 {
03137 std::string str;
03138 str += "FreeCAD exception thrown (";
03139 str += e.what();
03140 str += ")";
03141 e.ReportException();
03142 PyErr_SetString(PyExc_Exception,str.c_str());
03143 return NULL;
03144 }
03145 catch(const std::exception& e)
03146 {
03147 std::string str;
03148 str += "FC++ exception thrown (";
03149 str += e.what();
03150 str += ")";
03151 Base::Console().Error(str.c_str());
03152 PyErr_SetString(PyExc_Exception,str.c_str());
03153 return NULL;
03154 }
03155 catch(const Py::Exception&)
03156 {
03157
03158 return NULL;
03159 }
03160 catch(...)
03161 {
03162 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03163 return NULL;
03164 }
03165 #else // DONT_CATCH_CXX_EXCEPTIONS
03166 catch(const Base::Exception& e)
03167 {
03168 std::string str;
03169 str += "FreeCAD exception thrown (";
03170 str += e.what();
03171 str += ")";
03172 e.ReportException();
03173 PyErr_SetString(PyExc_Exception,str.c_str());
03174 return NULL;
03175 }
03176 catch(const Py::Exception&)
03177 {
03178
03179 return NULL;
03180 }
03181 #endif // DONT_CATCH_CXX_EXCEPTIONS
03182
03183 PyObject *rvalue = Py_FindMethod(Methods, this, attr);
03184 if (rvalue == NULL)
03185 {
03186 PyErr_Clear();
03187 return GeometryCurvePy::_getattr(attr);
03188 }
03189 else
03190 {
03191 return rvalue;
03192 }
03193 }
03194
03195 int BSplineCurvePy::_setattr(char *attr, PyObject *value)
03196 {
03197 try {
03198
03199 int r = setCustomAttributes(attr, value);
03200 if(r==1) return 0;
03201 }
03202 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03203 catch(const Base::Exception& e)
03204 {
03205 std::string str;
03206 str += "FreeCAD exception thrown (";
03207 str += e.what();
03208 str += ")";
03209 e.ReportException();
03210 PyErr_SetString(PyExc_Exception,str.c_str());
03211 return -1;
03212 }
03213 catch(const std::exception& e)
03214 {
03215 std::string str;
03216 str += "FC++ exception thrown (";
03217 str += e.what();
03218 str += ")";
03219 Base::Console().Error(str.c_str());
03220 PyErr_SetString(PyExc_Exception,str.c_str());
03221 return -1;
03222 }
03223 catch(const Py::Exception&)
03224 {
03225
03226 return -1;
03227 }
03228 catch(...)
03229 {
03230 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03231 return -1;
03232 }
03233 #else // DONT_CATCH_CXX_EXCEPTIONS
03234 catch(const Base::Exception& e)
03235 {
03236 std::string str;
03237 str += "FreeCAD exception thrown (";
03238 str += e.what();
03239 str += ")";
03240 e.ReportException();
03241 PyErr_SetString(PyExc_Exception,str.c_str());
03242 return -1;
03243 }
03244 catch(const Py::Exception&)
03245 {
03246
03247 return -1;
03248 }
03249 #endif // DONT_CATCH_CXX_EXCEPTIONS
03250
03251 return GeometryCurvePy::_setattr(attr, value);
03252 }
03253
03254 GeomBSplineCurve *BSplineCurvePy::getGeomBSplineCurvePtr(void) const
03255 {
03256 return static_cast<GeomBSplineCurve *>(_pcTwinPointer);
03257 }
03258
03259 #if 0
03260
03261
03262
03263
03264 PyObject *BSplineCurvePy::PyMake(struct _typeobject *, PyObject *, PyObject *)
03265 {
03266
03267 return new BSplineCurvePy(new GeomBSplineCurve);
03268 }
03269
03270
03271 int BSplineCurvePy::PyInit(PyObject* , PyObject* )
03272 {
03273 return 0;
03274 }
03275
03276
03277 std::string BSplineCurvePy::representation(void) const
03278 {
03279 return std::string("<GeomBSplineCurve object>");
03280 }
03281
03282 PyObject* BSplineCurvePy::isRational(PyObject *args)
03283 {
03284 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03285 return 0;
03286 }
03287
03288 PyObject* BSplineCurvePy::isPeriodic(PyObject *args)
03289 {
03290 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03291 return 0;
03292 }
03293
03294 PyObject* BSplineCurvePy::isClosed(PyObject *args)
03295 {
03296 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03297 return 0;
03298 }
03299
03300 PyObject* BSplineCurvePy::increaseDegree(PyObject *args)
03301 {
03302 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03303 return 0;
03304 }
03305
03306 PyObject* BSplineCurvePy::increaseMultiplicity(PyObject *args)
03307 {
03308 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03309 return 0;
03310 }
03311
03312 PyObject* BSplineCurvePy::incrementMultiplicity(PyObject *args)
03313 {
03314 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03315 return 0;
03316 }
03317
03318 PyObject* BSplineCurvePy::insertKnot(PyObject *args)
03319 {
03320 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03321 return 0;
03322 }
03323
03324 PyObject* BSplineCurvePy::insertKnots(PyObject *args)
03325 {
03326 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03327 return 0;
03328 }
03329
03330 PyObject* BSplineCurvePy::removeKnot(PyObject *args)
03331 {
03332 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03333 return 0;
03334 }
03335
03336 PyObject* BSplineCurvePy::segment(PyObject *args)
03337 {
03338 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03339 return 0;
03340 }
03341
03342 PyObject* BSplineCurvePy::setKnot(PyObject *args)
03343 {
03344 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03345 return 0;
03346 }
03347
03348 PyObject* BSplineCurvePy::getKnot(PyObject *args)
03349 {
03350 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03351 return 0;
03352 }
03353
03354 PyObject* BSplineCurvePy::setKnots(PyObject *args)
03355 {
03356 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03357 return 0;
03358 }
03359
03360 PyObject* BSplineCurvePy::getKnots(PyObject *args)
03361 {
03362 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03363 return 0;
03364 }
03365
03366 PyObject* BSplineCurvePy::setPole(PyObject *args)
03367 {
03368 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03369 return 0;
03370 }
03371
03372 PyObject* BSplineCurvePy::getPole(PyObject *args)
03373 {
03374 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03375 return 0;
03376 }
03377
03378 PyObject* BSplineCurvePy::getPoles(PyObject *args)
03379 {
03380 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03381 return 0;
03382 }
03383
03384 PyObject* BSplineCurvePy::setWeight(PyObject *args)
03385 {
03386 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03387 return 0;
03388 }
03389
03390 PyObject* BSplineCurvePy::getWeight(PyObject *args)
03391 {
03392 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03393 return 0;
03394 }
03395
03396 PyObject* BSplineCurvePy::getWeights(PyObject *args)
03397 {
03398 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03399 return 0;
03400 }
03401
03402 PyObject* BSplineCurvePy::getResolution(PyObject *args)
03403 {
03404 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03405 return 0;
03406 }
03407
03408 PyObject* BSplineCurvePy::movePoint(PyObject *args)
03409 {
03410 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03411 return 0;
03412 }
03413
03414 PyObject* BSplineCurvePy::setNotPeriodic(PyObject *args)
03415 {
03416 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03417 return 0;
03418 }
03419
03420 PyObject* BSplineCurvePy::setPeriodic(PyObject *args)
03421 {
03422 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03423 return 0;
03424 }
03425
03426 PyObject* BSplineCurvePy::setOrigin(PyObject *args)
03427 {
03428 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03429 return 0;
03430 }
03431
03432 PyObject* BSplineCurvePy::getMultiplicity(PyObject *args)
03433 {
03434 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03435 return 0;
03436 }
03437
03438 PyObject* BSplineCurvePy::getMultiplicities(PyObject *args)
03439 {
03440 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03441 return 0;
03442 }
03443
03444 PyObject* BSplineCurvePy::approximate(PyObject *args)
03445 {
03446 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03447 return 0;
03448 }
03449
03450 PyObject* BSplineCurvePy::interpolate(PyObject *args)
03451 {
03452 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03453 return 0;
03454 }
03455
03456 PyObject* BSplineCurvePy::buildFromPoles(PyObject *args)
03457 {
03458 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03459 return 0;
03460 }
03461
03462 PyObject* BSplineCurvePy::toBezier(PyObject *args)
03463 {
03464 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03465 return 0;
03466 }
03467
03468 PyObject* BSplineCurvePy::join(PyObject *args)
03469 {
03470 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03471 return 0;
03472 }
03473
03474 PyObject* BSplineCurvePy::makeC1Continuous(PyObject *args)
03475 {
03476 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
03477 return 0;
03478 }
03479
03480
03481
03482 Py::Int BSplineCurvePy::getDegree(void) const
03483 {
03484
03485 throw Py::AttributeError("Not yet implemented");
03486 }
03487
03488 Py::Int BSplineCurvePy::getMaxDegree(void) const
03489 {
03490
03491 throw Py::AttributeError("Not yet implemented");
03492 }
03493
03494 Py::Int BSplineCurvePy::getNbPoles(void) const
03495 {
03496
03497 throw Py::AttributeError("Not yet implemented");
03498 }
03499
03500 Py::Int BSplineCurvePy::getNbKnots(void) const
03501 {
03502
03503 throw Py::AttributeError("Not yet implemented");
03504 }
03505
03506 Py::Object BSplineCurvePy::getStartPoint(void) const
03507 {
03508
03509 throw Py::AttributeError("Not yet implemented");
03510 }
03511
03512 Py::Object BSplineCurvePy::getEndPoint(void) const
03513 {
03514
03515 throw Py::AttributeError("Not yet implemented");
03516 }
03517
03518 Py::Object BSplineCurvePy::getFirstUKnotIndex(void) const
03519 {
03520
03521 throw Py::AttributeError("Not yet implemented");
03522 }
03523
03524 Py::Object BSplineCurvePy::getLastUKnotIndex(void) const
03525 {
03526
03527 throw Py::AttributeError("Not yet implemented");
03528 }
03529
03530 Py::List BSplineCurvePy::getKnotSequence(void) const
03531 {
03532
03533 throw Py::AttributeError("Not yet implemented");
03534 }
03535
03536 PyObject *BSplineCurvePy::getCustomAttributes(const char* attr) const
03537 {
03538 return 0;
03539 }
03540
03541 int BSplineCurvePy::setCustomAttributes(const char* attr, PyObject *obj)
03542 {
03543 return 0;
03544 }
03545 #endif
03546
03547
03548