yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02539
Re: help in writing a script
Hmm, I have never seen that page with cylinder packing. Thanks!
By the way:
for n in range(nPoly):
phi1,phi2=n*phiStep,(n+1)*phiStep
def pt(angle,radius,z):
return radius*sin(angle),radius*cos(angle),z
a,b,c,d=pt(phi1,rCyl,0),pt(phi2,rCyl,0),pt(phi1,rCyl,hCyl),pt(phi2,rCyl,hCyl)
o.bodies.append([
utils.facet([a,b,c]),
utils.facet([b,c,d])])
These strings can be now changed by utils.facetCylinder(). That should be
easier.
______________________________
Anton Gladkyy
2010/3/10 nejib hadda <nejib.hadda@xxxxxxxxxxx>
> Hi,
>
> These python scripts may help you to start with :
>
> https://yade-dem.org/index.php/SimpleScenePython
>
> and https://yade-dem.org/index.php/ScriptGenerateCylindricalPacking
>
>
>
>
>
> Le mercredi 10 mars 2010 à 16:53 +0330, Nasibeh Moradi a écrit :
> > Hi,
> >
> > 1- when I run a example from a script, the 3d view is black but when I
> > choose 2 window of view (primary view and secondary view) the model
> > is shown!!
> > also when run script regular-sphere-pack.py there is a error:
> >
> > Running
> > script /home/moradi/YADE-trunk/trunk/scripts/test/regular-sphere-pack.py
> > Traceback (most recent call last):
> > File "./yade-bzr2073", line 106, in <module>
> > execfile(args[0])
> > File
> > "/home/moradi/YADE-trunk/trunk/scripts/test/regular-sphere-pack.py",
> > line 64, in <module>
> >
> >
> O.bodies.append(ymport.gmsh('regular-sphere-pack.mesh',**kwMeshes))#generates
> facets from the mesh file
> > File
> > "/home/moradi/YADE-trunk/YADE/lib/yade-bzr2073/py/yade/ymport.py",
> > line 51, in gmsh
> > infile = open(meshfile,"r")
> > IOError: [Errno 2] No such file or directory:
> > 'regular-sphere-pack.mesh'
> >
> > 2- I want creat a plate of glass(from sphere), and a ball that contact
> > with glass at high speed.
> > how can I do it?
> > really, I want a script that help me in writing my script.
> >
> > thank you
> > Nasibeh
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> > Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> > More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References