|Message: Re: G4IntersectionSolid and solids that have no intersection||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
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:||Outline Depth:||Add message:|