Skip to content

Math tools, phase 1: the engine, the tools and the graphs apart from the views - #47

Open
simonebortolin wants to merge 1 commit into
ccr-f0e25fb4-eczbl3-angourifrom
ccr-f0e25fb4-eczbl3-fondamenta
Open

simonebortolin wants to merge 1 commit into
ccr-f0e25fb4-eczbl3-angourifrom
ccr-f0e25fb4-eczbl3-fondamenta

Conversation

@simonebortolin

Copy link
Copy Markdown
Owner

Stacked on #44. The first phase ("Fondamenta") of the math tools as an app of their own, still a sample of this repository.

What changes

  • samples/SharpEquations.MathTools.Core (no user interface, builds for desktop and WebAssembly):
    • ICasEngine with CasAction / CasResult; AngouriMathEngine is the former Algebra, reading through MathReader. Other engines (e.g. a local reference one, later) can stand beside it.
    • The formulas, units and triangles (Triangles.Describe moves here from the page).
    • ISettingsStore: FileSettingsStore (JSON in the application data, desktop) and MemorySettingsStore (default, tests).
  • samples/SharpEquations.MathTools.Graphing: Viewport (pan, zoom around a point, screen ↔ plane) and Ticks (round marks), the start of the 2D graphs.
  • Views (SharpEquations.Avalonia.MathTools.Demo, shared with the browser): MathToolsView(ISettingsStore?, ICasEngine?). The page shown, the equation of the calculator and the theme come back in the next session. The browser host keeps them in localStorage (BrowserSettingsStore, via JSImport).
  • Tests: tests/SharpEquations.MathTools.Tests (net10.0) gets the engine, formulas, units and triangles tests, plus new ones for the settings and the graphs. ci.yml runs it, and the window test SettingsAreKept checks the restore.

Checked

  • dotnet build SharpEquations.slnx -c Release: no warnings or errors.
  • MathTools.Tests: 158/158 pass. The math tools window tests in Avalonia.Tests: 24/24 pass.
  • The browser app, built and served locally in Chromium: switching to Units and to the dark theme writes mathtools.tab / mathtools.theme, and both come back after a reload.

Next phases: reference tests, engine features (angles, session variables, systems), 2D graphs, worksheet UI, tools/library, browser, 3D, the optional Windows-only reference adapter, and the export last.


Generated by Claude Code

… [no-new-version]

The first phase of the math tools as an app of their own, still a sample of the
repository: what they compute moves to projects without a user interface, which
build for the desktop and for WebAssembly alike.

- SharpEquations.MathTools.Core: ICasEngine (CasAction, CasResult) with
  AngouriMathEngine (the former Algebra, reading through MathReader), the
  formulas, units and triangles, and ISettingsStore (a JSON file on the
  desktop, MemorySettingsStore otherwise)
- SharpEquations.MathTools.Graphing: Viewport (pan, zoom, screen mapping) and
  Ticks, the start of the graphs
- the views take the engine and the store: the page, the equation of the
  calculator and the theme come back in the next session; the browser keeps
  them in the local storage of the page (BrowserSettingsStore)
- SharpEquations.MathTools.Tests: the tests of the engine, formulas, units and
  triangles move there, with tests of the settings and the graphs; ci.yml runs
  them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyVio8afJsGwHW9i5v5HDs
@github-actions

Copy link
Copy Markdown

Pre-release 1.1.0-pr.47.120 is ready: https://github.com/simonebortolin/SharpEquations/releases/tag/pr-47-120-1

NuGet package of c92e742. Updated on every push, deleted when this PR is closed.

This branch has not been deployed

No deployments
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.

2 participants