/***************************************************/ public static RHG.Circle ToRhino(this BHG.Circle circle) { if (circle == null) { return(default(RHG.Circle)); } return(new RHG.Circle(new RHG.Plane(circle.Centre.ToRhino(), circle.Normal.ToRhino()), circle.Radius)); }
/***************************************************/ public static bool IsEqual(this BHG.Circle bhCircle, RHG.Circle rhCircle, double tolerance = BHG.Tolerance.Distance) { if (bhCircle == null & rhCircle.Equals(default(RHG.Circle))) { return(true); } return(bhCircle.Centre.IsEqual(rhCircle.Center, tolerance) && bhCircle.Normal.IsEqual(rhCircle.Normal, tolerance) && Math.Abs(bhCircle.Radius - rhCircle.Radius) < tolerance); }
/***************************************************/ public static void RenderMeshes(BHG.Circle circle, Rhino.Display.DisplayPipeline pipeline, DisplayMaterial material) { return; }
/***************************************************/ public static void RenderWires(BHG.Circle circle, Rhino.Display.DisplayPipeline pipeline, Color bhColour) { pipeline.DrawCircle(circle.ToRhino(), bhColour, 2); }