Description
This differential implements the function BKE_gpencil_stroke_perimeter_from_view and an operator (GPENCIL_OT_stroke_to_perimeter) that uses it.
The BKE function returns a bGPDstroke representing the points on the perimeter of the given stroke.
Demo
Here is an example of what the operator does:
This function does not handle clipping.
Issues
- The algorithm does not take the line_change stroke thickness adjustment in the layer settings into account.
- Running the operator on multiple strokes at once freezes blender.
- Code needs to be refactored to be rebased onto greasepencil-refactor
- F6 menu does not pop up
- Parent-relation transformations are not handled correctly
- End caps don't have the right thickness when manually scaled
- Inner miter on corners does not take the thickness of the previous and next points into account
Performance
These tests were done on a ThinkPad E580 running Ubuntu 18.04.3 LTS.
We can clearly see the O(n) runtime of the algorithm.

