mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-04-19 04:36:09 +08:00
Sync changes from upstream repository
Co-authored-by: Andrew Le Bihan <andy@mcneel.com> Co-authored-by: Dale Fugier <dale@mcneel.com> Co-authored-by: Dale Lear <dalelear@mcneel.com> Co-authored-by: Greg Arden <greg@mcneel.com> Co-authored-by: Jussi <jussi@mcneel.com> Co-authored-by: Lowell <lowell@mcneel.com> Co-authored-by: Rajaa Issa <rajaa@mcneel.com> Co-authored-by: Steve Baer <steve@mcneel.com> Co-authored-by: alain <alain@mcneel.com> Co-authored-by: chuck <chuck@mcneel.com> Co-authored-by: piac <giulio@mcneel.com>
This commit is contained in:
@@ -1535,17 +1535,18 @@ bool ON_RevSurface::GetBBox( // returns true if successful
|
||||
abox.Set(P,false);
|
||||
while( m_axis.ClosestPointTo(P,&t) ) // not a loop - used for flow control
|
||||
{
|
||||
abox.Set(arc.plane.origin,true);
|
||||
// If we cannot construct a valid arc, then P and the point on the axis
|
||||
// are added to the bounding box. One case where this happens is when
|
||||
// P is on the axis of revolution. See bug 84354.
|
||||
|
||||
arc.plane.origin = m_axis.PointAt(t);
|
||||
arc.plane.xaxis = P-arc.plane.origin;
|
||||
abox.Set(arc.plane.origin,true);
|
||||
arc.radius = arc.plane.xaxis.Length();
|
||||
if ( !arc.plane.xaxis.Unitize() )
|
||||
break;
|
||||
if ( fabs(arc.plane.xaxis*arc.plane.zaxis) > 0.0001 )
|
||||
double dot = arc.plane.xaxis*arc.plane.zaxis;
|
||||
if ( fabs(dot) > 0.0001 )
|
||||
break;
|
||||
arc.plane.yaxis = ON_CrossProduct(arc.plane.zaxis,arc.plane.xaxis);
|
||||
if ( !arc.plane.yaxis.Unitize() )
|
||||
|
||||
Reference in New Issue
Block a user