# Path: trimesh/constants.py
# class NumericalToleranceMesh(object):
# class NumericalResolutionMesh(object):
# class NumericalTolerancePath(object):
# class NumericalResolutionPath(object):
# class MeshError(Exception):
# class TransformError(Exception):
#     def __init__(self, **kwargs):
#     def __init__(self, **kwargs):
#     def __init__(self, **kwargs):
#     def __init__(self, **kwargs):
# def _log_time(method):
#     def timed(*args, **kwargs):
# 
# Path: trimesh/path/entities.py
# class Line(Entity):
#     '''
#     A line or poly-line entity
#     '''
# 
#     def discrete(self, vertices, scale=1.0):
#         return vertices[self.points]
# 
#     @property
#     def is_valid(self):
#         valid = np.any((self.points - self.points[0]) != 0)
#         return valid
# 
#     def explode(self):
#         points = np.column_stack((self.points,
#                                   self.points)).ravel()[1:-1].reshape((-1, 2))
#         return [Line(i) for i in points]
# 
# class Arc(Entity):
# 
#     @property
#     def closed(self):
#         if hasattr(self, '_closed'):
#             return self._closed
#         return False
# 
#     @closed.setter
#     def closed(self, value):
#         self._closed = bool(value)
# 
#     def discrete(self, vertices, scale=1.0):
#         return discretize_arc(vertices[self.points],
#                               close=self.closed,
#                               scale=scale)
# 
#     def center(self, vertices):
#         return arc_center(vertices[self.points])
# 
# class Bezier(Curve):
# 
#     def discrete(self, vertices, scale=1.0):
#         return discretize_bezier(vertices[self.points], scale=scale)


import numpy as np
from ...constants import log
from ..entities import Line, Arc, Bezier
from collections import deque
from xml.dom.minidom import parseString as parse_xml
    from svg.path import parse_path
        if not starting:
            points[0] = vertices[-1]
        entities.append(Line(np.arange(2) + len(vertices)))
        vertices.extend(points)

    def load_arc(svg_arc):
        points = complex_to_float([svg_arc.start,
                                   svg_arc.point(.5),
                                   svg_arc.end])
        if not starting:
            points[0] = vertices[-1]
        entities.append(Arc(np.arange(3) + len(vertices)))
        vertices.extend(points)

    def load_quadratic(svg_quadratic):
        points = complex_to_float([svg_quadratic.start,
                                   svg_quadratic.control,
                                   svg_quadratic.end])
        if not starting:
            points[0] = vertices[-1]
        entities.append(Bezier(np.arange(3) + len(vertices)))
        vertices.extend(points)

    def load_cubic(svg_cubic):
        points = complex_to_float([svg_cubic.start,
                                   svg_cubic.control1,
                                   svg_cubic.control2,
                                   svg_cubic.end])
        if not starting:
            points[0] = vertices[-1]

# Path: trimesh/constants.py
# class NumericalToleranceMesh(object):
# class NumericalResolutionMesh(object):
# class NumericalTolerancePath(object):
# class NumericalResolutionPath(object):
# class MeshError(Exception):
# class TransformError(Exception):
#     def __init__(self, **kwargs):
#     def __init__(self, **kwargs):
#     def __init__(self, **kwargs):
#     def __init__(self, **kwargs):
# def _log_time(method):
#     def timed(*args, **kwargs):
# 
# Path: trimesh/path/entities.py
# class Line(Entity):
#     '''
#     A line or poly-line entity
#     '''
# 
#     def discrete(self, vertices, scale=1.0):
#         return vertices[self.points]
# 
#     @property
#     def is_valid(self):
#         valid = np.any((self.points - self.points[0]) != 0)
#         return valid
# 
#     def explode(self):
#         points = np.column_stack((self.points,
#                                   self.points)).ravel()[1:-1].reshape((-1, 2))
#         return [Line(i) for i in points]
# 
# class Arc(Entity):
# 
#     @property
#     def closed(self):
#         if hasattr(self, '_closed'):
#             return self._closed
#         return False
# 
#     @closed.setter
#     def closed(self, value):
#         self._closed = bool(value)
# 
#     def discrete(self, vertices, scale=1.0):
#         return discretize_arc(vertices[self.points],
#                               close=self.closed,
#                               scale=scale)
# 
#     def center(self, vertices):
#         return arc_center(vertices[self.points])
# 
# class Bezier(Curve):
# 
#     def discrete(self, vertices, scale=1.0):
#         return discretize_bezier(vertices[self.points], scale=scale)


# Path: trimesh/path/io/svg_load.py
import numpy as np
from ...constants import log
from ..entities import Line, Arc, Bezier
from collections import deque
from xml.dom.minidom import parseString as parse_xml
    from svg.path import parse_path

        if not starting:
            points[0] = vertices[-1]
        entities.append(Line(np.arange(2) + len(vertices)))
        vertices.extend(points)

    def load_arc(svg_arc):
        points = complex_to_float([svg_arc.start,
                                   svg_arc.point(.5),
                                   svg_arc.end])
        if not starting:
            points[0] = vertices[-1]
        entities.append(Arc(np.arange(3) + len(vertices)))
        vertices.extend(points)

    def load_quadratic(svg_quadratic):
        points = complex_to_float([svg_quadratic.start,
                                   svg_quadratic.control,
                                   svg_quadratic.end])
        if not starting:
            points[0] = vertices[-1]
        entities.append(Bezier(np.arange(3) + len(vertices)))
        vertices.extend(points)

    def load_cubic(svg_cubic):
        points = complex_to_float([svg_cubic.start,
                                   svg_cubic.control1,
                                   svg_cubic.control2,
                                   svg_cubic.end])
        if not starting:
            points[0] = vertices[-1]

        entities.append(Bezier(np.arange(4) + len(vertices)))