예제 #1
0
        /***************************************************/

        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));
        }
예제 #2
0
        /***************************************************/

        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);
        }
예제 #3
0
        /***************************************************/

        public static void RenderMeshes(BHG.Circle circle, Rhino.Display.DisplayPipeline pipeline, DisplayMaterial material)
        {
            return;
        }
예제 #4
0
        /***************************************************/

        public static void RenderWires(BHG.Circle circle, Rhino.Display.DisplayPipeline pipeline, Color bhColour)
        {
            pipeline.DrawCircle(circle.ToRhino(), bhColour, 2);
        }