feat(examples): add plecs_export_example CLI (#55)#59
Open
tinix84 wants to merge 7 commits into
Open
Conversation
Captures the brainstormed design for a small CLI binary that turns a MAS Magnetic JSON into a .plecs snippet. Reuses existing CircuitSimulatorExporterPlecsModel and the Simba exporter test fixtures; establishes a new top-level examples/ convention for MKF. Refs: #57
Five-task TDD-style plan: write main.cpp, add per-target and umbrella CMakeLists, wire INCLUDE_MKF_EXAMPLES into the root build, then smoke-test against an existing Simba fixture. Refs: #57
Small CLI that loads a MAS Magnetic JSON and emits a .plecs snippet (subcircuit or symbol) using CircuitSimulatorExporterPlecsModel. Build wiring follows in subsequent commits. Refs: #57
Defines the plecs_export_example executable, links against MKF, and
places the binary at ${CMAKE_BINARY_DIR} so the demo command line
matches ./build/plecs_export_example.
Refs: #57
Aggregates example subdirectories. Currently only plecs_export. Refs: #57
Mirrors the INCLUDE_MKF_TESTS option pattern. Defaults to ON so the plecs_export_example binary builds by default; downstream consumers can disable with -DINCLUDE_MKF_EXAMPLES=OFF. Refs: #57
Plan covers permeance-capacitance analogy mapping from MKF magnetic components to PLECS magnetic domain, following the existing SIMBA exporter pattern. Identifies open questions about file format and saturation modeling. Refs: #55 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds a standalone
plecs_export_exampleCLI that reads a MAS Magnetic JSON file and writes a.plecssnippet (subcircuit or symbol mode), plus the supporting build wiring and design/sprint docs for issue #55.Consolidates the work previously split across
feat/plecs-export-exampleandwip/55-plecs-exporter, rebased onto currentmain.Changes
examples/plecs_export/main.cpp— CLI entry point (subcircuit/symbol modes, arg validation, JSON load, error handling)examples/plecs_export/CMakeLists.txt+examples/CMakeLists.txt— build targets, gated behindINCLUDE_MKF_EXAMPLESCMakeLists.txt— wire in theexamples/subdirectorydocs/plans/,docs/sprints/— design spec, implementation plan, sprint planVerification
mainAPI (export_magnetic_as_subcircuit/export_magnetic_as_symbol)origin/mainRefs: #55
🤖 Generated with Claude Code