def create_t2(self): cell = spira.Cell() tf_1 = spira.GenericTransform(translation=(10, 10), rotation=45) tf_2 = spira.GenericTransform(translation=Coord(10, 10), rotation=45, reflection=True) cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=3)) S1 = spira.SRef(cell, transformation=tf_1) S2 = spira.SRef(cell, transformation=tf_2) return [S1, S2]
def create_t2(self): T = spira.GenericTransform(rotation=-60) ply = spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=3), transformation=T) return ply
def create_t2(self): tf = spira.GenericTransform(translation=Coord(-22, 0)) ply = spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=3), transformation=tf) return ply
def create_t2(self): cell = spira.Cell() cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=3)) T = spira.GenericTransform(rotation=-60) S = spira.SRef(cell, transformation=T) return S
import spira.all as spira R = spira.Rotation(30) T = spira.Translation((30, 0)) F = spira.Reflection(True) G0 = R + T + F G1 = spira.GenericTransform(translation=spira.Coord(-10, 0), rotation=45) G2 = spira.GenericTransform(translation=spira.Coord(-10, 0), rotation=45, reflection=True) G3 = spira.GenericTransform() G3 += R G3 += T G3 += F print(R) print(type(R)) print('') print(T) print(type(T)) print('') print(F) print(type(F)) print('') print(G0) print(type(G0)) print('')