From 33ccea68354db15ed06d8386cdf095ed979c5b66 Mon Sep 17 00:00:00 2001 From: Ryan Kembrey Date: Mon, 7 Jul 2025 00:51:58 +1000 Subject: [PATCH] MeshPart: Update UI strings for consistency Closes: #22372 --- src/Mod/MeshPart/App/AppMeshPart.cpp | 2 +- src/Mod/MeshPart/App/MeshFlattening.cpp | 6 ++--- src/Mod/MeshPart/Gui/AppMeshPartGui.cpp | 2 +- src/Mod/MeshPart/Gui/Command.cpp | 33 ++++++++++++------------- src/Mod/MeshPart/Gui/CrossSections.ui | 8 +++--- src/Mod/MeshPart/Gui/CurveOnMesh.cpp | 4 +-- src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui | 4 +-- src/Mod/MeshPart/Gui/Tessellation.cpp | 8 +++--- src/Mod/MeshPart/Gui/Tessellation.ui | 16 ++++++------ 9 files changed, 41 insertions(+), 42 deletions(-) diff --git a/src/Mod/MeshPart/App/AppMeshPart.cpp b/src/Mod/MeshPart/App/AppMeshPart.cpp index 4c1ea6598e..147d7d6257 100644 --- a/src/Mod/MeshPart/App/AppMeshPart.cpp +++ b/src/Mod/MeshPart/App/AppMeshPart.cpp @@ -44,6 +44,6 @@ PyMOD_INIT_FUNC(MeshPart) PyMOD_Return(nullptr); } PyObject* mod = MeshPart::initModule(); - Base::Console().log("Loading MeshPart module... done\n"); + Base::Console().log("Loading MeshPart module… done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/MeshPart/App/MeshFlattening.cpp b/src/Mod/MeshPart/App/MeshFlattening.cpp index 2834ad5df9..14f0888a01 100644 --- a/src/Mod/MeshPart/App/MeshFlattening.cpp +++ b/src/Mod/MeshPart/App/MeshFlattening.cpp @@ -132,7 +132,7 @@ FaceUnwrapper::FaceUnwrapper(const TopoDS_Face& face) const Handle(Poly_Triangulation) & triangulation = BRep_Tool::Triangulation(face, location); if (triangulation.IsNull()) { - throw std::runtime_error("null triangulation in face construction"); + throw std::runtime_error("Null triangulation in face construction"); } Standard_Integer numNodes = triangulation->NbNodes(); @@ -185,7 +185,7 @@ ColMat FaceUnwrapper::interpolateFlatFace(const TopoDS_Face& face) { if (this->uv_nodes.size() == 0) { throw(std::runtime_error("no uv-coordinates found, interpolating with nurbs is only " - "possible if the Flattener was constructed with a nurbs.")); + "possible if the flattener was constructed with a nurbs.")); } // extract xyz poles, knots, weights, degree @@ -244,7 +244,7 @@ FaceUnwrapper::FaceUnwrapper(ColMat xyz_nodes, ColMat> FaceUnwrapper::getFlatBoundaryNodes() { if (this->ze_nodes.size() == 0) { - throw(std::runtime_error("flat vertices not xet computed")); + throw(std::runtime_error("Flat vertices not yet computed")); } ColMat flat_vertices; diff --git a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp index 827ed1cec1..6426a56e50 100644 --- a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp +++ b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp @@ -74,7 +74,7 @@ PyMOD_INIT_FUNC(MeshPartGui) } PyObject* mod = MeshPartGui::initModule(); - Base::Console().log("Loading GUI of MeshPart module... done\n"); + Base::Console().log("Loading GUI of MeshPart module… done\n"); // clang-format off // instantiating the commands diff --git a/src/Mod/MeshPart/Gui/Command.cpp b/src/Mod/MeshPart/Gui/Command.cpp index a261d71a95..4f3497106c 100644 --- a/src/Mod/MeshPart/Gui/Command.cpp +++ b/src/Mod/MeshPart/Gui/Command.cpp @@ -56,7 +56,8 @@ CmdMeshPartMesher::CmdMeshPartMesher() { sAppModule = "MeshPart"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh from shape..."); + sMenuText = QT_TR_NOOP("Mesh From Shape"); + sToolTipText = QT_TR_NOOP("Tessellate shape"); sWhatsThis = "MeshPart_Mesher"; sStatusTip = sToolTipText; @@ -81,9 +82,9 @@ CmdMeshPartTrimByPlane::CmdMeshPartTrimByPlane() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Trim mesh with a plane"); + sMenuText = QT_TR_NOOP("Trim Mesh"); sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); - sStatusTip = QT_TR_NOOP("Trims a mesh with a plane"); + sStatusTip = sToolTipText; } void CmdMeshPartTrimByPlane::activated(int) @@ -91,17 +92,17 @@ void CmdMeshPartTrimByPlane::activated(int) Base::Type partType = Base::Type::fromName("Part::Plane"); std::vector plane = getSelection().getObjectsOfType(partType); if (plane.empty()) { - QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("MeshPart_TrimByPlane", "Select plane"), - qApp->translate("MeshPart_TrimByPlane", - "Please select a plane at which you trim the mesh.")); + QMessageBox::warning( + Gui::getMainWindow(), + qApp->translate("MeshPart_TrimByPlane", "Select plane"), + qApp->translate("MeshPart_TrimByPlane", "Select a plane to trim the mesh with.")); return; } QMessageBox msgBox(Gui::getMainWindow()); msgBox.setIcon(QMessageBox::Question); msgBox.setWindowTitle(qApp->translate("MeshPart_TrimByPlane", "Trim by plane")); - msgBox.setText(qApp->translate("MeshPart_TrimByPlane", "Select the side you want to keep.")); + msgBox.setText(qApp->translate("MeshPart_TrimByPlane", "Select the side to keep.")); QPushButton* inner = msgBox.addButton(qApp->translate("MeshPart_TrimByPlane", "Below"), QMessageBox::ActionRole); QPushButton* outer = @@ -186,8 +187,8 @@ CmdMeshPartSection::CmdMeshPartSection() { sAppModule = "MeshPart"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create section from mesh and plane"); - sToolTipText = QT_TR_NOOP("Section"); + sMenuText = QT_TR_NOOP("Section"); + sToolTipText = QT_TR_NOOP("Creates a section from a mesh and plane"); sWhatsThis = "MeshPart_Section"; sStatusTip = sToolTipText; } @@ -200,8 +201,7 @@ void CmdMeshPartSection::activated(int) QMessageBox::warning( Gui::getMainWindow(), qApp->translate("MeshPart_Section", "Select plane"), - qApp->translate("MeshPart_Section", - "Please select a plane at which you section the mesh.")); + qApp->translate("MeshPart_Section", "Select a plane to section the mesh with.")); return; } @@ -271,8 +271,8 @@ CmdMeshPartCrossSections::CmdMeshPartCrossSections() { sAppModule = "MeshPart"; sGroup = QT_TR_NOOP("MeshPart"); - sMenuText = QT_TR_NOOP("Cross-sections..."); - sToolTipText = QT_TR_NOOP("Cross-sections"); + sMenuText = QT_TR_NOOP("Cross-Sections"); + sToolTipText = QT_TR_NOOP("Applies cross-sections to the mesh"); sWhatsThis = "MeshPart_CrossSections"; sStatusTip = sToolTipText; // sPixmap = "MeshPart_CrossSections"; @@ -307,9 +307,8 @@ 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 a mesh.\n" - "This command only works with a 'mesh' object."); + sMenuText = QT_TR_NOOP("Curve on Mesh"); + sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh object"); sWhatsThis = "MeshPart_CurveOnMesh"; sStatusTip = sToolTipText; sPixmap = "MeshPart_CurveOnMesh"; diff --git a/src/Mod/MeshPart/Gui/CrossSections.ui b/src/Mod/MeshPart/Gui/CrossSections.ui index b26ac273a6..607d1dbd9d 100644 --- a/src/Mod/MeshPart/Gui/CrossSections.ui +++ b/src/Mod/MeshPart/Gui/CrossSections.ui @@ -11,13 +11,13 @@ - Cross sections + Cross Sections - Guiding plane + Guiding Plane @@ -49,7 +49,7 @@ - Position: + Position @@ -106,7 +106,7 @@ - Distance: + Distance diff --git a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp index 445b21a37a..6e902d8fc5 100644 --- a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp @@ -620,7 +620,7 @@ void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb) } else if (self->d_ptr->mesh != mesh) { Gui::getMainWindow()->statusBar()->showMessage( - tr("Wrong mesh picked")); + tr("Wrong mesh selected")); return; } @@ -659,7 +659,7 @@ void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb) } } else { - Gui::getMainWindow()->statusBar()->showMessage(tr("No point was picked")); + Gui::getMainWindow()->statusBar()->showMessage(tr("No point was selected")); } } else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 diff --git a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui index ddcf02075c..0d98840c2c 100644 --- a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui +++ b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.ui @@ -11,7 +11,7 @@ - Curve on mesh + Curve on Mesh @@ -22,7 +22,7 @@ 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. +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 diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp index 96ec027d2e..c5683905ab 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.cpp +++ b/src/Mod/MeshPart/Gui/Tessellation.cpp @@ -276,14 +276,14 @@ bool Tessellation::accept() QMessageBox::critical( this, windowTitle(), - tr("You have selected a body without tip.\n" - "Either set the tip of the body or select a different shape, please.")); + tr("Error: body without a tip selected.\n" + "Either set the tip of the body or select a different shapee.")); } else if (partWithNoFace) { QMessageBox::critical(this, windowTitle(), - tr("You have selected a shape without faces.\n" - "Select a different shape, please.")); + tr("Error: shape without faces selected.\n" + "Select a different shape.")); } else { QMessageBox::critical(this, windowTitle(), tr("Select a shape for meshing, first.")); diff --git a/src/Mod/MeshPart/Gui/Tessellation.ui b/src/Mod/MeshPart/Gui/Tessellation.ui index 84a781bc0b..a3f74999cd 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.ui +++ b/src/Mod/MeshPart/Gui/Tessellation.ui @@ -17,7 +17,7 @@ - Meshing options + Meshing Options @@ -38,7 +38,7 @@ - Surface deviation: + Surface deviation @@ -64,7 +64,7 @@ - Angular deviation: + Angular deviation @@ -96,7 +96,7 @@ The maximal linear deviation of a mesh segment will be the specified -Surface deviation multiplied by the length of the current mesh segment (edge) +surface deviation multiplied by the length of the current mesh segment (edge) Relative surface deviation @@ -153,7 +153,7 @@ this feature (e.g. the format OBJ). - Maximum edge length: + Maximum edge length true @@ -266,7 +266,7 @@ The smallest value is 0. - Mesh size grading: + Mesh size grading @@ -299,7 +299,7 @@ A value in the range of 0.1-1. - Elements per edge: + Elements per edge @@ -332,7 +332,7 @@ A value in the range of 0.2-10. - Elements per curvature radius: + Elements per curvature radius