gdsfactory.ComponentReference

gdsfactory.ComponentReference#

class gdsfactory.ComponentReference(inst: Instance)[source]#

Shadows dbu attributes of Instance for backward compatibility.

DO NOT USE THIS AND PASS IT TO ANY FUNCTION REQUIRING kf.Instance.

__init__(inst: Instance) None[source]#

Initializes a ComponentReference.

Methods

__init__(inst)

Initializes a ComponentReference.

connect(port[, other, other_port_name, ...])

Return ComponentReference where port connects to a destination.

dmirror([p1, p2])

Mirror the instance at a line.

dmirror_x([x])

Mirror the instance at an x-axis.

dmirror_y([y])

Mirror the instance at an y-axis.

dmove(origin[, destination])

Move the instance in dbu.

dmovex(origin[, destination])

Move the instance in x-direction in um.

dmovey(origin[, destination])

Move the instance in y-direction in um.

drotate(angle[, center])

Rotate instance in degrees.

flatten([levels])

Flatten all or just certain instances.

mirror([p1, p2])

Mirror the instance at a line.

mirror_x([x])

Mirror the instance at an y-axis at position x.

mirror_y([y])

Mirror the instance at an x-axis at position y.

move(origin[, destination])

Move the instance in dbu.

movex(origin[, destination])

Move the instance in x-direction in dbu.

movey(origin[, destination])

Move the instance in y-direction in dbu.

rotate(angle[, center])

Rotate instance in increments of 90°.

to_yaml(representer, node)

Convert the instance to a yaml representation.

Attributes

a

Returns the displacement vector for the 'a' axis.

b

Returns the displacement vector for the 'b' axis.

cell

Parent KCell of the Instance.

cell_index

Get the index of the cell this instance refers to.

cell_inst

Gets the basic CellInstArray object associated with this instance.

center

Returns the coordinate center of the bounding box.

cplx_trans

Gets the complex transformation of the instance.

dcenter

Returns the coordinate center of the bounding box.

dcplx_trans

Gets the complex transformation of the instance.

dtrans

Gets the complex transformation of the instance.

dx

Returns the x-coordinate center of the bounding box.

dxmax

Returns the x-coordinate of the left edge of the bounding box.

dxmin

Returns the x-coordinate of the left edge of the bounding box.

dxsize

Returns the width of the bounding box.

dy

Returns the x-coordinate center of the bounding box.

dymax

Returns the x-coordinate of the left edge of the bounding box.

dymin

Returns the x-coordinate of the left edge of the bounding box.

dysize

Returns the height of the bounding box.

hash

Hash the instance.

info

na

Returns the displacement vector for the 'a' axis.

name

Name of instance in GDS.

nb

Returns the number of instances in the 'b' axis.

parent

Returns the parent Component.

parent_cell

Gets the cell this instance is contained in.

prop_id

Gets the properties ID associated with the instance.

purpose

Purpose value of instance in GDS.

trans

Gets the complex transformation of the instance.

x

Returns the x-coordinate center of the bounding box.

xmax

Returns the x-coordinate of the left edge of the bounding box.

xmin

Returns the x-coordinate of the left edge of the bounding box.

xsize

Returns the width of the bounding box.

y

Returns the x-coordinate center of the bounding box.

yaml_tag

ymax

Returns the x-coordinate of the left edge of the bounding box.

ymin

Returns the x-coordinate of the left edge of the bounding box.

ysize

Returns the height of the bounding box.

kcl

ports

size_info

dsize_info