Hi, i wanted to create a particlecloud to handle a bunch of cylindrical 
objects in pychrono. However, when i setup the particlecloud then enable 
the collisions, it crashs immediately.

Here's the snippet :

# Particles cloud :
particles = chrono.ChParticleCloud()
particles.SetMass(simMat["ParticleMass"])
particles.SetInertiaXX(chrono.ChVector3d( simMat["ParticleInertia"],  
simMat["ParticleInertia"],  simMat["ParticleInertia"]))

# Collision shape/model :
colModel = chrono.ChCollisionModel()
colModel.Clear()
cylShape = chrono.ChCollisionShapeCylinder(material, .01, .002)
colModel.AddShape(cylShape)
particles.AddCollisionModel(colModel)
particles.AddCollisionShape(cylShape)

visShape = chrono.ChVisualShapeCylinder(.01, .002)
frame = chrono.ChFramed(chrono.ChVector3d(0,0,0), 
chrono.QuatFromAngleAxis(chrono.CH_PI/2, chrono.ChVector3d(1,0,0)))
particles.AddVisualShape(visShape, frame)

# addition loop :
for i in range(20):
    possys = chrono.ChCoordsysd(
        chrono.ChVector3d(random.uniform(-.3, .3), random.uniform(-.3, .3), 
0),
        chrono.QuatFromAngleAxis(-chrono.CH_PI/2, chrono.ChVector3d(1,0,0))
    )
    particles.AddParticle(possys)
#particles.EnableCollision(True)
system.Add(particles)

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/a2929f89-b15a-42f5-a807-c7e7d02ec0edn%40googlegroups.com.

Reply via email to