In RhinoCommon, in the Surface class, we have:

Rhino.Geometry.Surface.CreateExtrusion(curve, vec)

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…)


(Menno Deij - van Rijswijk) #2

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



Hi Menno,

My point was simply that this method should also be included in the Brep and Extrusion classes for clarity and convenience.

Cheers, --Mitch