# 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):


import numpy as np
import networkx as nx
import itertools
from collections import deque
from tempfile import NamedTemporaryFile
from distutils.spawn import find_executable
from subprocess import check_call
from xml.etree import cElementTree
from ..constants import res, log
                edges = np.column_stack((path[:-1],
                                         path[:-1])).reshape(-1)[1:-1].reshape((-1, 2))
                transforms = [np.eye(4)]
                for e in edges:
                    # get every transform from the edge
                    local = [i['transform']
                             for i in g.edge[e[0]][e[1]].values()]
                    # all the transforms are sequential, so we want
                    # combinations
                    transforms = [np.dot(*i)
                                  for i in itertools.product(transforms, local)]

                transforms_all.extend(transforms)
                path_str.extend(['/'.join(path_name)] * len(transforms))
            meshes[mesh_id]['vertices'] *= to_inches
            meshes[mesh_id]['metadata']['units'] = 'inches'
            meshes[mesh_id]['metadata']['name'] = path_name[-1]
            meshes[mesh_id]['metadata']['paths'] = np.array(path_str)
            meshes[mesh_id]['metadata']['quantity'] = len(transforms_all)
            meshes[mesh_id]['metadata'][
                'transforms'] = np.array(transforms_all)
    except:
        log.error(
            'STEP load processing error, aborting metadata!',
            exc_info=True)

    return meshes.values()


if _STEP_FACETER is None:

# 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/io/step.py
import numpy as np
import networkx as nx
import itertools
from collections import deque
from tempfile import NamedTemporaryFile
from distutils.spawn import find_executable
from subprocess import check_call
from xml.etree import cElementTree
from ..constants import res, log

                edges = np.column_stack((path[:-1],
                                         path[:-1])).reshape(-1)[1:-1].reshape((-1, 2))
                transforms = [np.eye(4)]
                for e in edges:
                    # get every transform from the edge
                    local = [i['transform']
                             for i in g.edge[e[0]][e[1]].values()]
                    # all the transforms are sequential, so we want
                    # combinations
                    transforms = [np.dot(*i)
                                  for i in itertools.product(transforms, local)]

                transforms_all.extend(transforms)
                path_str.extend(['/'.join(path_name)] * len(transforms))
            meshes[mesh_id]['vertices'] *= to_inches
            meshes[mesh_id]['metadata']['units'] = 'inches'
            meshes[mesh_id]['metadata']['name'] = path_name[-1]
            meshes[mesh_id]['metadata']['paths'] = np.array(path_str)
            meshes[mesh_id]['metadata']['quantity'] = len(transforms_all)
            meshes[mesh_id]['metadata'][
                'transforms'] = np.array(transforms_all)
    except:
        log.error(
            'STEP load processing error, aborting metadata!',
            exc_info=True)

    return meshes.values()


if _STEP_FACETER is None:

    log.debug('STEP loading unavailable!')