Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arbitrary lumped port directions #122

Open
nikosavola opened this issue Sep 13, 2023 · 3 comments
Open

Allow arbitrary lumped port directions #122

nikosavola opened this issue Sep 13, 2023 · 3 comments
Labels
enhancement New feature or request no-issue-activity

Comments

@nikosavola
Copy link
Member

Is your feature request related to a problem? Please describe.
awslabs/palace#75 is now merged and arbitrary rotation ports are supported. The implementation for Palace scattering in gplugins however supports only an orientation from ["+X", "+Y", "-X", "-Y"].

Describe the solution you'd like
Generalise inferring the lumped port direction and use new Palace format for arbitrary orientation

def _xy_plusminus_direction(point_1, point_2):
# TODO update after https://github.com/awslabs/palace/pull/75 is merged
delta_x = point_2[0] - point_1[0]
delta_y = point_2[1] - point_1[1]
angle = atan2(delta_y, delta_x)
angle_deg = degrees(angle) + 360
directions = ["+X", "+Y", "-X", "-Y"]
index = round(angle_deg / 90) % 4 # TODO check if shift is correct
return directions[index]
lumped_two_port_directions = {
ports[0]: _xy_plusminus_direction(
*[component.get_ports_dict()[port].center for port in ports]
)
for ports in itertools.chain(
lumped_two_port_pairs, [tuple(reversed(e)) for e in lumped_two_port_pairs]
)
}

Copy link

This issue is stale because it has been inactive for 60 days. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@nikosavola
Copy link
Member Author

Issue still persists

Copy link

github-actions bot commented Feb 5, 2024

This issue is stale because it has been inactive for 60 days. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-issue-activity
Projects
None yet
Development

No branches or pull requests

1 participant