/// <summary> /// 点导几何元素的投影点 /// </summary> /// <param name="pt"></param> /// <returns></returns> public virtual Double3 ProjectPoint(Double3 pt) { Double3 diff = pt - this.StartPoint; if (diff == Double3.zero) { return(pt); } return(Double3.Project(diff, this.NormalizedDir) + this.StartPoint); }
/// <summary> /// 求轴向量 /// </summary> /// <param name="pt"></param> /// <returns></returns> public virtual Double3 AixsVector(Double3 pt) { Double3 diff = pt - this.StartPoint; if (diff == Double3.zero) { return(Double3.zero); } return(diff - Double3.Project(diff, this.NormalizedDir)); }
/// <summary> /// 求轴向量 /// </summary> /// <param name="pt"></param> /// <returns></returns> public virtual Double3 AixsVector(Double3 pt) { Double3 diff = pt - this.Pt; return(Double3.Project(diff, this.NormalizedNormal)); }