26 CurvePointIterator_doc,
27 "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n"
29 "Class representing an iterator on a curve. Allows an iterating\n"
30 "outside initial vertices. A CurvePoint is instantiated and returned\n"
31 "through the .object attribute.\n"
33 ".. method:: __init__()\n"
34 " __init__(brother)\n"
35 " __init__(step=0.0)\n"
37 " Builds a CurvePointIterator object using either the default constructor,\n"
38 " copy constructor, or the overloaded constructor.\n"
40 " :arg brother: A CurvePointIterator object.\n"
41 " :type brother: :class:`CurvePointIterator`\n"
42 " :arg step: A resampling resolution with which the curve is resampled.\n"
43 " If zero, no resampling is done (i.e., the iterator iterates over\n"
44 " initial vertices).\n"
45 " :type step: float");
49 static const char *kwlist_1[] = {
"brother",
nullptr};
50 static const char *kwlist_2[] = {
"step",
nullptr};
51 PyObject *brother =
nullptr;
54 if (PyArg_ParseTupleAndKeywords(
65 else if ((
void)PyErr_Clear(),
66 PyArg_ParseTupleAndKeywords(args, kwds,
"f", (
char **)kwlist_2, &step))
71 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
82 CurvePointIterator_object_doc,
83 "The CurvePoint object currently pointed by this iterator.\n"
85 ":type: :class:`CurvePoint`");
89 if (
self->cp_it->isEnd()) {
90 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
98 CurvePointIterator_t_doc,
99 "The curvilinear abscissa of the current point.\n"
105 return PyFloat_FromDouble(
self->cp_it->t());
110 CurvePointIterator_u_doc,
111 "The point parameter at the current point in the stroke (0 <= u <= 1).\n"
117 return PyFloat_FromDouble(
self->cp_it->u());
124 CurvePointIterator_object_doc,
128 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
134 PyVarObject_HEAD_INIT(
nullptr, 0)
135 "CurvePointIterator",
153 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
154 CurvePointIterator_doc,
PyObject * BPy_CurvePoint_from_CurvePoint(CurvePoint &cp)
static PyObject * CurvePointIterator_object_get(BPy_CurvePointIterator *self, void *)
static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, PyObject *kwds)
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 PyGetSetDef BPy_CurvePointIterator_getseters[]
static PyObject * CurvePointIterator_t_get(BPy_CurvePointIterator *self, void *)
PyTypeObject CurvePointIterator_Type
static PyObject * CurvePointIterator_u_get(BPy_CurvePointIterator *self, void *)
PyTypeObject Iterator_Type