12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
- using System.Collections.Generic;
- namespace JBIM.Definition
- {
-
-
-
- public enum LocationType
- {
- Point=0,
- 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.Point);
- 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;
- }
- }
- }
|