Exemplo n.º 1
0
        private void buttonCopyObjects_Click(object sender, EventArgs e)
        {
            if (copyDialog.ShowDialog(Main.main) == DialogResult.Cancel)
            {
                return;
            }
            int numberOfCopies = (int)copyDialog.numericCopies.Value;

            List <PrintModel> newSTL = new List <PrintModel>();

            foreach (PrintModel act in ListObjects(true))
            {
                PrintModel last = act;
                for (int i = 0; i < numberOfCopies; i++)
                {
                    PrintModel stl = last.copyPrintModel();
                    last = stl;
                    newSTL.Add(stl);
                }
            }
            foreach (PrintModel stl in newSTL)
            {
                AddObject(stl);
                cont.models.AddLast(stl);
            }
            if (copyDialog.checkAutoposition.Checked)
            {
                Autoposition();
            }
            Main.main.threedview.UpdateChanges();
        }