This is a collection of scripts to design 3d printed radial collimators.
as this project is not stable yet and there are still pathes everywhere in the scripts it is suggested to put a link to the git in the user home
$ cd ~
$ ln -s [PATH TO collimator git] collimator.git
- FreeCAD
- tested with FreeCAD 0.18 (Linux App Image)
- To have the scripts availabe in the either change the User macros location or link the files inside
FreeCAD_scripts
to the default user macros location (ln -s collimator.git/FreeCAD_scripts/Collimator.FCMacro ~/.FreeCAD/MacroCollimator.FCMacro
)
-
using python
to come
-
using Mathematica
to come
-
using FreeCAD
- put the correct pathes in the
/.FreeCAD/Macro
- put the correct pathes in the
-
OpenSCAD
_to_come
This is the procedure to do some raytracing on the files generated in the steps above.
- convert a .stl file into .inc as povray
$ python2.7 external_tools/py-stl-3.1/stl2pov.py RadialCollimator.stl RadialCollimator.inc
- For the follwoing steps some python dependencies need to be installed e.g. in conda enviroment:
conda create --name collimator_env python=3.7
conda activate collimator_env
conda config --env --append channels conda-forge
conda install silx moviepy scipy numpy matplotlib imageio jupyter pyyaml
pip install vapory
- run povray using
$ ./raytracing/run_rings_povray.sh
--- or --- if you happen to have a cluster at hand:
$ oarsub -l nodes=1/core=8,walltime=00:02:00 ./raytracing/run_rings_povray.sh
- look at the results in a jupter notebook
$ cd raytracing
$ jupyter notebook
- A novel 3D printed radial collimator for x-ray diffraction by S. Kowarik, L. Bogula, S. Boitano, F. Carlà, H. Pithan, P. Schäfer, H. Wilming, A. Zykov and L. Pithan
- py-stl-3.1 by Roland Smith
... the corresponding packages are parcially redistributed in
\external_toos