Updates for blender-mat-addon
Simple Degenerated Slab Detection
Assume a medial slab:
Case 1
In this case, the main geometric feature is that the length of edges are much smaller than the radius of spheres at it ends. If only 1 edge meets this condition, the slab will degenerate into a cone. If more than 1 edge meets the condition, the slab will degenerate into a single sphere.
To detect this case, we can simply use the ratio between the radius to filter this situation:
here, the threshold
Case 2
This case is designed for a medial sphere is inside the cone formed by other two spheres. As the figure shows, the space can be divided two parts by the conical surface. If the third sphere falls in the inside region, then the slab should degenerated into a cone.
Detection
Assume
It's intuitive that if
First, compute
To compute
Then, we can compute the real interpolation parameter
Finally, the distance from
To be mentioned,