Created
June 4, 2020 16:58
-
-
Save chuongmep/f6ca28cc50f877d3c9c0798e7d38e5c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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