[Gate-users] STL file for detector

Svetlana G. Shasharina sveta at txcorp.com
Wed Aug 14 18:20:50 CEST 2019


Hi everybody,

I tried to run the kidney example under:

GateContrib-master/misc/geometry_STL/kidneys and got the following error:

Core-0] Initialization of geometry
[G4-cerr] STL file corrupted: number of facets do not correspond to file 
size.
^Z
[2]+  Stopped                 Gate mac/main.mac

I am getting the same message for the Suzanne example.

Next I tried to use STL files (binary and asci STLs attached) instead of 
the "LSO" box in 
GateContrib-master/imaging/PET/PET_CylindricalPET_System.mac by doing 
the following editing:

#       LSO layer
/gate/crystal/daughters/name                  LSO
#/gate/crystal/daughters/insert                box
/gate/crystal/daughters/insert                tessellated
/gate/LSO/placement/setTranslation            -0.75 0.0 0.0 cm
/gate/LSO/geometry/setPathToSTLFile            lsobox.stl
#/gate/LSO/geometry/setXLength                 15 mm
#/gate/LSO/geometry/setYLength                 3.0 mm
#/gate/LSO/geometry/setZLength                 3.8 mm
/gate/LSO/setMaterial                         LSO
/gate/LSO/vis/setColor                        red

This example does not run anymore (it does when it uses the original 
box) and I am getting:

I/O warning : failed to load external entity "./Materials.xml"
I/O warning: Discard the previous warning if your simulation doesn't 
transport OPTICAL PHOTONS.
Otherwise, please copy the ./Materials.xml file from the gate-source 
directory in the directory where you run your main macro.
I/O warning : failed to load external entity "./Materials.xml"
I/O warning: Discard the previous warning if your simulation doesn't 
transport OPTICAL PHOTONS.
Otherwise, please copy the ./Materials.xml file from the gate-source 
directory in the directory where you run your main macro.
I/O warning : failed to load external entity "./Materials.xml"
I/O warning: Discard the previous warning if your simulation doesn't 
transport OPTICAL PHOTONS.
Otherwise, please copy the ./Materials.xml file from the gate-source 
directory in the directory where you run your main macro.
I/O warning : failed to load external entity "./Materials.xml"
I/O warning: Discard the previous warning if your simulation doesn't 
transport OPTICAL PHOTONS.
Otherwise, please copy the ./Materials.xml file from the gate-source 
directory in the directory where you run your main macro.

  *** Break *** illegal instruction
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/opt/contrib-appleclang/gate-8.2/bin/Gate] 
GateSystemComponent::SetCreator(GateVVolume*) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UIcommand::DoIt(G4String) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UImanager::ApplyCommand(char const*) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UIbatch::ExecCommand(G4String const&) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UIbatch::SessionStart() (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UImanager::ExecuteMacroFile(char const*) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UIcommand::DoIt(G4String) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] 
G4UImanager::ApplyCommand(char const*) (no debug info)
[/opt/contrib-appleclang/gate-8.2/bin/Gate] main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
[<unknown binary>] (no debug info)
[LSO::IsValidAttachmentRequest]:
     The volume creator ('?sveta at bladerunner/.../PET$

Does anybody have a working example with STL geometry?

Thank you,

Svetlana

On 8/8/19 5:09 PM, Matthew Strugari wrote:
> Hi Svetlana,
>
> Take a look at the section How to build a "tessellated" volume on the 
> wiki page 
> http://wiki.opengatecollaboration.org/index.php/Users_Guide:Defining_a_geometry. 
> The sample code is from the GateContrib GitHub repository as outlined 
> on the wiki.
>
> Cheers,
> Matthew
>
> --
> Matthew Strugari
> Biomedical Translational Imaging Centre - BIOTIC,
> 5890 University Ave,
> Halifax, NS, B3K 6R8
>
>
> On Aug 8, 2019, at 6:28 PM, Svetlana G. Shasharina <sveta at txcorp.com 
> <mailto:sveta at txcorp.com>> wrote:
>
>> Hello,
>>
>> Is there a way to use an STL file for the detector geometry?
>>
>> Thank you,
>>
>> Sveta
>>
>> -- 
>> Svetlana Shasharina                            | sveta at txcorp.com 
>> <mailto:sveta at txcorp.com>
>> Vice-President of Computational Infrastructure | Tech-X Corporation
>>
>> _______________________________________________
>> Gate-users mailing list
>> Gate-users at lists.opengatecollaboration.org 
>> <mailto:Gate-users at lists.opengatecollaboration.org>
>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

-- 
Svetlana Shasharina                            | sveta at txcorp.com
Vice-President of Computational Infrastructure | Tech-X Corporation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190814/3136f08b/attachment-0001.html>
-------------- next part --------------
solid Created by Gmsh
facet normal -1 -0 -0
  outer loop
    vertex -0.075 0.0015 0.0022
    vertex -0.075 0.0015 -0.0016
    vertex -0.075 -0.0015 0.0022
  endloop
endfacet
facet normal -1 0 0
  outer loop
    vertex -0.075 0.0015 -0.0016
    vertex -0.075 -0.0015 -0.0016
    vertex -0.075 -0.0015 0.0022
  endloop
endfacet
facet normal 1 -0 0
  outer loop
    vertex 0.075 -0.0015 0.0022
    vertex 0.075 0.0015 -0.0016
    vertex 0.075 0.0015 0.0022
  endloop
endfacet
facet normal 1 0 0
  outer loop
    vertex 0.075 -0.0015 0.0022
    vertex 0.075 -0.0015 -0.0016
    vertex 0.075 0.0015 -0.0016
  endloop
endfacet
facet normal 0 -1 0
  outer loop
    vertex -0.075 -0.0015 -0.0016
    vertex 0.075 -0.0015 -0.0016
    vertex 0.075 -0.0015 0.0022
  endloop
endfacet
facet normal 0 -1 0
  outer loop
    vertex -0.075 -0.0015 0.0022
    vertex -0.075 -0.0015 -0.0016
    vertex 0.075 -0.0015 0.0022
  endloop
endfacet
facet normal 0 1 0
  outer loop
    vertex 0.075 0.0015 0.0022
    vertex 0.075 0.0015 -0.0016
    vertex -0.075 0.0015 -0.0016
  endloop
endfacet
facet normal 0 1 0
  outer loop
    vertex 0.075 0.0015 0.0022
    vertex -0.075 0.0015 -0.0016
    vertex -0.075 0.0015 0.0022
  endloop
endfacet
facet normal 0 0 -1
  outer loop
    vertex -0.075 -0.0015 -0.0016
    vertex -0.075 0.0015 -0.0016
    vertex 0.075 0.0015 -0.0016
  endloop
endfacet
facet normal 0 0 -1
  outer loop
    vertex 0.075 -0.0015 -0.0016
    vertex -0.075 -0.0015 -0.0016
    vertex 0.075 0.0015 -0.0016
  endloop
endfacet
facet normal 0 0 1
  outer loop
    vertex 0.075 0.0015 0.0022
    vertex -0.075 0.0015 0.0022
    vertex -0.075 -0.0015 0.0022
  endloop
endfacet
facet normal 0 0 1
  outer loop
    vertex 0.075 0.0015 0.0022
    vertex -0.075 -0.0015 0.0022
    vertex 0.075 -0.0015 0.0022
  endloop
endfacet
endsolid Created by Gmsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsobox.stl
Type: application/octet-stream
Size: 684 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190814/3136f08b/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PET_CylindricalPET_System.mac
Type: image/x-macpaint
Size: 12869 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190814/3136f08b/attachment-0001.bin>


More information about the Gate-users mailing list