Пример #1
0
        private void CreateMirrorProfile()
        {
            int index          = 0;
            var totalHeight    = Point3D.Distance(RequiredTopList[index].Line.StartPoint, RequiredTopList[RequiredTopList.Count - 1].Line.EndPoint);
            var architevLength = RequiredTopList[LineType.Architrave_1].Line.EndPoint.X - RequiredTopList[LineType.Architrave_1].Line.StartPoint.X;
            //if (RequiredTopList[LineType.Architrave_2] != null)
            //{
            //    var architev2Length = RequiredTopList[LineType.Architrave_1].Line.EndPoint.X - RequiredTopList[LineType.Architrave_1].Line.StartPoint.X;
            //    architevLength += architev2Length;
            //}


            Point3D bottomBasePoint = new Point3D(Utilities.InputData.RevealWidth / 2 + architevLength, RequiredTopList[index].Line.StartPoint.Y, 0);
            Point3D topBasePoint    = new Point3D(Utilities.InputData.RevealWidth / 2 + architevLength, RequiredTopList[RequiredTopList.Count - 1].Line.EndPoint.Y, 0);

            Line topLine    = new Line(RequiredTopList[index].Line.StartPoint, bottomBasePoint);
            Line bottomLine = new Line(RequiredTopList[RequiredTopList.Count - 1].Line.EndPoint, topBasePoint);

            TopEntities.Add(topLine);
            TopEntities.Add(bottomLine);

            Plane mirrorPlane = new Plane(bottomBasePoint, new Vector3D(1, 0, 0));

            List <Entity>  mirroredEntities = new List <Entity>();
            Transformation mirror           = new Mirror(mirrorPlane);

            foreach (var topEntity in TopEntities)
            {
                Entity entity = topEntity.Clone() as Entity;
                entity.TransformBy(mirror);
                mirroredEntities.Add(entity);
            }

            TopEntities.AddRange(mirroredEntities);
        }
Пример #2
0
        private void CreateTopLeftProfile()
        {
            AssignTopDisplacement();

            var requiredDat = JsonData.TopViewDataList.Where(item => item.ModifiedLengthTxt >= item.BendAllowance)
                              .ToList();

            RequiredTopList.AddRange(requiredDat);
            // RequiredTopList.Clear();
            Utilities.TranslateEntities(RequiredTopList);
            var leftEntities = RequiredTopList.Select(item => item.Line).ToList();

            TopEntities.AddRange(leftEntities);
        }
Пример #3
0
        private void CreateTopSlots()
        {
            double slotHeight  = 20;
            double slotWidth   = 2.5;
            int    index       = 0;
            var    totalHeight = Point3D.Distance(RequiredTopList[index].Line.StartPoint, RequiredTopList[RequiredTopList.Count - 1].Line.EndPoint);

            var slotPoints = GetTopSlotPoints(totalHeight, JsonData.TabData.TabBase, slotHeight, slotWidth);

            foreach (var point in slotPoints)
            {
                var slotLines = DrawPocketLines(point, slotHeight, slotWidth);
                TopEntities.AddRange(slotLines);
            }
        }