Autodesk.Revit.DB.Structure.TrussChordLocation是用于表示桁架构件的上弦杆和下弦杆在空间中的位置的类。它通常与Autodesk.Revit.DB.Structure.Truss结构一起使用。
StartPoint:表示Chord的起始点位置的XYZ坐标。EndPoint:表示Chord的结束点位置的XYZ坐标。Equals(object obj): 将该对象与给定对象进行比较;如果对象相等,则为true,否则为false。GetHashCode(): 返回该对象的哈希代码。ToString(): 返回此对象的字符串表示形式。// 获取桁架上的上弦杆和下弦杆位置
Truss myTruss = doc.GetElement(elementId) as Truss;
if (myTruss != null)
{
TrussChordLocation topChordLocation = myTruss.GetChordLocation(false);
TrussChordLocation bottomChordLocation = myTruss.GetChordLocation(true);
XYZ startPointTopChord = topChordLocation.StartPoint;
XYZ endPointTopChord = topChordLocation.EndPoint;
XYZ startPointBottomChord = bottomChordLocation.StartPoint;
XYZ endPointBottomChord = bottomChordLocation.EndPoint;
}
Autodesk.Revit.DB.Structure.TrussChordLocation类可以方便地获取桁架构件上弦杆和下弦杆的位置信息,为桥梁、楼盖等结构物的设计提供便利。