I am trying to extract faces of an extrusion; however, couldn’t find any solution by myself. Is there any way to get them or should I use sth different than Extrusion?
// TODO: Assign selection filters for lot
// ---
Rhino.Input.Custom.GetObject lotReference = new Rhino.Input.Custom.GetObject();
lotReference.SetCommandPrompt ("Select a closed planar curve");
lotReference.GeometryFilter = Rhino.DocObjects.ObjectType.Curve;
lotReference.GeometryAttributeFilter = GeometryAttributeFilter.ClosedCurve;
lotReference.GroupSelect = true;
lotReference.GetMultiple (1, 0);
// TODO: Create masses
// ---
// Creating Empty List of extruded masses
Rhino.Collections.RhinoList<Extrusion> listOfMasses = new Rhino.Collections.RhinoList<Extrusion> ();
// Creating masses and adding them to list
for (int i = 0; i < lotReference.ObjectCount; i++) {
double BuildingHeight = randomNumber.Next (BuildingHeightMin, BuildingHeightMax);
Rhino.Geometry.Extrusion Mass = Rhino.Geometry.Extrusion.Create (lotReference.Object (i).Curve (), BuildingHeight, true);
//doc.Objects.AddExtrusion (Mass);
listOfMasses.Add (Mass);
}