Hello everyone! Can one create a custom sort for curves?
Example code:
x.Sort(new CustomCompare());
///
class CustomCompare : IComparer
{
public int CompareRegionRelashionship(Curve x, Curve y)
{
if ( x.GetLength() > y.GetLength())
{
return 1;
}
else if (x.GetLength()<y.GetLength()) // If x is inside y
{
return -1;
}
else
{
return 0;
}
}
}
Error (CS0535): ‘Script_Instance.CustomCompare’ does not implement interface member ‘System.Collections.Generic.IComparer<Rhino.Geometry.Curve>.Compare(Rhino.Geometry.Curve, Rhino.Geometry.Curve)’
2 posts - 2 participants