← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1852: 1. Move TesselationWrapper to lib/triangulation.

 

------------------------------------------------------------
revno: 1852
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Fri 2009-12-04 22:56:59 +0100
message:
  1. Move TesselationWrapper to lib/triangulation.
  2. Main program (e.g. yade-trunk) is now in python; the old is yade-trunk-cxx. Most functionality should be the same, but please do report undesired behavior.
  3. Adjust ipython configuration to be more friendly.
  4. Improve default log4cxx output format
  5. rename yade.PythonTCPServer to yade.remote
  6. Remove annoying "INFO: sanitize failed" warnings
  7. SimulationController now closes on escape or any function key.
renamed:
  extra/triangulation/ => lib/triangulation/
  gui/py/PythonTCPServer.py => py/remote.py
modified:
  core/SConscript
  core/main/main.py.in
  core/main/pyboot.cpp
  doc/sphinx/arch.rst
  doc/sphinx/index.rst
  extra/SConscript
  gui/SConscript
  gui/py/ipython.py
  gui/qt3/GLViewer.cpp
  gui/qt3/GLViewer.hpp
  gui/qt3/SimulationController.cpp
  gui/qt3/SimulationController.hpp
  lib/SConscript
  lib/serialization-qt/QtGUIGenerator.cpp
  pkg/common/Engine/StandAloneEngine/PersistentTriangulationCollider.cpp
  pkg/dem/Engine/StandAloneEngine/MicroMacroAnalyser.cpp
  py/SConscript
  py/__init__.py.in
  py/config.py.in
  py/system.py
  py/yadeWrapper/yadeWrapper.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'core/SConscript'
--- core/SConscript	2009-12-01 22:24:00 +0000
+++ core/SConscript	2009-12-04 21:56:59 +0000
@@ -1,6 +1,6 @@
 Import('*')
 
-pyMain='$PREFIX/bin/yade$SUFFIX-py'
+pyMain='$PREFIX/bin/yade$SUFFIX'
 env.InstallAs(pyMain,env.ScanReplace('main/main.py.in'))
 
 env.InstallAs(pyMain,env.File(env.ScanReplace('main/main.py.in'),''))
@@ -10,7 +10,7 @@
 	env.SharedLibrary('boot',['main/pyboot.cpp'],SHLIBPREFIX='',LIBS=env['LIBS']+['yade-support','core'])
 ])
 
