コード例 #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
ファイル: 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");
     }
 }
コード例 #3
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");
            }
        }
コード例 #4
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");
     }
 }
コード例 #5
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");
     }
 }
コード例 #6
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");
     }
 }