microsoft / microsoft/automatic-graph-layout

NullReferenceException in ConstrainedDelaunayTriangulation.CdtSweeper

Open
#324 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.5k
Forks
319
Avg merge
38m
Merged PRs (30d)
1

Description

referencing nuget AutomaticGraphLayout.GraphViewerGDI 1.1.12

Graph graph = new Graph("Test")
{
    LayoutAlgorithmSettings = new MdsLayoutSettings()
};
graph.AddEdge("B", "C");
graph.AddEdge("A", "D");
graph.AddEdge("A", "B");

var viewer = new Microsoft.Msagl.GraphViewerGdi.GViewer();
viewer.Graph = graph;
Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation.CdtSweeper.CreatePerimeterElementFromEdge(Microsoft.Msagl.Routing.CdtEdge)
Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation.CdtSweeper.CreateDoubleLinkedListOfPerimeter()
Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation.CdtSweeper.FinalizeTriangulation()
Microsoft.Msagl.Core.AlgorithmBase.Run()
Microsoft.Msagl.Core.AlgorithmBase.Run()
Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.MinimumSpanningTree.GTreeOverlapRemoval.OneIteration(Microsoft.Msagl.Core.Geometry.Point[], Microsoft.Msagl.Core.DataStructures.Size[], bool)
Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.MinimumSpanningTree.GTreeOverlapRemoval.RemoveOverlaps()
Microsoft.Msagl.Layout.MDS.MdsGraphLayout.LayoutConnectedGraphWithMds(Microsoft.Msagl.Core.Layout.GeometryGraph)
System.Threading.Tasks.Parallel.ForWorker.AnonymousMethod__1()
System.Threading.Tasks.Task.InnerInvokeWithArg(System.Threading.Tasks.Task)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report using the Graph, MdsLayoutSettings, and GViewer example, then start at ConstrainedDelaunayTriangulation.CdtSweeper.CreatePerimeterElementFromEdge and follow CreateDoubleLinkedListOfPerimeter and FinalizeTriangulation. Use the stack trace to inspect the failing triangulation path; done means the sample graph completes layout without a NullReferenceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.