Object used to import structures from a GDSII stream file.
Parameters
Attributes
Notes
Not all features from the GDSII specification are currently supported. A warning will be produced if any unsuported features are found in the imported file.
Examples
>>> gdsii = gdspy.GdsImport('gdspy-sample.gds')
>>> for cell_name in gdsii.cell_dict:
... gdsii.extract(cell_name)
Extract a cell from the imported GDSII file and include it in the current scope, including referenced dependencies.
Parameters
Returns
Output the top level cells from the GDSII data. Top level cells are those that are not referenced by any other cells.
Outputs
Provide a GUI where the layout can be viewed.
The view can be scrolled vertically with the mouse wheel, and horizontally by holding the shift key and using the mouse wheel. Dragging the 2nd mouse button also scrolls the view, and if control is held down, it scrolls 10 times faster.
You can zoom in or out using control plus the mouse wheel, or drag a rectangle on the window with the 1st mouse button to zoom into that area.
A ruler is available by clicking the 1st mouse button anywhere on the view and moving the mouse around. The distance is shown in the status area.
Double-clicking on any polygon gives some information about it.
Color and pattern for each layer/datatype specification can be changed by left and right clicking on the icon in the layer/datatype list. Left and right clicking the text label changes the visibility.
Parameters
Examples
White background, filled shapes:
>>> gdspy.LayoutViewer(pattern={'default':8}, background='#FFFFFF')
No filling, black color for layer 0, datatype 1, automatic for others:
>>> gdspy.LayoutViewer(pattern={'default':9}, color={(0,1):'#000000'})
Output a list of cells as a GDSII stream library.
The dimensions actually written on the GDSII file will be the dimensions of the objects created times the ratio unit/precision. For example, if a circle with radius 1.5 is created and we set unit=1.0e-6 (1 um) and precision=1.0e-9 (1 nm), the radius of the circle will be 1.5 um and the GDSII file will contain the dimension 1500 nm.
Parameters
Examples
>>> gdspy.gds_print('out-file.gds', unit=1.0e-6, precision=1.0e-9)