WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

[feature] How to short multiple pins on one connector?

Open azivkovic3l opened this issue 4 years ago • 14 comments

azivkovic3l avatar Jun 30 '20 16:06 azivkovic3l

There is primitive functionality to attach two pins of the same connector. Please see the end of this modified example:

connectors:
  X1:
    type: D-Sub
    subtype: female
    pinout: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
  X2:
    type: Molex KK 254
    subtype: female
    pinout: [GND, RX, TX]

cables:
  W1:
    gauge: 0.25 mm2
    length: 0.2
    color_code: DIN
    wirecount: 3
    shield: true

connections:
  -
    - X1: [5,2,3]
    - W1: [1,2,3]
    - X2: [1,3,2]
  -
    - X1: 5
    - W1: s
  - # short pins 6,7,8 together (specifically: short pin 6 to 7 (first column), and pin 7 to 8 (second column)
    - X1: [6,7]
    - X1: [7,8]

See the output below. It's not pretty, so I am open for suggestions on how to best visualize this. I guess there is also a difference between running a wire between two pins, and connectors that allow some other sort of shorting internally.

test

formatc1702 avatar Jun 30 '20 16:06 formatc1702

maybe it would be necessary to specify a starting and ending angle and a width, so that the shortage can be shorter?

edit: a color setting is missing if i'm not mistaking

quotschmacher avatar Jul 01 '20 08:07 quotschmacher

Thanks for quick reply,

Short term, it would be nice to include this option in examles so everibody know about it. Long term, consider shorter length of connection line.

Regards, Aleksandar

On Wed, Jul 1, 2020, 10:49 AM Sven [email protected] wrote:

maybe it would be necessary to specify a starting and ending angle and a width, so that the shortage can be shorter?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/formatc1702/WireViz/issues/48#issuecomment-652285171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL75PNRDKR3EXHXSVGP2V63RZL2C5ANCNFSM4OMN26HQ .

azivkovic3l avatar Jul 01 '20 10:07 azivkovic3l

Yes, I do agree the current implementation is ugly and missing information... any ideas and/or pull requests on this topic are welcome!

formatc1702 avatar Jul 01 '20 10:07 formatc1702

my python is too weak to help i think. what about a (overriding) color attribtue for the connection? overriding: override the cable color if a cable is used. and an array in preparation for multi-color wires.

connections:
  - color: [RD]
    - Relais1: [6, 12, 18 ]
    - Relais1: [12, 18, 24]

quotschmacher avatar Jul 01 '20 11:07 quotschmacher

Here's a mockup of what it could look like: IMG_3700

I'm not sure how easy that would be to represent graphically... I'll think about it. A possible input syntax could be:

connectors:
  X1:
    pinout: [...]
    internal_shorts:
      - [1,2]
      - [3,5,7]
      - [4,6]

The primitive example from my comment above, with external loops, could be solved in a similar way:

connectors:
  X1:
    pinout: [...]
    external_shorts:
      - [6,7] # exactly 2 pins must be specified, because that's how wires work
      - [7,8]

Only thing missing is a bit of info on what kind of wire to use for the external shorts.

formatc1702 avatar Jul 10 '20 17:07 formatc1702

I need small help, I'm using your dev branch because of new features that are still not in master. I see that pins shorting feature is moved to version 0.3. Until than, dev branch complains with the following "Exception: X1 is not in cables" when I define that connector X1 must have shorted pins 3 and 10: - X1: [3,10] - X1: [10,3]

What is a new syntax for this shorting in dev branch?

azivkovic3l avatar Aug 19 '20 11:08 azivkovic3l

Sorry for the super late reply! In the newly released v0.2, try the following to short pins 3 and 10... it will be displayed as a wire loop between them, and you have no control over the wire appearance/properties, but maybe this helps you.

X1:
  # connector parameters
  loops:
    - [3, 10]

PS: Long explanation: The way the connections section works right now, is that it is very strict about alternating between connectors and wires, so you can't have X1 (which is a connector) followed by itself.

formatc1702 avatar Oct 20 '20 11:10 formatc1702

Hi, I have a small issue with those loops. On one of my project the loop wire is hidden behind the Wire description table next to the connector 2022-08-23-180007_563x264_scrot It's not really readable :(

EDIT: Just saw that this is already reported in #286

dbozec avatar Aug 23 '22 17:08 dbozec

Yes, I think loops and internal shorts is something we should tackle soon, since a lot of users request this and complain about the current implementation... which is understandable :)

formatc1702 avatar Aug 25 '22 18:08 formatc1702