begintemplate pyramidalsupercell

// public variables
public is_art, gid, randi, Vrest
public init, topol, basic_shape, subsets, geom, biophys
public pre_list, connect_pre

public soma, apical, basal
public all, basal_list, apical_list, soma_list, proximal_apical, proximal_basal
public x, y, z, position, myroot

public pvbasketcell_list, supercell_list, ivycell_list, deepcell_list, stimcell_list
public eccell_list, ca3cell_list

// strings
strdef myroot

// objects
objref syn, pre_list, templist, rootlist

//external variables
external numCellTypes, cellType

// create the sections[segments]
NumSoma=2
NumApical=49
NumBasal=29
create soma[NumSoma], basal[NumBasal], apical[NumApical]


// set the initialization code, which is run whenever a new object
// of this class is instantiated
proc init() {
	gid = $1
	randi = $2
	Vrest = -81  // -66 // -65 // $3 resting membrane potential in mV
	// cell sections: soma, dendrites, axon
	append_sections() // append all sections to the section list
	connect_sections()// connect soma, dendrites, axon
	size_sections0()	// set the size dimensions of each section
	size_sections1()	// set the size dimensions of each section
	size_sections2()	// set the size dimensions of each section
	size_sections3()	// set the size dimensions of each section
	size_sections4()	// set the size dimensions of each section
	size_sections5()	// set the size dimensions of each section
	size_sections6()	// set the size dimensions of each section
	size_sections7()	// set the size dimensions of each section

	
	// subcellular mechanisms: channels, pumps, transporters
	mechinit()
	insert_mechs() // also contains set_biophys()
	
	set_nseg()		// set the number of segments in each section
					// if this is driven by an error-minimization rule,
					// make sure to do it after setting the morphology
					// and inserting the mechanisms, as it depends on those
	get_root()
	
	pre_list = new List() // define a list for the presynaptic connections
	define_synapses()
}



objref all, soma_list, basal_list, apical_list, proximal, proximal_apical, proximal_basal
	objref pvbasketcell_list, ca3cell_list, eccell_list, supercell_list, ivycell_list, deepcell_list, stimcell_list
proc append_sections() { local i
	NumSoma=2
	NumApical=49
	NumBasal=29
	
  objref all, soma_list, basal_list, apical_list, proximal, proximal_apical, proximal_basal
	objref pvbasketcell_list, ca3cell_list, eccell_list, supercell_list, ivycell_list, deepcell_list, stimcell_list
  all = new SectionList()
    for i=0, NumSoma-1 soma[i] all.append()
    for i=0, NumBasal-1 basal[i] all.append()
    for i=0, NumApical-1 apical[i] all.append()

  soma_list = new SectionList()
    for i=0, NumSoma-1 soma[i] soma_list.append()

  basal_list = new SectionList()
    for i=0, NumBasal-1 basal[i] basal_list.append()

  apical_list = new SectionList()
    for i=0, NumApical-1 apical[i] apical_list.append()
    
   supercell_list = new SectionList()
   deepcell_list = new SectionList()
   stimcell_list = new SectionList()
   
   forsec soma_list {
		stimcell_list.append()
	}
	
   forsec basal_list {
		supercell_list.append()
		deepcell_list.append()
	}
    
  proximal = new SectionList()
	// Middle of section within 100 um
    for i=0, 1 soma[i] proximal.append()
    for i=0, 7 basal[i] proximal.append()
    for i=9, 28 basal[i] proximal.append()
    for i=0, 5 apical[i] proximal.append()
    for i=22, 27 apical[i] proximal.append()
	apical[30] proximal.append()
	apical[46] proximal.append()
	apical[47] proximal.append()
	apical[48] proximal.append()
	
  proximal_apical = new SectionList()
     for i=0, 5 apical[i] proximal_apical.append()
    for i=22, 27 apical[i] proximal_apical.append()
	apical[30] proximal_apical.append()
	apical[46] proximal_apical.append()
	apical[47] proximal_apical.append()
	apical[48] proximal_apical.append() 
  
  proximal_basal = new SectionList()
    for i=0, 7 basal[i] proximal_basal.append()
    for i=9, 28 basal[i] proximal_basal.append()
	pvbasketcell_list   = new SectionList()
  
	// numbas=0
	// forsec proximal_basal { numbas=numbas+1}
	
	// numap=0
	// forsec proximal_apical { numap=numap+1}
 	
	// numsoma=0
	// forsec soma_list { numsoma=numsoma+1}
	
	// print "SUPER numbas=", numbas, ", numap=", numap, ", numsoma=", numsoma
	// SUPER numbas=28 , numap=16 , numsoma=2
	
	for zz=1,1 { // 16 ~ 1*16
		forsec proximal_apical { pvbasketcell_list.append()} // 1
	}
	for zz=1,3 { // 84 ~ 5*16
		forsec proximal_basal { pvbasketcell_list.append()} // 5
	}
	for zz=1,16 { // 32 ~ 2*16
		forsec soma_list { pvbasketcell_list.append()} // 2
	}
	
  ca3cell_list   = new SectionList()
	forsec basal_list { ca3cell_list.append()}
	forsec apical_list { ca3cell_list.append()}
	
  ivycell_list   = new SectionList()
	forsec basal_list { ivycell_list.append()}
	forsec apical_list { ivycell_list.append()}
	
  eccell_list   = new SectionList()
	forsec apical_list { eccell_list.append() }
	
	
	// whole section within 100 um
	/* for i=0, 1 soma[i] proximal.append()
    for i=2, 6 basal[i] proximal.append()
    for i=9, 11 basal[i] proximal.append()
    for i=13, 14 basal[i] proximal.append()
    for i=17, 19 basal[i] proximal.append()
    for i=22, 28 basal[i] proximal.append()
    for i=0, 4 apical[i] proximal.append()
    for i=25, 26 apical[i] proximal.append()
    apical[22] proximal.append()
	apical[46] proximal.append()
	apical[48] proximal.append() */
}

proc connect_sections(){local i
  for i = 3, 4 connect basal[i](0), basal[i-1](1)
  connect basal[5](0), basal[3](1)
  connect basal[6](0), basal[2](1)
  for i = 7, 8 connect basal[i](0), basal[6](1)
  for i = 11, 12 connect basal[i](0), basal[i-1](1)
  connect basal[13](0), basal[11](1)
  connect basal[14](0), basal[10](1)
  for i = 15, 16 connect basal[i](0), basal[14](1)
  for i = 18, 19 connect basal[i](0), basal[17](1)
  for i = 20, 21 connect basal[i](0), basal[19](1)
  for i = 23, 24 connect basal[i](0), basal[22](1)
  for i = 26, 27 connect basal[i](0), basal[25](1)
  for i = 1, 8 connect apical[i](0), apical[i-1](1)
  connect apical[9](0), apical[7](1)
  for i = 10, 11 connect apical[i](0), apical[i-1](1)
  connect apical[12](0), apical[10](1)
  connect apical[13](0), apical[9](1)
  for i = 14, 15 connect apical[i](0), apical[13](1)
  connect apical[16](0), apical[6](1)
  for i = 17, 18 connect apical[i](0), apical[16](1)
  for i = 19, 20 connect apical[i](0), apical[18](1)
  connect apical[21](0), apical[5](1)
  connect apical[22](0), apical[4](1)
  connect apical[23](0), apical[3](1)
  connect apical[24](0), apical[2](1)
  connect apical[25](0), apical[1](1)
  for i = 26, 28 connect apical[i](0), apical[i-1](1)
  connect apical[29](0), apical[27](1)
  connect apical[30](0), apical[26](1)
  for i = 31, 33 connect apical[i](0), apical[i-1](1)
  connect apical[34](0), apical[32](1)
  for i = 35, 36 connect apical[i](0), apical[i-1](1)
  connect apical[37](0), apical[35](1)
  connect apical[38](0), apical[34](1)
  for i = 39, 40 connect apical[i](0), apical[38](1)
  for i = 41, 42 connect apical[i](0), apical[40](1)
  connect apical[43](0), apical[31](1)
  connect apical[44](0), apical[30](1)
  connect apical[45](0), apical[25](1)
  connect apical[46](0), apical(1)
  for i = 47, 48 connect apical[i](0), apical[46](1)
  for i = 0, 2 connect basal[i](0), soma[0](0.5)
  for i = 9, 10 connect basal[i](0), soma[0](0.5)
  connect basal[17](0), soma[0](0.5)
  connect basal[22](0), soma[0](0.5)
  connect basal[25](0), soma[0](0.5)
  connect basal[28](0), soma[0](0.5)
  connect apical(0), soma[1](1) 
  connect soma[1](0), soma[0](1)
}


proc size_sections0() {
	soma[0] {pt3dclear()
		pt3dadd(0, 0, 0, 20.1851)
		pt3dadd(2.52312, 0, 0, 20.1851)
		pt3dadd(5.04625, 0, 0, 20.1851)
	}
	soma[1] {pt3dclear()
		pt3dadd(5.04625, 0, 0, 20.1851)
		pt3dadd(7.56938, 0, 0, 20.1851)
		pt3dadd(10.0925, 0, 0, 20.1851)
	}
	basal[0] {pt3dclear()
		pt3dadd(-65.4, -15.57, -0.95, 1.43)
		pt3dadd(-65.6, -14.55, -0.95, 1.43)
		pt3dadd(-66.83, -13.74, -0.95, 1.43)
		pt3dadd(-68.46, -13.74, 0.05, 1.43)
		pt3dadd(-70.29, -13.12, 0.55, 1.43)
		pt3dadd(-72.53, -9.86, 0.55, 1.43)
		pt3dadd(-74.57, -5.98, 1.05, 1.43)
		pt3dadd(-76.61, -4.14, 1.05, 1.43)
		pt3dadd(-77.83, -1.9, 1.05, 1.43)
		pt3dadd(-78.44, 0.55, 1.05, 1.43)
		pt3dadd(-78.24, 3, 1.05, 1.43)
		pt3dadd(-77.63, 4.84, 1.05, 1.43)
		pt3dadd(-76.61, 6.26, 1.05, 1.43)
		pt3dadd(-76.61, 8.31, 1.05, 1.43)
		pt3dadd(-77.43, 11.98, 1.55, 1.43)
		pt3dadd(-78.24, 14.63, 1.55, 1.43)
		pt3dadd(-79.26, 17.49, 1.1, 1.43)
		pt3dadd(-80.08, 19.73, 1.05, 1.43)
		pt3dadd(-80.28, 22.79, 1.05, 1.43)
		pt3dadd(-80.69, 27.9, 1.05, 1.43)
		pt3dadd(-80.69, 30.75, 1.05, 1.43)
		pt3dadd(-81.5, 33.41, 1.05, 1.43)
		pt3dadd(-82.93, 34.63, 1.05, 1.43)
		pt3dadd(-83.74, 37.28, 1.05, 1.43)
		pt3dadd(-84.97, 42.39, 0.55, 1.43)
		pt3dadd(-86.39, 45.86, 0.05, 1.43)
		pt3dadd(-86.8, 48.31, 0.05, 1.43)
		pt3dadd(-87.62, 50.35, 0.05, 1.43)
		pt3dadd(-88.87, 53.22, 0.05, 1.43)
		pt3dadd(-89.89, 55.05, -0.45, 1.43)
		pt3dadd(-89.69, 56.68, -0.9, 1.43)
		pt3dadd(-89.08, 59.13, -0.9, 1.43)
		pt3dadd(-89.69, 61.79, -0.9, 1.43)
		pt3dadd(-89.69, 65.26, -1.4, 1.43)
		pt3dadd(-89.08, 67.09, -1.4, 1.43)
		pt3dadd(-86.43, 70.56, -0.95, 1.43)
		pt3dadd(-84.39, 72.6, -0.45, 1.43)
		pt3dadd(-82.56, 75.05, -0.45, 1.43)
		pt3dadd(-79.91, 76.68, -0.45, 1.43)
		pt3dadd(-78.68, 78.73, -0.45, 1.43)
		pt3dadd(-78.48, 82.4, -0.45, 1.43)
		pt3dadd(-77.87, 84.24, -0.45, 1.43)
		pt3dadd(-76.85, 86.07, -0.45, 1.43)
		pt3dadd(-76.65, 89.75, -0.45, 1.43)
		pt3dadd(-77.46, 94.81, -0.45, 1.43)
		pt3dadd(-77.86, 98.48, -0.45, 1.43)
		pt3dadd(-78.07, 100.72, -0.45, 1.43)
	}
	basal[1] {pt3dclear()
		pt3dadd(-61.88, -15.13, -0.85, 1.43)
		pt3dadd(-61.67, -12.88, -0.85, 1.43)
		pt3dadd(-61.06, -11.66, -1.3, 1.43)
		pt3dadd(-60.86, -10.23, -1.3, 1.43)
		pt3dadd(-61.67, -9.41, -1.3, 1.43)
		pt3dadd(-63.1, -7.78, -1.75, 1.43)
		pt3dadd(-63.3, -6.55, -1.75, 1.43)
		pt3dadd(-63.3, -2.88, -1.75, 1.43)
		pt3dadd(-63.3, -0.02, -2.3, 1.43)
		pt3dadd(-62.89, 1.81, -3.3, 1.43)
		pt3dadd(-63.1, 4.06, -4.25, 1.43)
		pt3dadd(-63.51, 6.92, -4.25, 1.43)
		pt3dadd(-61.47, 8.34, -4.25, 1.43)
		pt3dadd(-59.43, 9.36, -4.8, 1.43)
		pt3dadd(-57.6, 11.81, -4.8, 1.43)
		pt3dadd(-56.58, 15.28, -5.25, 1.43)
		pt3dadd(-56.37, 17.32, -5.8, 1.43)
		pt3dadd(-56.78, 19.77, -6.25, 1.43)
		pt3dadd(-56.98, 21.2, -6.75, 1.43)
		pt3dadd(-56.98, 22.83, -6.75, 1.43)
		pt3dadd(-55.01, 22.96, -6.75, 1.43)
		pt3dadd(-54.4, 24.39, -6.75, 1.43)
		pt3dadd(-53.59, 26.64, -6.75, 1.43)
		pt3dadd(-54.2, 28.88, -7.75, 1.43)
		pt3dadd(-54.2, 32.15, -8.25, 1.43)
		pt3dadd(-52.16, 34.19, -8.75, 1.43)
		pt3dadd(-49.31, 35.41, -10.25, 1.43)
		pt3dadd(-47.47, 36.84, -11.75, 1.43)
		pt3dadd(-46.45, 38.68, -14.25, 1.43)
		pt3dadd(-45.84, 39.08, -14.25, 1.43)
		pt3dadd(-44.41, 39.29, -14.25, 1.43)
		pt3dadd(-41.93, 39.31, -14.2, 1.63)
		pt3dadd(-40.5, 40.33, -14.2, 1.63)
		pt3dadd(-40.3, 41.96, -14.2, 1.63)
		pt3dadd(-40.5, 44.82, -15.05, 1.63)
		pt3dadd(-40.09, 47.27, -14.6, 1.63)
		pt3dadd(-39.89, 49.11, -14.1, 1.63)
		pt3dadd(-39.48, 50.94, -14.1, 1.63)
		pt3dadd(-40.3, 51.96, -14.1, 1.63)
		pt3dadd(-40.3, 53.8, -14.1, 1.63)
		pt3dadd(-38.87, 55.23, -14.1, 1.63)
		pt3dadd(-37.85, 55.43, -14.1, 1.63)
		pt3dadd(-36.02, 56.25, -13.6, 1.63)
		pt3dadd(-35.81, 57.07, -13.6, 1.63)
		pt3dadd(-36.43, 59.52, -14.55, 1.63)
		pt3dadd(-37.24, 60.94, -15.55, 1.63)
		pt3dadd(-38.67, 62.58, -15.55, 1.63)
		pt3dadd(-39.89, 63.39, -16.6, 1.63)
		pt3dadd(-40.91, 65.03, -17.1, 1.63)
		pt3dadd(-41.52, 66.25, -17.6, 1.63)
		pt3dadd(-41.93, 67.88, -18.55, 1.63)
		pt3dadd(-41.93, 70.13, -18.55, 1.63)
	}
	basal[2] {pt3dclear()
		pt3dadd(-71.93, -21.53, 1.35, 1.43)
		pt3dadd(-74.76, -22.09, 1.35, 1.43)
		pt3dadd(-78.02, -23.31, 2.3, 1.43)
		pt3dadd(-79.65, -23.92, 2.3, 1.43)
	}
	basal[3] {pt3dclear()
		pt3dadd(-79.65, -23.92, 2.3, 1.43)
		pt3dadd(-81.89, -23.52, 2.3, 1.43)
		pt3dadd(-83.52, -22.5, 2.3, 1.43)
		pt3dadd(-85.97, -21.48, 2.3, 1.43)
		pt3dadd(-90.65, -20.05, 3.3, 1.43)
		pt3dadd(-94.93, -19.03, 3.3, 1.43)
		pt3dadd(-96.36, -18.41, 3.3, 1.43)
		pt3dadd(-101.25, -18.01, 3.75, 1.43)
	}
	basal[4] {pt3dclear()
		pt3dadd(-101.25, -18.01, 3.75, 1.43)
		pt3dadd(-105.74, -19.43, 3.75, 1.43)
		pt3dadd(-109.2, -20.66, 3.75, 1.43)
		pt3dadd(-111.65, -21.27, 4.8, 1.43)
		pt3dadd(-113.68, -22.7, 4.8, 1.43)
		pt3dadd(-115.72, -23.52, 4.8, 1.22)
		pt3dadd(-118.37, -24.33, 4.8, 1.22)
		pt3dadd(-121.43, -25.56, 4.8, 1.22)
		pt3dadd(-124.49, -26.99, 4.8, 1.22)
		pt3dadd(-127.2, -28.51, 4.8, 1.22)
		pt3dadd(-130.67, -30.55, 4.8, 1.22)
		pt3dadd(-132.7, -32.19, 5.3, 1.22)
		pt3dadd(-134.74, -33.61, 5.3, 1.22)
		pt3dadd(-137.6, -34.02, 5.3, 1.22)
		pt3dadd(-140.25, -33, 5.8, 1.22)
		pt3dadd(-142.9, -33, 5.8, 1.22)
	}
	basal[5] {pt3dclear()
		pt3dadd(-101.25, -18.01, 3.75, 1.22)
		pt3dadd(-104.37, -17.7, 3.9, 1.22)
		pt3dadd(-107.63, -17.29, 3.9, 1.22)
		pt3dadd(-109.67, -16.06, 2.9, 1.22)
		pt3dadd(-112.12, -15.04, 4.9, 1.22)
		pt3dadd(-115.79, -14.02, 5.4, 1.22)
		pt3dadd(-120.68, -13.61, 5.4, 1.22)
		pt3dadd(-126.59, -13.41, 5.4, 1.22)
		pt3dadd(-128.42, -13, 5.4, 1.22)
		pt3dadd(-130.87, -12.39, 5.4, 1.22)
		pt3dadd(-132.7, -12.39, 5.4, 1.22)
		pt3dadd(-134.74, -12.8, 5.4, 1.22)
		pt3dadd(-136.98, -13.21, 5.4, 1.22)
		pt3dadd(-140.25, -12.19, 5.4, 1.22)
		pt3dadd(-142.28, -11.98, 5.4, 1.22)
		pt3dadd(-144.32, -11.57, 5.4, 1.22)
		pt3dadd(-146.56, -10.35, 5.4, 1.22)
		pt3dadd(-147.79, -8.72, 5.9, 1.22)
		pt3dadd(-150.03, -7.08, 5.9, 1.22)
		pt3dadd(-152.07, -4.84, 5.9, 1.22)
	}
	basal[6] {pt3dclear()
		pt3dadd(-79.65, -23.92, 2.3, 1.22)
		pt3dadd(-80.93, -26.06, 2.45, 1.22)
		pt3dadd(-82.36, -28.72, 2.45, 1.22)
	}
	basal[7] {pt3dclear()
		pt3dadd(-82.36, -28.72, 2.45, 1.22)
		pt3dadd(-83.18, -32.59, 2.45, 1.22)
		pt3dadd(-84.2, -35.04, 2.45, 1.22)
		pt3dadd(-85.62, -37.29, 2.45, 1.22)
		pt3dadd(-87.25, -39.33, 2.45, 1.22)
		pt3dadd(-88.88, -40.76, 2.45, 1.22)
		pt3dadd(-90.31, -43.61, 2.45, 1.22)
		pt3dadd(-91.94, -46.88, 2.95, 1.22)
		pt3dadd(-93.37, -49.94, 2.95, 1.22)
		pt3dadd(-94.39, -52.39, 2.95, 1.22)
		pt3dadd(-96.22, -54.23, 2.95, 1.22)
		pt3dadd(-101.32, -57.49, 2.95, 1.22)
		pt3dadd(-103.76, -58.51, 2.95, 1.22)
		pt3dadd(-106.82, -61.17, 2.95, 1.22)
		pt3dadd(-108.45, -62.39, 2.95, 1.22)
		pt3dadd(-112.32, -63.61, 2.95, 1.22)
		pt3dadd(-115.99, -65.45, 2.95, 1.22)
		pt3dadd(-119.25, -68.31, 2.95, 1.22)
		pt3dadd(-120.48, -69.33, 2.95, 1.22)
		pt3dadd(-121.7, -70.55, 2.95, 1.22)
		pt3dadd(-122.51, -71.87, 2.95, 1.22)
		pt3dadd(-123.52, -73.29, 2.95, 1.22)
		pt3dadd(-125.56, -73.5, 2.95, 1.22)
		pt3dadd(-127.19, -75.13, 2.95, 1.22)
		pt3dadd(-130.66, -79.42, 1.95, 1.22)
		pt3dadd(-132.29, -83.29, 1.5, 1.22)
		pt3dadd(-133.31, -85.54, 1.5, 1.22)
		pt3dadd(-135.55, -87.58, 1.5, 1.22)
		pt3dadd(-138, -90.03, 1.5, 1.22)
		pt3dadd(-140.44, -92.89, 1.5, 1.22)
		pt3dadd(-143.29, -94.93, 0.95, 1.22)
		pt3dadd(-146.56, -97.78, 0.95, 1.22)
		pt3dadd(-150.43, -100.03, 0.95, 1.22)
		pt3dadd(-152.67, -100.64, 0.5, 1.22)
		pt3dadd(-156.14, -101.87, 0.5, 1.22)
		pt3dadd(-158.38, -103.5, -0.05, 1.22)
		pt3dadd(-160.01, -105.74, -0.05, 1.22)
		pt3dadd(-162.05, -107.99, -0.05, 1.22)
		pt3dadd(-164.29, -108.81, -0.05, 1.22)
		pt3dadd(-166.73, -109.21, -0.05, 1.22)
		pt3dadd(-169.59, -110.85, -0.05, 1.22)
		pt3dadd(-171.83, -112.68, -0.55, 1.22)
		pt3dadd(-173.66, -113.7, -1.05, 1.22)
		pt3dadd(-175.64, -113.99, -0.55, 1.22)
		pt3dadd(-179.3, -114.4, -0.05, 1.22)
		pt3dadd(-181.95, -115.21, 0.95, 1.22)
		pt3dadd(-186.64, -117.46, 0.95, 1.22)
		pt3dadd(-189.5, -119.09, 1.45, 1.22)
		pt3dadd(-193.98, -122.76, 1.45, 1.22)
		pt3dadd(-195.61, -123.58, 1.45, 1.22)
	}
	basal[8] {pt3dclear()
		pt3dadd(-82.36, -28.72, 2.45, 1.22)
		pt3dadd(-84.33, -30.82, 2.55, 1.22)
		pt3dadd(-86.78, -32.66, 2.55, 1.22)
		pt3dadd(-90.04, -33.27, 2.55, 1.22)
		pt3dadd(-91.67, -34.7, 2.55, 1.22)
		pt3dadd(-96.97, -37.76, 2.55, 1.22)
		pt3dadd(-102.88, -39.4, 2.55, 1.22)
		pt3dadd(-107.98, -40.42, 2.55, 1.22)
		pt3dadd(-114.29, -41.44, 2.55, 1.22)
		pt3dadd(-120, -42.66, 2.55, 1.22)
		pt3dadd(-124.08, -43.27, 2.55, 1.22)
		pt3dadd(-128.97, -44.91, 2.55, 1.22)
		pt3dadd(-132.64, -46.74, 1.6, 1.22)
		pt3dadd(-136.1, -47.97, 1.1, 1.22)
		pt3dadd(-138.7, -49.21, 0.65, 1.22)
		pt3dadd(-140.74, -50.23, 0.65, 1.22)
		pt3dadd(-142.78, -50.23, 0.65, 1.22)
		pt3dadd(-143.39, -50.02, 0.65, 1.22)
		pt3dadd(-144.41, -49.62, 0.65, 1.22)
		pt3dadd(-145.83, -49.82, 0.65, 1.22)
		pt3dadd(-147.47, -50.43, 0.65, 1.22)
		pt3dadd(-151.34, -52.68, -0.4, 1.22)
		pt3dadd(-156.03, -54.72, -1.9, 1.22)
		pt3dadd(-159.08, -56.35, -2.85, 1.22)
		pt3dadd(-162.14, -57.58, -3.9, 1.22)
		pt3dadd(-165.61, -57.78, -3.9, 1.22)
		pt3dadd(-169.89, -57.98, -3.9, 1.22)
		pt3dadd(-174.37, -58.6, -3.9, 1.22)
		pt3dadd(-177.22, -59.62, -4.35, 1.22)
		pt3dadd(-181.3, -60.64, -4.9, 1.22)
		pt3dadd(-183.54, -62.07, -5.35, 1.22)
		pt3dadd(-185.78, -63.7, -5.9, 1.22)
		pt3dadd(-187.21, -64.72, -6.35, 1.22)
		pt3dadd(-188.87, -65.91, -6.35, 1.22)
		pt3dadd(-192.13, -66.73, -6.35, 1.22)
		pt3dadd(-197.63, -67.54, -6.85, 1.22)
		pt3dadd(-201.1, -68.36, -6.85, 1.22)
		pt3dadd(-203.75, -68.97, -7.85, 1.22)
		pt3dadd(-205.58, -69.99, -7.85, 1.22)
		pt3dadd(-208.03, -71.83, -8.35, 1.22)
		pt3dadd(-211.9, -72.65, -8.85, 1.22)
		pt3dadd(-214.96, -73.46, -9.35, 1.22)
		pt3dadd(-218.83, -74.08, -9.85, 1.22)
		pt3dadd(-220.87, -74.69, -9.85, 1.22)
		pt3dadd(-222.91, -76.12, -10.35, 1.22)
		pt3dadd(-225.35, -78.16, -10.35, 1.22)
		pt3dadd(-227.8, -79.79, -10.35, 1.22)
		pt3dadd(-229.84, -80.61, -10.35, 1.22)
	}
	basal[9] {pt3dclear()
		pt3dadd(-58.65, -20.87, 1.45, 1.22)
		pt3dadd(-56.61, -21.07, 1.45, 1.22)
		pt3dadd(-54.37, -22.3, 1.45, 1.22)
		pt3dadd(-52.12, -23.93, 1, 1.22)
		pt3dadd(-50.49, -26.17, 1, 1.22)
		pt3dadd(-48.25, -27.81, 1.5, 1.22)
		pt3dadd(-47.03, -30.05, 1.5, 1.22)
		pt3dadd(-46.01, -31.68, 1.5, 1.22)
		pt3dadd(-44.58, -33.11, 2.5, 1.22)
		pt3dadd(-44.17, -34.13, 2.5, 1.22)
		pt3dadd(-44.38, -35.36, 3, 1.22)
		pt3dadd(-44.99, -38.42, 3, 1.22)
		pt3dadd(-45.4, -41.68, 3.45, 1.22)
		pt3dadd(-45.19, -43.93, 4, 1.22)
		pt3dadd(-45.19, -46.17, 4.5, 1.22)
		pt3dadd(-45.81, -49.23, 4.5, 1.22)
		pt3dadd(-46.82, -51.48, 4.5, 1.22)
		pt3dadd(-47.03, -53.32, 4.5, 1.22)
		pt3dadd(-47.64, -56.17, 4.5, 1.22)
	}
}

