Exemplo n.º 1
0
        public static Output <List <ICurve>, List <ICurve>, List <ICurve> > ExplodeToParts(this IEnvironmentObject environmentObject, double distanceTolerance = BH.oM.Geometry.Tolerance.Distance, double angleTolerance = BH.oM.Geometry.Tolerance.Angle, double numericTolerance = BH.oM.Geometry.Tolerance.Distance)
        {
            Output <List <ICurve>, List <ICurve>, List <ICurve> > finalParts = new Output <List <ICurve>, List <ICurve>, List <ICurve> >()
            {
                Item1 = new List <ICurve>(),
                Item2 = new List <ICurve>(),
                Item3 = new List <ICurve>(),
            };

            if (environmentObject == null)
            {
                return(finalParts);
            }

            finalParts.Item1.Add(environmentObject.Bottom(distanceTolerance, angleTolerance, numericTolerance));
            finalParts.Item2.AddRange(environmentObject.Sides(distanceTolerance, angleTolerance, numericTolerance));
            finalParts.Item3.Add(environmentObject.Top(distanceTolerance, angleTolerance, numericTolerance));
            return(finalParts);
        }