Exemple #1
0
    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);
    }
Exemple #2
0
 public static bool StartsOrEndsAtThisVertex(this Elements.Spatial.CellComplex.Edge edge, ulong vertexId, CellComplex cellComplex)
 {
     return(edge.StartVertexId == vertexId || edge.EndVertexId == vertexId);
 }
Exemple #3
0
 public static bool StartsOrEndsOnGrid(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex)
 {
     return(StartsOnGrid(edge, cellComplex) || EndsOnGrid(edge, cellComplex));
 }
Exemple #4
0
 public static bool EndsOnGrid(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex)
 {
     return(!string.IsNullOrEmpty(cellComplex.GetVertex(edge.EndVertexId).Name));
 }
Exemple #5
0
 public static double Length(this Elements.Spatial.CellComplex.Edge edge, CellComplex cellComplex)
 {
     return(cellComplex.GetVertex(edge.StartVertexId).Value.DistanceTo(cellComplex.GetVertex(edge.EndVertexId).Value));
 }
Exemple #6
0
 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));
 }
Exemple #7
0
 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));
 }