Message: G4ExtrudedSolid: What are the rules for "legal" or "illegal" vectors of points? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question G4ExtrudedSolid: What are the rules for "legal" or "illegal" vectors of points? 

Forum: Geometry
Date: 23 May, 2012
From: Forrest Iandola <Forrest Iandola>

I've noticed that certain combinations of points produce a valid G4ExtrudedSolids, and other combinations of points do not. Is there a set of "rules" that state whether a collection of points would produce a valid G4ExtrudedSolid?

I've included a couple of examples for reference.

Here's an example of a G4ExtrudedSolid that was error-free in my experiments:

    std::vector<G4TwoVector> points;
    G4double halfWidth = 1.0; // y 

    points.push_back(G4TwoVector(0.0, 1.0)); // (x, z)
    points.push_back(G4TwoVector(2.0, 1.0));
    points.push_back(G4TwoVector(0.0, -0.5));
    points.push_back(G4TwoVector(-2.0, -1.0));

    G4VSolid* rowExtrudedSolid = new G4ExtrudedSolid("DrillHole", points, halfWidth, 1,1,1,1); 
    //naturally, we would do the LogicalVolume and PhysicalVolume here

The following example doesn't get built properly, and it produces an error message.

    std::vector<G4TwoVector> points;
    G4double halfWidth = 1.0; // y

    points.push_back(G4TwoVector(0.0, 1.0)); // (x, z)
    points.push_back(G4TwoVector(2.0, 1.0));
    points.push_back(G4TwoVector(-2.0, -1.5));
    points.push_back(G4TwoVector(-1.0, -1.0));

    G4VSolid* rowExtrudedSolid = new G4ExtrudedSolid("DrillHole", points, halfWidth, 1,1,1,1);
    //naturally, we would do the LogicalVolume and PhysicalVolume here

Here's the error message that I get for the above example:

    *** G4Exception : InvalidSetup
    issued by : G4QuadrangularFacet::G4QuadrangularFacet()
    Length of sides of facet are too small or sides not planar.
    *** This is just a warning message.

    P0 = (1,1,-1)
    P1 = (3,1,-1)
    P2 = (-1,-1,-1)
    P3 = (0,-1,-1)
    Side lengths = P0->P12
    Side lengths = P1->P24.47214
    Side lengths = P2->P31
    Side lengths = P3->P02.23607

    *** G4Exception : InvalidSetup
    issued by : G4TessellatedSolid::AddFacet()
    Attempt to add facet not properly defined.
    *** This is just a warning message.
    Facet attributes:

    *********************************************************************
    FACET TYPE       = G4QuadragularFacet
    ABSOLUTE VECTORS = 
    P0               = (1,1,-1)
    P[1]      = (3,1,-1)
    P[2]      = (-1,-1,-1)
    P[3]      = (0,-1,-1)
    RELATIVE VECTORS = 
    E[1]      = (2,0,0)
    E[2]      = (-2,-2,0)
    E[3]      = (-1,-2,0)
    *********************************************************************

    *** G4Exception : InvalidSetup
    issued by : G4ExtrudedSolid::G4ExtrudedSolid()
    Making facets failed.
    *** Fatal Exception *** core dump ***

For the second example, which produces the error message, what is the problem? More generally, what are the characteristics that dictate whether a vector of points will be a "legal" G4ExtrudedSolid?

(For brevity, the above examples only contain 4 points each. In the Geant4 application that I am working on, we want to build G4ExtrudedSolids using tens or hundreds of points.)

Thanks,

Forrest

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

1 None: Re: G4ExtrudedSolid: What are the rules for   (Ivana Hrivnacova - 24 May, 2012)
(_ Question: Re: G4ExtrudedSolid: What are the rules for   (Forrest Iandola - 24 May, 2012)
1 Note: Re: G4ExtrudedSolid: What are the rules for   (Forrest Iandola - 24 May, 2012)
1 None: Re: G4ExtrudedSolid: What are the rules for   (Ivana Hrivnacova - 25 May, 2012)
2 None: Re: G4ExtrudedSolid: What are the rules for   (Ivana Hrivnacova - 25 May, 2012)
1 Ok: Re: G4ExtrudedSolid: What are the rules for   (Forrest Iandola - 25 May, 2012)
 Add Message Add Message
to: "G4ExtrudedSolid: What are the rules for "legal" or "illegal" vectors of points?"

 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 ]