When using RhinoCreateSurfaceFromCorners in my C++ DLL I am getting inconsistent behavior. For one of my meshes, about 50% of the time it creates the correct surface and 50% of the time it creates a surface 2 of the corners switched. The surface is placed on top of a face in a mesh and colored to show the amount of its non-planarity. I am having issues with both the coloring and the surface creation. The coloring issues have been solved. But how to solve the surface corruption is unclear. Let me try to lay out the pieces of this puzzle.
Here is the mesh, with its 26 faces outlined in green:
Here is the mesh with one face selected:
As you can see the mesh is composed of 26 quad faces that are identical except for their rotation. They are very non-planar with a bend of over 90 degrees in 2 places.
Here is the mesh viewed with the 2 foci almost centered on each other:
Here are the 26 surfaces created by RhinoCreateSurfaceFromCorners in wireframe view:
It looks like the surface was placed correctly for the half closer to the bottom.
Here is the shaded view for this:
Here is the view slightly rotated showing no surface on the portion of the face extending from the center:
Here are the coordinates for the faces:
MeshPoints.txt (3.9 KB)
They are very regular with many of the values identical for this simple mesh.
Here is the .3dm file for the mesh with its faces and surfaces on layers:
RhinoCreateSurfaceFromCorners inconsistent.3dm (354.5 KB)
It is apparent the RhinoCreateSurfaceFromCorners function is not capable of handling this topology. Perhaps the mesh faces need to be fitted with 2 surfaces: One for the portion of the face from the center to the circular edge and one from the edge to the focus at the back. Or can the RhinoCreateSurfaceFromCorners function be modified to handle this?
Regards,
Terry.