1234567891011121314151617181920212223242526272829303132 |
- /* ==============================================================================
- * 功能描述:CurveLoopExtension
- * 创 建 者:Garrett
- * 创建日期:2019/10/9 16:08:11
- * ==============================================================================*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Autodesk.Revit.DB;
- namespace SAGA.MBI.RevitExport.Entity
- {
- public static class CurveLoopExtension
- {
- public static List<Autodesk.Revit.DB.XYZ> GetPolygon(this CurveLoop curveLoop)
- {
- List<Autodesk.Revit.DB.XYZ> polygon = new List<Autodesk.Revit.DB.XYZ>();
- foreach (Curve curve in curveLoop)
- {
- var points = curve.Tessellate();
- points.RemoveAt(points.Count - 1);
- polygon.AddRange(points);
- }
- return polygon;
- }
- }
- }
|