public static TBD.Perimeter ToTAS(this BHG.Polyline polyline, TBD.Perimeter tbdPerimeter) { if (polyline == null) { return(tbdPerimeter); } TBD.Polygon poly = tbdPerimeter.CreateFace(); poly = polyline.ToTASPolygon(poly); return(tbdPerimeter); }