Пример #1
0
        private Dictionary <Point3d, Point3dCollection> InitializeEndLpMesh()
        {
            var scanlines   = new Dictionary <Point3d, Point3dCollection>();
            var ld          = _properties.Parts.SelectedLd;
            var lp          = _properties.Parts.SelectedLp;
            var startLp     = _properties.Algorythim.SelectedStartLp;
            var useStartLp  = startLp != null;
            var cast        = _properties.Parts.SelectedCast;
            var spacing     = _properties.Algorythim.Options.DistanceBetweenLpAndLd;
            var startVector = new Vector3d(0, startLp?.StartOffset ?? _properties.Parts.SelectedLp.StartOffset, 0);
            var startPoint  = _properties.StartPoint.Add(startVector);
            var incrVect    = new Vector2d(ld.Width + lp.Height + spacing * 2.0, lp.Width + _properties.Algorythim.Options.DistanceBetweenLp);

            if (useStartLp)
            {
                startPoint = startPoint.Add(new Vector3d(0, startLp.Width + _properties.Algorythim.Options.DistanceBetweenLp, 0));
            }

            for (double x = startPoint.X; x < _properties.MaxPoint.X; x += incrVect.X)
            {
                scanlines.Add(new Point3d(x, startPoint.Y, 0), ScanLine.GetOutlineSurroudingPointsY(new Point3d(x, startPoint.Y, 0), _properties.MaxPoint, lp.Width + _properties.Algorythim.Options.DistanceBetweenLp, _outline));
            }

            return(scanlines);
        }