# 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

		p3, i = readBS3Curve(chunks, i)
		return i
	def setSum(self, chunks, index, inventor):
		'''A linear sum of two curves.
		The surface is defined primarily by two curves that are assumed not parallel, and the parameter ranges over which the surface is defined:
		s(u, v) = curve_1(u) + curve_2(v) - origin'''
		self.curve1, i = readCurve(chunks, index)
		self.curve2, i = readCurve(chunks, i)
		self.origin, i = getLocation(chunks, i)
		i = self.setSurfaceShape(chunks, i, inventor, 'sum_spl_sur')
		return i
	def setTSpline(self, chunks, index, inventor):
		i = self.setSurfaceShape(chunks, index, inventor, 't_spl_sur')
		rU, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
		rV, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
		typ, i = getInteger(chunks, i)
		assert (chunks[i].tag == TAG_SUBTYPE_OPEN)
		i += 1
		# block: ((t_spl_subtrans_object, flag?, values (str))|ref number)
		if (chunks[i].val == 't_spl_subtrans_object'):
			self.tSplineText, i = getValue(chunks, i + 1)
			if (chunks[i].tag != TAG_UTF8_U16): i += 1
			self.tSplineValues, i = getValue(chunks, i)
		else:
			assert (chunks[i].val == 'ref')
			self.tRef, i = getInteger(chunks, i + 1)
		assert chunks[i].tag == TAG_SUBTYPE_CLOSE
		num, i  = getInteger(chunks, i  + 1)
		return i
	def setVertexBlend(self, chunks, index, inventor):

# 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

		p3, i = readBS3Curve(chunks, i)
		return i
	def setSum(self, chunks, index, inventor):
		'''A linear sum of two curves.
		The surface is defined primarily by two curves that are assumed not parallel, and the parameter ranges over which the surface is defined:
		s(u, v) = curve_1(u) + curve_2(v) - origin'''
		self.curve1, i = readCurve(chunks, index)
		self.curve2, i = readCurve(chunks, i)
		self.origin, i = getLocation(chunks, i)
		i = self.setSurfaceShape(chunks, i, inventor, 'sum_spl_sur')
		return i
	def setTSpline(self, chunks, index, inventor):
		i = self.setSurfaceShape(chunks, index, inventor, 't_spl_sur')
		rU, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
		rV, i = getInterval(chunks, i, MIN_INF, MAX_INF, getScale())
		typ, i = getInteger(chunks, i)
		assert (chunks[i].tag == TAG_SUBTYPE_OPEN)
		i += 1
		# block: ((t_spl_subtrans_object, flag?, values (str))|ref number)
		if (chunks[i].val == 't_spl_subtrans_object'):
			self.tSplineText, i = getValue(chunks, i + 1)
			if (chunks[i].tag != TAG_UTF8_U16): i += 1
			self.tSplineValues, i = getValue(chunks, i)
		else:
			assert (chunks[i].val == 'ref')
			self.tRef, i = getInteger(chunks, i + 1)
		assert chunks[i].tag == TAG_SUBTYPE_CLOSE
		num, i  = getInteger(chunks, i  + 1)
		return i
	def setVertexBlend(self, chunks, index, inventor):

		n, i = getInteger(chunks, index)      # vertexblendsur
