예제 #1
0
        /// <summary>
        /// Constructor for a StructAnalysis1DElement section preview
        /// </summary>
        /// <param name="element"></param>
        public RhinoMeshAvatar(LinearElement element)
        {
            RhinoMeshBuilder rmb = new RhinoMeshBuilder();

            rmb.AddSectionPreview(element);
            RenderMesh = rmb.Mesh;
            RenderMesh.Normals.ComputeNormals();
        }
예제 #2
0
        //public override IGH_GeometricGoo Transform(Transform xform)
        //{
        //    throw new NotImplementedException();
        //}

        public void DrawViewportMeshes(IGH_PreviewArgs args)
        {
            if (Value != null)
            {
                RhinoMeshBuilder builder = new RhinoMeshBuilder();
                builder.AddSectionPreview(Value);
                builder.Finalize();
                args.Display.DrawMeshShaded(builder.Mesh, args.ShadeMaterial);
            }
        }