Beispiel #1
0
        IGroup[] CreateInnerGirths()
        {
            CurveGroup outer = FindGroup("Outer") as CurveGroup;
            if (outer == null)
                outer = CreateOuterCurves() as CurveGroup;

            IGroup[] girvir = new IGroup[2];
            //SurfaceCurve gir = null;
            for (int i = 0; i < 2; i++)
            {
                CurveGroup girths = new CurveGroup(i == 0 ? "Girths" : "Virths", this);
                for (double dg = 0.0; dg < 1; dg += 0.1)
                {
                    IFitPoint[] gir = new IFitPoint[2];
                    gir[1] = new CurvePoint(1, outer[2 * i + 1], dg);

                    //gir[1] = new FixedPoint(.3, .3);
                    if (i == 0)
                        gir[0] = new SlidePoint(0, outer[2 * i], dg);
                    else
                        gir[0] = new CurvePoint(0, outer[2 * i], dg);

                    MouldCurve girth = new MouldCurve(String.Format("{0}ir-{1:##0}%", i == 0 ? "G" : "V", dg * 100), this, null);
                    girth.Fit(gir);
                    girths.Add(girth);
                }
                Add(girths);
                girvir[i] = girths;
            }
            return girvir;
        }
Beispiel #2
0
        void CreateSpokes()
        {
            const int NGIR = 5;
            const int NANG = 5;
            Vect2[] uv = new Vect2[2];
            CurveGroup group;
            //for (int nLu = 0; nLu < 1; nLu++)
            for (int nGir = 0; nGir < NGIR; nGir++)
            {
                group = new CurveGroup(string.Format("Spokes[{0}]", nGir), this);
                //group = new CurveGroup(string.Format("Spokes[{0}][{1}]", nLu, nGir), S);

                uv[0] = new Vect2(-0.3, BLAS.interpolant(nGir, NGIR));
                //uv[1-nLu] = new Vect2(1,0);

                for (int nAng = 0; nAng < NANG; nAng++)
                {
                    uv[1] = new Vect2(1.3, BLAS.interpolant(nAng, NANG));

                    MouldCurve g = new MouldCurve(string.Format(group.Label + "[{0}]", nAng), this, null);
                    g.Fit(uv[0], uv[1]);
                    group.Add(g);
                }
                Add(group);
            }
        }
Beispiel #3
0
        IGroup[] CreateInnerCurves()
        {
            CurveGroup outer = FindGroup("Outer") as CurveGroup;
            if (outer == null)
                outer = CreateOuterCurves() as CurveGroup;

            IGroup[] rets = new IGroup[2];
            //SurfaceCurve gir = null;
            for (int i = 0; i < 2; i++)
            {
                CurveGroup curves = new CurveGroup(i == 0 ? "Horiz" : "Verts", this);
                for (double dg = 0.0; dg < 1; dg += 0.1)
                {
                    IFitPoint[] gir = new IFitPoint[2];
                    gir[1] = new CurvePoint(1, outer[2 * i + 1], dg);

                    //gir[1] = new FixedPoint(.3, .3);

                    gir[0] = new CurvePoint(0, outer[2 * i], dg);

                    MouldCurve curve = new MouldCurve(String.Format("{0}ec-{1:##0}%", i == 0 ? "S" : "V", dg * 100), this, null);
                    curve.Fit(gir);
                    curves.Add(curve);
                }
                Add(curves);
                rets[i] = curves;
            }
            return rets;
        }