HSF / Qt3DExaminerViewer

A viewer module which offers manipulation and visualization functionalities and tools similar to the OpenInventor/Coin Examiner viewer. The work is part of the CERN/HSF GSoC 2020
https://hepsoftwarefoundation.org/gsoc/2020/proposal_ATLAS-Visualization.html
Apache License 2.0
6 stars 1 forks source link

Add a GeoModel reader and sample data. Move viewer to subfolder. #1

Closed ric-bianchi closed 4 years ago

ric-bianchi commented 4 years ago

This PR will add a simple GeoModel loader and sample data.

The loader code loads a .db file, it loops over its top nodes, and it prints out the details and the parameters of the shapes (GeoShape) used by those nodes.

In particular, I prepared 4 small databases, each containing very simple examples of GeoModel shapes used in the ATLAS geometry. The samples have been prepared from the one containing the most basic shape (Step1: GeoBox), up to a more complex shape (Step4: GeoPcon (Polycone) ).

In addition to that, to host the loader code, the viewer has been moved to a subfolder and a new folder has been created for the loader.

ric-bianchi commented 4 years ago

Screenshots of the shape dumped to Step1 ... Step4 sample databases.

For some of them, also a wider view showing the shape in its context within the ATLAS detector is provided, to get a sense of the shape itself and how it is used.


Step 1 - GeoBox

Screen Shot 2020-07-15 at 15 44 20

in context:

Screen Shot 2020-07-15 at 15 31 45

Step2 - GeoTube

Screen Shot 2020-07-15 at 15 45 35

in context:

Screen Shot 2020-07-15 at 15 30 38

Step3 - GeoTubs

Screen Shot 2020-07-15 at 15 37 44

Step4 - GeoPcon:

Screen Shot 2020-07-15 at 16 01 02
ric-bianchi commented 4 years ago

@huajian1069 , with the loader provided with this PR, you should be able to load some simple GeoModel shapes in memory. The code also shows how to get parameters and variables from the shapes. With those, you could try to recreate those shapes with the Qt3D primitives, to be shown in the viewer.

For completeness, I recall here that GeoModel shapes do not provide a mesh: they are only "descriptions of shapes", providing the parameters needed to mathematically define them, but not providing any actual visual representation.

Thanks for reviewing and accepting this PR, @huajian1069, and for starting to explore the possibility of visualizing those sample GeoModel shapes with Qt3D.

Best, -- Riccardo.

ric-bianchi commented 4 years ago

P.S.

A note: for simplicity, I quickly configured the build of the sample loader with CMake; but, of course, feel free to move it to QMake if you prefer, to integrate it better into the current build configuration of Qt3DExaminerViewer.

ric-bianchi commented 4 years ago

Also, please take a look at the loader/README.md file for build and run instructions. There, you will find how to run on the Step1...Step4 sample data.

Best, -- Riccardo.