Пример #1
0
        /***************************************************/

        public static RHG.Brep ToRhino(this BHG.Pipe pipe)
        {
            if (pipe == null)
            {
                return(null);
            }
            else if (pipe.Centreline == null)
            {
                return(null);
            }

            RHG.Curve rRail = pipe.Centreline.IToRhino();
            if (rRail == null)
            {
                return(null);
            }

            RHG.PipeCapMode cap     = (RHG.PipeCapMode)(pipe.Capped ? 1 : 0);
            bool            fitRail = pipe.Centreline is BHG.PolyCurve;

            RHG.Brep[] rPipes = RHG.Brep.CreatePipe(rRail, pipe.Radius, false, cap, fitRail, BHG.Tolerance.Distance, BHG.Tolerance.Angle);

            return(rPipes.FirstOrDefault());
        }
Пример #2
0
        /***************************************************/

        public static void RenderMeshes(BHG.Pipe surface, Rhino.Display.DisplayPipeline pipeline, DisplayMaterial material)
        {
            RHG.Brep rSurface = surface.ToRhino();
            pipeline.DrawBrepShaded(rSurface, material);
        }
Пример #3
0
        /***************************************************/

        public static void RenderWires(BHG.Pipe surface, Rhino.Display.DisplayPipeline pipeline, Color bhColour)
        {
            pipeline.DrawBrepWires(surface.ToRhino(), bhColour, 0);
        }