Message: Re: G4IntersectionSolid and solids that have no intersection Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: G4IntersectionSolid and solids that have no intersection 

Forum: Geometry
Re: None G4IntersectionSolid and solids that have no intersection (Lucas Clemente)
Re: Question Re: G4IntersectionSolid and solids that have no intersection (Lucas Clemente)
Date: 11 Feb, 2008
From: John Apostolakis <John Apostolakis>

Dear Lucas,

I am not sure what your goal is:
 - Do you wish to create an intersection between two solids, and to 
ensure that it is not null ?
 - Do you wish to avoid overlaps between two different volumes ?

By themselves, solids do not have any ability to know whether another 
solid, if it was placed in the same coordinate system would have any 
intersection.  This is not part of their specification.

 > do I have to calculate the intersection on my own?

The module was created to give the user the ability to create a solid 
from the boolean operation (intersection) of two solids - and the user 
has the responsibility to know that the result is meaningful (ie not null.)

You did not explain why you believe that the ways you tried did not 
work.  In particular the GetCubicVolume() method, although only 
approximate for boolean solids, offers a reasonable estimation even by 
default.  If you need better accuracy than the default accuracy, please 
see below. 

This method will work less efficiently in the case of trying to 
intersect solids of small volume which are elongated and thin, and 
placed with large angles to all the axes (x,y,z).  This is simply 
because the estimation is done sampling points in a cube with axes equal 
to the common extent of the underlying volumes.

There are two ways to get an approximate answer to your question:

  - Use the solid's GetCubicVolume method, or if that is not accurate 
enough use the underlying method
   G4double G4VSolid::EstimateCubicVolume(G4int nStat, G4double epsilon) 
const
    with increasing number of points attempted (nStat) to obtain an 
estimate of the volume of the potential intersection.

  - create a physical volume with each one (each will need a logical 
volume too).  When you place these in the same coordinate system, use 
our 'overlap detection' methods to see whether an overlap is detected.  
In particular in this case I do not recommend the DAVID tool, which 
gives only approximate answers.

Best regards,
John Apostolakis

P.S.  As you write from a Gmail account, it is difficult to understand 
your area of application and affiliation.  Could you please let us know 
your affiliation and the type of project or simulation that you are 
working on.  Also could you please include it in your 'signature' in 
future postings on HyperNews in order to assist Geant4 developers.

Lucas Clemente wrote:
> *** Discussion title: Geometry
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/geometry/856/1"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
>
> I just tried out several ways, including G4VisExtent, GetCubicVolume(),
> GetSurfaceArea (), but none of them did work.
>
> Is there any possibility, or do I have to calculate the intersection on
> my own?
>   

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: G4IntersectionSolid and solids that have no intersection   (Lucas Clemente - 11 Feb, 2008)
 Add Message Add Message
to: "Re: G4IntersectionSolid and solids that have no intersection"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]