feature: draw a colored braided sleeve around a cable bundle (#503) - #504
Open
VoltixSpark wants to merge 2 commits into
Open
VoltixSpark wants to merge 2 commits into
VoltixSpark wants to merge 2 commits into
Conversation
…#503) Add an optional `sleeve_color` cable attribute. When set, the conductor bundle is drawn inside a colored braided sleeve - a two-tone basket-weave band across the top and bottom of the conductor table with thin colored side rails - and a "+ Sleeve" indicator with the color name is added to the cable header. Upstream can already list a sleeve via additional_components (BOM only); this draws it on the diagram. Composes with shield, works for bundles and sheathed cables, and has no effect when unset. Refs wireviz#503
Concise tutorial example (source .yml + .md description) showing how to draw a colored braided sleeve around a bundle. Generated outputs are not committed; the owner rebuilds them. Refs wireviz#503
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #503
What
Adds an optional
sleeve_colorcable attribute that draws a colored braided sleeve/wrap around the conductor bundle, and adds a+ Sleeveindicator with the color name to the cable header.WireViz can already list a sleeve via
additional_components(BOM only); this renders it on the diagram, which is useful for harnesses that use colored braided sleeving as a build and identification aid.Screenshot
Example
Implementation
wv_dataclasses.py: newCable.sleeve_color(SingleColor), converted in__post_init__like the other color fields.wv_graphviz.py:gv_sleeve_braid_band()builds a two-tone basket-weave band;gv_conductor_table()draws it across the top and bottom of the bundle with thin colored side rails whensleeve_coloris set; the cable header gains a+ Sleeve <color>indicator.docs/syntax.mdanddocs/CHANGELOG.mdupdated.Composes with
shield, works for both bundles and sheathed cables, and has no effect when unset. No new runtime dependencies.Notes / open questions
blackandisortper CONTRIBUTING. Generated example/tutorial outputs are intentionally not included.