yade.geom module

Creates geometry objects from facets.

yade.geom.facetBox(center, extents, orientation=Quaternion((1, 0, 0), 0), wallMask=63, **kw)[source]

Create arbitrarily-aligned box composed of facets, with given center, extents and orientation. If any of the box dimensions is zero, corresponding facets will not be created. The facets are oriented outwards from the box.

Parameters:
  • center (Vector3) – center of the box
  • extents (Vector3) – lengths of the box sides
  • orientation (Quaternion) – orientation of the box
  • wallMask (bitmask) – determines which walls will be created, in the order -x (1), +x (2), -y (4), +y (8), -z (16), +z (32). The numbers are ANDed; the default 63 means to create all walls
  • **kw

    (unused keyword arguments) passed to utils.facet

Returns:

list of facets forming the box

yade.geom.facetBunker(center, dBunker, dOutput, hBunker, hOutput, hPipe=0.0, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, wallMask=4, angleRange=None, closeGap=False, **kw)[source]

Create arbitrarily-aligned bunker, composed of facets, with given center, radii, heights and orientation. Return List of facets forming the bunker;

   dBunker
______________
|            |
|            |
|            | hBunker
|            |
|            |
|            |
|____________|
\            /
 \          /
  \        /   hOutput
   \      /
    \____/
    |    |
    |____|     hPipe
    dOutput
Parameters:
  • center (Vector3) – center of the created bunker
  • dBunker (float) – bunker diameter, top
  • dOutput (float) – bunker output diameter
  • hBunker (float) – bunker height
  • hOutput (float) – bunker output height
  • hPipe (float) – bunker pipe height
  • orientation (Quaternion) – orientation of the bunker; the reference orientation has axis along the +x axis.
  • segmentsNumber (int) – number of edges on the bunker surface (>=5)
  • wallMask (bitmask) – determines which walls will be created, in the order up (1), down (2), side (4). The numbers are ANDed; the default 7 means to create all walls
  • angleRange ((θmin,Θmax)) – allows to create only part of bunker by specifying range of angles; if None, (0,2*pi) is assumed.
  • closeGap (bool) – close range skipped in angleRange with triangular facets at cylinder bases.
  • **kw

    (unused keyword arguments) passed to utils.facet;

yade.geom.facetCone(center, radiusTop, radiusBottom, height, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, wallMask=7, angleRange=None, closeGap=False, **kw)[source]

Create arbitrarily-aligned cone composed of facets, with given center, radius, height and orientation. Return List of facets forming the cone;

Parameters:
  • center (Vector3) – center of the created cylinder
  • radiusTop (float) – cone top radius
  • radiusBottom (float) – cone bottom radius
  • height (float) – cone height
  • orientation (Quaternion) – orientation of the cone; the reference orientation has axis along the +x axis.
  • segmentsNumber (int) – number of edges on the cone surface (>=5)
  • wallMask (bitmask) – determines which walls will be created, in the order up (1), down (2), side (4). The numbers are ANDed; the default 7 means to create all walls
  • angleRange ((θmin,Θmax)) – allows to create only part of cone by specifying range of angles; if None, (0,2*pi) is assumed.
  • closeGap (bool) – close range skipped in angleRange with triangular facets at cylinder bases.
  • **kw

    (unused keyword arguments) passed to utils.facet;

yade.geom.facetCylinder(center, radius, height, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, wallMask=7, angleRange=None, closeGap=False, **kw)[source]

Create arbitrarily-aligned cylinder composed of facets, with given center, radius, height and orientation. Return List of facets forming the cylinder;

Parameters:
  • center (Vector3) – center of the created cylinder
  • radius (float) – cylinder radius
  • height (float) – cylinder height
  • orientation (Quaternion) – orientation of the cylinder; the reference orientation has axis along the +x axis.
  • segmentsNumber (int) – number of edges on the cylinder surface (>=5)
  • wallMask (bitmask) – determines which walls will be created, in the order up (1), down (2), side (4). The numbers are ANDed; the default 7 means to create all walls
  • angleRange ((θmin,Θmax)) – allows to create only part of bunker by specifying range of angles; if None, (0,2*pi) is assumed.
  • closeGap (bool) – close range skipped in angleRange with triangular facets at cylinder bases.
  • **kw

    (unused keyword arguments) passed to utils.facet;

yade.geom.facetCylinderConeGenerator(center, radiusTop, height, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, wallMask=7, angleRange=None, closeGap=False, radiusBottom=-1, **kw)[source]

Please, do not use this function directly! Use geom.facetCylinder and geom.facetCone instead. This is the base function for generating cylinders and cones from facets. :param float radiusTop: top radius :param float radiusBottom: bottom radius :param **kw: (unused keyword arguments) passed to utils.facet;

yade.geom.facetHelix(center, radiusOuter, pitch, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, angleRange=None, radiusInner=0, **kw)[source]

Create arbitrarily-aligned helix composed of facets, with given center, radius (outer and inner), pitch and orientation. Return List of facets forming the helix;

Parameters:
  • center (Vector3) – center of the created cylinder
  • radiusOuter (float) – outer radius
  • radiusInner (float) – inner height (can be 0)
  • orientation (Quaternion) – orientation of the helix; the reference orientation has axis along the +x axis.
  • segmentsNumber (int) – number of edges on the helix surface (>=3)
  • angleRange ((θmin,Θmax)) – range of angles; if None, (0,2*pi) is assumed.
  • **kw

    (unused keyword arguments) passed to utils.facet;

yade.geom.facetPolygon(center, radiusOuter, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, angleRange=None, radiusInner=0, **kw)[source]

Create arbitrarily-aligned polygon composed of facets, with given center, radius (outer and inner) and orientation. Return List of facets forming the polygon;

Parameters:
  • center (Vector3) – center of the created cylinder
  • radiusOuter (float) – outer radius
  • radiusInner (float) – inner height (can be 0)
  • orientation (Quaternion) – orientation of the polygon; the reference orientation has axis along the +x axis.
  • segmentsNumber (int) – number of edges on the polygon surface (>=3)
  • angleRange ((θmin,Θmax)) – allows to create only part of polygon by specifying range of angles; if None, (0,2*pi) is assumed.
  • **kw

    (unused keyword arguments) passed to utils.facet;

yade.geom.facetPolygonHelixGenerator(center, radiusOuter, pitch=0, orientation=Quaternion((1, 0, 0), 0), segmentsNumber=10, angleRange=None, radiusInner=0, **kw)[source]

Please, do not use this function directly! Use geom.facetPloygon and geom.facetHelix instead. This is the base function for generating polygons and helixes from facets.

Previous topic

yade.export module

Next topic

yade.linterpolation module

This Page