9 #include "../BPy_Convert.h"
23 "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n"
25 "Class representing an iterator on a curve. Allows an iterating\n"
26 "outside initial vertices. A CurvePoint is instantiated and returned\n"
27 "through the .object attribute.\n"
29 ".. method:: __init__()\n"
30 " __init__(brother)\n"
31 " __init__(step=0.0)\n"
33 " Builds a CurvePointIterator object using either the default constructor,\n"
34 " copy constructor, or the overloaded constructor.\n"
36 " :arg brother: A CurvePointIterator object.\n"
37 " :type brother: :class:`CurvePointIterator`\n"
38 " :arg step: A resampling resolution with which the curve is resampled.\n"
39 " If zero, no resampling is done (i.e., the iterator iterates over\n"
40 " initial vertices).\n"
41 " :type step: float");
45 static const char *kwlist_1[] = {
"brother",
nullptr};
46 static const char *kwlist_2[] = {
"step",
nullptr};
47 PyObject *brother =
nullptr;
50 if (PyArg_ParseTupleAndKeywords(
60 else if ((
void)PyErr_Clear(),
61 PyArg_ParseTupleAndKeywords(args, kwds,
"f", (
char **)kwlist_2, &step)) {
65 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
68 self->py_it.it =
self->cp_it;
75 "The CurvePoint object currently pointed by this iterator.\n"
77 ":type: :class:`CurvePoint`");
81 if (
self->cp_it->isEnd()) {
82 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
89 "The curvilinear abscissa of the current point.\n"
95 return PyFloat_FromDouble(
self->cp_it->t());
99 "The point parameter at the current point in the stroke (0 <= u <= 1).\n"
105 return PyFloat_FromDouble(
self->cp_it->u());
112 CurvePointIterator_object_doc,
116 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
122 PyVarObject_HEAD_INIT(
nullptr, 0)
"CurvePointIterator",
140 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
141 CurvePointIterator_doc,
PyObject * BPy_CurvePoint_from_CurvePoint(CurvePoint &cp)
static PyObject * CurvePointIterator_u_get(BPy_CurvePointIterator *self, void *UNUSED(closure))
static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, PyObject *kwds)
static PyGetSetDef BPy_CurvePointIterator_getseters[]
PyDoc_STRVAR(CurvePointIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n" "\n" "Class representing an iterator on a curve. Allows an iterating\n" "outside initial vertices. A CurvePoint is instantiated and returned\n" "through the .object attribute.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(step=0.0)\n" "\n" " Builds a CurvePointIterator object using either the default constructor,\n" " copy constructor, or the overloaded constructor.\n" "\n" " :arg brother: A CurvePointIterator object.\n" " :type brother: :class:`CurvePointIterator`\n" " :arg step: A resampling resolution with which the curve is resampled.\n" " If zero, no resampling is done (i.e., the iterator iterates over\n" " initial vertices).\n" " :type step: float")
static PyObject * CurvePointIterator_object_get(BPy_CurvePointIterator *self, void *UNUSED(closure))
PyTypeObject CurvePointIterator_Type
static PyObject * CurvePointIterator_t_get(BPy_CurvePointIterator *self, void *UNUSED(closure))
PyTypeObject Iterator_Type