All examples
01Result viewerStart here

Teach your agent to read a simulation result.

Before anything can decide with simulation, something has to read one. This example opens a finished prediction on the real part and gives you the arrays behind every picture - with no platform access, no licence, and no account.

It is deliberately the cheapest thing in the library to try: a complete reference result and its geometry ship inside it, so the whole example runs offline in about five minutes.

Hand this to your agent

Read the result viewer example at toolkit.simcon.ai and set it up in this folder, following the setup page it links to. Then open the bundled result and tell me which region fills last and what the peak cavity pressure is.

OfflineNo licence~ 5 minpyvista · h5py · numpy

Turn the part

Technikumsteil, the part that ships with the example. Drag to rotate.
Pressure [bar]1.842 s
0.0486.2
Field
Time step41 / 41
t1.842 s
Filled100 %
Gatemarked

Nodes the melt has not reached render as a faint ghost, so the fill front reads directly. The scale runs purple to red across the field’s own range, the same one the desktop viewer uses.

Technikumsteil, the geometry bundled with the example. Field values here are illustrative; the example reads the real prediction.

Pick this one when

Right tool

  • You want to see what the platform produces before committing to anything.
  • You are building your own metrics, dashboards or reports on top of results.
  • You have a result file and need the numbers out of it.
  • Your agent needs to learn the result format before it can score anything.

Reach for something else

  • You want to produce a result of your own - that is example 02.
  • You need a viewer for colleagues who do not write code: Cadmould Viewer covers that.
  • You are chasing a decision rather than a field. Examples 03 and 04 score results and act on them.
What it gives you

A small toolkit you can read

Open a result and pull arrays through named methods. You never touch h5py, and nothing about the file layout has to be memorised.

solver_results
from solver_results import PredictionResult

r = PredictionResult.open("prediction.h5")

r.coordinates()          # node positions
r.snapshot("Temperature", t)
r.field_series("Pressure")
r.node_history(node_id)
r.layer_series(...)      # through thickness
r.fill_progress()
r.inputs()               # gate + process

A cut you can drag. A through-thickness solid section, so where the core is still molten is visible directly.

A ghost for what has not filled yet. Unfilled regions stay transparent, so the fill front reads at a glance.

The SIMCON colour scale. The same scale the desktop products use, so a figure produced here matches what colleagues already read.

Headless PNG output. One flag renders straight to file, which is the path into automated reports.

Run it

Scaffold, install, run

From nothing
$ pip install ".[result-viewer]"$ python examples/result-viewer/scripts/08_result_viewer.py

Variants

python scripts/08_result_viewer.py --shot
python scripts/07_field_3d.py
python scripts/08_result_viewer.py mine.h5 --stl part.stl

Worth knowing before you point it at your own file

  • Results from the platform come back on a remeshed geometry, so pass --stl and the viewer snaps the part to the nearest result node. For the bundled sample the mapping is exact.
  • Results from the platform omit the /input group, so gate and process settings are missing unless something adds them back - example 02 does it for you.
  • Pressure carries a unit attribute. Read it.
  • Field arrays are stored at reduced precision, so small stair-steps in temperature come from storage.

The full data model: RESULTS_AND_IO.md

Next: make a result of your own

Once the format makes sense, example 02 runs the loop end to end on your part and writes a file this viewer opens directly.