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

What's wrong with this input(square with inner square hole)? #6

Open
GoogleCodeExporter opened this issue May 3, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Square input poly with an interior square hole seems to be failing

input poly 1 
-1423 479
-1423 419
-1363 419
-1363 479

input poly 2 - marked as hole
-1403, 459
-1383, 459
-1383, 439
-1403, 439

Thanks

Original issue reported on code.google.com by [email protected] on 10 May 2013 at 5:36

@GoogleCodeExporter
Copy link
Author

Hi,
I cannot reproduce the problem, what methods did you use?

Original comment by [email protected] on 11 May 2013 at 11:47

@GoogleCodeExporter
Copy link
Author

Sorry. I used

TPPLPartition partition;
partition.ConvexPartition_HM( &inputPolys, &convexPolys );

Original comment by [email protected] on 13 May 2013 at 1:26

@GoogleCodeExporter
Copy link
Author

Hm, that works for me. Here's a test code that I used:

    TPPLPartition pp;
    list<TPPLPoly> input;
    list<TPPLPoly> output;

    TPPLPoly p;
    p.Init(4);

    p[0].x = -1423; p[0].y = 479;
    p[1].x = -1423; p[1].y = 419;
    p[2].x = -1363; p[2].y = 419;
    p[3].x = -1363; p[3].y = 479;
    p.SetHole(false);
    input.push_back(p);

    p[0].x = -1403; p[0].y = 459;
    p[1].x = -1383; p[1].y = 459;
    p[2].x = -1383; p[2].y = 439;
    p[3].x = -1403; p[3].y = 439;
    p.SetHole(true);
    input.push_back(p);

    pp.ConvexPartition_HM(&input, &output);


Did you use the most recent version of the library? Did you make any changes to 
it? Or use different vertex ordering in your code?

Original comment by [email protected] on 13 May 2013 at 9:41

Attachments:

@aaronfranke
Copy link
Contributor

Here is a test case text file (with 1500 added to the X values so that everything is positive): issue-6.txt

Here is the output when running this: issue-6.zip

Specifically, ConvexPartition_HM results in this, which looks fine to me:

conv_hm

I can't reproduce this bug, so it should probably be closed.

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

No branches or pull requests

2 participants