The twist is a known problem, brought about by needing to decide on a rotation (around the axis perpendicular to the plane of the polygon) for every point, and getting it wrong. Unfortunately, I don't know of an easy way to fix it such that it works in all (or most) cases.

But it is interesting that the axis matters, and that could lead me to a fix. The following (for example) is an equivalent construction, but doesn't have the twist problem:

The twist is a known problem, brought about by needing to decide on a rotation (around the axis perpendicular to the plane of the polygon) for every point, and getting it wrong. Unfortunately, I don't know of an easy way to fix it such that it works in all (or most) cases.

But it is interesting that the axis matters, and that could lead me to a fix. The following (for example) is an equivalent construction, but doesn't have the twist problem:

My guess is that it's related to something like trying to calculate an angle of something that has no height.