QuanticParis / HFSSdrawpy

Draw HFSS designs using python
MIT License
17 stars 23 forks source link

draw_cable_auto() + Meander() port orientation #53

Open phelyx42 opened 2 years ago

phelyx42 commented 2 years ago

What

only vaild in HFSSdrawpy/alice_et_bob

the stretch parameter in Meander gives different results depending on the port orientation

image

minimum Example


import os
from HFSSdrawpy import Body, Modeler
from HFSSdrawpy.parameters import DEFAULT, GAP, TRACK
from HFSSdrawpy.path_finding.path_finder_auto import Meander

pm = Modeler('gds')
chip = Body(pm, 'chip')

positions = [
    [[-0.5e-3, 0.5e-3], [-1,0]],
    [[-0.5e-3, -0.5e-3], [-1,0]],
    [[0.5e-3, 0.5e-3], [1,0]],
    [[0.5e-3, -0.5e-3], [1,0]],
]

ports = []
for ii, pos in enumerate(positions):
    with chip(pos[0], pos[1]):
        ports += chip.port(widths=[10e-6], name=f'port_{ii}')

meander = Meander(index=1, n=3, pos=0.5, stretch=True)
chip.draw_cable_auto(ports[0], ports[1].r, name='cable1', fillet=40e-6, meanders=[meander], target_length=3e-3)
chip.draw_cable_auto(ports[2], ports[3].r, name='cable2', fillet=40e-6, meanders=[meander], target_length=3e-3)

chip.generate_gds(os.getcwd(), 'pathfinding')