/*------------------------------------------------------------------------- * 功能描述:StandardUtil * 作者:xulisong * 创建时间: 2019/6/27 11:25:35 * 版本号:v1.0 * -------------------------------------------------------------------------*/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using JBIM.Definition; using SAGA.DotNetUtils.Extend; namespace RevitToJBim.Common { /// /// 标准整理工具 /// public static class StandardUtil { public static void ArrangeLoop(Polygon polygon) { if (polygon.Count>=2) { var firstPoint = polygon[0]; var lastPoint = polygon[polygon.Count - 1]; if (!firstPoint.X.IsEqual(lastPoint.X) || !firstPoint.Y.IsEqual(lastPoint.Y) || !firstPoint.Z.IsEqual(lastPoint.Z)) { polygon.Add(firstPoint); } } } } }