27 "Class hierarchy: :class:`Interface0D` > :class:`CurvePoint`\n"
29 "Class to represent a point of a curve. A CurvePoint can be any point\n"
30 "of a 1D curve (it doesn't have to be a vertex of the curve). Any\n"
31 ":class:`Interface1D` is built upon ViewEdges, themselves built upon\n"
32 "FEdges. Therefore, a curve is basically a polyline made of a list of\n"
33 ":class:`SVertex` objects. Thus, a CurvePoint is built by linearly\n"
34 "interpolating two :class:`SVertex` instances. CurvePoint can be used\n"
35 "as virtual points while querying 0D information along a curve at a\n"
38 ".. method:: __init__()\n"
39 " __init__(brother)\n"
40 " __init__(first_vertex, second_vertex, t2d)\n"
41 " __init__(first_point, second_point, t2d)\n"
43 " Builds a CurvePoint using the default constructor, copy constructor,\n"
44 " or one of the overloaded constructors. The over loaded constructors\n"
45 " can either take two :class:`SVertex` or two :class:`CurvePoint`\n"
46 " objects and an interpolation parameter\n"
48 " :arg brother: A CurvePoint object.\n"
49 " :type brother: :class:`CurvePoint`\n"
50 " :arg first_vertex: The first SVertex.\n"
51 " :type first_vertex: :class:`SVertex`\n"
52 " :arg second_vertex: The second SVertex.\n"
53 " :type second_vertex: :class:`SVertex`\n"
54 " :arg first_point: The first CurvePoint.\n"
55 " :type first_point: :class:`CurvePoint`\n"
56 " :arg second_point: The second CurvePoint.\n"
57 " :type second_point: :class:`CurvePoint`\n"
58 " :arg t2d: A 2D interpolation parameter used to linearly interpolate\n"
59 " first_vertex and second_vertex or first_point and second_point.\n"
60 " :type t2d: float\n");
64 static const char *kwlist_1[] = {
"brother",
nullptr};
65 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
"t2d",
nullptr};
66 static const char *kwlist_3[] = {
"first_point",
"second_point",
"t2d",
nullptr};
67 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
70 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
CurvePoint_Type, &obj1)) {
78 else if ((
void)PyErr_Clear(),
79 PyArg_ParseTupleAndKeywords(args,
91 else if ((
void)PyErr_Clear(),
92 PyArg_ParseTupleAndKeywords(args,
104 if (!cp1 || cp1->
A() ==
nullptr || cp1->
B() ==
nullptr) {
105 PyErr_SetString(PyExc_TypeError,
"argument 1 is an invalid CurvePoint object");
108 if (!cp2 || cp2->
A() ==
nullptr || cp2->
B() ==
nullptr) {
109 PyErr_SetString(PyExc_TypeError,
"argument 2 is an invalid CurvePoint object");
115 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
119 self->py_if0D.borrowed =
false;
129 CurvePoint_first_svertex_doc,
130 "The first SVertex upon which the CurvePoint is built.\n"
132 ":type: :class:`SVertex`");
146 PyErr_SetString(PyExc_TypeError,
"value must be an SVertex");
155 CurvePoint_second_svertex_doc,
156 "The second SVertex upon which the CurvePoint is built.\n"
158 ":type: :class:`SVertex`");
172 PyErr_SetString(PyExc_TypeError,
"value must be an SVertex");
181 CurvePoint_fedge_doc,
182 "Gets the FEdge for the two SVertices that given CurvePoints consists out of.\n"
183 "A shortcut for CurvePoint.first_svertex.get_fedge(CurvePoint.second_svertex).\n"
185 ":type: :class:`FEdge`");
201 "The 2D interpolation parameter.\n"
207 return PyFloat_FromDouble(
self->cp->t2d());
213 if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
214 PyErr_SetString(PyExc_TypeError,
"value must be a number");
217 self->cp->setT2d(scalar);
225 CurvePoint_first_svertex_doc,
230 CurvePoint_second_svertex_doc,
234 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
240 PyVarObject_HEAD_INIT(
nullptr, 0)
259 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * Any_BPy_Interface1D_from_Interface1D(Interface1D &if1D)
PyObject * BPy_SVertex_from_SVertex(SVertex &sv)
static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
PyTypeObject CurvePoint_Type
static PyObject * CurvePoint_first_svertex_get(BPy_CurvePoint *self, void *)
static PyObject * CurvePoint_t2d_get(BPy_CurvePoint *self, void *)
PyDoc_STRVAR(CurvePoint_doc, "Class hierarchy: :class:`Interface0D` > :class:`CurvePoint`\n" "\n" "Class to represent a point of a curve. A CurvePoint can be any point\n" "of a 1D curve (it doesn't have to be a vertex of the curve). Any\n" ":class:`Interface1D` is built upon ViewEdges, themselves built upon\n" "FEdges. Therefore, a curve is basically a polyline made of a list of\n" ":class:`SVertex` objects. Thus, a CurvePoint is built by linearly\n" "interpolating two :class:`SVertex` instances. CurvePoint can be used\n" "as virtual points while querying 0D information along a curve at a\n" "given resolution.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(first_vertex, second_vertex, t2d)\n" " __init__(first_point, second_point, t2d)\n" "\n" " Builds a CurvePoint using the default constructor, copy constructor,\n" " or one of the overloaded constructors. The over loaded constructors\n" " can either take two :class:`SVertex` or two :class:`CurvePoint`\n" " objects and an interpolation parameter\n" "\n" " :arg brother: A CurvePoint object.\n" " :type brother: :class:`CurvePoint`\n" " :arg first_vertex: The first SVertex.\n" " :type first_vertex: :class:`SVertex`\n" " :arg second_vertex: The second SVertex.\n" " :type second_vertex: :class:`SVertex`\n" " :arg first_point: The first CurvePoint.\n" " :type first_point: :class:`CurvePoint`\n" " :arg second_point: The second CurvePoint.\n" " :type second_point: :class:`CurvePoint`\n" " :arg t2d: A 2D interpolation parameter used to linearly interpolate\n" " first_vertex and second_vertex or first_point and second_point.\n" " :type t2d: float\n")
static int CurvePoint_second_svertex_set(BPy_CurvePoint *self, PyObject *value, void *)
static PyObject * CurvePoint_fedge_get(BPy_CurvePoint *self, void *)
static int CurvePoint_first_svertex_set(BPy_CurvePoint *self, PyObject *value, void *)
static PyGetSetDef BPy_CurvePoint_getseters[]
static PyObject * CurvePoint_second_svertex_get(BPy_CurvePoint *self, void *)
static int CurvePoint_t2d_set(BPy_CurvePoint *self, PyObject *value, void *)
PyTypeObject Interface0D_Type
PyTypeObject SVertex_Type
#define BPy_SVertex_Check(v)