Exemple #1
0
 internal BorderCollection(ColoBox boundingBox, DXFPoc.Model.LocationStatemachine.Machine machine)
 {
     this.boundingBox     = boundingBox;
     borders              = new List <Border>();
     transformed_borders  = new List <Border>();
     this.locationMachine = machine;
 }
Exemple #2
0
        internal void SetBoundingBox(List <ColoBox> staticBoxes)
        {
            boundingBox = GetBiggestBox(staticBoxes);
            DXFPoc.Model.LocationStatemachine.Machine locationMachine = new LocationStatemachine.Machine(coldAisle, spaceAfterObstacle, boundingBox);
            this.locationMachine           = locationMachine;
            this.locationMachine.direction = DirectionController;

            borderVerifier = new BorderVerifier(staticBoxes, locationMachine);
            locationMachine.BorderVerifier = borderVerifier;

            //if (borderVerifier.IsRotating)
            //{
            //    double angle = borderVerifier.Angle;
            //    foreach (ColoBox cb in staticBoxes)
            //    {
            //        cb.Rotate(angle);
            //    }
            //}

            //borderVerifier = new BorderVerifier(staticBoxes, locationMachine);
        }
        internal BorderVerifier(List <ColoBox> staticBoxes, DXFPoc.Model.LocationStatemachine.Machine machine)
        {
            this.boundingBox     = machine.boundingBox;
            this.locationMachine = machine;
            verticalX            = new BorderCollection(boundingBox, machine);
            horizontalY          = new YBorderCollection(boundingBox, machine);
            tilted = new TiltedBorderCollection(boundingBox, machine);

            loadBorderCollections(staticBoxes, false);



            //if tilted has values and verticalX and horizontalY are empty, rotate the drawing
            if (tilted.Count > 0 && horizontalY.Count == 0 && verticalX.Count == 0)
            {
                machine.IsRotated = true;
                rotateDrawing();

                //recalculate the borders after the rotation
                //loadBorderCollections(staticBoxes, true);
            }
        }
Exemple #4
0
 internal TiltedBorderCollection(ColoBox boundingBox, DXFPoc.Model.LocationStatemachine.Machine machine)
     : base(boundingBox, machine)
 {
 }