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

        public static void RenderRhinoWires(RHG.PolylineCurve polyline, Rhino.Display.DisplayPipeline pipeline, Color bhColour, int thickness)
        {
            RHG.Polyline poly;
            if (polyline.TryGetPolyline(out poly))
            {
                pipeline.DrawPolyline(poly, bhColour, thickness);
            }
        }
예제 #2
0
        /***************************************************/

        public static bool IsEqual(this BHG.Polyline bhPolyline, RHG.PolylineCurve rhPolylineCurve, double tolerance = BHG.Tolerance.Distance)
        {
            if (bhPolyline == null & rhPolylineCurve == null)
            {
                return(true);
            }

            RHG.Polyline rhPolyline; rhPolylineCurve.TryGetPolyline(out rhPolyline);
            return(bhPolyline.IsEqual(rhPolyline, tolerance));
        }
예제 #3
0
        /***************************************************/

        public static BHG.Polyline FromRhino(this RHG.PolylineCurve polyline)
        {
            if (polyline == null)
            {
                return(null);
            }

            if (!polyline.IsPolyline())
            {
                return(null);
            }
            RHG.Polyline rPolyline; polyline.TryGetPolyline(out rPolyline);
            return(rPolyline.FromRhino());
        }