Menu

DegeneratedLine2DException

2011-08-01
2012-12-12
  • Nathan Gewecke

    Nathan Gewecke - 2011-08-01

    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

     
  • David

    David - 2011-08-01

    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

     
  • Nathan Gewecke

    Nathan Gewecke - 2011-08-09

    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

     
  • Nathan Gewecke

    Nathan Gewecke - 2011-08-10

    David,

    Got it all worked out.  Thank you for your help.

    Nathan

     
  • David

    David - 2011-08-11

    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

     

Log in to post a comment.