Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some polygon calculations are incorrect, THX #14

Open
malegend opened this issue May 24, 2024 · 0 comments
Open

Some polygon calculations are incorrect, THX #14

malegend opened this issue May 24, 2024 · 0 comments

Comments

@malegend
Copy link

malegend commented May 24, 2024

Hi! Some polygon calculations are incorrect,here's an example:

var p1 = Polygon.New(new List<Region>(){
    new() {

        Points = new List<Point>(){
            new (590.2275M, 388.9665M),
            new (588.9713M, 357.5612M),
            new (580.9713M, 157.5612M),
            new (579.6613M, 124.8115M),
            new (546.9327M, 123.0519M),
            new (453.9327M, 118.0519M),
            new (450.0673M, 189.9481M),
            new (510.3387M, 193.1885M),
            new (515.7725M, 329.0335M),
            new (291.9352M, 368.6799M),
            new (90.71116M, 205.0679M),
            new (65.42641M, 197.0921M),
            new (33.66756M, 222.1702M),
            new (45.28884M, 260.9321M),
            new (259.2888M, 434.9321M),
            new (272.0648M, 445.3201M),
            new (288.2787M, 442.4482M),
            new (559.2787M, 394.4482M)
        }
    }
}, false);
var p2 = Polygon.New(new List<Region>(){
    new() {
        Points = new List<Point>(){
            new (65.4264M, 197.0921M),
            new (70.5736M, 268.9079M),
            new (656.5736M, 226.9079M),
            new (651.4264M, 155.0921M)
        }
    }
}, false);

var unified = SegmentSelector.Union(p1, p2);

temp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant