using Autodesk.Revit.DB; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FWindSoft.Revit { /// /// 元素包装器 /// /// public class ElementWrapper where T:Element { public ElementWrapper(T element ) { Instance = element; } public T Instance { get; private set; } } /// /// 定位点元素包装器 /// /// public class PointElementWrapper: ElementWrapper where T : Element { public PointElementWrapper(T element):base(element) { Point = element.GetLocationPoint(); } /// /// 定位点 /// public XYZ Point { get; private set; } } /// /// 定位线元素包装器 /// /// public class CurveElementWrapper : ElementWrapper where T : Element { public CurveElementWrapper(T element) : base(element) { Curve = element.GetLocationCurve(); } /// /// 定位线 /// public Curve Curve { get; private set; } } /// /// 直线元素包装器 /// /// public class LineElementWrapper : ElementWrapper where T : Element { public LineElementWrapper(T element) : base(element) { Line = element.GetLocationLine(); } /// /// 定位线 /// public Line Line { get;private set; } } }