First of all, I'm very inexperienced in all the math logic being performed in the Triangle package. Our application uses the Triangle.NET package, and I've been tasked to investigate an error in the logic. It is not common for our application to fail as it has been running for years with different datasets being provided and calculated without problems.
We have pinpointed the problem occurring in the RightOfHyperbola function in the SweepLine class.
The fronttri.Apex() call returns a null value and the subsequent if-condition throws a null reference error on the rightvertex.
The orient: 1 seems to select the null value in the vertices collection.
Here is the object contents in question where the problem occurs.

The code obviously didn't expect it to return null. Should the code handle null values more gracefully, or is there a problem upstream where a null value in the vertices is incorrect (or should the orient setting never refer to a null value in the vertices). I lack the knowledge to say something meaningful here.
First of all, I'm very inexperienced in all the math logic being performed in the Triangle package. Our application uses the Triangle.NET package, and I've been tasked to investigate an error in the logic. It is not common for our application to fail as it has been running for years with different datasets being provided and calculated without problems.
We have pinpointed the problem occurring in the RightOfHyperbola function in the SweepLine class.
The
fronttri.Apex()call returns a null value and the subsequent if-condition throws a null reference error on therightvertex.The
orient: 1seems to select the null value in the vertices collection.Here is the object contents in question where the problem occurs.

The code obviously didn't expect it to return null. Should the code handle null values more gracefully, or is there a problem upstream where a null value in the vertices is incorrect (or should the orient setting never refer to a null value in the vertices). I lack the knowledge to say something meaningful here.