proc size_sections1() {
	basal[10] {pt3dclear()
		pt3dadd(-71.49, -23.32, 1.6, 1.22)
		pt3dadd(-73.52, -23.72, 1.6, 1.22)
		pt3dadd(-75.56, -24.34, 1.1, 1.22)
		pt3dadd(-76.58, -24.95, 1.1, 1.22)
	}
	basal[11] {pt3dclear()
		pt3dadd(-76.58, -24.95, 1.1, 1.22)
		pt3dadd(-78.62, -27.81, 1.1, 1.22)
		pt3dadd(-80.45, -31.07, 0.1, 1.22)
		pt3dadd(-82.29, -34.13, 0.1, 1.02)
		pt3dadd(-85.55, -39.85, 0.1, 1.02)
		pt3dadd(-87.79, -44.74, 0.1, 1.02)
	}
	basal[12] {pt3dclear()
		pt3dadd(-87.79, -44.74, 0.1, 1.02)
		pt3dadd(-89.63, -49.64, 0.1, 1.02)
		pt3dadd(-90.65, -52.3, 0.1, 1.02)
		pt3dadd(-92.07, -53.11, 0.1, 1.02)
		pt3dadd(-93.09, -54.75, 0.1, 1.02)
		pt3dadd(-94.52, -60.26, -0.4, 1.02)
		pt3dadd(-96.56, -67.19, -0.4, 1.02)
		pt3dadd(-96.71, -69.37, -0.4, 1.02)
		pt3dadd(-97.93, -71.21, -0.85, 1.02)
		pt3dadd(-99.15, -73.66, -0.85, 1.02)
		pt3dadd(-99.56, -76.11, -0.85, 1.02)
		pt3dadd(-100.37, -76.31, -0.85, 1.02)
		pt3dadd(-105.27, -78.76, -0.85, 1.02)
		pt3dadd(-108.73, -80.19, -0.85, 1.02)
		pt3dadd(-110.16, -81.82, -0.85, 1.02)
		pt3dadd(-111.79, -84.27, -1.35, 1.02)
		pt3dadd(-113.42, -85.7, -0.9, 1.02)
		pt3dadd(-116.07, -88.15, -0.4, 1.02)
		pt3dadd(-118.92, -90.8, -0.4, 1.02)
		pt3dadd(-125.04, -97.13, -0.4, 1.02)
		pt3dadd(-127.69, -100.39, -0.4, 1.02)
		pt3dadd(-130.54, -104.68, 0.1, 1.02)
		pt3dadd(-130.95, -105.08, 0.1, 1.02)
	}
	basal[13] {pt3dclear()
		pt3dadd(-87.79, -44.74, 0.1, 1.02)
		pt3dadd(-89.78, -45.08, 0.1, 1.02)
		pt3dadd(-91, -44.88, 1.25, 1.02)
		pt3dadd(-93.24, -45.08, 1.75, 1.02)
		pt3dadd(-94.87, -45.29, 2.25, 1.02)
		pt3dadd(-96.91, -46.11, 2.75, 1.02)
		pt3dadd(-98.54, -46.51, 4.75, 1.02)
		pt3dadd(-101.39, -47.94, 5.75, 1.02)
	}
	basal[14] {pt3dclear()
		pt3dadd(-76.58, -24.95, 1.1, 1.02)
		pt3dadd(-79.75, -25.59, 1.25, 1.02)
		pt3dadd(-83.83, -26.61, 0.75, 1.02)
		pt3dadd(-85.66, -26.61, 0.25, 1.02)
		pt3dadd(-87.09, -26.2, 0.25, 1.02)
		pt3dadd(-90.35, -24.57, 0.25, 1.02)
		pt3dadd(-94.22, -21.1, -0.25, 1.02)
		pt3dadd(-95.65, -19.47, -1.25, 1.02)
		pt3dadd(-98.91, -17.22, -1.25, 1.02)
		pt3dadd(-102.38, -15.39, -1.25, 1.02)
		pt3dadd(-105.64, -14.78, -1.25, 1.02)
	}
	basal[15] {pt3dclear()
		pt3dadd(-105.64, -14.78, -1.25, 1.02)
		pt3dadd(-108.9, -12.73, -1.25, 1.02)
		pt3dadd(-111.34, -10.49, -1.25, 1.02)
		pt3dadd(-112.77, -7.84, -1.25, 1.02)
		pt3dadd(-114.4, -4.57, -1.25, 1.02)
		pt3dadd(-115.22, -3.14, -1.25, 1.02)
		pt3dadd(-115.83, -2.33, -1.25, 1.02)
		pt3dadd(-119.09, -0.9, -2.25, 1.02)
		pt3dadd(-121.94, -0.49, -2.75, 1.02)
		pt3dadd(-124.8, -0.08, -3.7, 1.02)
		pt3dadd(-128.46, 1.96, -4.7, 1.02)
		pt3dadd(-131.2, 5.73, -4.7, 1.02)
		pt3dadd(-131.61, 8.38, -4.7, 1.02)
		pt3dadd(-131.2, 12.47, -6.2, 1.02)
		pt3dadd(-131.2, 14.71, -6.7, 1.02)
		pt3dadd(-131.81, 17.77, -7.2, 1.02)
		pt3dadd(-131.41, 19.61, -8.2, 1.02)
		pt3dadd(-131.61, 22.06, -9.25, 1.02)
		pt3dadd(-132.63, 23.89, -10.2, 1.02)
		pt3dadd(-133.65, 24.92, -10.7, 1.02)
		pt3dadd(-134.87, 26.14, -11.2, 1.02)
		pt3dadd(-136.7, 26.96, -11.2, 1.02)
		pt3dadd(-137.93, 26.96, -11.2, 1.02)
	}
	basal[16] {pt3dclear()
		pt3dadd(-105.64, -14.78, -1.25, 1.02)
		pt3dadd(-110, -14.06, -1.15, 1.02)
		pt3dadd(-114.9, -14.47, -1.15, 1.02)
		pt3dadd(-118.16, -15.49, -1.15, 1.02)
		pt3dadd(-121.42, -16.11, -1.15, 1.02)
		pt3dadd(-122.44, -15.7, -1.15, 1.02)
		pt3dadd(-124.48, -15.29, -1.15, 1.02)
		pt3dadd(-126.51, -16.11, -1.15, 1.02)
		pt3dadd(-129.37, -16.92, -1.15, 1.02)
		pt3dadd(-131.41, -16.92, -1.15, 1.02)
		pt3dadd(-136.09, -16.51, -1.6, 1.02)
		pt3dadd(-140.58, -16.51, -2.55, 1.02)
		pt3dadd(-145.67, -16.51, -2.55, 1.02)
		pt3dadd(-149.95, -15.9, -2.55, 1.02)
		pt3dadd(-153.42, -15.7, -2.55, 1.02)
		pt3dadd(-156.88, -16.51, -2.55, 1.02)
		pt3dadd(-160.55, -17.33, -2.55, 1.02)
		pt3dadd(-163.4, -16.51, -2.55, 1.02)
		pt3dadd(-166.26, -15.29, -2.55, 1.02)
		pt3dadd(-167.28, -14.47, -2.55, 1.02)
		pt3dadd(-168.7, -12.02, -2.55, 1.02)
	}
	basal[17] {pt3dclear()
		pt3dadd(-58.5, -20.85, -3.25, 1.02)
		pt3dadd(-57.89, -22.68, -3.25, 1.02)
		pt3dadd(-57.07, -23.91, -3.25, 1.02)
		pt3dadd(-56.46, -24.72, -3.7, 1.02)
		pt3dadd(-55.44, -25.74, -3.7, 1.02)
		pt3dadd(-55.24, -26.56, -4.2, 1.02)
		pt3dadd(-55.24, -28.81, -4.2, 1.02)
	}
	basal[18] {pt3dclear()
		pt3dadd(-55.24, -28.81, -4.2, 1.02)
		pt3dadd(-56.46, -30.23, -4.2, 1.02)
		pt3dadd(-57.07, -31.66, -4.2, 1.02)
		pt3dadd(-57.07, -33.09, -5.2, 1.02)
		pt3dadd(-56.87, -34.52, -6.2, 1.02)
		pt3dadd(-56.46, -35.13, -7.2, 1.02)
		pt3dadd(-55.24, -35.13, -7.2, 1.02)
		pt3dadd(-53.81, -34.93, -7.2, 1.02)
		pt3dadd(-53.2, -34.32, -7.7, 1.02)
		pt3dadd(-51.77, -34.93, -8.7, 1.02)
		pt3dadd(-50.35, -36.36, -9.2, 1.02)
		pt3dadd(-49.33, -38.4, -9.7, 1.02)
		pt3dadd(-48.72, -40.03, -10.7, 1.02)
		pt3dadd(-48.72, -41.46, -12.2, 1.02)
		pt3dadd(-48.72, -43.5, -12.95, 1.02)
		pt3dadd(-48.51, -44.72, -13.7, 1.02)
		pt3dadd(-46.68, -44.72, -13.7, 1.02)
		pt3dadd(-45.25, -44.32, -13.7, 1.02)
		pt3dadd(-42.4, -43.7, -14.2, 1.02)
		pt3dadd(-39.75, -43.5, -14.7, 1.02)
		pt3dadd(-39.14, -44.72, -15.7, 1.02)
		pt3dadd(-39.14, -45.34, -15.7, 1.02)
		pt3dadd(-39.95, -46.36, -16.2, 1.02)
		pt3dadd(-40.77, -46.77, -17.2, 1.02)
		pt3dadd(-41.79, -48.4, -18.2, 1.02)
	}
	basal[19] {pt3dclear()
		pt3dadd(-55.24, -28.81, -4.2, 1.02)
		pt3dadd(-54.63, -29.62, -4.1, 1.02)
		pt3dadd(-54.02, -30.03, -4.1, 1.02)
		pt3dadd(-52.18, -30.03, -4.1, 1.02)
	}
}

proc size_sections2() {
	basal[20] {pt3dclear()
		pt3dadd(-52.18, -30.03, -4.1, 1.02)
		pt3dadd(-49.33, -29.62, -4.1, 1.02)
		pt3dadd(-44.84, -29.62, -4.1, 1.02)
		pt3dadd(-40.16, -30.44, -5, 1.02)
		pt3dadd(-35.06, -31.05, -5, 1.02)
		pt3dadd(-29.76, -32.28, -5.5, 1.02)
		pt3dadd(-27.52, -32.28, -7.05, 1.02)
		pt3dadd(-23.44, -33.5, -7.5, 1.02)
		pt3dadd(-21.1, -34.09, -7.5, 1.02)
		pt3dadd(-17.43, -35.11, -8.05, 1.02)
		pt3dadd(-12.33, -36.13, -8.5, 1.02)
		pt3dadd(-8.67, -36.13, -8.5, 1.02)
		pt3dadd(-4.59, -36.34, -9, 1.02)
		pt3dadd(3.36, -36.74, -9, 1.02)
		pt3dadd(6.42, -36.54, -9, 1.02)
		pt3dadd(10.49, -36.54, -9.5, 1.02)
		pt3dadd(14.98, -37.15, -9.5, 1.02)
		pt3dadd(18.24, -38.79, -10, 1.02)
		pt3dadd(22.52, -40.83, -11, 1.02)
		pt3dadd(27.14, -42.89, -11, 1.02)
		pt3dadd(33.05, -44.11, -11.5, 1.02)
		pt3dadd(36.92, -44.11, -11.5, 1.02)
		pt3dadd(41.2, -43.29, -12, 1.02)
		pt3dadd(43.24, -43.09, -12, 1.02)
		pt3dadd(45.07, -42.48, -12, 1.02)
		pt3dadd(46.5, -42.48, -12.5, 1.02)
		pt3dadd(47.93, -42.48, -11.05, 1.02)
		pt3dadd(49.56, -43.09, -10.55, 1.02)
		pt3dadd(50.98, -43.91, -9.55, 1.02)
		pt3dadd(52.61, -45.34, -8.55, 1.02)
	}
	basal[21] {pt3dclear()
		pt3dadd(-52.18, -30.03, -4.1, 1.02)
		pt3dadd(-51.08, -28.71, -4, 1.02)
		pt3dadd(-50.88, -28.09, -3.45, 1.02)
		pt3dadd(-50.67, -27.07, -3.95, 1.02)
		pt3dadd(-49.66, -25.85, -3.95, 1.02)
		pt3dadd(-47.21, -25.85, -4.4, 1.02)
		pt3dadd(-45.99, -25.64, -4.4, 1.02)
		pt3dadd(-45.58, -24.42, -4.95, 1.02)
		pt3dadd(-44.97, -23.6, -5.4, 1.02)
		pt3dadd(-44.76, -22.58, -5.95, 1.02)
		pt3dadd(-43.54, -21.77, -5.95, 1.02)
		pt3dadd(-41.5, -21.77, -6.95, 1.02)
		pt3dadd(-39.67, -22.17, -7.45, 1.02)
		pt3dadd(-37.63, -22.58, -7.9, 1.02)
		pt3dadd(-34.78, -22.79, -8.4, 1.02)
		pt3dadd(-31.72, -24.01, -8.9, 1.02)
		pt3dadd(-29.27, -24.01, -9.4, 1.02)
		pt3dadd(-26.22, -23.19, -9.9, 1.02)
		pt3dadd(-23.97, -22.17, -11.9, 1.02)
		pt3dadd(-20.92, -22.17, -14.4, 1.02)
		pt3dadd(-18.64, -22.92, -14.35, 1.43)
		pt3dadd(-16.39, -23.33, -14.35, 1.43)
		pt3dadd(-14.56, -24.14, -14.35, 1.43)
		pt3dadd(-12.93, -25.57, -14.75, 1.43)
		pt3dadd(-11.5, -25.57, -14.75, 1.43)
		pt3dadd(-9.87, -24.75, -14.25, 1.43)
		pt3dadd(-9.06, -24.35, -14.25, 1.43)
		pt3dadd(-8.04, -23.73, -15.2, 1.43)
		pt3dadd(-6.82, -23.73, -15.2, 1.43)
		pt3dadd(-5.39, -23.73, -15.7, 1.43)
		pt3dadd(-4.17, -24.35, -16.2, 1.43)
		pt3dadd(-2.13, -24.35, -16.2, 1.43)
		pt3dadd(0.73, -23.94, -16.2, 1.43)
		pt3dadd(2.97, -22.51, -16.7, 1.43)
		pt3dadd(5.62, -20.88, -17.2, 1.43)
		pt3dadd(7.25, -19.65, -17.2, 1.43)
		pt3dadd(10.51, -19.04, -17.2, 1.43)
		pt3dadd(14.59, -19.24, -17.7, 1.43)
		pt3dadd(18.66, -18.63, -18.2, 1.43)
		pt3dadd(20.7, -18.84, -18.7, 1.43)
	}
	basal[22] {pt3dclear()
		pt3dadd(-58.22, -19.73, 4.9, 1.02)
		pt3dadd(-56.18, -19.32, 4.9, 1.02)
		pt3dadd(-54.75, -19.32, 4.9, 1.02)
	}
	basal[23] {pt3dclear()
		pt3dadd(-54.75, -19.32, 4.9, 1.02)
		pt3dadd(-51.49, -17.68, 4.9, 1.02)
		pt3dadd(-44.15, -16.87, 5.4, 1.02)
		pt3dadd(-38.24, -15.44, 4.9, 1.02)
		pt3dadd(-34.57, -14.62, 4.9, 1.02)
		pt3dadd(-31.31, -14.01, 4.9, 1.02)
		pt3dadd(-22.55, -12.38, 5.4, 1.02)
		pt3dadd(-19.9, -11.77, 5.4, 1.02)
		pt3dadd(-16.84, -10.95, 5.9, 1.02)
		pt3dadd(-13.17, -10.13, 6.4, 1.02)
		pt3dadd(-10.93, -9.11, 6.4, 1.02)
	}
	basal[24] {pt3dclear()
		pt3dadd(-54.75, -19.32, 4.9, 1.02)
		pt3dadd(-53.53, -20.75, 5.05, 1.02)
		pt3dadd(-53.53, -21.97, 5.05, 1.02)
		pt3dadd(-53.73, -24.62, 5.05, 1.02)
		pt3dadd(-54.34, -26.46, 5.55, 1.02)
		pt3dadd(-55.16, -27.28, 5.55, 1.02)
		pt3dadd(-55.57, -28.71, 5.55, 1.02)
		pt3dadd(-54.96, -29.93, 5.55, 1.02)
		pt3dadd(-54.55, -30.95, 5.55, 1.02)
	}
	basal[25] {pt3dclear()
		pt3dadd(-66.37, -16.46, -5.45, 1.02)
		pt3dadd(-66.78, -14.42, -5.45, 1.02)
		pt3dadd(-67.59, -13.19, -5.95, 1.02)
		pt3dadd(-68.41, -11.77, -6.4, 1.02)
		pt3dadd(-69.83, -11.15, -7.45, 1.02)
		pt3dadd(-72.08, -10.95, -7.9, 1.02)
		pt3dadd(-74.73, -10.34, -8.9, 1.02)
		pt3dadd(-77.78, -10.34, -9.4, 1.02)
		pt3dadd(-79.62, -9.93, -9.9, 1.02)
		pt3dadd(-82.88, -6.66, -11.4, 1.02)
		pt3dadd(-84.1, -5.03, -12.9, 1.02)
		pt3dadd(-84.08, -4.2, -12.9, 1.02)
	}
	basal[26] {pt3dclear()
		pt3dadd(-84.08, -4.2, -12.9, 1.63)
		pt3dadd(-86.48, -4.15, -12.8, 1.63)
		pt3dadd(-88.72, -3.54, -12.8, 1.63)
		pt3dadd(-89.74, -2.72, -13.75, 1.63)
		pt3dadd(-91.37, -2.52, -13.75, 1.63)
		pt3dadd(-94.43, -1.7, -14.25, 1.63)
		pt3dadd(-95.25, 0.13, -15.75, 1.63)
		pt3dadd(-96.06, 2.79, -16.25, 1.63)
		pt3dadd(-96.88, 6.26, -17.7, 1.63)
		pt3dadd(-98.1, 8.3, -19.2, 1.63)
		pt3dadd(-99.73, 9.32, -20.7, 1.63)
		pt3dadd(-102.38, 10.34, -21.7, 1.63)
		pt3dadd(-104.42, 11.77, -21.7, 1.63)
		pt3dadd(-106.46, 11.16, -22.2, 1.63)
		pt3dadd(-108.49, 11.36, -23.7, 1.63)
		pt3dadd(-111.14, 11.56, -26.2, 1.63)
	}
	basal[27] {pt3dclear()
		pt3dadd(-84.08, -4.2, -12.9, 1.02)
		pt3dadd(-84.1, -3.19, -13.4, 1.02)
		pt3dadd(-83.9, -1.56, -13.9, 1.02)
		pt3dadd(-84.71, 0.07, -14.4, 1.02)
		pt3dadd(-85.94, 0.48, -14.4, 1.02)
		pt3dadd(-87.16, 1.09, -14.4, 1.02)
		pt3dadd(-89.81, 0.68, -14.4, 1.02)
		pt3dadd(-90.83, 0.07, -14.9, 1.02)
		pt3dadd(-92.46, -0.34, -14.9, 1.02)
		pt3dadd(-93.27, 0.68, -14.9, 1.02)
		pt3dadd(-93.48, 1.7, -16.4, 1.02)
		pt3dadd(-93.88, 3.34, -16.4, 1.02)
		pt3dadd(-93.88, 4.15, -16.4, 1.02)
	}
	basal[28] {pt3dclear()
		pt3dadd(-71.87, -22.79, -5.35, 1.02)
		pt3dadd(-73.3, -24.42, -6.3, 1.02)
		pt3dadd(-74.32, -26.46, -7.25, 1.02)
		pt3dadd(-75.34, -28.91, -9.25, 1.02)
		pt3dadd(-76.36, -30.54, -10.75, 1.02)
		pt3dadd(-77.17, -31.56, -10.75, 1.02)
		pt3dadd(-77.99, -30.95, -10.75, 1.02)
		pt3dadd(-78.6, -30.95, -10.75, 1.02)
		pt3dadd(-78.8, -31.97, -11.75, 1.02)
		pt3dadd(-79.41, -33.6, -11.75, 1.02)
		pt3dadd(-79.82, -35.03, -12.75, 1.02)
		pt3dadd(-80.64, -35.85, -12.75, 1.02)
		pt3dadd(-82.67, -35.03, -12.75, 1.02)
		pt3dadd(-83.69, -34.42, -13.75, 1.02)
		pt3dadd(-85.12, -34.42, -13.75, 1.02)
		pt3dadd(-86.14, -34.62, -14.75, 1.02)
		pt3dadd(-87.57, -36.05, -15.75, 1.02)
	}
}

