Ejemplo n.º 1
0
        private CoverLine GetFirstLineFromRight(decimal workingWidth, bool reverseDirection = false)
        {
            //TODO: can be incorrect
            int coef = 1;
            if (reverseDirection)
                coef = -1;
            CoverLine coverLine = new CoverLine();
            coverLine.StartingCoordinates = new Coordinates(MaxX + (coef * workingWidth) / 2, GetMinY(MaxX, (coef * workingWidth)));// RightDown.Y);
            coverLine.EndingCoordinates = new Coordinates(MaxX + (coef * workingWidth) / 2, GetMaxY(MaxX, (coef * workingWidth)));// RightUp.Y);

            coverLine.Status = Enumerations.CoverLineStatus.reserved;
            coverLine.IsDivide = false;
            coverLine.CoverLineID = World.CoverLineIDCounter++.ToString();

            if (reverseDirection)
                coverLine.ReverseCoordinates();
            return coverLine;
        }
Ejemplo n.º 2
0
        public CoverLine GetLineFromRight(decimal width, decimal workingWidth, bool reverseDirection = false)
        {
            int coef = 1;
            if (reverseDirection)
                coef = -1;
            CoverLine coverLine = new CoverLine();
            coverLine.StartingCoordinates = new Coordinates(RightDown.X - width - (coef * workingWidth) / 2, RightDown.Y);
            coverLine.EndingCoordinates = new Coordinates(RightUp.X - width - (coef * workingWidth) / 2, RightUp.Y);

            coverLine.Status = Enumerations.CoverLineStatus.reserved;
            coverLine.IsDivide = false;
            coverLine.CoverLineID = World.CoverLineIDCounter++.ToString();

            if (reverseDirection)
                coverLine.ReverseCoordinates();
            return coverLine;
        }
Ejemplo n.º 3
0
        private CoverLine GetFirstLineFromLeft(decimal workingWidth, bool reverseDirection = false)
        {
            int coef = 1;
            if (reverseDirection)
                coef = -1;
            CoverLine coverLine = new CoverLine();

            //TODO:blocker - DONE? change Y-coordinates to the proper Y due to shape
            coverLine.StartingCoordinates = new Coordinates(MinX + (coef * workingWidth) / 2, GetMinY(MinX, (coef * workingWidth)));
            coverLine.EndingCoordinates = new Coordinates(MinX + (coef * workingWidth) / 2, GetMaxY(MinX, (coef * workingWidth)));// LeftUp.Y);

            coverLine.Status = Enumerations.CoverLineStatus.reserved;
            coverLine.IsDivide = false;
            coverLine.CoverLineID = World.CoverLineIDCounter++.ToString();

            if (reverseDirection)
                coverLine.ReverseCoordinates();
            return coverLine;
        }
Ejemplo n.º 4
0
        public CoverLine GetLineFromLeft(decimal width, decimal workingWidth, bool reverseDirection = false)
        {
            //int coef = 1;
            //if (reverseDirection)
            //    coef = -1;

            //TODO:blocker - upravit kvoli moznosti pokrytia nepravidelnej plochy
            CoverLine coverLine = new CoverLine();
            coverLine.EndingCoordinates = new Coordinates(MinX + width - workingWidth / 2, LeftDown.Y);
            coverLine.StartingCoordinates = new Coordinates(MinX + width - workingWidth / 2, LeftUp.Y);

            coverLine.Status = Enumerations.CoverLineStatus.reserved;
            coverLine.IsDivide = false;
            coverLine.CoverLineID = World.CoverLineIDCounter++.ToString();

            if (reverseDirection)
                coverLine.ReverseCoordinates();
            return coverLine;
        }