plask.geometry
¶PLaSK geometry classes.
Classes and functions defined in this module can be used to create and modify geometry description in PLaSK. See secgeometrypython for more details.
Example
To create a simple stack with two identical rectangles and check its total size, use the following commands:
>>> rectangle = geometry.Block2D(4, 2, 'GaAs')
>>> stack = geometry.Stack2D()
>>> stack.prepend(rectangle)
<plask.geometry.PathHint at 0x40a52f8>
>>> stack.prepend(rectangle)
<plask.geometry.PathHint at 0x40a50d8>
>>> stack.bbox
plask.geometry.Box2D(0, 0, 4, 4)
Now, to create a Cartesian twodimensional geometry over it:
>>> geometry.Cartesian2D(stack)
<plask.geometry.Cartesian2D object at (0x571acd0)>
You may also modify any existing geometry object:
>>> rectangle.height = 3
>>> stack.bbox
plask.geometry.Box2D(0, 0, 4, 6)
See also
Section Geometry Specification for detailed information of geometry.
XPL section geometry
for reference of the geometry definition
in the XPL file.
Align2D 
Container with its items located according to specified alignment. 
Align3D 
Container with its items located according to specified alignment. 
AlignContainer2D 
alias of plask.geometry.Align2D 
AlignContainer3D 
alias of plask.geometry.Align3D 
Arange2D 
Container that repeats its item, shifting each repetition by the specified step. 
Arange3D 
Container that repeats its item, shifting each repetition by the specified step. 
Block2D 
alias of plask.geometry.Rectangle 
Block3D 
alias of plask.geometry.Cuboid 
Box2D 
Rectangular twodimensional box. 
Box3D 
Cuboidal threedimensional box. 
Cartesian2D 
Geometry in 2D Cartesian space. 
Cartesian3D 
Geometry in 3D space. 
Circle 
Circle (2D geometry object). 
Clip2D 
Transform that clips the held geometry object to the specified clipbox (2D version). 
Clip3D 
Transform that clips the held geometry object to the specified clipbox (3D version). 
Container2D 
Base class for all 2D containers. 
Container3D 
Base class for all 3D containers. 
Cuboid 
Cuboidal block (3D geometry object). 
Cylinder 
Vertical cylinder (3D geometry object). 
Cylindrical 
Geometry in 2D cylindrical space. 
Extrusion 
Extrusion in the longitudinal direction of the 2D object into a 3D one. 
Flip2D 
Transfer that flips the geometry object along a specified axis (2D version). 
Flip3D 
Transfer that flips the geometry object along a specified axis (3D version). 
Geometry 
Base class for all geometries 
GeometryObject 
Base class for all geometry objects. 
GeometryObject2D 
Base class for 2D geometry objects. 
GeometryObject3D 
Base class for 3D geometry objects. 
GeometryObjectLeaf2D 
Base class for all 2D leaves 
GeometryObjectLeaf3D 
Base class for all 3D leaves 
GeometryObjectTransform2Dto3D 
Base class for all transformations which change 2D space to 3D. 
Intersection2D 
Transform that clips the held geometry object to the specified envelope (2D version). 
Intersection3D 
Transform that clips the held geometry object to the specified envelope (3D version). 
Lattice 
Lattice container that arranges its children in twodimensional lattice. 
Mirror2D 
Transfer that mirrors the geometry object along the specified axis (2D version). 
Mirror3D 
Transfer that mirrors the geometry object along the specified axis (3D version). 
MultiShelf2D 
Shelf container that repeats its contents. 
MultiStack2D 
Stack container that repeats it contents (2D version). 
MultiStack3D 
Stack container that repeats it contents (3D version). 
Path 
Sequence of objects in the geometry tree, used for resolving ambiguities. 
PathHint 
PathHint stores weak references to container and its child with translation. 
PathHints 
Hint used for resolving ambiguities in a geometry tree. 
Prism 
Prism (3D geometry object). 
Rectangle 
Rectangular block (2D geometry object). 
Revolution 
Revolution around the vertical axis of the 2D object into a 3D one. 
Shelf2D 
2D container that organizes its items one next to another. 
SingleStack2D 
Container that organizes its items in a vertical stack (2D version). 
SingleStack3D 
Container that organizes its items in a vertical stack (3D version). 
Sphere 
Sphere (3D geometry object). 
Subtree 
A selected part of a geometry tree. 
Transform2D 
Base class for all 2D geometry transforms. 
Transform3D 
Base class for all 3D geometry transforms. 
Translation2D 
Transform that holds a translated geometry object together with its translation vector (2D version). 
Translation3D 
Transform that holds a translated geometry object together with its translation vector (3D version). 
Triangle 
Triangle (2D geometry object). 
Shelf ([repeat, shift]) 
Create a 2D shelf container that organizes its items one next to another (like books on a bookshelf). 
Stack2D ([repeat, shift]) 
Create a 2D container that organizes its items in a vertical stack. 
Stack3D ([repeat, shift]) 
Create a 3D container that organizes its items in a vertical stack. 
plask.geometry.
Shelf
(repeat=None, shift=0.0)¶Create a 2D shelf container that organizes its items one next to another (like books on a bookshelf).
The left side of the first object is located at the shift position in container local coordinates. Each consecutive object is placed to the right of the previous one. All the items are vertically aligned according to its bottom edge.
Parameters: 


plask.geometry.
Stack2D
(repeat=None, shift=0.0, **kwargs)¶Create a 2D container that organizes its items in a vertical stack.
The bottom side of the first object is located at the shift position in container local coordinates. Each consecutive object is placed on the top of the previous one.
Parameters: 


plask.geometry.
Stack3D
(repeat=None, shift=0.0, **kwargs)¶Create a 3D container that organizes its items in a vertical stack.
The bottom side of the first object is located at the shift position in container local coordinates. Each consecutive object is placed on the top of the previous one. Then the whole stack is repeated repeat times.
Parameters: 

