Py::Object MeshPointPy::getVector(void) const { MeshPointPy::PointerType ptr = reinterpret_cast<MeshPointPy::PointerType>(_pcTwinPointer); Base::VectorPy* vec = new Base::VectorPy(*ptr); vec->setConst(); return Py::Object(vec,true); }
Py::Object MeshPointPy::getNormal(void) const { if (!getMeshPointPtr()->isBound()) PyErr_SetString(Base::BaseExceptionFreeCADError, "This object is not bounded to a mesh, so no topological operation is possible!"); Base::Vector3d* v = new Base::Vector3d(getMeshPointPtr()->Mesh->getPointNormal(getMeshPointPtr()->Index)); Base::VectorPy* normal = new Base::VectorPy(v); normal->setConst(); return Py::Object(normal,true); }