Skip to content

feat(examples): add plecs_export_example CLI (#55)#59

Open
tinix84 wants to merge 7 commits into
mainfrom
feat/issue-55-plecs-export
Open

feat(examples): add plecs_export_example CLI (#55)#59
tinix84 wants to merge 7 commits into
mainfrom
feat/issue-55-plecs-export

Conversation

@tinix84

@tinix84 tinix84 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a standalone plecs_export_example CLI that reads a MAS Magnetic JSON file and writes a .plecs snippet (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-example and wip/55-plecs-exporter, rebased onto current main.

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 behind INCLUDE_MKF_EXAMPLES
  • CMakeLists.txt — wire in the examples/ subdirectory
  • docs/plans/, docs/sprints/ — design spec, implementation plan, sprint plan

Verification

  • Example syntax-checks clean against current main API (export_magnetic_as_subcircuit / export_magnetic_as_symbol)
  • Branch is linear, 0 commits behind origin/main

Refs: #55

🤖 Generated with Claude Code

tinix84 and others added 7 commits June 16, 2026 07:42
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>
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant