Exemplo n.º 1
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static bool NormalAwayFromSpace(this BHE.BuildingElement buildingElement, List <BHE.BuildingElement> elementsAsSpace)
        {
            BHG.Polyline bound = new BHG.Polyline()
            {
                ControlPoints = buildingElement.PanelCurve.IControlPoints()
            };

            return(NormalAwayFromSpace(bound, elementsAsSpace));
        }
Exemplo n.º 2
0
        public static BHG.Polyline FloorGeometry(this List <BHE.BuildingElement> space)
        {
            BHE.BuildingElement floor = null;

            foreach (BHE.BuildingElement be in space)
            {
                double tilt = Tilt(be);
                if (tilt == 0 || tilt == 180)
                {
                    if (floor == null)
                    {
                        floor = be;
                    }
                    else
                    {
                        //Multiple elements could be a floor - assign the one with the lowest Z
                        if (floor.MinimumLevel() > be.MinimumLevel())
                        {
                            floor = be;
                        }
                    }
                }
            }

            if (floor == null)
            {
                return(null);
            }

            BHG.Polyline floorGeometry = floor.PanelCurve as BHG.Polyline;

            if (floorGeometry.ControlPoints.Count < 3)
            {
                return(null);
            }

            return(floorGeometry);
        }