mpacts.geometrygenerators. cylinderpacking

In order to be able to use this module import it like this:

import mpacts.geometrygenerators.cylinderpacking
#or assign it to a shorter name
import mpacts.geometrygenerators.cylinderpacking as cyl

CylinderPacking

class mpacts.geometrygenerators.cylinderpacking.CylinderPacking(tolerance=2.220446049250313e-12)

Bases: object

Creates vertices for a cylinder shell The cylinder is directed along the z-axis Both cylinder length and radius are scaled to ensure correct fitting of vertices

Parameters:
-center central coordinate of sphere/circle
-r radius
-plane plane of circle or plane perpendicular to length axis cylinder
-range_l list containing min and max value of cylinder on axis perpendicular to plane
-dist distance between vertices
CylinderPacking(name, parent, **kwargs)
addVerticesCylinder(center=[0, 0, 0], r=0.0, plane='xy', length=0.0, dist=1.0)
getVertices()

Returns a list of tuples of the generated vertices.

rotateObj(center=[0, 0, 0], axis='z', angle=0.0)

Rotate object around axis (x, y or z) in selected point

mpacts.geometrygenerators.cylinderpacking.test()