Presentation is loading. Please wait.

Presentation is loading. Please wait.

IT / API 1 CERN 1-Feb-16 GBLIB: classes to deal with geometrical data Evgueni Tcherniaev IT / API CLHEP workshop, 27-31 January.

Similar presentations


Presentation on theme: "IT / API 1 CERN 1-Feb-16 GBLIB: classes to deal with geometrical data Evgueni Tcherniaev IT / API CLHEP workshop, 27-31 January."— Presentation transcript:

1 Evgueni.Tcherniaev@cern.ch, IT / API 1 CERN 1-Feb-16 GBLIB: classes to deal with geometrical data Evgueni Tcherniaev IT / API CLHEP workshop, 27-31 January 2003, CERN

2 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 2 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 Introduction GBLIB stands for Geometry Builder Library. It is intended to be a collection of classes to work with data describing 3D geometrical objects. At present time all classes in GBLIB can be subdivided in three categories: –Foundation classes –Classes for detector geometry description –Graphics

3 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 3 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 Foundation classes –/gblib/templates/ tree.h – tree template class hash_map.hh – hash_map container –/gblib/geometry/ 2D & 3D basic geometrical objects –Point2D, Vector2D, Normal2D, Line2D –Point3D, Vector3D, Normal3D, Line3D, Plane3D –/gblib/transformation/ 2D & 3D transformations: –Translation2D, Rotation2D, Transformation2D –Translation3D, Rotation3D, Transformation3D

4 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 4 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 gblib/geometry classes BasicVector3D Point3DVector3DNormal3D P1 P2 P0 P0 = d2*P1 – d1*P2 d2 – d1

5 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 5 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 Foundation classes (cont.) –/gblib/polyhedron/Polyhedron.hh polyhedral representation of basic solids –calculation of normals for faces and nodes –finding visibility of edges boolean operations on polyhedra calculation of volume and surface area detector geometry checking

6 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 6 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 Classes for Detector Geometry Description –/gblib/evaluator/ Evaluator.hh – evaluator of physical expressions: 10[m]+25[cm] –/gblib/si/ Quantity.hh – basic class for physical quantity; similar to Siunits but with run-time checking Quantities.hh – physical quantities: Mass, Length, Time etc. QuantityConverter.hh – conversion of a Quantity object to a string –/gblib/csgparser/ CsgParser.hh – parser of boolean expressions CsgAbsMaker – abstract maker of operations in boolean expressions

7 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 7 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 CSG object Constructive Solid Geometry Object or Boolean Solid is a 3D solid body constructed using boolean operations on basic solids (box, tube, cone, sphere, body of rotation, etc) CSG object can be defined an expression. Example: (a:t1+b:t2):t3 where a,b are basic solids and t1,t2,t3 are transformations Operations: + union - subtraction * intersection : transformation

8 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 8 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 Example of CSG object

9 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 9 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 Graphics –/gblib/graphics/ Projection.hh – projection transformation ProjectionMaster.hh – class for managing transformations between different (user, normalized, view and projected) spaces during visualization PolygonCutter.hh – class for making different cuts Eliminator.hh – hidden lines, hidden surfaces removal Many other things can be implemented in this category. What about a special library for HEP oriented graphics (like HIGZ ) ?

10 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 10 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 What else ? Class for checking correctness of geometry description. This can be done in assumption that: –all children are inside their parent –there is no intersection among children Simple cases like “box vs box” or “box vs cylinder” can be implemented directly. In case where it is difficult to implement a special function, such checking can be done in polygonal representation using the Polyhedron class: –(child - parent) = null –(child * child) = null

11 CLHEP Workshop, 27-31 January 2003, CERN Evgueni.Tcherniaev@cern.ch, IT / API 11 CERN GBLIB: classes to deal with geometrical data 1-Feb-16 What else ? (?) Geometry Modeler – a class which answers on the questions: –Where am I ? –How far is a surface in a given direction ? –How far is the nearest surface ?


Download ppt "IT / API 1 CERN 1-Feb-16 GBLIB: classes to deal with geometrical data Evgueni Tcherniaev IT / API CLHEP workshop, 27-31 January."

Similar presentations


Ads by Google