proc size_sections3() {
	apical[0] {pt3dclear()
		pt3dadd(-59.1, -16.81, 1.15, 2.24)
		pt3dadd(-58.01, -16.93, 1.75, 2.24)
		pt3dadd(-55.77, -16.52, 1.75, 2.24)
		pt3dadd(-52.31, -15.91, 1.75, 2.24)
		pt3dadd(-48.84, -14.68, 1.3, 2.24)
		pt3dadd(-45.38, -14.07, 0.85, 2.04)
		pt3dadd(-41.3, -13.25, 0.35, 2.04)
		pt3dadd(-37.22, -12.64, -0.2, 2.04)
	}
	apical[1] {pt3dclear()
		pt3dadd(-37.22, -12.64, -0.2, 2.04)
		pt3dadd(-31.72, -11.42, -0.2, 2.04)
		pt3dadd(-27.24, -10.4, -0.7, 2.04)
		pt3dadd(-24.59, -9.78, -1.65, 2.04)
		pt3dadd(-20.51, -8.97, -1.65, 2.04)
		pt3dadd(-15.41, -8.15, -2.2, 2.04)
	}
	apical[2] {pt3dclear()
		pt3dadd(-15.41, -8.15, -2.2, 1.83)
		pt3dadd(-10.73, -7.54, -2.2, 1.83)
		pt3dadd(-7.26, -7.74, -2.2, 1.83)
		pt3dadd(-4.61, -7.74, -2.65, 1.83)
	}
	apical[3] {pt3dclear()
		pt3dadd(-4.61, -7.74, -2.65, 1.83)
		pt3dadd(2.29, -7.89, -2.65, 1.83)
	}
	apical[4] {pt3dclear()
		pt3dadd(2.29, -7.89, -2.65, 1.83)
		pt3dadd(4.94, -7.89, -2.65, 1.83)
	}
	apical[5] {pt3dclear()
		pt3dadd(4.94, -7.89, -2.65, 1.83)
		pt3dadd(10.44, -8.7, -2.65, 1.83)
		pt3dadd(14.11, -8.91, -2.65, 1.83)
		pt3dadd(16.35, -8.7, -2.65, 1.83)
		pt3dadd(19.61, -9.11, -2.65, 1.83)
		pt3dadd(25.32, -9.11, -3.15, 1.83)
		pt3dadd(30.42, -8.91, -2.7, 1.83)
		pt3dadd(34.9, -8.7, -2.7, 1.83)
		pt3dadd(37.62, -8.59, -2.7, 1.83)
	}
	apical[6] {pt3dclear()
		pt3dadd(37.62, -8.59, -2.7, 1.83)
		pt3dadd(38.77, -8.3, -2.7, 1.83)
		pt3dadd(40.61, -8.3, -2.7, 1.83)
		pt3dadd(48.76, -8.5, -2.7, 1.83)
		pt3dadd(54.96, -8.45, -2.7, 1.83)
		pt3dadd(59.85, -8.85, -2.7, 1.83)
	}
	apical[7] {pt3dclear()
		pt3dadd(59.85, -8.85, -2.7, 1.83)
		pt3dadd(63.93, -8.04, -2.7, 1.83)
		pt3dadd(66.78, -8.24, -2.7, 1.63)
		pt3dadd(70.05, -7.83, -2.7, 1.63)
		pt3dadd(74.53, -8.04, -2.7, 1.63)
		pt3dadd(77.99, -8.24, -2.7, 1.63)
		pt3dadd(81.66, -8.24, -2.7, 1.63)
		pt3dadd(85.74, -8.24, -2.7, 1.63)
		pt3dadd(90.84, -8.45, -2.7, 1.63)
		pt3dadd(95.12, -8.85, -2.7, 1.63)
		pt3dadd(97.56, -9.06, -2.7, 1.63)
		pt3dadd(102.4, -8.27, -2.7, 1.63)
		pt3dadd(110.55, -7.25, -3.15, 1.63)
	}
	apical[8] {pt3dclear()
		pt3dadd(110.55, -7.25, -3.15, 1.63)
		pt3dadd(113.81, -5.41, -3.15, 1.63)
		pt3dadd(117.48, -3.37, -3.15, 1.63)
		pt3dadd(119.31, -2.14, -3.15, 1.43)
		pt3dadd(123.19, -0.1, -3.15, 1.43)
		pt3dadd(125.84, 0.92, -3.65, 1.43)
		pt3dadd(129.3, 1.94, -3.65, 1.43)
		pt3dadd(132.16, 2.96, -4.15, 1.43)
		pt3dadd(134.4, 4.18, -4.15, 1.43)
		pt3dadd(138.07, 6.02, -4.65, 1.43)
		pt3dadd(140.31, 6.43, -4.65, 1.43)
		pt3dadd(145.2, 7.45, -4.65, 1.43)
		pt3dadd(147.3, 8.23, -4.65, 1.22)
		pt3dadd(149.13, 8.64, -4.65, 1.22)
		pt3dadd(150.76, 8.84, -4.65, 1.22)
		pt3dadd(153.21, 10.27, -4.65, 1.22)
		pt3dadd(156.06, 12.72, -4.65, 1.22)
		pt3dadd(158.51, 13.94, -4.65, 1.22)
		pt3dadd(160.34, 14.76, -4.65, 1.22)
		pt3dadd(164.21, 15.58, -4.65, 1.22)
		pt3dadd(167.48, 15.17, -4.65, 1.22)
		pt3dadd(169.31, 14.76, -4.65, 1.22)
		pt3dadd(171.96, 14.35, -4.65, 1.22)
		pt3dadd(174.61, 14.56, -4.65, 1.22)
		pt3dadd(177.67, 15.17, -4.65, 1.22)
		pt3dadd(180.72, 15.17, -4.65, 1.22)
		pt3dadd(183.17, 15.17, -4.65, 1.22)
		pt3dadd(185.62, 15.17, -4.65, 1.22)
		pt3dadd(188.06, 15.98, -5.15, 1.22)
		pt3dadd(190.92, 17.62, -4.7, 1.22)
		pt3dadd(193.77, 19.04, -4.7, 1.22)
		pt3dadd(194.57, 19.32, -4.7, 1.22)
	}
	apical[9] {pt3dclear()
		pt3dadd(110.55, -7.25, -3.15, 1.83)
		pt3dadd(113.76, -7.95, -3, 1.83)
		pt3dadd(117.42, -8.36, -3, 1.83)
		pt3dadd(122.11, -9.17, -3, 1.83)
		pt3dadd(124.76, -9.99, -3.45, 1.83)
		pt3dadd(127.41, -11.42, -4, 1.83)
		pt3dadd(129.86, -11.22, -4, 1.83)
		pt3dadd(132.3, -12.24, -4.45, 1.83)
		pt3dadd(135.77, -13.66, -4.95, 1.83)
		pt3dadd(139.03, -15.3, -5.45, 1.83)
		pt3dadd(142.09, -16.11, -5.95, 1.83)
	}
}

