output of rtcheck on win32 7.8.0

Help
2006-06-20
2013-04-22
  • David Loman

    David Loman - 2006-06-20

    All,
    I am attempting to get any overlaps reported by rtcheck.exe on win32 7.8.0 to write to a .txt file.  Redirecting stdout(>/>>) only writes the commands on the command line to the .txt file.
    I am looking to find a way to automate logging of overlaps.  Any suggestions for solutions?

     
    • Sean Morrison

      Sean Morrison - 2006-06-20

      Hmm, that is an unfortunate side effect.  The reason it is behaving that way is that by default rtcheck is sending output to STDERR instead of STDOUT.  This could of course be changed in rtcheck and a plethora of other tools (feel free to submit a feature request for it), but historically that is how it has behaved.  The unfortunate part, however, is that as far as I know the Windows command interpreter shell does not provide a means to redirect STDERR.

      That said, all hope is not lost.  You can download a different shell for Windows (e.g. bash) which will provide full shell manipulation, or run rtcheck through a wrapper program like one of these two:

      http://www.teaser.fr/~amajorel/stderr/
      http://www.faqs.org/faqs/msdos-programmer-faq/part3/section-11.html

      Hope that helps.
      Sean

       
      • David Loman

        David Loman - 2006-06-20

        Good deal, I will check those out soon.  i was able to get stdErr routed to stdOut and then to a file, which works like a champ:

        rtcheck test.g all > test.txt 2<&1

        Only down side of this is that a 7k .g file kicks out about 250k of text and 90% of it is Garbage.  the last 10% of the file is where all the valid information is and a simple text parser is my next step.

        Thanks again!

         
        • Sean Morrison

          Sean Morrison - 2006-06-20

          Interesting.. that would imply that functionality has been added to redirect stderr in the newer versions of the Windows command interpreter..good to know.  That in turn means you don't need those other wrapper tools I mentioned.  You should be able to just capture standard input and error separately if the interpreter can indeed now handle proper redirections.  This should do the trick for you:

          rtcheck test.g all > overlaps.pl 2> summary.txt

          For what it's worth, rtcheck outputs a "plot file" to standard out.  That is the binary "Garbage" that you are seeing, which means that you probably have a lot of overlaps too.  Separating the two outputs (stdout and stderr) to two different files using the command above should solve that problem.  Also, that plot file data is actually rather useful -- it can then be read directly into mged and a variety of other tools in BRL-CAD to let you actually visualize the overlaps in 3D. 

          Inside mged, you should be able to issue "e all" and then "overlay overlaps.pl" and it should show you the overlaps as yellow line segments where the overlaps occurred.  The new MGED Quick Reference Card on http://brlcad.org lists the overlay command under the "Manipulating the View" section on the card.

          Cheers!
          Sean

           
    • jim_monte

      jim_monte - 2006-07-19

      Hi Sean,

      I had to hide from here for the past month or
      so because of some urgent things at work that
      were taking all of my time.  But the fire is
      mostly put out now.

      Your suggestion of using

      rtcheck test.g all > overlaps.pl 2> summary.txt

      will not work as of NT4, and I do not think
      that the command line processing has been enhanced
      since then.  Windows allows only a single
      redirection on the command line.  Others
      will be treated as arguments.

      Jim Monte

       
      • David Loman

        David Loman - 2006-07-19

        rtcheck -g100 -G100 -s1000 -a0 -e0 file.g object 1> Plot.pl 2> Overlaps.txt

        Just FYI: works like a champ on winXP.  Been using it in an automated script for a month now.

         
        • jim_monte

          jim_monte - 2006-07-20

          Thanks for the info.  I was completely wrong
          here since it also works fine in NT4 and W2k.
          What does not work is trying to redirect the
          SAME stream to multiple output files.

          Jim

           

Log in to post a comment.