yade.export module

Export geometry to various formats.

class yade.export.VTKWriter

USAGE: create object vtk_writer = VTKWriter(‘base_file_name’), add to engines PyRunner with command=’vtk_writer.snapshot()’

snapshot()
yade.export.text(filename, consider=<function <lambda> at 0xa6eadbc>)
Save sphere coordinates into a text file; the format of the line is: x y z r.
Non-spherical bodies are silently skipped. Example added to examples/regular-sphere-pack/regular-sphere-pack.py
Parameters :
filename: string

the name of the file, where sphere coordinates will be exported.

consider:

anonymous function(optional)

Returns:

number of spheres which were written.

yade.export.textExt(filename, format='x_y_z_r', consider=<function <lambda> at 0xa656f7c>, comment='')
Save sphere coordinates and other parameters into a text file in specific format.

Non-spherical bodies are silently skipped. Users can add here their own specific format, giving meaningful names. The first file row will contain the format name. Be sure to add the same format specification in ymport.textExt.

parameters:
filename: string
the name of the file, where sphere coordinates will be exported.
format:
the name of output format. Supported x_y_z_r`(default), `x_y_z_r_matId
comment:
the text, which will be added as a comment at the top of file. If you want to create several lines of text, please use `
#` for next lines.
consider:
anonymous function(optional)
Returns:number of spheres which were written.

Previous topic

yade.eudoxos module

Next topic

yade.linterpolation module

This Page