scripting a brlcad database

Help
2006-02-16
2013-04-22
  • Paul Cobbaut

    Paul Cobbaut - 2006-02-16

    Hi,

    i use a script to create my projects in brlcad (look here http://cobbaut.be/stok.sh.txt to get the idea). After starting mged, i use the mouse to go to "File" - "Load Script" and it works! Great!

    But i'm looking for a way to run the script from the commandline (either inside mged, or as an option to mged). Is this possible ?

    Something like :
    paul@barry:~$ mged --run-script stok.sh

    thanks,
    pol :)

     
    • Nobody/Anonymous

      got part of it...

      inside mged "source stok.sh" does the trick!

      cheers,
      pol :)

       
    • Paul Cobbaut

      Paul Cobbaut - 2006-02-17

      something strange (but not a real problem)

      This script (http://cobbaut.be/stok.sh.txt) only works when i start mged from the BASH prompt with "mged dbstok.g".

      If i just start mged without database, and then inside mged type "source stok.sh" than it blocks on the "bev L.bev L.r".

      cheers,
      pol :)

       
    • Tom Browder

      Tom Browder - 2006-06-08

      Try starting with an empty db named, say "stok.g".  Then at the command line execute:

      % mged -c stok.g < stok.sh.txt

      I see errors but get a usable set of objects.

      -Tom

       
    • Jack Devanney

      Jack Devanney - 2006-09-06

      I also work from scripts.
      It is the key to a fully parametric model,
      eg change the length of a ship, and have
      everything else change accordingly.
      The cycle is change the script, display the model,
      go back to the script. Its easy to write a
      little shell script that does this,
      but right now you not only have to type in the
      source command manually each time,
      you get an annoying pop up that asks if you want
      to start a new database.

      But Pols requested capability is more than
      a convenience, it is needed to implement
      3-D sli
      de shows and the like.
      Tom's workaround is not the answer
      since you still have to manually attach the
      display.

      Hope this gets on the todo list.

      Jack

       

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

Sign up for the SourceForge newsletter:





No, thanks