How to use klayout - 10 common examples

To help you get started, we’ve selected a few klayout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KLayout / klayout / testdata / pymod / bridge.py View on Github external
def test_1(self):
    p = db.DSimplePolygon(db.DBox(1,2,3,4))
    a = bridge.p2a(p)
    self.assertEqual(repr(bridge.p2a(p)), "[(1.0, 2.0), (1.0, 4.0), (3.0, 4.0), (3.0, 2.0)]")
github KLayout / klayout / testdata / pymod / import_db.py View on Github external
def test_1(self):
    self.assertEqual("Box" in db.__all__, True)
github KLayout / klayout / testdata / pymod / import_db.py View on Github external
def test_2(self):
    # Some smoke test
    v = db.Box()
    self.assertEqual(str(v), "()")
    v = db.Box(1, 2, 3, 4)
    self.assertEqual(str(v), "(1,2;3,4)")
github KLayout / klayout / testdata / pymod / import_QtPrintSupport.py View on Github external
def test_2(self):
    app = QtCore.QCoreApplication([ "progname" ])
    q = QtPrintSupport.QPrinter()
github KLayout / klayout / testdata / pymod / import_QtCore.py View on Github external
def test_2(self):
    # Some smoke test
    v = QtCore.Qt.QT_VERSION
    self.assertEqual(v > 1, True)
    b = QtCore.QBuffer()
    b.setData("all you can eat")
    b.open(QtCore.QIODevice.ReadOnly)
    self.assertEqual(b.read(3), "all")
    b.read(1)
    self.assertEqual(b.read(3), "you")
github KLayout / klayout / testdata / pymod / import_QtDesigner.py View on Github external
def test_2(self):
    app = QtCore.QCoreApplication([ "appname" ])
    q = QtDesigner.QFormBuilder()
github KLayout / klayout / testdata / pymod / import_QtCore.py View on Github external
def test_1(self):
    self.assertEqual("QBuffer" in QtCore.__all__, True)
github KLayout / klayout / testdata / pymod / import_QtXml.py View on Github external
def test_2(self):
    # Some smoke test
    b = QtCore.QBuffer()
    b.setData("abc")
    b.open(QtCore.QIODevice.ReadOnly)
    doc = QtXml.QDomDocument()
    doc.setContent(b)
    b.close()
    self.assertEqual(doc.documentElement().tagName, "doc")
    self.assertEqual(doc.documentElement().firstChild().toElement().tagName, "e")
github KLayout / klayout / testdata / pymod / import_QtXml.py View on Github external
def test_2(self):
    # Some smoke test
    b = QtCore.QBuffer()
    b.setData("abc")
    b.open(QtCore.QIODevice.ReadOnly)
    doc = QtXml.QDomDocument()
    doc.setContent(b)
    b.close()
    self.assertEqual(doc.documentElement().tagName, "doc")
    self.assertEqual(doc.documentElement().firstChild().toElement().tagName, "e")
github KLayout / klayout / testdata / pymod / import_db.py View on Github external
def test_3(self):
    # db plugins loaded?
    v = db.Layout()
    v.read(os.path.join(os.path.dirname(__file__), "..", "gds", "t10.gds"))
    self.assertEqual(v.top_cell().name, "RINGO")