Class DGraph3Util
Utility functions for DGraph3 data structure
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public static class DGraph3Util
Methods
DisconnectJunction(DGraph3, Int32, Double)
foreach edge [vid,b] connected to junction vertex vid, remove, add new vertex c,
and then add new edge [b,c]. Optionally move c a bit back along edge from vid.
Declaration
public static void DisconnectJunction(DGraph3 graph, int vid, double shrinkFactor = 1)
Parameters
ErodeOpenSpurs(DGraph3)
Erode inwards from open boundary vertices of graph (ie vtx with single edge).
Resulting graph is not compact (!)
Declaration
public static void ErodeOpenSpurs(DGraph3 graph)
Parameters
Type |
Name |
Description |
DGraph3 |
graph |
|
Decompose graph into simple polylines and polygons.
Declaration
public static DGraph3Util.Curves ExtractCurves(DGraph3 graph, bool bWantLoopIndices = false, Func<int, bool> CurveOrientationF = null)
Parameters
Returns
NextEdgeAndVtx(Int32, Int32, DGraph3)
If we are at edge eid, which as one vertex prev_vid, find 'other' vertex, and other edge connected to that vertex,
and return pair [next_edge, shared_vtx]
Returns [int.MaxValue, shared_vtx] if shared_vtx is not valence=2 (ie stops at boundaries and complex junctions)
Declaration
public static Index2i NextEdgeAndVtx(int eid, int prev_vid, DGraph3 graph)
Parameters
Returns
WalkToNextNonRegularVtx(DGraph3, Int32, Int32)
walk through graph from fromVtx, in direction of eid, until we hit the next junction vertex
Declaration
public static List<int> WalkToNextNonRegularVtx(DGraph3 graph, int fromVtx, int eid)
Parameters
Returns