コード例 #1
0
        /// <summary>
        /// Checks the state of the object.
        /// If it is outside print are it starts pulsing
        /// </summary>
        public void updateSTLState(STL stl)
        {
            FormPrinterSettings ps = Main.printerSettings;

            stl.UpdateBoundingBox();
            if (!ps.PointInside(stl.xMin, stl.yMin, stl.zMin) ||
                !ps.PointInside(stl.xMax, stl.yMin, stl.zMin) ||
                !ps.PointInside(stl.xMin, stl.yMax, stl.zMin) ||
                !ps.PointInside(stl.xMax, stl.yMax, stl.zMin) ||
                !ps.PointInside(stl.xMin, stl.yMin, stl.zMax) ||
                !ps.PointInside(stl.xMax, stl.yMin, stl.zMax) ||
                !ps.PointInside(stl.xMin, stl.yMax, stl.zMax) ||
                !ps.PointInside(stl.xMax, stl.yMax, stl.zMax))
            {
                stl.outside = true;
                if (Main.threeDSettings.pulseOutside.Checked && !stl.hasAnimationWithName("pulse"))
                {
                    stl.addAnimation(new PulseAnimation("pulse", 0.03, 0.03, 0.03, 0.3));
                }
            }
            else
            {
                stl.outside = false;
                stl.removeAnimationWithName("pulse");
            }
        }
コード例 #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
 /// <summary>
 /// Checks the state of the object.
 /// If it is outside print are it starts pulsing
 /// </summary>
 public void updateSTLState(STL stl)
 {
     stl.UpdateBoundingBox();
     if (stl.xMin < 0 || stl.yMin < 0 || stl.zMin < -0.001 || stl.xMax > Main.printerSettings.PrintAreaWidth ||
         stl.yMax > Main.printerSettings.PrintAreaDepth || stl.zMax > Main.printerSettings.PrintAreaHeight)
     {
         if (!stl.hasAnimationWithName("pulse"))
         {
             stl.addAnimation(new PulseAnimation("pulse", 0.05, 0.05, 0.05, 0.5));
         }
     }
     else
     {
         stl.removeAnimationWithName("pulse");
     }
 }
コード例 #4
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);
            }
        }
コード例 #5
0
        /// <summary>
        /// Checks the state of the object.
        /// If it is outside print are it starts pulsing
        /// </summary>
        public void updateSTLState(STL stl)
        {
            FormPrinterSettings ps = Main.printerSettings;

            stl.UpdateBoundingBox();
            if (stl.xMin < ps.BedLeft || stl.yMin < ps.BedFront || stl.zMin < -0.001 || stl.xMax > ps.BedLeft + Main.printerSettings.PrintAreaWidth ||
                stl.yMax > ps.BedFront + Main.printerSettings.PrintAreaDepth || stl.zMax > Main.printerSettings.PrintAreaHeight)
            {
                stl.outside = true;
                if (Main.threeDSettings.pulseOutside.Checked && !stl.hasAnimationWithName("pulse"))
                {
                    stl.addAnimation(new PulseAnimation("pulse", 0.03, 0.03, 0.03, 0.3));
                }
            }
            else
            {
                stl.outside = false;
                stl.removeAnimationWithName("pulse");
            }
        }
コード例 #6
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;
            }
        }
コード例 #7
0
ファイル: STLComposer.cs プロジェクト: adambyram/pimaker
 /// <summary>
 /// Checks the state of the object.
 /// If it is outside print are it starts pulsing
 /// </summary>
 public void updateSTLState(STL stl)
 {
     FormPrinterSettings ps = Main.printerSettings;
     stl.UpdateBoundingBox();
     if (stl.xMin < ps.BedLeft || stl.yMin < ps.BedFront || stl.zMin < -0.001 || stl.xMax > ps.BedLeft+Main.printerSettings.PrintAreaWidth ||
         stl.yMax > ps.BedFront+Main.printerSettings.PrintAreaDepth || stl.zMax > Main.printerSettings.PrintAreaHeight)
     {
         stl.outside = true;
         if (Main.threeDSettings.pulseOutside.Checked && !stl.hasAnimationWithName("pulse"))
             stl.addAnimation(new PulseAnimation("pulse", 0.03, 0.03, 0.03, 0.3));
     }
     else
     {
         stl.outside = false;
         stl.removeAnimationWithName("pulse");
     }
 }
コード例 #8
0
ファイル: STLComposer.cs プロジェクト: shmorgan/Repetier-Host
 /// <summary>
 /// Checks the state of the object.
 /// If it is outside print are it starts pulsing
 /// </summary>
 public void updateSTLState(STL stl)
 {
     stl.UpdateBoundingBox();
     if (stl.xMin < 0 || stl.yMin < 0 || stl.zMin < -0.001 || stl.xMax > Main.printerSettings.PrintAreaWidth ||
         stl.yMax > Main.printerSettings.PrintAreaDepth || stl.zMax > Main.printerSettings.PrintAreaHeight)
     {
         if (!stl.hasAnimationWithName("pulse"))
             stl.addAnimation(new PulseAnimation("pulse", 0.05, 0.05, 0.05, 0.5));
     }
     else
     {
         stl.removeAnimationWithName("pulse");
     }
 }
コード例 #9
0
 /// <summary>
 /// Checks the state of the object.
 /// If it is outside print are it starts pulsing
 /// </summary>
 public void updateSTLState(STL stl)
 {
     FormPrinterSettings ps = Main.printerSettings;
     stl.UpdateBoundingBox();
     if (!ps.PointInside(stl.xMin, stl.yMin, stl.zMin) ||
         !ps.PointInside(stl.xMax, stl.yMin, stl.zMin) ||
         !ps.PointInside(stl.xMin, stl.yMax, stl.zMin) ||
         !ps.PointInside(stl.xMax, stl.yMax, stl.zMin) ||
         !ps.PointInside(stl.xMin, stl.yMin, stl.zMax) ||
         !ps.PointInside(stl.xMax, stl.yMin, stl.zMax) ||
         !ps.PointInside(stl.xMin, stl.yMax, stl.zMax) ||
         !ps.PointInside(stl.xMax, stl.yMax, stl.zMax))
     {
         stl.outside = true;
         if (Main.threeDSettings.pulseOutside.Checked && !stl.hasAnimationWithName("pulse"))
             stl.addAnimation(new PulseAnimation("pulse", 0.03, 0.03, 0.03, 0.3));
     }
     else
     {
         stl.outside = false;
         stl.removeAnimationWithName("pulse");
     }
 }