25 "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n"
27 "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n"
28 "edge of the input mesh. It can be a silhouette, a crease or a border.\n"
29 "If it is a crease edge, then it is bordered by two faces of the mesh.\n"
30 "Face a lies on its right whereas Face b lies on its left. If it is a\n"
31 "border edge, then it doesn't have any face on its right, and thus Face\n"
34 ".. method:: __init__()\n"
35 " __init__(brother)\n"
36 " __init__(first_vertex, second_vertex)\n"
38 " Builds an :class:`FEdgeSharp` using the default constructor,\n"
39 " copy constructor, or between two :class:`SVertex` objects.\n"
41 " :arg brother: An FEdgeSharp object.\n"
42 " :type brother: :class:`FEdgeSharp`\n"
43 " :arg first_vertex: The first SVertex object.\n"
44 " :type first_vertex: :class:`SVertex`\n"
45 " :arg second_vertex: The second SVertex object.\n"
46 " :type second_vertex: :class:`SVertex`");
50 static const char *kwlist_1[] = {
"brother",
nullptr};
51 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
nullptr};
52 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
54 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
FEdgeSharp_Type, &obj1)) {
62 else if ((
void)PyErr_Clear(),
63 PyArg_ParseTupleAndKeywords(
69 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
73 self->py_fe.py_if1D.if1D =
self->fes;
74 self->py_fe.py_if1D.borrowed =
false;
81#define MATHUTILS_SUBTYPE_NORMAL_A 1
82#define MATHUTILS_SUBTYPE_NORMAL_B 2
121 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
122 self->fes->setNormalA(p);
126 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
127 self->fes->setNormalB(p);
142 bmo->data[index] = p[index];
147 bmo->data[index] = p[index];
162 p[index] = bmo->data[index];
163 self->fes->setNormalA(p);
168 p[index] = bmo->data[index];
169 self->fes->setNormalB(p);
197 FEdgeSharp_normal_right_doc,
198 "The normal to the face lying on the right of the FEdge. If this FEdge\n"
199 "is a border, it has no Face on its right and therefore no normal.\n"
201 ":type: :class:`mathutils.Vector`");
216 self->fes->setNormalA(p);
222 FEdgeSharp_normal_left_doc,
223 "The normal to the face lying on the left of the FEdge.\n"
225 ":type: :class:`mathutils.Vector`");
240 self->fes->setNormalB(p);
246 FEdgeSharp_material_index_right_doc,
247 "The index of the material of the face lying on the right of the FEdge.\n"
248 "If this FEdge is a border, it has no Face on its right and therefore\n"
255 return PyLong_FromLong(
self->fes->aFrsMaterialIndex());
262 uint i = PyLong_AsUnsignedLong(value);
263 if (PyErr_Occurred()) {
266 self->fes->setaFrsMaterialIndex(
i);
272 FEdgeSharp_material_index_left_doc,
273 "The index of the material of the face lying on the left of the FEdge.\n"
279 return PyLong_FromLong(
self->fes->bFrsMaterialIndex());
286 uint i = PyLong_AsUnsignedLong(value);
287 if (PyErr_Occurred()) {
290 self->fes->setbFrsMaterialIndex(
i);
296 FEdgeSharp_material_right_doc,
297 "The material of the face lying on the right of the FEdge. If this FEdge\n"
298 "is a border, it has no Face on its right and therefore no material.\n"
300 ":type: :class:`Material`");
309 FEdgeSharp_material_left_doc,
310 "The material of the face lying on the left of the FEdge.\n"
312 ":type: :class:`Material`");
321 FEdgeSharp_face_mark_right_doc,
322 "The face mark of the face lying on the right of the FEdge. If this FEdge\n"
323 "is a border, it has no face on the right and thus this property is set to\n"
337 if (!PyBool_Check(value)) {
346 FEdgeSharp_face_mark_left_doc,
347 "The face mark of the face lying on the left of the FEdge.\n"
358 if (!PyBool_Check(value)) {
369 FEdgeSharp_normal_right_doc,
374 FEdgeSharp_normal_left_doc,
376 {
"material_index_right",
379 FEdgeSharp_material_index_right_doc,
381 {
"material_index_left",
384 FEdgeSharp_material_index_left_doc,
389 FEdgeSharp_material_right_doc,
394 FEdgeSharp_material_left_doc,
399 FEdgeSharp_face_mark_right_doc,
404 FEdgeSharp_face_mark_left_doc,
406 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
412 PyVarObject_HEAD_INIT(
nullptr, 0)
431 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
bool bool_from_PyBool(PyObject *b)
PyObject * PyBool_from_bool(bool b)
PyObject * BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial &m)
static PyObject * FEdgeSharp_normal_left_get(BPy_FEdgeSharp *self, void *)
#define MATHUTILS_SUBTYPE_NORMAL_B
static int FEdgeSharp_mathutils_set(BaseMathObject *bmo, int subtype)
PyDoc_STRVAR(FEdgeSharp_doc, "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n" "\n" "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n" "edge of the input mesh. It can be a silhouette, a crease or a border.\n" "If it is a crease edge, then it is bordered by two faces of the mesh.\n" "Face a lies on its right whereas Face b lies on its left. If it is a\n" "border edge, then it doesn't have any face on its right, and thus Face\n" "a is None.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(first_vertex, second_vertex)\n" "\n" " Builds an :class:`FEdgeSharp` using the default constructor,\n" " copy constructor, or between two :class:`SVertex` objects.\n" "\n" " :arg brother: An FEdgeSharp object.\n" " :type brother: :class:`FEdgeSharp`\n" " :arg first_vertex: The first SVertex object.\n" " :type first_vertex: :class:`SVertex`\n" " :arg second_vertex: The second SVertex object.\n" " :type second_vertex: :class:`SVertex`")
static int FEdgeSharp_normal_left_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static uchar FEdgeSharp_mathutils_cb_index
static int FEdgeSharp_face_mark_left_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static PyObject * FEdgeSharp_material_left_get(BPy_FEdgeSharp *self, void *)
static PyObject * FEdgeSharp_face_mark_left_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_face_mark_right_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static int FEdgeSharp_mathutils_get(BaseMathObject *bmo, int subtype)
static int FEdgeSharp_normal_right_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds)
static PyObject * FEdgeSharp_normal_right_get(BPy_FEdgeSharp *self, void *)
static PyObject * FEdgeSharp_face_mark_right_get(BPy_FEdgeSharp *self, void *)
#define MATHUTILS_SUBTYPE_NORMAL_A
static int FEdgeSharp_material_index_right_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static PyObject * FEdgeSharp_material_index_right_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_material_index_left_set(BPy_FEdgeSharp *self, PyObject *value, void *)
PyTypeObject FEdgeSharp_Type
static Mathutils_Callback FEdgeSharp_mathutils_cb
static PyObject * FEdgeSharp_material_right_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_mathutils_set_index(BaseMathObject *bmo, int subtype, int index)
static int FEdgeSharp_mathutils_get_index(BaseMathObject *bmo, int subtype, int index)
void FEdgeSharp_mathutils_register_callback()
static PyObject * FEdgeSharp_material_index_left_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_mathutils_check(BaseMathObject *bmo)
static PyGetSetDef BPy_FEdgeSharp_getseters[]
#define BPy_FEdgeSharp_Check(v)
PyTypeObject SVertex_Type
ATTR_WARN_UNUSED_RESULT const BMVert * v
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
uchar Mathutils_RegisterCallback(Mathutils_Callback *cb)
PyObject * Vector_CreatePyObject_cb(PyObject *cb_user, int vec_num, uchar cb_type, uchar cb_subtype)
VecMat::Vec3< real > Vec3r