Commit 71aece59 authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Exit early if incorrect input angles were given

Change-Id: I9953794d93d19484920423922b5deec039e414dc
parent 08952a59
......@@ -36,7 +36,7 @@ polaxes.SetBounds( cylinder.GetOutput().GetBounds() )
polaxes.SetPole( pole )
polaxes.SetAutoScaleRadius( 0 )
polaxes.SetMaximumRadius( 4.5 )
polaxes.SetMinimumAngle( .1 )
polaxes.SetMinimumAngle( 280. )
polaxes.SetMaximumAngle( 270. )
polaxes.SetNumberOfRadialAxes( 10 )
polaxes.SetNumberOfPolarAxisTicks( 9 )
......
......@@ -456,6 +456,17 @@ void vtkPolarAxesActor::BuildAxes( vtkViewport *viewport )
return;
}
if ( this->MinimumAngle > this->MaximumAngle )
{
// Incorrect angle input
vtkWarningMacro( << "Cannot draw radial axes: "
<< " minimum angle = "
<< this->MinimumAngle
<< " maximum angle = "
<< this->MaximumAngle );
return;
}
// Determine the bounds
double bounds[6];
this->GetBounds( bounds );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment