Add show_wire_loops option to suppress cable self-loop edges
Some checks failed
Create Examples / build (ubuntu-22.04, 3.7) (push) Has been cancelled
Create Examples / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.10) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.11) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.12) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.9) (push) Has been cancelled
Some checks failed
Create Examples / build (ubuntu-22.04, 3.7) (push) Has been cancelled
Create Examples / build (ubuntu-22.04, 3.8) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.10) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.11) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.12) (push) Has been cancelled
Create Examples / build (ubuntu-latest, 3.9) (push) Has been cancelled
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:
parent
65af27e0da
commit
67a9cf9bac
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user