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) – half 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 one 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, radiusTopInner=-1, radiusBottomInner=-1, **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
radiusTopInner (float) – inner radius of cones top, -1 by default
radiusBottomInner (float) – inner radius of cones bottom, -1 by default
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 one 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, radiusTopInner=-1, radiusBottomInner=-1, **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
radiusTopInner (float) – inner radius of cylinders top, -1 by default
radiusBottomInner (float) – inner radius of cylinders bottom, -1 by default
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 one 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, radiusTopInner=-1, radiusBottomInner=-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.
- Parameters:
radiusTop (float) – top radius
radiusBottom (float) – bottom radius
**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.facetParallelepiped(center, extents, height, orientation=Quaternion((1, 0, 0), 0), wallMask=63, **kw)[source]¶
Create arbitrarily-aligned Parallelepiped composed of facets, with given center, extents, height and orientation. If any of the parallelepiped dimensions is zero, corresponding facets will not be created. The facets are oriented outwards from the parallelepiped.
- Parameters:
center (Vector3) – center of the parallelepiped
extents (Vector3) – half lengths of the parallelepiped sides
height (Real) – height of the parallelepiped (along axis z)
orientation (Quaternion) – orientation of the parallelepiped
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 parallelepiped
- 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 one 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.
- yade.geom.facetSphere(center, radius, thetaResolution=8, phiResolution=8, returnElementMap=False, **kw)[source]¶
Create arbitrarily-aligned sphere composed of facets, with given center, radius and orientation. Return List of facets forming the sphere. Parameters inspired by ParaView sphere glyph
- Parameters:
center (Vector3) – center of the created sphere
radius (float) – sphere radius
thetaResolution (int) – number of facets around “equator”
phiResolution (int) – number of facets between “poles” + 1
returnElementMap (bool) – returns also tuple of nodes ((x1,y1,z1),(x2,y2,z2),…) and elements ((id01,id02,id03),(id11,id12,id13),…) if true, only facets otherwise
**kw – (unused keyword arguments) passed to utils.facet;