what EXACTLY are the args to the oed command

2010-06-25
2013-04-22
  • I have a simple combination:

    mged> l string.tmp
    string.tmp: -
       u font-m.f

    I need to edit the matrix from a script, so I tried the oed command.

    via the GUI I can edit this way:
    mged> e string.tmp
       using GUI Edit -> Matrix Selection
       first popup select: "/string.tmp/font-m.f"
       second popup select: "string.tmp"

    However, all of these oed commands fail:
    mged> oed /string.tmp/font-m.f string.tmp
    Error: Unable to find solid matching path

    mged> oed /string.tmp/font-m.f /string.tmp
    Error: Unable to find solid matching path

    mged> oed string.tmp/font-m.f string.tmp
    Error: Unable to find solid matching path

    mged> oed string.tmp/font-m.f /string.tmp
    Error: Unable to find solid matching path

    mged> oed string.tmp /string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed /string.tmp /string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed string.tmp string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed /string.tmp string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed string.tmp string.tmp
    Error: Unable to find solid matching path

    mged> oed /string.tmp /string.tmp
    Error: Unable to find solid matching path

    mged> oed /string.tmp string.tmp
    Error: Unable to find solid matching path

    mged> oed string.tmp /string.tmp
    Error: Unable to find solid matching path

    mged> oed /string.tmp/font-m.f /string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed string.tmp/font-m.f string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed string.tmp/font-m.f /string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed /string.tmp/font-m.f string.tmp/font-m.f
    Error: Unable to find solid matching path

    mged> oed /string.tmp/font-m.f /__MATRIX__/string.tmp
    db_lookup(__MATRIX__) failed: __MATRIX__ does not exist
    db_string_to_path() of '__MATRIX__/string.tmp' failed on '__MATRIX__'
    Error: bad rhs path

    What EXACTLY do I put for the arguments to the oed command?

    I have version 7.12.2 on Mac OS X

    Gilligan

     
  • Sean Morrison
    Sean Morrison
    2010-06-25

    Hehe, that's pretty funny.  Apologies, though, as that's certainly not intended to belittle your frustration in the least.  The version you wanted was probably this:

    mged> oed / string.tmp/font-m.f

    There is only ONE path to a primitive, i.e. "/string.tmp/font-m.f", and you need specify which matrix along that path you are modifying.  So you break that one path into a left-hand side and a right hand side.  Since via the GUI you selected "string.tmp", that means you want to modify the matrix above it, so you're left with just a slash for the left-hand side and "string.tmp/font-m.f" for the right-hand side.

    Understandably confusing.  That's why there's an entire tutorial dedicated to the 'oed' command, number 5 on the website .

    http://brlcad.org/wiki/Documentation

    It's been a long-standing to-do item to change the oed command so you don't have to specify two sides to a path, where you'd instead just specify the object or instance you intend to modify, but there's a deep implementation detail that presently requires a path all the way down to a primitive. 

    Cheers!
    Sean