proc size_sections4() {
	apical[10] {pt3dclear()
		pt3dadd(142.09, -16.11, -5.95, 1.63)
		pt3dadd(146.77, -17.95, -5.95, 1.63)
		pt3dadd(149.63, -19.58, -5.95, 1.63)
		pt3dadd(152.28, -21.42, -6.45, 1.63)
		pt3dadd(155.13, -22.64, -6.95, 1.63)
		pt3dadd(158.8, -24.68, -6.95, 1.63)
		pt3dadd(162.42, -26.78, -6.95, 1.63)
		pt3dadd(165.07, -27.59, -6.95, 1.63)
		pt3dadd(169.97, -29.84, -7.5, 1.63)
		pt3dadd(173.02, -32.08, -7.5, 1.63)
		pt3dadd(175.47, -34.74, -8.25, 1.63)
		pt3dadd(177.1, -37.19, -8, 1.63)
		pt3dadd(179.14, -39.02, -8, 1.63)
		pt3dadd(181.18, -40.25, -8.5, 1.63)
		pt3dadd(184.23, -40.25, -8.5, 1.63)
	}
	apical[11] {pt3dclear()
		pt3dadd(184.23, -40.25, -8.5, 1.63)
		pt3dadd(189.74, -41.68, -8.5, 1.63)
		pt3dadd(193.41, -43.11, -8.5, 1.63)
		pt3dadd(195.65, -43.31, -8.5, 1.43)
		pt3dadd(199.52, -44.13, -8.5, 1.43)
		pt3dadd(201.56, -44.94, -8.5, 1.43)
		pt3dadd(204.21, -45.55, -8.5, 1.43)
		pt3dadd(205.63, -45.76, -8.5, 1.43)
		pt3dadd(207.95, -45.33, -8.5, 1.43)
		pt3dadd(212.23, -42.88, -8.5, 1.43)
		pt3dadd(219.16, -39.82, -8.5, 1.43)
		pt3dadd(224.87, -39.21, -8.5, 1.43)
		pt3dadd(230.37, -39.21, -8.5, 1.43)
		pt3dadd(233.23, -39.82, -8.95, 1.43)
		pt3dadd(239.34, -41.25, -8.95, 1.43)
		pt3dadd(243.21, -41.25, -9.45, 1.43)
		pt3dadd(247.29, -42.47, -9.45, 1.43)
		pt3dadd(249.94, -42.68, -9.45, 1.43)
		pt3dadd(253.81, -42.88, -9.45, 1.43)
		pt3dadd(257.42, -42.78, -9.45, 1.43)
		pt3dadd(261.3, -41.96, -9.45, 1.43)
		pt3dadd(267, -40.13, -9.45, 1.43)
		pt3dadd(270.47, -39.92, -9.45, 1.43)
		pt3dadd(275.16, -39.51, -9.45, 1.43)
		pt3dadd(278.42, -38.9, -9.45, 1.43)
		pt3dadd(281.27, -38.29, -9.45, 1.43)
		pt3dadd(283.72, -37.88, -9.45, 1.43)
		pt3dadd(285.14, -38.09, -9.45, 1.43)
		pt3dadd(287.39, -39.11, -9.45, 1.43)
		pt3dadd(289.22, -39.51, -9.95, 1.43)
		pt3dadd(292.07, -38.7, -9.5, 1.43)
		pt3dadd(297.58, -35.64, -9, 1.43)
		pt3dadd(299.62, -34, -9, 1.43)
		pt3dadd(301.86, -33.39, -8.5, 1.43)
		pt3dadd(304.76, -32.16, -8.5, 1.43)
		pt3dadd(308.64, -29.3, -8.5, 1.43)
		pt3dadd(311.08, -26.85, -8.5, 1.43)
		pt3dadd(315.16, -24.4, -8, 1.43)
		pt3dadd(318.62, -23.18, -8, 1.43)
		pt3dadd(321.88, -21.95, -8, 1.43)
		pt3dadd(324.33, -20.93, -7.5, 1.43)
		pt3dadd(326.57, -20.11, -7.5, 1.43)
		pt3dadd(328.61, -18.69, -7.5, 1.43)
		pt3dadd(330.44, -16.24, -7.5, 1.43)
		pt3dadd(332.28, -11.75, -7.5, 1.43)
		pt3dadd(332.89, -8.89, -7.5, 1.43)
		pt3dadd(334.32, -5.62, -7.5, 1.43)
		pt3dadd(335.13, -3.58, -7.5, 1.43)
		pt3dadd(336.15, -1.54, -7, 1.43)
		pt3dadd(337.58, -0.32, -7, 1.43)
		pt3dadd(339.41, 0.91, -7, 1.43)
	}
	apical[12] {pt3dclear()
		pt3dadd(184.23, -40.25, -8.5, 1.63)
		pt3dadd(189.04, -43.41, -8.35, 1.63)
		pt3dadd(192.5, -45.24, -8.35, 1.63)
		pt3dadd(197.19, -47.9, -8.35, 1.63)
		pt3dadd(199.63, -48.92, -8.8, 1.63)
		pt3dadd(203.51, -50.55, -8.8, 1.63)
		pt3dadd(205.34, -51.98, -8.8, 1.63)
		pt3dadd(206.56, -53.61, -8.8, 1.63)
		pt3dadd(208.81, -54.84, -8.8, 1.63)
		pt3dadd(212.68, -55.65, -8.8, 1.63)
		pt3dadd(216.14, -57.08, -8.8, 1.63)
		pt3dadd(219.61, -58.92, -8.8, 1.63)
		pt3dadd(221.24, -60.14, -8.8, 1.63)
		pt3dadd(223.07, -61.37, -8.8, 1.63)
		pt3dadd(227.35, -63.82, -8.8, 1.63)
		pt3dadd(231.23, -66.06, -8.8, 1.63)
		pt3dadd(234.26, -67.66, -8.8, 1.63)
		pt3dadd(237.32, -68.47, -8.8, 1.63)
		pt3dadd(241.8, -69.9, -8.8, 1.63)
		pt3dadd(245.27, -70.11, -8.8, 1.63)
		pt3dadd(252.2, -70.72, -8.8, 1.63)
		pt3dadd(255.46, -70.92, -9.3, 1.63)
		pt3dadd(257.7, -71.33, -9.3, 1.63)
		pt3dadd(262.19, -70.92, -9.3, 1.63)
		pt3dadd(265.45, -71.74, -9.3, 1.63)
		pt3dadd(268.5, -73.78, -9.3, 1.63)
		pt3dadd(270.75, -75.41, -10.3, 1.63)
		pt3dadd(273.4, -77.25, -10.8, 1.63)
		pt3dadd(276.25, -78.27, -10.8, 1.63)
		pt3dadd(277.68, -78.27, -10.8, 1.63)
		pt3dadd(282.09, -79.57, -10.8, 1.63)
		pt3dadd(284.13, -78.96, -10.8, 1.63)
		pt3dadd(286.98, -79.16, -10.8, 1.63)
		pt3dadd(290.45, -78.55, -10.8, 1.63)
		pt3dadd(291.67, -77.94, -10.8, 1.63)
		pt3dadd(292.89, -76.1, -11.3, 1.63)
		pt3dadd(294.93, -75.69, -11.3, 1.63)
		pt3dadd(298.6, -74.88, -12.8, 1.63)
		pt3dadd(300.64, -74.06, -14.3, 1.63)
		pt3dadd(303.08, -74.67, -15.8, 1.63)
		pt3dadd(305.94, -73.86, -16.8, 1.63)
		pt3dadd(308.99, -72.63, -17.3, 1.63)
		pt3dadd(310.42, -71.41, -17.3, 1.63)
	}
	apical[13] {pt3dclear()
		pt3dadd(142.09, -16.11, -5.95, 1.63)
		pt3dadd(145.88, -14.91, -5.85, 1.63)
		pt3dadd(149.14, -13.68, -5.85, 1.63)
		pt3dadd(151.59, -12.66, -5.85, 1.63)
		pt3dadd(153.83, -12.46, -6.3, 1.63)
		pt3dadd(155.25, -13.07, -6.8, 1.63)
		pt3dadd(156.68, -14.5, -7.3, 1.63)
		pt3dadd(157.5, -16.34, -8.25, 1.63)
		pt3dadd(158.31, -17.36, -8.8, 1.63)
		pt3dadd(162.8, -18.99, -9.3, 1.63)
		pt3dadd(168.09, -20.62, -10.25, 1.63)
		pt3dadd(172.17, -21.85, -10.75, 1.63)
		pt3dadd(174.82, -22.87, -11.8, 1.63)
		pt3dadd(177.06, -24.3, -13.25, 1.63)
		pt3dadd(180.73, -26.95, -13.25, 1.63)
		pt3dadd(184.6, -29.81, -13.25, 1.63)
		pt3dadd(186.85, -32.05, -13.75, 1.63)
		pt3dadd(190.11, -34.71, -13.75, 1.63)
		pt3dadd(192.44, -36.63, -13.75, 1.63)
		pt3dadd(195.91, -37.86, -14.75, 1.63)
	}
	apical[14] {pt3dclear()
		pt3dadd(195.91, -37.86, -14.75, 1.63)
		pt3dadd(198.55, -36.63, -14.75, 1.63)
		pt3dadd(201.2, -34.18, -14.75, 1.63)
		pt3dadd(204.47, -32.55, -15.25, 1.63)
		pt3dadd(207.32, -31.73, -15.75, 1.63)
		pt3dadd(211.6, -31.53, -16.75, 1.63)
		pt3dadd(217.92, -32.35, -17.25, 1.63)
		pt3dadd(221.18, -32.76, -17.25, 1.63)
		pt3dadd(223.42, -33.16, -17.25, 1.63)
		pt3dadd(225.87, -34.18, -17.25, 1.63)
		pt3dadd(227.7, -33.98, -17.25, 1.63)
		pt3dadd(228.92, -33.57, -17.25, 1.63)
	}
	apical[15] {pt3dclear()
		pt3dadd(195.91, -37.86, -14.75, 1.63)
		pt3dadd(197.74, -38.27, -14.6, 1.63)
		pt3dadd(200.8, -37.86, -14.6, 1.63)
		pt3dadd(202.43, -37.86, -14.6, 1.63)
		pt3dadd(204.06, -38.88, -14.6, 1.63)
		pt3dadd(205.28, -39.08, -14.6, 1.63)
		pt3dadd(207.32, -39.29, -14.6, 1.63)
		pt3dadd(209.97, -39.49, -14.6, 1.63)
		pt3dadd(212.62, -40.31, -15.05, 1.63)
		pt3dadd(215.88, -41.73, -14.05, 1.63)
		pt3dadd(217.92, -44.18, -13.6, 1.63)
		pt3dadd(219.75, -45.61, -12.6, 1.63)
		pt3dadd(221.99, -46.43, -12.1, 1.63)
		pt3dadd(224.03, -47.04, -11.1, 1.63)
		pt3dadd(225.87, -46.63, -10.6, 1.63)
		pt3dadd(229.13, -45.82, -10.6, 1.63)
		pt3dadd(230.35, -45.82, -10.1, 1.63)
		pt3dadd(232.59, -46.84, -9.6, 1.63)
		pt3dadd(234.63, -47.65, -9.6, 1.63)
		pt3dadd(236.47, -48.06, -9.1, 1.63)
		pt3dadd(238.71, -47.86, -8.6, 1.63)
		pt3dadd(240.9, -47.08, -8.6, 1.63)
		pt3dadd(242.73, -46.67, -8.6, 1.63)
		pt3dadd(245.18, -46.67, -8.6, 1.63)
		pt3dadd(248.85, -47.08, -7.1, 1.63)
		pt3dadd(250.48, -46.26, -6.1, 1.63)
		pt3dadd(251.5, -45.04, -5.6, 1.63)
	}
	apical[16] {pt3dclear()
		pt3dadd(59.85, -8.85, -2.7, 1.63)
		pt3dadd(62.3, -10.77, -2.6, 1.63)
	}
	apical[17] {pt3dclear()
		pt3dadd(62.3, -10.77, -2.6, 1.63)
		pt3dadd(63.32, -13.42, -2.6, 1.63)
		pt3dadd(65.77, -17.3, -2.6, 1.63)
		pt3dadd(67.8, -19.55, -2.6, 1.43)
		pt3dadd(70.25, -20.77, -2.6, 1.43)
		pt3dadd(71.88, -23.02, -2.6, 1.43)
		pt3dadd(73.51, -25.87, -2.6, 1.43)
		pt3dadd(75.55, -28.12, -2.6, 1.43)
		pt3dadd(81.46, -34.24, -2.6, 1.43)
		pt3dadd(83.7, -36.08, -2.6, 1.43)
		pt3dadd(85.33, -37.51, -2.6, 1.43)
		pt3dadd(86.35, -39.55, -2.6, 1.43)
		pt3dadd(89, -42, -2.6, 1.43)
		pt3dadd(92.87, -43.63, -2.6, 1.43)
		pt3dadd(96.54, -44.04, -2.6, 1.43)
		pt3dadd(99.8, -44.44, -2.6, 1.43)
		pt3dadd(102.45, -44.44, -2.6, 1.43)
	}
	apical[18] {pt3dclear()
		pt3dadd(62.3, -10.77, -2.6, 1.43)
		pt3dadd(65.16, -10.36, -2.5, 1.43)
		pt3dadd(69.03, -10.57, -2.5, 1.43)
		pt3dadd(71.47, -11.38, -2.95, 1.43)
		pt3dadd(73.31, -11.38, -2.95, 1.43)
		pt3dadd(75.35, -13.02, -2.45, 1.43)
		pt3dadd(78, -14.65, -1.45, 1.43)
		pt3dadd(78.81, -15.26, -0.95, 1.43)
	}
	apical[19] {pt3dclear()
		pt3dadd(78.81, -15.26, -0.95, 1.43)
		pt3dadd(82.28, -17.51, -0.95, 1.43)
		pt3dadd(84.52, -19.95, -0.95, 1.43)
		pt3dadd(88.19, -21.79, -0.45, 1.43)
		pt3dadd(90.43, -23.02, 0.55, 1.43)
		pt3dadd(94.1, -24.44, 1.05, 1.43)
		pt3dadd(97.77, -24.44, 1.05, 1.43)
		pt3dadd(100.42, -24.24, 2, 1.43)
		pt3dadd(102.45, -25.26, 2.55, 1.43)
		pt3dadd(103.27, -26.48, 2.55, 1.43)
		pt3dadd(104.08, -28.12, 2.55, 1.43)
		pt3dadd(104.9, -29.75, 2.55, 1.43)
	}
}

