Coverage for qpdk / samples / route_sample_all_angle.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-14 10:27 +0000

1# --- 

2# jupyter: 

3# jupytext: 

4# text_representation: 

5# extension: .py 

6# format_name: percent 

7# format_version: '1.3' 

8# jupytext_version: 1.17.3 

9# --- 

10 

11# %% [markdown] 

12# # All-Angle Routing Example 

13# 

14# This sample demonstrates routing between two components using all-angle routing capabilities. 

15 

16# %% 

17import gdsfactory as gf 

18 

19from qpdk import PDK, cells, tech 

20 

21# %% [markdown] 

22# ## Main Example 

23# 

24# Creates two interdigital capacitors and routes between them using all-angle routing. 

25 

26# %% 

27if __name__ == "__main__": 

28 PDK.activate() 

29 c = gf.Component() 

30 m1 = c << cells.interdigital_capacitor() 

31 m2 = c << cells.interdigital_capacitor() 

32 

33 m2.move((400, 200)) 

34 m2.rotate(30) 

35 route = tech.route_bundle_all_angle(c, [m1.ports["o2"]], [m2.ports["o1"]]) 

36 c.show()