Skip to content
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

Make each shield wire uniform and allow cable.shield color #126

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

kvid
Copy link
Collaborator

@kvid kvid commented Jul 26, 2020

As the spline shield wires are rendered as thin tinned wires with black borders, and the shield wires in cable nodes were rendered as a single (bottom) border, they didn't fit well together, e.g. in tutorial03.png:
tutorial03

The shield wires in cable nodes are now rendered equally as the spline shield wires. The default behavior is now kept as before multi-colors were introduced. This is tutorial03.png produced after the fix:
tutorial03

The new feature is that cable.shield is allowed to contain a two-letter color code to specify a colored shield wire with black borders. This is tutorial03.png produced from a modified YAML file:
tutorial03-fixed

--------------------------- tutorial/tutorial03.yml ---------------------------
index fba6e6d..fe75299 100644
@@ -13,7 +13,7 @@ cables:
     gauge: 0.25 mm2
     show_equiv: true
     color_code: DIN # auto-assign colors based on DIN 47100
-    shield: true # add cable shielding
+    shield: SN # add tinned cable shielding
 
 connections:
   -

With this new feature, it is also possible for the user to visualize copper or golden shields, and even different shields for different cables in the same diagram if needed.

The shield wire thickness is not increased, even if the cable has some multi-colored wires that makes all other wires to increase.

This fixes bug #125. I know #74 and/or #120 will probably change this, but as those draft PRs have no priority right now (in milestone v0.3 = do later), I suggest this tiny little change as a quick solution for now.

As the spline shield wires were rendered as tinned wires with
black borders, and the shield wires in cable nodes were rendered
as a single (bottom) border, they didn't fit well together.

Each shield wire is now rendered equally along the spline sections
and in cable nodes. If cable.shield is true, they are rendered as
thin black wires in the same way as before multi-colors were
introduced. The new feature is that cable.shield is allowed to
contain a two-letter color code to specify a colored shield wire
with black borders.

The shield wire thickness is not increased, even if the cable has
some multi-colored wires that makes all other wires to increase.

This fixes bug wireviz#125.
@kvid kvid changed the title Make shield wires in cable nodes equal as spline shield wires Make each shield wire uniform and allow cable.shield color Jul 27, 2020
@formatc1702 formatc1702 merged commit 1815a13 into wireviz:dev Jul 27, 2020
formatc1702 added a commit that referenced this pull request Jul 27, 2020
Feature introduced in #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants