user: What is Curves Operators and how is it used in Blender Python scripting?

assistant: # Curves Operators

bpy.ops.curves.add_bezier(*\**, *radius=1.0*, *enter_editmode=False*, *align='WORLD'*, *location=(0.0, 0.0, 0.0)*, *rotation=(0.0, 0.0, 0.0)*, *scale=(0.0, 0.0, 0.0)*)
:   Add new Bézier curve

    Parameters:
    :   - **radius** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Radius
        - **enter_editmode** (*boolean**,* *(**optional**)*) – Enter Edit Mode, Enter edit mode when adding this object
        - **align** (enum in [`'WORLD'`, `'VIEW'`, `'CURSOR'`], (optional)) –

          Align, The alignment of the new object

          - `WORLD`
            World – Align the new object to the world.
          - `VIEW`
            View – Align the new object to the view.
          - `CURSOR`
            3D Cursor – Use the 3D cursor orientation for the new object.
        - **location** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Location, Location for the newly added object
        - **rotation** ([`mathutils.Euler`](mathutils.html#mathutils.Euler "mathutils.Euler") rotation of 3 items in [-inf, inf], (optional)) – Rotation, Rotation for the newly added object
        - **scale** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Scale, Scale for the newly added object

bpy.ops.curves.add_circle(*\**, *radius=1.0*, *enter_editmode=False*, *align='WORLD'*, *location=(0.0, 0.0, 0.0)*, *rotation=(0.0, 0.0, 0.0)*, *scale=(0.0, 0.0, 0.0)*)
:   Add new circle curve

    Parameters:
    :   - **radius** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Radius
        - **enter_editmode** (*boolean**,* *(**optional**)*) – Enter Edit Mode, Enter edit mode when adding this object
        - **align** (enum in [`'WORLD'`, `'VIEW'`, `'CURSOR'`], (optional)) –

          Align, The alignment of the new object

          - `WORLD`
            World – Align the new object to the world.
          - `VIEW`
            View – Align the new object to the view.
          - `CURSOR`
            3D Cursor – Use the 3D cursor orientation for the new object.
        - **location** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Location, Location for the newly added object
        - **rotation** ([`mathutils.Euler`](mathutils.html#mathutils.Euler "mathutils.Euler") rotation of 3 items in [-inf, inf], (optional)) – Rotation, Rotation for the newly added object
        - **scale** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], (optional)) – Scale, Scale for the newly added object

bpy.ops.curves.attribute_set(*\**, *value_float=0.0*, *value_float_vector_2d=(0.0, 0.0)*, *value_float_vector_3d=(0.0, 0.0, 0.0)*, *value_int=0*, *value_int_vector_2d=(0, 0)*, *value_color=(1.0, 1.0, 1.0, 1.0)*, *value_bool=False*)
:   Set values of the active attribute for selected elements

    Parameters:
    :   - **value_float** (*float in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value
        - **value_float_vector_2d** (*float array* *of* *2 items in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value
        - **value_float_vector_3d** (*float array* *of* *3 items in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value
        - **value_int** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value
        - **value_int_vector_2d** (*int array* *of* *2 items in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value
        - **value_color** (*float array* *of* *4 items in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Value
        - **value_bool** (*boolean**,* *(**optional**)*) – Value

bpy.ops.curves.convert_from_particle_system()
:   Add a new curves object based on the current state of the particle system

bpy.ops.curves.convert_to_particle_system()
:   Add a new or update an existing hair particle system on the surface object

bpy.ops.curves.curve_type_set(*\**, *type='POLY'*, *use_handles=False*)
:   Set type of selected curves

    Parameters:
    :   - **type** (enum in [Curves Type Items](bpy_types_enum_items/curves_type_items.html#rna-enum-curves-type-items), (optional)) – Type, Curve type
        - **use_handles** (*boolean**,* *(**optional**)*) – Handles, Take handle information into account in the conversion

bpy.ops.curves.cyclic_toggle()
:   Make active curve closed/opened loop

bpy.ops.curves.delete()
:   Remove selected control points or curves

bpy.ops.curves.draw(*\**, *error_threshold=0.0*, *fit_method='REFIT'*, *corner_angle=1.22173*, *use_cyclic=True*, *stroke=None*, *wait_for_input=True*, *is_curve_2d=False*, *bezier_as_nurbs=False*)
:   Draw a freehand curve

    Parameters:
    :   - **error_threshold** (*float in* *[**0**,* *10**]**,* *(**optional**)*) – Error, Error distance threshold (in object units)
        - **fit_method** (enum in [Curve Fit Method Items](bpy_types_enum_items/curve_fit_method_items.html#rna-enum-curve-fit-method-items), (optional)) – Fit Method
        - **corner_angle** (*float in* *[**0**,* *3.14159**]**,* *(**optional**)*) – Corner Angle
        - **use_cyclic** (*boolean**,* *(**optional**)*) – Cyclic
        - **stroke** (`bpy_prop_collection` of `OperatorStrokeElement`, (optional)) – Stroke
        - **wait_for_input** (*boolean**,* *(**optional**)*) – Wait for Input
        - **is_curve_2d** (*boolean**,* *(**optional**)*) – Curve 2D
        - **bezier_as_nurbs** (*boolean**,* *(**optional**)*) – As NURBS

bpy.ops.curves.duplicate()
:   Copy selected points or curves

bpy.ops.curves.duplicate_move(*\**, *CURVES_OT_duplicate=None*, *TRANSFORM_OT_translate=None*)
:   Make copies of selected elements and move them

    Parameters:
    :   - **CURVES_OT_duplicate** (`CURVES_OT_duplicate`, (optional)) – Duplicate, Copy selected points or curves
        - **TRANSFORM_OT_translate** (`TRANSFORM_OT_translate`, (optional)) – Move, Move selected items

bpy.ops.curves.extrude()
:   Extrude selected control point(s)

bpy.ops.curves.extrude_move(*\**, *CURVES_OT_extrude=None*, *TRANSFORM_OT_translate=None*)
:   Extrude curve and move result

    Parameters:
    :   - **CURVES_OT_extrude** (`CURVES_OT_extrude`, (optional)) – Extrude, Extrude selected control point(s)
        - **TRANSFORM_OT_translate** (`TRANSFORM_OT_translate`, (optional)) – Move, Move selected items

bpy.ops.curves.handle_type_set(*\**, *type='AUTO'*)
:   Set the handle type for bezier curves

    Parameters:
    :   **type** (enum in [`'AUTO'`, `'VECTOR'`, `'ALIGN'`, `'FREE_ALIGN'`, `'TOGGLE_FREE_ALIGN'`], (optional)) –

        Type

        - `AUTO`
          Auto – The location is automatically calculated to be smooth.
        - `VECTOR`
          Vector – The location is calculated to point to the next/previous control point.
        - `ALIGN`
          Align – The location is constrained to point in the opposite direction as the other handle.
        - `FREE_ALIGN`
          Free – The handle can be moved anywhere, and does not influence the point’s other handle.
        - `TOGGLE_FREE_ALIGN`
          Toggle Free/Align – Replace Free handles with Align, and all Align with Free handles.

bpy.ops.curves.pen(*\**, *extend=False*, *deselect=False*, *toggle=False*, *deselect_all=False*, *select_passthrough=False*, *extrude_point=False*, *extrude_handle='VECTOR'*, *delete_point=False*, *insert_point=False*, *move_segment=False*, *select_point=False*, *move_point=False*, *cycle_handle_type=False*, *size=0.01*)
:   Construct and edit Bézier curves

    Parameters:
    :   - **extend** (*boolean**,* *(**optional**)*) – Extend, Extend selection instead of deselecting everything first
        - **deselect** (*boolean**,* *(**optional**)*) – Deselect, Remove from selection
        - **toggle** (*boolean**,* *(**optional**)*) – Toggle Selection, Toggle the selection
        - **deselect_all** (*boolean**,* *(**optional**)*) – Deselect On Nothing, Deselect all when nothing under the cursor
        - **select_passthrough** (*boolean**,* *(**optional**)*) – Only Select Unselected, Ignore the select action when the element is already selected
        - **extrude_point** (*boolean**,* *(**optional**)*) – Extrude Point, Add a point connected to the last selected point
        - **extrude_handle** (enum in [`'AUTO'`, `'VECTOR'`], (optional)) – Extrude Handle Type, Type of the extruded handle
        - **delete_point** (*boolean**,* *(**optional**)*) – Delete Point, Delete an existing point
        - **insert_point** (*boolean**,* *(**optional**)*) – Insert Point, Insert Point into a curve segment
        - **move_segment** (*boolean**,* *(**optional**)*) – Move Segment, Delete an existing point
        - **select_point** (*boolean**,* *(**optional**)*) – Select Point, Select a point or its handles
        - **move_point** (*boolean**,* *(**optional**)*) – Move Point, Move a point or its handles
        - **cycle_handle_type** (*boolean**,* *(**optional**)*) – Cycle Handle Type, Cycle between all four handle types
        - **size** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Size, Diameter of new points

bpy.ops.curves.sculptmode_toggle()
:   Enter/Exit sculpt mode for curves

bpy.ops.curves.select_all(*\**, *action='TOGGLE'*)
:   (De)select all control points

    Parameters:
    :   **action** (enum in [`'TOGGLE'`, `'SELECT'`, `'DESELECT'`, `'INVERT'`], (optional)) –

        Action, Selection action to execute

        - `TOGGLE`
          Toggle – Toggle selection for all elements.
        - `SELECT`
          Select – Select all elements.
        - `DESELECT`
          Deselect – Deselect all elements.
        - `INVERT`
          Invert – Invert selection of all elements.

bpy.ops.curves.select_ends(*\**, *amount_start=0*, *amount_end=1*)
:   Select end points of curves

    Parameters:
    :   - **amount_start** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Amount Front, Number of points to select from the front
        - **amount_end** (*int in* *[**0**,* *inf**]**,* *(**optional**)*) – Amount Back, Number of points to select from the back

bpy.ops.curves.select_less()
:   Shrink the selection by one point

bpy.ops.curves.select_linked()
:   Select all points in curves with any point selection

bpy.ops.curves.select_linked_pick(*\**, *deselect=False*)
:   Select all points in the curve under the cursor

    Parameters:
    :   **deselect** (*boolean**,* *(**optional**)*) – Deselect, Deselect linked control points rather than selecting them

bpy.ops.curves.select_more()
:   Grow the selection by one point

bpy.ops.curves.select_random(*\**, *seed=0*, *probability=0.5*)
:   Randomizes existing selection or create new random selection

    Parameters:
    :   - **seed** (*int in* *[**-inf**,* *inf**]**,* *(**optional**)*) – Seed, Source of randomness
        - **probability** (*float in* *[**0**,* *1**]**,* *(**optional**)*) – Probability, Chance of every point or curve being included in the selection

bpy.ops.curves.separate()
:   Separate selected geometry into a new object

bpy.ops.curves.set_selection_domain(*\**, *domain='POINT'*)
:   Change the mode used for selection masking in curves sculpt mode

    Parameters:
    :   **domain** (enum in [Attribute Curves Domain Items](bpy_types_enum_items/attribute_curves_domain_items.html#rna-enum-attribute-curves-domain-items), (optional)) – Domain

bpy.ops.curves.snap_curves_to_surface(*\**, *attach_mode='NEAREST'*)
:   Move curves so that the first point is exactly on the surface mesh

    Parameters:
    :   **attach_mode** (enum in [`'NEAREST'`, `'DEFORM'`], (optional)) –

        Attach Mode, How to find the point on the surface to attach to

        - `NEAREST`
          Nearest – Find the closest point on the surface for the root point of every curve and move the root there.
        - `DEFORM`
          Deform – Re-attach curves to a deformed surface using the existing attachment information. This only works when the topology of the surface mesh has not changed.

bpy.ops.curves.split()
:   Split selected points

bpy.ops.curves.subdivide(*\**, *number_cuts=1*)
:   Subdivide selected curve segments

    Parameters:
    :   **number_cuts** (*int in* *[**1**,* *1000**]**,* *(**optional**)*) – Number of Cuts

bpy.ops.curves.surface_set()
:   Use the active object as surface for selected curves objects and set it as the parent

bpy.ops.curves.switch_direction()
:   Reverse the direction of the selected curves

bpy.ops.curves.tilt_clear()
:   Clear the tilt of selected control points