-env.InstallAs('$PREFIX/bin/yade$SUFFIX',env.Program('yade',['main/main.cpp'],LIBS=env['LIBS']+['yade-support','core'],CPPDEFINES=env['CPPDEFINES']+[('YADE_VERSION','\\"'+env['realVersion']+'\\"'),]))
+env.InstallAs('$PREFIX/bin/yade$SUFFIX-cxx',env.Program('yade',['main/main.cpp'],LIBS=env['LIBS']+['yade-support','core'],CPPDEFINES=env['CPPDEFINES']+[('YADE_VERSION','\\"'+env['realVersion']+'\\"'),]))
 
 env.Install('$PREFIX/lib/yade$SUFFIX/lib',[
 	env.SharedLibrary('core',

=== modified file 'core/main/main.py.in'
--- core/main/main.py.in	2009-12-04 04:53:02 +0000
+++ core/main/main.py.in	2009-12-04 21:56:59 +0000
@@ -6,41 +6,51 @@
 # get yade path (allow YADE_PREFIX to override)
 prefix,suffix='${PREFIX}' if not os.environ.has_key('YADE_PREFIX') else os.environ('YADE_PREFIX'),'${SUFFIX}'
 sys.path.append(os.path.join(prefix,'lib','yade'+suffix,'py'))
-
-# initialization and c++ plugins import
-import yade
-# other parts we will need soon
-import yade.config
-import yade.wrapper
-import yade.log
-
+# duplicate some items from yade.config here, so that we can increase verbosity when the c++ part is booting
+debug,features,version=bool(${debug}),'${features}'.split(','),'${realVersion}'
 
 # handle command-line options first
 import optparse
-par=optparse.OptionParser(usage='%prog [options] [ simulation.xml[.bz2] | script.py [script options]]',prog='Yade',version='%s (%s)'%(yade.config.version,','.join(yade.config.features)))
+par=optparse.OptionParser(usage='%prog [options] [ simulation.xml[.bz2] | script.py [script options]]',prog='Yade',version='%s (%s)'%(version,','.join(features)))
 par.add_option('-j','--threads',help='Number of OpenMP threads to run; defaults to number of cores.',dest='threads',type='int')
 par.add_option('-x',help='Exit when the script finishes',dest='exitAfter')
-if 'log4cxx' in yade.config.features:
+if 'log4cxx' in features:
 	par.add_option('-v',help='Increase logging verbosity; first occurence sets default logging level to info, second to debug, third to trace.',action='count',dest='verbosity')
-if yade.config.debug:
+if debug:
 	par.add_option('--no-gdb',help='Do not show backtrace when yade crashes.',dest='noGdb',action='store_true',)
 
 opts,args=par.parse_args()
+# c++-boot code checks for YADE_DEBUG at some places; debug verbosity is equivalent
+if opts.verbosity>1: os.environ['YADE_DEBUG']='1'
+
+# initialization and c++ plugins import
+import yade
+# other parts we will need soon
+import yade.config
+import yade.wrapper
+import yade.log
+import yade.system
+
+# continue option processing
 
 if opts.threads:
 	os.environ['OMP_NUM_THREADS']=str(opts.threads)
 if yade.config.debug and opts.noGdb:
 	yade.wrapper.Omega().disableGdb()
 if 'log4cxx' in yade.config.features and opts.verbosity:
-	yade.log.setLevel([yade.log.INFO,yade.log.DEBUG,yade.log.TRACE][min(opts.verbosity,3)])
+	yade.log.setLevel('',[yade.log.INFO,yade.log.DEBUG,yade.log.TRACE][min(opts.verbosity,3)])
+
+# run servers
+yade.system.runServers()
 
 # open GUI if possible
+qtEnabled=False
 try:
 	import yade.qt
-	yade.qt.Controller()
+	qtEnabled=True
 except ImportError: pass
 
-# be nice to users
+# prepare nice namespace for users
 from yade import *
 from math import *
 
@@ -60,7 +70,22 @@
 if 1:
 	if 1:
 		from IPython.Shell import IPShellEmbed
-		ipshell=IPShellEmbed(exit_msg='Bye.',rc_override={'execfile':[prefix+'/lib/yade'+suffix+'/py/yade/ipython.py']})
+		ipshell=IPShellEmbed(
+			argv=[],
+			#exit_msg='Bye.',
+			banner='[[ ^L clears screen, ^U kills line.'+(' F12 controller, F11 3d view, F10 both, F9 generator.' if qtEnabled else '')+' ]]',
+			rc_override={
+				'execfile':[prefix+'/lib/yade'+suffix+'/py/yade/ipython.py'],
+				'readline_parse_and_bind':[
+					'tab: complete',
+					# only with the gui
+					# the escape codes might not work on non-linux terminals.
+					]+(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"', # F12
+					'"\e[23~": "\C-Uyade.qt.View();\C-M"', # F11
+					'"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"', # F10
+					'"\e[20~": "\C-Uyade.qt.Generator();\C-M"', #F9
+					] if qtEnabled else [])
+			})
 		ipshell()
 	else:
 		import bpython

=== modified file 'core/main/pyboot.cpp'
--- core/main/pyboot.cpp	2009-12-03 20:57:11 +0000
+++ core/main/pyboot.cpp	2009-12-04 21:56:59 +0000
@@ -11,6 +11,8 @@
 #include<boost/python.hpp>
 
 #ifdef YADE_LOG4CXX
+	#include<log4cxx/consoleappender.h>
+	#include<log4cxx/patternlayout.h>
 	log4cxx::LoggerPtr logger=log4cxx::Logger::getLogger("yade.boot");
 	/* initialize here so that ClassFactory can use log4cxx without warnings */
 	__attribute__((constructor)) void initLog4cxx() {
@@ -19,9 +21,13 @@
 		#else
 			log4cxx::LevelPtr debugLevel=log4cxx::Level::DEBUG, infoLevel=log4cxx::Level::INFO, warnLevel=log4cxx::Level::WARN;
 		#endif
+		//log4cxx::BasicConfigurator::configure();
 
-		log4cxx::BasicConfigurator::configure();
+		// LOG4CXX_STR: http://old.nabble.com/Link-error-when-using-Layout-on-MS-Windows-td20906802.html
+		log4cxx::LayoutPtr layout(new log4cxx::PatternLayout(LOG4CXX_STR("%-5r %-5p %-10c %m%n")));
+		log4cxx::AppenderPtr appender(new log4cxx::ConsoleAppender(layout));
 		log4cxx::LoggerPtr localLogger=log4cxx::Logger::getLogger("yade");
+		localLogger->addAppender(appender);
 		localLogger->setLevel(getenv("YADE_DEBUG")?debugLevel:warnLevel);
 		LOG4CXX_DEBUG(localLogger,"Log4cxx initialized.");
 	}

=== modified file 'doc/sphinx/arch.rst'
--- doc/sphinx/arch.rst	2009-12-04 15:40:34 +0000
+++ doc/sphinx/arch.rst	2009-12-04 21:56:59 +0000
@@ -1,20 +1,20 @@
-######################
+**********************
 Architecture overview
-######################
+**********************
 
 In the following, a high-level overview of Yade architecture will be given.
 As many of the features are directly represented in simulation scripts, which
 are written in Python, being familiar with this language will help you follow
 the examples. For the rest, this knowledge is not strictly necessary.
 
-****************
+
 Simulation loop
-****************
+================
 
 Yade's simulation are explicit, proceeding in time by given timestep (:ref:`timestep`). At every step, a sequence of :ctype:`Engines` is run; these Engines operate on :ctype:`Body`'s (particles) and their :ctype:`Interaction`'s.
 
 Bodies
-======
+------
 Bodies in simulation are distinguished by their unique numerical id.
 
 Each body has some :ctype:`Shape` in the geometrical sense: sphere, facet (triangle), infinite wall; this shape is constant throughout Body's life. Orthogonal to shape is :ctype:`Material` holding material properties, independently of the shape, such as Young's modulus; a material can be shared between multiple bodies. To account for various changes a Body might undergo, there is a :ctype:`State` associated with every Body − it holds spatial position and orientation, velocity and so on. Finally (but this is invisible to the user), there is :ctype:`Bound` approximating (bounding) the body in space, to speed up collision detection. 
@@ -59,7 +59,7 @@
 	1 0.5
 
 Interactions
-============
+--------------
 Interactions (used as uniting term for contacts and bonds, i.e. non-cohesive and cohesive interactions) are always between two bodies. In typical cases, they are created automatically based on spatial position of bodies. If two bodies are sufficiently close (in terms of their bounds), the collider creates interaction, which we call *potential*. Later in the loop, such interaction is checked for precise overlap based on shapes of the 2 bodies (sphere with triangle, for instance); if they do overlap, the interaction becomes *real*.
 
 Each (real) :ctype:`Interaction` has again several components.
@@ -83,7 +83,7 @@
 	ValueError: No such interaction
 
 Engines
-=======
+--------
 
 A typical simulation loop does the following:
 
@@ -123,7 +123,7 @@
 	invoking various :ctype:`Functor`'s based on types they receive. For instance, ``BoundDispatcher([Bv1_Sphere_AABB])`` creates a ``BoundDispatcher``, which will, based on shape type, use one of its functors to create bound for each body. In this case, it has 2 functors, one for spheres, one for facets; the ``Bo`` functor creating Bound, which is called based on ``1`` type ``Sphere`` it receives, and creates bound of type ``Aabb`` (axis-aligned bounding box).
 
 Dispatchers and functors
-------------------------
+^^^^^^^^^^^^^^^^^^^^^^^^^
 As said, BoundDispatcher dispatches based on Shape type; for sphere, it will use ``Bo1_Sphere_Aabb``, for facets ``Bo1_Facet_Aabb``.
 
 ``InteractionDispatchers`` hides 3 dispatchers, which all operate on interactions.
@@ -143,7 +143,7 @@
 
 
 Controlling the loop
-====================
+---------------------
 
 As explained above, the loop consists in running defined sequence of engines. Step number can be queried by ``O.iter`` and advancing by one step is done by ``O.step()``. Every step advances *virtual time* by current timestep, ``O.dt``:
 
@@ -171,13 +171,13 @@
 	>>> O.wait()
 	>>> O.iter
 	500000
-******************
+
 Input and output
-*****************
+=================
 Yade provides functions for creating, saving and loading simulations.
 
 Creating simulation
-===================
+--------------------
 To create simulation, one can either use a specialized class of type :ctype:`Generator` to create full scene, possibly receiving some parameters. Generators are written in c++ and their role is limited to well-defined scenarios. For instance, to create triaxial test scene:
 
 	>>> TriaxialTest(numberOfGrains=1000).load()
@@ -219,9 +219,6 @@
 suspended, e.g. when dynamically creating packing. ``O.switchWorld()``  toggles between the
 primary and secondary simulation.
 
-****************************
-Creating simulation
-****************************
 
 Yade python introduction (class instantiation)
 Mathematical formulation

=== modified file 'doc/sphinx/index.rst'
--- doc/sphinx/index.rst	2009-12-04 15:40:34 +0000
+++ doc/sphinx/index.rst	2009-12-04 21:56:59 +0000
@@ -15,19 +15,35 @@
 
   arch.rst
 
-.. automodule:: yade
+  modules.rst
+
+  yade.pack.rst
+
+.. .. automodule:: yade
   :members:
   :undoc-members:
 
-yade.pack
+yade.log
 ---------
-.. automodule:: yade.pack
-  :members:
-  :undoc-members:
-
-yade.utils
-----------
-.. automodule:: yade.utils
+.. automodule:: yade.log
+  :members:
+  :undoc-members:
+
+yade.timing
+-----------
+.. automodule:: yade.timing
+  :members:
+  :undoc-members:
+
+yade.post2d
+-----------
+.. automodule:: yade.post2d
+  :members:
+  :undoc-members:
+
+yade.plot
+-----------
+.. automodule:: yade.plot
   :members:
   :undoc-members:
 

=== modified file 'extra/SConscript'
--- extra/SConscript	2009-12-03 20:57:11 +0000
+++ extra/SConscript	2009-12-04 21:56:59 +0000
@@ -11,20 +11,5 @@
 
 
 
-if 'cgal' in env['features']:
-	# TesselationWrapper is library compiled here, but is required by MicroMacroAnalyser in pkg/dem.
-	# Because there is no way to compile non-plugin library in pkg/, it is compiled here and
-	# YADE_LINK_EXTRA_LIB is used in MicroMacroAnalyser.cpp to declare the dependency.
-	#
-	# It also means however, that if you have exclude='extra', then TesselationWrapper will not be built
-	# and linking of microMacroAnalyser will fail. Keep that in mind.
-	#
-	# Best place for TesselationWrapper would in lib/, same as e.g. lib/import/ which contains routines
-	# for STL import used by the importer.
-	#
-	env.Install('$PREFIX/lib/yade$SUFFIX/extra',[
-		env.SharedLibrary('TesselationWrapper',env.Combine('TesselationWrapperAll.cpp',Split('triangulation/KinematicLocalisationAnalyser.cpp triangulation/Operations.cpp triangulation/RegularTriangulation.cpp triangulation/stdafx.cpp triangulation/Tenseur3.cpp triangulation/Tesselation.cpp triangulation/TesselationWrapper.cpp triangulation/test.cpp triangulation/TriaxialState.cpp'))),
-	])
-
 
 

=== modified file 'gui/SConscript'
--- gui/SConscript	2009-12-03 20:57:11 +0000
+++ gui/SConscript	2009-12-04 21:56:59 +0000
@@ -52,7 +52,6 @@
 env.Install('$PREFIX/lib/yade$SUFFIX/py/yade',[
 	env.File('runtime.py','py'),
 	env.File('ipython.py','py'),
-	env.File('PythonTCPServer.py','py'),
 ])
 
 

=== modified file 'gui/py/ipython.py'
--- gui/py/ipython.py	2009-12-03 20:57:11 +0000
+++ gui/py/ipython.py	2009-12-04 21:56:59 +0000
@@ -6,7 +6,12 @@
 #
 """Yade-specific command-line completion hooks for in ipython (experimental)"""
 
+#try:
+#	import yade.qt
+#except ImportError: pass
+
 def yade_completers(self, event):
+	import sys
 	# this should parse the incomplete line and return only the object that pertains to this ['
 	# it will work fine in cases like b['clum<TAB> if b is a Body, but not in b['id']+b2['id
 	objName=event.line.split('[')[0]
@@ -14,10 +19,16 @@
 	obj=eval(objName)
 	# print str(type(obj))
 	if 'yade.wrapper.' in str(type(obj)):
-		return obj.keys()
+		return obj.keys()+['hovno']
+def empty_completer(self,event):
+	print 'Empty completer!'
+	if event.line=='': # and 'yade.qt' in dir():
+		yade.qt.Controller()
+		return '@@@'
+	return ['foo','bar','baz']
+
 import IPython.ipapi
 ip=IPython.ipapi.get()
-ip.set_hook('complete_command',yade_completers,re_key='.*\\b[a-zA-Z0-9_]+\[["\'][^"\'\]]*$')
 
 o=ip.options
 # from http://www.cv.nrao.edu/~rreid/casa/tips/ipy_user_conf.py
@@ -25,5 +36,8 @@
 # from ipython manpage
 o.prompt_in1="Yade [\#]: "
 o.prompt_in2="Yade ..\D. "
-o.prompt_out="Yade [\#]: "
+o.prompt_out=" ->  [\#]: "
 #ip.options.profile='yade'
+
+#ip.set_hook('complete_command',empty_completer,re_key=' ')
+ip.set_hook('complete_command',yade_completers,re_key='.*\\b[a-zA-Z0-9_]+\[["\'][^"\'\]]*$')

=== modified file 'gui/qt3/GLViewer.cpp'
--- gui/qt3/GLViewer.cpp	2009-12-01 14:56:39 +0000
+++ gui/qt3/GLViewer.cpp	2009-12-04 21:56:59 +0000
@@ -145,6 +145,10 @@
 	manipulatedFrame()->setConstraint(c);
 }
 
+bool GLViewer::isManipulating(){
+	return isMoving || manipulatedClipPlane>=0;
+}
+
 void GLViewer::resetManipulation(){
 	mouseMovesCamera();
 	setSelectedName(-1);
@@ -213,7 +217,11 @@
 
 	if(false){}
 	/* special keys: Escape and Space */
-	else if(e->key()==Qt::Key_Escape){ resetManipulation(); displayMessage("Manipulating scene."); }
+	//else if(e->key()==Qt::Key_F9 || e->key()==Qt::Key_F10 || e->key()==Qt::Key_F11 || e->key()==Qt::Key_F12){ YadeQtMainWindow::self->closeView(this); }
+	else if(e->key()==Qt::Key_Escape){
+		if(!isManipulating()){ /* CRASH, deleting this: YadeQtMainWindow::self->closeView(this); */ return; }
+		else { resetManipulation(); displayMessage("Manipulating scene."); }
+	}
 	else if(e->key()==Qt::Key_Space){
 		if(manipulatedClipPlane>=0) {displayMessage("Clip plane #"+lexical_cast<string>(manipulatedClipPlane+1)+(renderer->clipPlaneActive[manipulatedClipPlane]?" de":" ")+"activated"); renderer->clipPlaneActive[manipulatedClipPlane]=!renderer->clipPlaneActive[manipulatedClipPlane]; }
 	}

=== modified file 'gui/qt3/GLViewer.hpp'
--- gui/qt3/GLViewer.hpp	2009-12-01 14:56:39 +0000
+++ gui/qt3/GLViewer.hpp	2009-12-04 21:56:59 +0000
@@ -70,6 +70,7 @@
 		void mouseMovesCamera();
 		void mouseMovesManipulatedFrame(qglviewer::Constraint* c=NULL);
 		void resetManipulation();
+		bool isManipulating();
 		void startClipPlaneManipulation(int planeNo);
 		//! get QGLViewer state as string (XML); QGLViewer normally only supports saving state to file.
 		string getState();

=== modified file 'gui/qt3/SimulationController.cpp'
--- gui/qt3/SimulationController.cpp	2009-12-01 14:56:39 +0000
+++ gui/qt3/SimulationController.cpp	2009-12-04 21:56:59 +0000
@@ -94,8 +94,6 @@
 	// run timer ANY TIME (simulation may be started asynchronously)
 	updateTimerId=startTimer(refreshTime);
 
-	pyOneliner->setEnabled(false);
-	pyOneliner->setText("Yade compiled without Python");
 }
 
 /* restart timer with SimulationController::refreshTime */
@@ -520,3 +518,25 @@
 	exponent=floor(log10(dt));
 	mantissa=((int)(.1+dt/(pow((float)10,exponent)))); // .1: rounding issues
 }
