Beispiel #1
0
        // The following methods may be removed from Import eventually
        #region explorationdebug
        // method is for debugging the BFS output visually in dynamo, very useful
        public static object __BFSTestTesselation(List <Surface> surfaces, double tolerance = -1, int maxGridLines = 512)
        {
            //handle tesselation here
            var pointtuples = Tesselation.Tessellate(surfaces, tolerance, maxGridLines);
            //convert triangles to surfaces
            List <Surface> trisurfaces = pointtuples.Select(x => Surface.ByPerimeterPoints(new List <Point>()
            {
                x[0], x[1], x[2]
            })).ToList();

            var graph = ModelTopology.GenerateTopologyFromSurfaces(trisurfaces);

            //perform BFS on the graph and get back the tree
            var nodereturn = ModelGraph.BFS <EdgeLikeEntity, FaceLikeEntity>(graph);
            var tree       = nodereturn;

            var treegeo = ModelGraph.ProduceGeometryFromGraph <EdgeLikeEntity, FaceLikeEntity>
                              (tree as List <GraphVertex <EdgeLikeEntity, FaceLikeEntity> >);


            return(treegeo);
        }
Beispiel #2
0
        public static object __DebugGeoFromGraph(List <GraphVertex <EdgeLikeEntity, FaceLikeEntity> > graph)
        {
            var output = ModelGraph.ProduceGeometryFromGraph <EdgeLikeEntity, FaceLikeEntity>(graph);

            return(output);
        }