Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created June 4, 2020 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/f6ca28cc50f877d3c9c0798e7d38e5c3 to your computer and use it in GitHub Desktop.
Save chuongmep/f6ca28cc50f877d3c9c0798e7d38e5c3 to your computer and use it in GitHub Desktop.
public static List<Autodesk.DesignScript.Geometry.Surface> GetTop(Autodesk.DesignScript.Geometry.Geometry geometry)
{
List<Autodesk.DesignScript.Geometry.Surface> TopSurface = new List<Autodesk.DesignScript.Geometry.Surface>();
Autodesk.DesignScript.Geometry.Geometry[] geometries = geometry.Explode();
foreach (Autodesk.DesignScript.Geometry.Surface g in geometries)
{
double d = g.NormalAtParameter(0.5, 0.5).Z;
if (d>0.1)
{
TopSurface.Add(g);
}
}
return TopSurface;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment