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

assistant: rementation is a typical illustration of such a modifier).
              If this argument is not given, the time stamp is automatically managed.

    *static* create(*pred*, *shaders*)
    :   Creates and shades the strokes from the current set of chains. A
        predicate can be specified to make a selection pass on the chains.

        Parameters:
        :   - **pred** (`UnaryPredicate1D`) – The predicate that a chain must verify in order to be
              transform as a stroke.
            - **shaders** (list[`StrokeShader`]) – The list of shaders used to shade the strokes.

    *static* get_chain_from_index(*i*)
    :   Returns the Chain at the index in the current set of Chains.

        Parameters:
        :   **i** (*int*) – index (0 <= i < Operators.get_chains_size()).

        Returns:
        :   The Chain object.

        Return type:
        :   `Chain`

    *static* get_chains_size()
    :   Returns the number of Chains.

        Returns:
        :   The number of Chains.

        Return type:
        :   int

    *static* get_stroke_from_index(*i*)
    :   Returns the Stroke at the index in the current set of Strokes.

        Parameters:
        :   **i** (*int*) – index (0 <= i < Operators.get_strokes_size()).

        Returns:
        :   The Stroke object.

        Return type:
        :   `Stroke`

    *static* get_strokes_size()
    :   Returns the number of Strokes.

        Returns:
        :   The number of Strokes.

        Return type:
        :   int

    *static* get_view_edges_size()
    :   Returns the number of ViewEdges.

        Returns:
        :   The number of ViewEdges.

        Return type:
        :   int

    *static* get_viewedge_from_index(*i*)
    :   Returns the ViewEdge at the index in the current set of ViewEdges.

        Parameters:
        :   **i** (*int*) – index (0 <= i < Operators.get_view_edges_size()).

        Returns:
        :   The ViewEdge object.

        Return type:
        :   `ViewEdge`

    *static* recursive_split(*func*, *pred_1d*, *sampling=0.0*)

    *static* recursive_split(*func*, *pred_0d*, *pred_1d*, *sampling=0.0*)
    :   Splits the current set of chains in a recursive way. We process the
        points of each chain (with a specified sampling) to find the point
        minimizing a specified function. The chain is split in two at this
        point and the two new chains are processed in the same way. The
        recursivity level is controlled through a predicate 1D that expresses
        a stopping condition on the chain that is about to be processed.

        The user can also specify a 0D predicate to make a first selection on the points
        that can potentially be split. A point that doesn’t verify the 0D
        predicate won’t be candidate in realizing the min.

        Parameters:
        :   - **func** (`UnaryFunction0DDouble`) – The Unary Function evaluated at each point of the chain.
              The splitting point is the point minimizing this function.
            - **pred_0d** (`UnaryPredicate0D`) – The Unary Predicate 0D used to select the candidate
              points where the split can occur. For example, it is very likely
              that would rather have your chain splitting around its middle
              point than around one of its extremities. A 0D predicate working
              on the curvilinear abscissa allows to add this kind of constraints.
            - **pred_1d** (`UnaryPredicate1D`) – The Unary Predicate expressing the recursivity stopping
              condition. This predicate is evaluated for each curve before it
              actually gets split. If pred_1d(chain) is true, the curve won’t be
              split anymore.
            - **sampling** (*float*) – The resolution used to sample the chain for the
              predicates evaluation. (The chain is not actually resampled; a
              virtual point only progresses along the curve using this
              resolution.)

    *static* reset(*delete_strokes=True*)
    :   Resets the line stylization process to the initial state. The results of
        stroke creation are accumulated if **delete_strokes** is set to False.

        Parameters:
        :   **delete_strokes** (*bool*) – Delete the strokes that are currently stored.

    *static* select(*pred*)
    :   Selects the ViewEdges of the ViewMap verifying a specified
        condition.

        Parameters:
        :   **pred** (`UnaryPredicate1D`) – The predicate expressing this condition.

    *static* sequential_split(*starting_pred*, *stopping_pred*, *sampling=0.0*)

    *static* sequential_split(*pred*, *sampling=0.0*)
    :   Splits each chain of the current set of chains in a sequential way.
        The points of each chain are processed (with a specified sampling)
        sequentially. The first point of the initial chain is the
        first point of one of the resulting chains. The splitting ends when
        no more chain can start.

        Parameters:
        :   - **starting_pred** (`UnaryPredicate0D`) – The predicate on a point that expresses the
              starting condition. Each time this condition is verified, a new chain begins
            - **stopping_pred** (`UnaryPredicate0D`) – The predicate on a point that expresses the
              stopping condition. The chain ends as soon as this predicate is verified.
            - **pred** (`UnaryPredicate0D`) – The predicate on a point that expresses the splitting condition.
              Each time the condition is verified, the chain is split into two chains.
              The resulting set of chains is a partition of the initial chain
            - **sampling** (*float*) – The resolution used to sample the chain for the
              predicates evaluation. (The chain is not actually resampled;
              a virtual point only progresses along the curve using this
              resolution.)

    *static* sort(*pred*)
    :   Sorts the current set of chains (or viewedges) according to the
        comparison predicate given as argument.

        Parameters:
        :   **pred** (`BinaryPredicate1D`) – The binary predicate used for the comparison.

*class* freestyle.types.SShape
:   Class to define a feature shape. It is the gathering of feature
    elements from an identified input shape.

    __init__()

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

        Parameters:
        :   **brother** (`SShape`) – An SShape object.

    add_edge(*edge*)
    :   Adds an FEdge to the list of FEdges.

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

    add_vertex(*vertex*)
    :   Adds an SVertex to the list of SVertex of this Shape. The SShape
        attribute of the SVertex is also set to this SShape.

        Parameters:
        :   **vertex** (`SVertex`) – An SVertex object.

    compute_bbox()
    :   Compute the bbox of the SShape.

    bbox
    :   The bounding box of the SShape.

        Type:
        :   `BBox`

    edges
    :   The list of edges constituting this SShape.

        Type:
        :   List of `FEdge`

    id
    :   The Id of this SShape.

        Type:
        :   `Id`

    name
    :   The name of the SShape.

        Type:
        :   str

    vertices
    :   The list of vertices constituting this SShape.

        Type:
        :   List of `SVertex`

*class* freestyle.types.SVertex
:   Class hierarchy: `Interface0D` > `SVertex`

    Class to define a vertex of the embedding.

    __init__()

    __init__(*brother*)

    __init__(*point_3d*, *id*)
    :   Builds a `SVertex` using the default constructor,
        copy constructor or the overloaded constructor which builds a `SVertex` from 3D coordinates and an Id.

        Parameters:
        :   - **brother** (`SVertex`) – A SVertex object.
            - **point_3d** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector")) – A three-dimensional vector.
            - **id** (`Id`) – An Id object.

    add_fedge(*fedge*)
    :   Add an FEdge to the list of edges emanating from this SVertex.

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

    add_normal(*normal*)
    :   Adds a normal to the SVertex’s set of normals. If the same normal
        is already in the set, nothing changes.

        Parameters:
        :   **normal** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") | tuple[float, float, float] | list[float]) – A three-dimensional vector.

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

        Type:
        :   tuple

    id
    :   The Id of this SVertex.

        Type:
        :   `Id`

    normals
    :   The normals for this Vertex as a list. In a sharp surface, an SVertex
        has exactly one normal. In a smooth surface, an SVertex can have any
        number of normals.

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

    normals_size
    :   The number of different normals for this SVertex.

        Type:
        :   int

    point_2d
    :   The projected 3D coordinates of the SVertex.

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

    point_3d
    :   The 3D coordinates of the SVertex.

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

    viewvertex
    :   If this SVertex is also a ViewVertex, this property refers to the
        ViewVertex, and None otherwise.

        Type:
        :   `ViewVertex`

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

    Class representing an iterator over `SVertex` of a
    `ViewEdge`. An instance of an SVertexIterator can be obtained
    from a ViewEdge by calling verticesBegin() or verticesEnd().

    __init__()

    __init__(*brother*)

    __init__(*vertex*, *begin*, *previous_edge*, *next_edge*, *t*)

    Build an SVertexIterator using either the default constructor, copy constructor,

    or the overloaded constructor that starts iteration from an SVertex object vertex.
    :   Parameters:
        :   - **brother** (`SVertexIterator`) – An SVertexIterator object.
            - **vertex** (`SVertex`) – The SVertex from which the iterator starts iteration.
            - **begin** (`SVertex`) – The first SVertex of a ViewEdge.
            - **previous_edge** (`FEdge`) – The previous FEdge coming to vertex.
            - **next_edge** (`FEdge`) – The next FEdge going out from vertex.
            - **t** (*float*) – The curvilinear abscissa at vertex.

    object
    :   The SVertex object currently pointed by this iterator.

        Type:
        :   `SVertex`

    t
    :   The curvilinear abscissa of the current point.

        Type:
        :   float

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

        Type:
        :   float

