WireViz
WireViz copied to clipboard
feature: different gauges and different lengths in connections
- [ ] IIUC it is not possible to have different gauges per cable. This is something we encounter quite often (data cables and current cables bundled for an electric engine)
- [ ] Every connection might have a different length. This feature requires some indication of a center from which to indicate lengths in both directions, Might be tricky
-
Different gauges per cable could easily be specified as an optional list of gauges (one for each wire), but to show them in the diagram, a new row for each wire might be needed (or alternatively just after the wire color).
-
To specify a different length for each connection, I suggest two new optional attributes
length_left
andlength_right
to specify a list of extra lengths for each wire at each end of the cable in the same unit aslength_unit
. These new values might perhaps be shown as spline labels at each side of the cable node, but then unconnected wire ends cannot show it's length. Maybe a new row for each wire might be needed for this purpose as well (or alternatively just after the source pin and just before the destination pin).- The length of each wire in a bundle is then
length_left[i] + length + length_right[i]
. - The length of a cable is then
max(length_left) + length + max(length_right)
and we probably need abase_length
orjacket_length
multiplier to return just thelength
for sleeve lengths, etc. - Maybe
length_left
andlength_right
could be namedleft_end
andright_end
instead? - Maybe the current
length
should be namedbase_length
or something similar?
- The length of each wire in a bundle is then
This could be one way to show these values in a diagram:
This is the manually edited Graphviz file, based on tutorial08.gv, that created the image above: issue268.gv.txt
I would VERY much like to have different gauges per cable. For doing an automotive harness there are always multiple different wire sizes, and wire types within the harness. The view above would work very well.
If the different lengths facility above were to show up, I could definitely make use of that ...
The two feature requests in this issue are independent and can be implemented independently of each other - maybe in two different PRs, but @formatc1702 wants to finish and merge PR #251 before any other PR that change code for diagram nodes. It seems he has not been able to work much on this project the last months, so it might take a while.
Anyone of us are free to create a PR based on the current dev
at any time, but it would involve rebasing and re-adapting the code again after #251 is merged before any such new feature can be merged.
I would also like to get more feed-back on how the new features should look like. The gauges feature is the easiest to implement, and should perhaps be done first. My suggestion above includes a summary of gauges for all wires just to the right of the wire count, but I have changed my mind, and I now suggest removing that because the same information is shown for each wire below.
I kind of like the summary of gauges - it serves as a checkpoint. Handy to verify things, especially if you have a bundle of a LOT of wires. For example, the automotive wiring harness I'm working on has one section with 49 wires, and the main trunk with 86 wires.
Unfortunately, such large wire bundles get ... cumbersome. So I was thinking of another boolean flag for a Wire object compact_view. With that set to true, the wire object would not be expanded to show every wire inside, just the information blocks. All the wires entering would collapse down to a much smaller point, and exit the other side from a similar smaller point.
@Halfwalker wrote:
I kind of like the summary of gauges - it serves as a checkpoint. Handy to verify things, especially if you have a bundle of a LOT of wires. For example, the automotive wiring harness I'm working on has one section with 49 wires, and the main trunk with 86 wires.
Your view is valuable input to how this proposed feature should work. Maybe such a summary should be optional? I would guess there are also cases where a summary doesn't add any insight, and the user might then prefer to avoid bloating the bundle object with repeated information.
Unfortunately, such large wire bundles get ... cumbersome. So I was thinking of another boolean flag for a Wire object compact_view. With that set to true, the wire object would not be expanded to show every wire inside, just the information blocks. All the wires entering would collapse down to a much smaller point, and exit the other side from a similar smaller point.
Please elaborate. A sketch would also help. Is this new feature something similar to a bus of wires that are often viewed in other drawing tools as a thick line that splits into a set of thin wire lines at both ends? However, I suggest you create a new issue for this as it seems not direcly related to the original issue.
Yup, definitely optional. A simple flag would work, and in fact I would both use it and not use it. Heh, I mean I would do one render with it turned off, for an overview type view of the harness, and one with it turned on for the full detail to be used while building or verifying the harness.
The same would apply for the compact_view flag mentioned above. I think conceptually the view could be considered as a virtual junction point for all the wires coming in from a connector. With the flag off, each wire goes into the wire object individually, as usual
Whereas with the flag ON, each wire would go into the wire object to a single point, much like the blue wires for the ferrule-crimp here
Hrm, we could even get fancy ... Instead of a single point for every wire in the bundle, perhaps have a group-membership property for each wire. For example, all the power and GND wires could go into a POWER group, left side of engine go into a LEFT group and so on. Each group would have it's own single point in the wire object.
That group property could be specified at either the connector or the cable object in the yml file. I think at the connector is probably better, though perhaps both ? With one taking priority if both are defined.
connectors:
EA2:
hide_disconnected_pins: true
pincount: 5
pincolors: [BK, BKRD, IV, WH, BKRD]
pinlabels: [Starter relay pin 5, EFI main relay OUT pin 5, NC, 7.5A Alt-S fuse, EFI relays]
groups: [RELAYS, RELAYS, , POWER, RELAYS]
pn: 90980-11413
image:
src: Supra_EA2.png
cables:
Fusebox-cabin1: &template_main
gauge: 20
length: 2
colors: [WHGN, GY, BU, BKRD, VTWH, GNYE, BK]
groups: [SENSOR, SENSOR, POWER, POWER, RELAYS, RELAYS, POWER]
If this all makes sense and you think it worth doing, then I'll create a new issue