#116 Additional Nirt information

closed-works-for-me
Raytrace (11)
7
2010-11-01
2010-11-01
No

How difficult would it be to add the component ID number to the component information lines when performing a nirt? Currently I NIRT to find the components I need and then must list each component to get their respective ID numbers.

Discussion

  • Sean Morrison

    Sean Morrison - 2010-11-01
    • labels: 622316 --> Raytrace
    • priority: 5 --> 7
    • assigned_to: nobody --> starseeker
    • status: open --> closed-works-for-me
     
  • Sean Morrison

    Sean Morrison - 2010-11-01

    It's not very difficult at all and is actually something that nirt already supports through predefined custom report formats. You have to specify a different report format.

    See page 18 of the "Interactive Raytracing - The nirt Command" guide under Reporting Options:

    http://brlcad.org/wiki/Documentation

     
  • Bob Anderson

    Bob Anderson - 2010-11-01

    Thanks Sean. I looked at all the NIRT options but did not see one that listed the comp ID. I will check again.

     
  • Sean Morrison

    Sean Morrison - 2010-11-02

    It's perhaps worth noting that BRL-CAD has no notion of a component or a component ID (those are, however, constructs that MUVES overlays). There are regions and region IDs. NIRT will report the regionID if requested.

    If there are other values (such as an actual component ID) attached to an object as an attribute, you can similarly create a custom NIRT output that will report it. The document I mentioned covers that topic as well.

     
  • Bob Anderson

    Bob Anderson - 2010-11-02

    One thing I figured out that others may wish to know is that adding the region ID to NIRT uses an abbreviated form of the attribute. If you do an "attr show region" it will list the id as "region_id". This does not work when trying to add it to NIRT. NIRT, however, understands "reg_id".

    Sean, I used the "Query Ray Control" to change the output of NIRT on a Linux version but was wondering if I close BRL-CAD and reopen it, will it keep the format. I tried and it did. Where is this information stored?

     
  • Sean Morrison

    Sean Morrison - 2010-11-02

    The nirt documentation talks about an "attr" command -- this is for the *NIRT* command line. The "nirt>" prompt is the interactive prompt you'd get if you run nirt outside of mged (i.e., just like how you ran mged). The docs explain attributes under "Reporting Attributes in MGED: Advanced Formatting
    and Scripting" starting on page 28.

    Basically, nirt has a bunch of predefined variables that you can hook into. They're listed in appendix A on page 30 where you'll see that "reg_id" is the predefined way to print the region identifier. That is not, however, the general way to print attributes.

    You could also use nirt's "attr" command to print the actual "region_id" attribute that is on a region with "attr region_id" as the script. Same value, just different mechanism for getting at the value.

    Haven't verified, but the persisted nirt settings should be in your .mgedrc resource file.

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks