コード例 #1
0
 /// <summary>
 ///     TODO
 /// </summary>
 /// <param name="compEnt"></param>
 /// <returns></returns>
 public bool Equals(EntInfo compEnt)
 {
     if (!IsEqualSize(compEnt))
     {
         return(false);
     }
     if (Asymmetry != 0.0 || compEnt.Asymmetry != 0.0)
     {
         return(Asymmetry.IsEqualSize(compEnt.Asymmetry) &&
                AsymmetryVector.IsEqualTo(compEnt.AsymmetryVector, CalcTol.UnitVector) &&
                Math.Sign(AsymmetryVector.X) == Math.Sign(compEnt.AsymmetryVector.X) &&
                Math.Sign(AsymmetryVector.Y) == Math.Sign(compEnt.AsymmetryVector.Y) &&
                Math.Sign(AsymmetryVector.Z) == Math.Sign(compEnt.AsymmetryVector.Z));
     }
     return(true);
 }
コード例 #2
0
        /// <summary>
        ///     TODO
        /// </summary>
        /// <param name="mirCheck"></param>
        /// <returns></returns>
        public bool IsMirrorOf(EntInfo y)
        {
            if (Asymmetry == 0 || y.Asymmetry == 0)
            {
                return(false);
            }

            if (AsymmetryVector.IsEqualTo(y.AsymmetryVector, CalcTol.UnitVector))
            {
                if (!AsymmetryVector.X.IsEqualTo(y.AsymmetryVector.X))
                {
                    return(true);
                }
                if (!AsymmetryVector.Y.IsEqualTo(y.AsymmetryVector.Y))
                {
                    return(true);
                }
                if (!AsymmetryVector.Z.IsEqualTo(y.AsymmetryVector.Z))
                {
                    return(true);
                }

                return(false);
            }

            if (!AsymmetryVector.X.IsEqualTo(y.AsymmetryVector.X))
            {
                return(true);
            }
            if (!AsymmetryVector.Y.IsEqualTo(y.AsymmetryVector.Y))
            {
                return(true);
            }
            if (!AsymmetryVector.Z.IsEqualTo(y.AsymmetryVector.Z))
            {
                return(true);
            }

            return(false);
        }
コード例 #3
0
 /// <summary>
 ///     TODO
 /// </summary>
 /// <param name="compEnt"></param>
 /// <returns></returns>
 public bool IsEqualSize(EntInfo compEnt)
 {
     return(Length.IsEqualSize(compEnt.Length) && Width.IsEqualSize(compEnt.Width) &&
            Thickness.IsEqualSize(compEnt.Thickness) && Volume.IsEqualVolume(compEnt.Volume) &&
            Asymmetry.IsEqualSize(compEnt.Asymmetry));
 }