bug in mged scripting ?

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

    Below is a strange thing...it works when i copy paste all the commands and execute them manually in mged, but it fails when i run it as a shell script.

    Maybe i'm doing something wrong here.

    cheers,
    pol :)

    #!/bin/sh

    rm -f db.g

    mged -c db.g << EOF > /dev/null 2>&1

    title Bug in brl-cad ?
    units mm

    center 0 0 0

    # This works perfectly when typing manually in mged
    # but it fails when run as a shell script

    # screenshot of top view when typing manually:
    #
    #  \ #   \____________
    #

    # screenshot of top view when running the script:
    #    ____________
    #
    #            \ #

    # make a wall
    in wall.s arb8 0 0 0 313 0 0 313 5 0 0 5 0 0 0 263 313 0 263 313 5 263 0 5 263
    # make an adjacent wall at 135 degrees
    in wall2.s arb8 0 0 0 75 0 0 75 5 0 0 5 0 0 0 263 75 0 263 75 5 263 0 5 263
    sed wall2.s
    tra 0 5 0
    rot 0 0 -135
    accept

    EOF

    mged db.g

     
    • Paul Cobbaut
      Paul Cobbaut
      2006-02-26

      grmbl...wrong wording indeed :-/

      With "the script fails", i mean it will run without errors, but it produces a different (and wrong) output compared to entering those commands manually in mged.

      cheers,
      pol :)