Poster in French
(Oct 2012)

CAD-GDML on FreeCAD * Last news January 2020 : Keith Sloan provide a GDML workbench for FreeCAD allowing installation via FreeCAD's AddonManager tool. Currently needs FreeCAD developer version.

* September 11 2017 (NO MORE AVAILABLE) : Thanks to Werner Meyer and Keith Sloan 'C++ FreeCAD GDML module' was updated for latest FreeCAD version (mainly OpenCascade library compatibility)

FORUM : https://forum.freecadweb.org/viewtopic.php?f=8&t=21120#p163638

CAD-GDML project main goal is to implement the support (importing/exporting) for GDML files thanks to FreeCAD opensource CAD software.

LHCb VELO under FreeCAD(Boxes and full tubes only)
  • Each developer can suggest commits (or patches),
  • Efficient modularity, well designed, Third party libraries choices,
  • Reactive forum, developers well involved,
  • Works Windows, Linux and Mac OS X,
  • Nice look and feel...
GDML module functionalities under FreeCAD:
  • Read boxes and cylinders from GDML file,
  • Modelize the imported CAD model under FreeCAD (by adding, deleting or modifying boxes and cylinders),
  • Write boxes and cylinders into a GDML file.
  • Verbosity and exception implementation during schema validation and file importation.
  • Prevent crash from unrecognized solids.
  • Support for some additionnal CSG shapes: Boolean solids, Cones, Trapezoids implementation.
  • Write a developer documentation.
  • STEP,STL to GDML convertions (via tessellated solids).
  • Hierarchy and material implementation...
- Few slides for objectives, technical solutions and light roadmap.
- Index card for FreeCAD in French within PLUME (French well indexed WWW annuary for open source software used or developed by french universities and national research organisations (CNRS, INRA...) laboratories or departments).

~~Binary for Windows~~

How to test GDML module under Windows:
-Download and unzip FreeCAD.7z, it contains Binary files. For compiling sources, see the section below.
-Run '/bin/FreeCAD.exe'.
-Open a GDML file (LHCb velo for example). It can take some time.
-Be careful to have an Internet access, otherwise it crashes (due to online XML schema maybe, not clarifyed yet).
-When loading is finished, you can choose the navigation style by right clicking on the view.
-It is possible to add/modify/delete boxes and cylinders shapes thanks to 'Part' module.
-It is also possible to export boxes and full tubes shapes into GDML. You need to select a shape on the tree view, then choose 'export...' in the file menu and select the type "CAD-GDML format (*.gdml)" in the Export file dialog.
-This binary package comes with all FreeCAD modules. A lighter version could be packed.
-It had been tested on an up to date Windows 7 pro (32 and 64 bit) and an up to date Windows Vista Home premium (64bit).
It has crashed when reading a GDML file without Internet access ... because of GDML schema validation.
Please give us your feedback.
-This software is provided as is.

~~Compiling under Windows~~

OS: Windows 7
IDE: Visual C++ 2008 (professionnal edition)
Build system: CMAKE
- GIT Clone (Git for Windows) at git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad
- Download latest FreeCAD Libpack (Third party library) and add it to your Path.
- Configure CMAKE with sources and using FreeCAD libs paths.
- Download GDML module and extract it in GDML directory (becarefull not to extract in GDML/GDML),
- Copy the module into src\mod directory (July 31 2012),
- To add the module to the build you only have to put the folder GDML to free-cad/src/Mod and add the line "add_subdirectory(GDML)" into free-cad/src/Mod/CMakeLists.txt at the end.
- Under Cmake, 'configure' and 'generate' a solution for VC++ 2008,
- load "ALL_BUILD" project, build the solution and add FreeCADlibs\bin to your Windows path if it's not done yet.
Example files:
* 'flat' geometry test4.gdml.
* Boxes and Cylinder (full tubes under GEANT4) with hierarchy test5.gdml.
Resulting view "test5" under GEANT4.
* +Cones (full cones under GEANT4) test6.gdml.
* Realistic LHCb velo gdml sub detector.
Using features:
- To read boxes and full tubes from GDML files, click on 'Open a document or Import files' or 'Open...' into the menu. GDML is a 'supported format' thanks to the module.
- To write GDML files with boxes and full tubes (cylinder), select an object inside the 'Labels & Attributes' tree. Click on 'Export...' (or CTRL+E) into the 'File' menu.
- Don't crash with shapes below:
Boxes, tubes, cones, trapezoids (trap,trd), Polycones, booleans (union and substraction between previous solids).

~~Scientific Linux 6.3 virtual machine [VirtualBox]~~

This machine provide fast installation of a Scientific Linux 6.3 with:
-Geant4.9.5 (QT 4.8.3, Xerces-C 2.8.0),
-FreeCAD 0.13 (Python 2.6.6, Opencascade OCE (ft-gl 2.1.3-rc5), QT 4.8.3 (maybe yum install gperf,libicu-devel, enchant-devel, gstreamer*), Coin 3.1.3, ode 0.12, SoQt 1.5.0, Xerces-C 2.8.0, gts 0.7.6, Zlib 1.2.3, Boost 1.41.0, Eigen3 3.1.1, spnav 0.9).
How to install this virtual machine?
-Download ova file (6.46Go),
-Import it under VirtualBox,
-Modify your configuration (Processor, memory, virtual disk path...),
-Require 20Go disk free,
-VT-x/AMD-V should be activated to support 64 bit virtual machine.
How to use it?:
-Password: clr-in2p3 (for root and user1, becarefull it has been created with a latin keyboard)
-Turn On Internet access (for GDML schema validation).
-Execute Freecad:
    Open ~/freecad/free-cad/data/examples/ example files
-Execute Geant4:
   cd geant4.9.5.p01-work
   cd persistency/gdml/G01/
   ./build/load_gdml ../../../../freecad/free-cad/data/examples/lhcbvelo.gdml

~~Meeting at SLAC~~
Sept. 16 2011

Meeting presentation.

John Allison: Geant4 'Visualisation' deputy (G4AI)
Makoto Asai: Chair of SB and Spokesperson of Geant4 (SLAC)
Emmanuel Delage: CAD-GDML technical manager (LPC Clermont, IN2P3/CNRS)
Norman Graf: Geant4 'Geometry' member (SLAC)
Koichi Murakami: Geant4 'User and Category Interfaces' coordinator (KEK)
Joseph Perl: Meeting organizer, Geant4 'Visualisation' coordinator (SLAC)
Dennis Wright: Geant4 'Hadronic Physics' coordinator (SLAC).

The presentation shows the development status and ask for the officialization of the CAD-GDML project as a GEANT4 related project.
Joseph Perl remarks that the module is well design and promising thanks to FreeCAD modularity, coding style and GDML implementation similar to Geant4. The large Geant4 community (of application developers) ask for an interface between CAD tools and Geant4 (and a CAD tool with GDML support) since a long time, but existing solutions are very few, not systematically opensource, and so, not evolving or flexible enought.
Makoto Asai agree on principle to use this GDML FreeCAD module. To be recognized as a Geant4 related project, the tool has to be improved by boxes and full tubes writing functionality (and possibly a conversion functionality from STEP to GDML G4TesselatedSolid). So, a new evaluation will be done by Geant4 collaboration. The project could be related to the 'Geometry' working group. By the way, a WEB link could be created into Geant4 WEB site.

ContactWeb hosting : CC IN2P3