Ccxview: results viewer for CalculiX

Hi all,

I’ve been working on a small results viewer for CalculiX and figured it’s in good enough shape to share. It’s called ccxview.

demo

The main goal was speed. I got tired of waiting for big .frd files to load, so I wrote something that opens them quickly and stays responsive while rotating and switching fields. A model with around a million elements loads in about a second on my machine, and fields are only decoded when you actually look at them.

It reads .frd, .inp, .dat and cgx .fbd files. You can open an .inp on its own to check the mesh, sets, loads and supports before running, or with the .frd next to it to see both together.

There’s a Linux binary, a Windows .exe, and a WebAssembly build that runs in the browser, so you can try it without installing anything:

The desktop binaries are here: ccxview/binaries at master · BasemRajjoub/ccxview · GitHub

It has no external dependencies. It’s plain C99, and everything else is a handful of single-header libraries vendored into the repo (sokol, Nuklear, stb and a couple of others).

Some of what it does:

  • handles most element types, including shells, beams, springs, gaps, contact and ties
  • shows Gauss point values, optionally taken straight from the .dat file
  • animates mode shapes and steps
  • compares two runs (A minus B)
  • has path plots, clip planes, mirror symmetry and a probe
  • plots convergence from .sta/.cvg files
  • exports to PNG, MP4, CSV and VTK for ParaView

I built a most of this with the help of Claude Code.

Source: GitHub - BasemRajjoub/ccxview · GitHub

3 Likes

my brain thinking is this new CGX with modernize for the future?

I guess that’s the catch. But if it works, is relatively stable and maintainable then it should be fine.

Great work!

Is 1 hour after the first post enough for 1st feature requests? :slight_smile:

If so:

  • out-of-bound colors for both min and max in locked range legends
  • principal stress + strains
  • coordinate transformation of results, e.g. using cylindrical coordinates
  • cyclic symmetry: expansion to more sectors than available in the frd, e.g. larger than NGRAPH (if NGRAPH>=2)

Thomas

1 Like

Yes, with gpu rendering.

Thanks,
yes, I was using it for my own models but then I thought it could be useful for others.
It is still in alpha, so there might be some bugs and features missing.
I’ll make sure to add your requests to the todo list.

1 Like

it seems AI helps widely used by many developers today, a bit strange indeed in conditions of build tools with a tool. Stability depends on user feedback and reporting bugs; maintainability is main developer and contributor probably.

at first time i’m trying only miss one in light theme.

looks great, also Ansi-C language programing is the same with original CGX made it possible to porting in capability to build a model and mesh using fbd files maybe.

1 Like

Ok, it’s pretty cool.

What I mostly miss at first glance:

  • more flexible rotation (current fixed orbit point feels really inconvenient)
  • more colormaps including classic rainbow
  • light mode
  • solid (filled) clip plane

Also, it strangely switches from no edges to edges displayed when zooming in.

2 Likes

Amazing job! well, if you are open for feature requests…

  1. As you have made path plotting, could you add maybe ASME stress linearization? There is no open source/free post that can do that :slight_smile:
  2. Plot against time/increments?
  3. The gliphs for showing restrains, maybe they could be smaller against the one showing loads for better visualization
  4. Some way for the user to specify units sets and then displayed in the results (maybe as a user preference, as normally we work mostly in one unit set)
  5. At least for Windows, the program lack of a fancy icon… but is incredible fast, amazing!
1 Like

I agree with the rotation, It was almost impossible to me rotate a model to get the view that I want

1 Like

Yes, light theme should be easy, as Nuklear has a couple of themes already available.

1 Like

Ok, thanks for the feedback. I’ll be fixing/doing these soon as some are pretty straightforward.
Regarding rotation: I might add a second mode with a rotation around the cursor.
I tend to rotate then pan to the view I want.
Also I should mention the fly mode (activated using G key) which is basically first-person shooter kinda mode that helps fly around the model using WASD keys.

it’s available currently, several colormaps can be select in legend menus., plot also can be unaveraging. Here only me is missing in Rainbow Desaturated, hopely it will be available too.

i read in design spec, this is available also. Since it calls directly CGX in the background then all commands already supported and manual document still applicable. Maybe an addition of integrated text editor like SciTE from bConverged can be useful.

i really hope this project receives a lot of support, especially from the official CalculiX team. Many thanks.

1 Like

hi, i’m trying to add more colormap by modify render.c files in CCXview for similarity with CGX. Five colormaps added: Inferno, Jet, Grayscale, Rainbow-desaturated & Classic. Not yet tested personally due to lack experiences in compiling of complex large programs, but it should work w/o minor correction probably, thank you.

Ok, indeed. I couldn’t find them because the default one is “Fast”, so I thought it was a performance mode setting or something like that.

The GUI still needs some polish, but I’m mostly waiting for improved rotation. Currently, it feels like turntable mode in FreeCAD with one axis constrained. Free orbiting would be much better.

Also, it seems that recently opened files are not remembered between the sessions. And it would be good if the settings were remembered too so that we don’t have to adjust them each time.

my old days learning basic of c/cpp, indeed it’s lack of GUI for specific OpenGL visualization program work in cross platform. Some interesting me is NanoGUI from the creator of Mitsuba rendered, but i don’t know about feasibility and compatibility with CCXview.

Thanks for all the feedback. Most requests are now in:

  • Free orbit and orbit about the cursor, light theme, Jet/Inferno/Rainbow desaturated colour maps, out-of-range colours, a filled clip plane, smaller support glyphs, a new icon, and settings and recent files are remembered
  • Principal stresses and strains, cylindrical coordinates, cyclic expansion, history plots, unit systems
  • ASME stress linearization along a path or along the surface normal (it needs more testing since I only tested it on a tiny slab and the vessel example)
  • .fbd meshing without cgx (mapped meshes) (this one needs more testing!)

The binaries in the repo are updated.

On NanoGUI: it’s C++ and needs GLFW, NanoVG and CMake. ccxview is meant to stay plain C99 with a few single-header libraries: it builds with one compiler command and runs as one file on Windows, Linux and the web. So I’ll keep polishing the Nuklear GUI instead.

2 Likes

Incredible, thanks for your efforts! Is there a new release available to download?

I could test today the stress linearization results against Mecway FEA. If I remeber well in the Pveng site there are some available/documented cases as well.

First at all, I´m not an specialist!!! I have compared the results of the stress linearization in a common and documented case from PVeng:

Mecway and others if I remember well only give one result for the stress linearization, but in CCXview we have start and end node results. Then, some values agree with calculated from Mecway but choosing the start or end node, and not is always the same.

Maybe you could give us some light in this (incredible fast implemented) feature, that guess that will bring a lot of user´s attention.

EDITED: If I have understood well, Mecway is reporting the maximun value along the SCL, maybe in Ccxview could be added a third column “max along SCL”.

Best regards