POV-Ray : Newsgroups : povray.bugreports : Two BBox calculation bugs in CSG and Quadric? : Two BBox calculation bugs in CSG and Quadric? Server Time
25 Apr 2024 08:17:15 EDT (-0400)
  Two BBox calculation bugs in CSG and Quadric?  
From: Andreas Kaiser
Date: 19 Aug 2019 16:28:11
Message: <rdulle5su2vkqmah9jbpmf4tvhgh81l9gp@4ax.com>
see CSG::Compute_BBox() in CSG.cpp and Quadric::Compute_BBox(Vector3d&
ClipMin, Vector3d& ClipMax) in Quadric.cpp:
...
            Make_BBox_from_min_max(BBox, NewMin, NewMax);
 
            /* Beware of bounding boxes too large. */

            if((BBox.size[X] > CRITICAL_LENGTH) ||
               (BBox.size[Y] > CRITICAL_LENGTH) ||
               (BBox.size[Z] > CRITICAL_LENGTH))
                Make_BBox(BBox, -BOUND_HUGE/2, -BOUND_HUGE/2,
-BOUND_HUGE/2, BOUND_HUGE, BOUND_HUGE, BOUND_HUGE);

CRITICAL_LENGTH is defined as 1.0e06, BOUND_HUGE/2 as 1.0e10 in both
cases.

This code will never shrink/limit the resulting BBox like the comment
above might suggest.
It will 'blow up' instead all dimensions of a BBox if just one of its
dimensions exceeds CRITICAL_LENGTH (which is still smaller than the
resulting dimension(s)).
 
I have no idea what the original intention might have been.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.