proc size_sections5() {
	apical[20] {pt3dclear()
		pt3dadd(78.81, -15.26, -0.95, 1.43)
		pt3dadd(82.89, -14.24, -0.8, 1.43)
		pt3dadd(85.33, -14.65, -0.8, 1.43)
		pt3dadd(89.21, -15.67, -0.8, 1.43)
		pt3dadd(91.45, -15.26, -0.8, 1.43)
		pt3dadd(93.89, -15.06, 0.2, 1.43)
		pt3dadd(96.95, -14.85, 1.2, 1.43)
		pt3dadd(99.6, -14.04, 1.7, 1.43)
		pt3dadd(101.44, -14.04, 2.7, 1.43)
		pt3dadd(103.68, -13.42, 2.7, 1.43)
		pt3dadd(106.94, -12.61, 3.15, 1.43)
		pt3dadd(110.11, -12.24, 3.15, 1.43)
		pt3dadd(112.76, -11.22, 3.15, 1.43)
		pt3dadd(117.04, -10.4, 3.15, 1.43)
		pt3dadd(119.69, -11.01, 3.15, 1.43)
		pt3dadd(122.95, -10.61, 3.15, 1.43)
		pt3dadd(127.23, -9.79, 3.65, 1.43)
		pt3dadd(129.27, -8.56, 3.65, 1.43)
		pt3dadd(133.96, -7.34, 3.65, 1.43)
		pt3dadd(139.06, -7.14, 3.65, 1.43)
		pt3dadd(141.5, -7.14, 3.65, 1.43)
		pt3dadd(144.56, -7.75, 3.65, 1.43)
	}
	apical[21] {pt3dclear()
		pt3dadd(37.62, -8.59, -2.7, 1.63)
		pt3dadd(41.9, -10.79, -2.55, 1.63)
		pt3dadd(43.73, -12.22, -2.55, 1.63)
		pt3dadd(44.75, -13.24, -2.55, 1.63)
		pt3dadd(45.16, -14.46, -1.55, 1.63)
		pt3dadd(45.56, -15.89, -1.55, 1.63)
		pt3dadd(46.38, -16.71, -1.05, 1.63)
		pt3dadd(48.62, -17.93, -1.05, 1.63)
		pt3dadd(50.05, -19.36, -0.55, 1.63)
		pt3dadd(51.07, -20.38, -0.55, 1.63)
		pt3dadd(52.09, -22.83, -0.55, 1.63)
		pt3dadd(53.51, -27.32, -0.05, 1.63)
		pt3dadd(54.13, -29.57, 0.45, 1.63)
		pt3dadd(55.76, -30.79, 0.95, 1.63)
		pt3dadd(60.65, -32.01, 1.45, 1.63)
		pt3dadd(66.15, -32.83, 1.9, 1.63)
		pt3dadd(70.84, -32.42, 2.45, 1.63)
		pt3dadd(74.3, -31.4, 2.45, 1.43)
		pt3dadd(78.52, -30.68, 2.45, 1.43)
		pt3dadd(81.58, -30.07, 2.45, 1.43)
		pt3dadd(85.45, -28.84, 2.95, 1.43)
		pt3dadd(88.51, -27.41, 2.95, 1.43)
		pt3dadd(90.75, -27.01, 2.95, 1.43)
		pt3dadd(93, -26.39, 2.95, 1.43)
		pt3dadd(96.46, -26.19, 2.95, 1.43)
		pt3dadd(99.31, -27.21, 2.95, 1.43)
		pt3dadd(102.17, -28.43, 2.95, 1.43)
		pt3dadd(106.65, -29.66, 2.95, 1.43)
		pt3dadd(110.12, -29.66, 3.4, 1.43)
		pt3dadd(112.97, -29.86, 3.95, 1.43)
		pt3dadd(115.82, -29.86, 3.95, 1.43)
		pt3dadd(117.25, -29.66, 3.95, 1.43)
	}
	apical[22] {pt3dclear()
		pt3dadd(4.94, -7.89, -2.65, 1.43)
		pt3dadd(4.44, -9.46, -2.45, 1.43)
		pt3dadd(5.46, -10.28, -2.45, 1.43)
		pt3dadd(6.48, -10.28, -2, 1.43)
		pt3dadd(7.9, -10.28, -1, 1.43)
		pt3dadd(10.14, -11.3, -1, 1.43)
		pt3dadd(10.96, -12.12, -0.5, 1.43)
		pt3dadd(11.37, -13.14, 0, 1.43)
		pt3dadd(11.37, -14.77, 0.5, 1.43)
		pt3dadd(11.57, -16.2, 1, 1.43)
		pt3dadd(12.18, -18.24, 1.5, 1.43)
		pt3dadd(13, -19.46, 1.95, 1.43)
		pt3dadd(15.44, -20.69, 3, 1.43)
	}
	apical[23] {pt3dclear()
		pt3dadd(2.29, -7.89, -2.65, 1.43)
		pt3dadd(2.4, -9.05, -2.45, 1.43)
		pt3dadd(1.99, -11.3, -2.45, 1.43)
		pt3dadd(0.36, -13.54, -2.45, 1.43)
		pt3dadd(-2.29, -16.2, -3, 1.43)
		pt3dadd(-3.1, -17.42, -3, 1.43)
		pt3dadd(-4.53, -19.67, -2, 1.43)
		pt3dadd(-6.37, -23.14, -1.5, 1.43)
		pt3dadd(-8.4, -27.83, -1, 1.43)
		pt3dadd(-10.44, -30.48, 0, 1.43)
		pt3dadd(-11.66, -33.14, 0.5, 1.43)
		pt3dadd(-12.68, -36.2, 1.5, 1.43)
		pt3dadd(-13.91, -39.05, 3, 1.43)
		pt3dadd(-14.31, -40.89, 3.45, 1.43)
		pt3dadd(-15.54, -42.93, 3.95, 1.43)
		pt3dadd(-16.56, -45.79, 4.5, 1.43)
	}
	apical[24] {pt3dclear()
		pt3dadd(-4.61, -7.74, -2.65, 1.43)
		pt3dadd(-1.47, -5.79, -2.45, 1.43)
		pt3dadd(0.36, -4.77, -2, 1.43)
		pt3dadd(2.4, -3.54, -2, 1.43)
		pt3dadd(3.42, -2.32, -1.5, 1.43)
		pt3dadd(4.84, -1.5, -1.5, 1.43)
		pt3dadd(6.07, -0.07, -1.5, 1.43)
		pt3dadd(6.88, 1.35, -1.5, 1.43)
		pt3dadd(7.09, 2.37, -1.5, 1.43)
		pt3dadd(7.29, 2.99, -1.5, 1.43)
		pt3dadd(9.33, 2.99, -1.5, 1.43)
		pt3dadd(11.77, 3.19, -1, 1.43)
		pt3dadd(15.24, 3.8, -1, 1.43)
		pt3dadd(18.09, 5.23, -0.5, 1.43)
		pt3dadd(22.58, 7.48, 0, 1.43)
		pt3dadd(23.8, 9.31, 0.5, 1.43)
		pt3dadd(24.82, 11.76, 1.5, 1.43)
		pt3dadd(25.84, 14.21, 2.5, 1.43)
		pt3dadd(28.28, 16.25, 2.5, 1.43)
		pt3dadd(32.36, 19.11, 3, 1.43)
		pt3dadd(33.99, 21.76, 3.45, 1.43)
		pt3dadd(37.05, 23.8, 3.95, 1.43)
		pt3dadd(38.88, 25.64, 4.5, 1.43)
	}
	apical[25] {pt3dclear()
		pt3dadd(-15.41, -8.15, -2.2, 1.83)
		pt3dadd(-14.93, -5.58, -2.05, 1.83)
		pt3dadd(-13.09, -3.95, -2.05, 1.83)
		pt3dadd(-11.26, -2.52, -3.05, 1.83)
		pt3dadd(-9.63, -1.91, -3.05, 1.83)
		pt3dadd(-6.77, -1.09, -3.05, 1.83)
	}
	apical[26] {pt3dclear()
		pt3dadd(-6.77, -1.09, -3.05, 1.83)
		pt3dadd(-3.1, 1.15, -3.05, 1.83)
		pt3dadd(0.16, 2.58, -4.05, 1.83)
	}
	apical[27] {pt3dclear()
		pt3dadd(0.16, 2.58, -4.05, 1.63)
		pt3dadd(2.19, 5.44, -4.05, 1.63)
		pt3dadd(4.23, 8.29, -4.5, 1.63)
		pt3dadd(5.66, 9.52, -5, 1.63)
		pt3dadd(6.68, 10.74, -5, 1.63)
		pt3dadd(7.9, 12.58, -5, 1.63)
		pt3dadd(9.94, 15.03, -5, 1.63)
		pt3dadd(12.79, 17.27, -5.5, 1.63)
		pt3dadd(16.26, 20.74, -6, 1.63)
		pt3dadd(18.7, 22.37, -6, 1.63)
		pt3dadd(21.35, 24.62, -6.5, 1.63)
		pt3dadd(25.63, 27.88, -6.5, 1.63)
		pt3dadd(27.26, 28.91, -6.5, 1.63)
	}
	apical[28] {pt3dclear()
		pt3dadd(27.26, 28.91, -6.5, 1.63)
		pt3dadd(30.53, 31.56, -6.5, 1.63)
		pt3dadd(33.87, 34.78, -6.5, 1.63)
		pt3dadd(35.09, 36.21, -6.5, 1.63)
		pt3dadd(39.78, 38.05, -7, 1.63)
		pt3dadd(42.64, 39.88, -7, 1.63)
		pt3dadd(45.28, 41.72, -7, 1.63)
		pt3dadd(47.93, 43.56, -7, 1.63)
		pt3dadd(51.2, 43.97, -7, 1.63)
		pt3dadd(55.07, 44.17, -7, 1.63)
		pt3dadd(58.13, 44.17, -7, 1.63)
		pt3dadd(61.39, 45.19, -7, 1.63)
		pt3dadd(66.69, 46.01, -7.5, 1.63)
		pt3dadd(68.93, 46.62, -8.05, 1.63)
		pt3dadd(72.39, 46.82, -8.05, 1.63)
		pt3dadd(75.45, 47.84, -8.05, 1.63)
		pt3dadd(80.14, 49.07, -8.05, 1.63)
		pt3dadd(85.86, 50.65, -8.05, 1.63)
		pt3dadd(92.58, 53.71, -8.5, 1.63)
		pt3dadd(97.88, 56.16, -8.5, 1.63)
		pt3dadd(102.36, 58.41, -8.5, 1.63)
		pt3dadd(106.24, 60.86, -8.5, 1.63)
		pt3dadd(108.07, 62.69, -8.5, 1.63)
	}
	apical[29] {pt3dclear()
		pt3dadd(27.26, 28.91, -6.5, 1.63)
		pt3dadd(27.91, 31.82, -6.4, 1.63)
		pt3dadd(28.52, 33.25, -6.4, 1.63)
		pt3dadd(28.52, 35.29, -6.4, 1.63)
		pt3dadd(29.54, 37.95, -7.35, 1.63)
		pt3dadd(30.36, 40.6, -7.35, 1.63)
		pt3dadd(30.15, 42.23, -7.35, 1.63)
		pt3dadd(30.15, 43.46, -7.35, 1.63)
		pt3dadd(30.97, 44.48, -7.8, 1.63)
		pt3dadd(32.19, 45.29, -7.8, 1.63)
		pt3dadd(33.01, 46.52, -7.8, 1.63)
		pt3dadd(33.21, 48.35, -7.8, 1.63)
		pt3dadd(33.21, 50.19, -8.8, 1.63)
		pt3dadd(31.99, 52.23, -9.8, 1.63)
		pt3dadd(31.37, 54.68, -10.3, 1.63)
		pt3dadd(32.19, 57.54, -10.8, 1.63)
		pt3dadd(32.8, 58.35, -10.8, 1.63)
		pt3dadd(33.82, 58.76, -10.8, 1.63)
		pt3dadd(35.04, 59.78, -10.8, 1.63)
		pt3dadd(35.65, 61.62, -10.8, 1.63)
		pt3dadd(36.47, 63.05, -12.8, 1.63)
		pt3dadd(37.49, 64.48, -13.3, 1.63)
	}
}

proc size_sections6() {
	apical[30] {pt3dclear()
		pt3dadd(0.16, 2.58, -4.05, 1.83)
		pt3dadd(4.06, 4.27, -4, 1.83)
		pt3dadd(7.53, 6.11, -4.4, 1.83)
		pt3dadd(12.83, 7.74, -5.4, 1.83)
		pt3dadd(19.15, 11.01, -5.9, 1.83)
		pt3dadd(25.26, 13.25, -6.85, 1.83)
		pt3dadd(27.5, 13.46, -6.4, 1.83)
		pt3dadd(30.15, 14.07, -7.4, 1.83)
		pt3dadd(33.62, 15.09, -8.35, 1.83)
		pt3dadd(35.65, 15.7, -8.35, 1.83)
	}
	apical[31] {pt3dclear()
		pt3dadd(35.65, 15.7, -8.35, 1.83)
		pt3dadd(39.32, 16.72, -8.35, 1.83)
	}
	apical[32] {pt3dclear()
		pt3dadd(39.32, 16.72, -8.35, 1.83)
		pt3dadd(42.18, 18.97, -8.35, 1.83)
		pt3dadd(44.22, 20.6, -8.85, 1.83)
		pt3dadd(47.48, 22.03, -9.35, 1.83)
		pt3dadd(50.13, 22.44, -10.35, 1.83)
		pt3dadd(52.37, 23.05, -10.85, 1.83)
		pt3dadd(55.43, 24.48, -11.35, 1.83)
		pt3dadd(56.85, 26.11, -11.85, 1.83)
		pt3dadd(59.3, 27.33, -12.35, 1.83)
		pt3dadd(61.74, 27.74, -12.85, 1.83)
		pt3dadd(63.99, 28.97, -13.85, 1.83)
		pt3dadd(66.84, 29.78, -14.85, 1.83)
		pt3dadd(69.9, 31.01, -15.85, 1.83)
		pt3dadd(72.34, 31.62, -16.35, 1.83)
		pt3dadd(74.18, 32.64, -16.35, 1.83)
		pt3dadd(77.11, 34.04, -16.85, 1.83)
		pt3dadd(78.94, 34.91, -16.8, 1.83)
		pt3dadd(80.98, 36.95, -16.8, 1.83)
		pt3dadd(84.24, 39.4, -16.8, 1.83)
		pt3dadd(86.89, 40.83, -16.8, 1.83)
	}
	apical[33] {pt3dclear()
		pt3dadd(86.89, 40.83, -16.8, 1.63)
		pt3dadd(86.35, 44.53, -16.7, 1.63)
		pt3dadd(85.33, 46.57, -16.7, 1.63)
		pt3dadd(84.11, 49.02, -16.7, 1.63)
		pt3dadd(83.09, 51.47, -16.7, 1.63)
		pt3dadd(82.07, 55.34, -16.7, 1.63)
		pt3dadd(81.66, 59.02, -17.65, 1.63)
		pt3dadd(82.68, 62.08, -18.6, 1.63)
		pt3dadd(84.11, 65.34, -19.1, 1.63)
		pt3dadd(84.93, 66.57, -19.1, 1.63)
		pt3dadd(86.76, 68.4, -19.1, 1.63)
		pt3dadd(89.21, 69.63, -19.6, 1.63)
		pt3dadd(90.22, 71.47, -20.1, 1.63)
		pt3dadd(91.45, 74.12, -20.6, 1.63)
		pt3dadd(92.26, 76.98, -21.6, 1.63)
		pt3dadd(93.08, 78.4, -22.6, 1.63)
		pt3dadd(94.91, 80.65, -23.15, 1.63)
		pt3dadd(96.66, 82.34, -23.15, 1.63)
		pt3dadd(99.1, 83.77, -24.15, 1.63)
		pt3dadd(103.18, 87.24, -24.65, 1.63)
		pt3dadd(103.38, 87.65, -24.65, 1.63)
	}
	apical[34] {pt3dclear()
		pt3dadd(86.89, 40.83, -16.8, 1.83)
		pt3dadd(90.69, 43.56, -16.8, 1.83)
		pt3dadd(92.53, 44.38, -16.8, 1.83)
		pt3dadd(96.81, 45.61, -16.8, 1.83)
		pt3dadd(102.11, 47.03, -17.2, 1.83)
		pt3dadd(107.61, 48.05, -17.2, 1.83)
		pt3dadd(112.3, 49.07, -17.7, 1.83)
		pt3dadd(117.39, 50.71, -18.15, 1.83)
	}
	apical[35] {pt3dclear()
		pt3dadd(117.39, 50.71, -18.15, 1.43)
		pt3dadd(122.41, 51.22, -18, 1.43)
		pt3dadd(125.27, 52.03, -18, 1.43)
		pt3dadd(126.69, 53.26, -18, 1.43)
		pt3dadd(128.12, 53.87, -18, 1.43)
		pt3dadd(132.6, 54.89, -18.95, 1.43)
		pt3dadd(138.11, 55.3, -19.95, 1.43)
		pt3dadd(140.76, 55.71, -20.95, 1.43)
		pt3dadd(143, 55.71, -21.45, 1.43)
		pt3dadd(146.06, 56.32, -22.45, 1.43)
		pt3dadd(149.11, 57.95, -23.45, 1.43)
	}
	apical[36] {pt3dclear()
		pt3dadd(149.11, 57.95, -23.45, 1.43)
		pt3dadd(150.7, 60.56, -23.25, 1.43)
		pt3dadd(151.11, 62.6, -23.25, 1.43)
		pt3dadd(152.33, 63.83, -22.8, 1.43)
		pt3dadd(154.57, 64.44, -23.25, 1.43)
		pt3dadd(156.41, 64.85, -25.25, 1.43)
		pt3dadd(158.04, 65.46, -25.25, 1.43)
		pt3dadd(159.87, 66.68, -26.25, 1.43)
		pt3dadd(161.5, 68.72, -26.75, 1.43)
		pt3dadd(162.93, 69.74, -27.75, 1.43)
		pt3dadd(165.37, 72.6, -28.25, 1.43)
		pt3dadd(167.82, 74.64, -28.8, 1.43)
		pt3dadd(169.86, 76.07, -29.25, 1.43)
		pt3dadd(172.71, 77.91, -29.8, 1.43)
		pt3dadd(174.75, 78.93, -30.3, 1.43)
		pt3dadd(176.38, 80.36, -30.3, 1.43)
		pt3dadd(177.19, 83.42, -31.25, 1.43)
		pt3dadd(177.19, 85.46, -31.8, 1.43)
		pt3dadd(177.19, 87.09, -33.3, 1.43)
	}
	apical[37] {pt3dclear()
		pt3dadd(149.11, 57.95, -23.45, 1.43)
		pt3dadd(152.17, 59.17, -23.45, 1.43)
		pt3dadd(154.41, 58.56, -23.45, 1.43)
		pt3dadd(159.92, 56.73, -24.45, 1.43)
		pt3dadd(162.77, 55.91, -24.45, 1.43)
		pt3dadd(166.23, 54.48, -24.45, 1.43)
		pt3dadd(169.78, 53.13, -24.45, 1.43)
		pt3dadd(174.06, 51.91, -24.45, 1.43)
		pt3dadd(178.34, 51.3, -24.45, 1.43)
		pt3dadd(185.27, 52.72, -24.45, 1.43)
		pt3dadd(189.35, 54.15, -24.45, 1.43)
		pt3dadd(194.24, 54.77, -24.95, 1.43)
		pt3dadd(200.15, 56.19, -24.95, 1.43)
		pt3dadd(205.65, 55.99, -24.95, 1.43)
		pt3dadd(211.77, 57.62, -24.5, 1.43)
		pt3dadd(216.25, 59.05, -24.95, 1.43)
		pt3dadd(223.2, 61.1, -24.5, 1.43)
		pt3dadd(228.09, 61.3, -24.5, 1.43)
		pt3dadd(230.13, 62.32, -24.5, 1.43)
		pt3dadd(234, 63.14, -24.5, 1.43)
		pt3dadd(237.47, 63.55, -24.5, 1.43)
		pt3dadd(240.93, 63.55, -24.5, 1.43)
		pt3dadd(243.38, 63.96, -24.5, 1.43)
		pt3dadd(245.01, 64.57, -24.5, 1.43)
		pt3dadd(247.66, 65.59, -24.5, 1.43)
		pt3dadd(250.92, 66.4, -24.5, 1.43)
		pt3dadd(257.85, 67.63, -24, 1.43)
		pt3dadd(262.33, 68.24, -24, 1.43)
		pt3dadd(265.94, 68.66, -24, 1.43)
		pt3dadd(269, 69.07, -24, 1.43)
		pt3dadd(278.78, 68.05, -23.5, 1.43)
		pt3dadd(282.45, 68.05, -23.5, 1.43)
		pt3dadd(285.1, 68.87, -23.5, 1.43)
		pt3dadd(287.75, 68.87, -23.5, 1.43)
		pt3dadd(291.01, 68.46, -23.5, 1.43)
		pt3dadd(294.88, 67.64, -23, 1.43)
		pt3dadd(299.16, 65.8, -22.5, 1.43)
		pt3dadd(302.22, 66.01, -21.5, 1.43)
		pt3dadd(305.48, 65.4, -21, 1.43)
		pt3dadd(311.6, 64.99, -20.5, 1.43)
		pt3dadd(316.3, 65.52, -20.5, 1.43)
		pt3dadd(319.15, 65.93, -20.5, 1.43)
		pt3dadd(322, 66.14, -20.5, 1.43)
		pt3dadd(325.27, 65.52, -19.5, 1.43)
		pt3dadd(328.32, 62.87, -19.5, 1.43)
		pt3dadd(329.55, 61.03, -19.95, 1.43)
		pt3dadd(331.79, 58.58, -20.45, 1.43)
		pt3dadd(335.46, 54.71, -19, 1.43)
		pt3dadd(337.7, 53.48, -18, 1.43)
		pt3dadd(340.76, 51.65, -17.5, 1.43)
		pt3dadd(342.59, 51.65, -17.5, 1.43)
		pt3dadd(345.24, 50.01, -17.5, 1.43)
		pt3dadd(346.46, 48.99, -17, 1.43)
		pt3dadd(348.91, 46.75, -17, 1.43)
		pt3dadd(350.74, 45.12, -17, 1.43)
		pt3dadd(353.6, 45.12, -16.5, 1.43)
		pt3dadd(357.06, 44.5, -16, 1.43)
		pt3dadd(360.32, 43.89, -16, 1.43)
	}
	apical[38] {pt3dclear()
		pt3dadd(117.39, 50.71, -18.15, 1.63)
		pt3dadd(121.27, 53.36, -18.15, 1.63)
		pt3dadd(123.51, 54.58, -18.15, 1.63)
		pt3dadd(125.34, 55.81, -18.15, 1.63)
		pt3dadd(128.6, 58.67, -18.65, 1.63)
		pt3dadd(131.87, 61.32, -18.65, 1.63)
		pt3dadd(137.37, 65.2, -19.15, 1.63)
		pt3dadd(142.93, 69.23, -19.15, 1.63)
		pt3dadd(146.39, 71.28, -19.15, 1.63)
	}
	apical[39] {pt3dclear()
		pt3dadd(146.39, 71.28, -19.15, 1.43)
		pt3dadd(150.8, 72.12, -19.05, 1.43)
		pt3dadd(154.26, 72.74, -19.05, 1.43)
		pt3dadd(157.73, 73.35, -19.05, 1.43)
		pt3dadd(159.97, 74.57, -19.05, 1.43)
		pt3dadd(164.86, 78.04, -19.05, 1.43)
		pt3dadd(169.75, 80.69, -19.05, 1.43)
		pt3dadd(176.89, 82.53, -19.05, 1.43)
		pt3dadd(180.96, 82.74, -20, 1.43)
		pt3dadd(184.22, 82.74, -19.5, 1.43)
		pt3dadd(187.69, 82.12, -19, 1.43)
		pt3dadd(190.95, 81.31, -18.5, 1.43)
		pt3dadd(194.82, 80.08, -17, 1.43)
		pt3dadd(200.43, 79.32, -16.5, 1.43)
		pt3dadd(202.67, 78.3, -16.5, 1.43)
		pt3dadd(206.14, 76.88, -16, 1.43)
	}
}

