public static TBD.BuildingElementType ToTASBuildingElementType(this BHE.Panel element, List <List <BHE.Panel> > spaces = null) { TBD.BuildingElementType tbdType = TBD.BuildingElementType.NULLELEMENT; if (element == null) { return(tbdType); } if (spaces == null) { spaces = new List <List <BHE.Panel> >(); } int adjacentSpaces = element.AdjacentSpaces(spaces).Count; if (adjacentSpaces == 0) { tbdType = TBD.BuildingElementType.SHADEELEMENT; } else { tbdType = TBD.BuildingElementType.NULLELEMENT; } return(tbdType); }