import 0.2.1
This commit is contained in:
commit
5a4c7db6b4
35 changed files with 3888 additions and 0 deletions
111
doc/gdsii/elements.rst
Normal file
111
doc/gdsii/elements.rst
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
.. automodule:: gdsii.elements
|
||||
:synopsis: module containing classes for GDSII elements.
|
||||
|
||||
Possible instance attributes:
|
||||
|
||||
:attr:`elflags`
|
||||
Element flags (:class:`int`, optional).
|
||||
Bit 15 specifies template data.
|
||||
Bit 14 specifies external data.
|
||||
:attr:`plex`
|
||||
Plex number (:class:`int`, optional).
|
||||
:attr:`layer`
|
||||
Element layer (:class:`int`)
|
||||
:attr:`data_type`
|
||||
Element data type (:class:`int`)
|
||||
:attr:`path_type`
|
||||
Type of path endpoints (:class:`int`, optional).
|
||||
The values have the following meaning:
|
||||
|
||||
* 0 -- square ends, flush with endpoints
|
||||
* 1 -- round ends, centered on endpoints
|
||||
* 2 -- square ends, centered on endpoints
|
||||
* 4 -- custom square ends
|
||||
:attr:`width`
|
||||
Width of the path (:class:`int`, optional). If the value is negative,
|
||||
then the width is absolute and not affected by magnification factor.
|
||||
:attr:`bgn_extn`, :attr:`end_extn`
|
||||
Start end end extensions for :attr:`path_type` 4 (:class:`int`, optional).
|
||||
:attr:`xy`
|
||||
List of points (:class:`list` of tuples ``(x, y)``).
|
||||
:attr:`struct_name`
|
||||
Name of the referenced structure (:class:`bytes`).
|
||||
:attr:`strans`
|
||||
Transformation flags (:class:`int`, optional). Bits have the following meaning:
|
||||
|
||||
* 0 -- reclection about X axis
|
||||
* 13 -- absolute magnification
|
||||
* 14 -- absolute angle
|
||||
:attr:`mag`
|
||||
Magnification factor (:class:`float`, optional).
|
||||
:attr:`angle`
|
||||
Rotation factor in degrees (:class:`float`, optional). Rotation is counterclockwise.
|
||||
:attr:`cols`
|
||||
Number of columns (:class:`int`).
|
||||
:attr:`rows`
|
||||
Number of rows (:class:`int`).
|
||||
:attr:`text_type`
|
||||
Text type (:class:`int`).
|
||||
:attr:`presentation`
|
||||
Bit array that specifies how the text is presented (:class:`int`, optional).
|
||||
Meaning of bits:
|
||||
|
||||
* Bits 10 and 11 specify font number (0-3).
|
||||
* Bits 12 and 13 specify vertical justification (0 -- top, 1 -- middle, 2 -- bottom).
|
||||
* Bits 14 and 15 specify horizontal justification (0 -- left, 1 -- center, 2 -- rigth).
|
||||
:attr:`string`
|
||||
String for :const:`TEXT` element (:class:`bytes`).
|
||||
:attr:`node_type`
|
||||
Node type (:class:`int`).
|
||||
:attr:`box_type`
|
||||
Box type (:class:`int`).
|
||||
:attr:`properties`
|
||||
Element properties, represented as a list of tupes (`propattr`, `propvalue`).
|
||||
`propattr` is an :class:`int`, `propvalue` is :class:`bytes`.
|
||||
This attribute is optional.
|
||||
|
||||
.. autoclass:: ARef
|
||||
|
||||
Required attributes: :attr:`struct_name`, :attr:`cols`, :attr:`rows`, :attr:`xy`.
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`strans`, :attr:`mag`,
|
||||
:attr:`angle`, :attr:`properties`.
|
||||
|
||||
.. autoclass:: Boundary
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`data_type`, :attr:`xy`.
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`properties`.
|
||||
|
||||
.. autoclass:: Box
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`box_type`, :attr:`xy`.
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`properties`.
|
||||
|
||||
.. autoclass:: Node
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`node_type`, :attr:`xy`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`properties`
|
||||
|
||||
.. autoclass:: Path
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`data_type`, :attr:`xy`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`path_type`,
|
||||
:attr:`width`, :attr:`bgn_extn`, :attr:`end_extn`, :attr:`properties`
|
||||
|
||||
.. autoclass:: SRef
|
||||
|
||||
Required attributes: :attr:`struct_name`, :attr:`xy`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`strans`, :attr:`mag`,
|
||||
:attr:`angle`, :attr:`properties`
|
||||
|
||||
.. autoclass:: Text
|
||||
|
||||
Required attributes: :attr:`layer`, :attr:`text_type`, :attr:`xy`, :attr:`string`
|
||||
|
||||
Optional attributes: :attr:`elflags`, :attr:`plex`, :attr:`presentation`,
|
||||
:attr:`path_type`, :attr:`width`, :attr:`strans`, :attr:`mag`, :attr:`angle`, :attr:`properties`
|
||||
3
doc/gdsii/exceptions.rst
Normal file
3
doc/gdsii/exceptions.rst
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.. automodule:: gdsii.exceptions
|
||||
:members:
|
||||
:show-inheritance:
|
||||
13
doc/gdsii/index.rst
Normal file
13
doc/gdsii/index.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
:mod:`gdsii` --- GDSII manipulation library
|
||||
===========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
library
|
||||
structure
|
||||
elements
|
||||
tags
|
||||
types
|
||||
record
|
||||
exceptions
|
||||
81
doc/gdsii/library.rst
Normal file
81
doc/gdsii/library.rst
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
.. automodule:: gdsii.library
|
||||
:synopsis: module containing GDSII library class.
|
||||
|
||||
.. autoclass:: Library
|
||||
:show-inheritance:
|
||||
|
||||
.. automethod:: __init__
|
||||
|
||||
Instance attributes:
|
||||
.. attribute:: version
|
||||
|
||||
GDSII file verion (:class:`int`).
|
||||
Number as found in a GDSII file.
|
||||
For example value is 5 for GDSII v5 and 0x600 for GDSII v6.
|
||||
|
||||
.. attribute:: name
|
||||
|
||||
Library name (:class:`bytes`).
|
||||
|
||||
.. attribute:: physical_unit
|
||||
|
||||
Size of database unit in meters (:class:`float`).
|
||||
|
||||
.. attribute:: logical_unit
|
||||
|
||||
Size of user unit in database units (:class:`float`).
|
||||
|
||||
.. attribute:: mod_time
|
||||
|
||||
Last modification time (:class:`datetime`).
|
||||
|
||||
.. attribute:: acc_time
|
||||
|
||||
Last access time (:class:`datetime`).
|
||||
|
||||
.. attribute:: libdirsize
|
||||
|
||||
Number of pages in the library directory (:class:`int`, optional).
|
||||
|
||||
.. attribute:: srfname
|
||||
|
||||
Name of spacing rules file (:class:`bytes`, optional).
|
||||
|
||||
.. attribute:: acls
|
||||
|
||||
ACL data (:class:`list` of tuples ``(GID, UID, ACCESS)``, optional).
|
||||
|
||||
.. attribute:: reflibs
|
||||
|
||||
Names of reference libraries (:class:`bytes`, optional).
|
||||
See GDSII stream format documentation for format.
|
||||
|
||||
.. attribute:: fonts
|
||||
|
||||
Names of font definition files (:class:`bytes`, optional).
|
||||
The content is not parsed, see GDSII stream format documentation
|
||||
for format.
|
||||
|
||||
.. attribute:: attrtable
|
||||
|
||||
Name of attribute definition file (:class:`bytes`, optional).
|
||||
|
||||
.. attribute:: generations
|
||||
|
||||
Number of copies for deleted structures (:class:`int`, optional)
|
||||
|
||||
.. attribute:: format
|
||||
|
||||
Library format (:class:`int`, optional). Possible values:
|
||||
* 0 -- GDSII archive format
|
||||
* 1 -- GDSII filtered format
|
||||
* 2 -- EDSIII archive format
|
||||
* 3 -- EDSIII filtered format
|
||||
|
||||
.. attribute:: masks
|
||||
|
||||
Masks for filtered format (:class:`list` of :class:`bytes`, optional).
|
||||
|
||||
.. automethod:: load
|
||||
|
||||
.. automethod:: save
|
||||
19
doc/gdsii/record.rst
Normal file
19
doc/gdsii/record.rst
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.. automodule:: gdsii.record
|
||||
|
||||
.. autoclass:: Record
|
||||
:members:
|
||||
|
||||
.. attribute:: data
|
||||
|
||||
Element data.
|
||||
|
||||
.. attribute:: tag
|
||||
|
||||
Element tag (:class:`int`).
|
||||
|
||||
.. autoclass:: Reader
|
||||
:members:
|
||||
|
||||
.. attribute:: current
|
||||
|
||||
Last record read from stream.
|
||||
24
doc/gdsii/structure.rst
Normal file
24
doc/gdsii/structure.rst
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
.. automodule:: gdsii.structure
|
||||
:synopsis: module containing GDSII structure class.
|
||||
|
||||
.. autoclass:: Structure
|
||||
:show-inheritance:
|
||||
|
||||
.. automethod:: __init__
|
||||
|
||||
Instance attributes:
|
||||
.. attribute:: name
|
||||
|
||||
Structure name (:class:`bytes`).
|
||||
|
||||
.. attribute:: mod_time
|
||||
|
||||
Last modification time (:class:`datetime`).
|
||||
|
||||
.. attribute:: acc_time
|
||||
|
||||
Last access time (:class:`datetime`).
|
||||
|
||||
.. attribute:: strclass
|
||||
|
||||
Structure class (:class:`int`, optional).
|
||||
83
doc/gdsii/tags.rst
Normal file
83
doc/gdsii/tags.rst
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
.. automodule:: gdsii.tags
|
||||
|
||||
The following vaues are defined::
|
||||
|
||||
HEADER = 0x0002
|
||||
BGNLIB = 0x0102
|
||||
LIBNAME = 0x0206
|
||||
UNITS = 0x0305
|
||||
ENDLIB = 0x0400
|
||||
BGNSTR = 0x0502
|
||||
STRNAME = 0x0606
|
||||
ENDSTR = 0x0700
|
||||
BOUNDARY = 0x0800
|
||||
PATH = 0x0900
|
||||
SREF = 0x0A00
|
||||
AREF = 0x0B00
|
||||
TEXT = 0x0C00
|
||||
LAYER = 0x0D02
|
||||
DATATYPE = 0x0E02
|
||||
WIDTH = 0x0F03
|
||||
XY = 0x1003
|
||||
ENDEL = 0x1100
|
||||
SNAME = 0x1206
|
||||
COLROW = 0x1302
|
||||
TEXTNODE = 0x1400
|
||||
NODE = 0x1500
|
||||
TEXTTYPE = 0x1602
|
||||
PRESENTATION = 0x1701
|
||||
STRING = 0x1906
|
||||
STRANS = 0x1A01
|
||||
MAG = 0x1B05
|
||||
ANGLE = 0x1C05
|
||||
REFLIBS = 0x1F06
|
||||
FONTS = 0x2006
|
||||
PATHTYPE = 0x2102
|
||||
GENERATIONS = 0x2202
|
||||
ATTRTABLE = 0x2306
|
||||
STYPTABLE = 0x2406
|
||||
STRTYPE = 0x2502
|
||||
ELFLAGS = 0x2601
|
||||
ELKEY = 0x2703
|
||||
NODETYPE = 0x2A02
|
||||
PROPATTR = 0x2B02
|
||||
PROPVALUE = 0x2C06
|
||||
BOX = 0x2D00
|
||||
BOXTYPE = 0x2E02
|
||||
PLEX = 0x2F03
|
||||
BGNEXTN = 0x3003
|
||||
ENDEXTN = 0x3103
|
||||
TAPENUM = 0x3202
|
||||
TAPECODE = 0x3302
|
||||
STRCLASS = 0x3401
|
||||
FORMAT = 0x3602
|
||||
MASK = 0x3706
|
||||
ENDMASKS = 0x3800
|
||||
LIBDIRSIZE = 0x3902
|
||||
SRFNAME = 0x3A06
|
||||
LIBSECUR = 0x3B02
|
||||
|
||||
Types used only with Custom Plus (not handled by pygdsii)::
|
||||
|
||||
BORDER = 0x3C00
|
||||
SOFTFENCE = 0x3D00
|
||||
HARDFENCE = 0x3E00
|
||||
SOFTWIRE = 0x3F00
|
||||
HARDWIRE = 0x4000
|
||||
PATHPORT = 0x4100
|
||||
NODEPORT = 0x4200
|
||||
USERCONSTRAINT = 0x4300
|
||||
SPACERERROR = 0x4400
|
||||
CONTACT = 0x4500
|
||||
|
||||
Additionaly this module contains the following members:
|
||||
|
||||
.. autofunction:: type_of_tag
|
||||
|
||||
.. data:: DICT
|
||||
|
||||
A dictionary that maps tag names to tag IDs.
|
||||
|
||||
.. data:: REV_DICT
|
||||
|
||||
A dictionary that maps tag IDs to tag names.
|
||||
23
doc/gdsii/types.rst
Normal file
23
doc/gdsii/types.rst
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.. automodule:: gdsii.types
|
||||
|
||||
Defined members::
|
||||
|
||||
NODATA = 0
|
||||
BITARRAY = 1
|
||||
INT2 = 2
|
||||
INT4 = 3
|
||||
REAL4 = 4
|
||||
REAL8 = 5
|
||||
ASCII = 6
|
||||
|
||||
Type :const:`REAL4` is not used in GDSII and not handled by `python-gdsii`.
|
||||
|
||||
Additionaly this module contains the following members:
|
||||
|
||||
.. data:: DICT
|
||||
|
||||
A dictionary that maps type names to type IDs.
|
||||
|
||||
.. data:: REV_DICT
|
||||
|
||||
A dictionary that maps type IDs to type names.
|
||||
Loading…
Add table
Add a link
Reference in a new issue