csharp-libs icon indicating copy to clipboard operation
csharp-libs copied to clipboard

System.InvalidOperationException when calling SkeletonBuilder.Build method

Open YITWEE opened this issue 2 years ago • 1 comments

I'm using the StraightSkeletonNet library, and when I call the SkeletonBuilder.Build(List<Vector2d> polygon, List<List<Vector2d>> holes) method, I get a System.InvalidOperationException.

image

Here's the code I'm using as input:

var polygon = new List<Vector2d>()
{
    new Vector2d(45940, 50540),
    new Vector2d(0, 50540),
    new Vector2d(0, 0),
    new Vector2d(45940, 0)
};

var holes = new List<List<Vector2d>>()
{
    new List<Vector2d>()
    {
        new Vector2d(11900, 12670),
        new Vector2d(11900, 37220),
        new Vector2d(33520, 37220),
        new Vector2d(33520, 12670)
    }
};

var result = SkeletonBuilder.Build(polygon, holes);

What could be causing this exception? Are there any solutions or suggestions that could help me resolve this problem?

Thank you!

YITWEE avatar Mar 09 '23 08:03 YITWEE

Hi!

Hard to say what is the reason: I haven't worked on the project for years.

reinterpretcat avatar Mar 10 '23 10:03 reinterpretcat