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

Do not drwa anything if angular sector is wider than one lap

Change-Id: I371e29f6e90b9d35c3310b5862e563e9ff492ecf
parent 71aece59
......@@ -36,7 +36,7 @@ polaxes.SetBounds( cylinder.GetOutput().GetBounds() )
polaxes.SetPole( pole )
polaxes.SetAutoScaleRadius( 0 )
polaxes.SetMaximumRadius( 4.5 )
polaxes.SetMinimumAngle( 280. )
polaxes.SetMinimumAngle( -180. )
polaxes.SetMaximumAngle( 270. )
polaxes.SetNumberOfRadialAxes( 10 )
polaxes.SetNumberOfPolarAxisTicks( 9 )
......
......@@ -456,14 +456,25 @@ void vtkPolarAxesActor::BuildAxes( vtkViewport *viewport )
return;
}
if ( this->MinimumAngle > this->MaximumAngle )
if ( this->MaximumAngle < this->MinimumAngle )
{
// Incorrect angle input
vtkWarningMacro( << "Cannot draw radial axes: "
<< " minimum angle = "
<< this->MinimumAngle
<< " maximum angle = "
<< this->MaximumAngle );
<< " > maximum angle = "
<< this->MaximumAngle
<< ".");
return;
}
if ( this->MaximumAngle - this->MinimumAngle > 360. )
{
// Incorrect angle input
vtkWarningMacro( << "Cannot draw radial axes: "
<< " angular sector = "
<< this->MaximumAngle - this->MinimumAngle
<< " > 360 deg." );
return;
}
......
......@@ -101,13 +101,13 @@ public:
// Description:
// Set/Get the minimum radius of the polar coordinates (in degrees).
// Default: 0.
vtkSetClampMacro( MinimumAngle, double, 0., 360. );
vtkSetClampMacro( MinimumAngle, double, -360., 360. );
vtkGetMacro( MinimumAngle, double );
// Description:
// Set/Get the maximum radius of the polar coordinates (in degrees).
// Default: VTK_DEFAULT_MAXIMUM_POLAR_ANGLE
vtkSetClampMacro( MaximumAngle, double, 0., 360. );
vtkSetClampMacro( MaximumAngle, double, -360., 360. );
vtkGetMacro( MaximumAngle, double );
// Description:
......
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