BREP_ecad_egui — embeddable electronics editors for egui
Part of the next.BREP.io Rust B-rep kernel: cargo add BREP_ecad_egui · licence summary
BREP_ecad_egui draws the BREP CAD application's electronics editors into any
egui Ui: schematic and wiring-diagram
sheets, the board, a symbol editor and a pads (footprint) editor, over the
documents of BREP_ecad_core.
It is for an application that wants a working schematic or board editor
inside its own window. The host owns file I/O and the application chrome:
an editor interprets pointer and key input, edits the Document it holds, and
reports that something changed. It opens no files, owns no menus and has no
GPU or CAD-kernel dependency; its only dependencies are BREP_ecad_core and
egui.
Example
use ;
use Editor;
/// Held by the host application between frames.
Editor::library_panel and Editor::inspector draw the parts library and the
selection's properties wherever the host puts them; Editor::parts is the
list of parts the host offers to place.
The contract
Editor— the schematic / wiring-diagram editor.take_changereturns aChangeonce per edit (with a coalescing key for edits typed into one field), so the host can fold it into its own undo stack and dirty tracking;undo/redouse the editor's ownHistory.Tool,Selection,Part— the active tool, what is selected, and a placeable part as the editor sees it.Action,ActionGroup,actions()— every command the editor can perform, named and grouped, so a host builds its toolbar, menus and automation from one list rather than hard-coding button ids.Editor::run_action(id)runs one by id, as a click on its button does.View,BoardTool,BoardSelection— the board editor (Editor::set_viewswitches between the sheet and the board).Editor::erc_state— whether the electrical rule check in the editor's connectivity panel has run, and its findings.SymbolEditorandsymbol_actions()— the symbol editor;PinPointshands it the connection point the host binds to each pin, to show beside it.FootprintEditorandpad_actions()— the pads (footprint) editor.power_symbol,POWER_NETS,is_ground— the power symbols the Power tool places.keys_reach_editor— whether keyboard input should go to an editor this frame (no text field, popup or modal has it).widgets::enum_dropdown— the dropdown the editors' panels use for an enumeration, with its hit rectangles keyed for automation.
The sheet, board, symbol and footprint canvases paint their own dark background; panels and controls use the host's egui visuals. The editors load no texture or font of their own.
BREP_ecad_core's autorouter and design checks are compute-heavy; a host
building in a debug profile will want:
[]
= 2
Feature flags
None.
Licence
In plain words: the crates are free to use as they are, including in a commercial project. If you fix or change something in the kernel, send the change back as a pull request to github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL. If you do not want to share your changes, buy a commercial licence from Autodrop3d LLC; with it you never have to share your code back.
The exact terms are in LICENSE.md, shipped in the crate (license-file in the manifest) and at
LICENSE.md; if this summary and the file ever differ, the file wins.