Beispiel #1
0
        public void Generate()
        {
            for (int i = 0; i < numberOfFloors; ++i)
            {
                var point = new Point(startPoint.X, startPoint.Y, startPoint.Z + i * floorHeight);
                rooms.Add(new Room(point, lenght, width, floorHeight, basementHeight));
            }

            while (rooms.Count < numberOfRooms)
            {
                rooms.Add(rooms[rooms.Count - 1].SplitRoom());
                rooms.Sort((x, y) => x.Area.CompareTo(y.Area));
            }
            InsertElements.InsertPlate(A1, B1, C1, D1, "PL100", "A36");
            if (roofHeight > 0)
            {
                InsertElements.InsertPlate(A1, B1, midPoint, "PL100", "A36");
                InsertElements.InsertPlate(B1, C1, midPoint, "PL100", "A36");
                InsertElements.InsertPlate(C1, D1, midPoint, "PL100", "A36");
                InsertElements.InsertPlate(D1, A1, midPoint, "PL100", "A36");
                InsertElements.InsertBeam(A1, midPoint, "L203X203X28.6", "350W");
                InsertElements.InsertBeam(B1, midPoint, "L203X203X28.6", "350W", Position.RotationEnum.BACK);
                InsertElements.InsertBeam(C1, midPoint, "L203X203X28.6", "350W");
                InsertElements.InsertBeam(D1, midPoint, "L203X203X28.6", "350W", Position.RotationEnum.BACK);
            }
            foreach (Room room in rooms)
            {
                room.InsertWalls();
            }
        }
Beispiel #2
0
        public void InsertWalls()
        {
            ArrayList basementPoints = new ArrayList
            {
                new Point(A.X - 50, A.Y - 50, A.Z - 50),
                new Point(B.X + 50, B.Y - 50, B.Z - 50),
                new Point(C.X + 50, C.Y + 50, C.Z - 50),
                new Point(D.X - 50, D.Y + 50, D.Z - 50),
            };

            InsertElements.InsertPlate(basementPoints, "PL100", "A36");
            InsertElements.InsertPlate(A, B, B1, A1, "PL100", "A36");
            InsertElements.InsertPlate(B, C, C1, B1, "PL100", "A36");
            InsertElements.InsertPlate(D, C, C1, D1, "PL100", "A36");
            InsertElements.InsertPlate(A, D, D1, A1, "PL100", "A36");
            InsertElements.InsertBeam(new Point(A.X + 150, A.Y + 150, A.Z), new Point(A1.X + 150, A1.Y + 150, A1.Z),
                                      "L203X203X28.6", "350W", Position.RotationEnum.BELOW);
            InsertElements.InsertBeam(new Point(B.X - 150, B.Y + 150, B.Z), new Point(B1.X - 150, B1.Y + 150, B1.Z),
                                      "L203X203X28.6", "350W", Position.RotationEnum.FRONT);
            InsertElements.InsertBeam(new Point(C.X - 150, C.Y - 150, C.Z), new Point(C1.X - 150, C1.Y - 150, C1.Z),
                                      "L203X203X28.6", "350W", Position.RotationEnum.TOP);
            InsertElements.InsertBeam(new Point(D.X + 150, D.Y - 150, D.Z), new Point(D1.X + 150, D1.Y - 150, D1.Z),
                                      "L203X203X28.6", "350W", Position.RotationEnum.BACK);
        }