diff --git a/src/Mod/CAM/Gui/Resources/Path.qrc b/src/Mod/CAM/Gui/Resources/Path.qrc
index b8462b1868..164f44a755 100644
--- a/src/Mod/CAM/Gui/Resources/Path.qrc
+++ b/src/Mod/CAM/Gui/Resources/Path.qrc
@@ -126,11 +126,14 @@
panels/TaskPathSimulator.ui
panels/TaskCAMSimulator.ui
panels/ZCorrectEdit.ui
- gl_simulator/0.png
- gl_simulator/1.png
- gl_simulator/4.png
- gl_simulator/X.png
+ gl_simulator/Slower.png
gl_simulator/Faster.png
+ gl_simulator/x.png
+ gl_simulator/1.png
+ gl_simulator/5.png
+ gl_simulator/10.png
+ gl_simulator/25.png
+ gl_simulator/50.png
gl_simulator/Pause.png
gl_simulator/Play.png
gl_simulator/Rotate.png
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/0.png b/src/Mod/CAM/Gui/Resources/gl_simulator/0.png
deleted file mode 100644
index 4ce5680469..0000000000
Binary files a/src/Mod/CAM/Gui/Resources/gl_simulator/0.png and /dev/null differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/1.png b/src/Mod/CAM/Gui/Resources/gl_simulator/1.png
index b9e3deeb29..8ecdabd1da 100644
Binary files a/src/Mod/CAM/Gui/Resources/gl_simulator/1.png and b/src/Mod/CAM/Gui/Resources/gl_simulator/1.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/10.png b/src/Mod/CAM/Gui/Resources/gl_simulator/10.png
new file mode 100644
index 0000000000..3ec60263c9
Binary files /dev/null and b/src/Mod/CAM/Gui/Resources/gl_simulator/10.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/25.png b/src/Mod/CAM/Gui/Resources/gl_simulator/25.png
new file mode 100644
index 0000000000..52db8e19a6
Binary files /dev/null and b/src/Mod/CAM/Gui/Resources/gl_simulator/25.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/4.png b/src/Mod/CAM/Gui/Resources/gl_simulator/4.png
deleted file mode 100644
index 976c6cb86d..0000000000
Binary files a/src/Mod/CAM/Gui/Resources/gl_simulator/4.png and /dev/null differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/5.png b/src/Mod/CAM/Gui/Resources/gl_simulator/5.png
new file mode 100644
index 0000000000..6b02df6ff9
Binary files /dev/null and b/src/Mod/CAM/Gui/Resources/gl_simulator/5.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/50.png b/src/Mod/CAM/Gui/Resources/gl_simulator/50.png
new file mode 100644
index 0000000000..b02d7f8ce3
Binary files /dev/null and b/src/Mod/CAM/Gui/Resources/gl_simulator/50.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/Faster.png b/src/Mod/CAM/Gui/Resources/gl_simulator/Faster.png
index ef68900620..2af36947b6 100644
Binary files a/src/Mod/CAM/Gui/Resources/gl_simulator/Faster.png and b/src/Mod/CAM/Gui/Resources/gl_simulator/Faster.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/Slower.png b/src/Mod/CAM/Gui/Resources/gl_simulator/Slower.png
new file mode 100644
index 0000000000..0d400eb22c
Binary files /dev/null and b/src/Mod/CAM/Gui/Resources/gl_simulator/Slower.png differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/X.png b/src/Mod/CAM/Gui/Resources/gl_simulator/X.png
deleted file mode 100644
index c983441030..0000000000
Binary files a/src/Mod/CAM/Gui/Resources/gl_simulator/X.png and /dev/null differ
diff --git a/src/Mod/CAM/Gui/Resources/gl_simulator/x.png b/src/Mod/CAM/Gui/Resources/gl_simulator/x.png
new file mode 100644
index 0000000000..45d981d28d
Binary files /dev/null and b/src/Mod/CAM/Gui/Resources/gl_simulator/x.png differ
diff --git a/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.cpp b/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.cpp
index 916be69f25..e92c8fd2f9 100644
--- a/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.cpp
+++ b/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.cpp
@@ -32,17 +32,20 @@
using namespace MillSim;
GuiItem guiItems[] = {
- {eGuiItemSlider, 0, 0, 240, -36, 0},
- {eGuiItemThumb, 0, 0, 328, -50, 1},
+ {eGuiItemSlider, 0, 0, 40, -80, 0},
+ {eGuiItemThumb, 0, 0, 328, -94, 1},
{eGuiItemPause, 0, 0, 40, -50, 'P', true},
{eGuiItemPlay, 0, 0, 40, -50, 'S', false},
{eGuiItemSingleStep, 0, 0, 80, -50, 'T'},
- {eGuiItemFaster, 0, 0, 120, -50, 'F'},
+ {eGuiItemSlower, 0, 0, 125, -50, ' '},
+ {eGuiItemFaster, 0, 0, 170, -50, 'F'},
+ {eGuiItemX, 0, 0, 220, -45, 0, false, 0},
+ {eGuiItem1, 0, 0, 242, -50, 0, false, 0},
+ {eGuiItem5, 0, 0, 242, -50, 0, true, 0},
+ {eGuiItem10, 0, 0, 242, -50, 0, true, 0},
+ {eGuiItem25, 0, 0, 242, -50, 0, true, 0},
+ {eGuiItem50, 0, 0, 242, -50, 0, true, 0},
{eGuiItemRotate, 0, 0, -140, -50, ' ', false, GUIITEM_CHECKABLE},
- {eGuiItemCharXImg, 0, 0, 160, -50, 0, false, 0}, // 620
- {eGuiItemChar0Img, 0, 0, 200, -50, 0, false, 0},
- {eGuiItemChar1Img, 0, 0, 185, -50, 0, false, 0},
- {eGuiItemChar4Img, 0, 0, 180, -50, 0, true, 0},
{eGuiItemPath, 0, 0, -100, -50, 'L', false, GUIITEM_CHECKABLE},
{eGuiItemAmbientOclusion, 0, 0, -60, -50, 'A', false, GUIITEM_CHECKABLE},
{eGuiItemView, 0, 0, -180, -50, 'V', false},
@@ -56,12 +59,15 @@ std::vector guiFileNames = {"Slider.png",
"Pause.png",
"Play.png",
"SingleStep.png",
+ "Slower.png",
"Faster.png",
- "Rotate.png",
- "X.png",
- "0.png",
+ "x.png",
"1.png",
- "4.png",
+ "5.png",
+ "10.png",
+ "25.png",
+ "50.png",
+ "Rotate.png",
"Path.png",
"AmbientOclusion.png",
"View.png"};
@@ -73,8 +79,9 @@ void GuiDisplay::UpdateProjection()
mat4x4_ortho(projmat, 0, gWindowSizeW, gWindowSizeH, 0, -1, 1);
mShader.Activate();
mShader.UpdateProjectionMat(projmat);
- mThumbMaxMotion = guiItems[eGuiItemView].posx() - guiItems[eGuiItemSlider].posx()
- - guiItems[eGuiItemThumb].texItem.w;
+ mThumbMaxMotion = guiItems[eGuiItemAmbientOclusion].posx()
+ + guiItems[eGuiItemAmbientOclusion].texItem.w
+ - guiItems[eGuiItemSlider].posx(); // - guiItems[eGuiItemThumb].texItem.w;
HStretchGlItem(&(guiItems[eGuiItemSlider]), mThumbMaxMotion, 10.0f);
}
@@ -263,8 +270,10 @@ void MillSim::GuiDisplay::SetupTooltips()
QCoreApplication::translate("CAM:Simulator:Tooltips", "Play simulation", nullptr);
guiItems[eGuiItemSingleStep].toolTip =
QCoreApplication::translate("CAM:Simulator:Tooltips", "Single step simulation", nullptr);
+ guiItems[eGuiItemSlower].toolTip =
+ QCoreApplication::translate("CAM:Simulator:Tooltips", "Decrease simulation speed", nullptr);
guiItems[eGuiItemFaster].toolTip =
- QCoreApplication::translate("CAM:Simulator:Tooltips", "Change simulation speed", nullptr);
+ QCoreApplication::translate("CAM:Simulator:Tooltips", "Increase simulation speed", nullptr);
guiItems[eGuiItemPath].toolTip =
QCoreApplication::translate("CAM:Simulator:Tooltips", "Show/Hide tool path", nullptr);
guiItems[eGuiItemRotate].toolTip = QCoreApplication::translate("CAM:Simulator:Tooltips",
@@ -366,9 +375,11 @@ void GuiDisplay::UpdatePlayState(bool isRunning)
void MillSim::GuiDisplay::UpdateSimSpeed(int speed)
{
- guiItems[eGuiItemChar0Img].hidden = speed == 1;
- guiItems[eGuiItemChar1Img].hidden = speed == 40;
- guiItems[eGuiItemChar4Img].hidden = speed != 40;
+ guiItems[eGuiItem1].hidden = speed != 1;
+ guiItems[eGuiItem5].hidden = speed != 5;
+ guiItems[eGuiItem10].hidden = speed != 10;
+ guiItems[eGuiItem25].hidden = speed != 25;
+ guiItems[eGuiItem50].hidden = speed != 50;
}
void MillSim::GuiDisplay::HandleKeyPress(int key)
diff --git a/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.h b/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.h
index 567cb42c38..19e54579a2 100644
--- a/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.h
+++ b/src/Mod/CAM/PathSimulator/AppGL/GuiDisplay.h
@@ -40,12 +40,15 @@ enum eGuiItems
eGuiItemPause,
eGuiItemPlay,
eGuiItemSingleStep,
+ eGuiItemSlower,
eGuiItemFaster,
+ eGuiItemX,
+ eGuiItem1,
+ eGuiItem5,
+ eGuiItem10,
+ eGuiItem25,
+ eGuiItem50,
eGuiItemRotate,
- eGuiItemCharXImg,
- eGuiItemChar0Img,
- eGuiItemChar1Img,
- eGuiItemChar4Img,
eGuiItemPath,
eGuiItemAmbientOclusion,
eGuiItemView,
diff --git a/src/Mod/CAM/PathSimulator/AppGL/MillSimulation.cpp b/src/Mod/CAM/PathSimulator/AppGL/MillSimulation.cpp
index 2a166343eb..74a3a8e4d8 100644
--- a/src/Mod/CAM/PathSimulator/AppGL/MillSimulation.cpp
+++ b/src/Mod/CAM/PathSimulator/AppGL/MillSimulation.cpp
@@ -467,12 +467,15 @@ void MillSimulation::HandleGuiAction(eGuiItems actionItem, bool checked)
mSingleStep = true;
break;
- case eGuiItemFaster:
- if (mSimSpeed == 1) {
+ case eGuiItemSlower:
+ if (mSimSpeed == 50) {
+ mSimSpeed = 25;
+ }
+ else if (mSimSpeed == 25) {
mSimSpeed = 10;
}
else if (mSimSpeed == 10) {
- mSimSpeed = 40;
+ mSimSpeed = 5;
}
else {
mSimSpeed = 1;
@@ -480,6 +483,22 @@ void MillSimulation::HandleGuiAction(eGuiItems actionItem, bool checked)
guiDisplay.UpdateSimSpeed(mSimSpeed);
break;
+ case eGuiItemFaster:
+ if (mSimSpeed == 1) {
+ mSimSpeed = 5;
+ }
+ else if (mSimSpeed == 5) {
+ mSimSpeed = 10;
+ }
+ else if (mSimSpeed == 10) {
+ mSimSpeed = 25;
+ }
+ else {
+ mSimSpeed = 50;
+ }
+ guiDisplay.UpdateSimSpeed(mSimSpeed);
+ break;
+
case eGuiItemPath:
simDisplay.updateDisplay = true;
break;
diff --git a/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp b/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp
index f4f15aef18..46f1f9595b 100644
--- a/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp
+++ b/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp
@@ -25,20 +25,23 @@
using namespace MillSim;
TextureItem texItems[] = {
- {1, 36, 0, 0},
+ {1, 40, 0, 0},
{1, 1, 0, 0},
{70, 1, 0, 0},
{100, 1, 0, 0},
- {134, 1, 0, 0},
- {172, 1, 0, 0},
+ {135, 1, 0, 0},
+ {30, 1, 0, 0},
+ {170, 1, 0, 0},
+ {1, 130, 0, 0},
+ {30, 130, 0, 0},
+ {55, 130, 0, 0},
+ {85, 130, 0, 0},
+ {140, 130, 0, 0},
+ {195, 130, 0, 0},
{210, 1, 0, 0},
- {2, 50, 0, 0},
- {70, 50, 0, 0},
- {27, 50, 0, 0},
- {44, 50, 0, 0},
- {90, 50, 0, 0},
- {128, 50, 0, 0},
- {168, 50, 0, 0},
+ {95, 50, 0, 0},
+ {130, 50, 0, 0},
+ {170, 50, 0, 0},
};