Classes

Section Classes

class Figure

Figure

Class for handling Figures.

Examples

# Open the input file
input = pynebv.file.open('/path/to/sample.oas')
# Get OR of the input file
or_result = pynebv.figure.boolean(input, True, operation='OR')

Methods

def boolean(itemList, outlineInput, /, subtrahend={'itemList': [], 'outline': True}, area='*', operation='OR', name='', opts={})

Execute boolean operation.

Args

itemList : list[EbvItem]

type detail: list[EbvItem]: list of EbvItem or EbvItemList

Specify target items.

outlineInput : bool

Specify whether to get outline before boolean operation.

subtrahend : dict

Specify target of boolean operation SUB.

"itemList" : list[EbvItem]: list of EbvItem or EbvItemList
    Specify the target chips or layers.

"outline" : bool
    Specify whether to get outline before substract.

area : object

type detail: object: tuple[float, float, float, float] or str('*')

Specify operation area.

operation : str

type detail: str: 'OR', 'AND', 'XOR', 'SUB' or 'NOT'

Specify operation type of boolean.

name : str

Specify name of result item.

opts : dict[str, str]

Specify options.

Returns

EbvItem
Return an item of boolean operation result.

Examples

# Open the 1st file.
input1 = pynebv.file.open('/path/to/sample1.oas')
# Get layer.
layer1_6 = input1.layer(6)
layer1_9 = input1.layer(9)
# Set input layers for Boolean.
input_layer = [layer1_6, layer1_9]
# Execute Boolean 'OR'.
or_result = pynebv.figure.boolean(input_layer, True, operation='OR')

# Open the 2nd file.
input1 = pynebv.file.open('/path/to/sample2.oas')
layer2_6 = input2.layer(6)
# Set input layers for Boolean.
input_layer = [or_result, layer2_6]
# Execute Boolean 'XOR'.
xor_result = pynebv.figure.boolean(input_layer, True, operation='XOR')

# Set display off all files and layers.
all_items = pynebv.file.items('*')
for item in all_items:
    item.display = "false"

# Set display only boolean results group on.
results = pynebv.file.items('Results')
results.display = "true"

# Set display only boolean result OR on.
or_result.display = "true"
# Output boolean result OR.
pynebv.figure.cutout("or_result.gds", "-1000,-1000,1000,1000", format='GDSII')

# Set display only boolean result OR off.
or_result.display = "false"
# Set display only boolean result XOR on.
xor_result.display = "true"
# Output boolean result XOR.
pynebv.figure.cutout("xor_result.gds", "-1000,-1000,1000,1000", format='GDSII')

def cutout(filePath, area, /, format='GDSII', au=0.0, clip=False, layno='', origin='Data Inside', useCompGds=False, topcellName='', asPolygon=False, expandImplicit=False)

Output figures in screen.

Args

filePath : str

Specify file path.

area : tuple[float, float, float, float]

Specify operation area.

format : str

type detail: str: 'GDSII', 'EBV Text', 'OASIS' or 'OASIS.CL'

Specify output file format.

au : float

Specify address unit for output file.

clip : bool

Specify whether to clip figures by specified area.

layno : str

Specify layer and datatype for output file.

origin : str

type detail: str: 'Data Inside', 'Center', 'Lower-Left', 'Lower-Right', 'Upper-Left' or 'Upper-Right'

Specify the origin of output file.

useCompGds : bool

Specify whether to use “compgds” for output file.

topcellName : str

Specify top cell name of output file.

asPolygon : bool

Specify whether to output rectangle and trapezoid as polygon in EBV Text format.

expandImplicit : bool

Specify whether to output Implicit Bezier section as Explicit Bezier section.

Returns

none
Always none.
def cutout_by_areafile(filePath, saveFilePath, /, format='GDSII', au=0.0, clip=False, layno='', origin='Data Inside', byEachArea=False, useCompGds=False, topcellName='', asPolygon=False, expandImplicit=False)

Output figures in screen from Area File.

Args

filePath : str

Specify Area File path.

saveFilePath : str

Specify output file path.

format : str

type detail: str: 'GDSII', 'EBV Text', 'OASIS' or 'OASIS.CL'

Specify output file format.

au : float

Specify address unit for output file.

clip : bool

Specify whether to clip figures by specified area.

layno : str

Specify layer and datatype for output file.

origin : str

type detail: str: 'Data Inside', 'Center', 'Lower-Left', 'Lower-Right', 'Upper-Left' or 'Upper-Right'

Specify the origin of output file.

byEachArea : bool

Specifies whether to change the output file for each area.

useCompGds : bool

Specify whether to use “compgds” for output file.

topcellName : str

Specify top cell name of output file.

asPolygon : bool

Specify whether to output rectangle and trapezoid as polygon in EBV Text format.

expandImplicit : bool

Specify whether to output Implicit Bezier section as Explicit Bezier section.

Returns

none
Always none.
def polygons(area='*')

Get figures in specified area.

Args

area : object

type detail: object: tuple[float, float, float, float] or str('*')

Specify area to extract figure.

Returns

EbvFigurePolygonList
Return a list of figures.

Examples

for polygon in pynebv.figure.polygons(): # each polygon on screen
    for point in polygon.points: # each point in polygon
        print(point.x) # x
        print(point.y) # y
def sizing(itemList, /, area='*', amount=[0.0], name='', clipResult=True, opts={})

Execute sizing operation.

Args

itemList : list[EbvItem]

type detail: list[EbvItem]: list of EbvItem or EbvItemList

Specify target items.

area : object

type detail: object: tuple[float, float, float, float] or str('*')

Specify operation area.

amount : list

Specify sizing amount.

name : str

Specify name of result item.

clipResult : bool

Specify whether to clip figures which is after sizing by specified area.

opts : dict[str, str]

Specify options.

Returns

EbvItem
Return an item of sizing operation result.

Item Classes

class EbvFigurePoint

Class representing the coordinates of a figure.

Instance variables

var x : float

x coordinate of point.

var y : float

y coordinate of point.

class EbvFigurePointList

Class representing the coordinate list iterator of a figure.

class EbvFigurePolygon

Class representing a polygon.

Instance variables

var pointsEbvFigurePointList

list of points.

class EbvFigurePolygonList

Class representing a polygon list iterator.