Autodesk.Revit.DB.FaceArrayIterator是一个迭代器,用于在Revit中获取FaceArray(面数组)中的每个面。
FaceArrayIterator(FaceArray)
创建一个用于FaceArray的迭代器。
Current
获取FaceArray中的当前面。
MoveNext()
将迭代器移动到下一个面。
// 创建并填充一个FaceArray
FaceArray faceArray = new FaceArray();
faceArray.Append(face1);
faceArray.Append(face2);
faceArray.Append(face3);
// 创建用于FaceArray的迭代器
FaceArrayIterator iterator = new FaceArrayIterator(faceArray);
// 迭代每个面
while (iterator.MoveNext())
{
Face face = iterator.Current;
// 对面进行操作
}