SizeInfo

The i3.SizeInfo object stores information about the twodimensional extent of a geometrical object or a layout object. It can be used to perform further calculations.

SizeInfo

object which describes the bounding box of a shape, element or structure.

Retrieving the size info

Every i3.Shape has a property size_info which retrieves a i3.SizeInfo object.

import ipkiss3.all as i3
circle = i3.ShapeCircle(center=(5.0, 5.0), radius=4.0)
circle_sz = circle.size_info
print("height: {}".format(circle_sz.height))
print("west: {}".format(circle_sz.west))

Elements (like i3.Boundary, i3.Path, …) and i3.ElementList have a size_info() method which can be called to retieve their size information.

import ipkiss3.all as i3
circle = i3.Circle(layer=i3.Layer(0), center=(5.0, 5.0), radius=4.0)
circle_sz = circle.size_info()
print("height: {}".format(circle_sz.height))
print("west: {}".format(circle_sz.west))
import ipkiss3.all as i3
rect1 = i3.Rectangle(layer=i3.Layer(0), box_size=(10.0, 5.0))
rect2 = i3.Rectangle(layer=i3.Layer(0), center=(20.0, 0.0), box_size=(10.0, 5.0))
elements = i3.ElementList([rect1, rect2])
elements_sz = elements.size_info()
print(elements_sz)

Operations

i3.SizeInfo objects support addition and comparison. For example, the size information of multiple shapes, elements or layouts can be added to each other and the result will be the size of the combination.

import ipkiss3.all as i3
rect1 = i3.Rectangle(layer=i3.Layer(0), box_size=(10.0, 5.0))
rect2 = i3.Rectangle(layer=i3.Layer(0), center=(20.0, 0.0), box_size=(10.0, 5.0))
total_sz = rect1.size_info() + rect2.size_info()
print(total_sz)