yade.ymport module

Import geometry from various formats (‘import’ is python keyword, hence the name ‘ymport’).

yade.ymport.gengeo(mntable, shift=Vector3(0, 0, 0), scale=1.0, **kw)

Imports geometry from LSMGenGeo library and creates spheres.

Parameters :
mntable: mntable

object, which creates by LSMGenGeo library, see example

shift: [float,float,float]

[X,Y,Z] parameter moves the specimen.

scale: float

factor scales the given data.

**kw: (unused keyword arguments)

is passed to utils.sphere

LSMGenGeo library allows one to create pack of spheres with given [Rmin:Rmax] with null stress inside the specimen. Can be useful for Mining Rock simulation.

Example: examples/regular-sphere-pack/regular-sphere-pack.py, usage of LSMGenGeo library in scripts/test/genCylLSM.py.

yade.ymport.gengeoFile(fileName='file.geo', shift=Vector3(0, 0, 0), scale=1.0, orientation=Quaternion((1, 0, 0), 0), **kw)

Imports geometry from LSMGenGeo .geo file and creates spheres.

Parameters :
filename: string

file which has 4 colums [x, y, z, radius].

shift: Vector3

Vector3(X,Y,Z) parameter moves the specimen.

scale: float

factor scales the given data.

orientation: quaternion

orientation of the imported geometry

**kw: (unused keyword arguments)

is passed to utils.sphere

Returns :

list of spheres.

LSMGenGeo library allows one to create pack of spheres with given [Rmin:Rmax] with null stress inside the specimen. Can be useful for Mining Rock simulation.

Example: examples/regular-sphere-pack/regular-sphere-pack.py, usage of LSMGenGeo library in scripts/test/genCylLSM.py.

yade.ymport.gmsh(meshfile='file.mesh', shift=Vector3(0, 0, 0), scale=1.0, orientation=Quaternion((1, 0, 0), 0), **kw)

Imports geometry from mesh file and creates facets.

Parameters :
shift: [float,float,float]

[X,Y,Z] parameter moves the specimen.

scale: float

factor scales the given data.

orientation: quaternion

orientation of the imported mesh

**kw: (unused keyword arguments)

is passed to utils.facet

Returns :

list of facets forming the specimen.

mesh files can be easily created with GMSH. Example added to examples/regular-sphere-pack/regular-sphere-pack.py

Additional examples of mesh-files can be downloaded from http://www-roc.inria.fr/gamma/download/download.php

yade.ymport.gts(meshfile, shift=(0, 0, 0), scale=1.0, **kw)

Read given meshfile in gts format.

Parameters :
meshfile: string

name of the input file.

shift: [float,float,float]

[X,Y,Z] parameter moves the specimen.

scale: float

factor scales the given data.

**kw: (unused keyword arguments)

is passed to utils.facet

Returns :

list of facets.

yade.ymport.stl(file, dynamic=False, wire=True, color=None, highlight=False, noBound=False, material=-1)

Import geometry from stl file, return list of created facets.

yade.ymport.text(fileName, shift=Vector3(0, 0, 0), scale=1.0, **kw)

Load sphere coordinates from file, create spheres, insert them to the simulation.

Parameters :
filename: string

file which has 4 colums [x, y, z, radius].

shift: [float,float,float]

[X,Y,Z] parameter moves the specimen.

scale: float

factor scales the given data.

**kw: (unused keyword arguments)

is passed to utils.sphere

Returns :

list of spheres.

Lines starting with # are skipped

yade.ymport.textExt(fileName, format='x_y_z_r', shift=Vector3(0, 0, 0), scale=1.0, **kw)

Load sphere coordinates from file in specific format, create spheres, insert them to the simulation.

Parameters :

filename: string format:

the name of output format. Supported x_y_z_r`(default), `x_y_z_r_matId

shift: [float,float,float]

[X,Y,Z] parameter moves the specimen.

scale: float

factor scales the given data.

**kw: (unused keyword arguments)

is passed to utils.sphere

Returns :

list of spheres.

Lines starting with # are skipped

Previous topic

yade.utils module

Next topic

External modules

This Page