Jsroot display CAD stl files

Is it possible or how hard would be to implement jsroot loader of the .stl file (or similar CAD files), merge them with the root geom files and display it.


Best regards, Rok

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Hi @f9daq,

You mean using STLLoader functionality with JSROOT? Up to now nobody was asking about such functionality.

It can be done very easy on API level. Means one creates custom HTML page which makes TGeo drawing, then loads STL geometry and adds it to existing TGeo scene. This can be done already now
using functionality of TGeoPainter. If necessary, functionality can be extend. I also can provide simple example for that.

More work will be required to integrate STLLoader into JSROOT. Means to use it directly with default JSROOT GUI just by providing URL parameters. Also in this case not clear which loaders need to be supported - there are ~30 of them.

But in general I see no problem to implement something reasonable


Yes, I mean STLLoader functionality. I would really appreciate if you can provide the example.

Integration in the default GUI is not cruical at the moment, but might it might be an usefull extension.
Regards, Rok

Hi Rok,

Here is example: https://jsroot.gsi.de/dev/api.htm#custom_html_tgeo_with_stl

Later one can provide tooltips handler for such objects.


Hi Sergey,
thank you for the solution. This is exacly what I needed.
Regards, Rok

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.