//Radius line at ptFrom public void GetRFrom(ClosedLine RFrom) { //debug zli if (lCurveID == 27) { //int i = 0; } IPoint ptCenter = new Point(); GetCenterPT(ptCenter); ClosedLine clTemp = new ClosedLine(ptCenter, ptFrom); if (ptCenter.X == ptFrom.X) { clTemp.bVerticalLine = true; clTemp.xIntercept = ptCenter.X; } else { RFrom.k = clTemp.k; RFrom.b = clTemp.b; RFrom.ptFrom.X = clTemp.ptFrom.X; RFrom.ptFrom.Y = clTemp.ptFrom.Y; RFrom.ptTo.X = clTemp.ptTo.X; RFrom.ptTo.Y = clTemp.ptTo.Y; } }
//the long chord public void GetLongChord(ClosedLine LongChord) { ClosedLine clTemp = new ClosedLine(this.ptFrom, this.ptTo); if (ptFrom.X == ptTo.X) { clTemp.bVerticalLine = true; clTemp.xIntercept = ptFrom.X; } else { LongChord.k = clTemp.k; LongChord.b = clTemp.b; LongChord.ptFrom.X = clTemp.ptFrom.X; LongChord.ptFrom.Y = clTemp.ptFrom.Y; LongChord.ptTo.X = clTemp.ptTo.X; LongChord.ptTo.Y = clTemp.ptTo.Y; } }
//Radius line passing ptTo public void GetRTo(ClosedLine RTo) { IPoint ptCenter = new Point(); GetCenterPT(ptCenter); ClosedLine clTemp = new ClosedLine(ptCenter, ptTo); //zhang revised if (ptCenter.X == ptTo.X) { clTemp.bVerticalLine = true; clTemp.xIntercept = ptCenter.X; } else { RTo.k = clTemp.k; RTo.b = clTemp.b; RTo.ptFrom.X = clTemp.ptFrom.X; RTo.ptFrom.Y = clTemp.ptFrom.Y; RTo.ptTo.X = clTemp.ptTo.X; RTo.ptTo.Y = clTemp.ptTo.Y; } }