/// <summary> /// Determines whether two objects are equal. /// </summary> public override bool Equals(object obj) { if (obj == null || (!object.ReferenceEquals(this.GetType(), obj.GetType()))) { return(false); } Circle3d c = (Circle3d)obj; if (GeometRi3D.UseAbsoluteTolerance) { return(c.Center == this.Center && Abs(c.R - this.R) <= GeometRi3D.Tolerance && c.Normal.IsParallelTo(this.Normal)); } else { return(Abs(c.Center.DistanceTo(this.Center)) / this.R <= GeometRi3D.Tolerance && Abs(c.R - this.R) / this.R <= GeometRi3D.Tolerance && c.Normal.IsParallelTo(this.Normal)); } }
/// <summary> /// Intersection of circle with plane. /// Returns 'null' (no intersection) or object of type 'Circle3d', 'Point3d' or 'Segment3d'. /// </summary> public object IntersectionWith(Circle3d c) { return(c.IntersectionWith(this)); }