The cylindricity plot displays deviations on a cylinder, usually a helix or circles on multiple height levels. The cylindricity plot shares its data structures with the axiality plot and the generatrix plot.
The points should use Helix
or Circle
as their segment type. Please note that the plot won’t display the points in case they are all located on the same height. If they are specified like this on purpose, use the circle plot instead.
The plot can display a height axis. The range of the axis is determined by multiplying the points height range with the actual geometries height. The other geometry parameters are currently unused.
var plot = new CylindricityPlot();
var segment = new Segment<CylinderPoint, CylinderGeometry>( "All", SegmentTypes.Helix );
plot.Segments.Add( segment )
var rand = new Random( DateTime.Now.Millisecond );
//The range of the displayed z-axis will be this height multiplied with the points height range.
plot.Actual.Height = 10;
for( var i = 0; i < count; i++ )
{
var angle = ( double ) i / count * 2.0 * spins * Math.PI;
var deviation = 0.1 * ( Math.Sin( angle ) + ( rand.NextDouble() - 0.5 ) * 0.2 );
var height = ( double ) i / count;
var point = new CylinderPoint( angle, height, deviation );
segment.Points.Add( point );
}
plot.Tolerance = new Tolerance( -0.1, 0.1 );
plot.DefaultErrorScaling = 100;