Place

class ipkiss3.all.Place(pos_selector, position, angle=None)

Specifies that an instance or its port should be placed on a given position and angle (angle is optional).

If angle is not specified (i.e. angle=None), then the instance will keep its original transformations.

If angle is specified, the original transformations will be overridden and the instance will be rotated.

If you specify an angle and choose to place a port that has an angle, then the instance is rotated such that the port’s angle will equal this desired angle.

If you place a port with an undefined port angle (angle=None), and you specify an angle in Place, then the port’s angle will stay ‘None’ but its instance will be rotated.

Examples

# Place ‘inst’ at (0, 0), original transformations are kept >>> i3.Place(‘inst’, (0, 0)) # Place ‘inst’ at (0, 0) with a rotation of 90 degrees, original transformations are discarded >>> i3.Place(‘inst’, (0, 0), angle=90) # Place port ‘out’ of ‘inst’ at (0, 0) with the angle of the port of the instance >>> i3.Place(‘inst:out’, (0, 0)) # Place port ‘out’ of ‘inst’ (original port angle = 180) at (0, 0), with port angle 90 degrees, original transformations are discarded >>> i3.Place(‘inst:out’, (0, 0), angle=90) # Place port ‘out’ of ‘inst’ (original port angle is None) at (0, 0), with a rotation of 90 degrees, original transformations are discarded >>> i3.Place(‘inst:out’, (0, 0), angle=90)