예제 #1
0
        public void OSCADObject_ClonedObjectsRetainNamesAfterBooleanOperations()
        {
            //Union, Difference using operators
            var obj = new Cube() { Name = "Cube" }
                + new Cylinder() { Name = "Cylinder" } - new Sphere() { Name = "Sphere" };

            obj = obj.Intersection(new Text3D("Heyyy") { Name="Text" });

            var clone = obj.Clone();

            var children = clone.Children().ToList();
            Assert.AreEqual("Text", children[5].Name);
            Assert.AreEqual("Cylinder", children[3].Name);
            Assert.AreEqual("Cube", children[4].Name);
            Assert.AreEqual("Sphere", children[1].Name);
        }