Skip to content

System.InvalidOperationException when calling SkeletonBuilder.Build method #6

@YITWEE

Description

@YITWEE

I'm using the StraightSkeletonNet library, and when I call the SkeletonBuilder.Build(List polygon, List<List> 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions