Discussion:
[brlcad-devel] 7.26.0 BoT ray-tracing problem
Bob Anderson
2016-11-23 14:24:26 UTC
Permalink
I was wondering if anyone has experienced erroneous overlap reporting using rtcheck involving BoT solids. We had done some conversions from STL to G, brought them into the model and did some overlap checking only to find overlaps where there were clearly no solids colluding. I originally assumed that there was some bad triangulation that had occurred and we went on a quest to separate out parts of the STL model and to make sure they were clean and closed volumes. We then inserted the new STL models into the BRL-CAD model. Same issue. A coworker said that once he did the separations and reinserted the new parts into the model that the overlaps went away. He was using 7.24.0. When I opened the model in 7.26.0 the overlaps were still there. We went to another machine with 7.24.0 installed, and no overlaps were reported.



What appears to be going on is that the ray is not handling the entrances and exits correctly and appears to be extruding the BoT solid beyond its actual bounds causing the overlap. Below is a screenshot of the overlap. The only objects on the screen were these rollers and their framing. The solids also appear to look fine on screen when doing an “rt”, but that may be because its extrusion is into the screen where you wouldn’t see it.



[cid:***@01D2456B.61F43FE0]



I even tried the same by replacing the BoT rollers with a temporary on made from a BRL-AD rcc solid. The overlap remains in 7.26.0. See below.



[cid:***@01D2456B.61F43FE0]



Below is the on-screen reporting from the rtcheck run. I see no errors other than the overlap being reported.



mged> rtcheck -s2048

BRL-CAD Release 7.26.0 RT Check

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400

BRL-CAD Release 7.26.0 The BRL-CAD Ray-Tracing Library

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400

BRL-CAD Release 7.26.0 The BRL-CAD Numerical Computation Library

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400

BRL-CAD Release 7.26.0 The BRL-CAD Utility Library

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400



Compile-time debug symbols are available

Running on 03-HDM1BG2

Planning to run with 8 processors

C:\Program Files\BRLCAD 7.26.0\bin/rtcheck -M -s2048

opendb I:\Active_Projects\008003.001 - DAO - SAC CH-53K MS-C Phase II\Working\Task 4 - Assessment Refresh\Biggers Work Folder\Brrrrl CAD work Folder\BoB\Separated\2016-11-22_ch53k.g;

tree cabin_floor_roller_inserts.r temp.s1;

db title: Parts of: Untitled BRL-CAD Database

DIRBUILD: 0.276 user + 0.276 sys in 0.276 elapsed secs (100%)

Additional #malloc=87661, #free=0, #realloc=6 (87661 retained)

000001B70004A040 TOL 5.000000e-004 (sq=2.500000e-007) perp=1.000000e-006, para=9.999990e-001

Additional #malloc=2050, #free=0, #realloc=1 (2050 retained)

GETTREE: 0.073 user + 0.073 sys in 0.073 elapsed secs (100%)

Additional #malloc=246769, #free=-1, #realloc=2 (246770 retained)



...................Frame 0...................

PREP: 0.043 user + 0.043 sys in 0.043 elapsed secs (100%)

Additional #malloc=25027, #free=0, #realloc=869 (25027 retained)

NUBSP: 0 nu, 6044 cut, 6045 box (0 empty)

Tree: 2 solids in 2 regions

Model: X(5650, 13226), Y(-977, 977), Z(2436, 2480)

View: 55 azimuth, 25 elevation off of front view

Orientation: 0.161569, 0.512432, 0.804357, 0.253613

Eye_pos: 23224.5, 21143.7, 13959.8

Size: 174.365mm

Grid: (0.0851391, 0.0851391) mm, (2048, 2048) pixels

Beam: radius=0.0425695 mm, divergence=0 mm/1mm



OVERLAP PAIRS

------------------------------------------

/cabin_floor_roller_inserts.r and /temp.s1 overlap

</cabin_floor_roller_inserts.r, /temp.s1>: 733 overlaps detected, maximum depth is 41.5744mm

==========================================

SUMMARY

733 overlaps detected

1 unique overlapping pair (1 ordered pair)

Overlapping objects: /cabin_floor_roller_inserts.r /temp.s1

2 unique overlapping objects detected



SHOT: 9.804 user + 9.804 sys in 10 elapsed secs (98.04%)

Additional #malloc=921, #free=0, #realloc=14 (921 retained)

30941041 solid/ray intersections: 2489059 hits + 28451982 miss

pruned 8.0%: 1014811 model RPP, 1112902830 dups skipped, 1413417 solid RPP

Frame 0: 4194304 pixels in 1.23 sec = 3422524.68 pixels/sec

Frame 0: 3684624 rays in 1.23 sec = 3006629.13 rays/sec (RTFM)

Frame 0: 3684624 rays in 9.80 sec = 375828.64 rays/CPU_sec

Frame 0: 3684624 rays in 10.00 sec = 368462.40 rays/sec (wallclock)



These overlaps do not occur in the previous version of BRL-CAD (7.24.0).



Any thoughts?

Regards,

Robert Anderson
SURVICE Engineering
4141 Colonel Glenn Hwy, Suite 209
Dayton, OH 45431
TEL: (937)431-9914
Bob Anderson
2016-11-23 16:22:40 UTC
Permalink
Excellent. I put the command in my .mgedrc file so that it is set appropriately. The overlaps are now gone.

Bob

From: Christopher Sean Morrison [mailto:***@mac.com]
Sent: Wednesday, November 23, 2016 10:44 AM
To: BRL-CAD Developer Mailing List <brlcad-***@lists.sourceforge.net<mailto:brlcad-***@lists.sourceforge.net>>
Cc: Matt Biggers <***@survice.com<mailto:***@survice.com>>; Jonathan Marshall <***@survice.com<mailto:***@survice.com>>; Nick Gerstner <***@survice.com<mailto:***@survice.com>>
Subject: Re: [brlcad-devel] 7.26.0 BoT ray-tracing problem

Hi Bob,

Thanks for the report, and sorry you have had to spend time investigating.

I don't recall the details but we did discover a bug in the BoT intersection code shortly after release 7.26.0 was posted. It is already fixed on trunk but awaiting release 7.26.2. We don't have a good errata reporting procedure in place (suggestions welcome).

A workaround that might work is to switch rtcheck over to using TIE which is not only a workaround but faster for most models. Only limitation is that TIE currently only supports volume mode BoTs and the must be error free. To try it, you set an env var. For sh/bash:

set LIBRT_BOT_MINTIE 1
export LIBRT_BOT_MINTIE

Within Mged/archer, it is:

set env(LIBRT_BOT_MINTIE) 1

Sean



On Nov 23, 2016, at 9:24 AM, Bob Anderson <***@survice.com<mailto:***@survice.com>> wrote:

I was wondering if anyone has experienced erroneous overlap reporting using rtcheck involving BoT solids. We had done some conversions from STL to G, brought them into the model and did some overlap checking only to find overlaps where there were clearly no solids colluding. I originally assumed that there was some bad triangulation that had occurred and we went on a quest to separate out parts of the STL model and to make sure they were clean and closed volumes. We then inserted the new STL models into the BRL-CAD model. Same issue. A coworker said that once he did the separations and reinserted the new parts into the model that the overlaps went away. He was using 7.24.0. When I opened the model in 7.26.0 the overlaps were still there. We went to another machine with 7.24.0 installed, and no overlaps were reported.



What appears to be going on is that the ray is not handling the entrances and exits correctly and appears to be extruding the BoT solid beyond its actual bounds causing the overlap. Below is a screenshot of the overlap. The only objects on the screen were these rollers and their framing. The solids also appear to look fine on screen when doing an “rt”, but that may be because its extrusion is into the screen where you wouldn’t see it.



<image001.jpg>



I even tried the same by replacing the BoT rollers with a temporary on made from a BRL-AD rcc solid. The overlap remains in 7.26.0. See below.



<image003.jpg>



Below is the on-screen reporting from the rtcheck run. I see no errors other than the overlap being reported.



mged> rtcheck -s2048

