I am getting this exception while running the Polygon2DUtils clipping algorithm. Can you please describe how and/or why this exception occurs? The documentation for this is not very helpful at all.
Nathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By degenerated line, I meant lines that have direction vectors with both components equal to 0. This could happen when iterating a polygon with mutiple vertices.
The best solution should be to filter your polygon in order to remove multiple vertices. If the problem persist, we can add a new test case with your problematic polygon.
Regards,
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By multiple vertices you mean vertices at the same exact point correct? I am 95% sure that is what you meant.
Another question that is related, I am creating a polygon based on Point2D points that have the same start and end node. Could this be source of the issue?
Nathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm little bit too late, but to answer your questions:
* yes, by multiple vertices I meant vertices at the same position
* the fact that polygons have same start and end point could be the problem. I took the convention to use polygons with n different vertices, the last one being different from the first one.
I will try to adapt the library to add more controls on inputs, and to make it more versatile.
regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting this exception while running the Polygon2DUtils clipping algorithm. Can you please describe how and/or why this exception occurs? The documentation for this is not very helpful at all.
Nathan
Hi,
By degenerated line, I meant lines that have direction vectors with both components equal to 0. This could happen when iterating a polygon with mutiple vertices.
The best solution should be to filter your polygon in order to remove multiple vertices. If the problem persist, we can add a new test case with your problematic polygon.
Regards,
David
David,
By multiple vertices you mean vertices at the same exact point correct? I am 95% sure that is what you meant.
Another question that is related, I am creating a polygon based on Point2D points that have the same start and end node. Could this be source of the issue?
Nathan
David,
Got it all worked out. Thank you for your help.
Nathan
Hi,
I'm little bit too late, but to answer your questions:
* yes, by multiple vertices I meant vertices at the same position
* the fact that polygons have same start and end point could be the problem. I took the convention to use polygons with n different vertices, the last one being different from the first one.
I will try to adapt the library to add more controls on inputs, and to make it more versatile.
regards