+
+void SimulationController::keyPressEvent(QKeyEvent *event){
+	switch(event->key()){
+		case Qt::Key_Escape:
+		case Qt::Key_F1:
+		case Qt::Key_F2:
+		case Qt::Key_F3:
+		case Qt::Key_F4:
+		case Qt::Key_F5:
+		case Qt::Key_F6:
+		case Qt::Key_F7:
+		case Qt::Key_F8:
+		case Qt::Key_F9:
+		case Qt::Key_F10:
+		case Qt::Key_F11:
+		case Qt::Key_F12:
+			YadeQtMainWindow::self->closeController(); break;
+		default:
+			QtGeneratedSimulationController::keyPressEvent(event);
+	}
+}
+

=== modified file 'gui/qt3/SimulationController.hpp'
--- gui/qt3/SimulationController.hpp	2009-11-15 15:32:01 +0000
+++ gui/qt3/SimulationController.hpp	2009-12-04 21:56:59 +0000
@@ -85,7 +85,7 @@
 		virtual void pbGenerate_clicked();
 		virtual void pyOnelinerEnter();
 
-
+		void keyPressEvent(QKeyEvent *event);
 
         
         protected :

=== modified file 'lib/SConscript'
--- lib/SConscript	2009-11-29 11:03:25 +0000
+++ lib/SConscript	2009-12-04 21:56:59 +0000
@@ -52,13 +52,19 @@
 	)
 	yadeStaticOrSharedLib('yade-opengl',env.Combine('yade-opengl.cpp',['opengl/FpsTracker.cpp','opengl/GLTextLabel.cpp','opengl/GLWindow.cpp','opengl/GLWindowsManager.cpp','opengl/GLUtils.cpp']),LIBS=env['LIBS']+['glut','GL','$QGLVIEWER_LIB']),
 #env.Install('$PREFIX/lib/yade$SUFFIX/lib',env.StaticLibrary
