yade.polyhedra_utils module

Auxiliary functions for polyhedra

yade.polyhedra_utils.fillBox(mincoord, maxcoord, material, sizemin=[1, 1, 1], sizemax=[1, 1, 1], ratio=[0, 0, 0], seed=None, mask=1)[source]

fill box [mincoord, maxcoord] by non-overlaping polyhedrons with random geometry and sizes within the range (uniformly distributed) :param Vector3 mincoord: first corner :param Vector3 maxcoord: second corner :param Vector3 sizemin: minimal size of bodies :param Vector3 sizemax: maximal size of bodies :param Vector3 ratio: scaling ratio :param float seed: random seed

yade.polyhedra_utils.fillBoxByBalls(mincoord, maxcoord, material, sizemin=[1, 1, 1], sizemax=[1, 1, 1], ratio=[0, 0, 0], seed=None, mask=1, numpoints=60)[source]
yade.polyhedra_utils.polyhedra(material, size=Vector3(1, 1, 1), seed=None, v=[], mask=1, fixed=False, color=[-1, -1, -1])[source]

create polyhedra, one can specify vertices directly, or leave it empty for random shape.

Parameters:
  • material (Material) – material of new body

  • size (Vector3) – size of new body (see Polyhedra docs)

  • seed (float) – seed for random operations

  • v ([Vector3]) – list of body vertices (see Polyhedra docs)

yade.polyhedra_utils.polyhedraSnubCube(radius, material, centre, mask=1)[source]
yade.polyhedra_utils.polyhedraTruncIcosaHed(radius, material, centre, mask=1)[source]
yade.polyhedra_utils.polyhedralBall(radius, N, material, center, mask=1)[source]

creates polyhedra having N vertices and resembling sphere

Parameters:
  • radius (float) – ball radius

  • N (int) – number of vertices

  • material (Material) – material of new body

  • center (Vector3) – center of the new body

yade._polyhedra_utils.MaxCoord((Shape)arg1, (State)arg2) Vector3

returns max coordinates

yade._polyhedra_utils.MinCoord((Shape)arg1, (State)arg2) Vector3

returns min coordinates

yade._polyhedra_utils.PrintPolyhedra((Shape)arg1) None

Print list of vertices sorted according to polyhedrons facets.

yade._polyhedra_utils.PrintPolyhedraActualPos((Shape)arg1, (State)arg2) None

Print list of vertices sorted according to polyhedrons facets.

yade._polyhedra_utils.SieveCurve() None

save sieve curve coordinates into file

yade._polyhedra_utils.SieveSize((Shape)arg1) float

returns approximate sieve size of polyhedron

yade._polyhedra_utils.SizeOfPolyhedra((Shape)arg1) Vector3

returns max, middle an min size in perpendicular directions

yade._polyhedra_utils.SizeRatio() None

save sizes of polyhedra into file

yade._polyhedra_utils.Split((Body)arg1, (Vector3)arg2, (Vector3)arg3) None

split polyhedron perpendicularly to given direction through given point

yade._polyhedra_utils.convexHull((object)arg1) bool

TODO

yade._polyhedra_utils.do_Polyhedras_Intersect((Shape)arg1, (Shape)arg2, (State)arg3, (State)arg4) bool

check polyhedras intersection

yade._polyhedra_utils.fillBoxByBalls_cpp((Vector3)arg1, (Vector3)arg2, (Vector3)arg3, (Vector3)arg4, (Vector3)arg5, (int)arg6, (Material)arg7, (int)arg8) object

Generate non-overlaping ‘spherical’ polyhedrons in box

yade._polyhedra_utils.fillBox_cpp((Vector3)arg1, (Vector3)arg2, (Vector3)arg3, (Vector3)arg4, (Vector3)arg5, (int)arg6, (Material)arg7) object

Generate non-overlaping polyhedrons in box