Added extent() and contains() methods. Completed implementation of volume calculation for Boolean shapes.
-
A new method
extent()
that finds the bounding box of the shape has been implemented for all classes derived fromGeoShape
. The calculations have been verified by comparison with the corresponding calculations in Geant4. -
A protected method
diskExtent()
has been added intoGeoShape
. This method is used or calculation of the extend of a tube, cone, polycone and torus. -
Added new method
contains(x,y,z)
. This method returnstrue
if the point belongs to the shape,false
otherwise. -
Implemented
GeoShape::volume()
that calculates volume using MC method. It's allows to calculate volume of the Boolean shapes with good precision.
Merge request reports
Activity
Thanks for this MR, @evc !
Just a quick question, for my own understanding: what is the definition of "disk" here? Is it something like a "circular bounding box"?
If so, I would infer that the size of the "disk" for a Polycone, for instance, will be equal to the size of the larger base; is that correct?
Thanks, --Ric.
“disk” is a 2D ring sector,
diskExtent()
calculates the 2D bounding rectangle of the disk. In case of a Polycone it calculates the bounding rectangle of the projection of the Polycone to XY-plane.I’ve added this method into
GeoShape
because it is used for several shapes. Alternatively, it could be a member of an auxiliary collection of useful geometry functions, like it was done in Geant4 (seeG4GeomTools
).Cheers, --Evgueni
- Resolved by Vakhtang Tsulaia
@rbianchi do you happen to know why we did not have a pipeline running for this MR? Thanks
added 4 commits
-
46d7a78d...fece4eda - 2 commits from branch
GeoModelDev:master
- 5b55a79b - Added extent() method for calculation of bounding box
- a12ff542 - Added contains(x,y,z); Implemented GeoShape::volume() that calculates volume using MC method
-
46d7a78d...fece4eda - 2 commits from branch
added 12 commits
-
a12ff542...e1df7414 - 9 commits from branch
GeoModelDev:master
- 02ed0364 - Added extent() method for calculation of bounding box
- be230037 - Added contains(x,y,z); Implemented GeoShape::volume() that calculates volume using MC method
- 2fd12751 - Faster algorithm in GeoPgon::contains()
Toggle commit list-
a12ff542...e1df7414 - 9 commits from branch
mentioned in commit 39ae6dce