← Back to team overview

yade-users team mailing list archive

Re: [Question #688818]: Rototraslation of a cylinder

 

Question #688818 on Yade changed:
https://answers.launchpad.net/yade/+question/688818

    Status: Needs information => Open

Paolo gave more information on the question:
Let's suppose to define the second roller "rullo1" after deleting the
previous one "rullo" as follows. After the deleting, the simulation
generates 2 rollers in the position(0,0,0): one remains fixed and the
other one moves correctly. I don't know why it generates 2 rollers.

def updateRoller():
	transEngine.velocity = vel
	rotEngine.angularVelocity = angVel
	rotEngine.zeroPoint += Vector3(0,1,0)*vel*O.dt
	if rotEngine.zeroPoint[1]>l3-r:
		for t in range(min(idsr),max(idsr)+1):
			rotEngine.zeroPoint *= 0
			transEngine.velocity = 0
			rotEngine.angularVelocity = 0
			O.bodies.erase(t)   
			rullo1 = geom.facetCylinder((0,0,0),radius=r,height=d,orientation=Quaternion((0,1,0),pi/2),wallMask=7,segmentsNumber=50,material=Mat1)
			O.bodies.append(rullo1)
                        global idsr1
			idsr1 = [r2.id for r2 in rullo1]
			checker.command='step2()'

def step2():
	combEngine.ids=idsr1
	transEngine.velocity = vel	
	rotEngine.angularVelocity = angVel	
	rotEngine.zeroPoint += Vector3(0,1,0)*vel*O.dt

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.