/// <summary> /// 更新量測結果. /// 量測演算法放這裡 /// </summary> public override void UpdateResults() { try { _Result = DistanceHelper.IntersetionLine(_geoModelOne, _geoModelTwo); if (_Result != null) { if (mMeasAssist.mIsCalibValid && mMeasAssist.mTransWorldCoord) { Rectify(_Result.Row1, _Result.Col1, out _ResultWorld.Row1, out _ResultWorld.Col1); } else { _ResultWorld = new PointResult(_Result); } } } catch (HOperatorException ex) { mMeasAssist.exceptionText = ex.Message; _ResultWorld = new PointResult(); _Result = new PointResult(); } UpdateXLD(); }
/// <summary> /// 更新量測結果. /// 量測演算法放這裡 /// </summary> public override void UpdateResults() { try { _Result = DistanceHelper.IntersetionLine(_geoModelOne, _geoModelTwo); if (_Result != null) { if (mMeasAssist.mIsCalibValid && mMeasAssist.mTransWorldCoord) { Rectify(_Result.Row1, _Result.Col1, out _ResultWorld.Row1, out _ResultWorld.Col1); } else { _ResultWorld = new PointResult(_Result); } } } catch (HOperatorException ex) { mMeasAssist.exceptionText = ex.Message; _ResultWorld = new PointResult(); _Result = new PointResult(); } UpdateXLD(); }
private void initialize(IMeasureGeoModel geoModelOne, IMeasureGeoModel geoModelTwo, MeasureAssistant mAssist) { _geoModelOne = geoModelOne; _geoModelTwo = geoModelTwo; ROIMeasureType = MeasureType.Point; _ResultWorld = new PointResult(); UpdateResults(); }
/// <summary> /// 計算兩線段的交點 /// </summary> /// <param name="geoModelOne"></param> /// <param name="geoModelTwo"></param> /// <returns></returns> public static PointResult IntersetionLine(IMeasureGeoModel geoModelOne, IMeasureGeoModel geoModelTwo) { PointResult result = null; var modelValid = isMeasureModelValid(geoModelOne) && isMeasureModelValid(geoModelTwo) && isLineType(geoModelOne) && isLineType(geoModelTwo); if (modelValid) { HTuple row, col, isParallel; HOperatorSet.IntersectionLl(geoModelOne.Row1, geoModelOne.Col1, geoModelOne.Row2, geoModelOne.Col2, geoModelTwo.Row1, geoModelTwo.Col1, geoModelTwo.Row2, geoModelTwo.Col2, out row, out col, out isParallel); result = new PointResult() { Row1 = row, Col1 = col, IsParallel = isParallel, }; } return(result); }
public PointResult(PointResult result) : this(result.Row1, result.Col1, result.IsParallel) { }
public PointResult(PointResult result) : this(result.Row1, result.Col1, result.IsParallel) { }
public override void ClearResultData() { _ResultWorld = new PointResult(); }
/// <summary> /// 計算兩線段的交點 /// </summary> /// <param name="geoModelOne"></param> /// <param name="geoModelTwo"></param> /// <returns></returns> public static PointResult IntersetionLine(IMeasureGeoModel geoModelOne, IMeasureGeoModel geoModelTwo) { PointResult result = null; var modelValid = isMeasureModelValid(geoModelOne) && isMeasureModelValid(geoModelTwo) && isLineType(geoModelOne) && isLineType(geoModelTwo); if (modelValid) { HTuple row, col, isParallel; HOperatorSet.IntersectionLl(geoModelOne.Row1, geoModelOne.Col1, geoModelOne.Row2, geoModelOne.Col2, geoModelTwo.Row1, geoModelTwo.Col1, geoModelTwo.Row2, geoModelTwo.Col2, out row, out col, out isParallel); result = new PointResult() { Row1 = row, Col1 = col, IsParallel = isParallel, }; } return result; }
public override void ClearResultData() { _ResultWorld = new PointResult(); }
private void initialize(IMeasureGeoModel geoModelOne, IMeasureGeoModel geoModelTwo, MeasureAssistant mAssist) { _geoModelOne = geoModelOne; _geoModelTwo = geoModelTwo; ROIMeasureType = MeasureType.Point; _ResultWorld = new PointResult(); UpdateResults(); }