12345678910111213141516171819202122232425262728293031323334 |
-
- using Autodesk.Revit.DB;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace RevitToJBim.Extension
- {
- public static class CurveLoopExtension
- {
- public static List<XYZ> GetPolygon(this CurveLoop curveLoop)
- {
- List<XYZ> polygon = new List<XYZ>();
- foreach (Curve curve in curveLoop)
- {
- var points = curve.Tessellate();
- points.RemoveAt(points.Count - 1);
- polygon.AddRange(points);
- }
- return polygon;
- }
- }
- }
|