user: Describe Freestyle Types (freestyle.types) from the Blender manual or Python API, including usage steps and snippets.

assistant:  **name** (*str*) – The name of the attribute.

        Returns:
        :   The attribute value.

        Return type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector")

    has_attribute_real(*name*)
    :   Checks whether the attribute name of float type is available.

        Parameters:
        :   **name** (*str*) – The name of the attribute.

        Returns:
        :   True if the attribute is available.

        Return type:
        :   bool

    has_attribute_vec2(*name*)
    :   Checks whether the attribute name of two-dimensional vector type
        is available.

        Parameters:
        :   **name** (*str*) – The name of the attribute.

        Returns:
        :   True if the attribute is available.

        Return type:
        :   bool

    has_attribute_vec3(*name*)
    :   Checks whether the attribute name of three-dimensional vector
        type is available.

        Parameters:
        :   **name** (*str*) – The name of the attribute.

        Returns:
        :   True if the attribute is available.

        Return type:
        :   bool

    set_attribute_real(*name*, *value*)
    :   Adds a user-defined attribute of float type. If there is no
        attribute of the given name, it is added. Otherwise, the new value
        replaces the old one.

        Parameters:
        :   - **name** (*str*) – The name of the attribute.
            - **value** (*float*) – The attribute value.

    set_attribute_vec2(*name*, *value*)
    :   Adds a user-defined attribute of two-dimensional vector type. If
        there is no attribute of the given name, it is added. Otherwise,
        the new value replaces the old one.

        Parameters:
        :   - **name** (*str*) – The name of the attribute.
            - **value** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") | tuple[float, float, float] | list[float]) – The attribute value.

    set_attribute_vec3(*name*, *value*)
    :   Adds a user-defined attribute of three-dimensional vector type.
        If there is no attribute of the given name, it is added.
        Otherwise, the new value replaces the old one.

        Parameters:
        :   - **name** (*str*) – The name of the attribute.
            - **value** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") | tuple[float, float, float] | list[float]) – The attribute value as a 3D vector.

    alpha
    :   Alpha component of the stroke color.

        Type:
        :   float

    color
    :   RGB components of the stroke color.

        Type:
        :   [`mathutils.Color`](mathutils.html#mathutils.Color "mathutils.Color")

    thickness
    :   Right and left components of the stroke thickness.
        The right (left) component is the thickness on the right (left) of the vertex
        when following the stroke.

        Type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector")

    visible
    :   The visibility flag. True if the StrokeVertex is visible.

        Type:
        :   bool

*class* freestyle.types.StrokeShader
:   Base class for stroke shaders. Any stroke shader must inherit from
    this class and overload the shade() method. A StrokeShader is
    designed to modify stroke attributes such as thickness, color,
    geometry, texture, blending mode, and so on. The basic way for this
    operation is to iterate over the stroke vertices of the `Stroke`
    and to modify the `StrokeAttribute` of each vertex. Here is a
    code example of such an iteration:

    ```
    it = ioStroke.strokeVerticesBegin()
    while not it.is_end:
        att = it.object.attribute
        ## perform here any attribute modification
        it.increment()
    ```

    __init__()
    :   Default constructor.

    shade(*stroke*)
    :   The shading method. Must be overloaded by inherited classes.

        Parameters:
        :   **stroke** (`Stroke`) – A Stroke object.

    name
    :   The name of the stroke shader.

        Type:
        :   str

*class* freestyle.types.StrokeVertex
:   Class hierarchy: `Interface0D` > `CurvePoint` > `StrokeVertex`

    Class to define a stroke vertex.

    __init__()

    __init__(*brother*)

    __init__(*first_vertex*, *second_vertex*, *t3d*)

    __init__(*point*)

    __init__(*svertex*)

    __init__(*svertex*, *attribute*)
    :   Builds a `StrokeVertex` using the default constructor,
        copy constructor, from 2 `StrokeVertex` and an interpolation parameter,
        from a CurvePoint, from a SVertex, or a `SVertex` and a `StrokeAttribute` object.

        Parameters:
        :   - **brother** (`StrokeVertex`) – A StrokeVertex object.
            - **first_vertex** (`StrokeVertex`) – The first StrokeVertex.
            - **second_vertex** (`StrokeVertex`) – The second StrokeVertex.
            - **t3d** (*float*) – An interpolation parameter.
            - **point** (`CurvePoint`) – A CurvePoint object.
            - **svertex** (`SVertex`) – An SVertex object.
            - **svertex** – An SVertex object.
            - **attribute** (`StrokeAttribute`) – A StrokeAttribute object.

    attribute
    :   StrokeAttribute for this StrokeVertex.

        Type:
        :   `StrokeAttribute`

    curvilinear_abscissa
    :   Curvilinear abscissa of this StrokeVertex in the Stroke.

        Type:
        :   float

    point
    :   2D point coordinates.

        Type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector")

    stroke_length
    :   Stroke length (it is only a value retained by the StrokeVertex,
        and it won’t change the real stroke length).

        Type:
        :   float

    u
    :   Curvilinear abscissa of this StrokeVertex in the Stroke.

        Type:
        :   float

*class* freestyle.types.StrokeVertexIterator
:   Class hierarchy: `Iterator` > `StrokeVertexIterator`

    Class defining an iterator designed to iterate over the
    `StrokeVertex` of a `Stroke`. An instance of a
    StrokeVertexIterator can be obtained from a Stroke by calling
    iter(), stroke_vertices_begin() or stroke_vertices_begin(). It is iterating
    over the same vertices as an `Interface0DIterator`. The difference
    resides in the object access: an Interface0DIterator only allows
    access to an Interface0D while one might need to access the
    specialized StrokeVertex type. In this case, one should use a
    StrokeVertexIterator. To call functions of the UnaryFuntion0D type,
    a StrokeVertexIterator can be converted to an Interface0DIterator by
    by calling Interface0DIterator(it).

    __init__()

    __init__(*brother*)
    :   Creates a `StrokeVertexIterator` using either the
        default constructor or the copy constructor.

        Parameters:
        :   **brother** (`StrokeVertexIterator`) – A StrokeVertexIterator object.

    decremented()
    :   Returns a copy of a decremented StrokeVertexIterator.

        Returns:
        :   A StrokeVertexIterator pointing the previous StrokeVertex.

        Return type:
        :   `StrokeVertexIterator`

    incremented()
    :   Returns a copy of an incremented StrokeVertexIterator.

        Returns:
        :   A StrokeVertexIterator pointing the next StrokeVertex.

        Return type:
        :   `StrokeVertexIterator`

    reversed()
    :   Returns a StrokeVertexIterator that traverses stroke vertices in the
        reversed order.

        Returns:
        :   A StrokeVertexIterator traversing stroke vertices backward.

        Return type:
        :   `StrokeVertexIterator`

    at_last
    :   True if the iterator points to the last valid element.
        For its counterpart (pointing to the first valid element), use it.is_begin.

        Type:
        :   bool

    object
    :   The StrokeVertex object currently pointed to by this iterator.

        Type:
        :   `StrokeVertex`

    t
    :   The curvilinear abscissa of the current point.

        Type:
        :   float

    u
    :   The point parameter at the current point in the stroke (0 <= u <= 1).

        Type:
        :   float

*class* freestyle.types.TVertex
:   Class hierarchy: `Interface0D` > `ViewVertex` > `TVertex`

    Class to define a T vertex, i.e. an intersection between two edges.
    It points towards two SVertex and four ViewEdges. Among the
    ViewEdges, two are front and the other two are back. Basically a
    front edge hides part of a back edge. So, among the back edges, one
    is of invisibility N and the other of invisibility N+1.

    __init__()
    :   Default constructor.

    get_mate(*viewedge*)
    :   Returns the mate edge of the ViewEdge given as argument. If the
        ViewEdge is frontEdgeA, frontEdgeB is returned. If the ViewEdge is
        frontEdgeB, frontEdgeA is returned. Same for back edges.

        Parameters:
        :   **viewedge** (`ViewEdge`) – A ViewEdge object.

        Returns:
        :   The mate edge of the given ViewEdge.

        Return type:
        :   `ViewEdge`

    get_svertex(*fedge*)
    :   Returns the SVertex (among the 2) belonging to the given FEdge.

        Parameters:
        :   **fedge** (`FEdge`) – An FEdge object.

        Returns:
        :   The SVertex belonging to the given FEdge.

        Return type:
        :   `SVertex`

    back_svertex
    :   The SVertex that is further away from the viewpoint.

        Type:
        :   `SVertex`

    front_svertex
    :   The SVertex that is closer to the viewpoint.

        Type:
        :   `SVertex`

    id
    :   The Id of this TVertex.

        Type:
        :   `Id`

*class* freestyle.types.UnaryFunction0D
:   Base class for Unary Functions (functors) working on
    `Interface0DIterator`. A unary function will be used by
    invoking __call__() on an Interface0DIterator. In Python, several
    different subclasses of UnaryFunction0D are used depending on the
    types of functors’ return values. For example, you would inherit from
    a `UnaryFunction0DDouble` if you wish to define a function that
    returns a double value. Available UnaryFunction0D subclasses are:

    - `UnaryFunction0DDouble`
    - `UnaryFunction0DEdgeNature`
    - `UnaryFunction0DFloat`
    - `UnaryFunction0DId`
    - `UnaryFunction0DMaterial`
    - `UnaryFunction0DUnsigned`
    - `UnaryFunction0DVec2f`
    - `UnaryFunction0DVec3f`
    - `UnaryFunction0DVectorViewShape`
    - `UnaryFunction0DViewShape`

    name
    :   The name of the unary 0D function.

        Type:
        :   str

*class* freestyle.types.UnaryFunction0DDouble
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DDouble`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a float value.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DEdgeNature
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DEdgeNature`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a `Nature` object.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DFloat
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DFloat`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a float value.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DId
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DId`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return an `Id` object.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DMaterial
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DMaterial`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a `Material` object.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DUnsigned
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DUnsigned`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return an int value.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DVec2f
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DVec2f`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a 2D vector.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DVec3f
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DVec3f`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a 3D vector.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DVectorViewShape
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DVectorViewShape`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a list of `ViewShape`
    objects.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction0DViewShape
:   Class hierarchy: `UnaryFunction0D` > `UnaryFunction0DViewShape`

    Base class for unary functions (functors) that work on
    `Interface0DIterator` and return a `ViewShape` object.

    __init__()
    :   Default constructor.

*class* freestyle.types.UnaryFunction1D
:   Base class for Unary Functions (functors) working on
    `Interface1D`. A unary function will be used by invoking
    __call__() on an Interface1D. In Python, several different subclasses
    of UnaryFunction1D are used depending on the types of functors’ return
    values. For example, you would inherit from a
    `UnaryFunction1DDouble` if you wish to define a function that
    returns a double value. Available UnaryFunction1D subclasses are:

    - `UnaryFunction1DDouble`
    - `UnaryFunction1DEdgeNature`
    - `UnaryFunction1DFloat`
    - `UnaryFunction1DUnsigned`
    - `UnaryFunction1DVec2f`
    - `UnaryFunction1DVec3f`
    - `UnaryFunction1DVectorViewShape`
    - `UnaryFunction1DVoid`

    name
    :   The name of the unary 1D function.

        Type:
        :   str

*class* freestyle.types.UnaryFunction1DDouble
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DDouble`

    Base class for unary functions (functors) that work on
    `Interface1D` and return a float value.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the integration method given as an argument.

        Parameters:
        :   **integration_type** (`IntegrationType`) – An integration method.

    integration_type
    :   The integration method.

        Type:
        :   `IntegrationType`

*class* freestyle.types.UnaryFunction1DEdgeNature
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DEdgeNature`

    Base class for unary functions (functors) that work on
    `Interface1D` and return a `Nature` object.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the integration method given as an argument.

        Parameters:
        :   **integration_type** (`IntegrationType`) – An integration method.

    integration_type
    :   The integration method.

        Type:
        :   `IntegrationType`

*class* freestyle.types.UnaryFunction1DFloat
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DFloat`

    Base class for unary functions (functors) that work on
    `Interface1D` and return a float value.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the integration method given as an argument.

        Parameters:
        :   **integration_type** (`IntegrationType`) – An integration method.

    integration_type
    :   The integration method.

        Type:
        :   `IntegrationType`

*class* freestyle.types.UnaryFunction1DUnsigned
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DUnsigned`

    Base class for unary functions (functors) that work on
    `Interface1D` and return an int value.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the integration method given as an argument.

        Parameters:
        :   **integration_type** (`IntegrationType`) – An integration method.

    integration_type
    :   The integration method.

        Type:
        :   `IntegrationType`

*class* freestyle.types.UnaryFunction1DVec2f
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DVec2f`

    Base class for unary functions (functors) that work on
    `Interface1D` and return a 2D vector.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the integration method given as an argument.

        Parameters:
        :   **integration_type** (`IntegrationType`) – An integration method.

    integration_type
    :   The integration method.

        Type:
        :   `IntegrationType`

*class* freestyle.types.UnaryFunction1DVec3f
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DVec3f`

    Base class for unary functions (functors) that work on
    `Interface1D` and return a 3D vector.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the integration method given as an argument.

        Parameters:
        :   **integration_type** (`IntegrationType`) – An integration method.

    integration_type
    :   The integration method.

        Type:
        :   `IntegrationType`

*class* freestyle.types.UnaryFunction1DVectorViewShape
:   Class hierarchy: `UnaryFunction1D` > `UnaryFunction1DVectorViewShape`

    Base class for unary functions (functors) that work on
    `Interface1D` and return a list of `ViewShape`
    objects.

    __init__()

    __init__(*integration_type*)
    :   Builds a unary 1D function using the default constructor
        or the