remove_kickbacks

Removes any kickbacks from a geometry.

A kickback is defined to be four consecutive points (A, B, C, D) such that:

For each such kickback, the points B and C will be replaced by a new vertex midway between them.

Parameter 1 - any geometry.

Parameter 2 (Optional) - the maximum value for the sine of the angles in the kickback. If omitted, this defaults to the sine of 1 degree.

Parameter 3 (Optional) - the maximum width of the kickback.

Returns: the resulting geometry with kickbacks removed.

Note: This function does not fully support 3D geometries. Any 3D geometries will be projected down to 2 dimensions.