-yadeStaticOrSharedLib('yade-support',env.Combine('yade-support.cpp',[
-	'base/yadeWm3Extra.cpp',
-	'computational-geometry/Distances2D.cpp','computational-geometry/Distances3D.cpp','computational-geometry/Intersections2D.cpp','computational-geometry/Intersections3D.cpp','computational-geometry/MarchingCube.cpp',
-	'factory/ClassFactory.cpp','serialization/SerializableSingleton.cpp','factory/DynLibManager.cpp','factory/FactoryExceptions.cpp',
-	'multimethods/Indexable.cpp','multimethods/MultiMethodsExceptions.cpp',
-	'serialization-xml/XMLFormatManager.cpp','serialization-xml/XMLSaxParser.cpp','serialization/Archive.cpp',
-	'serialization/IOFormatManager.cpp','serialization/IOManagerExceptions.cpp','serialization/FormatChecker.cpp','serialization/Serializable.cpp','serialization/SerializationExceptions.cpp']),LIBS=['dl'],CXXFLAGS=env['CXXFLAGS']+['-fPIC'])
+yadeStaticOrSharedLib('yade-support',[
+	env.Combine('yade-support.cpp',[
+			'base/yadeWm3Extra.cpp',
+			'computational-geometry/Distances2D.cpp','computational-geometry/Distances3D.cpp','computational-geometry/Intersections2D.cpp','computational-geometry/Intersections3D.cpp','computational-geometry/MarchingCube.cpp',
+			'factory/ClassFactory.cpp','serialization/SerializableSingleton.cpp','factory/DynLibManager.cpp','factory/FactoryExceptions.cpp',
+			'multimethods/Indexable.cpp','multimethods/MultiMethodsExceptions.cpp',
+			'serialization-xml/XMLFormatManager.cpp','serialization-xml/XMLSaxParser.cpp','serialization/Archive.cpp','serialization/IOFormatManager.cpp','serialization/IOManagerExceptions.cpp',
+			'serialization/FormatChecker.cpp','serialization/Serializable.cpp','serialization/SerializationExceptions.cpp',
+		]
+		# compile TesselationWrapper only if cgal is enabled
+		+(Split('triangulation/KinematicLocalisationAnalyser.cpp triangulation/Operations.cpp triangulation/RegularTriangulation.cpp triangulation/stdafx.cpp triangulation/Tenseur3.cpp triangulation/Tesselation.cpp triangulation/TesselationWrapper.cpp triangulation/test.cpp triangulation/TriaxialState.cpp') if 'cgal' in env['features'] else []))
+	],LIBS=['dl'],CXXFLAGS=env['CXXFLAGS']+['-fPIC']
+)
 #)
 #######################
 ###### 3rd party libs

