Loxy getLoxy(double UpDown, ref Base Base)
        {
            Loxy Result = new Loxy();

            if ((Curvextruders != null) && (Curvextruders.Count > 0) && (Curvextruders[0].Count > 3))
            {
                xyzArray A = new xyzArray();
                for (int j = 0; j < Curvextruders[0].Count; j++)
                {
                    A.Add(Curvextruders[0][j].Value(0, UpDown));
                }
                xyz N = A.normal();
                Base = Base.DoComplete(Curvextruders[0][0].Value(0, UpDown), N);
                for (int i = 0; i < Curvextruders.Count; i++)
                {
                    xyArray _A = new xyArray();
                    Result.Add(_A);
                    for (int j = 0; j < Curvextruders[i].Count; j++)
                    {
                        xy P = Base.Relativ(Curvextruders[i][j].Value(0, UpDown)).toXY();
                        _A.Add(P);
                    }
                    if (_A.Count > 0)
                    {
                        _A.Add(_A[0]);
                    }
                }
            }
            return(Result);
        }
Beispiel #2
0
        /// <summary>
        /// sets the position of the shaft and of the top.
        /// </summary>
        /// <param name="Shaft">the shaft</param>
        /// <param name="Top">the top</param>
        public void SetShaftAndTop(xyz Shaft, xyz Top)
        {
            Base B = Base.DoComplete(Shaft, Top - Shaft);

            this._Transformation = B.ToMatrix();
            Size = Top.dist(Shaft);
        }
Beispiel #3
0
        /// <summary>
        /// overrides the <see cref="Normal(double, double)"/> method. the direction shows to the left of the curve tangent.
        /// </summary>
        /// <param name="u"></param>
        /// <param name="v"></param>
        /// <returns></returns>
        public override xyz Normal(double u, double v)
        {
            Base C   = Base.DoComplete(new xyz(0, 0, 0), Direction);
            xy   Der = Curve.Derivation(u);
            xyz  P   = C.BaseX * Der.x + C.BaseY * Der.y;

            return((P & Direction).normalized() * (-1));
        }
Beispiel #4
0
 void CheckBase()
 {
     if (Curve != null)
     {
         StandardBase = Base.DoComplete(new xyz(0, 0, 0), Direction);
     }
     CurveArray = StandardBase.ToMatrix() * _CurveArray;
 }