From 68c3f61d1ab1e3b9508f1933fb2fe0ec4825290a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Wed, 20 Jun 2018 23:21:48 +0200 Subject: [PATCH] Updated pykl Bridging code (markdown) --- ...g-code.md => klayout-Python-Module-Bridging-Code.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename pykl---Bridging-code.md => klayout-Python-Module-Bridging-Code.md (96%) diff --git a/pykl---Bridging-code.md b/klayout-Python-Module-Bridging-Code.md similarity index 96% rename from pykl---Bridging-code.md rename to klayout-Python-Module-Bridging-Code.md index a4d9e80..15ef6ce 100644 --- a/pykl---Bridging-code.md +++ b/klayout-Python-Module-Bridging-Code.md @@ -5,9 +5,9 @@ Imagine you have a third-party library that accepts polygons, but not KLayout ob The Python solution was to iterate over the KLayout polygon and produce the array: ```Python -import pykl.db +import klayout.db -some_polygon = pykl.db.DSimplePolygon(pykl.db.DBox(0, 0, 100, 200)) +some_polygon = klayout.db.DSimplePolygon(klayout.db.DBox(0, 0, 100, 200)) # make it more complex: some_polygon = some_polygon.round_corners(10.0, 10.0, 200) @@ -24,11 +24,11 @@ The solution is a specialized C module that performs this translation. I'd like With such a bridge, the code looks this way: ```Python -import pykl.tl -import pykl.db +import klayout.tl +import klayout.db import bridge_sample as bs -some_polygon = pykl.db.DSimplePolygon(pykl.db.DBox(0, 0, 100, 200)) +some_polygon = klayout.db.DSimplePolygon(klayout.db.DBox(0, 0, 100, 200)) # make it more complex: some_polygon = some_polygon.round_corners(10.0, 10.0, 200)