3D object into Geant4, step by step #149
Replies: 1 comment
-
-------- How to export 3d object or model or 3d entity from FreeCAD to .gdml file ? STEP by STEP //------------------ BEFORE proceeding:
//------------------ Procedure: Creating 3d object
//------------------------------------------------------------------------------------------------------------------------------ Solution: a. make sure you select the head of all the 3d objects, by default it must be: worldVOL Solution: //------------------------------------------------------------------------------------------------------------------------------
Solution: this was my own @Might3D personal experience with GDML workbench, a very big thank-you to Mr @KeithSloan for his help and support. |
Beta Was this translation helpful? Give feedback.
-
How to introduce, import, implement a 3D object into Geant4?
---------- What you need?
a. Geant4.
b. OpenGL.
c. QT (optional).
d. Visual Studio (or any similar) to compile codes.
e. CMAKE (or similar).
f. Xerces-c (is a must).
g. VulkanSDK libraries (is a must).
h. FreeCAD 1.0.0 RC2 (tried personally and works fine).
i. GDML-workbench (is a must).
j. Load-GDML-color to visualize the .gdml files.
---------- Procedures:
Note: be aware of the version, if it’s not compatible it will generate errors while building a solution (with CMAKE, it may generate error if the QT is newer than the mentioned version in the code itself).
4.Install Visual Studio, make sure it’s the final stable release. Insure you want C++ and Python development kit installed on your PC while installing the packages.
Note: Keep in mind that FreeCAD data will be installed in %appdata% that’s related to the user’s profile. That’s why you have to choose [for all users] while installation.
Install GDML-workbench, it may ask for updating the LXML and GMSH libraries, say yes.
You must restart the FreeCAD after installing and addons to take effect.
Note:
You may need to install pip (python) or GitHub Gitbash and similar.
You may need to install some C++ or Python libraries prior to install Geant4 or build the Geant4.
If everything went well, with no errors, it is the time to build your Geant4.
---------- How to Build the Geant4?
Now you have 3 folders:
1.geant4-SOURCE is for the original files and folders
2.geant4-BUILD is where you want CMAKE to build your version of Geant4.
3.geant4-INSTALL is where Visual Studio downloads and install your version of Geant4.
Note: never ever BUILD and INSTALL your version of G4 inside the SOURCE folder. You MUST separate between them.
How to use CMAKE to build the G4 .. it is another discussion.
Beta Was this translation helpful? Give feedback.
All reactions