// python wrapper for vtkPolyLineSource // #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 "vtkPolyLineSource.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkPolyLineSource(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkPolyLineSource_ClassNew(); } #ifndef DECLARED_PyvtkPolyDataAlgorithm_ClassNew extern "C" { PyObject *PyvtkPolyDataAlgorithm_ClassNew(); } #define DECLARED_PyvtkPolyDataAlgorithm_ClassNew #endif static const char *PyvtkPolyLineSource_Doc = "vtkPolyLineSource - create a poly line from a list of input points\n\n" "Superclass: vtkPolyDataAlgorithm\n\n" "vtkPolyLineSource is a source object that creates a poly line from\n" "user-specified points. The output is a vtkPolyLine.\n\n"; static PyObject * PyvtkPolyLineSource_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkPolyLineSource::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyLineSource_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *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->vtkPolyLineSource::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyLineSource_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkPolyLineSource *tempr = vtkPolyLineSource::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPolyLineSource_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPolyLineSource *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkPolyLineSource::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 * PyvtkPolyLineSource_SetNumberOfPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNumberOfPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetNumberOfPoints(temp0); } else { op->vtkPolyLineSource::SetNumberOfPoints(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyLineSource_GetNumberOfPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkIdType tempr = (ap.IsBound() ? op->GetNumberOfPoints() : op->vtkPolyLineSource::GetNumberOfPoints()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyLineSource_Resize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Resize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->Resize(temp0); } else { op->vtkPolyLineSource::Resize(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyLineSource_SetPoint(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoint"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); vtkIdType temp0; double temp1; double temp2; double temp3; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2) && ap.GetValue(temp3)) { if (ap.IsBound()) { op->SetPoint(temp0, temp1, temp2, temp3); } else { op->vtkPolyLineSource::SetPoint(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyLineSource_SetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *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->vtkPolyLineSource::SetPoints(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyLineSource_GetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPoints *tempr = (ap.IsBound() ? op->GetPoints() : op->vtkPolyLineSource::GetPoints()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPolyLineSource_SetClosed(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetClosed"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetClosed(temp0); } else { op->vtkPolyLineSource::SetClosed(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyLineSource_GetClosed(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetClosed"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetClosed() : op->vtkPolyLineSource::GetClosed()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPolyLineSource_ClosedOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ClosedOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ClosedOn(); } else { op->vtkPolyLineSource::ClosedOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPolyLineSource_ClosedOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ClosedOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPolyLineSource *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ClosedOff(); } else { op->vtkPolyLineSource::ClosedOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkPolyLineSource_Methods[] = { {"IsTypeOf", PyvtkPolyLineSource_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", PyvtkPolyLineSource_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", PyvtkPolyLineSource_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkPolyLineSource\nC++: static vtkPolyLineSource *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkPolyLineSource_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkPolyLineSource\nC++: vtkPolyLineSource *NewInstance()\n\n"}, {"SetNumberOfPoints", PyvtkPolyLineSource_SetNumberOfPoints, METH_VARARGS, "V.SetNumberOfPoints(int)\nC++: void SetNumberOfPoints(vtkIdType numPoints)\n\nSet the number of points in the poly line.\n"}, {"GetNumberOfPoints", PyvtkPolyLineSource_GetNumberOfPoints, METH_VARARGS, "V.GetNumberOfPoints() -> int\nC++: vtkIdType GetNumberOfPoints()\n\nSet the number of points in the poly line.\n"}, {"Resize", PyvtkPolyLineSource_Resize, METH_VARARGS, "V.Resize(int)\nC++: void Resize(vtkIdType numPoints)\n\nResize while preserving data.\n"}, {"SetPoint", PyvtkPolyLineSource_SetPoint, METH_VARARGS, "V.SetPoint(int, float, float, float)\nC++: void SetPoint(vtkIdType id, double x, double y, double z)\n\nSet a point location.\n"}, {"SetPoints", PyvtkPolyLineSource_SetPoints, METH_VARARGS, "V.SetPoints(vtkPoints)\nC++: void SetPoints(vtkPoints *points)\n\nGet the points.\n"}, {"GetPoints", PyvtkPolyLineSource_GetPoints, METH_VARARGS, "V.GetPoints() -> vtkPoints\nC++: virtual vtkPoints *GetPoints()\n\nGet the points.\n"}, {"SetClosed", PyvtkPolyLineSource_SetClosed, METH_VARARGS, "V.SetClosed(int)\nC++: virtual void SetClosed(int _arg)\n\nSet whether to close the poly line by connecting the last and\nfirst points.\n"}, {"GetClosed", PyvtkPolyLineSource_GetClosed, METH_VARARGS, "V.GetClosed() -> int\nC++: virtual int GetClosed()\n\nSet whether to close the poly line by connecting the last and\nfirst points.\n"}, {"ClosedOn", PyvtkPolyLineSource_ClosedOn, METH_VARARGS, "V.ClosedOn()\nC++: virtual void ClosedOn()\n\nSet whether to close the poly line by connecting the last and\nfirst points.\n"}, {"ClosedOff", PyvtkPolyLineSource_ClosedOff, METH_VARARGS, "V.ClosedOff()\nC++: virtual void ClosedOff()\n\nSet whether to close the poly line by connecting the last and\nfirst points.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkPolyLineSource_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkFiltersSourcesPython.vtkPolyLineSource", // 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 PyvtkPolyLineSource_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 *PyvtkPolyLineSource_StaticNew() { return vtkPolyLineSource::New(); } PyObject *PyvtkPolyLineSource_ClassNew() { PyVTKClass_Add( &PyvtkPolyLineSource_Type, PyvtkPolyLineSource_Methods, "vtkPolyLineSource", &PyvtkPolyLineSource_StaticNew); PyTypeObject *pytype = &PyvtkPolyLineSource_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_vtkPolyLineSource( PyObject *dict) { PyObject *o; o = PyvtkPolyLineSource_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkPolyLineSource", o) != 0) { Py_DECREF(o); } }