<div dir='auto'>Dear Sveta,<div dir="auto"><br></div><div dir="auto">your version of the STL file you try to use is likely bad. Maybe you 'simply' downloaded GateContrib from GitHub instead of installing git-lfs and using git-lfs pull to get the GateContrib files.</div><div dir="auto"><br></div><div dir="auto">If you need more information on how to get GateContrib properly don't hesitate to ask.</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto">Maxime Chauvin</div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">Le 14 août 2019 8:50 PM, "Svetlana G. Shasharina" <sveta@txcorp.com> a écrit :<br type="attribution" /><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
    <p>Hi Matthew,</p>
    <p>I copied Materials.xml into PET directory.  <br />
    </p>
    <p>Nice catch about the units in our STL file!  We use meters when
      create STL...  So I did 2 things wrong here: I should have had
      0.015 for m and since GATE expects mm, I should use dimensions
      15x3x3.8.  I recreated the STL file and still get the seg fault in
      this example. <br />
    </p>
    <p>But I succeeded in just adding an STL phantom and now can see it!
      <br />
    </p>
    <p>Thank you,</p>
    <p>Sveta<br />
    </p>
    <p><br />
    </p>
    <p><br />
    </p>
    <div>On 8/14/19 12:12 PM, Matthew Strugari
      wrote:<br />
    </div>
    <blockquote>
      
      
      
      <div>
        <p>Hi Svetlana,</p>
        <p> </p>
        <p>I cannot speak to the
            examples without testing them myself. However, when using
            your STL files, the first warning suggests that the
            Materials.xml file is not located in the folder where you
            are executing “Gate PET_CYlindricalPet_System.mac”. You can
            copy the .xml files into your directory or use softlinks to
            reference the location of the .xml files in order to avoid
            different versions of the materials/surface files should you
            make any edits.</p>
        <p> </p>
        <p>When loading your STL
            files, I also receive the SegFault but I suspect that the
            problem is due to your STL files. When I load the lsobox STL
            files into Slicer 3D, the long axis has a length of 0.15 mm
            rather than the desired 15 mm. What program did you use to
            create your STL files and have you verified their dimensions
            and orientations for loading directly into Gate?</p>
        <p> </p>
        <p>Cheers,</p>
        <p>Matthew</p>
        <p> </p>
        <p> </p>
        <div style="border:none;border-top:solid #b5c4df 1pt;padding:3pt 0cm 0cm 0cm">
          <p><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">"Svetlana G.
              Shasharina" <a href="mailto:sveta@txcorp.com"><sveta@txcorp.com></a><br />
              <b>Date: </b>Wednesday, August 14, 2019 at 1:20 PM<br />
              <b>To: </b>Matthew Strugari
              <a href="mailto:matthew.strugari@dal.ca"><matthew.strugari@dal.ca></a><br />
              <b>Cc: </b><a href="mailto:gate-users@lists.opengatecollaboration.org">"gate-users@lists.opengatecollaboration.org"</a>
              <a href="mailto:gate-users@lists.opengatecollaboration.org"><gate-users@lists.opengatecollaboration.org></a>, Peter
              Neilson <a href="mailto:neilson@txcorp.com"><neilson@txcorp.com></a><br />
              <b>Subject: </b>Re: [Gate-users] STL file for detector</span></p>
        </div>
        <div>
          <p> </p>
        </div>
        <p>Hi everybody,</p>
        <p>I tried to run the kidney example under:</p>
        <p>GateContrib-master/misc/geometry_STL/kidneys and got the
          following error:</p>
        <p>Core-0] Initialization of geometry<br />
          [G4-cerr] STL file corrupted: number of facets do not
          correspond to file size.<br />
          ^Z<br />
          [2]+  Stopped                 Gate mac/main.mac</p>
        <p>I am getting the same message for the Suzanne example.</p>
        <p>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:</p>
        <p>#       LSO layer<br />
          /gate/crystal/daughters/name                  LSO<br />
          #/gate/crystal/daughters/insert                box<br />
          /gate/crystal/daughters/insert                tessellated<br />
          /gate/LSO/placement/setTranslation            -0.75 0.0 0.0 cm<br />
          /gate/LSO/geometry/setPathToSTLFile            lsobox.stl<br />
          #/gate/LSO/geometry/setXLength                 15 mm<br />
          #/gate/LSO/geometry/setYLength                 3.0 mm<br />
          #/gate/LSO/geometry/setZLength                 3.8 mm<br />
          /gate/LSO/setMaterial                         LSO<br />
          /gate/LSO/vis/setColor                        red</p>
        <p>This example does not run anymore (it does when it uses the
          original box) and I am getting:</p>
        <p>I/O warning : failed to load external entity
          "./Materials.xml"<br />
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br />
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br />
          I/O warning : failed to load external entity "./Materials.xml"<br />
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br />
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br />
          I/O warning : failed to load external entity "./Materials.xml"<br />
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br />
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br />
          I/O warning : failed to load external entity "./Materials.xml"<br />
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br />
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br />
          <br />
           *** Break *** illegal instruction<br />
          [/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug
          info)<br />
          [<unknown binary>] (no debug info)<br />
          [/opt/contrib-appleclang/gate-8.2/bin/Gate]
          GateSystemComponent::SetCreator(GateVVolume*) (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIcommand::DoIt(G4String) (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UImanager::ApplyCommand(char const*) (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIbatch::ExecCommand(G4String const&) (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIbatch::SessionStart() (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UImanager::ExecuteMacroFile(char const*) (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) (no
          debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIcommand::DoIt(G4String) (no debug info)<br />
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UImanager::ApplyCommand(char const*) (no debug info)<br />
          [/opt/contrib-appleclang/gate-8.2/bin/Gate] main (no debug
          info)<br />
          [/usr/lib/system/libdyld.dylib] start (no debug info)<br />
          [<unknown binary>] (no debug info)<br />
          [LSO::IsValidAttachmentRequest]:<br />
              The volume creator ('?sveta@bladerunner/.../PET$ </p>
        <p>Does anybody have a working example with STL geometry?</p>
        <p>Thank you,</p>
        <p>Svetlana</p>
        <div>
          <p>On 8/8/19 5:09 PM, Matthew Strugari
            wrote:</p>
        </div>
        <blockquote style="margin-top:5pt;margin-bottom:5pt">
          <div>
            <p>Hi Svetlana, </p>
            <div>
              <p> </p>
            </div>
            <div>
              <p>Take a look at the section <span style="font-size:13.5pt">How to build a "tessellated"
                  volume on the wiki page </span><a href="http://wiki.opengatecollaboration.org/index.php/Users_Guide:Defining_a_geometry">http://wiki.opengatecollaboration.org/index.php/Users_Guide:Defining_a_geometry</a>.
                The sample code is from the GateContrib GitHub
                repository as outlined on the wiki.<br />
                <br />
                Cheers,</p>
            </div>
            <div>
              <p>Matthew</p>
            </div>
            <div>
              <p> </p>
            </div>
            <div>
              <p>--</p>
            </div>
            <div>
              <p>Matthew Strugari</p>
            </div>
            <div>
              <p>Biomedical Translational Imaging
                Centre - BIOTIC,</p>
            </div>
            <div>
              <p>5890 University Ave, </p>
            </div>
            <div>
              <p>Halifax, NS, B3K 6R8</p>
              <div>
                <p> </p>
              </div>
              <div>
                <p style="margin-bottom:12pt"><br />
                  On Aug 8, 2019, at 6:28 PM, Svetlana G. Shasharina
                  <<a href="mailto:sveta@txcorp.com">sveta@txcorp.com</a>>
                  wrote:</p>
              </div>
              <blockquote style="margin-top:5pt;margin-bottom:5pt">
                <div>
                  <p>Hello,<br />
                    <br />
                    Is there a way to use an STL file for the detector
                    geometry?<br />
                    <br />
                    Thank you,<br />
                    <br />
                    Sveta<br />
                    <br />
                    -- <br />
                    Svetlana Shasharina                            | <a href="mailto:sveta@txcorp.com">
                      sveta@txcorp.com</a><br />
                    Vice-President of Computational Infrastructure |
                    Tech-X Corporation<br />
                    <br />
                    _______________________________________________<br />
                    Gate-users mailing list<br />
                    <a href="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.opengatecollaboration.org</a><br />
                    <a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></p>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
        <pre>-- </pre>
        <pre>Svetlana Shasharina                            | <a href="mailto:sveta@txcorp.com">sveta@txcorp.com</a></pre>
        <pre>Vice-President of Computational Infrastructure | Tech-X Corporation  </pre>
      </div>
    </blockquote>
    <pre>-- 
Svetlana Shasharina                            | <a href="mailto:sveta@txcorp.com">sveta@txcorp.com</a>
Vice-President of Computational Infrastructure | Tech-X Corporation  </pre>
  </div>
</blockquote></div><br></div>