Index: ../trunk-jpl/src/m/mesh/bamg.py
===================================================================
--- ../trunk-jpl/src/m/mesh/bamg.py	(revision 13492)
+++ ../trunk-jpl/src/m/mesh/bamg.py	(revision 13493)
@@ -267,10 +267,10 @@
 		pass
 	#}}}
 	# Bamg Mesh parameters {{{
-	if options.exist('domain') and md.mesh.numberofvertices and md.mesh.dimension==2:
+	if not options.exist('domain') and md.mesh.numberofvertices and md.mesh.dimension==2:
 
 		if isinstance(md.private.bamg,dict) and 'mesh' in md.private.bamg:
-			bamg_mesh=bamgmesh(md.private.bamg['mesh'])
+			bamg_mesh=bamgmesh(md.private.bamg['mesh'].__dict__)
 		else:
 			bamg_mesh.Vertices=numpy.hstack((md.mesh.x.reshape(-1,1),md.mesh.y.reshape(-1,1),numpy.ones((md.mesh.numberofvertices,1))))
 			bamg_mesh.Triangles=numpy.hstack((md.mesh.elements,numpy.ones((md.mesh.numberofelements,1))))
