diff --git a/Elements/src/Door.cs b/Elements/src/Door.cs index 5c4545db2..5a06f9fa7 100644 --- a/Elements/src/Door.cs +++ b/Elements/src/Door.cs @@ -169,11 +169,11 @@ public override void UpdateRepresentations() public List GetInstances(Door door) { var representationInstances = new List() - { - this.CreateDoorSolidRepresentation(), - this.CreateDoorFrameRepresentation(), - this.CreateDoorCurveRepresentation() - }; + { + this.CreateDoorSolidRepresentation(), + this.CreateDoorFrameRepresentation(), + this.CreateDoorCurveRepresentation() + }; return representationInstances; } diff --git a/Elements/src/StandardWall.cs b/Elements/src/StandardWall.cs index 5dd72c640..4df80717b 100644 --- a/Elements/src/StandardWall.cs +++ b/Elements/src/StandardWall.cs @@ -117,9 +117,7 @@ public Opening AddOpening(Polygon perimeter, double x, double y, double depthFro private Transform GetOpeningTransform(double x, double y) { var xAxis = this.CenterLine.Direction(); - // Opening transform is still off... `outOfPlane` added because transform is not working correctly var outOfPlane = xAxis.Cross(Vector3.ZAxis); - // Opening transform is still off? var openingTransform = new Transform(this.CenterLine.Start + xAxis * x + Vector3.ZAxis * y - outOfPlane, xAxis, xAxis.Cross(Vector3.ZAxis)); return openingTransform; } diff --git a/Elements/test/DoorTest.cs b/Elements/test/DoorTest.cs index 2a643fc3e..7b85b2d36 100644 --- a/Elements/test/DoorTest.cs +++ b/Elements/test/DoorTest.cs @@ -12,15 +12,17 @@ namespace Elements public class DoorTest : ModelTest { [Fact, Trait("Category", "Examples")] - public void Example() + public void MakeDoorElement() { - this.Name = "Elements_Door"; + this.Name = nameof(MakeDoorElement); var line = new Line(new Vector3(0, 0, 0), new Vector3(10, 10, 0)); var wall = new StandardWall(line, 0.1, 3.0); var door = new Door(wall.CenterLine, 0.5, 2.0, 2.0, Door.DOOR_THICKNESS, DoorOpeningSide.LeftHand, DoorOpeningType.SingleSwing); wall.AddDoorOpening(door); + Assert.Single(wall.Openings); + this.Model.AddElement(wall); Model.AddElement(door); }