Blender V4.3
BPy_SVertex.cpp File Reference
#include "BPy_SVertex.h"
#include "../BPy_Convert.h"
#include "../BPy_Id.h"
#include "../Interface1D/BPy_FEdge.h"
#include "BLI_sys_types.h"

Go to the source code of this file.

Macros

#define MATHUTILS_SUBTYPE_POINT3D   1
 
#define MATHUTILS_SUBTYPE_POINT2D   2
 

Functions

 PyDoc_STRVAR (SVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`SVertex`\n" "\n" "Class to define a vertex of the embedding.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(point_3d, id)\n" "\n" " Builds a :class:`SVertex` using the default constructor,\n" " copy constructor or the overloaded constructor which builds" " a :class:`SVertex` from 3D coordinates and an Id.\n" "\n" " :arg brother: A SVertex object.\n" " :type brother: :class:`SVertex`\n" " :arg point_3d: A three-dimensional vector.\n" " :type point_3d: :class:`mathutils.Vector`\n" " :arg id: An Id object.\n" " :type id: :class:`Id`")
 
static int SVertex_init (BPy_SVertex *self, PyObject *args, PyObject *kwds)
 
 PyDoc_STRVAR (SVertex_add_normal_doc, ".. method:: add_normal(normal)\n" "\n" " Adds a normal to the SVertex's set of normals. If the same normal\n" " is already in the set, nothing changes.\n" "\n" " :arg normal: A three-dimensional vector.\n" " :type normal: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]")
 
static PyObject * SVertex_add_normal (BPy_SVertex *self, PyObject *args, PyObject *kwds)
 
 PyDoc_STRVAR (SVertex_add_fedge_doc, ".. method:: add_fedge(fedge)\n" "\n" " Add an FEdge to the list of edges emanating from this SVertex.\n" "\n" " :arg fedge: An FEdge.\n" " :type fedge: :class:`FEdge`")
 
static PyObject * SVertex_add_fedge (BPy_SVertex *self, PyObject *args, PyObject *kwds)
 
static int SVertex_mathutils_check (BaseMathObject *bmo)
 
static int SVertex_mathutils_get (BaseMathObject *bmo, int subtype)
 
static int SVertex_mathutils_set (BaseMathObject *bmo, int subtype)
 
static int SVertex_mathutils_get_index (BaseMathObject *bmo, int subtype, int index)
 
static int SVertex_mathutils_set_index (BaseMathObject *bmo, int subtype, int index)
 
void SVertex_mathutils_register_callback ()
 
 PyDoc_STRVAR (SVertex_point_3d_doc, "The 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`")
 
static PyObject * SVertex_point_3d_get (BPy_SVertex *self, void *)
 
static int SVertex_point_3d_set (BPy_SVertex *self, PyObject *value, void *)
 
 PyDoc_STRVAR (SVertex_point_2d_doc, "The projected 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`")
 
static PyObject * SVertex_point_2d_get (BPy_SVertex *self, void *)
 
static int SVertex_point_2d_set (BPy_SVertex *self, PyObject *value, void *)
 
 PyDoc_STRVAR (SVertex_id_doc, "The Id of this SVertex.\n" "\n" ":type: :class:`Id`")
 
static PyObject * SVertex_id_get (BPy_SVertex *self, void *)
 
static int SVertex_id_set (BPy_SVertex *self, PyObject *value, void *)
 
 PyDoc_STRVAR (SVertex_normals_doc, "The normals for this Vertex as a list. In a sharp surface, an SVertex\n" "has exactly one normal. In a smooth surface, an SVertex can have any\n" "number of normals.\n" "\n" ":type: list of :class:`mathutils.Vector`")
 
static PyObject * SVertex_normals_get (BPy_SVertex *self, void *)
 
 PyDoc_STRVAR (SVertex_normals_size_doc, "The number of different normals for this SVertex.\n" "\n" ":type: int")
 
static PyObject * SVertex_normals_size_get (BPy_SVertex *self, void *)
 
 PyDoc_STRVAR (SVertex_viewvertex_doc, "If this SVertex is also a ViewVertex, this property refers to the\n" "ViewVertex, and None otherwise.\n" "\n" ":type: :class:`ViewVertex`")
 
static PyObject * SVertex_viewvertex_get (BPy_SVertex *self, void *)
 
 PyDoc_STRVAR (SVertex_curvatures_doc, "Curvature information expressed in the form of a seven-element tuple\n" "(K1, e1, K2, e2, Kr, er, dKr), where K1 and K2 are scalar values\n" "representing the first (maximum) and second (minimum) principal\n" "curvatures at this SVertex, respectively; e1 and e2 are\n" "three-dimensional vectors representing the first and second principal\n" "directions, i.e. the directions of the normal plane where the\n" "curvature takes its maximum and minimum values, respectively; and Kr,\n" "er and dKr are the radial curvature, radial direction, and the\n" "derivative of the radial curvature at this SVertex, respectively.\n" "\n" ":type: tuple")
 
static PyObject * SVertex_curvatures_get (BPy_SVertex *self, void *)
 

Variables

static PyMethodDef BPy_SVertex_methods []
 
static Mathutils_Callback SVertex_mathutils_cb
 
static uchar SVertex_mathutils_cb_index = -1
 
static PyGetSetDef BPy_SVertex_getseters []
 
PyTypeObject SVertex_Type
 

Macro Definition Documentation

◆ MATHUTILS_SUBTYPE_POINT2D

◆ MATHUTILS_SUBTYPE_POINT3D

Function Documentation

◆ PyDoc_STRVAR() [1/10]

PyDoc_STRVAR ( SVertex_add_fedge_doc ,
".. method:: add_fedge(fedge)\n" "\n" " Add an FEdge to the list of edges emanating from this SVertex.\n" "\n" " :arg fedge: An FEdge.\n" " :type fedge: :class:`FEdge`"  )

◆ PyDoc_STRVAR() [2/10]

PyDoc_STRVAR ( SVertex_add_normal_doc ,
".. method:: add_normal(normal)\n" "\n" " Adds a normal to the SVertex's set of normals. If the same normal\n" " is already in the set,
nothing changes.\n" "\n" " :arg normal:A three-dimensional vector.\n" " :type normal::class:`mathutils.Vector`|tuple|list" [float, float, float][float] )

◆ PyDoc_STRVAR() [3/10]

PyDoc_STRVAR ( SVertex_curvatures_doc ,
"Curvature information expressed in the form of a seven-element tuple\n" " K1, e1, K2, e2, Kr, er, dKr,
where K1 and K2 are scalar values\n" "representing the first(maximum) and second(minimum) principal\n" "curvatures at this SVertex,
respectively;e1 and e2 are\n" "three-dimensional vectors representing the first and second principal\n" " directions,
i.e. the directions of the normal plane where the\n" "curvature takes its maximum and minimum values,
respectively;and Kr,
\n" "er and dKr are the radial curvature,
radial direction,
and the\n" "derivative of the radial curvature at this SVertex,
respectively.\n" "\n" ":type:tuple"  )

◆ PyDoc_STRVAR() [4/10]

PyDoc_STRVAR ( SVertex_doc ,
"Class hierarchy: :class:`Interface0D` ,
:class:`SVertex`\n" "\n" "Class to define a vertex of the embedding.\n" "\n" ".. method::__init__()\n" " __init__(brother)\n" " __init__(point_3d, id)\n" "\n" " Builds a :class:`SVertex` using the default constructor,
\n" " copy constructor or the overloaded constructor which builds" " a :class:`SVertex` from 3D coordinates and an Id.\n" "\n" " :arg brother:A SVertex object.\n" " :type brother::class:`SVertex`\n" " :arg point_3d:A three-dimensional vector.\n" " :type point_3d::class:`mathutils.Vector`\n" " :arg id:An Id object.\n" " :type id::class:`Id`"  )

◆ PyDoc_STRVAR() [5/10]

PyDoc_STRVAR ( SVertex_id_doc ,
"The Id of this SVertex.\n" "\n" ":type: :class:`Id`"  )

◆ PyDoc_STRVAR() [6/10]

PyDoc_STRVAR ( SVertex_normals_doc ,
"The normals for this Vertex as a list. In a sharp surface,
an SVertex\n" "has exactly one normal. In a smooth surface,
an SVertex can have any\n" "number of normals.\n" "\n" ":type:list of :class:`mathutils.Vector`"  )

◆ PyDoc_STRVAR() [7/10]

PyDoc_STRVAR ( SVertex_normals_size_doc ,
"The number of different normals for this SVertex.\n" "\n" ":type: int"  )

◆ PyDoc_STRVAR() [8/10]

PyDoc_STRVAR ( SVertex_point_2d_doc ,
"The projected 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`"  )

◆ PyDoc_STRVAR() [9/10]

PyDoc_STRVAR ( SVertex_point_3d_doc ,
"The 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`"  )

◆ PyDoc_STRVAR() [10/10]

PyDoc_STRVAR ( SVertex_viewvertex_doc ,
"If this SVertex is also a ViewVertex,
this property refers to the\n" " ViewVertex,
and None otherwise.\n" "\n" ":type::class:`ViewVertex`"  )

◆ SVertex_add_fedge()

static PyObject * SVertex_add_fedge ( BPy_SVertex * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 119 of file BPy_SVertex.cpp.

References FEdge_Type, and self.

◆ SVertex_add_normal()

static PyObject * SVertex_add_normal ( BPy_SVertex * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 91 of file BPy_SVertex.cpp.

References self, and Vec3r_ptr_from_PyObject().

◆ SVertex_curvatures_get()

◆ SVertex_id_get()

static PyObject * SVertex_id_get ( BPy_SVertex * self,
void *  )
static

Definition at line 333 of file BPy_SVertex.cpp.

References BPy_Id_from_Id(), and self.

◆ SVertex_id_set()

static int SVertex_id_set ( BPy_SVertex * self,
PyObject * value,
void *  )
static

Definition at line 339 of file BPy_SVertex.cpp.

References BPy_Id_Check, and self.

◆ SVertex_init()

static int SVertex_init ( BPy_SVertex * self,
PyObject * args,
PyObject * kwds )
static

Definition at line 49 of file BPy_SVertex.cpp.

References convert_v3(), Id_Type, self, SVertex_Type, and v.

◆ SVertex_mathutils_check()

static int SVertex_mathutils_check ( BaseMathObject * bmo)
static

Definition at line 151 of file BPy_SVertex.cpp.

References BPy_SVertex_Check.

◆ SVertex_mathutils_get()

static int SVertex_mathutils_get ( BaseMathObject * bmo,
int subtype )
static

Definition at line 159 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, MATHUTILS_SUBTYPE_POINT3D, and self.

◆ SVertex_mathutils_get_index()

static int SVertex_mathutils_get_index ( BaseMathObject * bmo,
int subtype,
int index )
static

Definition at line 199 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, MATHUTILS_SUBTYPE_POINT3D, and self.

◆ SVertex_mathutils_register_callback()

void SVertex_mathutils_register_callback ( )

◆ SVertex_mathutils_set()

static int SVertex_mathutils_set ( BaseMathObject * bmo,
int subtype )
static

Definition at line 179 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, MATHUTILS_SUBTYPE_POINT3D, and self.

◆ SVertex_mathutils_set_index()

static int SVertex_mathutils_set_index ( BaseMathObject * bmo,
int subtype,
int index )
static

Definition at line 239 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, MATHUTILS_SUBTYPE_POINT3D, and self.

◆ SVertex_normals_get()

static PyObject * SVertex_normals_get ( BPy_SVertex * self,
void *  )
static

Definition at line 358 of file BPy_SVertex.cpp.

References self, v, and Vector_from_Vec3r().

◆ SVertex_normals_size_get()

static PyObject * SVertex_normals_size_get ( BPy_SVertex * self,
void *  )
static

Definition at line 380 of file BPy_SVertex.cpp.

References self.

◆ SVertex_point_2d_get()

static PyObject * SVertex_point_2d_get ( BPy_SVertex * self,
void *  )
static

◆ SVertex_point_2d_set()

static int SVertex_point_2d_set ( BPy_SVertex * self,
PyObject * value,
void *  )
static

Definition at line 315 of file BPy_SVertex.cpp.

References mathutils_array_parse(), self, and v.

◆ SVertex_point_3d_get()

static PyObject * SVertex_point_3d_get ( BPy_SVertex * self,
void *  )
static

◆ SVertex_point_3d_set()

static int SVertex_point_3d_set ( BPy_SVertex * self,
PyObject * value,
void *  )
static

Definition at line 291 of file BPy_SVertex.cpp.

References mathutils_array_parse(), self, and v.

◆ SVertex_viewvertex_get()

static PyObject * SVertex_viewvertex_get ( BPy_SVertex * self,
void *  )
static

Definition at line 393 of file BPy_SVertex.cpp.

References Any_BPy_ViewVertex_from_ViewVertex(), and self.

Variable Documentation

◆ BPy_SVertex_getseters

PyGetSetDef BPy_SVertex_getseters[]
static
Initial value:
= {
{"point_3d",
SVertex_point_3d_doc,
nullptr},
{"point_2d",
SVertex_point_2d_doc,
nullptr},
{"id", (getter)SVertex_id_get, (setter)SVertex_id_set, SVertex_id_doc, nullptr},
{"normals", (getter)SVertex_normals_get, (setter) nullptr, SVertex_normals_doc, nullptr},
{"normals_size",
(setter) nullptr,
SVertex_normals_size_doc,
nullptr},
{"viewvertex",
(setter) nullptr,
SVertex_viewvertex_doc,
nullptr},
{"curvatures",
(setter) nullptr,
SVertex_curvatures_doc,
nullptr},
{nullptr, nullptr, nullptr, nullptr, nullptr}
}
static PyObject * SVertex_point_3d_get(BPy_SVertex *self, void *)
static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void *)
static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void *)
static PyObject * SVertex_viewvertex_get(BPy_SVertex *self, void *)
static PyObject * SVertex_point_2d_get(BPy_SVertex *self, void *)
static PyObject * SVertex_curvatures_get(BPy_SVertex *self, void *)
static PyObject * SVertex_normals_size_get(BPy_SVertex *self, void *)
static PyObject * SVertex_normals_get(BPy_SVertex *self, void *)
static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void *)
static PyObject * SVertex_id_get(BPy_SVertex *self, void *)

Definition at line 438 of file BPy_SVertex.cpp.

◆ BPy_SVertex_methods

PyMethodDef BPy_SVertex_methods[]
static
Initial value:
= {
{"add_normal",
(PyCFunction)SVertex_add_normal,
METH_VARARGS | METH_KEYWORDS,
SVertex_add_normal_doc},
{"add_fedge",
(PyCFunction)SVertex_add_fedge,
METH_VARARGS | METH_KEYWORDS,
SVertex_add_fedge_doc},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject *kwds)
static PyObject * SVertex_add_fedge(BPy_SVertex *self, PyObject *args, PyObject *kwds)

Definition at line 133 of file BPy_SVertex.cpp.

◆ SVertex_mathutils_cb

Mathutils_Callback SVertex_mathutils_cb
static
Initial value:
= {
}
static int SVertex_mathutils_set_index(BaseMathObject *bmo, int subtype, int index)
static int SVertex_mathutils_get(BaseMathObject *bmo, int subtype)
static int SVertex_mathutils_set(BaseMathObject *bmo, int subtype)
static int SVertex_mathutils_get_index(BaseMathObject *bmo, int subtype, int index)
static int SVertex_mathutils_check(BaseMathObject *bmo)

Definition at line 261 of file BPy_SVertex.cpp.

Referenced by SVertex_mathutils_register_callback().

◆ SVertex_mathutils_cb_index

uchar SVertex_mathutils_cb_index = -1
static

◆ SVertex_Type