Iota Python API
1.0.0
1.0.0
  • Introduction
  • Getting started with Iota Python Library and Iota IPython Terminal
    • Starting a Session
    • Creating a New Project
    • Loading a Project
    • Creating a New Scenario
    • Loading a Scenario
    • Importing a Dataset
    • Running Coarse-graining
  • Writing Scripts
    • Generic Scripts
    • Run(scenario) Scripts
  • Running Scripts
    • Running Generic Scripts
    • Running run(scenario) Scripts
  • Iota Python Reference Library
    • Datasets
    • Graphs
    • Scene renderer
    • Meshing
    • Variable types
    • Session
    • Project
    • Scenario
    • Graph
    • Dataset
    • Mesh
    • Script
    • File
    • Auxiliar
    • Enums
  • Examples
    • Creating a New Project
    • Creating a New Scenario
    • Creating Multiple Scenarios
    • Loading a Project and a Scenario
    • Importing a Dataset into a Scenario
    • Importing Multiple Datasets into different Scenarios
    • Creating a Cut-Plane with Results in a Dataset
    • Creating a New Result in a Dataset
    • Calculating a KPI and Exporting into a Graph
    • Getting the Profile of Result along a Line
    • Creating Multiple Result Line Variations and Plotting them in a Single Graph
    • Integrating a Result over a Mesh
    • Getting the Evolution of the Statistics of a Result
    • Creating Multiple Screenshots of a Dataset
    • Creating Multiple Videos of a Dataset
    • Cloninig Settings and Running Coarse-graining for Multiple Scenarios
    • Automating EDEM Simulations runs and Iota Analyses
Powered by GitBook
On this page
  • Methods
  • load(filename, [split])
  • export(mesh, filename, [format])
  • create_line(start, end, element_size, [name])
  • create_circle(centre, radius, normal, element_size, [name])
  • create_rectangle(origin, normal, lenght, width, element_size, [name])
  • create_cuboid(origin, up, lenght, width, height, element_size, [name], [skin])
  • create_cylinder(origin, up, radius, element_size, [name], [skin])

Was this helpful?

  1. Iota Python Reference Library

Meshing

PreviousScene rendererNextVariable types

Last updated 5 years ago

Was this helpful?

iota.mesh

This method give access to Mesh generation and manipulation methods in Iota.

Classes

  • : class containing mesh object

  • : auxiliar class for spatial searches over a mesh

Methods

Enum

types of mesh formats for export

Methods

Load a mesh list from file

*Returns a list of meshes

Arguments

  • filename: (str) file containing the meshes to me readed

  • split: (bool) split meshes by connectivities (default: True)

Example

meshes = iota.mesh.load(
    filename = 'my_username',
    split = True
)
print(meshes)

Export a mesh to file

Arguments

  • mesh: (iota.mesh.Mesh) mesh object to be exported

  • filename: (str) file to write the mesh

  • format: (iota.mesh.export_format) mesh format for to written (default: P4S)

Example

status = iota.mesh.export(
    mesh = myMesh,
    filename = '/file/to/write/the/mesh/mesh.meta',
    format = iota.mesh.export_format.P4S
)
print('mesh is ok: ',status)

Create a linear mesh of edges

Arguments

  • start: (iota.Vector3d) point representing the origin of the line

  • end: (iota.Vector3d) point representing the end of the line

  • element_size: (float) size of the triangular elements

  • name: (str) name of the mesh (default: 'line')

Example

line = iota.mesh.create_line(
    start = iota.Vector3d(0,0,0),
    end = iota.Vector3d(1,1,0),
    element_size = 0.1,
    name = 'my_linear_mesh'
)

Create a circular mesh of triangles

Arguments

  • centre: (iota.Vector3d) point representing the centre of the circle

  • radius: (float) radius of the circle

  • normal: (iota.Vector3d) normal vector representing the plane of the circle

  • element_size: (float) size of the triangular elements

  • name: (str) name of the mesh (default: 'circle')

Example

circle = iota.mesh.create_circle(
    centre = iota.Vector3d(0,0,0),
    radius = 1.0,
    normal = iota.Vector3d(0,0,1),
    element_size = 0.1,
    name = 'my_circle'
)

Create a rectangular mesh of triangles

Arguments

  • origin: (iota.Vector3d) point representing the origin of the rectangle

  • normal: (iota.Vector3d) normal vector representing the plane of the rectangle

  • length: (float) length of the rectangle

  • width: (float) width of the rectangle

  • element_size: (float) size of the triangular elements

  • name: (str) name of the mesh (default: 'rectangle')

Example

rectangle = iota.mesh.create_rectangle(
    origin = iota.Vector3d(0,0,0),
    normal = iota.Vector3d(0,0,1),
    length = 1.0,
    width = 1.0,
    element_size = 0.1,
    name = 'my_rectangle'
)

Create a cuboid mesh of tetrahedra

Arguments

  • origin: (iota.Vector3d) point representing the origin of the cuboid

  • up: (iota.Vector3d) vector representing the up direction of the cuboid

  • length: (float) length of the cuboid

  • width: (float) width of the cuboid

  • height: (float) height of the cuboid

  • element_size: (float) size of the elements

  • name: (str) name of the mesh (default: 'cuboid')

  • skin: (bool) generate the surface instead of volume (default: False)

Example

cuboid = iota.mesh.create_cuboid(
    origin = iota.Vector3d(0,0,0),
    up = iota.Vector3d(0,0,1),
    length = 1.0,
    width = 1.0,
    height = 1.0,
    element_size = 0.1,
    name = 'my_cuboid'
)

Create a cylinder mesh of tetrahedra

Arguments

  • origin: (iota.Vector3d) point representing the origin of the cylinder

  • up: (iota.Vector3d) vector representing the up direction of the cylinder

  • radius: (float) radius of the cylinder

  • height: (float) height of the cylinder

  • element_size: (float) size of the elements

  • name: (str) name of the mesh (default: 'cylinder')

  • skin: (bool) generate the surface instead of volume (default: False)

Example

cylinder = iota.mesh.create_cylinder(
    origin = iota.Vector3d(0,0,0),
    up = iota.Vector3d(0,0,1),
    radius = 1.0,
    height = 1.0,
    element_size = 0.1,
    name = 'my_cylinder'
)

Mesh
MeshSearch
iota.mesh.export_format
load
export
create_line
create_circle
create_rectangle
create_cuboid
create_cylinder
load(filename, [split])
export(mesh, filename, [format])
create_line(start, end, element_size, [name])
create_circle(centre, radius, normal, element_size, [name])
create_rectangle(origin, normal, lenght, width, element_size, [name])
create_cuboid(origin, up, lenght, width, height, element_size, [name], [skin])
create_cylinder(origin, up, radius, element_size, [name], [skin])