From b51c952e4bcf6db1af05e1010b8c3bc6e0d1c2dd Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Mon, 12 Oct 2020 23:54:10 -0500 Subject: [PATCH] Surface, MeshPart: update CurveOnMesh command tooltip and task panel * Add new icon `MeshPart_CurveOnMesh`, which is the same as the `Surface_CurveOnMesh` icon but in green color. The surface icon is used in the Surface Workbench, while the MeshPart version is currently not used. * Make the tooltip of the command shorter; the longer instructions are added in the `TaskCurveOnMesh` task panel. --- src/Mod/MeshPart/Gui/Command.cpp | 12 +- src/Mod/MeshPart/Gui/Resources/MeshPart.qrc | 8 +- .../Resources/icons/MeshPart_CurveOnMesh.svg | 2298 +++++++++++++++++ src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui | 28 +- src/Mod/Surface/Gui/Command.cpp | 11 +- 5 files changed, 2332 insertions(+), 25 deletions(-) create mode 100644 src/Mod/MeshPart/Gui/Resources/icons/MeshPart_CurveOnMesh.svg diff --git a/src/Mod/MeshPart/Gui/Command.cpp b/src/Mod/MeshPart/Gui/Command.cpp index 1c784ce00a..4afe0c7dab 100644 --- a/src/Mod/MeshPart/Gui/Command.cpp +++ b/src/Mod/MeshPart/Gui/Command.cpp @@ -311,17 +311,11 @@ CmdMeshPartCurveOnMesh::CmdMeshPartCurveOnMesh() sAppModule = "MeshPart"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Curve on mesh..."); - sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of the selected mesh.\n" - "Press 'Start', then pick points on the mesh; " - "when enough points have been set,\n" - "right-click and choose 'Create'.\n" - "\n" - "This command only works with a 'mesh' object, " - "not a regular face or surface.\n" - "To convert an object to a mesh " - "use the tools of the Mesh Workbench."); + sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh.\n" + "This command only works with a 'mesh' object."); sWhatsThis = "MeshPart_CurveOnMesh"; sStatusTip = sToolTipText; + sPixmap = "MeshPart_CurveOnMesh"; } void CmdMeshPartCurveOnMesh::activated(int) diff --git a/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc b/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc index f517bc5f16..b28f4cee58 100644 --- a/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc +++ b/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc @@ -1,8 +1,11 @@ - + icons/actions/MeshFace.svg + icons/MeshPart_CurveOnMesh.svg icons/MeshPart_Create_Flat_Face.svg icons/MeshPart_Create_Flat_Mesh.svg + + translations/MeshPart_af.qm translations/MeshPart_de.qm translations/MeshPart_fi.qm @@ -41,4 +44,5 @@ translations/MeshPart_ar.qm translations/MeshPart_vi.qm - + + diff --git a/src/Mod/MeshPart/Gui/Resources/icons/MeshPart_CurveOnMesh.svg b/src/Mod/MeshPart/Gui/Resources/icons/MeshPart_CurveOnMesh.svg new file mode 100644 index 0000000000..9b85ab64b7 --- /dev/null +++ b/src/Mod/MeshPart/Gui/Resources/icons/MeshPart_CurveOnMesh.svg @@ -0,0 +1,2298 @@ + + + MeshPart_CurveOnMesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + MeshPart_CurveOnMesh + 2020-09-30 + + + [vocx] + + + + + CC-BY-SA 4.0 + + + + + FreeCAD + + + FreeCAD/src/Mod/Surface/Gui/Resources/icons/MeshPart_CurveOnMesh.svg + http://www.freecadweb.org/wiki/index.php?title=Artwork + A green curved surface that has a thick, red, highlighted curve on top of it, in the middle of the shape. The surface has mesh lines. It is based on the 'Surface_CurveOnMesh' icon, but on green tone, instead of purple. + + + + + + + + + mesh + curve + spline + middle + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui index 5cc90dcdbe..5eb3c9881a 100644 --- a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui +++ b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui @@ -6,8 +6,8 @@ 0 0 - 343 - 305 + 507 + 637 @@ -15,6 +15,24 @@ + + + + + + Press 'Start', then pick points on the mesh; when enough points have been set, right-click and choose 'Create'. Repeat this process to create more splines. Close this task panel to complete the operation. + +This command only works with a 'mesh' object, not a regular face or surface. To convert an object to a mesh use the tools of the Mesh Workbench. + + + true + + + + + + + Wire @@ -63,7 +81,7 @@ - + Spline Approximation @@ -129,14 +147,14 @@ - + Start - + Qt::Horizontal diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index b942e31508..e710112254 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -198,15 +198,8 @@ CmdSurfaceCurveOnMesh::CmdSurfaceCurveOnMesh() sAppModule = "MeshPart"; sGroup = QT_TR_NOOP("Surface"); sMenuText = QT_TR_NOOP("Curve on mesh..."); - sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of the selected mesh.\n" - "Press 'Start', then pick points on the mesh; " - "when enough points have been set,\n" - "right-click and choose 'Create'.\n" - "\n" - "This command only works with a 'mesh' object, " - "not a regular face or surface.\n" - "To convert an object to a mesh " - "use the tools of the Mesh Workbench."); + sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh.\n" + "This command only works with a 'mesh' object."); sWhatsThis = "Surface_CurveOnMesh"; sStatusTip = sToolTipText; sPixmap = "Surface_CurveOnMesh";