BRL-CAD Release 7.26.0 RT Check

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400<mailto:***@ARLAWKLS18400>

BRL-CAD Release 7.26.0 The BRL-CAD Ray-Tracing Library

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400<mailto:***@ARLAWKLS18400>

BRL-CAD Release 7.26.0 The BRL-CAD Numerical Computation Library

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400<mailto:***@ARLAWKLS18400>

BRL-CAD Release 7.26.0 The BRL-CAD Utility Library

Mon, 29 Aug 2016 10:39:32 Eastern Daylight Time, Compilation 0

***@ARLAWKLS18400<mailto:***@ARLAWKLS18400>



Compile-time debug symbols are available

Running on 03-HDM1BG2

Planning to run with 8 processors

C:\Program Files\BRLCAD 7.26.0\bin/rtcheck -M -s2048

opendb I:\Active_Projects\008003.001 - DAO - SAC CH-53K MS-C Phase II\Working\Task 4 - Assessment Refresh\Biggers Work Folder\Brrrrl CAD work Folder\BoB\Separated\2016-11-22_ch53k.g;

tree cabin_floor_roller_inserts.r temp.s1;

db title: Parts of: Untitled BRL-CAD Database

DIRBUILD: 0.276 user + 0.276 sys in 0.276 elapsed secs (100%)

Additional #malloc=87661, #free=0, #realloc=6 (87661 retained)

000001B70004A040 TOL 5.000000e-004 (sq=2.500000e-007) perp=1.000000e-006, para=9.999990e-001

Additional #malloc=2050, #free=0, #realloc=1 (2050 retained)

GETTREE: 0.073 user + 0.073 sys in 0.073 elapsed secs (100%)

Additional #malloc=246769, #free=-1, #realloc=2 (246770 retained)



...................Frame 0...................

PREP: 0.043 user + 0.043 sys in 0.043 elapsed secs (100%)

Additional #malloc=25027, #free=0, #realloc=869 (25027 retained)

NUBSP: 0 nu, 6044 cut, 6045 box (0 empty)

Tree: 2 solids in 2 regions

Model: X(5650, 13226), Y(-977, 977), Z(2436, 2480)

View: 55 azimuth, 25 elevation off of front view

Orientation: 0.161569, 0.512432, 0.804357, 0.253613

Eye_pos: 23224.5, 21143.7, 13959.8

Size: 174.365mm

Grid: (0.0851391, 0.0851391) mm, (2048, 2048) pixels

Beam: radius=0.0425695 mm, divergence=0 mm/1mm



OVERLAP PAIRS

------------------------------------------

/cabin_floor_roller_inserts.r and /temp.s1 overlap

</cabin_floor_roller_inserts.r, /temp.s1>: 733 overlaps detected, maximum depth is 41.5744mm

==========================================

SUMMARY

733 overlaps detected

1 unique overlapping pair (1 ordered pair)

Overlapping objects: /cabin_floor_roller_inserts.r /temp.s1

2 unique overlapping objects detected



SHOT: 9.804 user + 9.804 sys in 10 elapsed secs (98.04%)

Additional #malloc=921, #free=0, #realloc=14 (921 retained)

30941041 solid/ray intersections: 2489059 hits + 28451982 miss

pruned 8.0%: 1014811 model RPP, 1112902830 dups skipped, 1413417 solid RPP

Frame 0: 4194304 pixels in 1.23 sec = 3422524.68 pixels/sec

Frame 0: 3684624 rays in 1.23 sec = 3006629.13 rays/sec (RTFM)

Frame 0: 3684624 rays in 9.80 sec = 375828.64 rays/CPU_sec

Frame 0: 3684624 rays in 10.00 sec = 368462.40 rays/sec (wallclock)



These overlaps do not occur in the previous version of BRL-CAD (7.24.0).



Any thoughts?

Regards,

Robert Anderson
SURVICE Engineering
4141 Colonel Glenn Hwy, Suite 209
Dayton, OH 45431
TEL: (937)431-9914



------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Developer mailing list
brlcad-***@lists.sourceforge.net<mailto:brlcad-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Loading...