internal static StbColumn CreateColumn(ModelBeam elem, int croSecId, StbColumnKind_structure kind) { return(new StbColumn { id = (elem.ind + 1).ToString(), name = elem.id, id_node_bottom = (elem.node_inds[0] + 1).ToString(), id_node_top = (elem.node_inds[1] + 1).ToString(), rotate = 0d, id_section = (croSecId + 1).ToString(), kind_structure = kind }); }
internal static StbGirder CreateGirder(ModelBeam elem, int croSecId, StbGirderKind_structure kind) { return(new StbGirder { id = (elem.ind + 1).ToString(), name = elem.id, id_node_start = (elem.node_inds[0] + 1).ToString(), id_node_end = (elem.node_inds[1] + 1).ToString(), rotate = 0d, id_section = (croSecId + 1).ToString(), kind_structure = kind }); }
private void ModelBeamToStbColumnAndGirder( List <StbSecBeam_RC> secBeams_RC, List <StbSecBeam_S> secBeams_S, List <StbSecColumn_RC> secColumn_RC, List <StbSecColumn_S> secColumn_S, K2SSecSteelItems secSteel, double colMaxAngle, ICollection <StbColumn> columns, ICollection <StbGirder> girders, double pAngle, double nAngle, ModelBeam modelBeam) { int croSecId = _croSecNames.IndexOf(modelBeam.crosec.name); bool positive = pAngle <= colMaxAngle && pAngle >= -1d * colMaxAngle; bool negative = nAngle <= colMaxAngle && nAngle >= -1d * colMaxAngle; if (positive || negative) { var kind = GetColumnStructureKind(modelBeam.crosec.material.family); columns.Add(K2StbMemberItems.CreateColumn(modelBeam, croSecId, kind)); if (_registeredCroSecId[0].IndexOf(croSecId) < 0) { AddColumnSection(secColumn_S, secColumn_RC, secSteel, kind, croSecId, _tagNum[0]++); } } else { var kind = GetGirderStructureKind(modelBeam.crosec.material.family); girders.Add(K2StbMemberItems.CreateGirder(modelBeam, croSecId, kind)); if (_registeredCroSecId[1].IndexOf(croSecId) < 0) { AddBeamSection(secBeams_S, secBeams_RC, secSteel, kind, croSecId, _tagNum[1]++); } } }
protected void addBeam(ModelBeam beam) //TODO - Add beamgroups { int beamNO = beam.ind + 1; bool beamStart = _node_inst.TryGetValue(beam.node_inds[0], out int startNode); bool beamEnd = _node_inst.TryGetValue(beam.node_inds[1], out int endNode); bool beamCros = _crosec_inst.TryGetValue(beam.crosec.guid, out int beamCrossection); string beamJoint = ""; if (beam.joint != null) { double?[] _jointConditions = beam.joint.c; string _ahin = ""; string _ehin = ""; for (int i = 0; i < 6; i++) { if (_jointConditions[i].HasValue) { _ahin = " AHIN "; } } if (_ahin != "") { if (_jointConditions[0].HasValue) { _ahin += "N"; } if (_jointConditions[1].HasValue) { _ahin += "VY"; } if (_jointConditions[2].HasValue) { _ahin += "VZ"; } if (_jointConditions[3].HasValue) { _ahin += "MT"; } if (_jointConditions[4].HasValue) { _ahin += "MY"; } if (_jointConditions[5].HasValue) { _ahin += "MZ"; } } for (int i = 6; i < 12; i++) { if (_jointConditions[i].HasValue) { _ehin = " EHIN "; } } if (_ehin != "") { if (_jointConditions[6].HasValue) { _ehin += "N"; } if (_jointConditions[7].HasValue) { _ehin += "VY"; } if (_jointConditions[8].HasValue) { _ehin += "VZ"; } if (_jointConditions[9].HasValue) { _ehin += "MT"; } if (_jointConditions[10].HasValue) { _ehin += "MY"; } if (_jointConditions[11].HasValue) { _ehin += "MZ"; } } if (_ahin != "" || _ehin != "") { beamJoint = _ahin + _ehin; _joint_inst.Add(beam.ind, beamJoint); } } if (beam.id != "") { string beamName = beam.id; if (beamName != beamId) { addInstruction("\nGRP " + grpInd + " TITL " + "\"" + beamName + "\""); beamId = beamName; grpInd++; } } if (beamStart && beamEnd && beamCros) { _elem_inst.Add(beam.ind, beamNO); if (beamDiv < 2) { addInstruction("BEAM NO " + beamNO + " NA " + startNode + " NE " + endNode + " NCS " + beamCrossection + beamJoint); } else { addInstruction("BEAM NO " + beamNO + "0 NA " + startNode + " NE " + endNode + " NCS " + beamCrossection + " DIV " + beamDiv + " NM 0 " + beamJoint); } } else { _log.Append("Error: Node or cross-section not found. Node Start: " + beamStart + "\nNode End: " + beamEnd + "\nBeam Crossection " + beamCros); _warnings.Add("Node or cross-section not found. Node Start: " + beamStart + "Node End: " + beamEnd + "Beam Crossection " + beamCros); } }