From c7f52eada2cb8c1695afac6c7beed8fdda669288 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Fri, 08 Jul 2016 19:41:43 +0000
Subject: [PATCH] Several fixes and attempts to make improvements.

---
 python/tape               |   10 +++++-----
 python/trisurf/trisurf.py |    2 +-
 python/trisurf/tsmgr.py   |   17 ++++++++++++++++-
 3 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/python/tape b/python/tape
index 53d9b82..35b52e6 100644
--- a/python/tape
+++ b/python/tape
@@ -1,6 +1,6 @@
 ####### Vesicle definitions ###########
 # nshell is a number of divisions of dipyramid
-nshell=5
+nshell=10
 # dmax is the max. bond length (in units l_min)
 dmax=1.7
 # dmin_interspecies in the min. dist. between different vertex species (in units l_min)
@@ -17,15 +17,15 @@
 pressure=0.0
 
 #Constant volume constraint (0 disable constant volume, 1 enable wiht additional vertex move, 2 enable with epsvol)
-constvolswitch=2
+constvolswitch=0
 constvolprecision=1e-14
 
 #Constant area constraint (0 disable constant area, 2 enable constant area with epsarea)
-constareaswitch=2
+constareaswitch=0
 
 ####### Polymer (brush) definitions ###########
 # npoly is a number of polymers attached to npoly distinct vertices on vesicle
-npoly=2
+npoly=60
 # nmono is a number of monomers in each polymer
 nmono=10
 # Spring constant between monomers of the polymer
@@ -63,7 +63,7 @@
 
 ###### Spherical harmonics ###########
 # If 0 then spherical harmonics are not calculated at all.
-spherical_harmonics_coefficients=21
+spherical_harmonics_coefficients=0
 
 #shut up if we are using cluster!!!
 quiet=false
diff --git a/python/trisurf/trisurf.py b/python/trisurf/trisurf.py
index 8e60d69..3fe4adb 100644
--- a/python/trisurf/trisurf.py
+++ b/python/trisurf/trisurf.py
@@ -495,7 +495,7 @@
 
 
 	def getLastVTU(self):
-		vtuidx=self.getLastIteration() #-int(self.tape.getValue("inititer"))+1
+		vtuidx=self.getLastIteration() -int(self.tape.getValue("inititer"))
 		if vtuidx<0:
 			return None
 		else:
diff --git a/python/trisurf/tsmgr.py b/python/trisurf/tsmgr.py
index ac5c8f2..2ed84ac 100644
--- a/python/trisurf/tsmgr.py
+++ b/python/trisurf/tsmgr.py
@@ -239,13 +239,28 @@
 		# Create the RendererWindow
 		renderer_window = vtkRenderWindow()
 		renderer_window.AddRenderer(renderer)
-
+		
+# Set up a check for aborting rendering.
 		# Create the RendererWindowInteractor and display the vtk_file
 		interactor = vtkRenderWindowInteractor()
 		interactor.SetRenderWindow(renderer_window)
 		interactor.Initialize()
+# 		interactor.AddObserver("TimerEvent", RenderUpdate)
+#		timerIDR = interactor.CreateRepeatingTimer(1000)
 		interactor.Start()
 
+def RenderUpdate(obj, event):
+	# obj will be the object generating the event.  In this case it
+	# is renWin
+	window=obj.GetRenderWindow() #.GetRenderer()
+	renderer=window.GetRenderers()
+	try:
+		actor=renderer.GetActors()
+	except:
+		pass
+	actor=renderer.GetActors()
+	print(actor)
+	
 
 
 def getListOfHostConfigurationByHostname(hosts,host):

--
Gitblit v1.9.3