RC: Problem with extrusion (Possibly bug)

Hi guys,

I have noticed different behavior of extrusion when using Surface.CreateExtrusion and Extrusion.Create in RhinoCommon.

Based on the same polycurve Surface.CreateExtrusion gives only one surface as result while Extrusion.Create gives polysurface.

After closing both of them I got 2 solids and checked IsPointInside property. Centroid of the curve is used as a check point.
Surface.CreateExtrusion(single surface approach) gives wrong result but Extrusion.Create(polysurface) is ok.

As an input curve I used simple closed polyline curve with COG outside the curve. See enclosed.
Amy idea why it is happening?

P.S. This has been checked in R5 but same behaviour is in R6 Wip.


CurveExtrude.3dm (20.5 KB)

Hi Dimitry,

Surface.CreateExtrusion creates a surface by extruding a curve along a vector. In your case, the surface will be kinked. Thus, when added to Rhino, the surface will be split at kinks and become a polysurface.

Extrusion.Create creates a light-weight extrusion object from a curve and some other information. An extrusion object can take on a Brep form using Extrusion.ToBrep(). Because of the kinks on the source curve. I’m sure getting the Brep form will return a polysurface

Does this help?

Hi Dale,

I was trying to highlight that if you use Surface.CreateExtrusion and afterwards cap it for solid (without adding it to Rhino) - > method IsPointInside doesn’t work correctly.
For me it is clear that I need to use light extrusion as you described.