コード例 #1
0
        public void SetExtDic(DicED dicFront, Document doc)
        {
            if (dicFront == null)
            {
                // Default
                return;
            }
            // Собственные значения расчета
            SetDataValues(dicFront.GetRec("FrontModelRec")?.Values, doc);
            // настроки
            Options = new FrontOptions();
            Options.SetExtDic(dicFront.GetInner("FrontOptions"), doc);

            int   groupCount = 0;
            DicED dicGroup;

            do
            {
                dicGroup = dicFront.GetInner("Group" + groupCount++);
                if (dicGroup != null)
                {
                    AddGroup(dicGroup);
                }
            } while (dicGroup != null);
        }
コード例 #2
0
        /// <summary>
        /// Инициализация расчета
        /// </summary>
        public void Initialize(InsModel insModel)
        {
            this.Model = insModel;

            // Настройки
            if (Options == null)
            {
                Options = FrontOptions.Default();
            }
        }
コード例 #3
0
        private Polyline CreateLine(Point2d ptStart, Point2d ptEnd, FrontOptions opt)
        {
            var line = new Polyline(2);

            line.AddVertexAt(0, ptStart, 0, 0, 0);
            line.AddVertexAt(1, ptEnd, 0, 0, 0);
            line.Color         = Color.FromColor(opt.GetFrontColor(InsValue));
            line.ConstantWidth = opt.LineFrontWidth;
            //line.LayerId = opt.FrontLineLayerId;
            return(line);
        }
コード例 #4
0
        //public string FrontLineLayer { get; set; } = "sapr_ins_front";

        public static FrontOptions Default()
        {
            var opt = new FrontOptions();

            //{
            //    StepCalcPointInFront = 0.3,
            //    LineFrontWidth = 0.6,
            //    FrontLineLayer = "sapr_ins_front"
            //};
            return(opt);
        }
コード例 #5
0
 public FrontValue(Point2d ptStart, Point2d ptEnd, InsRequirementEnum insValue, FrontOptions opt)
 {
     InsValue = insValue;
     Line     = CreateLine(ptStart, ptEnd, opt);
 }