public void RoomsByDivision() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2); Assert.Equal(8.0, roomGroup.Rooms.Count, 10); }
public void AreaPlaced() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2); Assert.Equal(1200.0, roomGroup.AreaPlaced, 10); }
public void RoomsAsSpaces() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2); Assert.Equal(8.0, roomGroup.RoomsAsSpaces.Count, 10); Assert.Equal(150.0, roomGroup.RoomsAsSpaces.First().Profile.Area(), 10); }
public void AreaAvailable() { var roomGroup = new RoomGroup() { Perimeter = Shaper.Rectangle(60.0, 20.0) }; Assert.Equal(1200.0, roomGroup.AreaAvailable, 10); roomGroup.RoomsByDivision(4, 2); Assert.Equal(0.0, roomGroup.AreaAvailable, 10); }
public void RoomGroup() { var polygon = Shaper.PolygonBox(60.0, 20.0); var roomGroup = new RoomGroup() { Perimeter = polygon }; roomGroup.RoomsByDivision(4, 2, 3.5); var model = new Model(); foreach (Room room in roomGroup.Rooms) { model.AddElement(room.AsSpace); } model.SaveGlb("../../../../RoomGroup.glb"); }
public void SetHeight() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2, 3.0); foreach (Room room in roomGroup.Rooms) { Assert.Equal(3.0, room.Height, 10); } roomGroup.SetHeight(4.5); foreach (Room room in roomGroup.Rooms) { Assert.Equal(4.5, room.Height, 10); } }
public void SetElevation() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2); foreach (Room room in roomGroup.Rooms) { Assert.Equal(0.0, room.Elevation, 10); } roomGroup.Elevation = 10.2; foreach (Room room in roomGroup.Rooms) { Assert.Equal(10.2, room.Elevation, 10); } }
public void SetColor() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2); foreach (Room room in roomGroup.Rooms) { Assert.Equal(Palette.White, room.Color); } roomGroup.SetColor(Palette.Green); foreach (Room room in roomGroup.Rooms) { Assert.Equal(Palette.Green, room.Color); } }
public void Rotate() { var roomGroup = new RoomGroup() { Perimeter = Shaper.PolygonBox(60.0, 20.0) }; roomGroup.RoomsByDivision(4, 2); var model = new Model(); foreach (Room room in roomGroup.Rooms) { model.AddElement(room.AsSpace); } roomGroup.Rotate(Vector3.Origin, 180); foreach (Room room in roomGroup.Rooms) { model.AddElement(room.AsSpace); } model.SaveGlb("../../../../RoomGroupRotate.glb"); }