// python wrapper for vtkLineSource // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkLineSource.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkLineSource(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkLineSource_ClassNew(); } #ifndef DECLARED_PyvtkPolyDataAlgorithm_ClassNew extern "C" { PyObject *PyvtkPolyDataAlgorithm_ClassNew(); } #define DECLARED_PyvtkPolyDataAlgorithm_ClassNew #endif static const char *PyvtkLineSource_Doc = "vtkLineSource - create a line defined by two end points\n\n" "Superclass: vtkPolyDataAlgorithm\n\n" "vtkLineSource is a source object that creates a polyline defined by\n" "two endpoints. The number of segments composing the polyline is\n" "controlled by setting the object resolution.\n\n" "@par Thanks: This class was extended by Philippe Pebay, Kitware SAS\n" "2011, to support broken lines as well as simple lines.\n\n"; static PyObject * PyvtkLineSource_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkLineSource::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLineSource_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkLineSource::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLineSource_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkLineSource *tempr = vtkLineSource::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkLineSource_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkLineSource *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkLineSource::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkLineSource_SetPoint1_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoint1"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); double temp0; double temp1; double temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2)) { if (ap.IsBound()) { op->SetPoint1(temp0, temp1, temp2); } else { op->vtkLineSource::SetPoint1(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_SetPoint1_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoint1"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); const int size0 = 3; double temp0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { if (ap.IsBound()) { op->SetPoint1(temp0); } else { op->vtkLineSource::SetPoint1(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_SetPoint1(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkLineSource_SetPoint1_s1(self, args); case 1: return PyvtkLineSource_SetPoint1_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetPoint1"); return nullptr; } static PyObject * PyvtkLineSource_GetPoint1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPoint1"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); int sizer = 3; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetPoint1() : op->vtkLineSource::GetPoint1()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkLineSource_SetPoint2_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoint2"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); double temp0; double temp1; double temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2)) { if (ap.IsBound()) { op->SetPoint2(temp0, temp1, temp2); } else { op->vtkLineSource::SetPoint2(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_SetPoint2_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoint2"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); const int size0 = 3; double temp0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { if (ap.IsBound()) { op->SetPoint2(temp0); } else { op->vtkLineSource::SetPoint2(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_SetPoint2(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkLineSource_SetPoint2_s1(self, args); case 1: return PyvtkLineSource_SetPoint2_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetPoint2"); return nullptr; } static PyObject * PyvtkLineSource_GetPoint2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPoint2"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); int sizer = 3; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetPoint2() : op->vtkLineSource::GetPoint2()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkLineSource_SetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); vtkPoints *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkPoints")) { if (ap.IsBound()) { op->SetPoints(temp0); } else { op->vtkLineSource::SetPoints(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_GetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPoints *tempr = (ap.IsBound() ? op->GetPoints() : op->vtkLineSource::GetPoints()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkLineSource_SetResolution(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetResolution"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetResolution(temp0); } else { op->vtkLineSource::SetResolution(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_GetResolutionMinValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetResolutionMinValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetResolutionMinValue() : op->vtkLineSource::GetResolutionMinValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLineSource_GetResolutionMaxValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetResolutionMaxValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetResolutionMaxValue() : op->vtkLineSource::GetResolutionMaxValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLineSource_GetResolution(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetResolution"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetResolution() : op->vtkLineSource::GetResolution()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkLineSource_SetOutputPointsPrecision(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOutputPointsPrecision"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOutputPointsPrecision(temp0); } else { op->vtkLineSource::SetOutputPointsPrecision(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkLineSource_GetOutputPointsPrecision(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOutputPointsPrecision"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetOutputPointsPrecision() : op->vtkLineSource::GetOutputPointsPrecision()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkLineSource_Methods[] = { {"IsTypeOf", PyvtkLineSource_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkLineSource_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkLineSource_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkLineSource\nC++: static vtkLineSource *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkLineSource_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkLineSource\nC++: vtkLineSource *NewInstance()\n\n"}, {"SetPoint1", PyvtkLineSource_SetPoint1, METH_VARARGS, "V.SetPoint1(float, float, float)\nC++: void SetPoint1(double, double, double)\nV.SetPoint1((float, float, float))\nC++: void SetPoint1(double a[3])\n\n"}, {"GetPoint1", PyvtkLineSource_GetPoint1, METH_VARARGS, "V.GetPoint1() -> (float, float, float)\nC++: double *GetPoint1()\n\nSet position of first end point.\n"}, {"SetPoint2", PyvtkLineSource_SetPoint2, METH_VARARGS, "V.SetPoint2(float, float, float)\nC++: void SetPoint2(double, double, double)\nV.SetPoint2((float, float, float))\nC++: void SetPoint2(double a[3])\n\n"}, {"GetPoint2", PyvtkLineSource_GetPoint2, METH_VARARGS, "V.GetPoint2() -> (float, float, float)\nC++: double *GetPoint2()\n\nSet position of other end point.\n"}, {"SetPoints", PyvtkLineSource_SetPoints, METH_VARARGS, "V.SetPoints(vtkPoints)\nC++: virtual void SetPoints(vtkPoints *)\n\nSet/Get the list of points defining a broken line\n"}, {"GetPoints", PyvtkLineSource_GetPoints, METH_VARARGS, "V.GetPoints() -> vtkPoints\nC++: virtual vtkPoints *GetPoints()\n\nSet/Get the list of points defining a broken line\n"}, {"SetResolution", PyvtkLineSource_SetResolution, METH_VARARGS, "V.SetResolution(int)\nC++: virtual void SetResolution(int _arg)\n\nDivide line into Resolution number of pieces.\n"}, {"GetResolutionMinValue", PyvtkLineSource_GetResolutionMinValue, METH_VARARGS, "V.GetResolutionMinValue() -> int\nC++: virtual int GetResolutionMinValue()\n\nDivide line into Resolution number of pieces.\n"}, {"GetResolutionMaxValue", PyvtkLineSource_GetResolutionMaxValue, METH_VARARGS, "V.GetResolutionMaxValue() -> int\nC++: virtual int GetResolutionMaxValue()\n\nDivide line into Resolution number of pieces.\n"}, {"GetResolution", PyvtkLineSource_GetResolution, METH_VARARGS, "V.GetResolution() -> int\nC++: virtual int GetResolution()\n\nDivide line into Resolution number of pieces.\n"}, {"SetOutputPointsPrecision", PyvtkLineSource_SetOutputPointsPrecision, METH_VARARGS, "V.SetOutputPointsPrecision(int)\nC++: virtual void SetOutputPointsPrecision(int _arg)\n\nSet/get the desired precision for the output points.\nvtkAlgorithm::SINGLE_PRECISION - Output single-precision floating\npoint. vtkAlgorithm::DOUBLE_PRECISION - Output double-precision\nfloating point.\n"}, {"GetOutputPointsPrecision", PyvtkLineSource_GetOutputPointsPrecision, METH_VARARGS, "V.GetOutputPointsPrecision() -> int\nC++: virtual int GetOutputPointsPrecision()\n\nSet/get the desired precision for the output points.\nvtkAlgorithm::SINGLE_PRECISION - Output single-precision floating\npoint. vtkAlgorithm::DOUBLE_PRECISION - Output double-precision\nfloating point.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkLineSource_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkFiltersSourcesPython.vtkLineSource", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkLineSource_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkLineSource_StaticNew() { return vtkLineSource::New(); } PyObject *PyvtkLineSource_ClassNew() { PyVTKClass_Add( &PyvtkLineSource_Type, PyvtkLineSource_Methods, "vtkLineSource", &PyvtkLineSource_StaticNew); PyTypeObject *pytype = &PyvtkLineSource_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkPolyDataAlgorithm_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkLineSource( PyObject *dict) { PyObject *o; o = PyvtkLineSource_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkLineSource", o) != 0) { Py_DECREF(o); } }