question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for Wire diagrams

See original GitHub issue

Input

connectors:
  X1:
    type: D-Sub
    subtype: female
    pinout: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
  X2:
    type: Molex KK 254
    subtype: female
    pinout: [GND, RX, TX]

cables:
  W1:
    gauge: 0.25 mm2
    length: 0.2
    color_code: DIN
    wirecount: 3
    shield: true

connections:
  -
    - X1: [5,2,1]
    - W1: [1,2,3]
    - X2: [1,3,2]
  -
    - X1: 5
    - W1: s

Output

demo01

Format:

  • mywire.gv GraphViz output
  • mywire.svg Wiring diagram as vector image
  • mywire.png Wiring diagram as raster image
  • mywire.bom.tsv BOM (bill of materials) as tab-separated text file
  • mywire.html HTML page with wiring diagram and BOM embedded

We can start by supporting png and svg.

Runtime

Python 3.7

Project

https://github.com/formatc1702/WireViz

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jhogendorncommented, Aug 22, 2022

https://github.com/jhogendorn/kroki-wireviz

I’ve thrown together a quick POC. if you pull it and run make build you can then make run and then make demo-svg

  • Runs on port 8010.
  • uses .tool-versions from asdf.
  • Locks versions (dockerfile uses .tool-versions)
  • theres a basic test suite, make test,
  • groundwork scope for container based testing
  • poetry based
  • pytest based functional tests

it supports png/svg as thats what wireviz outputs natively. we could grab a diff lib to convert from svg to arbitrary image formats.

I spent a short while setting up a ‘more correct’ production dockerfile but lost interest in fiddling with it at this POC stage.

PR’s welcome.

0reactions
jhogendorncommented, Aug 25, 2022

That’s quite nice, I didn’t know this tool but I will closely evaluate it because the packaging and dependency management in Python is definitely convoluted and hard to understand!

Python package management is really poor in general, and python people seem to be really blind to it. Poetry is… fine, its better than pip and other solutions. its kind of like npm a bunch of years ago.

Integration-wise, I’m considering using one companion container per technology stack rather than one companion container per diagram library. Both solutions have advantages and disadvantages but I feel like we could be more resource-efficient.

I would prioritise for maintainer sanity rather than resource efficiency. combining containers may save you some incredibly minor, unnoticeable amount of resource, but make maintainer complexity much harder. version management, diff tools needing diff versions of python or libraries or whatever. I personally would keep it one thing one container.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Everything You Need to Know About Wiring Diagram
A wiring diagram is a simple visual representation of the physical connections and physical layout of an electrical system or circuit.
Read more >
Create an electrical engineering diagram - Microsoft Support
Use Visio to create electrical engineering diagrams, including basic electrical, circuits and logic, systems, and more.
Read more >
How to Draw Circuit and Electrical Diagrams with SmartDraw
See how you can create wiring diagram, circuit diagrams, and other electrical plans with SmartDraw's drag and drop electrical symbols and ...
Read more >
Electrical diagram | how to install electrical wiring in a house
You can easily add symbols and images with the help of the drag and drop ... How to Draw 5 Pin CDI Wiring...
Read more >
How to Read Electrical Diagrams - YouTube
Join us here, get awesome perks, and support us, all at once:https://www.youtube.com/c/upmation/joinRead the full blog post at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found