protected virtual List <List <FillerContour.Part> > GetContours(MarkupFiller filler)
        {
            var originalContour = filler.Contour.Parts.ToList();
            var contours        = StyleHelper.SetOffset(originalContour, LineOffset, MedianOffset);

            return(contours);
        }
Exemple #2
0
        public override LodDictionaryArray <IStyleData> Calculate(MarkupFiller filler)
        {
            if (CurbSize == 0f && MedianCurbSize == 0f)
            {
                return(base.Calculate(filler));
            }
            else
            {
                var originalContour = filler.Contour.Parts.ToList();

                var contourDatas = StyleHelper.SetOffset(originalContour, LineOffset, MedianOffset).Select(i => new CounterData()
                {
                    _side = i
                }).ToArray();

                for (int i = 0; i < contourDatas.Length; i += 1)
                {
                    contourDatas[i]._side = StyleHelper.SetCornerRadius(contourDatas[i]._side, CornerRadius, MedianCornerRadius);
                    if (CurbSize > 0 || MedianCurbSize > 0)
                    {
                        contourDatas[i]._hole = StyleHelper.SetOffset(contourDatas[i]._side, CurbSize, MedianCurbSize).FirstOrDefault();
                    }
                }

                var data = new LodDictionaryArray <IStyleData>();

                foreach (var lod in EnumExtension.GetEnumValues <MarkupLOD>())
                {
                    data[lod] = Calculate(filler, contourDatas, lod).ToArray();
                }

                return(data);
            }
        }