private void ShowEdgePath(Path path) { // ReSharper restore UnusedMember.Local List <DebugCurve> dd = Nudger.GetObstacleBoundaries(PaddedObstacles, "black"); dd.AddRange(Nudger.PathDebugCurvesFromPoint(path)); dd.AddRange(VisibilityGraph.Edges.Select(e => new DebugCurve(0.5, "blue", new LineSegment(e.SourcePoint, e.TargetPoint)))); LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd); }
internal virtual void NudgePaths(IEnumerable <Path> edgePaths) { // If we adjusted for spatial ancestors, this nudging can get very weird, so refetch in that case. var ancestorSets = this.ObstacleTree.SpatialAncestorsAdjusted ? SplineRouter.GetAncestorSetsMap(Obstacles) : this.AncestorsSets; // Using VisibilityPolyline retains any reflection/staircases on the convex hull borders; using // PaddedPolyline removes them. Nudger.NudgePaths(edgePaths, CornerFitRadius, PaddedObstacles, ancestorSets, RemoveStaircases); //Nudger.NudgePaths(edgePaths, CornerFitRadius, this.ObstacleTree.GetAllPrimaryObstacles().Select(obs => obs.VisibilityPolyline), ancestorSets, RemoveStaircases); }
static void Main(string [] args) { stopwatch = Stopwatch.StartNew(); string path = Constants.output_path + "output-" + MapToggles.bit_mask_string + ".svg"; Console.WriteLine("Reading files..."); Map map = new Map(); LogTime(); Console.WriteLine("Chunking..."); Chunker.GenerateChunks(map); LogTime(); Console.WriteLine("Grouping Cities..."); CityGrouper.GroupCities(map); LogTime(); Console.WriteLine("Naming Towers..."); Namer.NameTowers(map); LogTime(); Console.WriteLine("Nudging towers..."); Nudger.NudgeTowers(map); LogTime(); Console.WriteLine("Placing Labels..."); LabelPlacer.PlaceLabels(map); LogTime(); Console.WriteLine("Generating SVG..."); string contents = SVGWriter.GenerateSVG(map, false); LogTime(); Console.WriteLine("Writing File..."); File.WriteAllText(path, contents); LogTime(); Console.WriteLine("Done"); Console.WriteLine(" >> Saved to: " + path); Console.WriteLine(total_time + "s total used."); Console.WriteLine("\nPress any key to exit."); Console.ReadKey(); }