Esempio n. 1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rhino.Geometry.Mesh mesh = new Rhino.Geometry.Mesh();
            DA.GetData(0, ref mesh);

            DA.SetData(0, mesh.ToCustomMesh());
        }
Esempio n. 2
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rhino.Geometry.Mesh mesh = new Rhino.Geometry.Mesh();
            bool isIndented          = false;

            DA.GetData(0, ref mesh);
            DA.GetData(1, ref isIndented);

            MeshMaker.Mesh mMesh = mesh.ToCustomMesh();

            DA.SetData(0, mMesh);
            DA.SetData(1, mMesh.Serialize(isIndented));
        }
Esempio n. 3
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rhino.Geometry.Mesh mesh = new Rhino.Geometry.Mesh();
            bool open = false;

            DA.GetData(0, ref mesh);
            DA.GetData(1, ref open);

            MeshViewer viewer = new MeshViewer(mesh.ToCustomMesh());

            if (open)
            {
                viewer.BuildViewer();
            }
        }
Esempio n. 4
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rhino.Geometry.Mesh mesh = new Rhino.Geometry.Mesh();
            string filePath          = "C:\\Users\\Public\\Documents\\untitled.json";
            bool   save = false;

            DA.GetData(0, ref mesh);
            DA.GetData(1, ref filePath);
            DA.GetData(2, ref save);

            MeshMaker.Mesh mMesh = mesh.ToCustomMesh();

            if (save)
            {
                StreamWriter Writer = new StreamWriter(filePath);
                Writer.Write(mMesh.Serialize());
                Writer.Close();
            }

            DA.SetData(0, filePath);
        }