ddg.datastructures.indexedfaceset.ifs_generator module
Module ‘ifs_generator’ generates geometric objects using ifs datastructure
- ddg.datastructures.indexedfaceset.ifs_generator.tetrahedron(generate_coordinates=True)[source]
Create a tetrahedron as an ifs object.
By default, standard coordinates of a unit tetrahedron, centered at (0,0,0), will be assigned to the vertices and can be accessed via the attribute coordinate
co.- Parameters:
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- Returns:
- objifs
The tetrahedron that has been created.
Notes
Coordinate attribute The coordinate attribute
coassigned to the vertices is of typenumpy.ndarrayand contains the default coordinates of the tetrahedron
- ddg.datastructures.indexedfaceset.ifs_generator.cube(generate_coordinates=True)[source]
Create a cube as an ifs object.
By default, standard coordinates of a unit cube, centered at (0,0,0), will be assigned to the vertices and can be accessed via the attribute coordinate
co.- Parameters:
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- Returns:
- objifs
The cube that has been created.
Notes
Coordinate attribute The coordinate attribute
coassigned to the vertices is of typenumpy.ndarrayand contains the default coordinates of the cube
- ddg.datastructures.indexedfaceset.ifs_generator.octahedron(generate_coordinates=True)[source]
Create an octahedron as an ifs object.
By default, standard coordinates of a unit octahedron, centered at (0,0,0), will be assigned to the vertices and can be accessed via the attribute coordinate
co.- Parameters:
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- Returns:
- objifs
The octahedron that has been created.
Notes
Coordinate attribute The coordinate attribute
coassigned to the vertices is of typenumpy.ndarrayand contains the default coordinates of the octahedron
- ddg.datastructures.indexedfaceset.ifs_generator.dodecahedron(generate_coordinates=True)[source]
Create a dodecahedron as an ifs object.
By default, standard coordinates of a unit dodecahedron, centered at (0,0,0), will be assigned to the vertices and can be accessed via the attribute coordinate
co.- Parameters:
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- Returns:
- objifs
The dodecahedron that has been created.
Notes
Coordinate attribute The coordinate attribute
coassigned to the vertices is of typenumpy.ndarrayand contains the default coordinates of the dodecahedron
- ddg.datastructures.indexedfaceset.ifs_generator.icosahedron(generate_coordinates=True)[source]
Create an icosahedron as an ifs object.
By default, standard coordinates of a unit icosahedron, centered at (0,0,0), will be assigned to the vertices and can be accessed via the attribute coordinate
co.- Parameters:
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- Returns:
- objifs
The icosahedron that has been created.
Notes
Coordinate attribute The coordinate attribute
coassigned to the vertices is of typenumpy.ndarrayand contains the default coordinates of the icosahedron
- ddg.datastructures.indexedfaceset.ifs_generator.disc(resolution=20, generate_coordinates=True, center=(0, 0, 0), normal=(0, 0, 1), radius=1)[source]
Create a disc as an ifs object.
By default, the disc is centered at (0,0,0), the norm pointing at [0,0,1] and the radius 1. The coordinates of the vertices can be accessed via the attribute coordinate
co.- Parameters:
- resolutionint (default=20)
The amount of vertices of the disc
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- centeriterable (default=(0,0,0))
The center of the disc as a list in 3D space.
- normaliterable (default=(0,0,1))
The normal vector of the disc.
- radiusfloat (default=1)
The radius of the disc.
- Returns:
- objifs
The disc that has been created.
- ddg.datastructures.indexedfaceset.ifs_generator.cylinder(resolution=20, generate_coordinates=True, top_radius=1, bot_radius=1, length=1, center=(0, 0, 0), normal=(0, 0, 1))[source]
Create a cylinder as an ifs object.
By default, the cylinder’s bottom will be at (0,0,0) and it’s top at (0,0,1). The coordinates of the vertices can be accessed via the attribute coordinate
co.- Parameters:
- resolutionint (default=20)
The amount of faces of the cylinder.
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- top_radiusfloat (default=1)
The radius of the top of the cylinder.
- bot_radiusfloat (default=1)
The radius of the bottom of the cylinder
- lengthfloat (default=1)
The length of the cylinder.
- centeriterable (default=(0,0,0))
The center of the bottom of the cylinder.
- normaliterable (default=(0,0,1))
The normal of the cylinder’s top and bottom faces.
- Returns:
- objifs
The cylinder that has been created.
- ddg.datastructures.indexedfaceset.ifs_generator.arrow(resolution=20, generate_coordinates=True, heights=(0, 0.7, 0.7, 1), radii=(0.05, 0.05, 0.125))[source]
Create an arrow as an ifs object which can be used to visualize vectors.
By default, the arrow will point up. The bottom will be at (0,0,0) and the head at [0,0,1]. The coordinates of the vertices can be accessed via the attribute coordinate
co.- Parameters:
- resolutionint (default=20)
The amount of vertices at the base of the tip
- generate_coordinatesbool (default=True)
Decides on whether a container like coordinate attribute with default standard coordinates shall be assigned to the vertices.
- heightsiterable (default=(0,0.7,0.7,1))
First element defines height of the bottom of the stick, the second the height of the top of the stick, the third the height of the base of the tip and the forth the height of the tip of the head.
- radiiiterable (default=(0.05,0.05,0.125))
First element defines the radius of the bottom of the stick, second the radius of the top of the stick and the third the radius of the base of the tip.
- Returns:
- objifs
The arrow that has been created.