From 897a66cbb7dcfcd2654e89d9c8d0fa72580fdafb Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Fri, 6 May 2016 16:50:11 +0300 Subject: [PATCH] Attacher: Py: withdraw positionBySupport from Part2DObject to be reintroduced later in AttachableObjet Py interface --- src/Mod/Part/App/Part2DObjectPy.xml | 7 ------- src/Mod/Part/App/Part2DObjectPyImp.cpp | 17 ----------------- 2 files changed, 24 deletions(-) diff --git a/src/Mod/Part/App/Part2DObjectPy.xml b/src/Mod/Part/App/Part2DObjectPy.xml index 4698128f17d2..7172b2fb9deb 100644 --- a/src/Mod/Part/App/Part2DObjectPy.xml +++ b/src/Mod/Part/App/Part2DObjectPy.xml @@ -13,12 +13,5 @@ This object represents a 2D Shape in a 3D World - - - positionBySupport(): Reposition object based on Support, MapMode and MapPathParameter properties. -Returns True if attachment calculation was successful, false if object is not attached and Placement wasn't updated, -and raises an exception if attachment calculation fails. - - diff --git a/src/Mod/Part/App/Part2DObjectPyImp.cpp b/src/Mod/Part/App/Part2DObjectPyImp.cpp index ed5a01b2c078..795e5aba4592 100644 --- a/src/Mod/Part/App/Part2DObjectPyImp.cpp +++ b/src/Mod/Part/App/Part2DObjectPyImp.cpp @@ -16,23 +16,6 @@ std::string Part2DObjectPy::representation(void) const return std::string(""); } -PyObject* Part2DObjectPy::positionBySupport(PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return 0; - bool bAttached = false; - try{ - bAttached = this->getPart2DObjectPtr()->positionBySupport(); - } catch (Standard_Failure) { - Handle_Standard_Failure e = Standard_Failure::Caught(); - PyErr_SetString(PartExceptionOCCError, e->GetMessageString()); - return NULL; - } catch (Base::Exception &e) { - PyErr_SetString(Base::BaseExceptionFreeCADError, e.what()); - return NULL; - } - return Py::new_reference_to(Py::Boolean(bAttached)); -} PyObject *Part2DObjectPy::getCustomAttributes(const char* /*attr*/) const