Exemple #1
0
        /// <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);
        }
Exemple #2
0
        /// <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));
        }
Exemple #3
0
        /// <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));
        }