Catmull–Clark issue with plane corners

I implemented catmul clark based on this Wikipedia article. And it seems to work fine for meshes where the edge point count is equal to the face point count, but not for planes where the corners have 2 edge points and 1 face point.

The article states the following for this formula

$$\frac{F + 2R + (n-3)P}{n}$$

(Note that from the perspective of a vertex P, the number of edges neighboring P is also the number of adjacent faces, hence n)

And that seems to be true for cube-like shapes, but not for planes. Does this implementation not work for planes, or am I doing something wrong?

• 2 edge points? I can see how this would happen in code, but anyplace you end up with 2 points on top of each other the curves will have the "expected" behavior that occurs when you have to coincident points. Jun 1 '21 at 10:54

For vertices $$V_{i}$$ on the boundary of an mesh you have to use the following rules:
$$V_i = \frac{V_{i-1} + 6 V_{i} + V_{i+1}}{8},$$ where $$V_{i-1}$$ and $$V_{i+1}$$ are previous and next vertex on the boundary with respect to $$V_i$$. In your case it would be:
$$P = \frac{e_2 + 6 P + e_1}{8}.$$ New positions on edges of the boundary are inserted as the midpoint between two subsequent vertices. This will nicely smooth the boundaries of the mesh and the generated boundary curve will reproduce a uniform cubic B-spline curve in the limit.