GraXML is a Geometric Modeller for handling HEP experiments' Detector Description and Event data. It containes full 3D visualisation of the managed elements. It uses Java3D to create, render and manipulate SceneGraph. Its main source of data comes through XML files, where each Schema represents one Generic Model. Such Generic Model is then a source for the GraXML Geometric Model. Direct access (without XML files) is possible too. The current version is 3.2.1 [23/Mar/2017 at 16:02:38 CET].

Program Overview

GraXML Toolkit provides a foundation for operations on 3D objects (detector elements, events,...). Each external source of 3D data is automaticaly translated into Generic Model which is then analysed and translated into Geometric Model using GraXML modules. The construction of this Geometric Model is parametrised by several parameters (optimisation level, quality level, ...) so that it can be used in applications with different requirements. Geometric Model can be then directly used via thin user applcations. Two visualisation applications are provided in the GraXML Toolkit: GraXML Interactive Display and GraXML Converter into various geometry formats. Other applications can be easily developed.

GraXML (in graphical mode) offers full functionality for browsing and manipulating 3D data. All the standard User Requirements functionality for 3D display is available:


Running from AFS

The most recent version of GraXML is installed on the CERN afs directory /afs/cern.ch/sw/lcg/external/Java/GraXML. This instalation is easy to use:


# Setup Java
. /afs/cern.ch/sw/lcg/external/Java/bin/setup.[c]sh
# Run GraXML
graxml [<script>]

Full documentation is available from the GraXML/doc subdirectory, testing examples are in the GraXML/misc/Test.


Local Instalation

To install GraXML localy (on Linux machine using Java 1.5), one has to:

  1. install Java itself (version at least 1.5.0)
  2. get and untar the file http://hrivnac.home.cern.ch/hrivnac/Activities/Packages/GraXML-dist.tar.gz
This instalation is then easy to use:

# Run GraXML
<local instalation place>/GraXML/bin/GraXML.sh [<script>]
# or
<local instalation place>/GraXML/bin/GraXMLConverter.sh <script>

If you want to make a symbolic link to GraXML[Converter].sh or if you want to put it in your PATH, you have to set up environment variable GRAXML_HOME pointing to your GraXML directory.

Full documentation is available from the GraXML/doc subdirectory, testing examples are in the GraXML/misc/Test.

All development of the GraXML can be performed within GraXML/ant directory using Ant build tool (it should be installed). Try ant -h and ant -p for further details.


Using WebStart

To run GraXML directly from the Web (on Linux, MacOSX or MS machine using at least Java 1.5), one can use GraXML WebStart distribution: Launch Web Start. Correctly configured Web Browsers will start GraXML automaticaly, otherwise following command should be used on the downloaded file:


javaws GraXML.jnlp
WebStart for Atlantis coupled with GraXML is available too: Launch Web Start.


Command-Line Options


GraXML[Converter].sh [<script>]
# script ... BeanShell script to be sourced (it has usually the extension .bsh),
# it is a convenient place to put, for example personal Option preferences

Some facilities available to the scripts are available through Scripting Interface.


Scripting Interface

Scripting interface uses BeanShell package, all its functionality is available (so full Java environment is available). Full namespace are not used in this description (unless short name would be ambigues).

Example of simple scripts:

display.bsh

// Interactive Display
// ===================
// Create high quality picture
Config.setQuality(9);
// Show picture immediately (i.e. don't wait for showing via Tree viewer)
Config.setBatch();
// Set color palette to the Atlantis one
SelectedColor.setPalette(SelectedColor.ATLANTIS);
// Read, parse and show picture from file Solids.gdml
w.show("Solids.gdml");
// Create a snapshot Picture.jpg
j3d.snapshot("Picture.jpg");
This script can be either run on the start of GraXML: GraXML.sh display.bsh
or sourced into running GraXML: source("display.bsh");

convert.bsh

// Batch Converter (into VRML, X3D or TXT)
// =======================================
// Create high quality picture
Config.setQuality(9);
// Set color palette to the Atlantis one
SelectedColor.setPalette(SelectedColor.ATLANTIS);
// Read, parse and convert Solids.gdml into Solids.wrl
c.convert("Solids.xml", "Solids.wrl");
This script can be run using GraXMLConverter: GraXMLConverter.sh convert.bsh


Examples

Directory GraXML/misc/Test contains example xml files (*.xml, *.agdd, *.gdml) and BeanShell scripts (*.bsh) testing all major features of GraXML.

Some examples are available from the Examples panel on the GraXML GUI.


Builders

Mapping between XML Schema and corresponding Generic Builders is done via builders.properties. On default, following Generic Builders are defined:

AGDD=net.hep.AGDD.GeometricModel.AGDDBuilder
gdml=net.hep.geant4.GDML.GeometricModel.GDMLBuilder
Event=net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder
AGeometry=net.hep.atlas.graphics.JiveGeometry.GeometricModel.JiveGeometryBuilder

Other Builders can be added by putting costomised builders.properties into current directory.

Help


Design

Class Diagrams
Sequence Diagrams

Related Development

Used packages:

Related Presentations

There were several presentations about GraXML:

InLinks


Requested Features, Found Bugs, Release Notes

Requested Features Found Bugs Release Notes