コード例 #1
0
ファイル: STLComposer.cs プロジェクト: lanthan/Repetier-Host
        private void buttonCenter_Click(object sender, EventArgs e)
        {
            STL stl = (STL)listSTLObjects.SelectedItem;

            if (stl == null)
            {
                return;
            }
            stl.Center(100f, 100f);
            listSTLObjects_SelectedIndexChanged(null, null);
            cont.UpdateChanges();
        }
コード例 #2
0
 public void openAndAddObject(string file)
 {
     STL stl = new STL();
         stl.Load(file);
         stl.Center(Main.printerSettings.PrintAreaWidth / 2, Main.printerSettings.PrintAreaDepth / 2);
         stl.Land();
         if (stl.list.Count > 0)
         {
             listSTLObjects.Items.Add(stl);
             cont.models.AddLast(stl);
             listSTLObjects.SelectedItem = stl;
             stl.addAnimation(new DropAnimation("drop"));
             updateSTLState(stl);
         }
 }
コード例 #3
0
ファイル: STLComposer.cs プロジェクト: lanthan/Repetier-Host
        public void openAndAddObject(string file)
        {
            STL stl = new STL();

            stl.Load(file);
            stl.Center(Main.printerSettings.PrintAreaWidth / 2, Main.printerSettings.PrintAreaDepth / 2);
            stl.Land();
            if (stl.list.Count > 0)
            {
                listSTLObjects.Items.Add(stl);
                cont.models.AddLast(stl);
                listSTLObjects.SelectedItem = stl;
                stl.addAnimation(new DropAnimation("drop"));
                updateSTLState(stl);
            }
        }
コード例 #4
0
        /// <summary>
        /// Opens the .stl file, sets the view to stl editor, and causes the model to animate a fall onto the print platform.
        /// </summary>
        /// <param name="file">File Path to the stl file.</param>
        public void OpenAndAddSTLFile(string file)
        {
            STL stl = new STL();

            stl.Load(file);
            stl.Center(Main.printerSettings.PrintAreaWidth / 2, Main.printerSettings.PrintAreaDepth / 2);
            stl.Land();
            if (stl.list.Count > 0)
            {
                this.main.listSTLObjects.Items.Add(stl);
                this.StleditorView.models.AddLast(stl);
                this.main.listSTLObjects.SelectedItem = stl;
                this.main.postionGUI.Autoposition();
                stl.addAnimation(new DropAnimation("drop"));
                this.main.postionGUI.updateSTLState(stl);
            }
            else
            {
                this.main.listSTLObjects.Visible = false;
            }
        }