23 #include "../../BPy_Convert.h"
24 #include "../../BPy_Id.h"
25 #include "../../Interface1D/BPy_FEdge.h"
26 #include "../../Interface1D/BPy_ViewEdge.h"
27 #include "../BPy_SVertex.h"
40 "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`TVertex`\n"
42 "Class to define a T vertex, i.e. an intersection between two edges.\n"
43 "It points towards two SVertex and four ViewEdges. Among the\n"
44 "ViewEdges, two are front and the other two are back. Basically a\n"
45 "front edge hides part of a back edge. So, among the back edges, one\n"
46 "is of invisibility N and the other of invisibility N+1.\n"
48 ".. method:: __init__()\n"
50 " Default constructor.");
56 static const char *kwlist[] = {
nullptr};
58 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
62 self->py_vv.vv =
self->tv;
63 self->py_vv.py_if0D.if0D =
self->tv;
64 self->py_vv.py_if0D.borrowed =
false;
69 ".. method:: get_svertex(fedge)\n"
71 " Returns the SVertex (among the 2) belonging to the given FEdge.\n"
73 " :arg fedge: An FEdge object.\n"
74 " :type fedge: :class:`FEdge`\n"
75 " :return: The SVertex belonging to the given FEdge.\n"
76 " :rtype: :class:`SVertex`");
80 static const char *kwlist[] = {
"fedge",
nullptr};
83 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
FEdge_Type, &py_fe)) {
94 ".. method:: get_mate(viewedge)\n"
96 " Returns the mate edge of the ViewEdge given as argument. If the\n"
97 " ViewEdge is frontEdgeA, frontEdgeB is returned. If the ViewEdge is\n"
98 " frontEdgeB, frontEdgeA is returned. Same for back edges.\n"
100 " :arg viewedge: A ViewEdge object.\n"
101 " :type viewedge: :class:`ViewEdge`\n"
102 " :return: The mate edge of the given ViewEdge.\n"
103 " :rtype: :class:`ViewEdge`");
107 static const char *kwlist[] = {
"viewedge",
nullptr};
110 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
ViewEdge_Type, &py_ve)) {
123 METH_VARARGS | METH_KEYWORDS,
124 TVertex_get_svertex_doc},
127 METH_VARARGS | METH_KEYWORDS,
128 TVertex_get_mate_doc},
129 {
nullptr,
nullptr, 0,
nullptr},
135 "The SVertex that is closer to the viewpoint.\n"
137 ":type: :class:`SVertex`");
141 SVertex *
v =
self->tv->frontSVertex();
151 PyErr_SetString(PyExc_TypeError,
"value must be an SVertex");
154 self->tv->setFrontSVertex(((
BPy_SVertex *)value)->sv);
159 "The SVertex that is further away from the viewpoint.\n"
161 ":type: :class:`SVertex`");
165 SVertex *
v =
self->tv->backSVertex();
175 PyErr_SetString(PyExc_TypeError,
"value must be an SVertex");
178 self->tv->setBackSVertex(((
BPy_SVertex *)value)->sv);
183 "The Id of this TVertex.\n"
185 ":type: :class:`Id`");
196 PyErr_SetString(PyExc_TypeError,
"value must be an Id");
199 self->tv->setId(*(((
BPy_Id *)value)->
id));
207 TVertex_front_svertex_doc,
212 TVertex_back_svertex_doc,
215 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
220 PyVarObject_HEAD_INIT(
nullptr, 0)
"TVertex",
238 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * BPy_SVertex_from_SVertex(SVertex &sv)
PyObject * BPy_ViewEdge_from_ViewEdge(ViewEdge &ve)
PyObject * BPy_Id_from_Id(Id &id)
#define BPy_SVertex_Check(v)
static PyMethodDef BPy_TVertex_methods[]
static int TVertex_id_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closure))
PyTypeObject TVertex_Type
static PyObject * TVertex_front_svertex_get(BPy_TVertex *self, void *UNUSED(closure))
static int TVertex_front_svertex_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closure))
static PyObject * TVertex_get_mate(BPy_TVertex *self, PyObject *args, PyObject *kwds)
static PyObject * TVertex_id_get(BPy_TVertex *self, void *UNUSED(closure))
PyDoc_STRVAR(TVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`TVertex`\n" "\n" "Class to define a T vertex, i.e. an intersection between two edges.\n" "It points towards two SVertex and four ViewEdges. Among the\n" "ViewEdges, two are front and the other two are back. Basically a\n" "front edge hides part of a back edge. So, among the back edges, one\n" "is of invisibility N and the other of invisibility N+1.\n" "\n" ".. method:: __init__()\n" "\n" " Default constructor.")
static PyObject * TVertex_back_svertex_get(BPy_TVertex *self, void *UNUSED(closure))
static PyGetSetDef BPy_TVertex_getseters[]
static PyObject * TVertex_get_svertex(BPy_TVertex *self, PyObject *args, PyObject *kwds)
static int TVertex_init(BPy_TVertex *self, PyObject *args, PyObject *kwds)
static int TVertex_back_svertex_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closure))
PyTypeObject ViewEdge_Type
PyTypeObject ViewVertex_Type
ATTR_WARN_UNUSED_RESULT const BMVert * v