Skip to content

Improve path envelope edge case handling.

Gavin Whelan requested to merge gavwhela/extensions:improve_path_envelope into master

This fixes a couple of edge cases for path envelope.

The "The points for the selected envelope must not all be in a line." abort is to handle the case where all the selected points fall in a line like:

*.......*.......*.......*

In which case we can't unambiguously map a point in the original bounding box onto that line.

There is also additional logic in transform_point, firstly to handle a collinear case, which occurs when 3 of the points are in a line:

*...*...*
 \     /
  \   /
   \ /
    *

And another which handles the cases of intersecting edges causing one line to become a point, such as the center point here:

*    *
|\  /|
| \/ |
| /\ |
|/  \|
*    *

The intersecting lines issues seems like it would be unlikely to occur due to numeric precision, but I thought it was worth handling.

Merge request reports