public static Line ToLine(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex) { var start = cellComplex.GetVertex(edge.StartVertexId).Value; var end = cellComplex.GetVertex(edge.EndVertexId).Value; var l = new Line(start, end); return(l); }
public static bool StartsOrEndsAtThisVertex(this Elements.Spatial.CellComplex.Edge edge, ulong vertexId, CellComplex cellComplex) { return(edge.StartVertexId == vertexId || edge.EndVertexId == vertexId); }
public static bool StartsOrEndsOnGrid(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex) { return(StartsOnGrid(edge, cellComplex) || EndsOnGrid(edge, cellComplex)); }
public static bool EndsOnGrid(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex) { return(!string.IsNullOrEmpty(cellComplex.GetVertex(edge.EndVertexId).Name)); }
public static double Length(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex) { return(cellComplex.GetVertex(edge.StartVertexId).Value.DistanceTo(cellComplex.GetVertex(edge.EndVertexId).Value)); }
public static bool IsVertical(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex) { return(cellComplex.GetVertex(edge.StartVertexId).Value.IsDirectlyUnder(cellComplex.GetVertex(edge.EndVertexId).Value) || cellComplex.GetVertex(edge.EndVertexId).Value.IsDirectlyUnder(cellComplex.GetVertex(edge.StartVertexId).Value)); }
public static bool IsHorizontal(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex) { return(cellComplex.GetVertex(edge.StartVertexId).Value.Z.ApproximatelyEquals(cellComplex.GetVertex(edge.EndVertexId).Value.Z)); }