-
Notifications
You must be signed in to change notification settings - Fork 227
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
[feature] Add heatshrink / sheathing information #31
Comments
I have been thinking of a |
It is possible to use GraphViz' cables:
W1:
...
W2:
...
...
sheathing:
S1:
cables: [W1, W2, W3]
type: abc
attr: etc
... |
How about splitting a cable into one node in each independent subgraph, but only one of them needs the annotations? The extra cable nodes can be "invisible" to force the wires through the subgraph. If you want the annotations outside of all the subgraphs, then add invisible nodes for each subgraph and have the real cable node outside. |
You might need som way to specify distance from a connector to a sheathing? Can this be used to calculate the order of the invisible nodes along the harness? |
I don't know how (if possible) to create a subgraph containing another subgraph. It seems each node can only be included in one subgraph. I did try some alternatives here: https://dreampuf.github.io/GraphvizOnline/ |
I recommend using Edotor.net for playing around with GraphViz. The editor is brilliant. |
@formatc1702 wrote:
I started creating a .yml file to generate something similar: Then, I modified the .gv file to include sheatings as subgraphs containing invisible wire nodes: Then, I modified the .gv file even more to include heat shrinks as subgraphs containing an invisible wire node plus a connector: Do you think a variation of this might be useful? Any suggestions to improve this? |
I think GraphViz always tries to minimize the sum of all edge lengths in the graph. If W3 were below Cable sheathing 2, it would end up with longer edges. See examples pre 7ee78b7 commit (ancient history), eg. example 03 from 7151346. Wires are supposed to be alternating red/black, but GraphViz tries to be clever and rearrange them "optimally". I tried doing invisible edges between the invisible nodes of a bundle, to no avail... For comparison, here's what it was supposed to look like all along, and what it looks like now, after the fix: I can't offer a solution right now, but I thought I would share. |
To answer your other question...
Absolutely! I don't know how we could auto-generate the invisible nodes in the correct position, or how hard that is to implement, but if we can figure it out, and somehow override the edge length minimization issue, I think you're on to something here. |
You can use |
Good idea. It might not be easy to automatically select which nodes to have the same ranks, but maybe we could have an optional YAML entry like this:
I did a few experiments with |
Another thing that might help, is to combine all invisible nodes on the same rank inside a sheathing into a common invisible node to avoid that Graphviz swap their order. Edit: Using a variant of the syntax suggestion from #31 (comment):
I'm not sure how easy it will be to automatically determine where to create invisible wire nodes and their order - maybe based on the order in the specification above? Otherwise, it might be possible to add a numeric suffix to the wire entries above to indicate an invisible node and the order between them. If some cables/wires break out of a tubing/sheathing somewhere in the middle, how can that be specified? Can it be solved by splitting it in two consecutive tubing entries with the same name, but different contents before and after breaking out? Or maybe something like this:
|
Inspired by a recent issue, I pick up this old thread again. How about specifying each heatshrink section as a separate bundle and splice the wires going through several bundles using «virtual splices» as I suggest in #270 (comment)? |
Hello, I am new to wireviz and am trying to spec a cable that has an external ferrite attached. The type of diagram I am looking for is exactly like what SnowMB commented above, just replace the "Cable sheathing 1" label (for example) with the ferrite PN. Then I could add a note box that gives details about the position of the ferrite along the cable bundle or something. I just wanted to point out that this functionality could also support ferrites and would love to see this implemented ASAP! :) |
@izyb please see #155 where cable glands were requested. This is closer to what you expect. The difference is that sheathing and heatshrinks are applied to the cable. They have an impact on wire length, while ferrites and cable glands would not. The latter are just components that are added to the BOM. They would be treated similar to a connector which does not have any length information. |
@izyb - As I also partly suggested in #155 (comment), you can today use Please add your use case in #155 to aim for a common solution. |
@martinrieder wrote:
That might be a good idea? I suggest you make such a comment in #155 - it doesn't really belong here. If @izyb doesn't present his use case himself, you can mention that as well, and link to his comment here. |
No description provided.
The text was updated successfully, but these errors were encountered: