import six
from ipywidgets import Widget, DOMWidget, widget_serialization, Color, register
from traitlets import (
    Unicode, Int, CInt, Instance, ForwardDeclaredInstance, This, Enum,
    Tuple, List, Dict, Float, CFloat, Bool, Union, Any,
    )

from .._base.Three import ThreeWidget
from ..enums import *
from ..traits import *

from ..core.BaseGeometry_autogen import BaseGeometry

from ..extras.core.Curve_autogen import Curve

@register
class TubeGeometry(BaseGeometry):
    """TubeGeometry

    Autogenerated by generate-wrappers.js
    Date: Tue Dec 19 2017 10:52:06 GMT+0100 (W. Europe Standard Time)
    See https://threejs.org/docs/#api/geometries/TubeGeometry
    """

    def __init__(self, path=None, segments=64, radius=1, radiusSegments=8, close=False, **kwargs):
        kwargs['path'] = path
        kwargs['segments'] = segments
        kwargs['radius'] = radius
        kwargs['radiusSegments'] = radiusSegments
        kwargs['close'] = close
        super(TubeGeometry, self).__init__(**kwargs)

    _model_name = Unicode('TubeGeometryModel').tag(sync=True)

    path = Instance(Curve, allow_none=True).tag(sync=True, **widget_serialization)

    segments = CInt(64, allow_none=False).tag(sync=True)

    radius = CFloat(1, allow_none=False).tag(sync=True)

    radiusSegments = CInt(8, allow_none=False).tag(sync=True)

    close = Bool(False, allow_none=False).tag(sync=True)


if six.PY3:
    import inspect
    # Include explicit signature since the metaclass screws it up
    TubeGeometry.__signature__ = inspect.signature(TubeGeometry.__init__)
