# 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

	def getAttribute(self):
		l = [_obj2str(p) for p in self._getParameters()]
		return "%s(%s)" %(self._getClassName(), ",".join(l))
	def toString(self):
		l = [_obj2str(p) for p in self._getParameters()]
		return "%s(%s)" %(self._getClassName(), ",".join(l))
	def __str__(self):
		return self.toString()
	def __repr__(self):
		l = [_obj2str(p) for p in self._getParameters()]
		return u"#%d\t= %s(%s)" %(self.id, self._getClassName(), ",".join(l))

class ExportEntity(AnonymEntity):
	def __init__(self):
		super(ExportEntity, self).__init__()
		self.isexported = False
	def _getClassName(self):
		return self.__class__.__name__
	def exportProperties(self):
		step = u""
		variables = self._getParameters()
		for a in variables:
			try:
				if (isinstance(a, ReferencedEntity)):
					step += a.exportSTEP()
				elif (type(a) == list):
					step += _exportList_(a)
				elif (type(a) == tuple):
					step += _exportList_(a)
			except:

# 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

	def getAttribute(self):
		l = [_obj2str(p) for p in self._getParameters()]
		return "%s(%s)" %(self._getClassName(), ",".join(l))
	def toString(self):
		l = [_obj2str(p) for p in self._getParameters()]
		return "%s(%s)" %(self._getClassName(), ",".join(l))
	def __str__(self):
		return self.toString()
	def __repr__(self):
		l = [_obj2str(p) for p in self._getParameters()]
		return u"#%d\t= %s(%s)" %(self.id, self._getClassName(), ",".join(l))

class ExportEntity(AnonymEntity):
	def __init__(self):
		super(ExportEntity, self).__init__()
		self.isexported = False
	def _getClassName(self):
		return self.__class__.__name__
	def exportProperties(self):
		step = u""
		variables = self._getParameters()
		for a in variables:
			try:
				if (isinstance(a, ReferencedEntity)):
					step += a.exportSTEP()
				elif (type(a) == list):
					step += _exportList_(a)
				elif (type(a) == tuple):
					step += _exportList_(a)
			except:

				logError(traceback.format_exc())
