- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
1) How Rotate a bar
Gamma for RobotBar
//IRobotObjOperationType obrot = IRobotObjOperationType.I_OOT_ROTATE;
IRobotObjOperation obrot;
IRobotObjOperRotation rotacja;
rotacja.Angle 90;
private IRobotApplication robApp;
private RobotProjectPreferences ProjectPrefs;
private RobotMeshParams MeshParams;
private IRobotStructure str;
private RobotLabelServer labels;
private IRobotLabel label;
private RobotSelection SelectionNodes;
private RobotNodeSupportData footData;
private RobotSectionDatabaseList steelSections;
string StrSlup = "HEB 240"; // nazwy z odstępem
string StrRygiel = "IPE 180";
string StrScianaSrodek = "UPE 80";
string StrScianaGora = "UPE 80";
string klasaStal = "S355";
robApp = new RobotApplicationClass();
str = robApp.Project.Structure;
labels = robApp.Project.Structure.Labels;
IRobotLabel Section;
IRobotBarSectionData SData;
IRobotNodeServer inds = robApp.Project.Structure.Nodes;
IRobotBarServer ibars = robApp.Project.Structure.Bars;
RobotSelection iselSlup = robApp.Project.Structure.Selections.Create(IRobotObjectType.I_OT_BAR);
inds.Create(1,0,0, 0);
inds.Create(2, 5,5, 0);
ibars.Create(1, 1, 2); //slup
iselSlup.AddOne(1);
ibars.SetLabel(iselSlup, IRobotLabelType.I_LT_MATERIAL, klasaStal);
Section = robApp.Project.Structure.Labels.Create(IRobotLabelType.I_LT_BAR_SECTION, StrSlup);
SData = (IRobotBarSectionData)Section.Data;
SData.LoadFromDBase(StrSlup);
robApp.Project.Structure.Labels.Store(Section);
str.Bars.SetLabel(iselSlup, IRobotLabelType.I_LT_BAR_SECTION, StrSlup);
On a link “setting gamma using the API” there is
IRobotBar bar;
Bar = … please write this line using above code
bar.Gamma = 90;
I don’t know how to add created bar ibars.Create(1, 1, 2); to IRobotBar method
2) How to set local system as axis of a bar ( 3 points) ?
I want to set a local system parallel to axis in a bar to do an offset for another bar
IRobotGeoCoordinateSystem.I_GCS_LOCAL_ORIGINAL;
3)
How to add all bars from construction
I would like TempLato involves to all bars in a construction
private IRobotStructure structure;
RobotSimpleCase TempLato, TempZima;
TempLato = structure.Cases.CreateSimple(7, "TmpLato", IRobotCaseNature.I_CN_TEMPERATURE,
IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
TempLato.Records.New(IRobotLoadRecordType.I_LRT_BAR_THERMAL);
LoadRecord = (RobotLoadRecord)TempLato.Records.Get(1);
LoadRecord.SetValue(Convert.ToInt16(IRobotBarThermalRecordValues.I_BTRV_TX), obcTmpLato);
LoadRecord.SetValue(Convert.ToInt16(IRobotBarThermalRecordValues.I_BTRV_TY), 0);
LoadRecord.SetValue(Convert.ToInt16(IRobotBarThermalRecordValues.I_BTRV_TZ), 0);
4) How to divide bar into “ n parts”
number of segments : 4
Edit divide (division )
DivideBar (_bar_number : long, _div_points : IRobotValuesArray, _relative : bool) :
IRobotNumbersArray
Solved! Go to Solution.
