Message: Re: problems with BREPS Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: problems with BREPS 

Forum: Geometry
Re: Question problems with BREPS (Nika Valencic)
Date: 13 Mar, 2012
From: John Allison <John Allison>

On Mon, 12 Mar 2012 20:19:45 GMT, Nika Valencic wrote:

> Browsing through the forum and User Manuals I saw several warnings that
> BREPS are not fully implemented. I managed to construct a solid using
> G4BREPSolidPolyhedra and it worked. However, when I tried to construct a
> G4BREPSolidCylinder and visualize it I got a cube(?!) (the code is
> attached bellow).

I'm afraid the visualisation of BREPS via polyhedral representations is in a poor shape - only those BREPS that have equivalents in CSG are implemented, the rest default to a bounding box - but you may always use RayTracer or RayTracerX, which use Geant4's internal tracking algorithms. It's quite slow, so a good strategy is to find a good view with Qt, say, then

  /vis/open RayTracerX
  /vis/viewer/set/all viewer-0
  /vis/viewer/refresh

You may have to make other volumes invisible with /vis/geometry/set/visible if they get in the way.

> My first question: Am I doing something wrong? Is the problem only in
> visualization (I use Qt) or is just that this class is not implemented
> completely?

No. Yes.

> My second question: I want to construct a body that looks like a
> trapezoid, but with two circular edges and two straight but nonparallel
> edges, of thickness z (figure is attached bellow) . So far I
> successfully constructed (approximation) of this body, using
> G4ExtrudedSolid. Now I want to construct the body with actual circular
> edges. I see two options; BREPS or boolean solids. Which method needs
> more CPU time? I really want to try and build this body using BREPS. Can
> this be done? I tried defining all the surfaces that confine this body
> (planes + cylindrical surfaces) but failed. Can you give me some advice
> where can I look for examples of BREP construction and if this is
> possible?

I'm not an expert on geometry, but if you can find a way with CSG solids (G4Box, etc.) then that is the most efficient. Your shape looks like something that could be made with a G4Tubs. Next up are booleans of CSGs. Next come BREPS, because the tracking has to loop over the boundaries to find the distances at every step, and I'm not sure how reliable the BREPS tracking algorithms are. Last come G4TessellatedSolid and G4ExtrudedSolid (is a G4TessellatedSolid) because tracking has to loop over all facets.

> My third question: When I visualize the body made by G4ExtrudedSolid I
> get some lines inside the body (figure attached bellow). I know this is
> just a consequence of visualization, but I was wondering if there is a
> way to get rid of them. I tried with /vis/viewer/set/edge and
> /vis/viewer/set/hiddenEdge commands but the lines are always present.
> Even if I draw this body as solid (/vis/viewer/set/style solid). Can you
> give me some advice how to make these lines invisible?

As I said, G4ExtrudedSolid is a G4TessellatedSolid so you always get all edges. There is no way of knowing if an edge is "auxiliary", i.e., within a plane or curved surface, or a genuine edge. If you "/vis/viewer/set/style" solid and "/vis/viewer/set/edge false", you should not see any edges.

> P.S: I'm using Geant4.9.5 on mac OS X (10.7.2).

Good to see you have Qt working on OS X (10.7.2) Lion.

 Add Message Add Message
to: "Re: problems with BREPS"

 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 ]