WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

hide wiring information

Open wlgrd opened this issue 4 years ago • 9 comments

Is it possible to leave out the wire information, and just have the connections visible in the output?

wlgrd avatar Jan 11 '21 09:01 wlgrd

Is it possible to leave out the wire information, and just have the connections visible in the output?

Currently, it's possible to make it a bundle and hide the cable name and wire count:

Click to expand YAML input
connectors:
  X1:
    pincount: 4
  X2:
    pincount: 4

cables:
  W1:
    category: bundle
    wirecount: 4
    color_code: IEC
    show_name: False
    show_wirecount: False

connections:
  - - X1: [1-4]
    - W1: [1-4]
    - X2: [1-4]

issue212

  1. Do you want to hide the whole Cable/bundle box including all contents, leaving just the wire splines between connectors?
  2. Do you want to specify such a thing per cable, or for all cables in the harness?

If your answer to question 1 is yes, then I guess you might want something like this: issue212 gv (I had to manually edit the .gv file and execute dot -O -Tpng issue212.gv to obtain the image above.)

kvid avatar Jan 11 '21 15:01 kvid

image This is exactly what I'm thinking of. I haven't dived too deep into this module yet, could you elaborate on the .gv file?

wlgrd avatar Jan 11 '21 21:01 wlgrd

I never thought of this as a use-case, but I think it makes sense for simpler diagrams.. An additional attribute for the cable would be necessary, and the GraphViz rendering would need to take this into account... I would welcome a PR for this matter!

17o2 avatar Jan 14 '21 17:01 17o2

This is exactly what I'm thinking of. I haven't dived too deep into this module yet, could you elaborate on the .gv file?

The .gv file is an intermediate file generated by WireWiz that is input to Graphviz for creating the diagram. Manually editing this file is time consuming for a large harness, and not recommended as a final solution.

When I get the time, I can try creating a PR supporting such a feature. It might fit well together with a couple of other changes I have in mind.

kvid avatar Jan 16 '21 16:01 kvid

Sounds good, I'm curious to hear about your other ideas.

17o2 avatar Jan 17 '21 19:01 17o2

@wlgrd asked how to hide the wire information more than a year ago. If you (or other visitors) still need this feature, see my work-around suggestion below.

When I get the time, I can try creating a PR supporting such a feature. It might fit well together with a couple of other changes I have in mind.

I'm sorry that I haven't had the time for this, but I still have my notes with ideas that could both resolve this and enhance the loops feature, but at the moment I should probably wait for the merging of PR #251 to avoid major conflicts in the code to generate the GV HTML.

The .gv file is an intermediate file generated by WireWiz that is input to Graphviz for creating the diagram. Manually editing this file is time consuming for a large harness, and not recommended as a final solution.

The tweak work-around suggested in https://github.com/formatc1702/WireViz/issues/174#issuecomment-707372543 was added in v0.3 and that can help this old issue. Inspired by the https://github.com/formatc1702/WireViz/issues/270#issuecomment-1029535877, I found a work-around for this issue as well. Append the following to my one year old YAML input suggestion above:

tweak:
  override:
    graph:
      ranksep: "0.5"  # Reduce the horizontal spacing (default 2)
    W1:
      shape: none  # Hide the surrounding frame
      fontsize: "12"  # Reduce the space needed for text
      fontcolor: white  # Same as background to hide the text

This should then be the result, and is close to what you aimed for: issue212-tweak12

kvid avatar Feb 04 '22 18:02 kvid