← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3962: let ymport.textClumps() return all ids from members and clumps

 

------------------------------------------------------------
revno: 3962
committer: Christian Jakob <jakob@xxxxxxxxxxxxxxxxxxx>
timestamp: Fri 2014-05-16 18:33:34 +0200
message:
  let ymport.textClumps() return all ids from members and clumps
modified:
  py/ymport.py


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'py/ymport.py'
--- py/ymport.py	2014-05-15 15:13:51 +0000
+++ py/ymport.py	2014-05-16 16:33:34 +0000
@@ -52,7 +52,7 @@
 	"""Load clumps-members from file, insert them to the simulation.
 	
 	:param str filename: file name
-	:param str format: the name of output format. Supported `x_y_z_r`(default), `x_y_z_r_matId`
+	:param str format: the name of output format. Supported `x_y_z_r`(default), `x_y_z_r_clumpId`
 	:param [float,float,float] shift: [X,Y,Z] parameter moves the specimen.
 	:param float scale: factor scales the given data.
 	:param \*\*kw: (unused keyword arguments) is passed to :yref:`yade.utils.sphere`
@@ -78,12 +78,12 @@
 			newClumpId = int(data[4])
 		else:
 			newClumpId = int(data[4])
-			O.bodies.appendClumped(curClump,discretization=discretization)
+			ret.append(O.bodies.appendClumped(curClump,discretization=discretization))
 			curClump=[]
 			idD = curClump.append(utils.sphere(shift+scale*pos,scale*float(data[3]),**kw))
 	
 	if (len(curClump)<>0):
-		ret = O.bodies.appendClumped(curClump,discretization=discretization)
+		ret.append(O.bodies.appendClumped(curClump,discretization=discretization))
 	return ret
 
 def text(fileName,shift=Vector3.Zero,scale=1.0,**kw):