Coder Social home page Coder Social logo

sketchupcms / sketchupcms Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 10.0 1.35 MB

3D models of the CMS detector and events in SketchUp

Home Page: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SketchUpCMS

License: BSD 3-Clause "New" or "Revised" License

Ruby 100.00%
sketchup 3d-models lhc cms-experiment detector-geometry particle-physics cern

sketchupcms's Introduction

DOI

SketchUpCMS

Ruby scripts that read detector geometries in Detector Description Language (DDL) and build 3D models of the detector in SketchUp.

Citation

  • 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

Quick instructions

As an example, this section describes how to build a 3D model of the CMS detector with the 2017 geometry.

Create a big XML file

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

Check out this repo and the graph therory library GRATR:

git clone [email protected]:SketchUpCMS/SketchUpCMS.git
cd SketchUpCMS
git clone [email protected]:SketchUpCMS/gratr.git

Copy the big XML file to the directory SketchUpCMS. For example, :

scp <username>@<address>:<path>/GeometryExtended2017.xml .

Run

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.

sketchupcms's People

Contributors

adavidzh avatar taisakuma avatar tpmccauley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketchupcms's Issues

implement "ExtrudedPolygon"

An example from the xml file for 2026D88:

<ExtrudedPolygon name="hgcalwafer:HGCalEEEpoxyT0Finedm0"> 
<XYPoint x="64.495810000000005857*mm" y="58.857967419033720091*mm"/>
 <XYPoint x="-18.724589999999999179*mm" y="-85.283993607171296958*mm"/>
 <XYPoint x="0.000000000000000000*mm" y="-96.094640684136678033*mm"/>
 <XYPoint x="83.220399999999997931*mm" y="-48.047320342068339016*mm"/>
 <XYPoint x="83.220399999999997931*mm" y="48.047320342068339016*mm"/>
 <ZXYSection z="-0.032500000000000001*mm" x="0.000000000000000000*mm" y="0.000000000000000000*mm scale=1.000000000000000000*mm"/>
 <ZXYSection z="0.032500000000000001*mm" x="0.000000000000000000*mm" y="0.000000000000000000*mm scale=1.000000000000000000*mm"/>
</ExtrudedPolygon>

For some background see the ExtrudedPolygon shape in https://dd4hep.web.cern.ch/dd4hep/usermanuals/DD4hepManual/DD4hepManualch2.html#x3-290002.9

See the related issue SketchUpCMS/ddtoddl_cfg#2

rename "Managers"

There are several classes whose names wnd with "Manager" in lib i.s.,e GeometryManager, RotationsManager, SolidsManager, LogicalPartsManager, PosPartsManager, MaterialsManager.

Rename those with more specific words.

Possible new names end with "Repository", "Registry", or "Store".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.