Anatomy of a GDML Workbench Document - KeithSloan/GDML GitHub Wiki
Anatomy of a FreeCAD GDML Document
When the GDML Workbench is selected and File → New is executed, a document is created with a set of default materials and an empty root Part (worldVol) which has a box (GDMLBox_WorldBox) as the containment solid.

The user can then add other Parts to worldVol; these will usually contain other solids and/or other Parts.
In the figure above, two Parts are contained in the worldVol: shieldAssembly and LV_Box.
GDML Containers: Logical Volumes

There are two types of containment Parts. The first type has a containing solid, as shown above. The container Part LV_Box has a containing solid GDMLBox_Box, and inside that are two Parts, each with its own solid.
In GEANT4 terms, this is a Logical Volume — a volume with a solid and a material.
GDML Containers: Assemblies

The second type of Part container is an Assembly: it does not have a containing solid. Instead it has two or more solids or Parts directly under it. This is not a FreeCAD property of Part — it is simply a matter of how objects are arranged under the Part.
In GEANT4 terms, this is a GDML Assembly. The material property is associated with each solid individually. On export, the GDML exporter creates a logical volume for each solid in the assembly.
Objects Outside the Root Container

Objects that are not contained in the root container (worldVol) will not be exported to GDML (or to OpenMC XML files). The exporters require the root item to be selected before File → Export is executed.
A document can contain many such items: spreadsheets, technical drawings, reference geometry, etc.
Part Placement

The tree structure allows all objects inside a containing Part to be moved and rotated together by editing the Placement attribute of the containing Part.
In the figure above, the LV_Box Part is placed at x = −1.5 mm, z = −24.1 mm relative to its containing Part (worldVol). Every item inside LV_Box moves with it.
Note: moving or rotating the containing solid (e.g. GDMLBox_Box) does not move the items placed inside it. The placement of contained parts is governed by the parent Part's placement, not the solid's.
Solid Placement
Solids inside a Part can be individually placed by editing their Placement attribute. This placement is relative to the containing Part's placement.

In the figure above, Cube is displaced by 5 mm in the z-direction relative to the placement of the shieldAssembly Part. The shieldAssembly's placement is in turn relative to worldVol.
Material Property

Solids created from GDML solid icons get a default material assigned automatically. The material is shown in the Data properties panel and can be changed from the dropdown list — but the more convenient method is to use the Set Material button shown below.

Clicking Set Material opens a form from which a material can be selected. Materials are arranged in groups selectable from a dropdown menu. The name can also be searched by typing in the filter field — names matching the typed prefix will appear. Note that GEANT4 material names begin with G4_.
Non-GEANT4 Solids

Solids that are not standard GEANT4 solids can also be added. Most will be exported as their GEANT4 equivalent or tessellated into a GDML tessellation. The figure above shows a cone created in the Part Workbench. To be exported, it must be dragged under a Part that is within the WorldVol tree. Such solids will not have a material property initially — use Set Material to assign one.
Other wiki pages describe the many ways solids can be added: extrusions, revolves, arrays, sweeps, lofts, and solids from other workbenches (Gears, Fasteners, Pyramids & Polyhedra, etc.).
Creating New Materials

New materials can be created by clicking the Create Material button. Three modes are available:
- Chemical formula — e.g.
H2Oor(CH2)3— groups in parentheses can be repeated - Mixture — e.g.
0.5 G4_DNA_A + 0.5 G4_DNA_B— fractions are normalised to 1.0 automatically - Isotopic composition — e.g.
0.20 235U + 0.80 238U— creates both an element and a material; note the mass number comes first (e.g.235U, notU235)