# Path: importerUtils.py
# def isEqual(a, b, e = 0.0001):
# 	if (a is None): return isEqual(b, CENTER)
# 	if (b is None): return isEqual(a, CENTER)
# 	return ((a - b).Length < e)
# 
# def getDumpFolder():
# 	global _dump_folder
# 	return _dump_folder
# 
# Path: importerUtils.py
# def logInfo(msg, *args):
# 	if (__prmPrefOW__.GetBool("checkLogging", False)): _log("logInfo",    Console.PrintMessage, msg, args)
# 
# def logWarning(msg, *args):
# 	if (__prmPrefOW__.GetBool("checkWarning", False)): _log("logWarning", Console.PrintWarning, msg, args)
# 
# def logError(msg, *args):
# 	if (__prmPrefOW__.GetBool("checkError", True)):    _log("logError",   Console.PrintError,   msg, args)
# 
# def logAlways(msg, *args):
# 	_log("logAlways", Console.PrintMessage, msg, args)
# 
# def isEqual1D(a, b, e = 0.0001):
# 	if (a is None): return isEqual1D(b, 0.0)
# 	if (b is None): return isEqual1D(a, 0.0)
# 	return abs(a - b) < e
# 
# def getAuthor():
# 	return _author
# 
# def getDescription():
# 	return _description
# 
# def getColorDefault():
# 	global _colorDefault
# 	return _colorDefault
# 
# Path: importerConstants.py
# CENTER = VEC(0, 0, 0)
# 
# DIR_X  = VEC(1, 0, 0)
# 
# DIR_Y  = VEC(0, 1, 0)
# 
# DIR_Z  = VEC(0, 0, 1)
# 
# ENCODING_FS      = 'utf8'


from datetime          import datetime
from importerUtils     import isEqual, getDumpFolder
from FreeCAD           import Vector as VEC, Placement as PLC
from importerUtils     import logInfo, logWarning, logError, logAlways, isEqual1D, getAuthor, getDescription, getColorDefault
from importerConstants import CENTER, DIR_X, DIR_Y, DIR_Z, ENCODING_FS
import traceback, inspect, os, sys, Acis, math, re, Part, io

	return u"(%s)" %(",".join([_obj2str(i) for i in l]))

def _obj2str(o):
	if (o is None):                   return _str2str(o)
	if (type(o) == int):              return u"%d" %(o)
	if (sys.version_info.major < 3):
		if (type(o) == long):         return u"%d" %(o)
		if (type(o) == unicode):      return _str2str(o)
	if (type(o) == float):            return _dbl2str(o)
	if (type(o) == bool):             return _bool2str(o)
	if (type(o) == str):              return _str2str(o)
	if (isinstance(o, AnyEntity)):    return "*"
	if (isinstance(o, E)):            return u"%r" %(o)
	if (isinstance(o, AnonymEntity)): return _entity2str(o)
	if (type(o) == list):             return _lst2str(o)
	if (type(o) == tuple):            return _lst2str(o)
	raise Exception("Don't know how to convert '%s' into a string!" %(o.__class__.__name__))

def _values3D(v):
	return [v.x, v.y, v.z]

def getColor(entity):
	global _colorPalette

	r = g = b = None

	color = entity.getColor()
	if (color):
		r, g, b = color.red, color.green, color.blue
	else:

# Path: importerUtils.py
# def isEqual(a, b, e = 0.0001):
# 	if (a is None): return isEqual(b, CENTER)
# 	if (b is None): return isEqual(a, CENTER)
# 	return ((a - b).Length < e)
# 
# def getDumpFolder():
# 	global _dump_folder
# 	return _dump_folder
# 
# Path: importerUtils.py
# def logInfo(msg, *args):
# 	if (__prmPrefOW__.GetBool("checkLogging", False)): _log("logInfo",    Console.PrintMessage, msg, args)
# 
# def logWarning(msg, *args):
# 	if (__prmPrefOW__.GetBool("checkWarning", False)): _log("logWarning", Console.PrintWarning, msg, args)
# 
# def logError(msg, *args):
# 	if (__prmPrefOW__.GetBool("checkError", True)):    _log("logError",   Console.PrintError,   msg, args)
# 
# def logAlways(msg, *args):
# 	_log("logAlways", Console.PrintMessage, msg, args)
# 
# def isEqual1D(a, b, e = 0.0001):
# 	if (a is None): return isEqual1D(b, 0.0)
# 	if (b is None): return isEqual1D(a, 0.0)
# 	return abs(a - b) < e
# 
# def getAuthor():
# 	return _author
# 
# def getDescription():
# 	return _description
# 
# def getColorDefault():
# 	global _colorDefault
# 	return _colorDefault
# 
# Path: importerConstants.py
# CENTER = VEC(0, 0, 0)
# 
# DIR_X  = VEC(1, 0, 0)
# 
# DIR_Y  = VEC(0, 1, 0)
# 
# DIR_Z  = VEC(0, 0, 1)
# 
# ENCODING_FS      = 'utf8'


# Path: Acis2Step.py
from datetime          import datetime
from importerUtils     import isEqual, getDumpFolder
from FreeCAD           import Vector as VEC, Placement as PLC
from importerUtils     import logInfo, logWarning, logError, logAlways, isEqual1D, getAuthor, getDescription, getColorDefault
from importerConstants import CENTER, DIR_X, DIR_Y, DIR_Z, ENCODING_FS
import traceback, inspect, os, sys, Acis, math, re, Part, io

	return u"(%s)" %(",".join([_obj2str(i) for i in l]))

def _obj2str(o):
	if (o is None):                   return _str2str(o)
	if (type(o) == int):              return u"%d" %(o)
	if (sys.version_info.major < 3):
		if (type(o) == long):         return u"%d" %(o)
		if (type(o) == unicode):      return _str2str(o)
	if (type(o) == float):            return _dbl2str(o)
	if (type(o) == bool):             return _bool2str(o)
	if (type(o) == str):              return _str2str(o)
	if (isinstance(o, AnyEntity)):    return "*"
	if (isinstance(o, E)):            return u"%r" %(o)
	if (isinstance(o, AnonymEntity)): return _entity2str(o)
	if (type(o) == list):             return _lst2str(o)
	if (type(o) == tuple):            return _lst2str(o)
	raise Exception("Don't know how to convert '%s' into a string!" %(o.__class__.__name__))

def _values3D(v):
	return [v.x, v.y, v.z]

def getColor(entity):
	global _colorPalette

	r = g = b = None

	color = entity.getColor()
	if (color):
		r, g, b = color.red, color.green, color.blue
	else:

		color = getColorDefault()
