/// <summary> /// Create tables for line elements /// </summary> /// <param name="cn"></param> /// <param name="obj"></param> private void store(OleDbConnection cn, ItemList <LineElement> obj) { Dictionary <FrameSection, FrameSection> frameSectionCache = new Dictionary <FrameSection, FrameSection>(); foreach (LineElement i in obj) { if (i != null) { store(cn, i); LineProps props = i.Properties; if (props != null && props is StraightFrameProps) { FrameSection sec = ((StraightFrameProps)props).Section; if (!frameSectionCache.ContainsKey(sec)) { frameSectionCache.Add(sec, sec); } } } } foreach (FrameSection fs in frameSectionCache.Keys) { if (fs != null) { store(cn, fs); } } }
public void propFrameGetSectProps(FrameSection section) { string message = "VRE to SAPTranslator: propFrameGetSectProps(" + section.GetName() + ")"; sendString(message); section.SectProps = readPropFrameGetSectProps(); }
/// <summary> /// Sets the frame section properties 07 built up i. /// </summary> /// <param name="model">The model.</param> /// <param name="table">The table.</param> private static void setFRAME_SECTION_PROPERTIES_07_BUILT_UP_I(Model model, List <Dictionary <string, string> > table) { foreach (Dictionary <string, string> tableRow in table) { FrameSection frameSection = model.Components.FrameSections[tableRow["SectionName"]]; if (!(frameSection is CoverPlatedISection builtUpSection)) { continue; } switch (tableRow["ItemType"]) { case "I Section": builtUpSection.SectionName = tableRow["ISection"]; builtUpSection.SectionProperties.fyTopFlange = Adaptor.toDouble(tableRow["FyTF"]); builtUpSection.SectionProperties.fyWeb = Adaptor.toDouble(tableRow["FyW"]); builtUpSection.SectionProperties.fyBottomFlange = Adaptor.toDouble(tableRow["FyBF"]); break; case "Top Cover Plate": builtUpSection.MaterialNameTop = tableRow["Material"]; builtUpSection.SectionProperties.bcTop = Adaptor.toDouble(tableRow["Width"]); builtUpSection.SectionProperties.tcTop = Adaptor.toDouble(tableRow["Thick"]); break; case "Bottom Cover Plate": builtUpSection.MaterialNameBottom = tableRow["Material"]; builtUpSection.SectionProperties.bcBottom = Adaptor.toDouble(tableRow["Width"]); builtUpSection.SectionProperties.tcBottom = Adaptor.toDouble(tableRow["Thick"]); break; } } }
private void store(OleDbConnection cn, LineElement obj) { Joint i = obj.I; Joint j = obj.J; string sql = "INSERT INTO [Connectivity - Frame] (Frame, JointI, JointJ, IsCurved, Length, CentroidX, CentroidY, CentroidZ) " + "VALUES (" + obj.Id + ", " + i.Id + ", " + j.Id + ",\"No\", " + obj.Length + ", " + (i.X + j.X) / 2.0F + ", " + (i.Y + j.Y) / 2.0F + ", " + (i.Z + j.Z) / 2.0F + ");"; new OleDbCommand(sql, cn).ExecuteNonQuery(); LineProps props = obj.Properties; List <Section> exported = new List <Section>(); if (props is StraightFrameProps) { FrameSection sec = ((StraightFrameProps)props).Section; sql = "INSERT INTO [Frame Section Assignments] (Frame, SectionType, AutoSelect, AnalSect, DesignSect, MatProp) " + "VALUES (" + obj.Id + ", \"" + secShape(sec.Shape) + "\", \"N.A.\", \"" + sec.Name + "\", \"" + sec.Name + "\", \"Default\");"; new OleDbCommand(sql, cn).ExecuteNonQuery(); store(cn, sec.ConcreteProperties, sec, exported); } AssignedLoads loads = obj.Loads; if (loads != null) { store(cn, obj.Id, loads); } }
public void addFrameSectionToXMLList(FrameSection frameSection) { FrameSectionForXML newElement = new FrameSectionForXML(frameSection.GetName(), frameSection.GetMaterialName(), (int)frameSection.GetFrameSectionType(), frameSection.GetDimensions()); elementsListsForXML.frameSectionForXMLList.Add(newElement); saveToXML(); }
// TABLE: "FRAME SECTION PROPERTIES 11 - STEEL JOIST DATA" // SectionName=JST1 SpanLength=2.438 TLCap=8.02 LLDeflCap=8.02 I33=8.2E-06 /// <summary> /// Sets the frame section properties 11 steel joist data. /// </summary> /// <param name="model">The model.</param> /// <param name="table">The table.</param> /// <exception cref="NotImplementedException"></exception> private static void setFRAME_SECTION_PROPERTIES_11_STEEL_JOIST_DATA(Model model, List <Dictionary <string, string> > table) { foreach (Dictionary <string, string> tableRow in table) { FrameSection frameSection = model.Components.FrameSections[tableRow["SectionName"]]; throw new NotImplementedException(); } }
// TABLE: "SECTION DESIGNER PROPERTIES 30 - FIBER GENERAL" // SectionName=FSEC11 NumFibersD2=3 NumFibersD3=3 CoordSys=Cartesian GridAngle=0 LumpRebar=No FiberPMM=No FiberMC=No /// <summary> /// Sets the section designer properties 30 fiber general. /// </summary> /// <param name="model">The model.</param> /// <param name="table">The table.</param> /// <exception cref="NotImplementedException"></exception> private static void setSECTION_DESIGNER_PROPERTIES_30_FIBER_GENERAL(Model model, List <Dictionary <string, string> > table) { foreach (Dictionary <string, string> tableRow in table) { FrameSection frameSection = model.Components.FrameSections[tableRow["SectionName"]]; throw new NotImplementedException(); } }
/// <summary> /// Sets the current frame section being used /// </summary> public void SetCurrentFrameSection(string name) { FrameSection fs = findFrameSection(name); if (fs != null) { currentFrameSection = fs; } }
private void store(OleDbConnection cn, ConcreteBeamSectionProps obj, FrameSection section) { string mat = MaterialManager.Instance.DefaultSteel.Name; string sec = section.Name; string sql = "INSERT INTO [Frame Section Properties 03 - Concrete Beam] (SectionName, RebarMatL, RebarMatC, TopCover, BotCover, TopLeftArea, TopRghtArea, BotLeftArea, BotRghtArea) " + "VALUES (\"" + sec + "\", \"" + mat + "\", \"" + mat + "\", " + obj.ConcreteCoverTop + ", " + obj.ConcreteCoverBottom + ", " + obj.RoTopLeft + ", " + obj.RoTopRight + ", " + obj.RoBottomLeft + ", " + obj.RoBottomRight + ");"; new OleDbCommand(sql, cn).ExecuteNonQuery(); }
private void store(OleDbConnection cn, FrameSection obj) { ConcreteSectionProps cprops = obj.ConcreteProperties; string concC = (cprops != null && cprops is ConcreteColumnSectionProps) ? "Yes" : "No"; string concB = (cprops != null && cprops is ConcreteBeamSectionProps) ? "Yes" : "No"; string sql = "INSERT INTO [Frame Section Properties 01 - General] " + "(SectionName, Material, Shape, t3, t2, tf, tw, t2b, tfb, Area, TorsConst, I33, I22, AS2, AS3, S33, S22, Z33, Z22, R33, R22, ConcCol, ConcBeam, Color, TotalWt, TotalMass, FromFile, AMod, A2Mod, A3Mod, JMod, I2Mod, I3Mod, MMod, WMod) " + "VALUES (\"" + obj.Name + "\", \"" + obj.Material.Name + "\", \"" + secShape(obj.Shape) + "\", " + obj.T3 + ", " + obj.T2 + ", " + obj.Tf + ", " + obj.Tw + ", " + obj.T2b + ", " + obj.Tfb + ", " + obj.Area + ", " + obj.TorsConst + ", " + obj.I33 + ", " + obj.I22 + ", " + obj.As2 + ", " + obj.As3 + ", " + obj.S33 + ", " + obj.S22 + ", " + obj.Z33 + ", " + obj.Z22 + ", " + obj.R33 + ", " + obj.R22 + ", \"" + concC + "\", \"" + concB + "\", \"Yellow\", 0, 0, \"No\", 1, 1, 1, 1, 1, 1, 1, 1);"; new OleDbCommand(sql, cn).ExecuteNonQuery(); }
// TABLE: "FRAME SECTION PROPERTIES 10 - STEEL JOIST GENERAL" // SectionName=JST1 JoistType=Standard Depth=0.254 UnitWt=0.0725692114770882 AnalysisI33=1.2E-05 // SectionName=JST2 JoistType=Envelope Depth=0.254 UnitWt=0.0725692114770882 AnalysisI33=1.2E-05 MomCap=19.4 ShearCap=8.8 MinSpan=2.438 MaxSpan=4.876 /// <summary> /// Sets the frame section properties 10 steel joist general. /// </summary> /// <param name="model">The model.</param> /// <param name="table">The table.</param> /// <exception cref="NotImplementedException"></exception> private static void setFRAME_SECTION_PROPERTIES_10_STEEL_JOIST_GENERAL(Model model, List <Dictionary <string, string> > table) { List <CoverPlatedISection> sections = getSectionsByType <CoverPlatedISection>(model.Components.FrameSections); foreach (CoverPlatedISection frameSection in sections) { } foreach (Dictionary <string, string> tableRow in table) { FrameSection frameSection = model.Components.FrameSections[tableRow["SectionName"]]; throw new NotImplementedException(); } }
private void startButton5_Click(object sender, EventArgs e) { currentSection = null; if (oneSection) { DialogResult = DialogResult.Cancel; } else { wizardControl.SelectTab(0); DialogResult = DialogResult.None; } }
/// <summary> /// Create a new pipe-type framesection and then add it to frameSections list /// </summary> public int addPipeFrameSection(string name, string buildingMaterialName, float outsideDiameter, float wallThickness) { FrameSection newFrameSection = new FrameSection(name, buildingMaterialName, FrameSectionType.Pipe); newFrameSection.SetPipeDimensions(outsideDiameter, wallThickness); string sapTranslatorCommand = "VRE to SAPTranslator: propFrameSetPipe(" + name + ", " + buildingMaterialName + ", " + outsideDiameter + ", " + wallThickness + ")"; // arguments: (name, matProp, t3, tw, [color], [notes], [guid]) sapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand); return(addFrameSection(newFrameSection)); }
private void store(OleDbConnection cn, ConcreteSectionProps obj, FrameSection section, List <Section> exported) { if (obj != null && !exported.Contains(section)) { if (obj is ConcreteBeamSectionProps) { store(cn, (ConcreteBeamSectionProps)obj, section); } else if (obj is ConcreteColumnSectionProps) { store(cn, (ConcreteColumnSectionProps)obj, section); } exported.Add(section); } }
/// <summary> /// Create a new iframe-type framesection and then add it to frameSections list /// </summary> public int addIFrameSection(string name, string buildingMaterialName, float outsideHeight, float topFlangeWidth, float topFlangeThickness, float webThickness, float bottomFlangeWidth, float bottomFlangeThickness) { FrameSection newFrameSection = new FrameSection(name, buildingMaterialName, FrameSectionType.I); newFrameSection.SetIDimensions(outsideHeight, topFlangeWidth, topFlangeThickness, webThickness, bottomFlangeWidth, bottomFlangeThickness); string sapTranslatorCommand = "VRE to SAPTranslator: propFrameSetISection(" + name + ", " + buildingMaterialName + ", " + outsideHeight + ", " + topFlangeWidth + ", " + topFlangeThickness + ", " + webThickness + ", " + bottomFlangeWidth + ", " + bottomFlangeThickness + ")"; // arguments: (name, matProp, t3, t2, tf, tw, t2b, tfb, [color], [notes], [guid]) sapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand); return(addFrameSection(newFrameSection)); }
/// <summary> /// Create a new tube-type framesection and then add it to frameSections list /// </summary> public int addTubeFrameSection(string name, string buildingMaterialName, float outsideDepth, float outsideWidth, float flangeThickness, float webThickness) { FrameSection newFrameSection = new FrameSection(name, buildingMaterialName, FrameSectionType.Tube); newFrameSection.SetTubeDimensions(outsideDepth, outsideWidth, flangeThickness, webThickness); Debug.Log("created tube"); string sapTranslatorCommand = "VRE to SAPTranslator: propFrameSetTube(" + name + ", " + buildingMaterialName + ", " + outsideDepth + ", " + outsideWidth + ", " + flangeThickness + ", " + webThickness + ")"; // arguments: (name, matProp, t3, t2, tf, tw, [color], [notes], [guid]) sapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand); return(addFrameSection(newFrameSection)); }
private void sectionsTreeView_AfterSelect(object sender, TreeViewEventArgs e) { if ((currentSection = sectionsTreeView.SelectedNode.Tag as FrameSection) == null) { editButton.Enabled = false; deleteButton.Enabled = false; propertiesButton.Enabled = false; } else { editButton.Enabled = true; deleteButton.Enabled = true; propertiesButton.Enabled = true; } addButton.Enabled = true; }
/// <summary> /// finds a frame section given its name and returns the section /// </summary> public FrameSection findFrameSection(string name) { FrameSection output = null; if (frameSections.Count > 0) { foreach (FrameSection fs in frameSections) { if (fs.GetName().Equals(name)) { output = fs; break; } } } return(output); }
/// <summary> /// Deletes a frame section /// </summary> public void deleteFrameSection(string name) { FrameSection targetFrameSection = findFrameSection(name); if (targetFrameSection != null) { frameSections.Remove(targetFrameSection); myXmlController.GetComponent <xmlController>().deleteFrameSectionFromXMLList(name); string sapTranslatorCommand = "VRE to SAPTranslator: propFrameDelete(" + targetFrameSection.GetName() + ")"; // arguments: (name) sapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand); } if (frameSections.Count == 0) { //int success = addFrameSection(defaultFrameSection); } }
/// <summary> /// Add a new FrameSection to the list of FrameSections /// Also tells SAP Translator to set the FrameSection's "SectProps" property (currently commented-out) /// </summary> public int addFrameSection(FrameSection frameSection) { if (findFrameSection(frameSection.GetName()) == null) { frameSections.Add(frameSection); if (frameSections.Count == 1) { SetCurrentFrameSection(frameSection.GetName()); } //sapTranslatorIpcHandler.propFrameGetSectProps(frameSection); myXmlController.GetComponent <xmlController>().addFrameSectionToXMLList(frameSection); return(1); } else { return(0); } }
public SectionsGUI(FrameSection section) { oneSection = (section != null); InitializeComponent(); steelSections = new Dictionary <string, FrameSection>(); concreteSections = new Dictionary <string, FrameSection>(); allSections = new Dictionary <string, FrameSection>(); concreteSectionProps = new List <ConcreteSectionProps>(); shapeNames = new Dictionary <string, string>(); shapeNames.Add("R", Culture.Get("RectangularSection")); shapeNames.Add("RN", Culture.Get("CircleSection")); // shapeNames.Add("2L", Culture.Get("DoubleAngle")); shapeNames.Add("C", Culture.Get("Channel")); shapeNames.Add("I", Culture.Get("I_WideFlange")); shapeNames.Add("B", Culture.Get("Box_Tube")); shapeNames.Add("P", Culture.Get("Pipe")); shapeNames.Add("L", Culture.Get("Angle")); shapeNames.Add("T", Culture.Get("Tee")); shapeNames.Add("G", Culture.Get("General")); model = Canguro.Model.Model.Instance; coverTopLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; coverBottomLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; roTopLeftLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; roTopRightLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; roBottomLeftLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; roBottomRightLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; sqCoverLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; sqReinforcementsLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; areaLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.Area) + ")"; JLabel.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.AreaInertia) + ")"; sa33Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.Area) + ")"; sa22Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.Area) + ")"; i33Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.AreaInertia) + ")"; i22Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.AreaInertia) + ")"; s33Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.ShearModulus) + ")"; s22Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.ShearModulus) + ")"; z33Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.ShearModulus) + ")"; z22Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.ShearModulus) + ")"; r33Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; r22Label.Text += " (" + model.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance) + ")"; }
/// <summary> /// Main constructor for defining a frame object /// Takes in the frames endpoints, the correct frame prefab for the section, the frame section, and the frames name /// </summary> public Frame(Vector3 start, Vector3 end, GameObject framePrefab, FrameSection section, string frameName) { sectionPropertyName = section.GetName(); frameObject = MonoBehaviour.Instantiate(framePrefab); trans = frameObject.transform; frameTrans = trans.Find("frame"); releaseStartTrans = trans.Find("startRelease"); releaseEndTrans = trans.Find("endRelease"); startPos = start; endPos = end; release = new FrameRelease(); setRelease(); frameObject.GetComponent <FrameBehavior>().setMyFrame(this); frameHighlighter = frameObject.GetComponent <highlighter>(); // scale the frame depending on the section type if (section.type == FrameSectionType.I) { frame_iBeamController controller = frameObject.GetComponent <frame_iBeamController>(); float[] arr = section.GetDimensions(); controller.SetDimensions(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]); } else if (section.type == FrameSectionType.Pipe) { frame_PipeController controller = frameObject.GetComponent <frame_PipeController>(); float[] arr = section.GetDimensions(); controller.SetDimensions(arr[0], arr[1]); } else if (section.type == FrameSectionType.Tube) { frame_TubeController controller = frameObject.GetComponent <frame_TubeController>(); float[] arr = section.GetDimensions(); controller.SetDimensions(arr[0], arr[1], arr[2], arr[3]); } else { Debug.LogError("Invalid frame section type passed to createFrame in Frame Class"); } setName(frameName); }
/// <summary> /// Sets the frame section properties 03 concrete beam. /// </summary> /// <param name="model">The model.</param> /// <param name="table">The table.</param> private static void setFRAME_SECTION_PROPERTIES_03_CONCRETE_BEAM(Model model, List <Dictionary <string, string> > table) { foreach (Dictionary <string, string> tableRow in table) { FrameSection frameSection = model.Components.FrameSections[tableRow["SectionName"]]; if (!(frameSection is IBeamRebar concreteSection)) { continue; } concreteSection.BeamRebar.Detailing.MaterialNameLongitudinal = tableRow["RebarMatL"]; concreteSection.BeamRebar.Detailing.CoverTop = Adaptor.toDouble(tableRow["TopCover"]); concreteSection.BeamRebar.Detailing.CoverBottom = Adaptor.toDouble(tableRow["BotCover"]); concreteSection.BeamRebar.Detailing.TopLeftArea = Adaptor.toDouble(tableRow["TopLeftArea"]); concreteSection.BeamRebar.Detailing.TopRightArea = Adaptor.toDouble(tableRow["TopRghtArea"]); concreteSection.BeamRebar.Detailing.BottomLeftArea = Adaptor.toDouble(tableRow["BotLeftArea"]); concreteSection.BeamRebar.Detailing.BottomRightArea = Adaptor.toDouble(tableRow["BotRghtArea"]); } }
/// <summary> /// Sets the frame section properties 02 concrete column. /// </summary> /// <param name="model">The model.</param> /// <param name="table">The table.</param> private static void setFRAME_SECTION_PROPERTIES_02_CONCRETE_COLUMN(Model model, List <Dictionary <string, string> > table) { foreach (Dictionary <string, string> tableRow in table) { FrameSection frameSection = model.Components.FrameSections[tableRow["SectionName"]]; if (!(frameSection is IColumnRebar concreteSection)) { continue; } concreteSection.ColumnRebar.Detailing.RebarConfiguration = Enums.EnumLibrary.ConvertStringToEnumByDescription <eRebarConfiguration>(tableRow["ReinfConfig"]); concreteSection.ColumnRebar.Detailing.MaterialNameLongitudinal = tableRow["RebarMatL"]; if (tableRow.ContainsKey("NumBarsCirc")) { concreteSection.ColumnRebar.Detailing.NumberOfCircularBars = Adaptor.toInteger(tableRow["NumBarsCirc"]); } if (tableRow.ContainsKey("NumBars2Dir")) { concreteSection.ColumnRebar.Detailing.NumberOfRectangularBars2Axis = Adaptor.toInteger(tableRow["NumBars2Dir"]); concreteSection.ColumnRebar.Detailing.NumberOfRectangularBars2Axis = Adaptor.toInteger(tableRow["NumBars3Dir"]); } concreteSection.ColumnRebar.Detailing.RebarSize = tableRow["BarSizeL"]; concreteSection.ColumnRebar.Detailing.ConfinementType = Enums.EnumLibrary.ConvertStringToEnumByDescription <eConfinementType>(tableRow["LatReinf"]); concreteSection.ColumnRebar.Detailing.MaterialNameConfinement = tableRow["RebarMatC"]; if (tableRow.ContainsKey("SpacingC")) { concreteSection.ColumnRebar.Detailing.TieSpacingLongitudinal = Adaptor.toDouble(tableRow["SpacingC"]); } if (tableRow.ContainsKey("NumCBars2")) { concreteSection.ColumnRebar.Detailing.NumberOfConfinementBars2Axis = Adaptor.toInteger(tableRow["NumCBars2"]); concreteSection.ColumnRebar.Detailing.NumberOfConfinementBars3Axis = Adaptor.toInteger(tableRow["NumCBars3"]); } concreteSection.ColumnRebar.Detailing.TieSize = tableRow["BarSizeC"]; concreteSection.ColumnRebar.Detailing.Cover = Adaptor.toDouble(tableRow["Cover"]); concreteSection.ColumnRebar.Detailing.ToBeDesigned = (tableRow["ReinfType"] == "Check"); } }
private void UpdatePage1() { if (sectionsTreeView.TopNode != Canguro.Model.Model.Instance.Sections.Tree) { sectionsTreeView.Nodes.Clear(); sectionsTreeView.Nodes.Add(Canguro.Model.Model.Instance.Sections.Tree); } sectionsTreeView.ExpandAll(); currentSection = (sectionsTreeView.SelectedNode != null) ? (FrameSection)sectionsTreeView.SelectedNode.Tag : null; if (currentSection != null) { editButton.Enabled = true; deleteButton.Enabled = true; propertiesButton.Enabled = true; } else { editButton.Enabled = false; deleteButton.Enabled = false; propertiesButton.Enabled = false; } addButton.Enabled = true; sectionsTreeView.Update(); }
private void store(OleDbConnection cn, ConcreteColumnSectionProps obj, FrameSection section) { string mat = MaterialManager.Instance.DefaultSteel.Name; string sql, bars3, bars2, barsCirc; if (section is Rectangular) { bars2 = obj.NumberOfBars2Dir.ToString(); bars3 = obj.NumberOfBars3Dir.ToString(); barsCirc = "0"; } else // Circular { bars2 = "0"; bars3 = "0"; barsCirc = obj.NumberOfBars.ToString(); } string barsize = obj.BarSize.ToString(); sql = "INSERT INTO [Frame Section Properties 02 - Concrete Column] (SectionName, RebarMatL, RebarMatC, ReinfConfig, LatReinf, Cover, NumBars3Dir, NumBars2Dir, NumBarsCirc, BarSize, SpacingC, NumCBars2, NumCBars3, ReinfType) " + "VALUES (\"" + section + "\", \"" + mat + "\", \"" + mat + "\", \"" + obj.RConfiguration + "\", \"" + obj.LateralR + "\", " + obj.CoverToRebarCenter + ", " + bars3 + ", " + bars2 + ", " + barsCirc + ", \"" + barsize + "\", " + obj.SpacingC + ", " + bars2 + ", " + bars3 + ", \"Design\");"; new OleDbCommand(sql, cn).ExecuteNonQuery(); }
/// <summary> /// Modifies the design section for all specified frame objects that have a frame design procedure. /// </summary> /// <param name="frame">An existing frame object.</param> /// <param name="section">An existing frame section property to be used as the design section for the specified frame objects.</param> public override void AddDesignSection(Frame frame, FrameSection section) { }
public static string fromNullableFrameSection(Model model, FrameSection value) { return((value == null) ? PROGRAM_DETERMINED : value.Name); }
public void UpdateModel() { ResetModel(); // Dimensions float wi = mParent.SectionProperties.InnerWidth; float hi = mParent.SectionProperties.InnerHeight; float tw = mParent.SectionProperties.OuterWallThickness; float tf = mParent.SectionProperties.FoundationThickness; float ts = mParent.SectionProperties.SlabThickness; int iw = mParent.SectionProperties.InnerWalls; float twi = mParent.SectionProperties.InnerWallThickness; bool gusset = mParent.SectionProperties.HasSlabGussets; float gw = mParent.SectionProperties.SlabGussetWidth; float gh = mParent.SectionProperties.SlabGussetHeight; float wo = mParent.SectionProperties.OuterWidth - tw; float ho = hi + tf / 2 + ts / 2; // Concrete material Material mat = AddMaterial("Concrete", 3000000, 0.2, 25); // Sections FrameSection outerWallSection = AddFrameSection("Outer Wall", mat, 1.0 * tw, 1.0 * tw * tw * tw / 12.0); FrameSection innerWallSection = AddFrameSection("Inner Wall", mat, 1.0 * twi, 1.0 * twi * twi * twi / 12.0); FrameSection slabSection = AddFrameSection("Slab", mat, 1.0 * ts, 1.0 * ts * ts * ts / 12.0); FrameSection foundationSection = AddFrameSection("Foundation", mat, 1.0 * tf, 1.0 * tf * tf * tf / 12.0); // Build model Node n1; Node n2; Frame f; double dx; // Foundation slab n1 = AddNode(-wo / 2, 0); n2 = AddNode(-wo / 2 + tw / 2, 0); Node lowerLeft = n1; f = AddFrame(foundationSection, n1, n2); dx = -wo / 2 + tw / 2 + wi; for (int i = 0; i < iw + 1; i++) { n1 = n2; n2 = AddNode(dx, 0); f = AddFrame(foundationSection, n1, n2); if (i < iw) { n1 = n2; n2 = AddNode(dx + twi / 2, 0); f = AddFrame(foundationSection, n1, n2); n1 = n2; n2 = AddNode(dx + twi, 0); f = AddFrame(foundationSection, n1, n2); } dx += wi + twi; } n1 = n2; n2 = AddNode(wo / 2, 0); f = AddFrame(foundationSection, n1, n2); Node lowerRight = n2; // Create a mid point (for support) if it does not exist if (Nodes.Count % 2 == 0) { DivideFrame(Frames[(Frames.Count - 1) / 2], 2); } SortNodes(); Node lowerMid = Nodes[(Nodes.Count - 1) / 2]; // Top slab n1 = AddNode(-wo / 2, ho); n2 = AddNode(-wo / 2 + tw / 2, ho); f = AddFrame(slabSection, n1, n2); dx = -wo / 2 + tw / 2 + wi; for (int i = 0; i < iw + 1; i++) { n1 = n2; n2 = AddNode(dx, ho); f = AddFrame(slabSection, n1, n2); if (i < iw) { n1 = n2; n2 = AddNode(dx + twi / 2, ho); f = AddFrame(slabSection, n1, n2); n1 = n2; n2 = AddNode(dx + twi, ho); f = AddFrame(slabSection, n1, n2); } dx += wi + twi; } n1 = n2; n2 = AddNode(wo / 2, ho); f = AddFrame(slabSection, n1, n2); Node rackingPoint = n2; // Left wall n1 = AddNode(-wo / 2, 0); n2 = AddNode(-wo / 2, tf / 2); f = AddFrame(outerWallSection, n1, n2); n1 = n2; n2 = AddNode(-wo / 2, tf / 2 + hi); f = AddFrame(outerWallSection, n1, n2); n1 = n2; n2 = AddNode(-wo / 2, ho); f = AddFrame(outerWallSection, n1, n2); // Right wall n1 = AddNode(wo / 2, 0); n2 = AddNode(wo / 2, tf / 2); f = AddFrame(outerWallSection, n1, n2); n1 = n2; n2 = AddNode(wo / 2, tf / 2 + hi); f = AddFrame(outerWallSection, n1, n2); n1 = n2; n2 = AddNode(wo / 2, ho); f = AddFrame(outerWallSection, n1, n2); // Inner walls dx = -wo / 2 + tw / 2 + wi + twi / 2; for (int i = 0; i < iw; i++) { n1 = AddNode(dx, 0); n2 = AddNode(dx, tf / 2); f = AddFrame(innerWallSection, n1, n2); n1 = n2; n2 = AddNode(dx, tf / 2 + hi); f = AddFrame(innerWallSection, n1, n2); n1 = n2; n2 = AddNode(dx, ho); f = AddFrame(innerWallSection, n1, n2); dx += wi + twi; } // Divide frames DivideFrames(0.5); // Springs double springSize = 0.1; Dictionary <Node, double> slabNodeDict = new Dictionary <Node, double>(); foreach (Frame frame in Frames.FindAll((e) => e.Section == foundationSection)) { double springCoefficient = frame.Length / 2.0 * mParent.SoilParameters.BeddingCoefficient; if (slabNodeDict.ContainsKey(frame.NodeI)) { slabNodeDict[frame.NodeI] += springCoefficient; } else { slabNodeDict.Add(frame.NodeI, springCoefficient); } if (slabNodeDict.ContainsKey(frame.NodeJ)) { slabNodeDict[frame.NodeJ] += springCoefficient; } else { slabNodeDict.Add(frame.NodeJ, springCoefficient); } } foreach (KeyValuePair <Node, double> pair in slabNodeDict) { double springCoefficient = pair.Value; Node upperNode = pair.Key; Node lowerNode = AddNode(upperNode.X, upperNode.Z - springSize); lowerNode.Restraints = DOF.Fixed; AddSpring(springCoefficient, springCoefficient, 0, lowerNode, upperNode); } // Clean up close nodes MergeNodes(0.01); // Sort according to coordinates SortNodes(); SortFrames(); SortSprings(); // Analysis cases AnalysisCase deadLoad = AddAnalysisCase("Self Weight"); AnalysisCase fillLoad = AddAnalysisCase("Earth Fill"); AnalysisCase pressureLoad = AddAnalysisCase("Soil Pressure"); AnalysisCase surchargeLoad = AddAnalysisCase("Surcharge"); AnalysisCase racking1 = AddAnalysisCase("Racking (+)"); AnalysisCase racking2 = AddAnalysisCase("Racking (-)"); // Loads // Self weight foreach (Frame frame in Frames) { AddFrameSelfWeight(deadLoad, frame); } // Fill load foreach (Frame frame in Frames.FindAll((e) => e.Section == slabSection)) { AddFrameUniformLoad(fillLoad, frame, 0, -mParent.SoilParameters.FillLoad); } // Soil pressure foreach (Frame frame in Frames.FindAll((e) => e.Section == outerWallSection)) { double zi = frame.NodeI.Z; double zj = frame.NodeJ.Z; double pmin = mParent.SoilParameters.SoilPressureTop; double pmax = mParent.SoilParameters.SoilPressureBottom; double pi = (ho - zi) / ho * (pmax - pmin) + pmin; double pj = (ho - zj) / ho * (pmax - pmin) + pmin; if (frame.NodeI.X < 0) { AddFrameTrapezoidalLoad(pressureLoad, frame, pi, 0, pj, 0); } else { AddFrameTrapezoidalLoad(pressureLoad, frame, -pi, 0, -pj, 0); } } // Surcharge foreach (Frame frame in Frames.FindAll((e) => e.Section == outerWallSection)) { if (frame.NodeI.X < 0) { AddFrameUniformLoad(surchargeLoad, frame, mParent.SoilParameters.SurchargeLoad, 0); } else { AddFrameUniformLoad(surchargeLoad, frame, -mParent.SoilParameters.SurchargeLoad, 0); } } // Solve racking // Temporary supports lowerLeft.Restraints = DOF.Pinned; lowerRight.Restraints = DOF.Pinned; // Solve under unit load AddNodePointLoad(racking1, rackingPoint, 1, 0, 0); BuildStiffnessMatrix(); Run(racking1); // Calculate actual load to create racking deformation double deformationForUnitLoad = racking1.NodeDeformations[rackingPoint.Index].UX; double rackingPointLoad = mParent.SoilParameters.FreeFieldDeformation / deformationForUnitLoad; rackingPoint.Loads.Clear(); AddNodePointLoad(racking1, rackingPoint, rackingPointLoad, 0, 0); AddNodePointLoad(racking2, rackingPoint, -rackingPointLoad, 0, 0); // Run racking Run(racking1); Run(racking2); // Remove temporary supports lowerLeft.Restraints = DOF.Free; lowerRight.Restraints = DOF.Free; // Solve service loads BuildStiffnessMatrix(); Run(deadLoad); Run(fillLoad); Run(pressureLoad); Run(surchargeLoad); // Combinations // Service Combination service = AddLinearCombination("Service"); service.SetCoefficient(1, deadLoad); service.SetCoefficient(1, fillLoad); service.SetCoefficient(1, pressureLoad); service.SetCoefficient(1, surchargeLoad); service.Update(); // Factored 1 Combination factored1 = AddLinearCombination("Factored 1"); factored1.SetCoefficient(1.3, deadLoad); factored1.SetCoefficient(1.3, fillLoad); factored1.SetCoefficient(1.3, pressureLoad); factored1.SetCoefficient(1.3, surchargeLoad); factored1.Update(); // Factored 2 Combination factored2 = AddLinearCombination("Factored 2"); factored2.SetCoefficient(1.3, deadLoad); factored2.SetCoefficient(1.3, fillLoad); factored2.SetCoefficient(0.65, pressureLoad); factored2.SetCoefficient(0.65, surchargeLoad); factored2.Update(); // Racking Combination racking = AddEnvelopeCombination("Racking"); racking.SetCoefficient(1, racking1); racking.SetCoefficient(1, racking2); racking.Update(); // Seismic Combination seismic = AddLinearCombination("Seismic"); seismic.SetCoefficient(1, deadLoad); seismic.SetCoefficient(1, fillLoad); seismic.SetCoefficient(1, pressureLoad); seismic.SetCoefficient(1, racking); seismic.Update(); // Envelope Combination envelope = AddEnvelopeCombination("Envelope"); envelope.SetCoefficient(1, service); envelope.SetCoefficient(1, factored1); envelope.SetCoefficient(1, factored2); envelope.SetCoefficient(1, seismic); envelope.Update(); }
/// <summary> /// Modifies the design section for all specified frame objects that have a frame design procedure. /// </summary> /// <param name="frame">An existing frame object.</param> /// <param name="section">An existing frame section property to be used as the design section for the specified frame objects.</param> public override void AddDesignSection(Frame frame, FrameSection section) { addDesignSection(_designer.DesignConcrete, frame, section); }