*class* freestyle.types.Stroke
:   Class hierarchy: `Interface1D` > [`Stroke`](#freestyle.types.freestyle.types.Stroke.Stroke "freestyle.types.freestyle.types.Stroke.Stroke")

    Class to define a stroke. A stroke is made of a set of 2D vertices
    (`StrokeVertex`), regularly spaced out. This set of vertices
    defines the stroke’s backbone geometry. Each of these stroke vertices
    defines the stroke’s shape and appearance at this vertex position.

    Stroke()

    Stroke(*brother*)
    :   Creates a [`Stroke`](#freestyle.types.freestyle.types.Stroke.Stroke "freestyle.types.freestyle.types.Stroke.Stroke") using the default constructor or copy constructor

    compute_sampling(*n*)
    :   Compute the sampling needed to get N vertices. If the
        specified number of vertices is less than the actual number of
        vertices, the actual sampling value is returned. (To remove Vertices,
        use the RemoveVertex() method of this class.)

        Parameters:
        :   **n** (*int*) – The number of stroke vertices we eventually want
            in our Stroke.

        Returns:
        :   The sampling that must be used in the Resample(float)
            method.

        Return type:
        :   float

    insert_vertex(*vertex*, *next*)
    :   Inserts the StrokeVertex given as argument into the Stroke before the
        point specified by next. The length and curvilinear abscissa are
        updated consequently.

        Parameters:
        :   - **vertex** (`StrokeVertex`) – The StrokeVertex to insert in the Stroke.
            - **next** (`StrokeVertexIterator`) – A StrokeVertexIterator pointing to the StrokeVertex
              before which vertex must be inserted.

    remove_all_vertices()
    :   Removes all vertices from the Stroke.

    remove_vertex(*vertex*)
    :   Removes the StrokeVertex given as argument from the Stroke. The length
        and curvilinear abscissa are updated consequently.

        Parameters:
        :   **vertex** (`StrokeVertex`) – the StrokeVertex to remove from the Stroke.

    resample(*n*)

    resample(*sampling*)
    :   Resamples the stroke so using one of two methods with the goal
        of creating a stroke with fewer points and the same shape.

        Parameters:
        :   - **n** (*int*) – Resamples the stroke so that it eventually has N points. That means
              it is going to add N-vertices_size, where vertices_size is the
              number of points we already have. If vertices_size >= N, no
              resampling is done.
            - **sampling** (*float*) – Resamples the stroke with a given sampling value. If the
              sampling is smaller than the actual sampling value, no resampling is done.

    stroke_vertices_begin(*t=0.0*)
    :   Returns a StrokeVertexIterator pointing on the first StrokeVertex of
        the Stroke. One can specify a sampling value to re-sample the Stroke
        on the fly if needed.

        Parameters:
        :   **t** (*float*) – The resampling value with which we want our Stroke to be
            resampled. If 0 is specified, no resampling is done.

        Returns:
        :   A StrokeVertexIterator pointing on the first StrokeVertex.

        Return type:
        :   `StrokeVertexIterator`

    stroke_vertices_end()
    :   Returns a StrokeVertexIterator pointing after the last StrokeVertex
        of the Stroke.

        Returns:
        :   A StrokeVertexIterator pointing after the last StrokeVertex.

        Return type:
        :   `StrokeVertexIterator`

    stroke_vertices_size()
    :   Returns the number of StrokeVertex constituting the Stroke.

        Returns:
        :   The number of stroke vertices.

        Return type:
        :   int

    update_length()
    :   Updates the 2D length of the Stroke.

    id
    :   The Id of this Stroke.

        Type:
        :   `Id`

    length_2d
    :   The 2D length of the Stroke.

        Type:
        :   float

    medium_type
    :   The MediumType used for this Stroke.

        Type:
        :   `MediumType`

    texture_id
    :   The ID of the texture used to simulate th marks system for this Stroke.

        Type:
        :   int

    tips
    :   True if this Stroke uses a texture with tips, and false otherwise.

        Type:
        :   bool

*class* freestyle.types.StrokeAttribute
:   Class to define a set of attributes associated with a `StrokeVertex`.
    The attribute set stores the color, alpha and thickness values for a Stroke
    Vertex.

    __init__()

    __init__(*brother*)

    __init__(*red*, *green*, *blue*, *alpha*, *thickness_right*, *thickness_left*)

    __init__(*attribute1*, *attribute2*, *t*)
    :   Creates a `StrokeAttribute` object using either a default constructor,
        copy constructor, overloaded constructor, or and interpolation constructor
        to interpolate between two `StrokeAttribute` objects.

        Parameters:
        :   - **brother** (`StrokeAttribute`) – A StrokeAttribute object to be used as a copy constructor.
            - **red** (*float*) – Red component of a stroke color.
            - **green** (*float*) – Green component of a stroke color.
            - **blue** (*float*) – Blue component of a stroke color.
            - **alpha** (*float*) – Alpha component of a stroke color.
            - **thickness_right** (*float*) – Stroke thickness on the right.
            - **thickness_left** (*float*) – Stroke thickness on the left.
            - **attribute1** (`StrokeAttribute`) – The first StrokeAttribute object.
            - **attribute2** (`StrokeAttribute`) – The second StrokeAttribute object.
            - **t** (*float*) – The interpolation parameter (0 <= t <= 1).

    get_attribute_real(*name*)
    :   Returns an attribute of float type.

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

        Returns:
        :   The attribute value.

        Return type:
        :   float

    get_attribute_vec2(*name*)
    :   Returns an attribute of two-dimensional vector type.

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

        Returns:
        :   The attribute value.

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

    get_attribute_vec3(*name*)
    :   Returns an attribute of three-dimensional vector type.

        Parameters:
        :