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: Outline Depth: Add message:

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