proc size_sections7() {
	apical[40] {pt3dclear()
		pt3dadd(146.39, 71.28, -19.15, 1.63)
		pt3dadd(149.65, 74.34, -19.15, 1.63)
		pt3dadd(154.95, 78.01, -19.65, 1.63)
		pt3dadd(157.6, 80.46, -20.15, 1.63)
		pt3dadd(162.7, 83.11, -20.15, 1.63)
		pt3dadd(166.98, 86.17, -20.65, 1.63)
		pt3dadd(172.89, 91.68, -20.65, 1.63)
		pt3dadd(175.95, 94.13, -20.65, 1.43)
		pt3dadd(176.15, 95.77, -20.65, 1.43)
		pt3dadd(176.56, 97.81, -21.2, 1.43)
		pt3dadd(179, 100.26, -21.6, 1.43)
		pt3dadd(182.27, 103.52, -22.15, 1.43)
		pt3dadd(185.12, 106.31, -22.15, 1.43)
		pt3dadd(187.98, 109.17, -23, 1.43)
		pt3dadd(190.63, 112.23, -22.65, 1.43)
	}
	apical[41] {pt3dclear()
		pt3dadd(190.63, 112.23, -22.65, 1.43)
		pt3dadd(191.58, 115.78, -22.6, 1.43)
		pt3dadd(192.19, 117.62, -22.6, 1.43)
		pt3dadd(192.19, 118.84, -22.6, 1.43)
		pt3dadd(192.8, 120.47, -22.6, 1.43)
		pt3dadd(194.23, 122.72, -22.6, 1.43)
		pt3dadd(197.08, 126.39, -23, 1.43)
		pt3dadd(197.9, 128.23, -23, 1.43)
		pt3dadd(199.32, 132.11, -24, 1.43)
		pt3dadd(200.14, 136.19, -24, 1.43)
		pt3dadd(200.95, 139.25, -24, 1.43)
		pt3dadd(202.38, 142.52, -24.95, 1.43)
		pt3dadd(202.79, 146.19, -24.95, 1.43)
		pt3dadd(202.79, 148.23, -25.45, 1.43)
		pt3dadd(202.59, 152.92, -25.45, 1.43)
		pt3dadd(203.23, 156.32, -25.45, 1.43)
		pt3dadd(202.82, 160.2, -25.95, 1.43)
		pt3dadd(203.84, 162.64, -26.45, 1.43)
		pt3dadd(205.88, 167.75, -27.95, 1.43)
		pt3dadd(206.08, 169.38, -28.95, 1.43)
		pt3dadd(206.49, 172.24, -28.95, 1.43)
		pt3dadd(205.88, 176.11, -28.95, 1.43)
		pt3dadd(204.86, 182.03, -29.45, 1.43)
		pt3dadd(203.64, 187.54, -30.5, 1.43)
		pt3dadd(203.43, 192.03, -31, 1.43)
		pt3dadd(202.3, 195.93, -31, 1.43)
		pt3dadd(202.1, 198.18, -31, 1.43)
		pt3dadd(202.71, 201.44, -32.5, 1.43)
		pt3dadd(203.53, 207.98, -33.5, 1.43)
		pt3dadd(204.34, 211.44, -34.5, 1.43)
		pt3dadd(204.95, 214.71, -36.5, 1.43)
		pt3dadd(205.16, 217.57, -38.5, 1.43)
		pt3dadd(205.77, 219.81, -38.5, 1.43)
		pt3dadd(206.17, 222.06, -38.5, 1.43)
	}
	apical[42] {pt3dclear()
		pt3dadd(190.63, 112.23, -22.65, 1.43)
		pt3dadd(195.52, 116.72, -22.65, 1.43)
		pt3dadd(199.39, 120.8, -23.15, 1.43)
		pt3dadd(202.86, 124.07, -23.15, 1.43)
		pt3dadd(206.73, 127.13, -23.7, 1.43)
		pt3dadd(209.38, 129.78, -23.7, 1.43)
		pt3dadd(213.66, 133.04, -23.7, 1.43)
		pt3dadd(218.35, 135.09, -24.2, 1.43)
		pt3dadd(221.4, 137.94, -24.2, 1.43)
		pt3dadd(224.87, 141.82, -24.2, 1.43)
		pt3dadd(228.9, 144.46, -24.2, 1.43)
		pt3dadd(234.81, 149.15, -24.2, 1.43)
		pt3dadd(240.31, 152.01, -24.2, 1.43)
		pt3dadd(243.98, 154.46, -24.2, 1.43)
		pt3dadd(247.04, 156.29, -24.2, 1.43)
		pt3dadd(249.69, 157.93, -24.2, 1.43)
		pt3dadd(251.73, 160.17, -24.2, 1.43)
		pt3dadd(253.76, 163.03, -24.2, 1.43)
		pt3dadd(257.02, 165.27, -24.2, 1.43)
		pt3dadd(259.88, 167.31, -25.15, 1.43)
		pt3dadd(263.95, 169.56, -25.65, 1.43)
		pt3dadd(268.44, 171.8, -26.15, 1.43)
		pt3dadd(271.09, 173.03, -26.65, 1.43)
		pt3dadd(274.64, 173.87, -26.65, 1.43)
		pt3dadd(277.49, 174.08, -26.65, 1.43)
		pt3dadd(281.77, 174.89, -26.65, 1.43)
		pt3dadd(285.64, 176.93, -26.65, 1.43)
		pt3dadd(287.48, 177.96, -26.65, 1.43)
		pt3dadd(291.15, 178.57, -27.65, 1.43)
		pt3dadd(297.46, 179.18, -28.15, 1.43)
		pt3dadd(300.32, 179.59, -28.7, 1.43)
		pt3dadd(304.6, 179.79, -28.7, 1.43)
		pt3dadd(307.66, 180, -29.2, 1.43)
		pt3dadd(310.51, 180.4, -29.2, 1.43)
		pt3dadd(313.16, 181.42, -29.7, 1.43)
		pt3dadd(315.81, 181.83, -29.7, 1.43)
		pt3dadd(319.27, 181.22, -30.15, 1.43)
		pt3dadd(322.22, 181.04, -31.2, 1.43)
		pt3dadd(325.27, 181.45, -30.7, 1.43)
		pt3dadd(327.31, 182.06, -28.7, 1.43)
		pt3dadd(330.17, 184.1, -30.65, 1.43)
		pt3dadd(332.2, 186.14, -30.65, 1.43)
		pt3dadd(335.26, 189.61, -30.65, 1.43)
	}
	apical[43] {pt3dclear()
		pt3dadd(39.32, 16.72, -8.35, 1.63)
		pt3dadd(43.08, 15.88, -8.3, 1.63)
		pt3dadd(45.52, 15.06, -8.7, 1.63)
		pt3dadd(49.19, 13.63, -9.2, 1.63)
		pt3dadd(52.86, 11.59, -9.2, 1.63)
		pt3dadd(55.92, 10.78, -10.65, 1.63)
		pt3dadd(61.62, 7.92, -11.7, 1.63)
		pt3dadd(64.48, 6.69, -12.2, 1.63)
		pt3dadd(66.31, 6.49, -12.2, 1.63)
		pt3dadd(69.16, 5.47, -12.2, 1.63)
		pt3dadd(71.41, 5.47, -13.15, 1.63)
		pt3dadd(74.06, 5.47, -13.15, 1.63)
		pt3dadd(75.89, 6.29, -13.65, 1.63)
		pt3dadd(79.76, 6.69, -13.65, 1.63)
		pt3dadd(82.82, 6.69, -13.65, 1.63)
		pt3dadd(86.69, 6.08, -13.65, 1.63)
		pt3dadd(94.23, 5.47, -13.65, 1.63)
		pt3dadd(97.7, 5.88, -13.65, 1.63)
		pt3dadd(101.98, 5.88, -13.65, 1.63)
		pt3dadd(104.63, 5.27, -13.65, 1.63)
		pt3dadd(106.67, 5.27, -13.65, 1.63)
		pt3dadd(110.95, 6.08, -14.15, 1.63)
		pt3dadd(115.84, 6.69, -14.15, 1.63)
		pt3dadd(118.69, 7.31, -14.15, 1.63)
		pt3dadd(122.56, 8.33, -14.15, 1.63)
		pt3dadd(126.27, 9.07, -14.15, 1.63)
		pt3dadd(128.92, 9.27, -14.15, 1.63)
		pt3dadd(131.98, 9.88, -14.15, 1.63)
		pt3dadd(135.45, 10.09, -14.65, 1.63)
		pt3dadd(139.52, 10.9, -14.65, 1.63)
		pt3dadd(143.19, 11.31, -14.65, 1.63)
		pt3dadd(148.08, 10.49, -14.65, 1.63)
		pt3dadd(152.77, 9.88, -14.65, 1.63)
		pt3dadd(156.64, 9.68, -14.65, 1.63)
		pt3dadd(159.7, 10.29, -14.65, 1.63)
		pt3dadd(163.78, 11.92, -14.65, 1.63)
		pt3dadd(166.63, 13.96, -14.65, 1.63)
		pt3dadd(170.5, 15.8, -14.65, 1.63)
		pt3dadd(173.46, 16.01, -14.65, 1.63)
		pt3dadd(178.56, 14.99, -14.65, 1.63)
		pt3dadd(181.21, 14.17, -14.65, 1.63)
		pt3dadd(184.67, 14.58, -14.65, 1.63)
		pt3dadd(188.55, 16.01, -14.65, 1.63)
		pt3dadd(190.38, 16.82, -14.65, 1.63)
		pt3dadd(194.05, 17.23, -14.65, 1.63)
		pt3dadd(199.14, 17.03, -15.15, 1.63)
		pt3dadd(202.41, 17.44, -15.15, 1.63)
		pt3dadd(205.46, 18.25, -15.15, 1.63)
		pt3dadd(208.52, 19.89, -15.15, 1.63)
		pt3dadd(211.37, 21.11, -15.15, 1.63)
	}
	apical[44] {pt3dclear()
		pt3dadd(35.65, 15.7, -8.35, 1.63)
		pt3dadd(36.12, 17.84, -8.25, 1.63)
		pt3dadd(35.91, 19.27, -8.7, 1.63)
		pt3dadd(36.12, 20.91, -9.2, 1.63)
		pt3dadd(38.36, 22.74, -9.65, 1.63)
		pt3dadd(39.79, 24.99, -10.15, 1.63)
		pt3dadd(39.99, 27.03, -10.65, 1.63)
		pt3dadd(39.58, 29.89, -10.65, 1.63)
		pt3dadd(39.38, 32.13, -11.7, 1.63)
		pt3dadd(40.19, 34.58, -11.7, 1.63)
		pt3dadd(42.64, 36.62, -12.65, 1.63)
		pt3dadd(42.84, 36.82, -13.15, 1.63)
		pt3dadd(43.86, 38.05, -14.65, 1.63)
		pt3dadd(44.27, 38.46, -16.15, 1.63)
		pt3dadd(46.26, 39.45, -16.15, 1.63)
		pt3dadd(48.09, 41.29, -16.15, 1.63)
		pt3dadd(50.95, 43.53, -16.15, 1.63)
		pt3dadd(52.78, 45.57, -16.95, 1.63)
		pt3dadd(54.21, 47, -17.45, 1.63)
		pt3dadd(55.02, 48.64, -17.45, 1.63)
		pt3dadd(56.25, 52.31, -18.45, 1.63)
		pt3dadd(56.45, 54.55, -18.45, 1.63)
		pt3dadd(56.86, 56.39, -18.95, 1.63)
		pt3dadd(58.49, 58.02, -19.45, 1.63)
		pt3dadd(59.71, 59.45, -19.45, 1.63)
		pt3dadd(60.73, 60.88, -19.95, 1.63)
		pt3dadd(61.55, 63.33, -19.95, 1.63)
		pt3dadd(61.95, 67, -20.45, 1.63)
		pt3dadd(63.38, 70.88, -21.95, 1.63)
		pt3dadd(65.62, 73.74, -21.95, 1.63)
		pt3dadd(68.07, 76.19, -22.45, 1.63)
		pt3dadd(70.82, 78.25, -22.45, 1.63)
		pt3dadd(73.88, 82.33, -23.45, 1.63)
	}
	apical[45] {pt3dclear()
		pt3dadd(-6.77, -1.09, -3.05, 1.63)
		pt3dadd(-4.65, -3.58, -2.95, 1.63)
		pt3dadd(-2.4, -5.42, -2.95, 1.63)
		pt3dadd(1.26, -6.24, -2.95, 1.63)
		pt3dadd(6.77, -6.03, -4.35, 1.63)
		pt3dadd(9.01, -6.03, -4.9, 1.63)
		pt3dadd(10.23, -5.42, -4.9, 1.63)
		pt3dadd(12.47, -5.22, -5.4, 1.63)
		pt3dadd(17.98, -5.42, -6.4, 1.63)
		pt3dadd(21.85, -6.44, -9.35, 1.63)
		pt3dadd(25.93, -6.24, -9.85, 1.63)
		pt3dadd(30, -6.64, -11.35, 1.63)
		pt3dadd(32.65, -6.64, -12.85, 1.63)
		pt3dadd(35.91, -7.05, -13.35, 1.63)
		pt3dadd(38.97, -8.28, -13.85, 1.63)
		pt3dadd(41.42, -10.11, -14.85, 1.63)
		pt3dadd(44.07, -10.73, -14.85, 1.63)
		pt3dadd(48.75, -12.56, -15.35, 1.63)
		pt3dadd(53.24, -13.99, -17.35, 1.63)
		pt3dadd(55.68, -14.2, -17.35, 1.63)
		pt3dadd(58.33, -15.22, -17.9, 1.63)
		pt3dadd(61.59, -16.03, -17.9, 1.63)
		pt3dadd(63.43, -17.05, -17.9, 1.63)
	}
	apical[46] {pt3dclear()
		pt3dadd(-37.22, -12.64, -0.2, 1.63)
		pt3dadd(-38.98, -10.45, -0.1, 1.63)
	}
	apical[47] {pt3dclear()
		pt3dadd(-38.98, -10.45, -0.1, 1.63)
		pt3dadd(-39.8, -8.2, -0.1, 1.63)
		pt3dadd(-40, -6.16, -0.55, 1.63)
		pt3dadd(-38.78, -4.53, -1.05, 1.63)
		pt3dadd(-36.13, -1.67, -2.05, 1.63)
		pt3dadd(-33.48, 1.8, -3.05, 1.63)
		pt3dadd(-30.22, 5.27, -4.5, 1.63)
		pt3dadd(-28.79, 7.51, -5.5, 1.63)
		pt3dadd(-25.33, 10.78, -6.5, 1.63)
		pt3dadd(-22.88, 13.23, -6.5, 1.63)
		pt3dadd(-20.84, 14.86, -6.5, 1.63)
		pt3dadd(-19.42, 17.1, -7.5, 1.63)
		pt3dadd(-19.01, 19.76, -8, 1.63)
		pt3dadd(-16.97, 21.8, -8.5, 1.63)
		pt3dadd(-13.71, 23.43, -9.5, 1.63)
		pt3dadd(-11.87, 25.47, -9.5, 1.63)
		pt3dadd(-8.82, 26.7, -9.5, 1.63)
		pt3dadd(-5.53, 27.88, -9.5, 1.63)
		pt3dadd(-3.29, 29.1, -10.5, 1.63)
		pt3dadd(-2.27, 30.94, -11, 1.63)
		pt3dadd(-1.25, 32.78, -11, 1.63)
		pt3dadd(-0.23, 34, -11, 1.63)
		pt3dadd(2.82, 34.82, -11.5, 1.63)
		pt3dadd(4.25, 34.82, -11.5, 1.63)
		pt3dadd(5.88, 35.43, -11.5, 1.63)
		pt3dadd(7.92, 36.04, -12.5, 1.63)
		pt3dadd(9.55, 37.47, -12.5, 1.63)
		pt3dadd(10.16, 38.49, -13.5, 1.63)
		pt3dadd(11.38, 40.94, -14.5, 1.63)
		pt3dadd(13.01, 42.78, -14.5, 1.63)
		pt3dadd(14.44, 43.8, -15, 1.63)
		pt3dadd(16.28, 44.82, -15.5, 1.63)
		pt3dadd(17.7, 45.63, -16, 1.63)
		pt3dadd(20.15, 47.47, -17, 1.63)
		pt3dadd(21.8, 48.43, -16.95, 1.63)
		pt3dadd(25.27, 49.04, -16.95, 1.63)
		pt3dadd(27.51, 49.86, -16.95, 1.63)
		pt3dadd(28.73, 51.29, -16.95, 1.63)
		pt3dadd(30.97, 52.51, -16.95, 1.63)
		pt3dadd(35.66, 53.94, -16.95, 1.63)
		pt3dadd(39.74, 54.55, -17.35, 1.63)
		pt3dadd(42.8, 55.37, -18.3, 1.63)
		pt3dadd(45.65, 56.8, -18.85, 1.63)
		pt3dadd(49.32, 59.66, -18.85, 1.63)
		pt3dadd(49.73, 61.49, -19.8, 1.63)
		pt3dadd(50.74, 63.53, -20.3, 1.63)
		pt3dadd(51.97, 66.19, -21.3, 1.63)
	}
	apical[48] {pt3dclear()
		pt3dadd(-38.98, -10.45, -0.1, 1.43)
		pt3dadd(-41.04, -9.77, -0.05, 1.43)
		pt3dadd(-41.85, -8.55, -0.05, 1.43)
		pt3dadd(-42.67, -8.34, -0.05, 1.43)
		pt3dadd(-43.69, -8.14, -0.5, 1.43)
		pt3dadd(-45.52, -6.91, -0.95, 1.43)
		pt3dadd(-45.93, -5.69, -2.9, 1.43)
		pt3dadd(-46.54, -4.87, -4.4, 1.43)
		pt3dadd(-48.58, -3.04, -4.95, 1.43)
		pt3dadd(-52.66, -1.4, -5.9, 1.43)
		pt3dadd(-54.29, -0.59, -5.9, 1.43)
		pt3dadd(-54.9, 1.05, -6.45, 1.43)
		pt3dadd(-54.9, 3.09, -6.9, 1.43)
		pt3dadd(-54.9, 5.13, -7.45, 1.43)
		pt3dadd(-55.31, 7.37, -7.45, 1.43)
		pt3dadd(-56.94, 10.43, -7.9, 1.43)
		pt3dadd(-57.55, 11.45, -8.4, 1.43)
		pt3dadd(-57.66, 12.79, -7.45, 1.43)
		pt3dadd(-57.66, 14.84, -10.4, 1.43)
		pt3dadd(-57.45, 16.26, -12.9, 1.43)
		pt3dadd(-56.84, 17.08, -14.9, 1.43)
	}
} // r finished at 7

