public Edge PseudoPerpendicularOn(Edge edge) { if (edge.Length < 4.94065645841247E-324) { return(edge.StartPoint.PerpendicularOn(this)); } Line line = edge.ToLine(); if (this.IsParallelTo(line)) { throw new ArgumentException("Can not compute perpendicular: line and edge are parallel."); } Edge edge2 = this.PerpendicularOn(line); if (edge.CollinearContains(edge2.EndPoint)) { return(edge2); } Edge edge3 = edge.StartPoint.PerpendicularOn(this); Edge edge4 = edge.EndPoint.PerpendicularOn(this); if (edge4.Length >= edge3.Length) { return(edge3); } return(edge4); }
public Point method_4(Edge edge) { Point point = this.method_3(edge.ToLine()); if (point == null) { return(null); } if (edge.CollinearContains(point)) { return(point); } return(null); }
public Point getInterSection(Edge edge) { Point point = edge.ToLine().getInterSecttion(this); if (point == null) { return(null); } if (this.IsCoplanarTo(edge)) { return(null); } if (edge.CollinearContains(point)) { return(point); } return(null); }
public Edge PseudoPerdendicularOn(Edge edge) { if (edge.Length < 4.94065645841247E-324) { return(new Edge(this, edge.MidPoint)); } Point point = this.method_0(edge.ToLine()); if (edge.CollinearContains(point)) { return(new Edge(this, point)); } double num = this.DistanceTo(edge.StartPoint); double num2 = this.DistanceTo(edge.EndPoint); if (num < num2) { return(new Edge(this, edge.StartPoint)); } return(new Edge(this, edge.EndPoint)); }
public bool IsCollinearTo(Edge edge) { return(edge.Length < 4.94065645841247E-324 || edge.ToLine().Contains(this)); }
public bool IsParallelTo(Edge edge) { return(this.vector3d_0.IsParallelTo(edge.ToLine().DirectionVector)); }