Example #1
0
        public Arc(Point startPoint, Point pointOnArc, Point endPoint)
        {
            Circle circle = new Circle(startPoint, pointOnArc, endPoint);

            this.point_0    = circle.Center;
            this.point_1    = startPoint;
            this.vector3d_0 = circle.NormalVector;
            Vector3d a = new Vector3d(startPoint - this.point_0);
            Vector3d b = new Vector3d(endPoint - this.point_0);

            this.double_0 = Vector3d.OrientedAngle(a, b, this.vector3d_0);
        }
Example #2
0
        public bool ContainsOnCircumference(Point point)
        {
            if (!this.ToCircle().ContainsOnCircumference(point))
            {
                return(false);
            }
            Vector3d a   = new Vector3d(this.point_1 - this.point_0);
            Vector3d b   = new Vector3d(point - this.point_0);
            double   num = Vector3d.OrientedAngle(a, b, this.vector3d_0);

            if (Global.AlmostEquals(num, 6.2831853071795862, 1E-08, 1E-08))
            {
                num = 0.0;
            }
            return(num <= this.double_0 || Global.AlmostEquals(num, this.double_0, 1E-08, 1E-08));
        }
Example #3
0
        public Arc(Point center, Vector3d startVector, Vector3d endVector, Vector3d normalVector)
        {
            this.point_0    = center;
            this.point_1    = center + startVector.ToPoint();
            this.vector3d_0 = normalVector;
            double num = Vector3d.OrientedAngle(startVector, endVector, normalVector);

            this.double_0 = num;
            if (!Global.AlmostEquals(startVector.Norm, endVector.Norm))
            {
                throw new ArgumentException("Error constructing arc: start vector length not equal end vector length.");
            }
            if (!startVector.IsOrthogonalTo(normalVector) && !endVector.IsOrthogonalTo(normalVector))
            {
                throw new ArgumentException("Error constructing arc: Normal vector not orthogonal to start and end vector.");
            }
        }
Example #4
0
 internal double method_3()
 {
     return(Vector3d.OrientedAngle(this.method_1().BasisVector[0], this.EndVector(), this.vector3d_0));
 }