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

Loops function #260

Closed
TTROD2MLE opened this issue Nov 23, 2021 · 3 comments
Closed

Loops function #260

TTROD2MLE opened this issue Nov 23, 2021 · 3 comments

Comments

@TTROD2MLE
Copy link

Hi all,
I'm trying to use the Loops function but I can't find any example.
What I want to do is to connect pins on a same connector and I guess this is the right function to use.
Can anybody help me?
Thanks!

@formatc1702
Copy link
Collaborator

Hi,

  • The actual loops attribute of a connector is very primitive. It is a list, where every entry needs to be a list with exactly two pin numbers. You cannot control the apppearance (color) or any parameters of the loop "wire"
  • You can also create a loop using a real cable inbetween, but the rendering admittedly leaves something to be desired.

See the following code which implements both variants:

connectors:
  X1:
    pincount: 4
    loops:
      - [1, 2]  # simple loop

cables:
  W1:
    wirecount: 1
    colors: [GN]

connections:
  -  # loop using a "real" wire
    - X1: [3]
    - W1: [1]
    - X1: [4]

Result:
loops

@formatc1702
Copy link
Collaborator

See also #48 for discussion on some possible future implementations.

@TTROD2MLE
Copy link
Author

Thank you so much for the quick answer, it will be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants