Message: G4TessellatedSolid::AddFacet() Attempt to add facet not properly defined. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None G4TessellatedSolid::AddFacet() Attempt to add facet not properly defined. 

Forum: Geometry
Date: Jan 17, 04:19
From: Keith Sloan <Keith Sloan>

I am trying to create a Tessellated Solid, but when I try and add a facet I get the following error

    *** G4Exception : GeomSolids1002
          issued by : G4TessellatedSolid::AddFacet()
    Attempt to add facet not properly defined.

stdout has the following

    (6, 1, 4)
    Create Facet : 
    Vector (10.0, 10.0, 10.0) : Vector (0.0, 0.0, 10.0) : Vector (10.0, 0.0, 10.0)
    *** G4Exception : GeomSolids1002
          issued by : G4TessellatedSolid::AddFacet()
    Attempt to add facet not properly defined.

    *********************************************************************
    FACET TYPE       = G4TriangularFacet
    ABSOLUTE VECTORS = 
    P[0]      = (10,10,10)
    P[1]      = (0,0,10)
    P[2]      = (10,0,10)
    *********************************************************************

Relevant Python code is

    def fc2g4Vec(v) :
        return(G4ThreeVector(v[0],v[1],v[2]))

    def createFacet(v0,v1,v2) :
        print("Create Facet : ")
        print(str(v0)+" : "+str(v1)+" : "+str(v2))
        facet = G4TriangularFacet()
    #    facet = G4VFacet() cannot be initiated from python
    # need to convert FreeCAD base.Vector to Geant4 vector Hep3Vector
        facet.SetVertex(0,fc2g4Vec(v0))
        facet.SetVertex(1,fc2g4Vec(v1))
        facet.SetVertex(2,fc2g4Vec(v2))
        return(facet)

Then an appropriate

     tessellate = G4TessellatedSolid()
     tessellate.AddFacet(g4_facet)

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

1 None: Re: G4TessellatedSolid::AddFacet() Attempt to add facet not properly defined.   (Evgueni Tcherniaev - Jan 18, 01:35)
 Add Message Add Message
to: "G4TessellatedSolid::AddFacet() Attempt to add facet not properly defined."

 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 ]