26 Interface0DIterator_doc,
27 "Class hierarchy: :class:`Iterator` > :class:`Interface0DIterator`\n"
29 "Class defining an iterator over Interface0D elements. An instance of\n"
30 "this iterator is always obtained from a 1D element.\n"
32 ".. method:: __init__(brother)\n"
35 " Construct a nested Interface0DIterator using either the copy constructor\n"
36 " or the constructor that takes an he argument of a Function0D.\n"
38 " :arg brother: An Interface0DIterator object.\n"
39 " :type brother: :class:`Interface0DIterator`\n"
40 " :arg it: An iterator object to be nested.\n"
41 " :type it: :class:`SVertexIterator`, :class:`CurvePointIterator`, or\n"
42 " :class:`StrokeVertexIterator`");
60 static const char *kwlist_1[] = {
"it",
nullptr};
61 static const char *kwlist_2[] = {
"inter",
nullptr};
62 static const char *kwlist_3[] = {
"brother",
nullptr};
64 PyObject *brother, *inter;
66 if (PyArg_ParseTupleAndKeywords(
70 self->at_start =
true;
71 self->reversed =
false;
73 else if ((
void)PyErr_Clear(),
74 PyArg_ParseTupleAndKeywords(
78 self->at_start =
true;
79 self->reversed =
false;
81 else if ((
void)PyErr_Clear(),
82 PyArg_ParseTupleAndKeywords(
90 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
100 self->at_start =
true;
101 return (PyObject *)
self;
106 if (
self->reversed) {
107 if (
self->if0D_it->isBegin()) {
108 PyErr_SetNone(PyExc_StopIteration);
111 self->if0D_it->decrement();
114 if (
self->if0D_it->isEnd()) {
115 PyErr_SetNone(PyExc_StopIteration);
118 if (
self->at_start) {
119 self->at_start =
false;
121 else if (
self->if0D_it->atLast()) {
122 PyErr_SetNone(PyExc_StopIteration);
126 self->if0D_it->increment();
137 Interface0DIterator_object_doc,
138 "The 0D object currently pointed to by this iterator. Note that the object\n"
139 "may be an instance of an Interface0D subclass. For example if the iterator\n"
140 "has been created from the `vertices_begin()` method of the :class:`Stroke`\n"
141 "class, the .object property refers to a :class:`StrokeVertex` object.\n"
143 ":type: :class:`Interface0D` or one of its subclasses.");
147 if (
self->if0D_it->isEnd()) {
148 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
156 Interface0DIterator_t_doc,
157 "The curvilinear abscissa of the current point.\n"
163 return PyFloat_FromDouble(
self->if0D_it->t());
168 Interface0DIterator_u_doc,
169 "The point parameter at the current point in the 1D element (0 <= u <= 1).\n"
175 return PyFloat_FromDouble(
self->if0D_it->u());
180 Interface0DIterator_at_last_doc,
181 "True if the iterator points to the last valid element.\n"
182 "For its counterpart (pointing to the first valid element), use it.is_begin.\n"
195 Interface0DIterator_object_doc,
202 Interface0DIterator_at_last_doc,
204 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
210 PyVarObject_HEAD_INIT(
nullptr, 0)
211 "Interface0DIterator",
229 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
230 Interface0DIterator_doc,
PyObject * PyBool_from_bool(bool b)
PyObject * Any_BPy_Interface0D_from_Interface0D(Interface0D &if0D)
static PyObject * Interface0DIterator_object_get(BPy_Interface0DIterator *self, void *)
static int Interface0DIterator_init(BPy_Interface0DIterator *self, PyObject *args, PyObject *kwds)
static PyObject * Interface0DIterator_t_get(BPy_Interface0DIterator *self, void *)
static int convert_nested_it(PyObject *obj, void *v)
static PyObject * Interface0DIterator_iternext(BPy_Interface0DIterator *self)
static PyObject * Interface0DIterator_at_last_get(BPy_Interface0DIterator *self, void *)
static PyObject * Interface0DIterator_u_get(BPy_Interface0DIterator *self, void *)
static PyGetSetDef BPy_Interface0DIterator_getseters[]
PyDoc_STRVAR(Interface0DIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`Interface0DIterator`\n" "\n" "Class defining an iterator over Interface0D elements. An instance of\n" "this iterator is always obtained from a 1D element.\n" "\n" ".. method:: __init__(brother)\n" " __init__(it)\n" "\n" " Construct a nested Interface0DIterator using either the copy constructor\n" " or the constructor that takes an he argument of a Function0D.\n" "\n" " :arg brother: An Interface0DIterator object.\n" " :type brother: :class:`Interface0DIterator`\n" " :arg it: An iterator object to be nested.\n" " :type it: :class:`SVertexIterator`, :class:`CurvePointIterator`, or\n" " :class:`StrokeVertexIterator`")
PyTypeObject Interface0DIterator_Type
static PyObject * Interface0DIterator_iter(BPy_Interface0DIterator *self)
PyTypeObject Interface1D_Type
PyTypeObject Iterator_Type
#define BPy_Iterator_Check(v)
ATTR_WARN_UNUSED_RESULT const BMVert * v