Hi, please, see an example ./examples/regular-sphere-pack/regular-sphere-pack.py
There you can find enough examples with diferent packing ways. Anton On Fri, Nov 19, 2010 at 1:40 AM, Klaus Thoeni <[email protected]>wrote: > Hi Václav! > > > > pack.inAlignedBox just works for a box which is aligned to the > coordinate > > > system. Is there a way to get an arbitrary aligned box (e.g. by > > > transforming the aligned box)? > > > > If you need the sphere packing, you can transform it with > > > https://www.yade-dem.org/sphinx/yade.pack.html#yade._packSpheres.SpherePack > > .rotate . Let me know if that is not enough for your purposes. > > Well, use pack.regularHexa(...) with pack.inAlignedBox. Is there a way to > create such packings with pack.SpherePack()? Or how can I convert it in a > SpherePack()? I tried to pass the regularHexa packing to the SpherePack, > dosen't work. If this is going to work somehow it would be enough for my > purposes. > > Example: > pred=pack.inAlignedBox((10.,0.,0.),(20,20,1.5)) > hexapack = pack.regularHexa(pred,radius=0.5,gap=0.0,color=(0,1,0)) > #O.bodies.append(hexapack) > sp=pack.SpherePack(hexapack) # not working, what should I use? > sp.rotate((0,1,0),-pi/4) > O.bodies.append([utils.sphere(c,r) for c,r in sp]) > > > The reason I did not create general box orientation is that checking > > whether particle is inside or outside is more complicated; but now I > > have the idea that it could be actually done by keeping corners and box > > transformation in the predicate, then transforming points to be checked, > > rather than checking points against true (non-aligned) boundaries. > > Hm, I am a newbie and I still have to understand the difference between the > two > packing options. By the way, what's the difference? Can't you just use > predicates? > > > > Is there a way to generate particles on a plane (e.g. gts-surface)? > > > > Probably not directly (though you could create a thin volume for > > instance). Can you be more specific as to what usage you have in mind? > > Thin volume works fine. > > Thanks > > Klaus > > > _______________________________________________ > Mailing list: > https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > Post to : [email protected] > 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 Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

