예제 #1
0
            public void UnfoldEachPairOfSurfacesInACubeParentAsRefFace()
            {
                Solid          testcube = UnfoldTestUtils.SetupCube();
                List <Face>    faces    = testcube.Faces.ToList();
                List <Surface> surfaces = faces.Select(x => x.SurfaceGeometry()).ToList();
                //generate a graph of the cube
                var graph = ModelTopology.GenerateTopologyFromSurfaces(surfaces);


                UnfoldTestUtils.AssertEachFacePairUnfoldsCorrectly(graph);
            }
예제 #2
0
            public void UnfoldEachPairOfFacesInACubeChildAsRefFace()
            {
                Solid       testcube = UnfoldTestUtils.SetupCube();
                List <Face> faces    = testcube.Faces.ToList();

                //generate a graph of the cube
                var graph = ModelTopology.GenerateTopologyFromFaces(faces);

                List <Object> faceobjs = faces.Select(x => x as Object).ToList();

                UnfoldTestUtils.AssertEachFacePairUnfoldsCorrectly(graph);
            }
예제 #3
0
            public void UnfoldEachPairOfTriangularSurfacesInAConeWideParentAsRefFace()
            {
                Solid          testCone = UnfoldTestUtils.SetupLargeCone();
                List <Face>    faces    = testCone.Faces.ToList();
                List <Surface> surfaces = faces.Select(x => x.SurfaceGeometry()).ToList();

                //handle tesselation here
                var pointtuples = Tesselation.Tessellate(surfaces, -1, 512);
                //convert triangles to surfaces
                List <Surface> trisurfaces = pointtuples.Select(x => Surface.ByPerimeterPoints(new List <Point>()
                {
                    x[0], x[1], x[2]
                })).ToList();

                //generate a graph of the cube
                var graph = ModelTopology.GenerateTopologyFromSurfaces(trisurfaces);


                UnfoldTestUtils.AssertEachFacePairUnfoldsCorrectly(graph);
            }