# Path: importerConstants.py
# MIN_0   = 0.0
# 
# MIN_PI  = -pi
# 
# MIN_PI2 = -pi / 2
# 
# MIN_INF = float('-inf')
# 
# MAX_2PI = 2 * pi
# 
# MAX_PI  = pi
# 
# MAX_PI2 = pi / 2
# 
# MAX_INF = float('inf')
# 
# MAX_LEN = 2e+100
# 
# 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'


import traceback, Part, Draft, os, FreeCAD, re
from importerUtils              import *
from FreeCAD                    import Vector as VEC, Rotation as ROT, Placement as PLC, Matrix as MAT, Base
from math                       import pi, fabs, degrees, asin, sin, cos, tan, atan2, ceil, e, cosh, sinh, tanh, acos, acosh, asin, asinh, atan, atanh, log, sqrt, exp, log10
from importerConstants          import MIN_0, MIN_PI, MIN_PI2, MIN_INF, MAX_2PI, MAX_PI, MAX_PI2, MAX_INF, MAX_LEN
from importerConstants          import CENTER, DIR_X, DIR_Y, DIR_Z, ENCODING_FS

		else:
			raise Exception("Unknown Surface-singularity '%s'" %(self.singularity))
		return i
	def setSurfaceCurve(self, chunks, index, inventor, subtype='int_cur'):
		self.subtype = subtype
		vrs = getVersion()
		i = self.setCurve(chunks, index)
		self.surface1, i = readSurface(chunks, i)
		self.surface2, i = readSurface(chunks, i)
		self.pcurve1, i  = readBS2Curve(chunks, i)
		self.pcurve2, i  = readBS2Curve(chunks, i)
		if ((vrs > 11.0) and (isASM() == False)): i += 2 # '0xb 0xb' # ?!? correct ?!?
		self.range2, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
		if (vrs > 2.1):
			# Discontinuity-Info
			self.di1, i = getFloatArray(chunks, i)
			self.di2, i = getFloatArray(chunks, i)
			self.di3, i = getFloatArray(chunks, i)
		if (not self.setProjectionSurface(self.surface1, self.pcurve1)):
			self.setProjectionSurface(self.surface2, self.pcurve2)
		return i
	def setBlendSpring(self, chunks, index, inventor):
		self.subtype = 'spring_int_cur'
		i = self.setCurve(chunks, index)
		self.surface1, i = readSurface(chunks, i)
		if (self.surface1 is None):
			ruS1, i = getInterval(chunks, i, MIN_INF, MAX_INF, 1.0)
			rvS1, i = getInterval(chunks, i, MIN_INF, MAX_INF, 1.0)
		self.surface2, i = readSurface(chunks, i)
		if (self.surface2 is None):

# Path: importerConstants.py
# MIN_0   = 0.0
# 
# MIN_PI  = -pi
# 
# MIN_PI2 = -pi / 2
# 
# MIN_INF = float('-inf')
# 
# MAX_2PI = 2 * pi
# 
# MAX_PI  = pi
# 
# MAX_PI2 = pi / 2
# 
# MAX_INF = float('inf')
# 
# MAX_LEN = 2e+100
# 
# 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: Acis.py
import traceback, Part, Draft, os, FreeCAD, re
from importerUtils              import *
from FreeCAD                    import Vector as VEC, Rotation as ROT, Placement as PLC, Matrix as MAT, Base
from math                       import pi, fabs, degrees, asin, sin, cos, tan, atan2, ceil, e, cosh, sinh, tanh, acos, acosh, asin, asinh, atan, atanh, log, sqrt, exp, log10
from importerConstants          import MIN_0, MIN_PI, MIN_PI2, MIN_INF, MAX_2PI, MAX_PI, MAX_PI2, MAX_INF, MAX_LEN
from importerConstants          import CENTER, DIR_X, DIR_Y, DIR_Z, ENCODING_FS

		else:
			raise Exception("Unknown Surface-singularity '%s'" %(self.singularity))
		return i
	def setSurfaceCurve(self, chunks, index, inventor, subtype='int_cur'):
		self.subtype = subtype
		vrs = getVersion()
		i = self.setCurve(chunks, index)
		self.surface1, i = readSurface(chunks, i)
		self.surface2, i = readSurface(chunks, i)
		self.pcurve1, i  = readBS2Curve(chunks, i)
		self.pcurve2, i  = readBS2Curve(chunks, i)
		if ((vrs > 11.0) and (isASM() == False)): i += 2 # '0xb 0xb' # ?!? correct ?!?
		self.range2, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
		if (vrs > 2.1):
			# Discontinuity-Info
			self.di1, i = getFloatArray(chunks, i)
			self.di2, i = getFloatArray(chunks, i)
			self.di3, i = getFloatArray(chunks, i)
		if (not self.setProjectionSurface(self.surface1, self.pcurve1)):
			self.setProjectionSurface(self.surface2, self.pcurve2)
		return i
	def setBlendSpring(self, chunks, index, inventor):
		self.subtype = 'spring_int_cur'
		i = self.setCurve(chunks, index)
		self.surface1, i = readSurface(chunks, i)
		if (self.surface1 is None):
			ruS1, i = getInterval(chunks, i, MIN_INF, MAX_INF, 1.0)
			rvS1, i = getInterval(chunks, i, MIN_INF, MAX_INF, 1.0)
		self.surface2, i = readSurface(chunks, i)
		if (self.surface2 is None):

			ruS2, i = getInterval(chunks, i, MIN_INF, MAX_INF, 1.0)
