| | |
| | | return pts?.ToList(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取特性曲线 |
| | | /// </summary> |
| | | public static (Yw.Ahart.eCurveType, Yw.Ahart.eFeatType, List<Yw.Geometry.Point2d>) GetCurveInfo(this Yw.Vmo.PhartGraphVmo vmo) |
| | | public static (Yw.Ahart.eCurveType curve_type, Yw.Ahart.eFeatType feat_type, List<Yw.Geometry.Point2d> define_pt_list, List<Yw.Geometry.Point2d> line_pt_list) GetCurveInfo(this Yw.Vmo.PhartGraphVmo vmo) |
| | | { |
| | | if (vmo == null) |
| | | return default; |
| | | var paras = vmo.GeometryParasModel(); |
| | | var define_pt_list = paras.DefinePoints; |
| | | |
| | | var performCurve = HStation.Service.PhartRelation.PhartGraphHelper.GetPerformCurve((HStation.PhartRelation.eGeometryStyle)vmo.GeometryStyle, vmo.GeometryInfo); |
| | | var curve_type = (Yw.Ahart.eCurveType)vmo.GraphType; |
| | | var feat_type = performCurve.FeatType; |
| | | var pt_list = performCurve.FeatCurve.GetPointList(30); |
| | | return new(curve_type, feat_type, pt_list); |
| | | |
| | | var line_pt_list = performCurve.FeatCurve.GetPointList(30); |
| | | return new(curve_type, feat_type, define_pt_list, line_pt_list); |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 获取特性曲线 |
| | | /// </summary> |
| | | public static HStation.Model.FeatCurveGeometryParasModel GeometryParasModel(this Yw.Vmo.PhartGraphVmo vmo) |
| | | { |
| | | if (vmo == null) |
| | | return default; |
| | | if (string.IsNullOrEmpty(vmo.GeometryParas)) |
| | | return default; |
| | | if (vmo.GeometryStyle != (int)HStation.PhartRelation.eGeometryStyle.FeatCurve) |
| | | return default; |
| | | return HStation.Model.FeatCurveGeometryParasModel.ToModel(vmo.GeometryInfo); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |