SiEPIC / SiEPIC-Tools

Package for KLayout to add integrated optics / silicon photonics functionality (waveguides, netlist extraction, circuit simulations, etc)
Other
184 stars 92 forks source link

Resize waveguide script shows incorrect waveguide length #166

Closed PsKirwin closed 2 years ago

PsKirwin commented 2 years ago

Hi there,

The resize waveguide function (Waveguides -> Resize Waveguide) currently shows an incorrect waveguide length. If the waveguide is 500 nm wide, this incorrect length is always 5 times the correct length (as returned by the Measure Waveguide Length function). From looking at the script (line linked below), it appears that the culprit is the fact that the waveguide length is calculated using the underlying path's width, rather than the waveguide's relevant PCell parameter, as is done in the Measure Waveguide Length function.

https://github.com/SiEPIC/SiEPIC-Tools/blob/2943391e6f47bdc38f4a963dd6572f76714ad418/klayout_dot_config/python/SiEPIC/scripts.py#L2731

Best, Phil

jaspreetj commented 2 years ago

Thanks for reporting the issue. The issue is fixed in the latest commit.