I am trying to use the flexible extrude-geometry engine to soften the edges of extruded shapes. In this fiddle, the softening is parameterized with the variable "bevelFrac, with a valid range of 0 ~ 1. The bigger it is, the more dominant the beveling is.
Here’s my problem: When the bevels called for are above some limit (a messy function of the shape’s geometry), the vertices which are created for the bevel are too far indented from their origin edge, and they clip to the opposite side of the final 3d object, creating “Jedi Fighter Wings” artifacts on the object.
I understand that this is an artifact due to invalid inputs, but what I would dearly like is some sort of warning from the extrude-geometry creation engine that would tell me that this clipping has occurred, so I can programmatically shrink the bevel inputs to prevent the disturbing artifacts from occurring.
My question: How can I tell (programmatically) that this clipping is happening?
Exactly what I would like to do … trouble is that the limiting value is really complicated. I’ve tried, a couple days’ worth, and have found that the limit has to do with the minimum “radius” anywhere on the part. Note the quotes there … I am using a straight-line outline, so of course the actual radius at each corner is zero … but there is some complex formula involving sets of angles … I’m far, far from guessing just what it is …
For example, when the basic shape is a 20-edge circle, I can get a beautiful sphere with bevelFrac = 1.0
When the basic shape is a 20-point ellipse with aspect ratio 2:1, the bevelFrac needs to be reduced to avoid the Jedi Fighter Wings.
When one point is pulled out to be a sharp point, it needs to be reduced further.