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 TopoShapePy::Type = {
00021 PyObject_HEAD_INIT(&PyType_Type)
00022 0,
00023 "Part.TopoShape",
00024 sizeof(TopoShapePy),
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 "TopoShape is the OpenCasCade topological shape wrapper.\n"
00046 "Sub-elements such as vertices, edges or faces are accessible as:\n"
00047 "* Vertex#, where # is in range(1, number of vertices)\n"
00048 "* Edge#, where # is in range(1, number of edges)\n"
00049 "* Face#, where # is in range(1, number of faces)",
00050 0,
00051 0,
00052 0,
00053 0,
00054 0,
00055 0,
00056 Part::TopoShapePy::Methods,
00057 0,
00058 Part::TopoShapePy::GetterSetter,
00059 &Data::ComplexGeoDataPy::Type,
00060 0,
00061 0,
00062 0,
00063 0,
00064 __PyInit,
00065 0,
00066 Part::TopoShapePy::PyMake,
00067 0,
00068 0,
00069 0,
00070 0,
00071 0,
00072 0,
00073 0,
00074 0
00075 };
00076
00078 PyMethodDef TopoShapePy::Methods[] = {
00079 {"read",
00080 (PyCFunction) staticCallback_read,
00081 METH_VARARGS,
00082 "Read in an IGES, STEP or BREP file."
00083 },
00084 {"writeInventor",
00085 (PyCFunction) staticCallback_writeInventor,
00086 METH_VARARGS,
00087 "Write the mesh in OpenInventor format to a string."
00088 },
00089 {"exportIges",
00090 (PyCFunction) staticCallback_exportIges,
00091 METH_VARARGS,
00092 "Export the content of this shape to an IGES file."
00093 },
00094 {"exportStep",
00095 (PyCFunction) staticCallback_exportStep,
00096 METH_VARARGS,
00097 "Export the content of this shape to an STEP file."
00098 },
00099 {"exportBrep",
00100 (PyCFunction) staticCallback_exportBrep,
00101 METH_VARARGS,
00102 "Export the content of this shape to an BREP file. BREP is a CasCade native format."
00103 },
00104 {"exportStl",
00105 (PyCFunction) staticCallback_exportStl,
00106 METH_VARARGS,
00107 "Export the content of this shape to an STL mesh file."
00108 },
00109 {"extrude",
00110 (PyCFunction) staticCallback_extrude,
00111 METH_VARARGS,
00112 "Extrude the shape along a direction."
00113 },
00114 {"revolve",
00115 (PyCFunction) staticCallback_revolve,
00116 METH_VARARGS,
00117 "Revolve the shape around a Axis to a given degree.\nPart.revolve(Vector(0,0,0),Vector(0,0,1),360) - revolves the shape around the Z Axis 360 degree. \n "
00118 },
00119 {"check",
00120 (PyCFunction) staticCallback_check,
00121 METH_VARARGS,
00122 "Checks the shape and report errors in the shape structure.\nThis is a more detailed check as done in isValid()."
00123 },
00124 {"fuse",
00125 (PyCFunction) staticCallback_fuse,
00126 METH_VARARGS,
00127 "Union of this and a given topo shape."
00128 },
00129 {"oldFuse",
00130 (PyCFunction) staticCallback_oldFuse,
00131 METH_VARARGS,
00132 "Union of this and a given topo shape (old algorithm)."
00133 },
00134 {"common",
00135 (PyCFunction) staticCallback_common,
00136 METH_VARARGS,
00137 "Intersection of this and a given topo shape."
00138 },
00139 {"section",
00140 (PyCFunction) staticCallback_section,
00141 METH_VARARGS,
00142 "Section of this with a given topo shape."
00143 },
00144 {"slices",
00145 (PyCFunction) staticCallback_slices,
00146 METH_VARARGS,
00147 "Make slices of this shape."
00148 },
00149 {"slice",
00150 (PyCFunction) staticCallback_slice,
00151 METH_VARARGS,
00152 "Make single slice of this shape."
00153 },
00154 {"cut",
00155 (PyCFunction) staticCallback_cut,
00156 METH_VARARGS,
00157 "Difference of this and a given topo shape."
00158 },
00159 {"sewShape",
00160 (PyCFunction) staticCallback_sewShape,
00161 METH_VARARGS,
00162 "Sew the shape if there is a gap."
00163 },
00164 {"removeInternalWires",
00165 (PyCFunction) staticCallback_removeInternalWires,
00166 METH_VARARGS,
00167 "Removes internal wires (also holes) from the shape."
00168 },
00169 {"mirror",
00170 (PyCFunction) staticCallback_mirror,
00171 METH_VARARGS,
00172 "Mirror this shape on a given plane.\nThe plane is given with its base point and its normal direction."
00173 },
00174 {"transformGeometry",
00175 (PyCFunction) staticCallback_transformGeometry,
00176 METH_VARARGS,
00177 "Apply geometric transformation on a copy of the shape.\nThe transformation to be applied is defined as a 4x4 matrix.\nThe underlying geometry of the following shapes may change:\n- a curve which supports an edge of the shape, or\n- a surface which supports a face of the shape;\n\nFor example, a circle may be transformed into an ellipse when\napplying an affinity transformation. It may also happen that\nthe circle then is represented as a b-spline curve.\n\nThe transformation is applied to:\n- all the curves which support edges of the shape, and\n- all the surfaces which support faces of the shape.\n\nNote: If you want to transform a shape without changing the\nunderlying geometry then use the methods translate or rotate.\n"
00178 },
00179 {"transformShape",
00180 (PyCFunction) staticCallback_transformShape,
00181 METH_VARARGS,
00182 "Apply transformation on a shape without changing\nthe underlying geometry."
00183 },
00184 {"translate",
00185 (PyCFunction) staticCallback_translate,
00186 METH_VARARGS,
00187 "Apply the translation to the current location of this shape."
00188 },
00189 {"rotate",
00190 (PyCFunction) staticCallback_rotate,
00191 METH_VARARGS,
00192 "\n Apply the rotation (degree) to the current location of this shape\n Shp.rotate(Vector(0,0,0),Vector(0,0,1),180) - rotate the shape around the Z Axis 180 degrees.\n "
00193 },
00194 {"scale",
00195 (PyCFunction) staticCallback_scale,
00196 METH_VARARGS,
00197 "Apply scaling with point and factor to this shape."
00198 },
00199 {"makeFillet",
00200 (PyCFunction) staticCallback_makeFillet,
00201 METH_VARARGS,
00202 "Make fillet."
00203 },
00204 {"makeChamfer",
00205 (PyCFunction) staticCallback_makeChamfer,
00206 METH_VARARGS,
00207 "Make chamfer."
00208 },
00209 {"makeThickness",
00210 (PyCFunction) staticCallback_makeThickness,
00211 METH_VARARGS,
00212 "A hollowed solid is built from an initial solid and a set of faces on this solid,\nwhich are to be removed. The remaining faces of the solid become the walls of\nthe hollowed solid, their thickness defined at the time of construction."
00213 },
00214 {"makeOffsetShape",
00215 (PyCFunction) staticCallback_makeOffsetShape,
00216 METH_VARARGS,
00217 "Offset a given shape"
00218 },
00219 {"reverse",
00220 (PyCFunction) staticCallback_reverse,
00221 METH_VARARGS,
00222 "Reverses the orientation of this shape."
00223 },
00224 {"complement",
00225 (PyCFunction) staticCallback_complement,
00226 METH_VARARGS,
00227 "Computes the complement of the orientation of this shape,\ni.e. reverses the interior/exterior status of boundaries of this shape."
00228 },
00229 {"nullify",
00230 (PyCFunction) staticCallback_nullify,
00231 METH_VARARGS,
00232 "Destroys the reference to the underlying shape stored in this shape.\nAs a result, this shape becomes null."
00233 },
00234 {"isClosed",
00235 (PyCFunction) staticCallback_isClosed,
00236 METH_VARARGS,
00237 "Checks if the shape is closed."
00238 },
00239 {"isSame",
00240 (PyCFunction) staticCallback_isSame,
00241 METH_VARARGS,
00242 "Checks if both shapes share the same geometry."
00243 },
00244 {"isEqual",
00245 (PyCFunction) staticCallback_isEqual,
00246 METH_VARARGS,
00247 "Checks if both shapes are equal."
00248 },
00249 {"isNull",
00250 (PyCFunction) staticCallback_isNull,
00251 METH_VARARGS,
00252 "Checks if the shape is null."
00253 },
00254 {"isValid",
00255 (PyCFunction) staticCallback_isValid,
00256 METH_VARARGS,
00257 "Checks if the shape is valid, i.e. neither null, nor empty nor corrupted."
00258 },
00259 {"fix",
00260 (PyCFunction) staticCallback_fix,
00261 METH_VARARGS,
00262 "Tries t fix a broken shape. True is returned if the operation succeeded, False otherwise."
00263 },
00264 {"hashCode",
00265 (PyCFunction) staticCallback_hashCode,
00266 METH_VARARGS,
00267 "This value is computed from the value of the underlying shape reference and the location.\nOrientation is not taken into account."
00268 },
00269 {"tessellate",
00270 (PyCFunction) staticCallback_tessellate,
00271 METH_VARARGS,
00272 "Tessellate the the shape and return a list of vertices and face indices"
00273 },
00274 {"project",
00275 (PyCFunction) staticCallback_project,
00276 METH_VARARGS,
00277 "Project a shape on this shape"
00278 },
00279 {"makeShapeFromMesh",
00280 (PyCFunction) staticCallback_makeShapeFromMesh,
00281 METH_VARARGS,
00282 "Make a compund shape out of mesh data.\nNote: This should be used for rather small meshes only."
00283 },
00284 {"toNurbs",
00285 (PyCFunction) staticCallback_toNurbs,
00286 METH_VARARGS,
00287 "Conversion of the complete geometry of a shape into NURBS geometry.\nFor example, all curves supporting edges of the basis shape are converted\ninto BSpline curves, and all surfaces supporting its faces are converted\ninto BSpline surfaces."
00288 },
00289 {"copy",
00290 (PyCFunction) staticCallback_copy,
00291 METH_VARARGS,
00292 "Create a copy of this shape"
00293 },
00294 {"replaceShape",
00295 (PyCFunction) staticCallback_replaceShape,
00296 METH_VARARGS,
00297 "Replace a sub-shape with a new shape and return a new shape.\nThe parameter is in the form list of tuples with the two shapes."
00298 },
00299 {"removeShape",
00300 (PyCFunction) staticCallback_removeShape,
00301 METH_VARARGS,
00302 "Remove a sub-shape and return a new shape.\nThe parameter is a list of shapes."
00303 },
00304 {"isInside",
00305 (PyCFunction) staticCallback_isInside,
00306 METH_VARARGS,
00307 "Checks whether a point is inside or outside a given shape"
00308 },
00309 {NULL, NULL, 0, NULL}
00310 };
00311
00312
00313
00315 PyGetSetDef TopoShapePy::GetterSetter[] = {
00316 {"ShapeType",
00317 (getter) staticCallback_getShapeType,
00318 (setter) staticCallback_setShapeType,
00319 "Returns the type of the shape.",
00320 NULL
00321 },
00322 {"Orientation",
00323 (getter) staticCallback_getOrientation,
00324 (setter) staticCallback_setOrientation,
00325 "Returns the orientation of the shape.",
00326 NULL
00327 },
00328 {"Faces",
00329 (getter) staticCallback_getFaces,
00330 (setter) staticCallback_setFaces,
00331 "List of faces in this shape.",
00332 NULL
00333 },
00334 {"Vertexes",
00335 (getter) staticCallback_getVertexes,
00336 (setter) staticCallback_setVertexes,
00337 "List of vertexes in this shape.",
00338 NULL
00339 },
00340 {"Shells",
00341 (getter) staticCallback_getShells,
00342 (setter) staticCallback_setShells,
00343 "List of subsequent shapes in this shape.",
00344 NULL
00345 },
00346 {"Solids",
00347 (getter) staticCallback_getSolids,
00348 (setter) staticCallback_setSolids,
00349 "List of subsequent shapes in this shape.",
00350 NULL
00351 },
00352 {"CompSolids",
00353 (getter) staticCallback_getCompSolids,
00354 (setter) staticCallback_setCompSolids,
00355 "List of subsequent shapes in this shape.",
00356 NULL
00357 },
00358 {"Edges",
00359 (getter) staticCallback_getEdges,
00360 (setter) staticCallback_setEdges,
00361 "List of Edges in this shape.",
00362 NULL
00363 },
00364 {"Wires",
00365 (getter) staticCallback_getWires,
00366 (setter) staticCallback_setWires,
00367 "List of wires in this shape.",
00368 NULL
00369 },
00370 {"Compounds",
00371 (getter) staticCallback_getCompounds,
00372 (setter) staticCallback_setCompounds,
00373 "List of coumpounds in this shape.",
00374 NULL
00375 },
00376 {"Length",
00377 (getter) staticCallback_getLength,
00378 (setter) staticCallback_setLength,
00379 "Total length of the edges of the shape.",
00380 NULL
00381 },
00382 {"Area",
00383 (getter) staticCallback_getArea,
00384 (setter) staticCallback_setArea,
00385 "Total area of the faces of the shape.",
00386 NULL
00387 },
00388 {"Volume",
00389 (getter) staticCallback_getVolume,
00390 (setter) staticCallback_setVolume,
00391 "Total volume of the solids of the shape.",
00392 NULL
00393 },
00394 {NULL, NULL, NULL, NULL, NULL}
00395 };
00396
00397
00398
00399
00400 PyObject * TopoShapePy::staticCallback_read (PyObject *self, PyObject *args)
00401 {
00402
00403 if (!((PyObjectBase*) self)->isValid()){
00404 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00405 return NULL;
00406 }
00407
00408
00409 if (((PyObjectBase*) self)->isConst()){
00410 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00411 return NULL;
00412 }
00413
00414 try {
00415 PyObject* ret = ((TopoShapePy*)self)->read(args);
00416 if (ret != 0)
00417 ((TopoShapePy*)self)->startNotify();
00418 return ret;
00419 }
00420 catch(const Base::Exception& e)
00421 {
00422 std::string str;
00423 str += "FreeCAD exception thrown (";
00424 str += e.what();
00425 str += ")";
00426 e.ReportException();
00427 PyErr_SetString(PyExc_Exception,str.c_str());
00428 return NULL;
00429 }
00430 catch(const boost::filesystem::filesystem_error& e)
00431 {
00432 std::string str;
00433 str += "File system exception thrown (";
00434
00435
00436 str += e.what();
00437 str += ")\n";
00438 Base::Console().Error(str.c_str());
00439 PyErr_SetString(PyExc_Exception,str.c_str());
00440 return NULL;
00441 }
00442 catch(const Py::Exception&)
00443 {
00444
00445 return NULL;
00446 }
00447 catch(const char* e)
00448 {
00449 Base::Console().Error(e);
00450 PyErr_SetString(PyExc_Exception,e);
00451 return NULL;
00452 }
00453
00454 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00455 catch(const std::exception& e)
00456 {
00457 std::string str;
00458 str += "FC++ exception thrown (";
00459 str += e.what();
00460 str += ")";
00461 Base::Console().Error(str.c_str());
00462 PyErr_SetString(PyExc_Exception,str.c_str());
00463 return NULL;
00464 }
00465 catch(...)
00466 {
00467 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00468 return NULL;
00469 }
00470 #endif
00471 }
00472
00473
00474
00475
00476 PyObject * TopoShapePy::staticCallback_writeInventor (PyObject *self, PyObject *args)
00477 {
00478
00479 if (!((PyObjectBase*) self)->isValid()){
00480 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00481 return NULL;
00482 }
00483
00484
00485 try {
00486 PyObject* ret = ((TopoShapePy*)self)->writeInventor(args);
00487 return ret;
00488 }
00489 catch(const Base::Exception& e)
00490 {
00491 std::string str;
00492 str += "FreeCAD exception thrown (";
00493 str += e.what();
00494 str += ")";
00495 e.ReportException();
00496 PyErr_SetString(PyExc_Exception,str.c_str());
00497 return NULL;
00498 }
00499 catch(const boost::filesystem::filesystem_error& e)
00500 {
00501 std::string str;
00502 str += "File system exception thrown (";
00503
00504
00505 str += e.what();
00506 str += ")\n";
00507 Base::Console().Error(str.c_str());
00508 PyErr_SetString(PyExc_Exception,str.c_str());
00509 return NULL;
00510 }
00511 catch(const Py::Exception&)
00512 {
00513
00514 return NULL;
00515 }
00516 catch(const char* e)
00517 {
00518 Base::Console().Error(e);
00519 PyErr_SetString(PyExc_Exception,e);
00520 return NULL;
00521 }
00522
00523 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00524 catch(const std::exception& e)
00525 {
00526 std::string str;
00527 str += "FC++ exception thrown (";
00528 str += e.what();
00529 str += ")";
00530 Base::Console().Error(str.c_str());
00531 PyErr_SetString(PyExc_Exception,str.c_str());
00532 return NULL;
00533 }
00534 catch(...)
00535 {
00536 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00537 return NULL;
00538 }
00539 #endif
00540 }
00541
00542
00543
00544
00545 PyObject * TopoShapePy::staticCallback_exportIges (PyObject *self, PyObject *args)
00546 {
00547
00548 if (!((PyObjectBase*) self)->isValid()){
00549 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00550 return NULL;
00551 }
00552
00553
00554 try {
00555 PyObject* ret = ((TopoShapePy*)self)->exportIges(args);
00556 return ret;
00557 }
00558 catch(const Base::Exception& e)
00559 {
00560 std::string str;
00561 str += "FreeCAD exception thrown (";
00562 str += e.what();
00563 str += ")";
00564 e.ReportException();
00565 PyErr_SetString(PyExc_Exception,str.c_str());
00566 return NULL;
00567 }
00568 catch(const boost::filesystem::filesystem_error& e)
00569 {
00570 std::string str;
00571 str += "File system exception thrown (";
00572
00573
00574 str += e.what();
00575 str += ")\n";
00576 Base::Console().Error(str.c_str());
00577 PyErr_SetString(PyExc_Exception,str.c_str());
00578 return NULL;
00579 }
00580 catch(const Py::Exception&)
00581 {
00582
00583 return NULL;
00584 }
00585 catch(const char* e)
00586 {
00587 Base::Console().Error(e);
00588 PyErr_SetString(PyExc_Exception,e);
00589 return NULL;
00590 }
00591
00592 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00593 catch(const std::exception& e)
00594 {
00595 std::string str;
00596 str += "FC++ exception thrown (";
00597 str += e.what();
00598 str += ")";
00599 Base::Console().Error(str.c_str());
00600 PyErr_SetString(PyExc_Exception,str.c_str());
00601 return NULL;
00602 }
00603 catch(...)
00604 {
00605 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00606 return NULL;
00607 }
00608 #endif
00609 }
00610
00611
00612
00613
00614 PyObject * TopoShapePy::staticCallback_exportStep (PyObject *self, PyObject *args)
00615 {
00616
00617 if (!((PyObjectBase*) self)->isValid()){
00618 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00619 return NULL;
00620 }
00621
00622
00623 try {
00624 PyObject* ret = ((TopoShapePy*)self)->exportStep(args);
00625 return ret;
00626 }
00627 catch(const Base::Exception& e)
00628 {
00629 std::string str;
00630 str += "FreeCAD exception thrown (";
00631 str += e.what();
00632 str += ")";
00633 e.ReportException();
00634 PyErr_SetString(PyExc_Exception,str.c_str());
00635 return NULL;
00636 }
00637 catch(const boost::filesystem::filesystem_error& e)
00638 {
00639 std::string str;
00640 str += "File system exception thrown (";
00641
00642
00643 str += e.what();
00644 str += ")\n";
00645 Base::Console().Error(str.c_str());
00646 PyErr_SetString(PyExc_Exception,str.c_str());
00647 return NULL;
00648 }
00649 catch(const Py::Exception&)
00650 {
00651
00652 return NULL;
00653 }
00654 catch(const char* e)
00655 {
00656 Base::Console().Error(e);
00657 PyErr_SetString(PyExc_Exception,e);
00658 return NULL;
00659 }
00660
00661 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00662 catch(const std::exception& e)
00663 {
00664 std::string str;
00665 str += "FC++ exception thrown (";
00666 str += e.what();
00667 str += ")";
00668 Base::Console().Error(str.c_str());
00669 PyErr_SetString(PyExc_Exception,str.c_str());
00670 return NULL;
00671 }
00672 catch(...)
00673 {
00674 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00675 return NULL;
00676 }
00677 #endif
00678 }
00679
00680
00681
00682
00683 PyObject * TopoShapePy::staticCallback_exportBrep (PyObject *self, PyObject *args)
00684 {
00685
00686 if (!((PyObjectBase*) self)->isValid()){
00687 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00688 return NULL;
00689 }
00690
00691
00692 try {
00693 PyObject* ret = ((TopoShapePy*)self)->exportBrep(args);
00694 return ret;
00695 }
00696 catch(const Base::Exception& e)
00697 {
00698 std::string str;
00699 str += "FreeCAD exception thrown (";
00700 str += e.what();
00701 str += ")";
00702 e.ReportException();
00703 PyErr_SetString(PyExc_Exception,str.c_str());
00704 return NULL;
00705 }
00706 catch(const boost::filesystem::filesystem_error& e)
00707 {
00708 std::string str;
00709 str += "File system exception thrown (";
00710
00711
00712 str += e.what();
00713 str += ")\n";
00714 Base::Console().Error(str.c_str());
00715 PyErr_SetString(PyExc_Exception,str.c_str());
00716 return NULL;
00717 }
00718 catch(const Py::Exception&)
00719 {
00720
00721 return NULL;
00722 }
00723 catch(const char* e)
00724 {
00725 Base::Console().Error(e);
00726 PyErr_SetString(PyExc_Exception,e);
00727 return NULL;
00728 }
00729
00730 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00731 catch(const std::exception& e)
00732 {
00733 std::string str;
00734 str += "FC++ exception thrown (";
00735 str += e.what();
00736 str += ")";
00737 Base::Console().Error(str.c_str());
00738 PyErr_SetString(PyExc_Exception,str.c_str());
00739 return NULL;
00740 }
00741 catch(...)
00742 {
00743 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00744 return NULL;
00745 }
00746 #endif
00747 }
00748
00749
00750
00751
00752 PyObject * TopoShapePy::staticCallback_exportStl (PyObject *self, PyObject *args)
00753 {
00754
00755 if (!((PyObjectBase*) self)->isValid()){
00756 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00757 return NULL;
00758 }
00759
00760
00761 try {
00762 PyObject* ret = ((TopoShapePy*)self)->exportStl(args);
00763 return ret;
00764 }
00765 catch(const Base::Exception& e)
00766 {
00767 std::string str;
00768 str += "FreeCAD exception thrown (";
00769 str += e.what();
00770 str += ")";
00771 e.ReportException();
00772 PyErr_SetString(PyExc_Exception,str.c_str());
00773 return NULL;
00774 }
00775 catch(const boost::filesystem::filesystem_error& e)
00776 {
00777 std::string str;
00778 str += "File system exception thrown (";
00779
00780
00781 str += e.what();
00782 str += ")\n";
00783 Base::Console().Error(str.c_str());
00784 PyErr_SetString(PyExc_Exception,str.c_str());
00785 return NULL;
00786 }
00787 catch(const Py::Exception&)
00788 {
00789
00790 return NULL;
00791 }
00792 catch(const char* e)
00793 {
00794 Base::Console().Error(e);
00795 PyErr_SetString(PyExc_Exception,e);
00796 return NULL;
00797 }
00798
00799 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00800 catch(const std::exception& e)
00801 {
00802 std::string str;
00803 str += "FC++ exception thrown (";
00804 str += e.what();
00805 str += ")";
00806 Base::Console().Error(str.c_str());
00807 PyErr_SetString(PyExc_Exception,str.c_str());
00808 return NULL;
00809 }
00810 catch(...)
00811 {
00812 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00813 return NULL;
00814 }
00815 #endif
00816 }
00817
00818
00819
00820
00821 PyObject * TopoShapePy::staticCallback_extrude (PyObject *self, PyObject *args)
00822 {
00823
00824 if (!((PyObjectBase*) self)->isValid()){
00825 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00826 return NULL;
00827 }
00828
00829
00830 if (((PyObjectBase*) self)->isConst()){
00831 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
00832 return NULL;
00833 }
00834
00835 try {
00836 PyObject* ret = ((TopoShapePy*)self)->extrude(args);
00837 if (ret != 0)
00838 ((TopoShapePy*)self)->startNotify();
00839 return ret;
00840 }
00841 catch(const Base::Exception& e)
00842 {
00843 std::string str;
00844 str += "FreeCAD exception thrown (";
00845 str += e.what();
00846 str += ")";
00847 e.ReportException();
00848 PyErr_SetString(PyExc_Exception,str.c_str());
00849 return NULL;
00850 }
00851 catch(const boost::filesystem::filesystem_error& e)
00852 {
00853 std::string str;
00854 str += "File system exception thrown (";
00855
00856
00857 str += e.what();
00858 str += ")\n";
00859 Base::Console().Error(str.c_str());
00860 PyErr_SetString(PyExc_Exception,str.c_str());
00861 return NULL;
00862 }
00863 catch(const Py::Exception&)
00864 {
00865
00866 return NULL;
00867 }
00868 catch(const char* e)
00869 {
00870 Base::Console().Error(e);
00871 PyErr_SetString(PyExc_Exception,e);
00872 return NULL;
00873 }
00874
00875 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00876 catch(const std::exception& e)
00877 {
00878 std::string str;
00879 str += "FC++ exception thrown (";
00880 str += e.what();
00881 str += ")";
00882 Base::Console().Error(str.c_str());
00883 PyErr_SetString(PyExc_Exception,str.c_str());
00884 return NULL;
00885 }
00886 catch(...)
00887 {
00888 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00889 return NULL;
00890 }
00891 #endif
00892 }
00893
00894
00895
00896
00897 PyObject * TopoShapePy::staticCallback_revolve (PyObject *self, PyObject *args)
00898 {
00899
00900 if (!((PyObjectBase*) self)->isValid()){
00901 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00902 return NULL;
00903 }
00904
00905
00906 try {
00907 PyObject* ret = ((TopoShapePy*)self)->revolve(args);
00908 return ret;
00909 }
00910 catch(const Base::Exception& e)
00911 {
00912 std::string str;
00913 str += "FreeCAD exception thrown (";
00914 str += e.what();
00915 str += ")";
00916 e.ReportException();
00917 PyErr_SetString(PyExc_Exception,str.c_str());
00918 return NULL;
00919 }
00920 catch(const boost::filesystem::filesystem_error& e)
00921 {
00922 std::string str;
00923 str += "File system exception thrown (";
00924
00925
00926 str += e.what();
00927 str += ")\n";
00928 Base::Console().Error(str.c_str());
00929 PyErr_SetString(PyExc_Exception,str.c_str());
00930 return NULL;
00931 }
00932 catch(const Py::Exception&)
00933 {
00934
00935 return NULL;
00936 }
00937 catch(const char* e)
00938 {
00939 Base::Console().Error(e);
00940 PyErr_SetString(PyExc_Exception,e);
00941 return NULL;
00942 }
00943
00944 #ifndef DONT_CATCH_CXX_EXCEPTIONS
00945 catch(const std::exception& e)
00946 {
00947 std::string str;
00948 str += "FC++ exception thrown (";
00949 str += e.what();
00950 str += ")";
00951 Base::Console().Error(str.c_str());
00952 PyErr_SetString(PyExc_Exception,str.c_str());
00953 return NULL;
00954 }
00955 catch(...)
00956 {
00957 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
00958 return NULL;
00959 }
00960 #endif
00961 }
00962
00963
00964
00965
00966 PyObject * TopoShapePy::staticCallback_check (PyObject *self, PyObject *args)
00967 {
00968
00969 if (!((PyObjectBase*) self)->isValid()){
00970 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
00971 return NULL;
00972 }
00973
00974
00975 try {
00976 PyObject* ret = ((TopoShapePy*)self)->check(args);
00977 return ret;
00978 }
00979 catch(const Base::Exception& e)
00980 {
00981 std::string str;
00982 str += "FreeCAD exception thrown (";
00983 str += e.what();
00984 str += ")";
00985 e.ReportException();
00986 PyErr_SetString(PyExc_Exception,str.c_str());
00987 return NULL;
00988 }
00989 catch(const boost::filesystem::filesystem_error& e)
00990 {
00991 std::string str;
00992 str += "File system exception thrown (";
00993
00994
00995 str += e.what();
00996 str += ")\n";
00997 Base::Console().Error(str.c_str());
00998 PyErr_SetString(PyExc_Exception,str.c_str());
00999 return NULL;
01000 }
01001 catch(const Py::Exception&)
01002 {
01003
01004 return NULL;
01005 }
01006 catch(const char* e)
01007 {
01008 Base::Console().Error(e);
01009 PyErr_SetString(PyExc_Exception,e);
01010 return NULL;
01011 }
01012
01013 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01014 catch(const std::exception& e)
01015 {
01016 std::string str;
01017 str += "FC++ exception thrown (";
01018 str += e.what();
01019 str += ")";
01020 Base::Console().Error(str.c_str());
01021 PyErr_SetString(PyExc_Exception,str.c_str());
01022 return NULL;
01023 }
01024 catch(...)
01025 {
01026 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01027 return NULL;
01028 }
01029 #endif
01030 }
01031
01032
01033
01034
01035 PyObject * TopoShapePy::staticCallback_fuse (PyObject *self, PyObject *args)
01036 {
01037
01038 if (!((PyObjectBase*) self)->isValid()){
01039 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01040 return NULL;
01041 }
01042
01043
01044 if (((PyObjectBase*) self)->isConst()){
01045 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01046 return NULL;
01047 }
01048
01049 try {
01050 PyObject* ret = ((TopoShapePy*)self)->fuse(args);
01051 if (ret != 0)
01052 ((TopoShapePy*)self)->startNotify();
01053 return ret;
01054 }
01055 catch(const Base::Exception& e)
01056 {
01057 std::string str;
01058 str += "FreeCAD exception thrown (";
01059 str += e.what();
01060 str += ")";
01061 e.ReportException();
01062 PyErr_SetString(PyExc_Exception,str.c_str());
01063 return NULL;
01064 }
01065 catch(const boost::filesystem::filesystem_error& e)
01066 {
01067 std::string str;
01068 str += "File system exception thrown (";
01069
01070
01071 str += e.what();
01072 str += ")\n";
01073 Base::Console().Error(str.c_str());
01074 PyErr_SetString(PyExc_Exception,str.c_str());
01075 return NULL;
01076 }
01077 catch(const Py::Exception&)
01078 {
01079
01080 return NULL;
01081 }
01082 catch(const char* e)
01083 {
01084 Base::Console().Error(e);
01085 PyErr_SetString(PyExc_Exception,e);
01086 return NULL;
01087 }
01088
01089 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01090 catch(const std::exception& e)
01091 {
01092 std::string str;
01093 str += "FC++ exception thrown (";
01094 str += e.what();
01095 str += ")";
01096 Base::Console().Error(str.c_str());
01097 PyErr_SetString(PyExc_Exception,str.c_str());
01098 return NULL;
01099 }
01100 catch(...)
01101 {
01102 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01103 return NULL;
01104 }
01105 #endif
01106 }
01107
01108
01109
01110
01111 PyObject * TopoShapePy::staticCallback_oldFuse (PyObject *self, PyObject *args)
01112 {
01113
01114 if (!((PyObjectBase*) self)->isValid()){
01115 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01116 return NULL;
01117 }
01118
01119
01120 if (((PyObjectBase*) self)->isConst()){
01121 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01122 return NULL;
01123 }
01124
01125 try {
01126 PyObject* ret = ((TopoShapePy*)self)->oldFuse(args);
01127 if (ret != 0)
01128 ((TopoShapePy*)self)->startNotify();
01129 return ret;
01130 }
01131 catch(const Base::Exception& e)
01132 {
01133 std::string str;
01134 str += "FreeCAD exception thrown (";
01135 str += e.what();
01136 str += ")";
01137 e.ReportException();
01138 PyErr_SetString(PyExc_Exception,str.c_str());
01139 return NULL;
01140 }
01141 catch(const boost::filesystem::filesystem_error& e)
01142 {
01143 std::string str;
01144 str += "File system exception thrown (";
01145
01146
01147 str += e.what();
01148 str += ")\n";
01149 Base::Console().Error(str.c_str());
01150 PyErr_SetString(PyExc_Exception,str.c_str());
01151 return NULL;
01152 }
01153 catch(const Py::Exception&)
01154 {
01155
01156 return NULL;
01157 }
01158 catch(const char* e)
01159 {
01160 Base::Console().Error(e);
01161 PyErr_SetString(PyExc_Exception,e);
01162 return NULL;
01163 }
01164
01165 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01166 catch(const std::exception& e)
01167 {
01168 std::string str;
01169 str += "FC++ exception thrown (";
01170 str += e.what();
01171 str += ")";
01172 Base::Console().Error(str.c_str());
01173 PyErr_SetString(PyExc_Exception,str.c_str());
01174 return NULL;
01175 }
01176 catch(...)
01177 {
01178 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01179 return NULL;
01180 }
01181 #endif
01182 }
01183
01184
01185
01186
01187 PyObject * TopoShapePy::staticCallback_common (PyObject *self, PyObject *args)
01188 {
01189
01190 if (!((PyObjectBase*) self)->isValid()){
01191 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01192 return NULL;
01193 }
01194
01195
01196 if (((PyObjectBase*) self)->isConst()){
01197 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01198 return NULL;
01199 }
01200
01201 try {
01202 PyObject* ret = ((TopoShapePy*)self)->common(args);
01203 if (ret != 0)
01204 ((TopoShapePy*)self)->startNotify();
01205 return ret;
01206 }
01207 catch(const Base::Exception& e)
01208 {
01209 std::string str;
01210 str += "FreeCAD exception thrown (";
01211 str += e.what();
01212 str += ")";
01213 e.ReportException();
01214 PyErr_SetString(PyExc_Exception,str.c_str());
01215 return NULL;
01216 }
01217 catch(const boost::filesystem::filesystem_error& e)
01218 {
01219 std::string str;
01220 str += "File system exception thrown (";
01221
01222
01223 str += e.what();
01224 str += ")\n";
01225 Base::Console().Error(str.c_str());
01226 PyErr_SetString(PyExc_Exception,str.c_str());
01227 return NULL;
01228 }
01229 catch(const Py::Exception&)
01230 {
01231
01232 return NULL;
01233 }
01234 catch(const char* e)
01235 {
01236 Base::Console().Error(e);
01237 PyErr_SetString(PyExc_Exception,e);
01238 return NULL;
01239 }
01240
01241 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01242 catch(const std::exception& e)
01243 {
01244 std::string str;
01245 str += "FC++ exception thrown (";
01246 str += e.what();
01247 str += ")";
01248 Base::Console().Error(str.c_str());
01249 PyErr_SetString(PyExc_Exception,str.c_str());
01250 return NULL;
01251 }
01252 catch(...)
01253 {
01254 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01255 return NULL;
01256 }
01257 #endif
01258 }
01259
01260
01261
01262
01263 PyObject * TopoShapePy::staticCallback_section (PyObject *self, PyObject *args)
01264 {
01265
01266 if (!((PyObjectBase*) self)->isValid()){
01267 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01268 return NULL;
01269 }
01270
01271
01272 if (((PyObjectBase*) self)->isConst()){
01273 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01274 return NULL;
01275 }
01276
01277 try {
01278 PyObject* ret = ((TopoShapePy*)self)->section(args);
01279 if (ret != 0)
01280 ((TopoShapePy*)self)->startNotify();
01281 return ret;
01282 }
01283 catch(const Base::Exception& e)
01284 {
01285 std::string str;
01286 str += "FreeCAD exception thrown (";
01287 str += e.what();
01288 str += ")";
01289 e.ReportException();
01290 PyErr_SetString(PyExc_Exception,str.c_str());
01291 return NULL;
01292 }
01293 catch(const boost::filesystem::filesystem_error& e)
01294 {
01295 std::string str;
01296 str += "File system exception thrown (";
01297
01298
01299 str += e.what();
01300 str += ")\n";
01301 Base::Console().Error(str.c_str());
01302 PyErr_SetString(PyExc_Exception,str.c_str());
01303 return NULL;
01304 }
01305 catch(const Py::Exception&)
01306 {
01307
01308 return NULL;
01309 }
01310 catch(const char* e)
01311 {
01312 Base::Console().Error(e);
01313 PyErr_SetString(PyExc_Exception,e);
01314 return NULL;
01315 }
01316
01317 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01318 catch(const std::exception& e)
01319 {
01320 std::string str;
01321 str += "FC++ exception thrown (";
01322 str += e.what();
01323 str += ")";
01324 Base::Console().Error(str.c_str());
01325 PyErr_SetString(PyExc_Exception,str.c_str());
01326 return NULL;
01327 }
01328 catch(...)
01329 {
01330 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01331 return NULL;
01332 }
01333 #endif
01334 }
01335
01336
01337
01338
01339 PyObject * TopoShapePy::staticCallback_slices (PyObject *self, PyObject *args)
01340 {
01341
01342 if (!((PyObjectBase*) self)->isValid()){
01343 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01344 return NULL;
01345 }
01346
01347
01348 try {
01349 PyObject* ret = ((TopoShapePy*)self)->slices(args);
01350 return ret;
01351 }
01352 catch(const Base::Exception& e)
01353 {
01354 std::string str;
01355 str += "FreeCAD exception thrown (";
01356 str += e.what();
01357 str += ")";
01358 e.ReportException();
01359 PyErr_SetString(PyExc_Exception,str.c_str());
01360 return NULL;
01361 }
01362 catch(const boost::filesystem::filesystem_error& e)
01363 {
01364 std::string str;
01365 str += "File system exception thrown (";
01366
01367
01368 str += e.what();
01369 str += ")\n";
01370 Base::Console().Error(str.c_str());
01371 PyErr_SetString(PyExc_Exception,str.c_str());
01372 return NULL;
01373 }
01374 catch(const Py::Exception&)
01375 {
01376
01377 return NULL;
01378 }
01379 catch(const char* e)
01380 {
01381 Base::Console().Error(e);
01382 PyErr_SetString(PyExc_Exception,e);
01383 return NULL;
01384 }
01385
01386 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01387 catch(const std::exception& e)
01388 {
01389 std::string str;
01390 str += "FC++ exception thrown (";
01391 str += e.what();
01392 str += ")";
01393 Base::Console().Error(str.c_str());
01394 PyErr_SetString(PyExc_Exception,str.c_str());
01395 return NULL;
01396 }
01397 catch(...)
01398 {
01399 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01400 return NULL;
01401 }
01402 #endif
01403 }
01404
01405
01406
01407
01408 PyObject * TopoShapePy::staticCallback_slice (PyObject *self, PyObject *args)
01409 {
01410
01411 if (!((PyObjectBase*) self)->isValid()){
01412 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01413 return NULL;
01414 }
01415
01416
01417 try {
01418 PyObject* ret = ((TopoShapePy*)self)->slice(args);
01419 return ret;
01420 }
01421 catch(const Base::Exception& e)
01422 {
01423 std::string str;
01424 str += "FreeCAD exception thrown (";
01425 str += e.what();
01426 str += ")";
01427 e.ReportException();
01428 PyErr_SetString(PyExc_Exception,str.c_str());
01429 return NULL;
01430 }
01431 catch(const boost::filesystem::filesystem_error& e)
01432 {
01433 std::string str;
01434 str += "File system exception thrown (";
01435
01436
01437 str += e.what();
01438 str += ")\n";
01439 Base::Console().Error(str.c_str());
01440 PyErr_SetString(PyExc_Exception,str.c_str());
01441 return NULL;
01442 }
01443 catch(const Py::Exception&)
01444 {
01445
01446 return NULL;
01447 }
01448 catch(const char* e)
01449 {
01450 Base::Console().Error(e);
01451 PyErr_SetString(PyExc_Exception,e);
01452 return NULL;
01453 }
01454
01455 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01456 catch(const std::exception& e)
01457 {
01458 std::string str;
01459 str += "FC++ exception thrown (";
01460 str += e.what();
01461 str += ")";
01462 Base::Console().Error(str.c_str());
01463 PyErr_SetString(PyExc_Exception,str.c_str());
01464 return NULL;
01465 }
01466 catch(...)
01467 {
01468 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01469 return NULL;
01470 }
01471 #endif
01472 }
01473
01474
01475
01476
01477 PyObject * TopoShapePy::staticCallback_cut (PyObject *self, PyObject *args)
01478 {
01479
01480 if (!((PyObjectBase*) self)->isValid()){
01481 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01482 return NULL;
01483 }
01484
01485
01486 if (((PyObjectBase*) self)->isConst()){
01487 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01488 return NULL;
01489 }
01490
01491 try {
01492 PyObject* ret = ((TopoShapePy*)self)->cut(args);
01493 if (ret != 0)
01494 ((TopoShapePy*)self)->startNotify();
01495 return ret;
01496 }
01497 catch(const Base::Exception& e)
01498 {
01499 std::string str;
01500 str += "FreeCAD exception thrown (";
01501 str += e.what();
01502 str += ")";
01503 e.ReportException();
01504 PyErr_SetString(PyExc_Exception,str.c_str());
01505 return NULL;
01506 }
01507 catch(const boost::filesystem::filesystem_error& e)
01508 {
01509 std::string str;
01510 str += "File system exception thrown (";
01511
01512
01513 str += e.what();
01514 str += ")\n";
01515 Base::Console().Error(str.c_str());
01516 PyErr_SetString(PyExc_Exception,str.c_str());
01517 return NULL;
01518 }
01519 catch(const Py::Exception&)
01520 {
01521
01522 return NULL;
01523 }
01524 catch(const char* e)
01525 {
01526 Base::Console().Error(e);
01527 PyErr_SetString(PyExc_Exception,e);
01528 return NULL;
01529 }
01530
01531 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01532 catch(const std::exception& e)
01533 {
01534 std::string str;
01535 str += "FC++ exception thrown (";
01536 str += e.what();
01537 str += ")";
01538 Base::Console().Error(str.c_str());
01539 PyErr_SetString(PyExc_Exception,str.c_str());
01540 return NULL;
01541 }
01542 catch(...)
01543 {
01544 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01545 return NULL;
01546 }
01547 #endif
01548 }
01549
01550
01551
01552
01553 PyObject * TopoShapePy::staticCallback_sewShape (PyObject *self, PyObject *args)
01554 {
01555
01556 if (!((PyObjectBase*) self)->isValid()){
01557 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01558 return NULL;
01559 }
01560
01561
01562 if (((PyObjectBase*) self)->isConst()){
01563 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01564 return NULL;
01565 }
01566
01567 try {
01568 PyObject* ret = ((TopoShapePy*)self)->sewShape(args);
01569 if (ret != 0)
01570 ((TopoShapePy*)self)->startNotify();
01571 return ret;
01572 }
01573 catch(const Base::Exception& e)
01574 {
01575 std::string str;
01576 str += "FreeCAD exception thrown (";
01577 str += e.what();
01578 str += ")";
01579 e.ReportException();
01580 PyErr_SetString(PyExc_Exception,str.c_str());
01581 return NULL;
01582 }
01583 catch(const boost::filesystem::filesystem_error& e)
01584 {
01585 std::string str;
01586 str += "File system exception thrown (";
01587
01588
01589 str += e.what();
01590 str += ")\n";
01591 Base::Console().Error(str.c_str());
01592 PyErr_SetString(PyExc_Exception,str.c_str());
01593 return NULL;
01594 }
01595 catch(const Py::Exception&)
01596 {
01597
01598 return NULL;
01599 }
01600 catch(const char* e)
01601 {
01602 Base::Console().Error(e);
01603 PyErr_SetString(PyExc_Exception,e);
01604 return NULL;
01605 }
01606
01607 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01608 catch(const std::exception& e)
01609 {
01610 std::string str;
01611 str += "FC++ exception thrown (";
01612 str += e.what();
01613 str += ")";
01614 Base::Console().Error(str.c_str());
01615 PyErr_SetString(PyExc_Exception,str.c_str());
01616 return NULL;
01617 }
01618 catch(...)
01619 {
01620 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01621 return NULL;
01622 }
01623 #endif
01624 }
01625
01626
01627
01628
01629 PyObject * TopoShapePy::staticCallback_removeInternalWires (PyObject *self, PyObject *args)
01630 {
01631
01632 if (!((PyObjectBase*) self)->isValid()){
01633 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01634 return NULL;
01635 }
01636
01637
01638 if (((PyObjectBase*) self)->isConst()){
01639 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01640 return NULL;
01641 }
01642
01643 try {
01644 PyObject* ret = ((TopoShapePy*)self)->removeInternalWires(args);
01645 if (ret != 0)
01646 ((TopoShapePy*)self)->startNotify();
01647 return ret;
01648 }
01649 catch(const Base::Exception& e)
01650 {
01651 std::string str;
01652 str += "FreeCAD exception thrown (";
01653 str += e.what();
01654 str += ")";
01655 e.ReportException();
01656 PyErr_SetString(PyExc_Exception,str.c_str());
01657 return NULL;
01658 }
01659 catch(const boost::filesystem::filesystem_error& e)
01660 {
01661 std::string str;
01662 str += "File system exception thrown (";
01663
01664
01665 str += e.what();
01666 str += ")\n";
01667 Base::Console().Error(str.c_str());
01668 PyErr_SetString(PyExc_Exception,str.c_str());
01669 return NULL;
01670 }
01671 catch(const Py::Exception&)
01672 {
01673
01674 return NULL;
01675 }
01676 catch(const char* e)
01677 {
01678 Base::Console().Error(e);
01679 PyErr_SetString(PyExc_Exception,e);
01680 return NULL;
01681 }
01682
01683 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01684 catch(const std::exception& e)
01685 {
01686 std::string str;
01687 str += "FC++ exception thrown (";
01688 str += e.what();
01689 str += ")";
01690 Base::Console().Error(str.c_str());
01691 PyErr_SetString(PyExc_Exception,str.c_str());
01692 return NULL;
01693 }
01694 catch(...)
01695 {
01696 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01697 return NULL;
01698 }
01699 #endif
01700 }
01701
01702
01703
01704
01705 PyObject * TopoShapePy::staticCallback_mirror (PyObject *self, PyObject *args)
01706 {
01707
01708 if (!((PyObjectBase*) self)->isValid()){
01709 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01710 return NULL;
01711 }
01712
01713
01714 if (((PyObjectBase*) self)->isConst()){
01715 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01716 return NULL;
01717 }
01718
01719 try {
01720 PyObject* ret = ((TopoShapePy*)self)->mirror(args);
01721 if (ret != 0)
01722 ((TopoShapePy*)self)->startNotify();
01723 return ret;
01724 }
01725 catch(const Base::Exception& e)
01726 {
01727 std::string str;
01728 str += "FreeCAD exception thrown (";
01729 str += e.what();
01730 str += ")";
01731 e.ReportException();
01732 PyErr_SetString(PyExc_Exception,str.c_str());
01733 return NULL;
01734 }
01735 catch(const boost::filesystem::filesystem_error& e)
01736 {
01737 std::string str;
01738 str += "File system exception thrown (";
01739
01740
01741 str += e.what();
01742 str += ")\n";
01743 Base::Console().Error(str.c_str());
01744 PyErr_SetString(PyExc_Exception,str.c_str());
01745 return NULL;
01746 }
01747 catch(const Py::Exception&)
01748 {
01749
01750 return NULL;
01751 }
01752 catch(const char* e)
01753 {
01754 Base::Console().Error(e);
01755 PyErr_SetString(PyExc_Exception,e);
01756 return NULL;
01757 }
01758
01759 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01760 catch(const std::exception& e)
01761 {
01762 std::string str;
01763 str += "FC++ exception thrown (";
01764 str += e.what();
01765 str += ")";
01766 Base::Console().Error(str.c_str());
01767 PyErr_SetString(PyExc_Exception,str.c_str());
01768 return NULL;
01769 }
01770 catch(...)
01771 {
01772 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01773 return NULL;
01774 }
01775 #endif
01776 }
01777
01778
01779
01780
01781 PyObject * TopoShapePy::staticCallback_transformGeometry (PyObject *self, PyObject *args)
01782 {
01783
01784 if (!((PyObjectBase*) self)->isValid()){
01785 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01786 return NULL;
01787 }
01788
01789
01790 if (((PyObjectBase*) self)->isConst()){
01791 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01792 return NULL;
01793 }
01794
01795 try {
01796 PyObject* ret = ((TopoShapePy*)self)->transformGeometry(args);
01797 if (ret != 0)
01798 ((TopoShapePy*)self)->startNotify();
01799 return ret;
01800 }
01801 catch(const Base::Exception& e)
01802 {
01803 std::string str;
01804 str += "FreeCAD exception thrown (";
01805 str += e.what();
01806 str += ")";
01807 e.ReportException();
01808 PyErr_SetString(PyExc_Exception,str.c_str());
01809 return NULL;
01810 }
01811 catch(const boost::filesystem::filesystem_error& e)
01812 {
01813 std::string str;
01814 str += "File system exception thrown (";
01815
01816
01817 str += e.what();
01818 str += ")\n";
01819 Base::Console().Error(str.c_str());
01820 PyErr_SetString(PyExc_Exception,str.c_str());
01821 return NULL;
01822 }
01823 catch(const Py::Exception&)
01824 {
01825
01826 return NULL;
01827 }
01828 catch(const char* e)
01829 {
01830 Base::Console().Error(e);
01831 PyErr_SetString(PyExc_Exception,e);
01832 return NULL;
01833 }
01834
01835 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01836 catch(const std::exception& e)
01837 {
01838 std::string str;
01839 str += "FC++ exception thrown (";
01840 str += e.what();
01841 str += ")";
01842 Base::Console().Error(str.c_str());
01843 PyErr_SetString(PyExc_Exception,str.c_str());
01844 return NULL;
01845 }
01846 catch(...)
01847 {
01848 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01849 return NULL;
01850 }
01851 #endif
01852 }
01853
01854
01855
01856
01857 PyObject * TopoShapePy::staticCallback_transformShape (PyObject *self, PyObject *args)
01858 {
01859
01860 if (!((PyObjectBase*) self)->isValid()){
01861 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01862 return NULL;
01863 }
01864
01865
01866 if (((PyObjectBase*) self)->isConst()){
01867 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01868 return NULL;
01869 }
01870
01871 try {
01872 PyObject* ret = ((TopoShapePy*)self)->transformShape(args);
01873 if (ret != 0)
01874 ((TopoShapePy*)self)->startNotify();
01875 return ret;
01876 }
01877 catch(const Base::Exception& e)
01878 {
01879 std::string str;
01880 str += "FreeCAD exception thrown (";
01881 str += e.what();
01882 str += ")";
01883 e.ReportException();
01884 PyErr_SetString(PyExc_Exception,str.c_str());
01885 return NULL;
01886 }
01887 catch(const boost::filesystem::filesystem_error& e)
01888 {
01889 std::string str;
01890 str += "File system exception thrown (";
01891
01892
01893 str += e.what();
01894 str += ")\n";
01895 Base::Console().Error(str.c_str());
01896 PyErr_SetString(PyExc_Exception,str.c_str());
01897 return NULL;
01898 }
01899 catch(const Py::Exception&)
01900 {
01901
01902 return NULL;
01903 }
01904 catch(const char* e)
01905 {
01906 Base::Console().Error(e);
01907 PyErr_SetString(PyExc_Exception,e);
01908 return NULL;
01909 }
01910
01911 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01912 catch(const std::exception& e)
01913 {
01914 std::string str;
01915 str += "FC++ exception thrown (";
01916 str += e.what();
01917 str += ")";
01918 Base::Console().Error(str.c_str());
01919 PyErr_SetString(PyExc_Exception,str.c_str());
01920 return NULL;
01921 }
01922 catch(...)
01923 {
01924 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
01925 return NULL;
01926 }
01927 #endif
01928 }
01929
01930
01931
01932
01933 PyObject * TopoShapePy::staticCallback_translate (PyObject *self, PyObject *args)
01934 {
01935
01936 if (!((PyObjectBase*) self)->isValid()){
01937 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
01938 return NULL;
01939 }
01940
01941
01942 if (((PyObjectBase*) self)->isConst()){
01943 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
01944 return NULL;
01945 }
01946
01947 try {
01948 PyObject* ret = ((TopoShapePy*)self)->translate(args);
01949 if (ret != 0)
01950 ((TopoShapePy*)self)->startNotify();
01951 return ret;
01952 }
01953 catch(const Base::Exception& e)
01954 {
01955 std::string str;
01956 str += "FreeCAD exception thrown (";
01957 str += e.what();
01958 str += ")";
01959 e.ReportException();
01960 PyErr_SetString(PyExc_Exception,str.c_str());
01961 return NULL;
01962 }
01963 catch(const boost::filesystem::filesystem_error& e)
01964 {
01965 std::string str;
01966 str += "File system exception thrown (";
01967
01968
01969 str += e.what();
01970 str += ")\n";
01971 Base::Console().Error(str.c_str());
01972 PyErr_SetString(PyExc_Exception,str.c_str());
01973 return NULL;
01974 }
01975 catch(const Py::Exception&)
01976 {
01977
01978 return NULL;
01979 }
01980 catch(const char* e)
01981 {
01982 Base::Console().Error(e);
01983 PyErr_SetString(PyExc_Exception,e);
01984 return NULL;
01985 }
01986
01987 #ifndef DONT_CATCH_CXX_EXCEPTIONS
01988 catch(const std::exception& e)
01989 {
01990 std::string str;
01991 str += "FC++ exception thrown (";
01992 str += e.what();
01993 str += ")";
01994 Base::Console().Error(str.c_str());
01995 PyErr_SetString(PyExc_Exception,str.c_str());
01996 return NULL;
01997 }
01998 catch(...)
01999 {
02000 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02001 return NULL;
02002 }
02003 #endif
02004 }
02005
02006
02007
02008
02009 PyObject * TopoShapePy::staticCallback_rotate (PyObject *self, PyObject *args)
02010 {
02011
02012 if (!((PyObjectBase*) self)->isValid()){
02013 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02014 return NULL;
02015 }
02016
02017
02018 if (((PyObjectBase*) self)->isConst()){
02019 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02020 return NULL;
02021 }
02022
02023 try {
02024 PyObject* ret = ((TopoShapePy*)self)->rotate(args);
02025 if (ret != 0)
02026 ((TopoShapePy*)self)->startNotify();
02027 return ret;
02028 }
02029 catch(const Base::Exception& e)
02030 {
02031 std::string str;
02032 str += "FreeCAD exception thrown (";
02033 str += e.what();
02034 str += ")";
02035 e.ReportException();
02036 PyErr_SetString(PyExc_Exception,str.c_str());
02037 return NULL;
02038 }
02039 catch(const boost::filesystem::filesystem_error& e)
02040 {
02041 std::string str;
02042 str += "File system exception thrown (";
02043
02044
02045 str += e.what();
02046 str += ")\n";
02047 Base::Console().Error(str.c_str());
02048 PyErr_SetString(PyExc_Exception,str.c_str());
02049 return NULL;
02050 }
02051 catch(const Py::Exception&)
02052 {
02053
02054 return NULL;
02055 }
02056 catch(const char* e)
02057 {
02058 Base::Console().Error(e);
02059 PyErr_SetString(PyExc_Exception,e);
02060 return NULL;
02061 }
02062
02063 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02064 catch(const std::exception& e)
02065 {
02066 std::string str;
02067 str += "FC++ exception thrown (";
02068 str += e.what();
02069 str += ")";
02070 Base::Console().Error(str.c_str());
02071 PyErr_SetString(PyExc_Exception,str.c_str());
02072 return NULL;
02073 }
02074 catch(...)
02075 {
02076 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02077 return NULL;
02078 }
02079 #endif
02080 }
02081
02082
02083
02084
02085 PyObject * TopoShapePy::staticCallback_scale (PyObject *self, PyObject *args)
02086 {
02087
02088 if (!((PyObjectBase*) self)->isValid()){
02089 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02090 return NULL;
02091 }
02092
02093
02094 if (((PyObjectBase*) self)->isConst()){
02095 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02096 return NULL;
02097 }
02098
02099 try {
02100 PyObject* ret = ((TopoShapePy*)self)->scale(args);
02101 if (ret != 0)
02102 ((TopoShapePy*)self)->startNotify();
02103 return ret;
02104 }
02105 catch(const Base::Exception& e)
02106 {
02107 std::string str;
02108 str += "FreeCAD exception thrown (";
02109 str += e.what();
02110 str += ")";
02111 e.ReportException();
02112 PyErr_SetString(PyExc_Exception,str.c_str());
02113 return NULL;
02114 }
02115 catch(const boost::filesystem::filesystem_error& e)
02116 {
02117 std::string str;
02118 str += "File system exception thrown (";
02119
02120
02121 str += e.what();
02122 str += ")\n";
02123 Base::Console().Error(str.c_str());
02124 PyErr_SetString(PyExc_Exception,str.c_str());
02125 return NULL;
02126 }
02127 catch(const Py::Exception&)
02128 {
02129
02130 return NULL;
02131 }
02132 catch(const char* e)
02133 {
02134 Base::Console().Error(e);
02135 PyErr_SetString(PyExc_Exception,e);
02136 return NULL;
02137 }
02138
02139 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02140 catch(const std::exception& e)
02141 {
02142 std::string str;
02143 str += "FC++ exception thrown (";
02144 str += e.what();
02145 str += ")";
02146 Base::Console().Error(str.c_str());
02147 PyErr_SetString(PyExc_Exception,str.c_str());
02148 return NULL;
02149 }
02150 catch(...)
02151 {
02152 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02153 return NULL;
02154 }
02155 #endif
02156 }
02157
02158
02159
02160
02161 PyObject * TopoShapePy::staticCallback_makeFillet (PyObject *self, PyObject *args)
02162 {
02163
02164 if (!((PyObjectBase*) self)->isValid()){
02165 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02166 return NULL;
02167 }
02168
02169
02170 try {
02171 PyObject* ret = ((TopoShapePy*)self)->makeFillet(args);
02172 return ret;
02173 }
02174 catch(const Base::Exception& e)
02175 {
02176 std::string str;
02177 str += "FreeCAD exception thrown (";
02178 str += e.what();
02179 str += ")";
02180 e.ReportException();
02181 PyErr_SetString(PyExc_Exception,str.c_str());
02182 return NULL;
02183 }
02184 catch(const boost::filesystem::filesystem_error& e)
02185 {
02186 std::string str;
02187 str += "File system exception thrown (";
02188
02189
02190 str += e.what();
02191 str += ")\n";
02192 Base::Console().Error(str.c_str());
02193 PyErr_SetString(PyExc_Exception,str.c_str());
02194 return NULL;
02195 }
02196 catch(const Py::Exception&)
02197 {
02198
02199 return NULL;
02200 }
02201 catch(const char* e)
02202 {
02203 Base::Console().Error(e);
02204 PyErr_SetString(PyExc_Exception,e);
02205 return NULL;
02206 }
02207
02208 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02209 catch(const std::exception& e)
02210 {
02211 std::string str;
02212 str += "FC++ exception thrown (";
02213 str += e.what();
02214 str += ")";
02215 Base::Console().Error(str.c_str());
02216 PyErr_SetString(PyExc_Exception,str.c_str());
02217 return NULL;
02218 }
02219 catch(...)
02220 {
02221 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02222 return NULL;
02223 }
02224 #endif
02225 }
02226
02227
02228
02229
02230 PyObject * TopoShapePy::staticCallback_makeChamfer (PyObject *self, PyObject *args)
02231 {
02232
02233 if (!((PyObjectBase*) self)->isValid()){
02234 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02235 return NULL;
02236 }
02237
02238
02239 try {
02240 PyObject* ret = ((TopoShapePy*)self)->makeChamfer(args);
02241 return ret;
02242 }
02243 catch(const Base::Exception& e)
02244 {
02245 std::string str;
02246 str += "FreeCAD exception thrown (";
02247 str += e.what();
02248 str += ")";
02249 e.ReportException();
02250 PyErr_SetString(PyExc_Exception,str.c_str());
02251 return NULL;
02252 }
02253 catch(const boost::filesystem::filesystem_error& e)
02254 {
02255 std::string str;
02256 str += "File system exception thrown (";
02257
02258
02259 str += e.what();
02260 str += ")\n";
02261 Base::Console().Error(str.c_str());
02262 PyErr_SetString(PyExc_Exception,str.c_str());
02263 return NULL;
02264 }
02265 catch(const Py::Exception&)
02266 {
02267
02268 return NULL;
02269 }
02270 catch(const char* e)
02271 {
02272 Base::Console().Error(e);
02273 PyErr_SetString(PyExc_Exception,e);
02274 return NULL;
02275 }
02276
02277 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02278 catch(const std::exception& e)
02279 {
02280 std::string str;
02281 str += "FC++ exception thrown (";
02282 str += e.what();
02283 str += ")";
02284 Base::Console().Error(str.c_str());
02285 PyErr_SetString(PyExc_Exception,str.c_str());
02286 return NULL;
02287 }
02288 catch(...)
02289 {
02290 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02291 return NULL;
02292 }
02293 #endif
02294 }
02295
02296
02297
02298
02299 PyObject * TopoShapePy::staticCallback_makeThickness (PyObject *self, PyObject *args)
02300 {
02301
02302 if (!((PyObjectBase*) self)->isValid()){
02303 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02304 return NULL;
02305 }
02306
02307
02308 if (((PyObjectBase*) self)->isConst()){
02309 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02310 return NULL;
02311 }
02312
02313 try {
02314 PyObject* ret = ((TopoShapePy*)self)->makeThickness(args);
02315 if (ret != 0)
02316 ((TopoShapePy*)self)->startNotify();
02317 return ret;
02318 }
02319 catch(const Base::Exception& e)
02320 {
02321 std::string str;
02322 str += "FreeCAD exception thrown (";
02323 str += e.what();
02324 str += ")";
02325 e.ReportException();
02326 PyErr_SetString(PyExc_Exception,str.c_str());
02327 return NULL;
02328 }
02329 catch(const boost::filesystem::filesystem_error& e)
02330 {
02331 std::string str;
02332 str += "File system exception thrown (";
02333
02334
02335 str += e.what();
02336 str += ")\n";
02337 Base::Console().Error(str.c_str());
02338 PyErr_SetString(PyExc_Exception,str.c_str());
02339 return NULL;
02340 }
02341 catch(const Py::Exception&)
02342 {
02343
02344 return NULL;
02345 }
02346 catch(const char* e)
02347 {
02348 Base::Console().Error(e);
02349 PyErr_SetString(PyExc_Exception,e);
02350 return NULL;
02351 }
02352
02353 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02354 catch(const std::exception& e)
02355 {
02356 std::string str;
02357 str += "FC++ exception thrown (";
02358 str += e.what();
02359 str += ")";
02360 Base::Console().Error(str.c_str());
02361 PyErr_SetString(PyExc_Exception,str.c_str());
02362 return NULL;
02363 }
02364 catch(...)
02365 {
02366 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02367 return NULL;
02368 }
02369 #endif
02370 }
02371
02372
02373
02374
02375 PyObject * TopoShapePy::staticCallback_makeOffsetShape (PyObject *self, PyObject *args)
02376 {
02377
02378 if (!((PyObjectBase*) self)->isValid()){
02379 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02380 return NULL;
02381 }
02382
02383
02384 if (((PyObjectBase*) self)->isConst()){
02385 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02386 return NULL;
02387 }
02388
02389 try {
02390 PyObject* ret = ((TopoShapePy*)self)->makeOffsetShape(args);
02391 if (ret != 0)
02392 ((TopoShapePy*)self)->startNotify();
02393 return ret;
02394 }
02395 catch(const Base::Exception& e)
02396 {
02397 std::string str;
02398 str += "FreeCAD exception thrown (";
02399 str += e.what();
02400 str += ")";
02401 e.ReportException();
02402 PyErr_SetString(PyExc_Exception,str.c_str());
02403 return NULL;
02404 }
02405 catch(const boost::filesystem::filesystem_error& e)
02406 {
02407 std::string str;
02408 str += "File system exception thrown (";
02409
02410
02411 str += e.what();
02412 str += ")\n";
02413 Base::Console().Error(str.c_str());
02414 PyErr_SetString(PyExc_Exception,str.c_str());
02415 return NULL;
02416 }
02417 catch(const Py::Exception&)
02418 {
02419
02420 return NULL;
02421 }
02422 catch(const char* e)
02423 {
02424 Base::Console().Error(e);
02425 PyErr_SetString(PyExc_Exception,e);
02426 return NULL;
02427 }
02428
02429 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02430 catch(const std::exception& e)
02431 {
02432 std::string str;
02433 str += "FC++ exception thrown (";
02434 str += e.what();
02435 str += ")";
02436 Base::Console().Error(str.c_str());
02437 PyErr_SetString(PyExc_Exception,str.c_str());
02438 return NULL;
02439 }
02440 catch(...)
02441 {
02442 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02443 return NULL;
02444 }
02445 #endif
02446 }
02447
02448
02449
02450
02451 PyObject * TopoShapePy::staticCallback_reverse (PyObject *self, PyObject *args)
02452 {
02453
02454 if (!((PyObjectBase*) self)->isValid()){
02455 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02456 return NULL;
02457 }
02458
02459
02460 if (((PyObjectBase*) self)->isConst()){
02461 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02462 return NULL;
02463 }
02464
02465 try {
02466 PyObject* ret = ((TopoShapePy*)self)->reverse(args);
02467 if (ret != 0)
02468 ((TopoShapePy*)self)->startNotify();
02469 return ret;
02470 }
02471 catch(const Base::Exception& e)
02472 {
02473 std::string str;
02474 str += "FreeCAD exception thrown (";
02475 str += e.what();
02476 str += ")";
02477 e.ReportException();
02478 PyErr_SetString(PyExc_Exception,str.c_str());
02479 return NULL;
02480 }
02481 catch(const boost::filesystem::filesystem_error& e)
02482 {
02483 std::string str;
02484 str += "File system exception thrown (";
02485
02486
02487 str += e.what();
02488 str += ")\n";
02489 Base::Console().Error(str.c_str());
02490 PyErr_SetString(PyExc_Exception,str.c_str());
02491 return NULL;
02492 }
02493 catch(const Py::Exception&)
02494 {
02495
02496 return NULL;
02497 }
02498 catch(const char* e)
02499 {
02500 Base::Console().Error(e);
02501 PyErr_SetString(PyExc_Exception,e);
02502 return NULL;
02503 }
02504
02505 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02506 catch(const std::exception& e)
02507 {
02508 std::string str;
02509 str += "FC++ exception thrown (";
02510 str += e.what();
02511 str += ")";
02512 Base::Console().Error(str.c_str());
02513 PyErr_SetString(PyExc_Exception,str.c_str());
02514 return NULL;
02515 }
02516 catch(...)
02517 {
02518 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02519 return NULL;
02520 }
02521 #endif
02522 }
02523
02524
02525
02526
02527 PyObject * TopoShapePy::staticCallback_complement (PyObject *self, PyObject *args)
02528 {
02529
02530 if (!((PyObjectBase*) self)->isValid()){
02531 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02532 return NULL;
02533 }
02534
02535
02536 if (((PyObjectBase*) self)->isConst()){
02537 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02538 return NULL;
02539 }
02540
02541 try {
02542 PyObject* ret = ((TopoShapePy*)self)->complement(args);
02543 if (ret != 0)
02544 ((TopoShapePy*)self)->startNotify();
02545 return ret;
02546 }
02547 catch(const Base::Exception& e)
02548 {
02549 std::string str;
02550 str += "FreeCAD exception thrown (";
02551 str += e.what();
02552 str += ")";
02553 e.ReportException();
02554 PyErr_SetString(PyExc_Exception,str.c_str());
02555 return NULL;
02556 }
02557 catch(const boost::filesystem::filesystem_error& e)
02558 {
02559 std::string str;
02560 str += "File system exception thrown (";
02561
02562
02563 str += e.what();
02564 str += ")\n";
02565 Base::Console().Error(str.c_str());
02566 PyErr_SetString(PyExc_Exception,str.c_str());
02567 return NULL;
02568 }
02569 catch(const Py::Exception&)
02570 {
02571
02572 return NULL;
02573 }
02574 catch(const char* e)
02575 {
02576 Base::Console().Error(e);
02577 PyErr_SetString(PyExc_Exception,e);
02578 return NULL;
02579 }
02580
02581 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02582 catch(const std::exception& e)
02583 {
02584 std::string str;
02585 str += "FC++ exception thrown (";
02586 str += e.what();
02587 str += ")";
02588 Base::Console().Error(str.c_str());
02589 PyErr_SetString(PyExc_Exception,str.c_str());
02590 return NULL;
02591 }
02592 catch(...)
02593 {
02594 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02595 return NULL;
02596 }
02597 #endif
02598 }
02599
02600
02601
02602
02603 PyObject * TopoShapePy::staticCallback_nullify (PyObject *self, PyObject *args)
02604 {
02605
02606 if (!((PyObjectBase*) self)->isValid()){
02607 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02608 return NULL;
02609 }
02610
02611
02612 if (((PyObjectBase*) self)->isConst()){
02613 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
02614 return NULL;
02615 }
02616
02617 try {
02618 PyObject* ret = ((TopoShapePy*)self)->nullify(args);
02619 if (ret != 0)
02620 ((TopoShapePy*)self)->startNotify();
02621 return ret;
02622 }
02623 catch(const Base::Exception& e)
02624 {
02625 std::string str;
02626 str += "FreeCAD exception thrown (";
02627 str += e.what();
02628 str += ")";
02629 e.ReportException();
02630 PyErr_SetString(PyExc_Exception,str.c_str());
02631 return NULL;
02632 }
02633 catch(const boost::filesystem::filesystem_error& e)
02634 {
02635 std::string str;
02636 str += "File system exception thrown (";
02637
02638
02639 str += e.what();
02640 str += ")\n";
02641 Base::Console().Error(str.c_str());
02642 PyErr_SetString(PyExc_Exception,str.c_str());
02643 return NULL;
02644 }
02645 catch(const Py::Exception&)
02646 {
02647
02648 return NULL;
02649 }
02650 catch(const char* e)
02651 {
02652 Base::Console().Error(e);
02653 PyErr_SetString(PyExc_Exception,e);
02654 return NULL;
02655 }
02656
02657 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02658 catch(const std::exception& e)
02659 {
02660 std::string str;
02661 str += "FC++ exception thrown (";
02662 str += e.what();
02663 str += ")";
02664 Base::Console().Error(str.c_str());
02665 PyErr_SetString(PyExc_Exception,str.c_str());
02666 return NULL;
02667 }
02668 catch(...)
02669 {
02670 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02671 return NULL;
02672 }
02673 #endif
02674 }
02675
02676
02677
02678
02679 PyObject * TopoShapePy::staticCallback_isClosed (PyObject *self, PyObject *args)
02680 {
02681
02682 if (!((PyObjectBase*) self)->isValid()){
02683 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02684 return NULL;
02685 }
02686
02687
02688 try {
02689 PyObject* ret = ((TopoShapePy*)self)->isClosed(args);
02690 return ret;
02691 }
02692 catch(const Base::Exception& e)
02693 {
02694 std::string str;
02695 str += "FreeCAD exception thrown (";
02696 str += e.what();
02697 str += ")";
02698 e.ReportException();
02699 PyErr_SetString(PyExc_Exception,str.c_str());
02700 return NULL;
02701 }
02702 catch(const boost::filesystem::filesystem_error& e)
02703 {
02704 std::string str;
02705 str += "File system exception thrown (";
02706
02707
02708 str += e.what();
02709 str += ")\n";
02710 Base::Console().Error(str.c_str());
02711 PyErr_SetString(PyExc_Exception,str.c_str());
02712 return NULL;
02713 }
02714 catch(const Py::Exception&)
02715 {
02716
02717 return NULL;
02718 }
02719 catch(const char* e)
02720 {
02721 Base::Console().Error(e);
02722 PyErr_SetString(PyExc_Exception,e);
02723 return NULL;
02724 }
02725
02726 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02727 catch(const std::exception& e)
02728 {
02729 std::string str;
02730 str += "FC++ exception thrown (";
02731 str += e.what();
02732 str += ")";
02733 Base::Console().Error(str.c_str());
02734 PyErr_SetString(PyExc_Exception,str.c_str());
02735 return NULL;
02736 }
02737 catch(...)
02738 {
02739 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02740 return NULL;
02741 }
02742 #endif
02743 }
02744
02745
02746
02747
02748 PyObject * TopoShapePy::staticCallback_isSame (PyObject *self, PyObject *args)
02749 {
02750
02751 if (!((PyObjectBase*) self)->isValid()){
02752 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02753 return NULL;
02754 }
02755
02756
02757 try {
02758 PyObject* ret = ((TopoShapePy*)self)->isSame(args);
02759 return ret;
02760 }
02761 catch(const Base::Exception& e)
02762 {
02763 std::string str;
02764 str += "FreeCAD exception thrown (";
02765 str += e.what();
02766 str += ")";
02767 e.ReportException();
02768 PyErr_SetString(PyExc_Exception,str.c_str());
02769 return NULL;
02770 }
02771 catch(const boost::filesystem::filesystem_error& e)
02772 {
02773 std::string str;
02774 str += "File system exception thrown (";
02775
02776
02777 str += e.what();
02778 str += ")\n";
02779 Base::Console().Error(str.c_str());
02780 PyErr_SetString(PyExc_Exception,str.c_str());
02781 return NULL;
02782 }
02783 catch(const Py::Exception&)
02784 {
02785
02786 return NULL;
02787 }
02788 catch(const char* e)
02789 {
02790 Base::Console().Error(e);
02791 PyErr_SetString(PyExc_Exception,e);
02792 return NULL;
02793 }
02794
02795 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02796 catch(const std::exception& e)
02797 {
02798 std::string str;
02799 str += "FC++ exception thrown (";
02800 str += e.what();
02801 str += ")";
02802 Base::Console().Error(str.c_str());
02803 PyErr_SetString(PyExc_Exception,str.c_str());
02804 return NULL;
02805 }
02806 catch(...)
02807 {
02808 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02809 return NULL;
02810 }
02811 #endif
02812 }
02813
02814
02815
02816
02817 PyObject * TopoShapePy::staticCallback_isEqual (PyObject *self, PyObject *args)
02818 {
02819
02820 if (!((PyObjectBase*) self)->isValid()){
02821 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02822 return NULL;
02823 }
02824
02825
02826 try {
02827 PyObject* ret = ((TopoShapePy*)self)->isEqual(args);
02828 return ret;
02829 }
02830 catch(const Base::Exception& e)
02831 {
02832 std::string str;
02833 str += "FreeCAD exception thrown (";
02834 str += e.what();
02835 str += ")";
02836 e.ReportException();
02837 PyErr_SetString(PyExc_Exception,str.c_str());
02838 return NULL;
02839 }
02840 catch(const boost::filesystem::filesystem_error& e)
02841 {
02842 std::string str;
02843 str += "File system exception thrown (";
02844
02845
02846 str += e.what();
02847 str += ")\n";
02848 Base::Console().Error(str.c_str());
02849 PyErr_SetString(PyExc_Exception,str.c_str());
02850 return NULL;
02851 }
02852 catch(const Py::Exception&)
02853 {
02854
02855 return NULL;
02856 }
02857 catch(const char* e)
02858 {
02859 Base::Console().Error(e);
02860 PyErr_SetString(PyExc_Exception,e);
02861 return NULL;
02862 }
02863
02864 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02865 catch(const std::exception& e)
02866 {
02867 std::string str;
02868 str += "FC++ exception thrown (";
02869 str += e.what();
02870 str += ")";
02871 Base::Console().Error(str.c_str());
02872 PyErr_SetString(PyExc_Exception,str.c_str());
02873 return NULL;
02874 }
02875 catch(...)
02876 {
02877 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02878 return NULL;
02879 }
02880 #endif
02881 }
02882
02883
02884
02885
02886 PyObject * TopoShapePy::staticCallback_isNull (PyObject *self, PyObject *args)
02887 {
02888
02889 if (!((PyObjectBase*) self)->isValid()){
02890 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02891 return NULL;
02892 }
02893
02894
02895 try {
02896 PyObject* ret = ((TopoShapePy*)self)->isNull(args);
02897 return ret;
02898 }
02899 catch(const Base::Exception& e)
02900 {
02901 std::string str;
02902 str += "FreeCAD exception thrown (";
02903 str += e.what();
02904 str += ")";
02905 e.ReportException();
02906 PyErr_SetString(PyExc_Exception,str.c_str());
02907 return NULL;
02908 }
02909 catch(const boost::filesystem::filesystem_error& e)
02910 {
02911 std::string str;
02912 str += "File system exception thrown (";
02913
02914
02915 str += e.what();
02916 str += ")\n";
02917 Base::Console().Error(str.c_str());
02918 PyErr_SetString(PyExc_Exception,str.c_str());
02919 return NULL;
02920 }
02921 catch(const Py::Exception&)
02922 {
02923
02924 return NULL;
02925 }
02926 catch(const char* e)
02927 {
02928 Base::Console().Error(e);
02929 PyErr_SetString(PyExc_Exception,e);
02930 return NULL;
02931 }
02932
02933 #ifndef DONT_CATCH_CXX_EXCEPTIONS
02934 catch(const std::exception& e)
02935 {
02936 std::string str;
02937 str += "FC++ exception thrown (";
02938 str += e.what();
02939 str += ")";
02940 Base::Console().Error(str.c_str());
02941 PyErr_SetString(PyExc_Exception,str.c_str());
02942 return NULL;
02943 }
02944 catch(...)
02945 {
02946 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
02947 return NULL;
02948 }
02949 #endif
02950 }
02951
02952
02953
02954
02955 PyObject * TopoShapePy::staticCallback_isValid (PyObject *self, PyObject *args)
02956 {
02957
02958 if (!((PyObjectBase*) self)->isValid()){
02959 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
02960 return NULL;
02961 }
02962
02963
02964 try {
02965 PyObject* ret = ((TopoShapePy*)self)->isValid(args);
02966 return ret;
02967 }
02968 catch(const Base::Exception& e)
02969 {
02970 std::string str;
02971 str += "FreeCAD exception thrown (";
02972 str += e.what();
02973 str += ")";
02974 e.ReportException();
02975 PyErr_SetString(PyExc_Exception,str.c_str());
02976 return NULL;
02977 }
02978 catch(const boost::filesystem::filesystem_error& e)
02979 {
02980 std::string str;
02981 str += "File system exception thrown (";
02982
02983
02984 str += e.what();
02985 str += ")\n";
02986 Base::Console().Error(str.c_str());
02987 PyErr_SetString(PyExc_Exception,str.c_str());
02988 return NULL;
02989 }
02990 catch(const Py::Exception&)
02991 {
02992
02993 return NULL;
02994 }
02995 catch(const char* e)
02996 {
02997 Base::Console().Error(e);
02998 PyErr_SetString(PyExc_Exception,e);
02999 return NULL;
03000 }
03001
03002 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03003 catch(const std::exception& e)
03004 {
03005 std::string str;
03006 str += "FC++ exception thrown (";
03007 str += e.what();
03008 str += ")";
03009 Base::Console().Error(str.c_str());
03010 PyErr_SetString(PyExc_Exception,str.c_str());
03011 return NULL;
03012 }
03013 catch(...)
03014 {
03015 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03016 return NULL;
03017 }
03018 #endif
03019 }
03020
03021
03022
03023
03024 PyObject * TopoShapePy::staticCallback_fix (PyObject *self, PyObject *args)
03025 {
03026
03027 if (!((PyObjectBase*) self)->isValid()){
03028 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03029 return NULL;
03030 }
03031
03032
03033 if (((PyObjectBase*) self)->isConst()){
03034 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
03035 return NULL;
03036 }
03037
03038 try {
03039 PyObject* ret = ((TopoShapePy*)self)->fix(args);
03040 if (ret != 0)
03041 ((TopoShapePy*)self)->startNotify();
03042 return ret;
03043 }
03044 catch(const Base::Exception& e)
03045 {
03046 std::string str;
03047 str += "FreeCAD exception thrown (";
03048 str += e.what();
03049 str += ")";
03050 e.ReportException();
03051 PyErr_SetString(PyExc_Exception,str.c_str());
03052 return NULL;
03053 }
03054 catch(const boost::filesystem::filesystem_error& e)
03055 {
03056 std::string str;
03057 str += "File system exception thrown (";
03058
03059
03060 str += e.what();
03061 str += ")\n";
03062 Base::Console().Error(str.c_str());
03063 PyErr_SetString(PyExc_Exception,str.c_str());
03064 return NULL;
03065 }
03066 catch(const Py::Exception&)
03067 {
03068
03069 return NULL;
03070 }
03071 catch(const char* e)
03072 {
03073 Base::Console().Error(e);
03074 PyErr_SetString(PyExc_Exception,e);
03075 return NULL;
03076 }
03077
03078 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03079 catch(const std::exception& e)
03080 {
03081 std::string str;
03082 str += "FC++ exception thrown (";
03083 str += e.what();
03084 str += ")";
03085 Base::Console().Error(str.c_str());
03086 PyErr_SetString(PyExc_Exception,str.c_str());
03087 return NULL;
03088 }
03089 catch(...)
03090 {
03091 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03092 return NULL;
03093 }
03094 #endif
03095 }
03096
03097
03098
03099
03100 PyObject * TopoShapePy::staticCallback_hashCode (PyObject *self, PyObject *args)
03101 {
03102
03103 if (!((PyObjectBase*) self)->isValid()){
03104 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03105 return NULL;
03106 }
03107
03108
03109 try {
03110 PyObject* ret = ((TopoShapePy*)self)->hashCode(args);
03111 return ret;
03112 }
03113 catch(const Base::Exception& e)
03114 {
03115 std::string str;
03116 str += "FreeCAD exception thrown (";
03117 str += e.what();
03118 str += ")";
03119 e.ReportException();
03120 PyErr_SetString(PyExc_Exception,str.c_str());
03121 return NULL;
03122 }
03123 catch(const boost::filesystem::filesystem_error& e)
03124 {
03125 std::string str;
03126 str += "File system exception thrown (";
03127
03128
03129 str += e.what();
03130 str += ")\n";
03131 Base::Console().Error(str.c_str());
03132 PyErr_SetString(PyExc_Exception,str.c_str());
03133 return NULL;
03134 }
03135 catch(const Py::Exception&)
03136 {
03137
03138 return NULL;
03139 }
03140 catch(const char* e)
03141 {
03142 Base::Console().Error(e);
03143 PyErr_SetString(PyExc_Exception,e);
03144 return NULL;
03145 }
03146
03147 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03148 catch(const std::exception& e)
03149 {
03150 std::string str;
03151 str += "FC++ exception thrown (";
03152 str += e.what();
03153 str += ")";
03154 Base::Console().Error(str.c_str());
03155 PyErr_SetString(PyExc_Exception,str.c_str());
03156 return NULL;
03157 }
03158 catch(...)
03159 {
03160 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03161 return NULL;
03162 }
03163 #endif
03164 }
03165
03166
03167
03168
03169 PyObject * TopoShapePy::staticCallback_tessellate (PyObject *self, PyObject *args)
03170 {
03171
03172 if (!((PyObjectBase*) self)->isValid()){
03173 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03174 return NULL;
03175 }
03176
03177
03178 try {
03179 PyObject* ret = ((TopoShapePy*)self)->tessellate(args);
03180 return ret;
03181 }
03182 catch(const Base::Exception& e)
03183 {
03184 std::string str;
03185 str += "FreeCAD exception thrown (";
03186 str += e.what();
03187 str += ")";
03188 e.ReportException();
03189 PyErr_SetString(PyExc_Exception,str.c_str());
03190 return NULL;
03191 }
03192 catch(const boost::filesystem::filesystem_error& e)
03193 {
03194 std::string str;
03195 str += "File system exception thrown (";
03196
03197
03198 str += e.what();
03199 str += ")\n";
03200 Base::Console().Error(str.c_str());
03201 PyErr_SetString(PyExc_Exception,str.c_str());
03202 return NULL;
03203 }
03204 catch(const Py::Exception&)
03205 {
03206
03207 return NULL;
03208 }
03209 catch(const char* e)
03210 {
03211 Base::Console().Error(e);
03212 PyErr_SetString(PyExc_Exception,e);
03213 return NULL;
03214 }
03215
03216 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03217 catch(const std::exception& e)
03218 {
03219 std::string str;
03220 str += "FC++ exception thrown (";
03221 str += e.what();
03222 str += ")";
03223 Base::Console().Error(str.c_str());
03224 PyErr_SetString(PyExc_Exception,str.c_str());
03225 return NULL;
03226 }
03227 catch(...)
03228 {
03229 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03230 return NULL;
03231 }
03232 #endif
03233 }
03234
03235
03236
03237
03238 PyObject * TopoShapePy::staticCallback_project (PyObject *self, PyObject *args)
03239 {
03240
03241 if (!((PyObjectBase*) self)->isValid()){
03242 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03243 return NULL;
03244 }
03245
03246
03247 if (((PyObjectBase*) self)->isConst()){
03248 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
03249 return NULL;
03250 }
03251
03252 try {
03253 PyObject* ret = ((TopoShapePy*)self)->project(args);
03254 if (ret != 0)
03255 ((TopoShapePy*)self)->startNotify();
03256 return ret;
03257 }
03258 catch(const Base::Exception& e)
03259 {
03260 std::string str;
03261 str += "FreeCAD exception thrown (";
03262 str += e.what();
03263 str += ")";
03264 e.ReportException();
03265 PyErr_SetString(PyExc_Exception,str.c_str());
03266 return NULL;
03267 }
03268 catch(const boost::filesystem::filesystem_error& e)
03269 {
03270 std::string str;
03271 str += "File system exception thrown (";
03272
03273
03274 str += e.what();
03275 str += ")\n";
03276 Base::Console().Error(str.c_str());
03277 PyErr_SetString(PyExc_Exception,str.c_str());
03278 return NULL;
03279 }
03280 catch(const Py::Exception&)
03281 {
03282
03283 return NULL;
03284 }
03285 catch(const char* e)
03286 {
03287 Base::Console().Error(e);
03288 PyErr_SetString(PyExc_Exception,e);
03289 return NULL;
03290 }
03291
03292 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03293 catch(const std::exception& e)
03294 {
03295 std::string str;
03296 str += "FC++ exception thrown (";
03297 str += e.what();
03298 str += ")";
03299 Base::Console().Error(str.c_str());
03300 PyErr_SetString(PyExc_Exception,str.c_str());
03301 return NULL;
03302 }
03303 catch(...)
03304 {
03305 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03306 return NULL;
03307 }
03308 #endif
03309 }
03310
03311
03312
03313
03314 PyObject * TopoShapePy::staticCallback_makeShapeFromMesh (PyObject *self, PyObject *args)
03315 {
03316
03317 if (!((PyObjectBase*) self)->isValid()){
03318 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03319 return NULL;
03320 }
03321
03322
03323 if (((PyObjectBase*) self)->isConst()){
03324 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a non const method");
03325 return NULL;
03326 }
03327
03328 try {
03329 PyObject* ret = ((TopoShapePy*)self)->makeShapeFromMesh(args);
03330 if (ret != 0)
03331 ((TopoShapePy*)self)->startNotify();
03332 return ret;
03333 }
03334 catch(const Base::Exception& e)
03335 {
03336 std::string str;
03337 str += "FreeCAD exception thrown (";
03338 str += e.what();
03339 str += ")";
03340 e.ReportException();
03341 PyErr_SetString(PyExc_Exception,str.c_str());
03342 return NULL;
03343 }
03344 catch(const boost::filesystem::filesystem_error& e)
03345 {
03346 std::string str;
03347 str += "File system exception thrown (";
03348
03349
03350 str += e.what();
03351 str += ")\n";
03352 Base::Console().Error(str.c_str());
03353 PyErr_SetString(PyExc_Exception,str.c_str());
03354 return NULL;
03355 }
03356 catch(const Py::Exception&)
03357 {
03358
03359 return NULL;
03360 }
03361 catch(const char* e)
03362 {
03363 Base::Console().Error(e);
03364 PyErr_SetString(PyExc_Exception,e);
03365 return NULL;
03366 }
03367
03368 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03369 catch(const std::exception& e)
03370 {
03371 std::string str;
03372 str += "FC++ exception thrown (";
03373 str += e.what();
03374 str += ")";
03375 Base::Console().Error(str.c_str());
03376 PyErr_SetString(PyExc_Exception,str.c_str());
03377 return NULL;
03378 }
03379 catch(...)
03380 {
03381 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03382 return NULL;
03383 }
03384 #endif
03385 }
03386
03387
03388
03389
03390 PyObject * TopoShapePy::staticCallback_toNurbs (PyObject *self, PyObject *args)
03391 {
03392
03393 if (!((PyObjectBase*) self)->isValid()){
03394 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03395 return NULL;
03396 }
03397
03398
03399 try {
03400 PyObject* ret = ((TopoShapePy*)self)->toNurbs(args);
03401 return ret;
03402 }
03403 catch(const Base::Exception& e)
03404 {
03405 std::string str;
03406 str += "FreeCAD exception thrown (";
03407 str += e.what();
03408 str += ")";
03409 e.ReportException();
03410 PyErr_SetString(PyExc_Exception,str.c_str());
03411 return NULL;
03412 }
03413 catch(const boost::filesystem::filesystem_error& e)
03414 {
03415 std::string str;
03416 str += "File system exception thrown (";
03417
03418
03419 str += e.what();
03420 str += ")\n";
03421 Base::Console().Error(str.c_str());
03422 PyErr_SetString(PyExc_Exception,str.c_str());
03423 return NULL;
03424 }
03425 catch(const Py::Exception&)
03426 {
03427
03428 return NULL;
03429 }
03430 catch(const char* e)
03431 {
03432 Base::Console().Error(e);
03433 PyErr_SetString(PyExc_Exception,e);
03434 return NULL;
03435 }
03436
03437 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03438 catch(const std::exception& e)
03439 {
03440 std::string str;
03441 str += "FC++ exception thrown (";
03442 str += e.what();
03443 str += ")";
03444 Base::Console().Error(str.c_str());
03445 PyErr_SetString(PyExc_Exception,str.c_str());
03446 return NULL;
03447 }
03448 catch(...)
03449 {
03450 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03451 return NULL;
03452 }
03453 #endif
03454 }
03455
03456
03457
03458
03459 PyObject * TopoShapePy::staticCallback_copy (PyObject *self, PyObject *args)
03460 {
03461
03462 if (!((PyObjectBase*) self)->isValid()){
03463 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03464 return NULL;
03465 }
03466
03467
03468 try {
03469 PyObject* ret = ((TopoShapePy*)self)->copy(args);
03470 return ret;
03471 }
03472 catch(const Base::Exception& e)
03473 {
03474 std::string str;
03475 str += "FreeCAD exception thrown (";
03476 str += e.what();
03477 str += ")";
03478 e.ReportException();
03479 PyErr_SetString(PyExc_Exception,str.c_str());
03480 return NULL;
03481 }
03482 catch(const boost::filesystem::filesystem_error& e)
03483 {
03484 std::string str;
03485 str += "File system exception thrown (";
03486
03487
03488 str += e.what();
03489 str += ")\n";
03490 Base::Console().Error(str.c_str());
03491 PyErr_SetString(PyExc_Exception,str.c_str());
03492 return NULL;
03493 }
03494 catch(const Py::Exception&)
03495 {
03496
03497 return NULL;
03498 }
03499 catch(const char* e)
03500 {
03501 Base::Console().Error(e);
03502 PyErr_SetString(PyExc_Exception,e);
03503 return NULL;
03504 }
03505
03506 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03507 catch(const std::exception& e)
03508 {
03509 std::string str;
03510 str += "FC++ exception thrown (";
03511 str += e.what();
03512 str += ")";
03513 Base::Console().Error(str.c_str());
03514 PyErr_SetString(PyExc_Exception,str.c_str());
03515 return NULL;
03516 }
03517 catch(...)
03518 {
03519 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03520 return NULL;
03521 }
03522 #endif
03523 }
03524
03525
03526
03527
03528 PyObject * TopoShapePy::staticCallback_replaceShape (PyObject *self, PyObject *args)
03529 {
03530
03531 if (!((PyObjectBase*) self)->isValid()){
03532 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03533 return NULL;
03534 }
03535
03536
03537 try {
03538 PyObject* ret = ((TopoShapePy*)self)->replaceShape(args);
03539 return ret;
03540 }
03541 catch(const Base::Exception& e)
03542 {
03543 std::string str;
03544 str += "FreeCAD exception thrown (";
03545 str += e.what();
03546 str += ")";
03547 e.ReportException();
03548 PyErr_SetString(PyExc_Exception,str.c_str());
03549 return NULL;
03550 }
03551 catch(const boost::filesystem::filesystem_error& e)
03552 {
03553 std::string str;
03554 str += "File system exception thrown (";
03555
03556
03557 str += e.what();
03558 str += ")\n";
03559 Base::Console().Error(str.c_str());
03560 PyErr_SetString(PyExc_Exception,str.c_str());
03561 return NULL;
03562 }
03563 catch(const Py::Exception&)
03564 {
03565
03566 return NULL;
03567 }
03568 catch(const char* e)
03569 {
03570 Base::Console().Error(e);
03571 PyErr_SetString(PyExc_Exception,e);
03572 return NULL;
03573 }
03574
03575 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03576 catch(const std::exception& e)
03577 {
03578 std::string str;
03579 str += "FC++ exception thrown (";
03580 str += e.what();
03581 str += ")";
03582 Base::Console().Error(str.c_str());
03583 PyErr_SetString(PyExc_Exception,str.c_str());
03584 return NULL;
03585 }
03586 catch(...)
03587 {
03588 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03589 return NULL;
03590 }
03591 #endif
03592 }
03593
03594
03595
03596
03597 PyObject * TopoShapePy::staticCallback_removeShape (PyObject *self, PyObject *args)
03598 {
03599
03600 if (!((PyObjectBase*) self)->isValid()){
03601 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03602 return NULL;
03603 }
03604
03605
03606 try {
03607 PyObject* ret = ((TopoShapePy*)self)->removeShape(args);
03608 return ret;
03609 }
03610 catch(const Base::Exception& e)
03611 {
03612 std::string str;
03613 str += "FreeCAD exception thrown (";
03614 str += e.what();
03615 str += ")";
03616 e.ReportException();
03617 PyErr_SetString(PyExc_Exception,str.c_str());
03618 return NULL;
03619 }
03620 catch(const boost::filesystem::filesystem_error& e)
03621 {
03622 std::string str;
03623 str += "File system exception thrown (";
03624
03625
03626 str += e.what();
03627 str += ")\n";
03628 Base::Console().Error(str.c_str());
03629 PyErr_SetString(PyExc_Exception,str.c_str());
03630 return NULL;
03631 }
03632 catch(const Py::Exception&)
03633 {
03634
03635 return NULL;
03636 }
03637 catch(const char* e)
03638 {
03639 Base::Console().Error(e);
03640 PyErr_SetString(PyExc_Exception,e);
03641 return NULL;
03642 }
03643
03644 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03645 catch(const std::exception& e)
03646 {
03647 std::string str;
03648 str += "FC++ exception thrown (";
03649 str += e.what();
03650 str += ")";
03651 Base::Console().Error(str.c_str());
03652 PyErr_SetString(PyExc_Exception,str.c_str());
03653 return NULL;
03654 }
03655 catch(...)
03656 {
03657 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03658 return NULL;
03659 }
03660 #endif
03661 }
03662
03663
03664
03665
03666 PyObject * TopoShapePy::staticCallback_isInside (PyObject *self, PyObject *args)
03667 {
03668
03669 if (!((PyObjectBase*) self)->isValid()){
03670 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03671 return NULL;
03672 }
03673
03674
03675 try {
03676 PyObject* ret = ((TopoShapePy*)self)->isInside(args);
03677 return ret;
03678 }
03679 catch(const Base::Exception& e)
03680 {
03681 std::string str;
03682 str += "FreeCAD exception thrown (";
03683 str += e.what();
03684 str += ")";
03685 e.ReportException();
03686 PyErr_SetString(PyExc_Exception,str.c_str());
03687 return NULL;
03688 }
03689 catch(const boost::filesystem::filesystem_error& e)
03690 {
03691 std::string str;
03692 str += "File system exception thrown (";
03693
03694
03695 str += e.what();
03696 str += ")\n";
03697 Base::Console().Error(str.c_str());
03698 PyErr_SetString(PyExc_Exception,str.c_str());
03699 return NULL;
03700 }
03701 catch(const Py::Exception&)
03702 {
03703
03704 return NULL;
03705 }
03706 catch(const char* e)
03707 {
03708 Base::Console().Error(e);
03709 PyErr_SetString(PyExc_Exception,e);
03710 return NULL;
03711 }
03712
03713 #ifndef DONT_CATCH_CXX_EXCEPTIONS
03714 catch(const std::exception& e)
03715 {
03716 std::string str;
03717 str += "FC++ exception thrown (";
03718 str += e.what();
03719 str += ")";
03720 Base::Console().Error(str.c_str());
03721 PyErr_SetString(PyExc_Exception,str.c_str());
03722 return NULL;
03723 }
03724 catch(...)
03725 {
03726 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
03727 return NULL;
03728 }
03729 #endif
03730 }
03731
03732
03733
03734
03735 PyObject * TopoShapePy::staticCallback_getShapeType (PyObject *self, void * )
03736 {
03737 if (!((PyObjectBase*) self)->isValid()){
03738 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03739 return NULL;
03740 }
03741
03742 try {
03743 return Py::new_reference_to(((TopoShapePy*)self)->getShapeType());
03744 } catch (const Py::Exception&) {
03745
03746 return NULL;
03747 } catch (...) {
03748 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'ShapeType' of object 'TopoShape'");
03749 return NULL;
03750 }
03751 }
03752
03753 int TopoShapePy::staticCallback_setShapeType (PyObject *self, PyObject * , void * )
03754 {
03755 if (!((PyObjectBase*) self)->isValid()){
03756 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03757 return -1;
03758 }
03759
03760 PyErr_SetString(PyExc_AttributeError, "Attribute 'ShapeType' of object 'TopoShape' is read-only");
03761 return -1;
03762 }
03763
03764
03765
03766
03767 PyObject * TopoShapePy::staticCallback_getOrientation (PyObject *self, void * )
03768 {
03769 if (!((PyObjectBase*) self)->isValid()){
03770 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03771 return NULL;
03772 }
03773
03774 try {
03775 return Py::new_reference_to(((TopoShapePy*)self)->getOrientation());
03776 } catch (const Py::Exception&) {
03777
03778 return NULL;
03779 } catch (...) {
03780 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Orientation' of object 'TopoShape'");
03781 return NULL;
03782 }
03783 }
03784
03785 int TopoShapePy::staticCallback_setOrientation (PyObject *self, PyObject *value, void * )
03786 {
03787 if (!((PyObjectBase*) self)->isValid()){
03788 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03789 return -1;
03790 }
03791 if (((PyObjectBase*) self)->isConst()){
03792 PyErr_SetString(PyExc_ReferenceError, "This object is immutable, you can not set any attribute or call a method");
03793 return -1;
03794 }
03795
03796 try {
03797 ((TopoShapePy*)self)->setOrientation(Py::String(value,false));
03798 return 0;
03799 } catch (const Py::Exception&) {
03800
03801 return -1;
03802 } catch (...) {
03803 PyErr_SetString(PyExc_Exception, "Unknown exception while writing attribute 'Orientation' of object 'TopoShape'");
03804 return -1;
03805 }
03806 }
03807
03808
03809
03810
03811 PyObject * TopoShapePy::staticCallback_getFaces (PyObject *self, void * )
03812 {
03813 if (!((PyObjectBase*) self)->isValid()){
03814 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03815 return NULL;
03816 }
03817
03818 try {
03819 return Py::new_reference_to(((TopoShapePy*)self)->getFaces());
03820 } catch (const Py::Exception&) {
03821
03822 return NULL;
03823 } catch (...) {
03824 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Faces' of object 'TopoShape'");
03825 return NULL;
03826 }
03827 }
03828
03829 int TopoShapePy::staticCallback_setFaces (PyObject *self, PyObject * , void * )
03830 {
03831 if (!((PyObjectBase*) self)->isValid()){
03832 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03833 return -1;
03834 }
03835
03836 PyErr_SetString(PyExc_AttributeError, "Attribute 'Faces' of object 'TopoShape' is read-only");
03837 return -1;
03838 }
03839
03840
03841
03842
03843 PyObject * TopoShapePy::staticCallback_getVertexes (PyObject *self, void * )
03844 {
03845 if (!((PyObjectBase*) self)->isValid()){
03846 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03847 return NULL;
03848 }
03849
03850 try {
03851 return Py::new_reference_to(((TopoShapePy*)self)->getVertexes());
03852 } catch (const Py::Exception&) {
03853
03854 return NULL;
03855 } catch (...) {
03856 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Vertexes' of object 'TopoShape'");
03857 return NULL;
03858 }
03859 }
03860
03861 int TopoShapePy::staticCallback_setVertexes (PyObject *self, PyObject * , void * )
03862 {
03863 if (!((PyObjectBase*) self)->isValid()){
03864 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03865 return -1;
03866 }
03867
03868 PyErr_SetString(PyExc_AttributeError, "Attribute 'Vertexes' of object 'TopoShape' is read-only");
03869 return -1;
03870 }
03871
03872
03873
03874
03875 PyObject * TopoShapePy::staticCallback_getShells (PyObject *self, void * )
03876 {
03877 if (!((PyObjectBase*) self)->isValid()){
03878 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03879 return NULL;
03880 }
03881
03882 try {
03883 return Py::new_reference_to(((TopoShapePy*)self)->getShells());
03884 } catch (const Py::Exception&) {
03885
03886 return NULL;
03887 } catch (...) {
03888 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Shells' of object 'TopoShape'");
03889 return NULL;
03890 }
03891 }
03892
03893 int TopoShapePy::staticCallback_setShells (PyObject *self, PyObject * , void * )
03894 {
03895 if (!((PyObjectBase*) self)->isValid()){
03896 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03897 return -1;
03898 }
03899
03900 PyErr_SetString(PyExc_AttributeError, "Attribute 'Shells' of object 'TopoShape' is read-only");
03901 return -1;
03902 }
03903
03904
03905
03906
03907 PyObject * TopoShapePy::staticCallback_getSolids (PyObject *self, void * )
03908 {
03909 if (!((PyObjectBase*) self)->isValid()){
03910 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03911 return NULL;
03912 }
03913
03914 try {
03915 return Py::new_reference_to(((TopoShapePy*)self)->getSolids());
03916 } catch (const Py::Exception&) {
03917
03918 return NULL;
03919 } catch (...) {
03920 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Solids' of object 'TopoShape'");
03921 return NULL;
03922 }
03923 }
03924
03925 int TopoShapePy::staticCallback_setSolids (PyObject *self, PyObject * , void * )
03926 {
03927 if (!((PyObjectBase*) self)->isValid()){
03928 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03929 return -1;
03930 }
03931
03932 PyErr_SetString(PyExc_AttributeError, "Attribute 'Solids' of object 'TopoShape' is read-only");
03933 return -1;
03934 }
03935
03936
03937
03938
03939 PyObject * TopoShapePy::staticCallback_getCompSolids (PyObject *self, void * )
03940 {
03941 if (!((PyObjectBase*) self)->isValid()){
03942 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03943 return NULL;
03944 }
03945
03946 try {
03947 return Py::new_reference_to(((TopoShapePy*)self)->getCompSolids());
03948 } catch (const Py::Exception&) {
03949
03950 return NULL;
03951 } catch (...) {
03952 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'CompSolids' of object 'TopoShape'");
03953 return NULL;
03954 }
03955 }
03956
03957 int TopoShapePy::staticCallback_setCompSolids (PyObject *self, PyObject * , void * )
03958 {
03959 if (!((PyObjectBase*) self)->isValid()){
03960 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03961 return -1;
03962 }
03963
03964 PyErr_SetString(PyExc_AttributeError, "Attribute 'CompSolids' of object 'TopoShape' is read-only");
03965 return -1;
03966 }
03967
03968
03969
03970
03971 PyObject * TopoShapePy::staticCallback_getEdges (PyObject *self, void * )
03972 {
03973 if (!((PyObjectBase*) self)->isValid()){
03974 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03975 return NULL;
03976 }
03977
03978 try {
03979 return Py::new_reference_to(((TopoShapePy*)self)->getEdges());
03980 } catch (const Py::Exception&) {
03981
03982 return NULL;
03983 } catch (...) {
03984 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Edges' of object 'TopoShape'");
03985 return NULL;
03986 }
03987 }
03988
03989 int TopoShapePy::staticCallback_setEdges (PyObject *self, PyObject * , void * )
03990 {
03991 if (!((PyObjectBase*) self)->isValid()){
03992 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
03993 return -1;
03994 }
03995
03996 PyErr_SetString(PyExc_AttributeError, "Attribute 'Edges' of object 'TopoShape' is read-only");
03997 return -1;
03998 }
03999
04000
04001
04002
04003 PyObject * TopoShapePy::staticCallback_getWires (PyObject *self, void * )
04004 {
04005 if (!((PyObjectBase*) self)->isValid()){
04006 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04007 return NULL;
04008 }
04009
04010 try {
04011 return Py::new_reference_to(((TopoShapePy*)self)->getWires());
04012 } catch (const Py::Exception&) {
04013
04014 return NULL;
04015 } catch (...) {
04016 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Wires' of object 'TopoShape'");
04017 return NULL;
04018 }
04019 }
04020
04021 int TopoShapePy::staticCallback_setWires (PyObject *self, PyObject * , void * )
04022 {
04023 if (!((PyObjectBase*) self)->isValid()){
04024 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04025 return -1;
04026 }
04027
04028 PyErr_SetString(PyExc_AttributeError, "Attribute 'Wires' of object 'TopoShape' is read-only");
04029 return -1;
04030 }
04031
04032
04033
04034
04035 PyObject * TopoShapePy::staticCallback_getCompounds (PyObject *self, void * )
04036 {
04037 if (!((PyObjectBase*) self)->isValid()){
04038 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04039 return NULL;
04040 }
04041
04042 try {
04043 return Py::new_reference_to(((TopoShapePy*)self)->getCompounds());
04044 } catch (const Py::Exception&) {
04045
04046 return NULL;
04047 } catch (...) {
04048 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Compounds' of object 'TopoShape'");
04049 return NULL;
04050 }
04051 }
04052
04053 int TopoShapePy::staticCallback_setCompounds (PyObject *self, PyObject * , void * )
04054 {
04055 if (!((PyObjectBase*) self)->isValid()){
04056 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04057 return -1;
04058 }
04059
04060 PyErr_SetString(PyExc_AttributeError, "Attribute 'Compounds' of object 'TopoShape' is read-only");
04061 return -1;
04062 }
04063
04064
04065
04066
04067 PyObject * TopoShapePy::staticCallback_getLength (PyObject *self, void * )
04068 {
04069 if (!((PyObjectBase*) self)->isValid()){
04070 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04071 return NULL;
04072 }
04073
04074 try {
04075 return Py::new_reference_to(((TopoShapePy*)self)->getLength());
04076 } catch (const Py::Exception&) {
04077
04078 return NULL;
04079 } catch (...) {
04080 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Length' of object 'TopoShape'");
04081 return NULL;
04082 }
04083 }
04084
04085 int TopoShapePy::staticCallback_setLength (PyObject *self, PyObject * , void * )
04086 {
04087 if (!((PyObjectBase*) self)->isValid()){
04088 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04089 return -1;
04090 }
04091
04092 PyErr_SetString(PyExc_AttributeError, "Attribute 'Length' of object 'TopoShape' is read-only");
04093 return -1;
04094 }
04095
04096
04097
04098
04099 PyObject * TopoShapePy::staticCallback_getArea (PyObject *self, void * )
04100 {
04101 if (!((PyObjectBase*) self)->isValid()){
04102 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04103 return NULL;
04104 }
04105
04106 try {
04107 return Py::new_reference_to(((TopoShapePy*)self)->getArea());
04108 } catch (const Py::Exception&) {
04109
04110 return NULL;
04111 } catch (...) {
04112 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Area' of object 'TopoShape'");
04113 return NULL;
04114 }
04115 }
04116
04117 int TopoShapePy::staticCallback_setArea (PyObject *self, PyObject * , void * )
04118 {
04119 if (!((PyObjectBase*) self)->isValid()){
04120 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04121 return -1;
04122 }
04123
04124 PyErr_SetString(PyExc_AttributeError, "Attribute 'Area' of object 'TopoShape' is read-only");
04125 return -1;
04126 }
04127
04128
04129
04130
04131 PyObject * TopoShapePy::staticCallback_getVolume (PyObject *self, void * )
04132 {
04133 if (!((PyObjectBase*) self)->isValid()){
04134 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04135 return NULL;
04136 }
04137
04138 try {
04139 return Py::new_reference_to(((TopoShapePy*)self)->getVolume());
04140 } catch (const Py::Exception&) {
04141
04142 return NULL;
04143 } catch (...) {
04144 PyErr_SetString(PyExc_Exception, "Unknown exception while reading attribute 'Volume' of object 'TopoShape'");
04145 return NULL;
04146 }
04147 }
04148
04149 int TopoShapePy::staticCallback_setVolume (PyObject *self, PyObject * , void * )
04150 {
04151 if (!((PyObjectBase*) self)->isValid()){
04152 PyErr_SetString(PyExc_ReferenceError, "This object is already deleted most likely through closing a document. This reference is no longer valid!");
04153 return -1;
04154 }
04155
04156 PyErr_SetString(PyExc_AttributeError, "Attribute 'Volume' of object 'TopoShape' is read-only");
04157 return -1;
04158 }
04159
04160
04161
04162
04163
04164
04165 PyParentObject TopoShapePy::Parents[] = { PARENTSPartTopoShapePy };
04166
04167
04168
04169
04170 TopoShapePy::TopoShapePy(TopoShape *pcObject, PyTypeObject *T)
04171 : ComplexGeoDataPy(reinterpret_cast<ComplexGeoDataPy::PointerType>(pcObject), T)
04172 {
04173 }
04174
04175
04176
04177
04178
04179 TopoShapePy::~TopoShapePy()
04180 {
04181 }
04182
04183
04184
04185
04186 PyObject *TopoShapePy::_repr(void)
04187 {
04188 return Py_BuildValue("s", representation().c_str());
04189 }
04190
04191
04192
04193
04194 PyObject *TopoShapePy::_getattr(char *attr)
04195 {
04196 try {
04197
04198 PyObject *r = getCustomAttributes(attr);
04199 if(r) return r;
04200 }
04201 #ifndef DONT_CATCH_CXX_EXCEPTIONS
04202 catch(const Base::Exception& e)
04203 {
04204 std::string str;
04205 str += "FreeCAD exception thrown (";
04206 str += e.what();
04207 str += ")";
04208 e.ReportException();
04209 PyErr_SetString(PyExc_Exception,str.c_str());
04210 return NULL;
04211 }
04212 catch(const std::exception& e)
04213 {
04214 std::string str;
04215 str += "FC++ exception thrown (";
04216 str += e.what();
04217 str += ")";
04218 Base::Console().Error(str.c_str());
04219 PyErr_SetString(PyExc_Exception,str.c_str());
04220 return NULL;
04221 }
04222 catch(const Py::Exception&)
04223 {
04224
04225 return NULL;
04226 }
04227 catch(...)
04228 {
04229 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
04230 return NULL;
04231 }
04232 #else // DONT_CATCH_CXX_EXCEPTIONS
04233 catch(const Base::Exception& e)
04234 {
04235 std::string str;
04236 str += "FreeCAD exception thrown (";
04237 str += e.what();
04238 str += ")";
04239 e.ReportException();
04240 PyErr_SetString(PyExc_Exception,str.c_str());
04241 return NULL;
04242 }
04243 catch(const Py::Exception&)
04244 {
04245
04246 return NULL;
04247 }
04248 #endif // DONT_CATCH_CXX_EXCEPTIONS
04249
04250 PyObject *rvalue = Py_FindMethod(Methods, this, attr);
04251 if (rvalue == NULL)
04252 {
04253 PyErr_Clear();
04254 return ComplexGeoDataPy::_getattr(attr);
04255 }
04256 else
04257 {
04258 return rvalue;
04259 }
04260 }
04261
04262 int TopoShapePy::_setattr(char *attr, PyObject *value)
04263 {
04264 try {
04265
04266 int r = setCustomAttributes(attr, value);
04267 if(r==1) return 0;
04268 }
04269 #ifndef DONT_CATCH_CXX_EXCEPTIONS
04270 catch(const Base::Exception& e)
04271 {
04272 std::string str;
04273 str += "FreeCAD exception thrown (";
04274 str += e.what();
04275 str += ")";
04276 e.ReportException();
04277 PyErr_SetString(PyExc_Exception,str.c_str());
04278 return -1;
04279 }
04280 catch(const std::exception& e)
04281 {
04282 std::string str;
04283 str += "FC++ exception thrown (";
04284 str += e.what();
04285 str += ")";
04286 Base::Console().Error(str.c_str());
04287 PyErr_SetString(PyExc_Exception,str.c_str());
04288 return -1;
04289 }
04290 catch(const Py::Exception&)
04291 {
04292
04293 return -1;
04294 }
04295 catch(...)
04296 {
04297 PyErr_SetString(PyExc_Exception,"Unknown C++ exception");
04298 return -1;
04299 }
04300 #else // DONT_CATCH_CXX_EXCEPTIONS
04301 catch(const Base::Exception& e)
04302 {
04303 std::string str;
04304 str += "FreeCAD exception thrown (";
04305 str += e.what();
04306 str += ")";
04307 e.ReportException();
04308 PyErr_SetString(PyExc_Exception,str.c_str());
04309 return -1;
04310 }
04311 catch(const Py::Exception&)
04312 {
04313
04314 return -1;
04315 }
04316 #endif // DONT_CATCH_CXX_EXCEPTIONS
04317
04318 return ComplexGeoDataPy::_setattr(attr, value);
04319 }
04320
04321 TopoShape *TopoShapePy::getTopoShapePtr(void) const
04322 {
04323 return static_cast<TopoShape *>(_pcTwinPointer);
04324 }
04325
04326 #if 0
04327
04328
04329
04330
04331 PyObject *TopoShapePy::PyMake(struct _typeobject *, PyObject *, PyObject *)
04332 {
04333
04334 return new TopoShapePy(new TopoShape);
04335 }
04336
04337
04338 int TopoShapePy::PyInit(PyObject* , PyObject* )
04339 {
04340 return 0;
04341 }
04342
04343
04344 std::string TopoShapePy::representation(void) const
04345 {
04346 return std::string("<TopoShape object>");
04347 }
04348
04349 PyObject* TopoShapePy::read(PyObject *args)
04350 {
04351 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04352 return 0;
04353 }
04354
04355 PyObject* TopoShapePy::writeInventor(PyObject *args)
04356 {
04357 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04358 return 0;
04359 }
04360
04361 PyObject* TopoShapePy::exportIges(PyObject *args)
04362 {
04363 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04364 return 0;
04365 }
04366
04367 PyObject* TopoShapePy::exportStep(PyObject *args)
04368 {
04369 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04370 return 0;
04371 }
04372
04373 PyObject* TopoShapePy::exportBrep(PyObject *args)
04374 {
04375 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04376 return 0;
04377 }
04378
04379 PyObject* TopoShapePy::exportStl(PyObject *args)
04380 {
04381 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04382 return 0;
04383 }
04384
04385 PyObject* TopoShapePy::extrude(PyObject *args)
04386 {
04387 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04388 return 0;
04389 }
04390
04391 PyObject* TopoShapePy::revolve(PyObject *args)
04392 {
04393 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04394 return 0;
04395 }
04396
04397 PyObject* TopoShapePy::check(PyObject *args)
04398 {
04399 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04400 return 0;
04401 }
04402
04403 PyObject* TopoShapePy::fuse(PyObject *args)
04404 {
04405 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04406 return 0;
04407 }
04408
04409 PyObject* TopoShapePy::oldFuse(PyObject *args)
04410 {
04411 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04412 return 0;
04413 }
04414
04415 PyObject* TopoShapePy::common(PyObject *args)
04416 {
04417 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04418 return 0;
04419 }
04420
04421 PyObject* TopoShapePy::section(PyObject *args)
04422 {
04423 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04424 return 0;
04425 }
04426
04427 PyObject* TopoShapePy::slices(PyObject *args)
04428 {
04429 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04430 return 0;
04431 }
04432
04433 PyObject* TopoShapePy::slice(PyObject *args)
04434 {
04435 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04436 return 0;
04437 }
04438
04439 PyObject* TopoShapePy::cut(PyObject *args)
04440 {
04441 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04442 return 0;
04443 }
04444
04445 PyObject* TopoShapePy::sewShape(PyObject *args)
04446 {
04447 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04448 return 0;
04449 }
04450
04451 PyObject* TopoShapePy::removeInternalWires(PyObject *args)
04452 {
04453 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04454 return 0;
04455 }
04456
04457 PyObject* TopoShapePy::mirror(PyObject *args)
04458 {
04459 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04460 return 0;
04461 }
04462
04463 PyObject* TopoShapePy::transformGeometry(PyObject *args)
04464 {
04465 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04466 return 0;
04467 }
04468
04469 PyObject* TopoShapePy::transformShape(PyObject *args)
04470 {
04471 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04472 return 0;
04473 }
04474
04475 PyObject* TopoShapePy::translate(PyObject *args)
04476 {
04477 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04478 return 0;
04479 }
04480
04481 PyObject* TopoShapePy::rotate(PyObject *args)
04482 {
04483 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04484 return 0;
04485 }
04486
04487 PyObject* TopoShapePy::scale(PyObject *args)
04488 {
04489 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04490 return 0;
04491 }
04492
04493 PyObject* TopoShapePy::makeFillet(PyObject *args)
04494 {
04495 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04496 return 0;
04497 }
04498
04499 PyObject* TopoShapePy::makeChamfer(PyObject *args)
04500 {
04501 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04502 return 0;
04503 }
04504
04505 PyObject* TopoShapePy::makeThickness(PyObject *args)
04506 {
04507 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04508 return 0;
04509 }
04510
04511 PyObject* TopoShapePy::makeOffsetShape(PyObject *args)
04512 {
04513 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04514 return 0;
04515 }
04516
04517 PyObject* TopoShapePy::reverse(PyObject *args)
04518 {
04519 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04520 return 0;
04521 }
04522
04523 PyObject* TopoShapePy::complement(PyObject *args)
04524 {
04525 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04526 return 0;
04527 }
04528
04529 PyObject* TopoShapePy::nullify(PyObject *args)
04530 {
04531 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04532 return 0;
04533 }
04534
04535 PyObject* TopoShapePy::isClosed(PyObject *args)
04536 {
04537 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04538 return 0;
04539 }
04540
04541 PyObject* TopoShapePy::isSame(PyObject *args)
04542 {
04543 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04544 return 0;
04545 }
04546
04547 PyObject* TopoShapePy::isEqual(PyObject *args)
04548 {
04549 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04550 return 0;
04551 }
04552
04553 PyObject* TopoShapePy::isNull(PyObject *args)
04554 {
04555 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04556 return 0;
04557 }
04558
04559 PyObject* TopoShapePy::isValid(PyObject *args)
04560 {
04561 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04562 return 0;
04563 }
04564
04565 PyObject* TopoShapePy::fix(PyObject *args)
04566 {
04567 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04568 return 0;
04569 }
04570
04571 PyObject* TopoShapePy::hashCode(PyObject *args)
04572 {
04573 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04574 return 0;
04575 }
04576
04577 PyObject* TopoShapePy::tessellate(PyObject *args)
04578 {
04579 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04580 return 0;
04581 }
04582
04583 PyObject* TopoShapePy::project(PyObject *args)
04584 {
04585 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04586 return 0;
04587 }
04588
04589 PyObject* TopoShapePy::makeShapeFromMesh(PyObject *args)
04590 {
04591 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04592 return 0;
04593 }
04594
04595 PyObject* TopoShapePy::toNurbs(PyObject *args)
04596 {
04597 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04598 return 0;
04599 }
04600
04601 PyObject* TopoShapePy::copy(PyObject *args)
04602 {
04603 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04604 return 0;
04605 }
04606
04607 PyObject* TopoShapePy::replaceShape(PyObject *args)
04608 {
04609 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04610 return 0;
04611 }
04612
04613 PyObject* TopoShapePy::removeShape(PyObject *args)
04614 {
04615 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04616 return 0;
04617 }
04618
04619 PyObject* TopoShapePy::isInside(PyObject *args)
04620 {
04621 PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented");
04622 return 0;
04623 }
04624
04625
04626
04627 Py::String TopoShapePy::getShapeType(void) const
04628 {
04629
04630 throw Py::AttributeError("Not yet implemented");
04631 }
04632
04633 Py::String TopoShapePy::getOrientation(void) const
04634 {
04635
04636 throw Py::AttributeError("Not yet implemented");
04637 }
04638
04639 void TopoShapePy::setOrientation(Py::String arg)
04640 {
04641 throw Py::AttributeError("Not yet implemented");
04642 }
04643
04644 Py::List TopoShapePy::getFaces(void) const
04645 {
04646
04647 throw Py::AttributeError("Not yet implemented");
04648 }
04649
04650 Py::List TopoShapePy::getVertexes(void) const
04651 {
04652
04653 throw Py::AttributeError("Not yet implemented");
04654 }
04655
04656 Py::List TopoShapePy::getShells(void) const
04657 {
04658
04659 throw Py::AttributeError("Not yet implemented");
04660 }
04661
04662 Py::List TopoShapePy::getSolids(void) const
04663 {
04664
04665 throw Py::AttributeError("Not yet implemented");
04666 }
04667
04668 Py::List TopoShapePy::getCompSolids(void) const
04669 {
04670
04671 throw Py::AttributeError("Not yet implemented");
04672 }
04673
04674 Py::List TopoShapePy::getEdges(void) const
04675 {
04676
04677 throw Py::AttributeError("Not yet implemented");
04678 }
04679
04680 Py::List TopoShapePy::getWires(void) const
04681 {
04682
04683 throw Py::AttributeError("Not yet implemented");
04684 }
04685
04686 Py::List TopoShapePy::getCompounds(void) const
04687 {
04688
04689 throw Py::AttributeError("Not yet implemented");
04690 }
04691
04692 Py::Float TopoShapePy::getLength(void) const
04693 {
04694
04695 throw Py::AttributeError("Not yet implemented");
04696 }
04697
04698 Py::Float TopoShapePy::getArea(void) const
04699 {
04700
04701 throw Py::AttributeError("Not yet implemented");
04702 }
04703
04704 Py::Float TopoShapePy::getVolume(void) const
04705 {
04706
04707 throw Py::AttributeError("Not yet implemented");
04708 }
04709
04710 PyObject *TopoShapePy::getCustomAttributes(const char* attr) const
04711 {
04712 return 0;
04713 }
04714
04715 int TopoShapePy::setCustomAttributes(const char* attr, PyObject *obj)
04716 {
04717 return 0;
04718 }
04719 #endif
04720
04721
04722