Sign in

Comparing two designs

Make a variant of the two-stage gearbox and compare it with the original, in the Projects screen and with axm diff: the inputs that differ, the checks that flipped and the results that moved.

Try this example in the app

Two versions of a design differ in a few inputs, and those few inputs move many results. A comparison shows both sides at once: which inputs differ, which checks flipped between pass and fail, and which results moved and by how much. This tutorial compares the Two-stage helical gearbox example with a variant whose second stage is too narrow, first in the app and then with axm diff.

The numbers are those of this version of Axomek.

Step 1: save the original

  1. Start a project from the example: open the Two-stage helical gearbox, or choose it on the start screen.
  2. Save it (Ctrl+S) as gearbox.axm.json.

The steps here use the desktop app's files. In the web app, which keeps one project in the browser, sign in and save both versions as cloud projects instead: the Projects screen lists them the same way.

Step 2: make the variant

  1. Press Ctrl+Shift+S (save as) and save it again as narrow.axm.json. The open project is now the variant; the original stays as it was saved.
  2. In the gear module, select G2 and set Face width b from 50 to 12 mm. The desktop app saves the change to the file as you make it.

The checks banner turns red: two of the 42 checks fail.

Step 3: compare in the app

  1. Open File › Projects. Both files are on the list.
  2. Select gearbox to preview it, and choose Compare with the open project. To compare two projects of which neither is open, choose Compare with… instead and pick the second one; the first is the old side, the second the new one, as axm diff has them.

The comparison goes from the first project to the second:

PartWhat it shows here
Checks that flippedThe pitting safeties of G2's pinion and wheel, each PASS → FAIL with its utilisation before and after: the pinion's goes from 62.5 % to 117 %.
Inputs that differ (1)gears.G2.faceWidth, 50 mm in the original, 12 mm in the variant.
Results that movedThe power loss, from 178.7 W to 205.4 W (+15 %), and the second stage's contact and bending safeties.

Results that move by 0.01 % or less are left out. Two projects that are the same say so: no input, check or result differs.

Step 4: compare on the command line

axm diff gearbox.axm.json narrow.axm.json

prints:

Inputs: 1 changed
  gears.G2.faceWidth  50 mm → 12 mm
Checks: 2 flipped
  PASS → FAIL  gears.G2.pinionContactSafety  pitting safety of the pinion of G2 is 0.8519 against a minimum of 1 (117%)
  PASS → FAIL  gears.G2.wheelContactSafety  pitting safety of the wheel of G2 is 0.9288 against a minimum of 1 (108%)
  3 more checks kept their status with another utilisation (see --json)
Results: 3 moved
  powerLoss               178.7 W → 205.4 W  (+15 %)
  gears.G2.contactSafety  1.599 → 0.8519  (-47 %)
  gears.G2.bendingSafety  6.998 → 1.93  (-72 %)
  • The exit code is 0 when the projects are the same, 1 when they differ and 2 when one cannot be read, so a script can tell.
  • --json gives every input, check and result with its unit, its old and new value and its relative change.
  • With one file, axm diff narrow.axm.json compares the file before its latest change by axm (kept in its history, see axm history) with the file now: what an agent's last edit did.
  • An agent gets the same through the MCP tool axm_diff.

Step 5: compare against an earlier revision in the report

A report can carry the same comparison as a section of its own: in the report screen, under Changes since an earlier revision, choose Earlier file… and pick the earlier project. See Building a report.