How to use g-stl ...( or g-iges)...?

  • Alex Pereira

    Alex Pereira - 2009-06-13

    Hi Forum

    I have compiled BRLCAD 7.14.6 in Debian 5.0 amd64... mged works ok, as well as archer...

    but when i try to convert a geometry created within BRLCAD to export it to salome platform or to mesh it in calculix, of snappyhexmesh of OpenFOAM, it fails...  :

    Like this :

    alex@iskandhar:~/work/brlcad/db$ ls
    axis.g         castle.g   crod.g  galileo.g  ktank.g     m35.g  operators.asc2g  pinewood.g  ss.g        tank_car.g~  toyjeep.g  wave.g      xmp.g
    bldg391.g      cornell.g  cube.g  havoc.g    lgt-test.g  m35.g~   mn      operators.g      prim.g      star.g      terra.dsp    truck.g    woodsman.g
    boolean-ops.g  cray.g     demo.g  kman.g     m35.asc     m35.g~1  moss.g  pic.g            sphflake.g  tank_car.g  terra.g      truck.stl  world.g

    alex@iskandhar:~/work/brlcad/db$ g-stl -o truck.stl m35.g

    Usage: g-stl [-bvi] [-xX lvl] [-a abs_tess_tol] [-r rel_tess_tol] [-n norm_tess_tol] [-D dist_calc_tol] [-o output_file_name.stl | -m directory_name] brlcad_db.g object(s)


    Isn't this how the syntax is supposed to be...  ?

    Without *.stl representation there is no CFD or FEA analysis...  :-(

    Can someone help me here...?

    Best regards


    • Sean Morrison

      Sean Morrison - 2009-08-30

      To clear up this thread and answer the original question, per the usage statement from g-stl there is an option missing.  You have to specify the .g filename as well as the name of "object(s)" in that .g file.  For example, in the m35.g file, there is a top-level object called "all.g" so you would run: g-stl -o trunk.stl m35.g all.g

      What object(s) you want to specify will vary depending on the .g file and how it was constructed.  The important point to take from this is that BRL-CAD .g files can contain many objects, so you have to tell it which one you want.  It will not just assume everything as there can trivially be tens of thousands of objects.

      To find out what top-level objects there are, you can run the "tops" command in MGED.  As geometry is usually constructed in a hierarchical fashion (think assemblies of assemblies of parts), there are usually only a handful of top-level objects and more than likely one of them will be interesting:  mged -c m35.g tops
      all.g/              old.s79             r682/R              r684/R
      cab.g/              old.s82             r683/R              r685/R

      In the case of the m35, there are 8 top-level objects.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks