Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_1(self):
self.assertEqual("Box" in db.__all__, True)
def Path(dpts,width,justification):
path = db.DPath.new()
path.width = width
ds=[]
for i in range(len(dpts)-1):
apt = dpts[i]
bpt = dpts[i+1]
if bpt.x > apt.x:
d = 'R'
elif bpt.y > apt.y:
d = 'U'
elif bpt.x < apt.x:
d = 'L'
elif bpt.y < apt.y:
d = 'D'
else:
assert(False)
import os, sys
from pathlib import Path
import SiEPIC, siepic_tools
op_tag = "" #operation tag which defines whether we are loading library in script or GUI env
try:
# import pya from klayout
import pya
if("Application" in str(dir(pya))):
from SiEPIC.utils import get_technology_by_name
op_tag = "GUI"
#import pya functions
else:
raise ImportError
except:
import klayout.db as pya
from zeropdk import Tech
op_tag = "script"
lyp_filepath = Path(str(Path(os.path.dirname(os.path.realpath(__file__))).parent) + r"/klayout_Layers_GSiP.lyp")
print(lyp_filepath)
from pya import Box, Point, Polygon, Text, Trans, LayerInfo, \
PCellDeclarationHelper, DPoint, DPath, Path, ShapeProcessor, \
Library, CellInstArray