← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2946: Add forgotten format to ymport.textExt

 

------------------------------------------------------------
revno: 2946
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Fri 2011-10-28 09:21:21 +0200
message:
  Add forgotten format to ymport.textExt
modified:
  py/ymport.py


--
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 'py/ymport.py'
--- py/ymport.py	2011-08-30 18:52:11 +0000
+++ py/ymport.py	2011-10-28 07:21:21 +0000
@@ -36,10 +36,13 @@
 		if (format=='x_y_z_r'):
 			pos = Vector3(float(data[0]),float(data[1]),float(data[2]))
 			ret.append(utils.sphere(shift+scale*pos,scale*float(data[3]),**kw))
-			
 		elif (format=='x_y_z_r_matId'):
 			pos = Vector3(float(data[0]),float(data[1]),float(data[2]))
 			ret.append(utils.sphere(shift+scale*pos,scale*float(data[3]),material=int(data[4]),**kw))
+		
+		elif (format=='id_x_y_z_r_matId'):
+			pos = Vector3(float(data[1]),float(data[2]),float(data[3]))
+			ret.append(utils.sphere(shift+scale*pos,scale*float(data[4]),material=int(data[5]),**kw))
 			
 		else:
 			raise RuntimeError("Please, specify a correct format output!");