public static ParameterSet ParameterSet(this Setting setting, shade shade) { ParameterSet parameterSet = Core.Tas.Create.ParameterSet(setting, shade, typeof(Panel), typeof(shade)); parameterSet.Add("IsUsed", shade.isUsed == 1); return(parameterSet); }
public static shade ToT3D_Shade(this Panel panel, Building building) { if (panel == null) { return(null); } uint colour; if (!Core.Query.TryGetValue(panel, "Colour", out colour)) { colour = Core.Convert.ToUint(System.Drawing.Color.Black); } double width = double.NaN; double height = double.NaN; double level = double.NaN; PlanarBoundary3D planarBoundary3D = panel.PlanarBoundary3D; if (planarBoundary3D != null) { if (!Core.Query.TryGetValue(panel, "Width", out width)) { return(null); } if (!Core.Query.TryGetValue(panel, "Height", out height)) { return(null); } if (!Core.Query.TryGetValue(panel, "Level", out level)) { return(null); } } else { width = planarBoundary3D.Width(); height = planarBoundary3D.Height(); level = Analytical.Query.MinElevation(panel); } shade result = building.AddShade(panel.Name, Query.OpeningType(panel), colour, height, width, level); return(result); }
select(shade, color);
public static Building ToT3D(this RelationCluster relationCluster, Building building) { if (building == null || relationCluster == null) { return(null); } Dictionary <Guid, Aperture> dictionary_Apertures = new Dictionary <Guid, Aperture>(); List <Panel> panels = relationCluster.GetObjects <Panel>(); if (panels != null) { foreach (Panel panel in panels) { if (panel == null) { continue; } List <Aperture> apertures_Panel = panel.Apertures; if (apertures_Panel != null) { foreach (Aperture aperture in apertures_Panel) { dictionary_Apertures[aperture.Guid] = aperture; } } if (panel.PanelType == PanelType.Shade) { shade shade = panel.ToT3D_Shade(building); } else { Element element = panel.ToT3D(building); } } } List <Aperture> apertures = relationCluster.GetObjects <Aperture>(); if (apertures != null) { foreach (Aperture aperture in apertures) { if (aperture == null) { continue; } dictionary_Apertures[aperture.Guid] = aperture; } } foreach (Aperture aperture in dictionary_Apertures.Values) { window widnow = aperture.ToT3D(building); } return(building); }