from RobotOM import *
from System import Object
import math
from time import gmtime,strftime
from math import sqrt
ConcreteClass = IN[0]
B = IN[2]
H = IN[1]
NameS = str(H*100)+"x"+str(B*100) #Section Name
B = B*1
H = H*1
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
results = structure.Results
bars = structure.Bars
rbars = results.Bars
labels = structure.Labels
nodes = structure.Nodes
loads = structure.Cases
app = RobotApplicationClass()
app.Project.New(IRobotProjectType.I_PT_FRAME_2D)
#Geometry
structure.Nodes.Create(1,0,0,0)
structure.Nodes.Create(2,8,0,0)
structure.Nodes.Create(3,16,0,0)
bars.Create(1,1,2)
bars.Create(2,2,3)
#Supports
Support = labels.Create(IRobotLabelType.I_LT_NODE_SUPPORT,
"Przegub przesuwny")
Support.Data.UX = 0
Support.Data.UY = 1
Support.Data.RY = 0
labels.Store(Support)
nodes.Get(1).SetLabel(IRobotLabelType.I_LT_NODE_SUPPORT, "Przegub")
nodes.Get(2).SetLabel(IRobotLabelType.I_LT_NODE_SUPPORT, "Przegub")
nodes.Get(3).SetLabel(IRobotLabelType.I_LT_NODE_SUPPORT,
"Przegub przesuwny")
#Section
lab_serv = labels
sec = lab_serv.Create(IRobotLabelType.I_LT_BAR_SECTION, NameS)
data = sec.data
data.ShapeType = IRobotBarSectionShapeType.I_BSST_CONCR_BEAM_RECT
nonst_data = data.concrete
nonst_data.SetValue(IRobotBarSectionConcreteDataValue.I_BSCDV_BEAM_B,
B)
nonst_data.SetValue(IRobotBarSectionConcreteDataValue.I_BSCDV_BEAM_H,
H)
data.MaterialName = ConcreteClass[0]
data.CalcNonstdGeometry()
lab_serv.Store(sec)
bars.Get(1).SetLabel(IRobotLabelType.I_LT_BAR_SECTION, NameS)
bars.Get(2).SetLabel(IRobotLabelType.I_LT_BAR_SECTION, NameS)
Hi,
Sorry it took me so long to write back. I am inserting the code.