← Back to team overview

yade-users team mailing list archive

Re: Arbitrary aligned box or plane


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 

hexapack = pack.regularHexa(pred,radius=0.5,gap=0.0,color=(0,1,0))
sp=pack.SpherePack(hexapack) # not working, what should I use?
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 

> > 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.



Follow ups