9 #include "../../BPy_Convert.h"
10 #include "../../BPy_Id.h"
11 #include "../BPy_ViewEdge.h"
24 "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n"
26 "Class to represent a 1D elements issued from the chaining process. A\n"
27 "Chain is the last step before the :class:`Stroke` and is used in the\n"
28 "Splitting and Creation processes.\n"
30 ".. method:: __init__()\n"
31 " __init__(brother)\n"
34 " Builds a :class:`Chain` using the default constructor,\n"
35 " copy constructor or from an :class:`Id`.\n"
37 " :arg brother: A Chain object.\n"
38 " :type brother: :class:`Chain`\n"
39 " :arg id: An Id object.\n"
40 " :type id: :class:`Id`");
44 static const char *kwlist_1[] = {
"brother",
nullptr};
45 static const char *kwlist_2[] = {
"id",
nullptr};
46 PyObject *obj =
nullptr;
48 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
Chain_Type, &obj)) {
50 self->c =
new Chain();
56 else if ((
void)PyErr_Clear(),
57 PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist_2, &
Id_Type, &obj)) {
61 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
64 self->py_c.c =
self->c;
65 self->py_c.py_if1D.if1D =
self->c;
66 self->py_c.py_if1D.borrowed =
false;
71 ".. method:: push_viewedge_back(viewedge, orientation)\n"
73 " Adds a ViewEdge at the end of the Chain.\n"
75 " :arg viewedge: The ViewEdge that must be added.\n"
76 " :type viewedge: :class:`ViewEdge`\n"
77 " :arg orientation: The orientation with which the ViewEdge must be\n"
79 " :type orientation: bool");
83 static const char *kwlist[] = {
"viewedge",
"orientation",
nullptr};
84 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
86 if (!PyArg_ParseTupleAndKeywords(
87 args, kwds,
"O!O!", (
char **)kwlist, &
ViewEdge_Type, &obj1, &PyBool_Type, &obj2)) {
92 self->c->push_viewedge_back(ve, orientation);
97 ".. method:: push_viewedge_front(viewedge, orientation)\n"
99 " Adds a ViewEdge at the beginning of the Chain.\n"
101 " :arg viewedge: The ViewEdge that must be added.\n"
102 " :type viewedge: :class:`ViewEdge`\n"
103 " :arg orientation: The orientation with which the ViewEdge must be\n"
105 " :type orientation: bool");
109 static const char *kwlist[] = {
"viewedge",
"orientation",
nullptr};
110 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
112 if (!PyArg_ParseTupleAndKeywords(
113 args, kwds,
"O!O!", (
char **)kwlist, &
ViewEdge_Type, &obj1, &PyBool_Type, &obj2)) {
118 self->c->push_viewedge_front(ve, orientation);
123 {
"push_viewedge_back",
125 METH_VARARGS | METH_KEYWORDS,
126 Chain_push_viewedge_back_doc},
127 {
"push_viewedge_front",
129 METH_VARARGS | METH_KEYWORDS,
130 Chain_push_viewedge_front_doc},
131 {
nullptr,
nullptr, 0,
nullptr},
137 PyVarObject_HEAD_INIT(
nullptr, 0)
"Chain",
155 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyDoc_STRVAR(Chain_doc, "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n" "\n" "Class to represent a 1D elements issued from the chaining process. A\n" "Chain is the last step before the :class:`Stroke` and is used in the\n" "Splitting and Creation processes.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(id)\n" "\n" " Builds a :class:`Chain` using the default constructor,\n" " copy constructor or from an :class:`Id`.\n" "\n" " :arg brother: A Chain object.\n" " :type brother: :class:`Chain`\n" " :arg id: An Id object.\n" " :type id: :class:`Id`")
static PyObject * Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObject *kwds)
static PyMethodDef BPy_Chain_methods[]
static PyObject * Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyObject *kwds)
static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds)
bool bool_from_PyBool(PyObject *b)
PyTypeObject FrsCurve_Type
PyTypeObject ViewEdge_Type