|
@@ -0,0 +1,50 @@
|
|
|
+/*-------------------------------------------------------------------------
|
|
|
+ * 功能描述:GeometryLocation
|
|
|
+ * 作者:xulisong
|
|
|
+ * 创建时间: 2019/6/19 16:43:58
|
|
|
+ * 版本号:v1.0
|
|
|
+ * -------------------------------------------------------------------------*/
|
|
|
+
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+
|
|
|
+namespace JBIM
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// 定位类型
|
|
|
+ /// </summary>
|
|
|
+ public enum LocationType
|
|
|
+ {
|
|
|
+ Point,
|
|
|
+ Line,
|
|
|
+ Arc,
|
|
|
+ Common
|
|
|
+ }
|
|
|
+ public class GeometryLocation
|
|
|
+ {
|
|
|
+ public GeometryLocation(LocationType type)
|
|
|
+ {
|
|
|
+ Type = type;
|
|
|
+ Points = new List<XYZ>();
|
|
|
+ }
|
|
|
+ public LocationType Type { get; set; }
|
|
|
+ public List<XYZ> Points { get;private set; }
|
|
|
+
|
|
|
+ public static GeometryLocation CreatePointLocation(XYZ xyz)
|
|
|
+ {
|
|
|
+ var result = new GeometryLocation(LocationType.Line);
|
|
|
+ result.Points.Add(xyz);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static GeometryLocation CreateLineLocation(List<XYZ> xyzes)
|
|
|
+ {
|
|
|
+ var result = new GeometryLocation(LocationType.Line);
|
|
|
+ result.Points.AddRange(xyzes);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|