Stream: brlcad

Topic: rt command scripts


view this post on Zulip Saran Narayan (Apr 09 2018 at 07:33):

@Daniel Rossberg Thank you accepting my patch,
I wanted to refactor the /rt/do.c file, the cm_ae is used to set the az and el in that file. I had this doubt on how to test the changes I make because I cannot figure out how this function is called.
Does it have to do with RT animation scripts? Animation Techniques in BRL-CAD
In that tutorial, there is a file moss.rtanim which is generated by the tabsub command, its doc file has an entry for ae. Tabsub.

view this post on Zulip Sean (Apr 09 2018 at 16:30):

@Sharan Narayan you could always write your own test (a simple main() that calls cm_ae with various values and checks that before == after). those commands are invoked via "rt scripts" which you can write with a text editor and specify via the -M rt option. you can see an example of one by running the "saveview" command in mged. it doesn't use an ae command, but you can edit that script, replace the view matrix with ae commands.

view this post on Zulip Saran Narayan (Apr 09 2018 at 16:47):

@Sean thank you for the feedback and changing the topic :grin:, I'll have a look soon.
I was refactoring the other MGED commands that take angles input (in degrees). So far I have tested and patched : ae, arot, mrot, qvrot, rot, setview, vrot, orot, rotobj (same as orot), qorot.

view this post on Zulip Sean (Apr 09 2018 at 16:48):

That sounds great!

view this post on Zulip Daniel Rossberg (Apr 09 2018 at 17:16):

And for the finishing touch update the documentation too? :wink:

view this post on Zulip Saran Narayan (Apr 10 2018 at 16:54):

@Sharan Narayan you could always write your own test (a simple main() that calls cm_ae with various values and checks that before == after). those commands are invoked via "rt scripts" which you can write with a text editor and specify via the -M rt option. you can see an example of one by running the "saveview" command in mged. it doesn't use an ae command, but you can edit that script, replace the view matrix with ae commands.

@Sean I tried to run the rt script generated by the setview command but in logs it says "ERROR: no primitives active". This error only happens when I add the ae line in the script otherwise it runs without any issues. Check the script : RT Script
Any suggestions?

And for the finishing touch update the documentation too? :wink:

Yes! made changes to the man pages and usage help that appears for every command edited including rt, glint and gqa command.

view this post on Zulip Saran Narayan (Apr 10 2018 at 17:08):

I am sure that just replacing the atof calls in cm_ae by bn_decode_angle( ) would do it without any issues, since the cm_ae is a basic function. I still wanted to see it in action. I must be missing something with the editing of rtscript file.


Last updated: Oct 09 2024 at 00:44 UTC