Add show_wire_loops option to suppress cable self-loop edges

Cable self-loop edges (W1:e → W1:w) arc over the cable table to show
internal wire routing, but add visual noise on straight-through
harnesses. New Options field defaults to True for backward compat.

Usage:
  options:
    show_wire_loops: false
This commit is contained in:
Ryan Malloy 2026-02-13 16:52:33 -07:00
parent 65af27e0da
commit b44c3e0766
2 changed files with 5 additions and 3 deletions

View File

@ -86,6 +86,7 @@ class Options:
bgcolor_bundle: SingleColor = None bgcolor_bundle: SingleColor = None
color_output_mode: ColorOutputMode = ColorOutputMode.EN_UPPER color_output_mode: ColorOutputMode = ColorOutputMode.EN_UPPER
mini_bom_mode: bool = True mini_bom_mode: bool = True
show_wire_loops: bool = True
template_separator: str = "." template_separator: str = "."
output_dpi: Optional[float] = 96.0 output_dpi: Optional[float] = 96.0
_pad: int = 0 _pad: int = 0

View File

@ -387,9 +387,10 @@ class Harness:
if not (r1, r2) == (None, None): if not (r1, r2) == (None, None):
dot.edge(r1, r2) dot.edge(r1, r2)
for color, we, ww in gv_edge_wire_inside(cable): if self.options.show_wire_loops:
if not (we, ww) == (None, None): for color, we, ww in gv_edge_wire_inside(cable):
dot.edge(we, ww, color=color, straight="straight", href='') if not (we, ww) == (None, None):
dot.edge(we, ww, color=color, straight="straight", href='')
for mate in self.mates: for mate in self.mates:
color, dir, code_from, code_to = gv_edge_mate(mate) color, dir, code_from, code_to = gv_edge_mate(mate)