Example #1
0
        private void Menu_Bezier2GraphClicked(object sender, EventArgs e)
        {
            ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)sender;
            IGH_Graph         val = new Bezier2Graph();

            if (val != null)
            {
                if (Graph != null)
                {
                    RememberGraph(Graph);
                }
                val.PrepareForUse();
                RecallGraph(val);
                GH_GraphContainer val2 = Container;
                Container = null;
                if (val2 == null)
                {
                    val2 = (GH_GraphContainer)(object)new GH_GraphContainer(val);
                }
                else
                {
                    val2.Graph = val;
                }
                Container = val2;
            }
        }
Example #2
0
        protected override GH_AbstractGraph CreateDerivedDuplicate()
        {
            Bezier2Graph bezier2Graph = new Bezier2Graph();

            bezier2Graph.pts = new Point3d[count];
            for (int i = 0; i < count; i++)
            {
                bezier2Graph.pts[i] = pts[i];
            }
            return(bezier2Graph);
        }