Making our own surface, but result is an invalid surface?

Hi,
We have been doing some work with a RhinoCommon plugin to try and make this shape with a single Nurbs surface.

And as far as I can tell we are making it correctly…
But when it is added into Rhino it is reporting as an Invalid polysurface, and we are not sure why.
We are a little unclear about if we have the Knots in the V direction correct.
Or if it is something to do with the fact we have 2 location (2,0,z) and (-2,0,z) where there are a number of points on top of each other.

barset.3dm (24.4 KB)

Any guidance here would be greatly appreciated.

Please change the category to “Developer” as you are working with a RhinoCommon plug-in, not the open-source 3dm reading/writing library openNURBS.

Secondly, it would be nice if you could share some code. Also, before adding any geometry you can do the following:

GeometryBase geo; // any geometry, including Surface, NurbsSurface, etc.
String error;
if (!geo.IsValidWithLog(out error))
    RhinoApp.WriteLine("Surface invalid because: {0}", error);
else
    doc.Add(geo);

ProngBar.zip (6.7 KB)

Hi,
So here is a simplified version of our plugin that is making this geometry.
So the IsValidWithLog is actually returning true (Valid)
But the geometry in Rhino is showing as invalid.

Gordon,

Here is the error repported by openNURBS:

ON_Brep.m_T[7].m_type = ON_BrepTrim::seam but m_iso is not N/E/W/S_iso.

Does this help?