private static Graph ProjectGraph(this Graph graph, GraphicalProjection projection) { Graph processGraph = graph.DeepClone(); Dataset graphData = SetGraphDataSet(processGraph, projection.View); Graphics.Modify.IView(projection.View, graphData); processGraph.Fragments.AddOrReplace(graphData.FindFragment <GraphRepresentation>()); return(processGraph); }
/***************************************************/ private static void RelationCurves(this Graph graph, GraphicalProjection projection) { foreach (IRelation relation in graph.Relations) { if (relation.Curve == null) { ProjectionFragment sourceProjectionFrag = graph.Entities[relation.Source].FindFragment <ProjectionFragment>(); ProjectionFragment targetProjectionFrag = graph.Entities[relation.Target].FindFragment <ProjectionFragment>(); //if(sourceProjectionFrag!= null && targetProjectionFrag!=null) // relation.Curve = new Line() { Start = sourceProjectionFrag.Position, End = targetProjectionFrag.Position }; } } }