DesignEngrLab / MIConvexHull

A .Net fast convex hull library for 2, 3, and higher dimensions.
http://designengrlab.github.io/MIConvexHull/
MIT License
338 stars 60 forks source link

Non exception API #25

Closed sqeezy closed 5 years ago

sqeezy commented 5 years ago

To test the API of this lib, I created input data that was not sufficent for creating an actual convex hull. This resulted in an exception. In my opinion a result object that can be in a faulted state is far more usefull when using a library like this one.

E.g.:

public enum ConvexHullCreationResultType
{
    Success,
    NotEnoughVerticiesForDimension,
}
public class ConvexHullCreationResult
{
    //this could be null
    public ConvexHull<TVertex, TFace> Result { get; }

    public ConvexHullCreationResultType Outcome { get; }
}

Would you be interested in adding an API like that? I'd like to use this library and would rather help designing and implementing such an API, than using a wrapper.

VijayaMalla commented 5 years ago

I think this would help.

sqeezy commented 5 years ago

I think this would help.

Are you implying me implenting it would help, or this additional API would?