- Notifications
You must be signed in to change notification settings - Fork36
Custom-made draw.io-shapes - in the form of an importable library - for drawing circuits and conceptual drawings in draw.io.
License
NicklasVraa/Draw-io-ECE
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains custom-made draw.io-shapes - in the form of an importablelibrary - for drawingelectrical engineering andcomputer-science related diagrams, such as circuits and control-architectures indraw.io.
Other than LaTeX with the CircuiTikZ package, there aren't really any good ECE-drawing tools available, which can:
- Run offline on all OS's
- Produce textbook-quality circuit diagrams.
- Supports LaTeX math typesetting.
- Export vector-graphics, i.e. SVG.
- Auto-connect and update connections when moving components.
CircuiTikZ produces beautiful results, but it's time-consuming. Most people drawing circuits need a GUI.Draw.io is a general-purpose diagramming tool, which already contains libraries for drawing circuits.
The problem is that many of the shapes do not align themselves - or their connectors - to the drawing grid and are completely mismatched in size. They are also not setup to handle text-labels from the get-go, e.g. if you rotate an element, the symbol will be obscured by its own label. This means that drawing circuits inDraw.io becomes much more of an exercise in aligning and scaling shapes, which is annoying and time-comsuming.
Hence this simplelibrary.
In draw.io, simply clickFile in the menu-bar, and then chooseOpen library..., then navigate to thexml-file. I highly recommend turning offview->guides to make componenents only align to the grid.
These are some the ECE-components, which are currently available.
![]() ![]() | ![]() ![]() |
Another benefit of Draw.io: Dark mode and customizable UI.
| Default Dark | Nord Theme |
|---|---|
![]() | ![]() |
To apply a theme, clickExtras in the menu-bar, thenConfiguration... and paste the contents ofthemes/some_theme.json, likenord.json, into the text-area. Before applying a darkish theme, like nord, have the built-in theme set to dark, and vice-versa for light themes.
To use your drawings in your LaTeX-report, export them as a cropped PDF from Draw.io and then import them into your.tex document. This ensures that everything is formatted and positioned correctly.
You can optionally remove the white background by opening the PDF-file in Inkscape or similar, and delete it, then save as SVG. Here is a tiny Inkscape script that does exactly that, assuming that "$*" is the input. I use it with Nemo's (Linux Mint's file explorer) right-click script-runner.
inkscape --actions="select-by-id:path1;delete;select-all;page-fit-to-selection;" --export-type=svg "$*";mv "$*.svg" "$(basename "$*.svg" | cut -d. -f1).svg";rm "$*"| Single transistor circuits | Operational Amplifiers | Analog Filters |
|---|---|---|
![]() | ![]() | ![]() |
Want to add more components to the library?
- To create custom shapes in Draw.io, click
arrangein the menu-bar, and then chooseinsertand thenshape, which brings up an xml-editor with a preview. Check out theexample xml-files for inspiration. - Make sure that your components align with the grid - especially their connection-points - when the element has its proper scaling.
- Remember to setup the text-label and try it in all four orientations.
I encourage you to read thistutorial, if you want to add complex custom shapes.
If you know of a better tool for drawing ECE-diagrams such as circuits for academic reports, let me know.
LEGAL NOTICE: This repository, including any and all of its forks and derivatives, may NOT be used in the development or training of any machine learning model of any kind, without the explicit permission of the owner of the original repository.
About
Custom-made draw.io-shapes - in the form of an importable library - for drawing circuits and conceptual drawings in draw.io.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.








