CADD: Computer Aided Detector Design for Geant4/ROOT
(http://root.cern.ch/phpBB2/viewtopic.php?t=649)
After endless debugging of the OpenCascade package, where ~30 routines were not conform
with the official C++ standard, I could compile Geant4 including Opencascade.
Hades has written a translator (CAAD) based on Opencascade which allows in principle to export the
Geant4 geometry into a STEP file. A STEP file is readable by almost any CAD program and is
the current standard for exchanging CAD drawings among various CAD programs.
Withing Geant4 you just insert a block like:
//--------------------------------------------------------
// Export Geant4 physical Geometry into a STEP file
G4STEPFile myStepFile;
myStepFile.Add( pCerenkovDetector->GetCerenkovDetector_PhysicalVolume() );
myStepFile.Save("Cerenkov.step");
//---------------------------------------------------------
The Translator CAAD writen by HADES converts the Geant4 geometry into standard geometry representaion called BREPS
(geometry defined by its boundary), where BREPS are used by GEANT4 and by any CAD/CAM program.
OpenCascade then translates the BREP geometry into the STEP format. SolidWorks is able to import the STEP format.
=> The CAAD Translator is not well written and faulty. It make assumptions about the Geant4 geometry based on
HADES, e.g. :
- a tube (cylinder) has always a inner diameter ...
- a boolean solid is made only from two standard (predefined) soldis ...
- ....
=> Due to this limitations I could not translate the *whole* Qweak Geant4 geometry into. Instead I tried to export
parts of it. It would take ~1 month to fix/adapt the CAAD translator in order to understand a more complicated
geometry setup like in Qweak.
Pic 1: SolidWorks showing the Geant4 Cerenkov detector based on the exported STEP file. In Geant4 the detector
is a boolean union of 3 solids, but CAAD only reconized 2 soilds ...
Pic 2: Zoom on the handlebar. You clearly see an offset of the handlebar of 1.55 mm. This offset is difficult
to notice in the Geant4 3D display, even if you might notice it you still can not extract the exact mismatch.
----------------------------------------------------------------------------------------------------------------------
OpenCascade: A powerful development platform for 3D modeling applications. It consists of reusable C++ object
libraries and a set of development tools that are available in Open Source
(http://www.opencascade.org)
-----------------------------------------------------------------------------------------------------------------------
. |