Beispiel #1
0
        public static CvalueSettings CvalueSettings(CvalueFocalMethodEnum ctype, double defaultC = 0.09)
        {
            return(new CvalueSettings
            {
                FocalMethod = ctype,

                DefaultCValue = defaultC,
            });
        }
Beispiel #2
0
        public static CvalueFocalMethodEnum CvalueFocalMethod(int typeNum)
        {
            var enumCount = CvalueFocalMethodEnum.GetNames(typeof(CvalueFocalMethodEnum)).Length;

            //last name is undefined so total possible types is enumCount-2
            if (typeNum > enumCount - 2)
            {
                typeNum = 0;
            }

            CvalueFocalMethodEnum value = (CvalueFocalMethodEnum)typeNum;

            return(value);
        }
Beispiel #3
0
        /***************************************************/
        private static Point GetFocalPoint(Vector rowV, Spectator spectator, CvalueFocalMethodEnum focalMethod, Polyline focalPolyline)
        {
            Point focal = new Point();

            switch (focalMethod)
            {
            case CvalueFocalMethodEnum.OffsetThroughCorners:
                focal = FindFocalOffset(rowV, spectator, focalPolyline);

                break;

            case CvalueFocalMethodEnum.Closest:
                focal = FindFocalClosest(spectator, focalPolyline);

                break;

            case CvalueFocalMethodEnum.Perpendicular:
                focal = FindFocalPerp(rowV, spectator, focalPolyline);

                break;
            }
            return(focal);
        }