external lambda_f
proc set_nseg() {
  forsec all { nseg = int((L/(0.1*lambda_f(100))+.9)/2)*2 + 1  }
}

objref myclamp
proc mechinit() {

	soma[0] myclamp = new IClamp(0.5)
	
	myclamp.amp=-0.0610
	myclamp.del=0
	myclamp.dur=999999

	// Temperature of simulation
	celsius = 34.0  

	// Membrane resistance in ohm*cm2
	RmDend = 35000*.94 //*.85
	RmSoma = 35000*.94 //*.85

	// Membrane capacitance in uF/cm2
	CmSoma= 1
	CmDend = 1

	// Axial resistance in ohm*cm
	RaDend=  295
	RaSoma= 295

	// reversal potentials in mV
	ekval = -104 //-90
	enaval = 55
	eHCNval = -30
	ecaval = 130
	eleakval = ekval //Vrest  // not lower than ekval
	
	// Calcium concentrations in mM
	ca_outside = 2
	ca_inside = 50.e-6 

	// max ion channel conductances in mho/cm2
	gNav     = 0.06*1.1*4 // 0.07 // Voltage gated sodium
	gKdr     = 0.1*0.3 // Delayed rectifier potassium
	gKdrslow = 0.001 // Slow delayed rectifier potassium
	gKvAdist = 0.012/2 // Distal A-type potassium
	gKvAprox = 0.012/2 // Proximal A-type potassium
	gHCN     = 0.00002*2.5 // HCN (hyperpolarization-activated cyclic nucleotide-gated channel)
	gCavT    = 0.05/1 // T-type calcium
	gCavL    = 0.02/4*1.5 // L-type calcium
	gKvCaB	 = 0.02*.5 // Big potassium channel: voltage and calcium gated
	gKCaS	 = 0.07 // Small potassium channel: calcium gated
}

proc insert_mechs() {
	NumSoma=2
	NumApical=49
	NumBasal=29

	access soma[0]
	distance() // calculates the distance between location 0 of the currently accessed section (as the origin) to a second point (but with this usage, it just sets the origin point) 

	for i=0,NumSoma-1 soma[i] {   
		insert ch_HCNp gmax_ch_HCNp=gHCN
		vhalfl_ch_HCNp=-82
		insert ch_Navp  gmax_ch_Navp=gNav     
		ar2_ch_Navp=1
		insert ch_Kdrp gmax_ch_Kdrp=gKdr
		insert ch_Kdrslow gmax_ch_Kdrslow=gKdrslow
		insert ch_KvAproxp gmax_ch_KvAproxp = gKvAprox
		insert ch_KvCaB
		gmax_ch_KvCaB = gKvCaB
		insert ch_KCaS
		gmax_ch_KCaS = gKCaS
		insert pas e_pas=eleakval g_pas = 1/RmSoma Ra=RaSoma cm=CmSoma
		insert ch_CavLZ
		gmax_ch_CavLZ=gCavL
		insert iconc_CaZ		
		cao_iconc_Ca = ca_outside 
		cao=ca_outside 
		cai=ca_inside
		eca=ecaval
	}

	for i=0,NumBasal-1 basal[i] {
		insert pas e_pas=eleakval g_pas = 1/RmDend Ra=RaDend  cm=CmDend
		insert ch_CavLZ
		gmax_ch_CavLZ=gCavL
		insert ch_CavT
		cao_iconc_Ca = ca_outside
		cao=ca_outside
		cai=ca_inside
		eca=ecaval
		insert ch_KvCaB
		gmax_ch_KvCaB = gKvCaB
		insert ch_KCaS
		gmax_ch_KCaS = gKCaS
		for (x){ xdist = distance(x)
			if (xdist>500) {xdist=500}
				gmax_ch_CavT=gCavT*(1-exp(-xdist/500)^2)/.66
			}
		if (diam>0.5 && distance(0.5)<500) {
			insert ch_Kdrp 
			gmax_ch_Kdrp=gKdr
		insert ch_Kdrslow gmax_ch_Kdrslow=gKdrslow
			insert ch_KvAproxp
			insert ch_KvAdistp
			gmax_ch_KvAproxp=0
			gmax_ch_KvAdistp=0

			for (x){ xdist = distance(x)
				if (xdist>500) {xdist=500}
				if (xdist > 100){
					gmax_ch_KvAdistp(x) = gKvAdist*(1+xdist/100)
				} else {
					gmax_ch_KvAproxp(x) = gKvAprox*(1+xdist/100)
				}
			}
		}
	}

	for i=0,NumApical-1 apical[i] {
		insert pas e_pas=eleakval g_pas = 1/RmDend Ra=RaDend  cm=CmDend
		insert ch_CavLZ
		gmax_ch_CavLZ=gCavL
		insert ch_CavT
		cao_iconc_Ca = ca_outside
		cao=ca_outside
		cai=ca_inside
		eca=ecaval
		insert ch_KvCaB
		gmax_ch_KvCaB = gKvCaB
		insert ch_KCaS
		gmax_ch_KCaS = gKCaS
		for (x){ xdist = distance(x)
			if (xdist>500) {xdist=500}
				gmax_ch_CavT=gCavT*(1-exp(-xdist/500)^2)/.66
			}
		if (diam>0.5 && distance(0.5)<500) {
			insert ch_HCNp gmax_ch_HCNp = gHCN
			insert ch_Kdrp 
			gmax_ch_Kdrp=gKdr
		insert ch_Kdrslow gmax_ch_Kdrslow=gKdrslow
			insert ch_KvAproxp
			insert ch_KvAdistp
			gmax_ch_KvAproxp=0
			gmax_ch_KvAdistp=0

			for (x){ xdist = distance(x)
				if (xdist>500) {xdist=500}
				gmax_ch_HCNp(x) = gHCN*(1+1.5*xdist/100)
				if (xdist > 100){
					vhalfl_ch_HCNp=-90
					gmax_ch_KvAdistp(x) = gKvAdist*(1+xdist/100)
				} else {
					vhalfl_ch_HCNp=-82
					gmax_ch_KvAproxp(x) = gKvAprox*(1+xdist/100)
				}
			}
		}
	}

	forall {
        v=Vrest
        if (ismembrane("ch_Navaxonp") || ismembrane("ch_Navp") || ismembrane("ch_Nav")) {ena=enaval}
        if (ismembrane("ch_Kdrp") || ismembrane("ch_KvAproxp") || ismembrane("ch_KvAdistp")) {ek=ekval}
        if (ismembrane("ch_HCNp") ) {e_ch_HCNp=eHCNval}
	}
}

func is_art() { return 0 }

proc connect_pre() {  // $o1 target point process, $o2 returned NetCon
	soma[0] $o2 = new NetCon (&v(1), $o1)
			$o2.threshold = -10
}

proc position(){ local i
	forall {
		for i = 0, n3d()-1 {
			pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))
		}
	}
	x = $1  y = $2  z = $3	
}

proc get_root() {local i localobj sref
	rootlist = new SectionList()
	rootlist.allroots()
	i=0
	forsec all {
		sref = new SectionRef()
		if (sref.has_parent==0) {
			myroot = secname()
			i=i+1
		}
	}
	if (i>1) {
		print "WARNING: cell ", gid, " has ", i, " root sections!"
	}
}

objref syn
proc define_synapses() {local i localobj f2, f3

}

endtemplate pyramidalsupercell