Which creates a “surface” in the form of an extrusion of the curve along a vector.
However, unless the curve in question has no discontinuities, this will create a multi-face Brep (polysurface) or an Extrusion object. Shouldn’t this method be in the Brep and/or Extrusion classes as well? This is the only method I found to create an extrusion along a specific direction. What am I missing here? (probably something blindingly dumb…)
It depends on how you add the surface to the document and the setting of CreaseSplitting.
If CreaseSplitting=Yes, you can still add it as a single surface using the following:
Surface extruded = Surface.CreateExtrusion(curve, vec); // this is a single surface
Brep b = extruded.ToBrep();
doc.Objects.AddBrep(b); // this will split along creases and create a multi-facet brep
doc.Objects.AddBrep(b, null, null, false, false); // this will not split creases