public TableCell502_3_1() { Section = new RecSection(); Span = new Length(); WoodType = WoodType.Douglas_fir_larch; WoodGrade = WoodGrade.SS; DeadLoadPsF = 10; }
/// <summary> /// /// </summary> /// <param name="span">Allowable Span</param> /// <param name="section">Joist Section</param> /// <param name="NuHeaders">number of Headers</param> /// <param name="NuJackStuds">JackStuds Required to support Header</param> /// <param name="buildingWidth">Width in Feet</param> /// <param name="groundSnowLoad">Load in PSF units</param> /// <param name="storiesAbove">no of stories above the header</param> /// <param name="floorBearing">True for ClearSpan</param> public TableCell502_5(Length span, RecSection section, int NuHeaders, int NuJackStuds, Length buildingWidth, double groundSnowLoad, int storiesAbove, bool floorBearing) { Span = span; Section = section; NoOfHeaders = NuHeaders; NoOfJackStuds = NuJackStuds; BuildingWidth = buildingWidth; GroundSnowLoad = groundSnowLoad; StoriesAbove = storiesAbove; FloorBearingClearSpan = floorBearing; }
private void SetJoists() { RecSection section = IfJoist.Setup.Get <RecSection>("RecSection"); WoodType WT = IfJoist.Setup.Get <WoodType>("WoodType"); WoodGrade WG = IfJoist.Setup.Get <WoodGrade>("WoodGrade"); foreach (var reg in FloorPolygon.Regions) { double span = reg.IfDimension.XDim.Inches; var Cells = JoistTable.Cells.Where(e => e.WoodGrade == WG && e.WoodType == WT && e.SpanToInch >= span && e.DeadLoadPsF == 10 && e.Section == section) .OrderBy(e => e.SpanToInch).ToList(); double S = Cells[0].Spacing; var spaces = Split.Equal(reg.IfDimension.YDim - section.Width, S); for (int i = 0; i < spaces.Count; i++) { //var spacingVec = new Vector3D(spaces[i], spaces[i], spaces[i]); var DircVec = new IfLocation( FloorPolygon.IfFloor.ShortDirection.Y * spaces[i], FloorPolygon.IfFloor.ShortDirection.X * spaces[i], FloorPolygon.IfFloor.ShortDirection.Z * spaces[i] ); var ifJoist = new IfJoist(FloorPolygon.IfFloor) { IfModel = FloorPolygon.IfFloor.IfModel, IfFloor = FloorPolygon.IfFloor, IfLocation = DircVec, IfDimension = new IfDimension( section.Width.Inches, section.Depth.Inches, reg.IfDimension.XDim.Inches), IfMaterial = IfMaterial.Setup.Get <IfMaterial>("Joist") }; ifJoist.New(); ifJoist.IfMaterial.AttatchTo(ifJoist); //add to studs elments Joists.Add(ifJoist); // } } }
public TableCell502_5() { BuildingWidth = new Length(); Span = new Length(); Section = new RecSection(); }
public override object Create(object parent, object configContext, System.Xml.XmlNode section) { IRecSection model = null; if (section != null) { model = new RecSection(); XmlNode node = null; #region bookindex if (GetSingleNodeValue(section, "/RecSection/book/index/male", out node)) { model.BookIndex.MaleHotRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"hot\"]", "value").ToInt(); model.BookIndex.MaleNewRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"new\"]", "value").ToInt(); model.BookIndex.MaleEditorRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"editor\"]", "value").ToInt(); model.BookIndex.MaleSaleRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"sale\"]", "value").ToInt(); model.BookIndex.MaleTopAd = GetSingleNodeAttributeValue(node, "ad/item[@key=\"top\"]", "value").ToInt(); model.BookIndex.MaleMiddleAd = GetSingleNodeAttributeValue(node, "ad/item[@key=\"middle\"]", "value").ToInt(); } if (GetSingleNodeValue(section, "/RecSection/book/index/female", out node)) { model.BookIndex.FemaleHotRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"hot\"]", "value").ToInt(); model.BookIndex.FemaleNewRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"new\"]", "value").ToInt(); model.BookIndex.FemaleEditorRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"editor\"]", "value").ToInt(); model.BookIndex.FemaleSaleRec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"sale\"]", "value").ToInt(); model.BookIndex.FemaleTopAd = GetSingleNodeAttributeValue(node, "ad/item[@key=\"top\"]", "value").ToInt(); model.BookIndex.FemaleMiddleAd = GetSingleNodeAttributeValue(node, "ad/item[@key=\"middle\"]", "value").ToInt(); } model.BookIndex.ListenRec = GetSingleNodeAttributeValue(section, "/RecSection/book/index/rec[@type=\"listen\"]/item[@key=\"rec\"]", "value").ToInt(); #endregion bookindex #region bookdetail if (GetSingleNodeValue(section, "/RecSection/book/detail/rec", out node)) { model.BookDetail.GuessRec = GetSingleNodeAttributeValue(node, "item[@key=\"guess\"]", "value").ToInt(); } #endregion bookdetail #region bookchapterlist if (GetSingleNodeValue(section, "/RecSection/book/chapterlist/rec", out node)) { model.BookChapterList.GuessRec = GetSingleNodeAttributeValue(node, "item[@key=\"guess\"]", "value").ToInt(); } #endregion bookchapterlist #region bookchapterdetail if (GetSingleNodeValue(section, "/RecSection/book/chapter", out node)) { model.BookChapterDetail.Rec = GetSingleNodeAttributeValue(node, "rec/item[@key=\"rec\"]", "value").ToInt(); model.BookChapterDetail.Ad = GetSingleNodeAttributeValue(node, "ad/item[@key=\"ad\"]", "value").ToInt(); } #endregion bookchapterdetail #region limitfree if (GetSingleNodeValue(section, "/RecSection/book/limitfree/male/rec", out node)) { model.LimitFree.MaleIndexRec = GetSingleNodeAttributeValue(node, "item[@key=\"index\"]", "value").ToInt(); model.LimitFree.MaleNewRec = GetSingleNodeAttributeValue(node, "item[@key=\"new\"]", "value").ToInt(); model.LimitFree.MaleHotRec = GetSingleNodeAttributeValue(node, "item[@key=\"hot\"]", "value").ToInt(); } if (GetSingleNodeValue(section, "/RecSection/book/limitfree/female/rec", out node)) { model.LimitFree.FemaleIndexRec = GetSingleNodeAttributeValue(node, "item[@key=\"index\"]", "value").ToInt(); model.LimitFree.FemaleNewRec = GetSingleNodeAttributeValue(node, "item[@key=\"new\"]", "value").ToInt(); model.LimitFree.FemaleHotRec = GetSingleNodeAttributeValue(node, "item[@key=\"hot\"]", "value").ToInt(); } #endregion limitfree #region rank if (GetSingleNodeValue(section, "/RecSection/book/rank/rec", out node)) { model.Rank.MaleRec = GetSingleNodeAttributeValue(node, "item[@key=\"male\"]", "value").ToInt(); model.Rank.FemaleRec = GetSingleNodeAttributeValue(node, "item[@key=\"female\"]", "value").ToInt(); } #endregion rank #region cartoonindex if (GetSingleNodeValue(section, "/RecSection/cartoon/index/rec", out node)) { model.CartoonIndex.FavRec = GetSingleNodeAttributeValue(node, "item[@key=\"fav\"]", "value").ToInt(); model.CartoonIndex.PopRec = GetSingleNodeAttributeValue(node, "item[@key=\"pop\"]", "value").ToInt(); model.CartoonIndex.ThreeDRec = GetSingleNodeAttributeValue(node, "item[@key=\"three\"]", "value").ToInt(); } if (GetSingleNodeValue(section, "/RecSection/cartoon/index/ad", out node)) { model.CartoonIndex.TopAd = GetSingleNodeAttributeValue(node, "item[@key=\"top\"]", "value").ToInt(); model.CartoonIndex.MiddleAd = GetSingleNodeAttributeValue(node, "item[@key=\"middle\"]", "value").ToInt(); } #endregion cartoonindex #region cartoondetail if (GetSingleNodeValue(section, "/RecSection/cartoon/detail/rec", out node)) { model.CartoonDetail.GuessRec = GetSingleNodeAttributeValue(node, "item[@key=\"guess\"]", "value").ToInt(); } #endregion cartoondetail #region cartoonchapterlist if (GetSingleNodeValue(section, "/RecSection/cartoon/chapterlist/rec", out node)) { model.CartoonChapterList.GuessRec = GetSingleNodeAttributeValue(node, "item[@key=\"guess\"]", "value").ToInt(); } #endregion cartoonchapterlist } return(model); }
public static Table Load(string filePath) { //get the static filePath var table = new Table(); string[] file = File.ReadAllLines(filePath).Where(e => e != ",,,,,,,,").ToArray(); string[] Keys = file[0].Split(new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries); string[][] cells = new string[file.Length - 1][]; for (int i = 0; i < cells.Length; i++) { cells[i] = file[i + 1].Split(new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries); } for (int i = 0; i < cells.Length; i++) { for (int j = 3; j < 7; j++) { Double space = Double.Parse(cells[i][0]); RecSection section = new RecSection(int.Parse(Keys[j].Split('*')[0]), int.Parse(Keys[j].Split('*')[1])); Length L = Length.FromFeetAndInches(int.Parse(cells[i][j].Split('-')[0]), int.Parse(cells[i][j].Split('-')[1])); //Domain.Ifc.IfDimension Dim = new Domain.Ifc.IfDimension(int.Parse(Keys[j].Split('*')[0]), // int.Parse(Keys[j].Split('*')[1]), // int.Parse(cells[i][j].Split('-')[0]) * 12 + int.Parse(cells[i][j].Split('-')[1])); WoodType WT = WoodType.Douglas_fir_larch; WoodGrade WG = new WoodGrade(); int DLPsf = int.Parse(cells[i][7]); switch (cells[i][1]) { case "Douglas fir-larch": WT = WoodType.Douglas_fir_larch; break; case "Hem-fir": WT = WoodType.Hem_fir; break; case "Southern pine": WT = WoodType.Southern_pine; break; case "Spruce-pine-fir": WT = WoodType.Spruce_pine_fir; break; default: break; } switch (cells[i][2]) { case "SS": WG = WoodGrade.SS; break; case "#1": WG = WoodGrade._1; break; case "#2": WG = WoodGrade._2; break; case "#3": WG = WoodGrade._3; break; default: break; } table.Cells.Add(new TableCell() { Spacing = space, Section = section, Span = L, WoodType = WT, WoodGrade = WG, DeadLoadPsF = DLPsf }); } } return(table); }