Ruby scripts that read detector geometries in Detector Description Language (DDL) and build 3D models of the detector in SketchUp.
- Tai Sakuma and Thomas McCauley, "Detector and Event Visualization with SketchUp at the CMS Experiment"
J. Phys.: Conf. Ser. 513 022032, doi:10.1088/1742-6596/513/2/022032
As an example, this section describes how to build a 3D model of the CMS detector with the 2017 geometry.
First you need to create a big XML file with all CMS detector geometry.
Follow the instructions at https://github.com/SketchUpCMS/ddtoddl_cfg and create the big XML file GeometryExtended2017.xml
.
Check out this repo and the graph therory library GRATR:
git clone git@github.com:SketchUpCMS/SketchUpCMS.git
cd SketchUpCMS
git clone git@github.com:SketchUpCMS/gratr.git
Copy the big XML file to the directory SketchUpCMS
. For example, :
scp <username>@<address>:<path>/GeometryExtended2017.xml .
Start SketchUp Pro
Open Ruby Console (Window -> Ruby Console)
Run cms_2017.rb
:
load '/<some path>/SketchUpCMS/cms_2017.rb'
After the script ends, you will probaly need to zoom out to find the CMS detector.