void setProperties(ETABSProperty2D property2D, string matProp, double thickeness, string name) { property2D.name = name; property2D.thickness = thickeness; property2D.material = MaterialToSpeckle(matProp); return; }
object Property2DToNative(ETABSProperty2D property2D) { if (property2D.type2D == ETABSPropertyType2D.Wall) { WallPropertyToNative(property2D); } else { FloorPropertyToNative(property2D); } return(property2D.name); }
public ETABSProperty2D WallPropertyToSpeckle(string property) { eWallPropType wallPropType = eWallPropType.Specified; eShellType shellType = eShellType.Layered; string matProp = ""; double thickness = 0; int color = 0; string notes = ""; string GUID = ""; var specklePropery2DWall = new ETABSProperty2D(); specklePropery2DWall.type = Structural.PropertyType2D.Shell; Model.PropArea.GetWall(property, ref wallPropType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref GUID); var speckleShellType = ConvertShellType(shellType); specklePropery2DWall.shellType = speckleShellType; setProperties(specklePropery2DWall, matProp, thickness, property); specklePropery2DWall.type2D = Structural.ETABS.Analysis.ETABSPropertyType2D.Wall; specklePropery2DWall.applicationId = GUID; return(specklePropery2DWall); }
public void SetDeck(ETABSProperty2D deck) { var deckType = eDeckType.Filled; switch (deck.deckType) { case Structural.ETABS.Analysis.DeckType.Filled: deckType = eDeckType.Filled; break; case Structural.ETABS.Analysis.DeckType.Unfilled: deckType = eDeckType.Unfilled; break; case Structural.ETABS.Analysis.DeckType.SolidSlab: deckType = eDeckType.SolidSlab; break; } var shell = shellType(deck); Model.PropArea.SetDeck(deck.name, deckType, shell, deck.material.name, deck.thickness); }
public eShellType shellType(ETABSProperty2D property) { var shellType = eShellType.Layered; switch (property.shellType) { case Structural.ETABS.Analysis.ShellType.ShellThin: shellType = eShellType.ShellThin; break; case Structural.ETABS.Analysis.ShellType.Layered: shellType = eShellType.Layered; break; case Structural.ETABS.Analysis.ShellType.ShellThick: shellType = eShellType.ShellThick; break; case Structural.ETABS.Analysis.ShellType.Membrane: shellType = eShellType.Membrane; break; } return(shellType); }
public object WallPropertyToNative(ETABSProperty2D Wall) { return(Wall.name); }
public ETABSProperty2D FloorPropertyToSpeckle(string property) { eDeckType deckType = eDeckType.Filled; eSlabType slabType = eSlabType.Drop; eShellType shellType = eShellType.Layered; string matProp = ""; double thickness = 0; int color = 0; string notes = ""; string GUID = ""; int d = Model.PropArea.GetDeck(property, ref deckType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref GUID); if (d == 0) { var speckleProperties2D = new ETABSProperty2D(); double slabDepth = 0; double shearStudDia = 0; double shearStudFu = 0; double shearStudHt = 0; double ribDepth = 0; double ribWidthTop = 0; double ribWidthBot = 0; double ribSpacing = 0; double shearThickness = 0; double unitWeight = 0; var speckleShellType = ConvertShellType(shellType); if (deckType == eDeckType.Filled) { var speckleProperty2D = new ETABSProperty2D.DeckFilled(); Model.PropArea.GetDeckFilled(property, ref slabDepth, ref ribDepth, ref ribWidthTop, ref ribWidthBot, ref ribSpacing, ref shearThickness, ref unitWeight, ref shearStudDia, ref shearStudHt, ref shearStudFu); speckleProperty2D.SlabDepth = slabDepth; speckleProperty2D.ShearStudDia = shearStudDia; speckleProperty2D.ShearStudFu = shearStudFu; speckleProperty2D.RibDepth = ribDepth; speckleProperty2D.RibWidthTop = ribWidthTop; speckleProperty2D.RibWidthBot = ribWidthBot; speckleProperty2D.RibSpacing = ribSpacing; speckleProperty2D.ShearThickness = shearThickness; speckleProperty2D.UnitWeight = unitWeight; speckleProperty2D.ShearStudHt = shearStudHt; speckleProperty2D.deckType = Structural.ETABS.Analysis.DeckType.Filled; setProperties(speckleProperty2D, matProp, thickness, property); speckleProperty2D.type2D = Structural.ETABS.Analysis.ETABSPropertyType2D.Deck; speckleProperty2D.shellType = speckleShellType; speckleProperty2D.applicationId = GUID; return(speckleProperty2D); } else if (deckType == eDeckType.Unfilled) { var speckleProperty2D = new ETABSProperty2D.DeckUnFilled(); Model.PropArea.GetDeckUnfilled(property, ref ribDepth, ref ribWidthTop, ref ribWidthBot, ref ribSpacing, ref shearThickness, ref unitWeight); speckleProperty2D.RibDepth = ribDepth; speckleProperty2D.RibWidthTop = ribWidthTop; speckleProperty2D.RibWidthBot = ribWidthBot; speckleProperty2D.RibSpacing = ribSpacing; speckleProperty2D.ShearThickness = shearThickness; speckleProperty2D.UnitWeight = unitWeight; speckleProperty2D.deckType = Structural.ETABS.Analysis.DeckType.Filled; setProperties(speckleProperty2D, matProp, thickness, property); speckleProperty2D.type2D = Structural.ETABS.Analysis.ETABSPropertyType2D.Deck; speckleProperty2D.shellType = speckleShellType; speckleProperty2D.applicationId = GUID; return(speckleProperty2D); } else if (deckType == eDeckType.SolidSlab) { var speckleProperty2D = new ETABSProperty2D.DeckSlab(); Model.PropArea.GetDeckSolidSlab(property, ref slabDepth, ref shearStudDia, ref shearStudDia, ref shearStudFu); speckleProperty2D.SlabDepth = slabDepth; speckleProperty2D.ShearStudDia = shearStudDia; speckleProperty2D.ShearStudFu = shearStudFu; speckleProperty2D.ShearStudHt = shearStudHt; speckleProperty2D.deckType = Structural.ETABS.Analysis.DeckType.SolidSlab; setProperties(speckleProperty2D, matProp, thickness, property); speckleProperty2D.type2D = Structural.ETABS.Analysis.ETABSPropertyType2D.Deck; speckleProperty2D.shellType = speckleShellType; speckleProperty2D.applicationId = GUID; return(speckleProperty2D); } } int s = Model.PropArea.GetSlab(property, ref slabType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref GUID); if (s == 0) { var specklePropery2DSlab = new ETABSProperty2D(); setProperties(specklePropery2DSlab, matProp, thickness, property); specklePropery2DSlab.type2D = Structural.ETABS.Analysis.ETABSPropertyType2D.Slab; double overallDepth = 0; double slabThickness = 0; double stemWidthTop = 0; double stemWidthBot = 0; double ribSpacingDir1 = 0; double ribSpacingDir2 = 0; double ribSpacing = 0; int ribParrallelTo = 0; var speckleShellType = ConvertShellType(shellType); if (slabType == eSlabType.Waffle) { var speckleProperty2D = new ETABSProperty2D.WaffleSlab(); Model.PropArea.GetSlabWaffle(property, ref overallDepth, ref slabThickness, ref stemWidthTop, ref stemWidthBot, ref ribSpacingDir1, ref ribSpacingDir2); speckleProperty2D.OverAllDepth = overallDepth; speckleProperty2D.StemWidthBot = stemWidthBot; speckleProperty2D.StemWidthTop = stemWidthTop; speckleProperty2D.RibSpacingDir1 = ribSpacingDir1; speckleProperty2D.RibSpacingDir2 = ribSpacingDir2; speckleProperty2D.slabType = Structural.ETABS.Analysis.SlabType.Waffle; speckleProperty2D.deckType = Structural.ETABS.Analysis.DeckType.Null; setProperties(speckleProperty2D, matProp, thickness, property); speckleProperty2D.shellType = speckleShellType; speckleProperty2D.applicationId = GUID; return(speckleProperty2D); } else if (slabType == eSlabType.Ribbed) { var speckleProperty2D = new ETABSProperty2D.RibbedSlab(); Model.PropArea.GetSlabRibbed(property, ref overallDepth, ref slabThickness, ref stemWidthTop, ref stemWidthBot, ref ribSpacing, ref ribParrallelTo); speckleProperty2D.OverAllDepth = overallDepth; speckleProperty2D.StemWidthBot = stemWidthBot; speckleProperty2D.StemWidthTop = stemWidthTop; speckleProperty2D.RibSpacing = ribSpacing; speckleProperty2D.RibsParallelTo = ribParrallelTo; speckleProperty2D.slabType = Structural.ETABS.Analysis.SlabType.Ribbed; speckleProperty2D.deckType = Structural.ETABS.Analysis.DeckType.Null; setProperties(speckleProperty2D, matProp, thickness, property); speckleProperty2D.shellType = speckleShellType; speckleProperty2D.applicationId = GUID; return(speckleProperty2D); } else { switch (slabType) { case eSlabType.Slab: specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Slab; break; case eSlabType.Drop: specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Drop; break; case eSlabType.Mat: specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Mat; break; case eSlabType.Footing: specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Footing; break; default: specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Null; break; } specklePropery2DSlab.deckType = Structural.ETABS.Analysis.DeckType.Null; specklePropery2DSlab.shellType = speckleShellType; specklePropery2DSlab.applicationId = GUID; return(specklePropery2DSlab); } } return(null); }
public object FloorPropertyToNative(ETABSProperty2D property2D) { if (property2D.deckType != Structural.ETABS.Analysis.DeckType.Null) { SetDeck(property2D); switch (property2D.deckType) { case Structural.ETABS.Analysis.DeckType.Filled: var deckFilled = (ETABSProperty2D.DeckFilled)property2D; Model.PropArea.SetDeckFilled(deckFilled.name, deckFilled.SlabDepth, deckFilled.RibDepth, deckFilled.RibWidthTop, deckFilled.RibWidthBot, deckFilled.RibSpacing, deckFilled.ShearThickness, deckFilled.UnitWeight, deckFilled.ShearStudDia, deckFilled.ShearStudHt, deckFilled.ShearStudFu); break; case Structural.ETABS.Analysis.DeckType.Unfilled: var deckUnfilled = (ETABSProperty2D.DeckUnFilled)property2D; Model.PropArea.SetDeckUnfilled(deckUnfilled.name, deckUnfilled.RibDepth, deckUnfilled.RibWidthTop, deckUnfilled.RibWidthBot, deckUnfilled.RibSpacing, deckUnfilled.ShearThickness, deckUnfilled.UnitWeight); break; case Structural.ETABS.Analysis.DeckType.SolidSlab: var deckSlab = (ETABSProperty2D.DeckSlab)property2D; Model.PropArea.SetDeckSolidSlab(deckSlab.name, deckSlab.SlabDepth, deckSlab.ShearStudDia, deckSlab.ShearStudHt, deckSlab.ShearStudFu); break; } } else { switch (property2D.slabType) { case Structural.ETABS.Analysis.SlabType.Slab: var SolidSlab = property2D; var shell = shellType(SolidSlab); Model.PropArea.SetSlab(SolidSlab.name, eSlabType.Slab, shell, SolidSlab.material.name, SolidSlab.thickness); break; case Structural.ETABS.Analysis.SlabType.Ribbed: var slabRibbed = (ETABSProperty2D.RibbedSlab)property2D; shell = shellType(slabRibbed); Model.PropArea.SetSlab(slabRibbed.name, eSlabType.Ribbed, shell, slabRibbed.material.name, slabRibbed.thickness); Model.PropArea.SetSlabRibbed(slabRibbed.name, slabRibbed.OverAllDepth, slabRibbed.thickness, slabRibbed.StemWidthTop, slabRibbed.StemWidthTop, slabRibbed.RibSpacing, slabRibbed.RibsParallelTo); break; case Structural.ETABS.Analysis.SlabType.Waffle: var slabWaffled = (ETABSProperty2D.WaffleSlab)property2D; shell = shellType(slabWaffled); Model.PropArea.SetSlab(slabWaffled.name, eSlabType.Waffle, shell, slabWaffled.material.name, slabWaffled.thickness); Model.PropArea.SetSlabWaffle( slabWaffled.name, slabWaffled.OverAllDepth, slabWaffled.thickness, slabWaffled.StemWidthTop, slabWaffled.StemWidthBot, slabWaffled.RibSpacingDir1, slabWaffled.RibSpacingDir2); break; } } return(property2D.name); }