=== modified file 'lib/serialization-qt/QtGUIGenerator.cpp'
--- lib/serialization-qt/QtGUIGenerator.cpp	2009-07-17 20:50:55 +0000
+++ lib/serialization-qt/QtGUIGenerator.cpp	2009-12-04 21:56:59 +0000
@@ -173,18 +173,17 @@
 		}
 		else
 		{
-			std::cerr << "INFO: sanitize failed: " << a << " != " << b << "\n";
+			// std::cerr << "INFO: sanitize failed: " << a << " != " << b << "\n";
 			return num; // return original numer, since they are different
 		}
 	}
 	catch(std::bad_cast&)
 	{
-		std::cerr << "INFO: sanitize failed: " << ret << " != " << num << "\n";
+		// std::cerr << "INFO: sanitize failed: " << ret << " != " << num << "\n";
 		return num; // oops, the number got corrupted somehow
 	}
 };
 
-
 void QtGUIGenerator::buildGUI(shared_ptr<Serializable> s,  QWidget * widget)
 {
 

=== renamed directory 'extra/triangulation' => 'lib/triangulation'
=== modified file 'pkg/common/Engine/StandAloneEngine/PersistentTriangulationCollider.cpp'
--- pkg/common/Engine/StandAloneEngine/PersistentTriangulationCollider.cpp	2009-12-03 09:15:32 +0000
+++ pkg/common/Engine/StandAloneEngine/PersistentTriangulationCollider.cpp	2009-12-04 21:56:59 +0000
@@ -14,7 +14,7 @@
 #include<vector>
 #include<yade/pkg-common/InteractingSphere.hpp>
 #include<yade/pkg-common/ElasticMat.hpp>
-#include<yade/extra/TesselationWrapper.h>
+#include<yade/lib-triangulation/TesselationWrapper.h>
 
 YADE_REQUIRE_FEATURE(CGAL)
 

=== modified file 'pkg/dem/Engine/StandAloneEngine/MicroMacroAnalyser.cpp'
--- pkg/dem/Engine/StandAloneEngine/MicroMacroAnalyser.cpp	2009-12-03 20:57:11 +0000
+++ pkg/dem/Engine/StandAloneEngine/MicroMacroAnalyser.cpp	2009-12-04 21:56:59 +0000
@@ -19,15 +19,12 @@
 
 #include "MicroMacroAnalyser.hpp"
 
-#include<yade/extra/TesselationWrapper.h>
-#include<yade/extra/KinematicLocalisationAnalyser.hpp>
-#include<yade/extra/TriaxialState.h>
+#include<yade/lib-triangulation/TesselationWrapper.h>
+#include<yade/lib-triangulation/KinematicLocalisationAnalyser.hpp>
+#include<yade/lib-triangulation/TriaxialState.h>
 
 YADE_PLUGIN((MicroMacroAnalyser));
 YADE_REQUIRE_FEATURE(CGAL)
-// see comment in extra/SConscript
-YADE_LINK_EXTRA_LIB(TesselationWrapper)
-
 
 CREATE_LOGGER(MicroMacroAnalyser);
 

=== modified file 'py/SConscript'
--- py/SConscript	2009-12-04 15:40:34 +0000
+++ py/SConscript	2009-12-04 21:56:59 +0000
@@ -29,6 +29,7 @@
 	env.File('linterpolation.py'),
 	env.File('timing.py'),
 	env.File('pack.py'),
+	env.File('remote.py'),
 	env.File('system.py'),
 	env.File('export.py'),
 	env.File('post2d.py'),

=== modified file 'py/__init__.py.in'
--- py/__init__.py.in	2009-12-04 04:53:02 +0000
+++ py/__init__.py.in	2009-12-04 21:56:59 +0000
@@ -60,5 +60,7 @@
 import miniWm3Wrap,wrapper
 from miniWm3Wrap import *
 from wrapper import *
-__all__+=dir(miniWm3Wrap)+dir(wrapper)
+# import a few "important" modules along with *
+import utils # some others?
+__all__+=['utils',]+dir(miniWm3Wrap)+dir(wrapper)
 

=== modified file 'py/config.py.in'
--- py/config.py.in	2009-12-03 20:57:11 +0000
+++ py/config.py.in	2009-12-04 21:56:59 +0000
@@ -10,6 +10,6 @@
 features='${features}'.split(',')
 revision='${realVersion}'
 version='${version}'
-debug='${debug}'
+debug=bool(${debug})
 
 libDir=prefix+'/lib/yade'+suffix

=== renamed file 'gui/py/PythonTCPServer.py' => 'py/remote.py'
=== modified file 'py/system.py'
--- py/system.py	2009-12-04 04:53:02 +0000
+++ py/system.py	2009-12-04 21:56:59 +0000
@@ -106,9 +106,9 @@
 	at runtime. Each connection receives pickled dictionary with those values.
 	This socket is primarily used by yade-multi batch scheduler.
 	"""
-	import yade.PythonTCPServer
-	srv=yade.PythonTCPServer.GenericTCPServer(handler=yade.PythonTCPServer.PythonConsoleSocketEmulator,title='TCP python prompt',cookie=True,minPort=9000)
+	import yade.remote
+	srv=yade.remote.GenericTCPServer(handler=yade.remote.PythonConsoleSocketEmulator,title='TCP python prompt',cookie=True,minPort=9000)
 	yade.runtime.cookie=srv.server.cookie
-	info=yade.PythonTCPServer.GenericTCPServer(handler=yade.PythonTCPServer.InfoSocketProvider,title='TCP info provider',cookie=False,minPort=21000)
+	info=yade.remote.GenericTCPServer(handler=yade.remote.InfoSocketProvider,title='TCP info provider',cookie=False,minPort=21000)
 	sys.stdout.flush()
 

=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp	2009-12-04 15:40:34 +0000
+++ py/yadeWrapper/yadeWrapper.cpp	2009-12-04 21:56:59 +0000
@@ -150,7 +150,8 @@
 		else return (*proxee)[id];
 	}
 	body_id_t append(shared_ptr<Body> b){
-		if(b->getId()>=0){ PyErr_SetString(PyExc_IndexError,("Body aleady has id "+lexical_cast<string>(b->getId())+"set; appending such body is not allowed.").c_str()); return proxee->insert(b); }
+		if(b->getId()>=0){ PyErr_SetString(PyExc_IndexError,("Body aleady has id "+lexical_cast<string>(b->getId())+"set; appending such body is not allowed.").c_str()); python::throw_error_already_set(); }
+		return proxee->insert(b);
 	}
 	vector<body_id_t> appendList(vector<shared_ptr<Body> > bb){
 		/* prevent crash when adding lots of bodies (not clear why it happens exactly, bt is like this:


Follow ups