From 6d5d4757ef7f21ec69a40dda2f13c966f3730650 Mon Sep 17 00:00:00 2001 From: Pieter Hijma Date: Fri, 13 Jun 2025 15:32:10 +0200 Subject: [PATCH 001/141] Core: Add undo/redo support to property renaming --- src/App/Document.cpp | 23 ++++++++++++++--- src/App/Document.h | 5 ++++ src/App/DocumentObject.cpp | 10 ++++++++ src/App/DocumentObject.h | 2 ++ src/App/PropertyContainer.h | 2 +- src/App/Transactions.cpp | 51 ++++++++++++++++++++++++++++++++++--- src/App/Transactions.h | 8 ++++++ 7 files changed, 94 insertions(+), 7 deletions(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 57458dd9fd..4c813d5567 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -262,8 +262,9 @@ bool Document::redo(const int id) return false; } -void Document::addOrRemovePropertyOfObject(TransactionalObject* obj, - const Property* prop, const bool add) +void Document::changePropertyOfObject(TransactionalObject* obj, + const Property* prop, + const std::function& changeFunc) { if (!prop || !obj || !obj->isAttachedToDocument()) { return; @@ -278,10 +279,26 @@ void Document::addOrRemovePropertyOfObject(TransactionalObject* obj, } } if (d->activeUndoTransaction && !d->rollback) { - d->activeUndoTransaction->addOrRemoveProperty(obj, prop, add); + changeFunc(); } } +void Document::renamePropertyOfObject(TransactionalObject* obj, + const Property* prop, const char* oldName) +{ + changePropertyOfObject(obj, prop, [this, obj, prop, oldName]() { + d->activeUndoTransaction->renameProperty(obj, prop, oldName); + }); +} + +void Document::addOrRemovePropertyOfObject(TransactionalObject* obj, + const Property* prop, const bool add) +{ + changePropertyOfObject(obj, prop, [this, obj, prop, add]() { + d->activeUndoTransaction->addOrRemoveProperty(obj, prop, add); + }); +} + bool Document::isPerformingTransaction() const { return d->undoing || d->rollback; diff --git a/src/App/Document.h b/src/App/Document.h index 53308379c1..e15978cd1c 100644 --- a/src/App/Document.h +++ b/src/App/Document.h @@ -518,6 +518,7 @@ public: bool isPerformingTransaction() const; /// \internal add or remove property from a transactional object void addOrRemovePropertyOfObject(TransactionalObject*, const Property* prop, bool add); + void renamePropertyOfObject(TransactionalObject*, const Property* prop, const char* newName); //@} /** @name dependency stuff */ @@ -699,6 +700,10 @@ protected: /// Internally called by Application to abort the running transaction. void _abortTransaction(); +private: + void changePropertyOfObject(TransactionalObject* obj, const Property* prop, + const std::function& changeFunc); + private: // # Data Member of the document // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index daa1e4fe6c..b21509cbe0 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -712,6 +712,16 @@ bool DocumentObject::removeDynamicProperty(const char* name) return TransactionalObject::removeDynamicProperty(name); } +bool DocumentObject::renameDynamicProperty(Property* prop, const char* name) +{ + std::string oldName = prop->getName(); + bool renamed = TransactionalObject::renameDynamicProperty(prop, name); + if (renamed && _pDoc) { + _pDoc->renamePropertyOfObject(this, prop, oldName.c_str()); + } + return renamed; +} + App::Property* DocumentObject::addDynamicProperty(const char* type, const char* name, const char* group, diff --git a/src/App/DocumentObject.h b/src/App/DocumentObject.h index 6eefea054a..76e100591e 100644 --- a/src/App/DocumentObject.h +++ b/src/App/DocumentObject.h @@ -568,6 +568,8 @@ public: bool removeDynamicProperty(const char* prop) override; + bool renameDynamicProperty(Property *prop, const char *name) override; + App::Property* addDynamicProperty(const char* type, const char* name = nullptr, const char* group = nullptr, diff --git a/src/App/PropertyContainer.h b/src/App/PropertyContainer.h index c673c0b500..0404b886fa 100644 --- a/src/App/PropertyContainer.h +++ b/src/App/PropertyContainer.h @@ -548,7 +548,7 @@ public: * @return `true` if the property was renamed; `false` otherwise. * @throw Base::NameError If the new name is invalid or already exists. */ - bool renameDynamicProperty(Property *prop, const char *name) { + virtual bool renameDynamicProperty(Property *prop, const char *name) { return dynamicProps.renameDynamicProperty(prop,name); } diff --git a/src/App/Transactions.cpp b/src/App/Transactions.cpp index af83c79d9b..ba96d7c3ea 100644 --- a/src/App/Transactions.cpp +++ b/src/App/Transactions.cpp @@ -148,7 +148,8 @@ bool Transaction::hasObject(const TransactionalObject* Obj) const #endif } -void Transaction::addOrRemoveProperty(TransactionalObject* Obj, const Property* pcProp, bool add) +void Transaction::changeProperty(TransactionalObject* Obj, + std::function changeFunc) { auto& index = _Objects.get<1>(); auto pos = index.find(Obj); @@ -164,7 +165,21 @@ void Transaction::addOrRemoveProperty(TransactionalObject* Obj, const Property* index.emplace(Obj, To); } - To->addOrRemoveProperty(pcProp, add); + changeFunc(To); +} + +void Transaction::renameProperty(TransactionalObject* Obj, const Property* pcProp, const char* oldName) +{ + changeProperty(Obj, [pcProp, oldName](TransactionObject* to) { + to->renameProperty(pcProp, oldName); + }); +} + +void Transaction::addOrRemoveProperty(TransactionalObject* Obj, const Property* pcProp, bool add) +{ + changeProperty(Obj, [pcProp, add](TransactionObject* to) { + to->addOrRemoveProperty(pcProp, add); + }); } //************************************************************************** @@ -294,7 +309,13 @@ TransactionObject::TransactionObject() = default; TransactionObject::~TransactionObject() { for (auto& v : _PropChangeMap) { - delete v.second.property; + auto& data = v.second; + // If nameOrig is used, it means it is a transaction of a rename + // operation. This operation does not interact with v.second.property, + // so it should not be deleted in that case. + if (data.nameOrig.empty()) { + delete v.second.property; + } } } @@ -312,6 +333,15 @@ void TransactionObject::applyChn(Document& /*Doc*/, TransactionalObject* pcObj, auto& data = v.second; auto prop = const_cast(data.propertyOrig); + if (!data.nameOrig.empty()) { + // This means we are undoing/redoing a rename operation + Property* currentProp = pcObj->getDynamicPropertyByName(data.name.c_str()); + if (currentProp) { + pcObj->renameDynamicProperty(currentProp, data.nameOrig.c_str()); + } + continue; + } + if (!data.property) { // here means we are undoing/redoing and property add operation pcObj->removeDynamicProperty(v.second.name.c_str()); @@ -393,6 +423,21 @@ void TransactionObject::setProperty(const Property* pcProp) } } +void TransactionObject::renameProperty(const Property* pcProp, const char* oldName) +{ + if (!pcProp || !pcProp->getContainer()) { + return; + } + + auto& data = _PropChangeMap[pcProp->getID()]; + + if (data.name.empty()) { + static_cast(data) = + pcProp->getContainer()->getDynamicPropertyData(pcProp); + } + data.nameOrig = oldName; +} + void TransactionObject::addOrRemoveProperty(const Property* pcProp, bool add) { (void)add; diff --git a/src/App/Transactions.h b/src/App/Transactions.h index 494f59d162..eb57f2f888 100644 --- a/src/App/Transactions.h +++ b/src/App/Transactions.h @@ -81,12 +81,17 @@ public: bool isEmpty() const; /// check if this object is used in a transaction bool hasObject(const TransactionalObject* Obj) const; + void renameProperty(TransactionalObject* Obj, const Property* pcProp, const char* oldName); void addOrRemoveProperty(TransactionalObject* Obj, const Property* pcProp, bool add); void addObjectNew(TransactionalObject* Obj); void addObjectDel(const TransactionalObject* Obj); void addObjectChange(const TransactionalObject* Obj, const Property* Prop); +private: + void changeProperty(TransactionalObject* Obj, + std::function changeFunc); + private: int transID; using Info = std::pair; @@ -115,6 +120,7 @@ public: virtual void applyChn(Document& Doc, TransactionalObject* pcObj, bool Forward); void setProperty(const Property* pcProp); + void renameProperty(const Property* pcProp, const char* newName); void addOrRemoveProperty(const Property* pcProp, bool add); unsigned int getMemSize() const override; @@ -136,6 +142,8 @@ protected: { Base::Type propertyType; const Property* propertyOrig = nullptr; + // for property renaming + std::string nameOrig; }; std::unordered_map _PropChangeMap; From c373c437ad2d60e40e29ce02c24bb63f45389e8f Mon Sep 17 00:00:00 2001 From: Pieter Hijma Date: Fri, 13 Jun 2025 15:34:53 +0200 Subject: [PATCH 002/141] Core: Add tests for undo/redo property rename --- tests/src/App/Property.cpp | 72 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/tests/src/App/Property.cpp b/tests/src/App/Property.cpp index 04f3aa8e42..7333909544 100644 --- a/tests/src/App/Property.cpp +++ b/tests/src/App/Property.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -313,3 +314,74 @@ TEST_F(RenameProperty, updateExpressionDifferentDocument) EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), prop); EXPECT_EQ(prop2->getValue(), Value); } + +// Tests whether we can rename a property and undo it +TEST_F(RenameProperty, undoRenameProperty) +{ + // Arrange + _doc->setUndoMode(1); + + // Act + bool isRenamed = false; + { + App::AutoTransaction transaction("Rename Property"); + isRenamed = varSet->renameDynamicProperty(prop, "NewName"); + } + + // Assert + EXPECT_TRUE(isRenamed); + EXPECT_STREQ(varSet->getPropertyName(prop), "NewName"); + EXPECT_EQ(prop->getValue(), Value); + EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), nullptr); + EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), prop); + + // Act: Undo the rename + bool undone = _doc->undo(); + + // Assert: The property should be back to its original name and value + EXPECT_TRUE(undone); + EXPECT_STREQ(varSet->getPropertyName(prop), "Variable"); + EXPECT_EQ(prop->getValue(), Value); + EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), prop); + EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), nullptr); +} + + +// Tests whether we can rename a property, undo, and redo it +TEST_F(RenameProperty, redoRenameProperty) +{ + // Arrange + _doc->setUndoMode(1); + + // Act + bool isRenamed = false; + { + App::AutoTransaction transaction("Rename Property"); + isRenamed = varSet->renameDynamicProperty(prop, "NewName"); + } + + // Assert + EXPECT_TRUE(isRenamed); + EXPECT_STREQ(varSet->getPropertyName(prop), "NewName"); + EXPECT_EQ(prop->getValue(), Value); + EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), nullptr); + EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), prop); + + // Act: Undo the rename + bool undone = _doc->undo(); + + // Assert: The property should be back to its original name and value + EXPECT_TRUE(undone); + EXPECT_STREQ(varSet->getPropertyName(prop), "Variable"); + EXPECT_EQ(prop->getValue(), Value); + EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), prop); + EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), nullptr); + + // Act: Redo the rename + bool redone = _doc->redo(); + EXPECT_TRUE(redone); + EXPECT_STREQ(varSet->getPropertyName(prop), "NewName"); + EXPECT_EQ(prop->getValue(), Value); + EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), nullptr); + EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), prop); +} From b381439e4398a1aff419ab09b7148139b7e17fc0 Mon Sep 17 00:00:00 2001 From: tarman3 Date: Wed, 18 Jun 2025 09:42:56 +0300 Subject: [PATCH 003/141] CAM: Dressup Tag some fixes --- src/Mod/CAM/Path/Dressup/Gui/Tags.py | 6 +++--- src/Mod/CAM/Path/Dressup/Tags.py | 25 +++++++++---------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/Mod/CAM/Path/Dressup/Gui/Tags.py b/src/Mod/CAM/Path/Dressup/Gui/Tags.py index 6aaad766d8..141c510352 100644 --- a/src/Mod/CAM/Path/Dressup/Gui/Tags.py +++ b/src/Mod/CAM/Path/Dressup/Gui/Tags.py @@ -28,7 +28,6 @@ import FreeCADGui import Path import Path.Base.Gui.GetPoint as PathGetPoint import Path.Dressup.Tags as PathDressupTag -import PathGui import PathScripts.PathUtils as PathUtils @@ -63,6 +62,7 @@ class PathDressupTagTaskPanel: self.jvoVisible = self.jvo.isVisible() if self.jvoVisible: self.jvo.hide() + self.obj.ViewObject.show() else: self.jvoVisible = jvoVisibility self.pt = FreeCAD.Vector(0, 0, 0) @@ -452,7 +452,7 @@ class PathDressupTagViewProvider: tags = [] for i, p in enumerate(positions): tag = HoldingTagMarker(self.obj.Proxy.pointAtBottom(self.obj, p), self.colors) - tag.setEnabled(not i in disabled) + tag.setEnabled(i not in disabled) tags.append(tag) self.switch.addChild(tag.sep) self.tags = tags @@ -524,7 +524,7 @@ class PathDressupTagViewProvider: def addSelection(self, doc, obj, sub, point): Path.Log.track(doc, obj, sub, point) - if self.panel: + if hasattr(self, "panel") and self.panel: i = self.tagAtPoint(point, sub is None) self.panel.selectTagWithId(i) FreeCADGui.updateGui() diff --git a/src/Mod/CAM/Path/Dressup/Tags.py b/src/Mod/CAM/Path/Dressup/Tags.py index dfab7a98eb..891cca86a6 100644 --- a/src/Mod/CAM/Path/Dressup/Tags.py +++ b/src/Mod/CAM/Path/Dressup/Tags.py @@ -49,7 +49,7 @@ def debugEdge(edge, prefix, force=False): if force or Path.Log.getLevel(Path.Log.thisModule()) == Path.Log.Level.DEBUG: pf = edge.valueAt(edge.FirstParameter) pl = edge.valueAt(edge.LastParameter) - if type(edge.Curve) == Part.Line or type(edge.Curve) == Part.LineSegment: + if type(edge.Curve) in [Part.Line, Part.LineSegment]: print( "%s %s((%.2f, %.2f, %.2f) - (%.2f, %.2f, %.2f))" % (prefix, type(edge.Curve), pf.x, pf.y, pf.z, pl.x, pl.y, pl.z) @@ -197,17 +197,13 @@ class Tag: self.solid = self.solid.makeFillet(radius, [self.solid.Edges[0]]) def filterIntersections(self, pts, face): - if ( - type(face.Surface) == Part.Cone - or type(face.Surface) == Part.Cylinder - or type(face.Surface) == Part.Toroid - ): + if type(face.Surface) in [Part.Cone, Part.Cylinder, Part.Toroid]: Path.Log.track("it's a cone/cylinder, checking z") return list([pt for pt in pts if pt.z >= self.bottom() and pt.z <= self.top()]) - if type(face.Surface) == Part.Plane: + if type(face.Surface) is Part.Plane: Path.Log.track("it's a plane, checking R") c = face.Edges[0].Curve - if type(c) == Part.Circle: + if type(c) is Part.Circle: return list( [ pt @@ -457,13 +453,13 @@ class MapWireToTag: break elif Path.Geom.pointsCoincide(p2, p0): flipped = Path.Geom.flipEdge(e) - if not flipped is None: + if flipped is not None: outputEdges.append((flipped, True)) else: p0 = None cnt = 0 for p in reversed(e.discretize(Deflection=0.01)): - if not p0 is None: + if p0 is not None: outputEdges.append((Part.Edge(Part.LineSegment(p0, p)), True)) cnt = cnt + 1 p0 = p @@ -623,7 +619,7 @@ class _RapidEdges: self.rapid = rapid def isRapid(self, edge): - if type(edge.Curve) == Part.Line or type(edge.Curve) == Part.LineSegment: + if type(edge.Curve) in [Part.Line, Part.LineSegment]: v0 = edge.Vertexes[0] v1 = edge.Vertexes[1] for r in self.rapid: @@ -790,7 +786,7 @@ class PathData: j = 0 for i, pos in enumerate(fromObj.Positions): print("tag[%d]" % i) - if not i in fromObj.Disabled: + if i not in fromObj.Disabled: dist = self.baseWire.distToShape( Part.Vertex(FreeCAD.Vector(pos.x, pos.y, self.minZ)) ) @@ -1038,9 +1034,7 @@ class ObjectTagDressup: commands = [] lastEdge = 0 lastTag = 0 - # sameTag = None t = 0 - # inters = None edge = None segm = 50 @@ -1065,7 +1059,6 @@ class ObjectTagDressup: edge = pathData.edges[lastEdge] debugEdge(edge, "======= new edge: %d/%d" % (lastEdge, len(pathData.edges))) lastEdge += 1 - # sameTag = None if mapper: mapper.add(edge) @@ -1136,7 +1129,7 @@ class ObjectTagDressup: obj.Height.Value, obj.Angle, obj.Radius, - not i in disabledIn, + i not in disabledIn, ) tag.createSolidsAt(self.pathData.minZ, self.toolRadius) rawTags.append(tag) From 37b0d12e83970337feb63662dbabc20ed0939375 Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Mon, 23 Jun 2025 19:25:51 +0200 Subject: [PATCH 004/141] Part: Remove use of adjustCameraPosition() --- src/Mod/Part/Gui/Command.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index efe07d270c..bed30dac11 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -1635,9 +1635,7 @@ void CmdPartOffset::activated(int iMsg) updateActive(); doCommand(Gui,"Gui.ActiveDocument.setEdit('%s')",offset.c_str()); - - adjustCameraPosition(); - + copyVisual(offset.c_str(), "ShapeAppearance", shape->getNameInDocument()); copyVisual(offset.c_str(), "LineColor" , shape->getNameInDocument()); copyVisual(offset.c_str(), "PointColor", shape->getNameInDocument()); @@ -1692,7 +1690,6 @@ void CmdPartOffset2D::activated(int iMsg) doCommand(Doc,"App.ActiveDocument.%s.Value = 1.0",offset.c_str()); updateActive(); doCommand(Gui,"Gui.ActiveDocument.setEdit('%s')",offset.c_str()); - adjustCameraPosition(); copyVisual(offset.c_str(), "ShapeAppearance", shape->getNameInDocument()); copyVisual(offset.c_str(), "LineColor" , shape->getNameInDocument()); @@ -1876,7 +1873,6 @@ void CmdPartThickness::activated(int iMsg) obj->getDocument()->getName(), obj->getNameInDocument()); } doCommand(Gui,"Gui.ActiveDocument.setEdit('%s')",thick.c_str()); - adjustCameraPosition(); copyVisual(thick.c_str(), "ShapeAppearance", obj->getNameInDocument()); copyVisual(thick.c_str(), "LineColor" , obj->getNameInDocument()); From 7a49335cad75a08ce671b21cd057f3df861eaff5 Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Mon, 23 Jun 2025 19:28:56 +0200 Subject: [PATCH 005/141] PartDesign: Remove use of adjustCameraPosition() --- src/Mod/PartDesign/Gui/Command.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 400fc4269e..aa8ebd3ad9 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -1075,7 +1075,6 @@ void prepareProfileBased(Gui::Command* cmd, const std::string& which, double len } finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, cmd, which, worker); @@ -1172,7 +1171,6 @@ void CmdPartDesignHole::activated(int iMsg) return; finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "Hole", worker); @@ -1228,7 +1226,6 @@ void CmdPartDesignRevolution::activated(int iMsg) FCMD_OBJ_CMD(Feat,"Reversed = 1"); finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "Revolution", worker); @@ -1292,7 +1289,6 @@ void CmdPartDesignGroove::activated(int iMsg) } finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "Groove", worker); @@ -1339,7 +1335,6 @@ void CmdPartDesignAdditivePipe::activated(int iMsg) Gui::Command::updateActive(); finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "AdditivePipe", worker); @@ -1387,7 +1382,6 @@ void CmdPartDesignSubtractivePipe::activated(int iMsg) Gui::Command::updateActive(); finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "SubtractivePipe", worker); @@ -1435,7 +1429,6 @@ void CmdPartDesignAdditiveLoft::activated(int iMsg) Gui::Command::updateActive(); finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "AdditiveLoft", worker); @@ -1483,7 +1476,6 @@ void CmdPartDesignSubtractiveLoft::activated(int iMsg) Gui::Command::updateActive(); finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "SubtractiveLoft", worker); @@ -1555,8 +1547,6 @@ void CmdPartDesignAdditiveHelix::activated(int iMsg) view->makeTemporaryVisible(true); } } - - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "AdditiveHelix", worker); @@ -1611,7 +1601,6 @@ void CmdPartDesignSubtractiveHelix::activated(int iMsg) } finishProfileBased(cmd, sketch, Feat); - cmd->adjustCameraPosition(); }; prepareProfileBased(pcActiveBody, this, "SubtractiveHelix", worker); From a2dc39a5bc6752f3b28094090561dba16f65eba3 Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Mon, 23 Jun 2025 19:29:11 +0200 Subject: [PATCH 006/141] Gui: Remove adjustCameraPosition() --- src/Gui/Command.cpp | 41 ----------------------------------------- src/Gui/Command.h | 5 ----- 2 files changed, 46 deletions(-) diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 0bc31de89c..c7a830945c 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -916,47 +916,6 @@ const char* Command::keySequenceToAccel(int sk) const return (strings[sk] = static_cast(data)).c_str(); } -void Command::adjustCameraPosition() -{ - Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if (doc) { - auto view = static_cast(doc->getActiveView()); - Gui::View3DInventorViewer* viewer = view->getViewer(); - SoCamera* camera = viewer->getSoRenderManager()->getCamera(); - if (!camera || !camera->isOfType(SoOrthographicCamera::getClassTypeId())) - return; - - // get scene bounding box - SoGetBoundingBoxAction action(viewer->getSoRenderManager()->getViewportRegion()); - action.apply(viewer->getSceneGraph()); - SbBox3f box = action.getBoundingBox(); - if (box.isEmpty()) - return; - - // get cirumscribing sphere and check if camera is inside - SbVec3f cam_pos = camera->position.getValue(); - SbVec3f box_cnt = box.getCenter(); - SbSphere bs; - bs.circumscribe(box); - float radius = bs.getRadius(); - float distance_to_midpoint = (box_cnt-cam_pos).length(); - if (radius >= distance_to_midpoint) { - // Move the camera to the edge of the bounding sphere, while still - // pointing at the scene. - SbVec3f direction = cam_pos - box_cnt; - (void) direction.normalize(); // we know this is not a null vector - camera->position.setValue(box_cnt + direction * radius); - - // New distance to mid point - distance_to_midpoint = - (camera->position.getValue() - box.getCenter()).length(); - camera->nearDistance = distance_to_midpoint - radius; - camera->farDistance = distance_to_midpoint + radius; - camera->focalDistance = distance_to_midpoint; - } - } -} - void Command::printConflictingAccelerators() const { auto cmd = Application::Instance->commandManager().checkAcceleratorForConflicts(sAccel, this); diff --git a/src/Gui/Command.h b/src/Gui/Command.h index 50809a8f45..db158d0596 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -575,11 +575,6 @@ public: /// Obtain the current shortcut of this command virtual QString getShortcut() const; - /** @name arbitrary helper methods */ - //@{ - void adjustCameraPosition(); - //@} - /// Helper class to disable python console log class LogDisabler { public: From 7da60d20f11e26e4438a9981dc2c1d970161c504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Sat, 28 Sep 2024 21:36:34 +0200 Subject: [PATCH 007/141] BIM: Use labels in DAE export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gaël Écorchard --- src/Mod/BIM/importers/importDAE.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Mod/BIM/importers/importDAE.py b/src/Mod/BIM/importers/importDAE.py index 6ab0e76da3..0e383b7d04 100644 --- a/src/Mod/BIM/importers/importDAE.py +++ b/src/Mod/BIM/importers/importDAE.py @@ -34,6 +34,7 @@ __url__ = "https://www.freecad.org" import os from typing import Optional +from xml.sax.saxutils import escape as sax_escape import numpy as np @@ -56,6 +57,17 @@ else: DEBUG = True +def xml_escape(text: str, entities: dict[str, str] = None) -> str: + """Escape text for XML. + + This is a wrapper around xml.sax.saxutils.escape that replaces also + `"` with `"` by default. + """ + if entities is None: + entities = {'"': """} + return sax_escape(text, entities=entities) + + def check_collada_import() -> bool: """Return True if the `collada` module is available. @@ -207,12 +219,13 @@ def export( author = FreeCAD.ActiveDocument.CreatedBy except UnicodeEncodeError: author = FreeCAD.ActiveDocument.CreatedBy.encode("utf8") - author = author.replace("<", "") - author = author.replace(">", "") + author = xml_escape(author) col_contributor.author = author ver = FreeCAD.Version() appli = f"FreeCAD v{ver[0]}.{ver[1]} build {ver[2]}" col_contributor.authoring_tool = appli + # Bug in collada from 0.4 to 0.9, contributors are not written to file. + # Set it anyway for future versions. col_mesh.assetInfo.contributors.append(col_contributor) col_mesh.assetInfo.unitname = "meter" col_mesh.assetInfo.unitmeter = 1.0 @@ -269,7 +282,7 @@ def export( geom = collada.geometry.Geometry( collada=col_mesh, id=f"geometry{obj_ind}", - name=obj.Name, + name=xml_escape(obj.Label), sourcebyid=[vert_src, normal_src], ) input_list = collada.source.InputList() From b13ac833c5ab5e0eb0f24d20e2252042172ecfc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Thu, 9 Jan 2025 10:39:39 +0100 Subject: [PATCH 008/141] BIM: improve style of importDAE.py --- src/Mod/BIM/importers/importDAE.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Mod/BIM/importers/importDAE.py b/src/Mod/BIM/importers/importDAE.py index 0e383b7d04..fcb3324769 100644 --- a/src/Mod/BIM/importers/importDAE.py +++ b/src/Mod/BIM/importers/importDAE.py @@ -68,26 +68,23 @@ def xml_escape(text: str, entities: dict[str, str] = None) -> str: return sax_escape(text, entities=entities) -def check_collada_import() -> bool: +def import_collada() -> bool: """Return True if the `collada` module is available. Also imports the module. """ - global collada try: import collada except ImportError: FreeCAD.Console.PrintError(translate("BIM", "pycollada not found, collada support is disabled.") + "\n") return False - else: - return True + return True def triangulate(shape): """Triangulate the given shape.""" - mesher = params.get_param_arch("ColladaMesher") tessellation = params.get_param_arch("ColladaTessellation") grading = params.get_param_arch("ColladaGrading") @@ -114,8 +111,7 @@ def triangulate(shape): def open(filename): """Called when FreeCAD wants to open a file.""" - - if not check_collada_import(): + if not import_collada(): return docname = os.path.splitext(os.path.basename(filename))[0] doc = FreeCAD.newDocument(docname) @@ -127,8 +123,7 @@ def open(filename): def insert(filename, docname): """Called when FreeCAD wants to import a file.""" - - if not check_collada_import(): + if not import_collada(): return try: doc = FreeCAD.getDocument(docname) @@ -141,10 +136,9 @@ def insert(filename, docname): def read(filename): """Read a DAE file.""" - col = collada.Collada(filename, ignore=[collada.common.DaeUnsupportedError]) # Read the unitmeter info from DAE file and compute unit to convert to mm. - unitmeter = col.assetInfo.unitmeter or 1 + unitmeter = col.assetInfo.unitmeter or 1.0 unit = unitmeter / 0.001 # for geom in col.geometries: # for geom in col.scene.objects("geometry"): @@ -203,8 +197,7 @@ def export( mode if you want to be able to export colors. """ - - if not check_collada_import(): + if not import_collada(): return if colors is None: colors = {} @@ -340,7 +333,7 @@ def export( ) col_mesh.effects.append(effect) col_mesh.materials.append(mat) - mat_ref = "ref_" + obj.Name + mat_ref = f"ref_{obj.Name}" mat_node = collada.scene.MaterialNode( symbol=mat_ref, target=mat, From 6ea5891de6db4c46ca02636fc69f47f4cb5ffd9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Fri, 20 Jun 2025 13:28:52 +0200 Subject: [PATCH 009/141] BIM: remove unused variable `DEBUG` --- src/Mod/BIM/importers/importDAE.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Mod/BIM/importers/importDAE.py b/src/Mod/BIM/importers/importDAE.py index fcb3324769..9ef0c73e0f 100644 --- a/src/Mod/BIM/importers/importDAE.py +++ b/src/Mod/BIM/importers/importDAE.py @@ -54,9 +54,6 @@ else: return text # \endcond -DEBUG = True - - def xml_escape(text: str, entities: dict[str, str] = None) -> str: """Escape text for XML. From 1c13623a06482e9aca4f5745eacb8e47adc27d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Tue, 24 Jun 2025 11:02:08 +0200 Subject: [PATCH 010/141] BIM: fix geometry under node tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I took the file [link_3.dae](https://github.com/ros-industrial/kuka_experimental/blob/514790a553d556f7c58f0f34a4d29a71eca126e7/kuka_kr210_support/meshes/kr210l150/visual/link_3.dae) as test. Before this commit, no geometry is loaded because the childer of `node` are `Node` instances not geometry. To access all the geometries, `col.scene.objects("geometry")` is used, cf. https://pycollada.readthedocs.io/en/latest/structure.html. Signed-off-by: Gaël Écorchard --- src/Mod/BIM/importers/importDAE.py | 96 ++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/src/Mod/BIM/importers/importDAE.py b/src/Mod/BIM/importers/importDAE.py index 9ef0c73e0f..07a16b70ad 100644 --- a/src/Mod/BIM/importers/importDAE.py +++ b/src/Mod/BIM/importers/importDAE.py @@ -133,49 +133,83 @@ def insert(filename, docname): def read(filename): """Read a DAE file.""" + doc = FreeCAD.activeDocument() + if not doc: + return col = collada.Collada(filename, ignore=[collada.common.DaeUnsupportedError]) # Read the unitmeter info from DAE file and compute unit to convert to mm. - unitmeter = col.assetInfo.unitmeter or 1.0 - unit = unitmeter / 0.001 - # for geom in col.geometries: - # for geom in col.scene.objects("geometry"): - for node in col.scene.nodes: - for child in node.children: - if not isinstance(child, collada.scene.GeometryNode): + unit_meter = col.assetInfo.unitmeter or 1.0 + unit = unit_meter / 0.001 + bound_geom: collada.geometry.BoundGeometry + # Implementation note: there's also `col.geometries` but when using them, + # the materials are string and Gaël didn't find a way to get the material + # node from this string. + for bound_geom in col.scene.objects('geometry'): + prim: collada.primitive.BoundPrimitive + for prim in bound_geom.primitives(): + if not isinstance(prim, collada.triangleset.BoundTriangleSet): + # e.g. a BoundLineSet, which is not supported yet. continue - geom: collada.scenes.GeometryNode = child.geometry - mat_symbols: list[str] = [m.symbol for m in child.materials] - for prim in geom.primitives: - meshdata = [] - for tri in prim: - # tri.vertices is a numpy array. - meshdata.append((tri.vertices * unit).tolist()) - mesh = Mesh.Mesh(meshdata) - try: - name = geom.name - except AttributeError: - name = geom.id - obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", name) + # Get the materials and associated vertices. + meshes: dict[collada.scene.MaterialNode, list] = {} + tri: collada.triangleset.Triangle + for tri in prim: + material_node: collada.material.Material = tri.material + if material_node not in meshes: + # Not yet in the dict, create a new entry. + meshes[material_node] = [] + if len(tri.vertices) != 3: + msg = ( + f"Warning: triangle with {len(tri.vertices)} vertices found" + f" in {bound_geom.original.name}, expected 3. Skipping this triangle." + ) + FreeCAD.Console.PrintWarning(msg + "\n") + continue + # tri.vertices is a numpy array. + meshes[material_node].append((tri.vertices * unit).tolist()) + # Create a mesh for each material node. + for material_node, vertices in meshes.items(): + mesh = Mesh.Mesh(vertices) + name = bound_geom.original.name + if not name: + name = bound_geom.original.id + obj = doc.addObject("Mesh::Feature", name) obj.Label = name obj.Mesh = mesh + if not material_node: + continue if FreeCAD.GuiUp: - try: - mat_index = mat_symbols.index(prim.material) - material = child.materials[mat_index].target - color = material.effect.diffuse - obj.ViewObject.ShapeColor = color - except ValueError: - # Material not found. - pass - except TypeError: - # color is not a tuple but a texture. - pass + fc_mat = FreeCAD.Material() + # We do not import transparency because it is often set + # wrongly (transparency mistaken for opacity). + # TODO: Ask whether to import transparency. + field_map = { + "ambient": "AmbientColor", + "diffuse": "DiffuseColor", + "emission": "EmissiveColor", + "specular": "SpecularColor", + "shininess": "Shininess", + # "transparency": "Transparency", + } + for col_field, fc_field in field_map.items(): + try: + # Implementation note: using floats, so values must + # be within [0, 1]. OK. + setattr(fc_mat, fc_field, getattr(material_node.effect, col_field)) + except ValueError: + pass + except TypeError: + # color is not a tuple but a texture. + pass + obj.ViewObject.ShapeAppearance = (fc_mat,) # Print the errors that occurred during reading. if col.errors: FreeCAD.Console.PrintWarning(translate("BIM", "File was read but some errors occurred:") + "\n") for e in col.errors: FreeCAD.Console.PrintWarning(str(e) + "\n") + if FreeCAD.GuiUp: + FreeCAD.Gui.SendMsgToActiveView("ViewFit") def export( From 822999ba93ecac06db16d8481170caabc06f671c Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:30:46 +0200 Subject: [PATCH 011/141] Update ImageBuilder.py --- src/Mod/CAM/Path/Main/Sanity/ImageBuilder.py | 30 +++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Mod/CAM/Path/Main/Sanity/ImageBuilder.py b/src/Mod/CAM/Path/Main/Sanity/ImageBuilder.py index 7fef4ae885..c023c887d0 100644 --- a/src/Mod/CAM/Path/Main/Sanity/ImageBuilder.py +++ b/src/Mod/CAM/Path/Main/Sanity/ImageBuilder.py @@ -88,17 +88,17 @@ class GuiImageBuilder(ImageBuilder): def prepare_view(self, obj): # Create a new view Path.Log.debug("CAM - Preparing view\n") - FreeCADGui.runCommand("Std_ViewCreate", 0) - # Get the activeview and configure it - aview = FreeCADGui.ActiveDocument.ActiveView - aview.setAnimationEnabled(False) - aview.viewIsometric() - - FreeCADGui.SendMsgToActiveView("PerspectiveCamera") - - # resize the window mw = FreeCADGui.getMainWindow() + num_windows = len(mw.getWindows()) + + # Create and configure the view + view = FreeCADGui.ActiveDocument.createView("Gui::View3DInventor") + view.setAnimationEnabled(False) + view.viewIsometric() + view.setCameraType("Perspective") + + # Resize the window mdi = mw.findChild(QtGui.QMdiArea) view_window = mdi.activeSubWindow() view_window.resize(500, 500) @@ -109,17 +109,19 @@ class GuiImageBuilder(ImageBuilder): self.record_visibility() obj.Visibility = True + # Return the index of the new window (= old number of windows) + return num_windows + def record_visibility(self): self.visible = [o for o in self.doc.Document.Objects if o.Visibility] for o in self.doc.Document.Objects: o.Visibility = False - def destroy_view(self): + def destroy_view(self, idx): Path.Log.debug("CAM - destroying view\n") mw = FreeCADGui.getMainWindow() windows = mw.getWindows() - toRemove = windows[1] - mw.removeWindow(toRemove) + mw.removeWindow(windows[idx]) def restore_visibility(self): Path.Log.debug("CAM - Restoring visibility\n") @@ -134,10 +136,10 @@ class GuiImageBuilder(ImageBuilder): file_path = os.path.join(self.file_path, image_name) - self.prepare_view(obj) + idx = self.prepare_view(obj) self.capture_image(file_path) - self.destroy_view() + self.destroy_view(idx) result = f"{file_path}_t.png" From 25e73289aea1fca39ebe190d09185caf64c40361 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 27 Jan 2025 22:08:11 +0100 Subject: [PATCH 012/141] PD: Fix regression about single-solid check For several PD features the single-solid check fails. The regression is caused by PR 13960 and reported as issue 19002. The reason for the failure is that the first solid of the output shape is retrieved and then checked for a single solid. This test will always pass, of course. The single-solid is fixed for these features: * Pad * Pocket (never worked there) * Fillet * Chamfer * Groove (never worked there) * Revolution (never worked there) * Loft Fixes: 17ad40b2c9f0 ("PartDesign: Refactor single-solid rule enforcement") --- src/Mod/PartDesign/App/FeatureChamfer.cpp | 16 +++++----------- src/Mod/PartDesign/App/FeatureExtrude.cpp | 4 ++-- src/Mod/PartDesign/App/FeatureFillet.cpp | 16 +++++----------- src/Mod/PartDesign/App/FeatureGroove.cpp | 6 +++--- src/Mod/PartDesign/App/FeatureLoft.cpp | 2 +- src/Mod/PartDesign/App/FeatureRevolution.cpp | 6 +++++- 6 files changed, 21 insertions(+), 29 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureChamfer.cpp b/src/Mod/PartDesign/App/FeatureChamfer.cpp index e154eb2411..dd289e160c 100644 --- a/src/Mod/PartDesign/App/FeatureChamfer.cpp +++ b/src/Mod/PartDesign/App/FeatureChamfer.cpp @@ -159,7 +159,6 @@ App::DocumentObjectExecReturn *Chamfer::execute() TopTools_ListOfShape aLarg; aLarg.Append(TopShape.getShape()); - bool failed = false; if (!BRepAlgo::IsValid(aLarg, shape.getShape(), Standard_False, Standard_False)) { ShapeFix_ShapeTolerance aSFT; aSFT.LimitTolerance(shape.getShape(), @@ -167,21 +166,16 @@ App::DocumentObjectExecReturn *Chamfer::execute() Precision::Confusion(), TopAbs_SHAPE); } - if (!failed) { - // store shape before refinement - this->rawShape = shape; - shape = refineShapeIfActive(shape); - shape = getSolid(shape); - } + // store shape before refinement + this->rawShape = shape; + shape = refineShapeIfActive(shape); if (!isSingleSolidRuleSatisfied(shape.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } + + shape = getSolid(shape); this->Shape.setValue(shape); - if (failed) { - return new App::DocumentObjectExecReturn( - QT_TRANSLATE_NOOP("Exception", "Resulting shape is invalid")); - } return App::DocumentObject::StdReturn; } catch (Standard_Failure& e) { diff --git a/src/Mod/PartDesign/App/FeatureExtrude.cpp b/src/Mod/PartDesign/App/FeatureExtrude.cpp index 0a911f1b45..c009ca6be4 100644 --- a/src/Mod/PartDesign/App/FeatureExtrude.cpp +++ b/src/Mod/PartDesign/App/FeatureExtrude.cpp @@ -809,7 +809,7 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt // store shape before refinement this->rawShape = result; - solRes = refineShapeIfActive(solRes); + solRes = refineShapeIfActive(result); if (!isSingleSolidRuleSatisfied(solRes.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); @@ -824,10 +824,10 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt // store shape before refinement this->rawShape = prism; prism = refineShapeIfActive(prism); - prism = getSolid(prism); if (!isSingleSolidRuleSatisfied(prism.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } + prism = getSolid(prism); this->Shape.setValue(prism); } else { diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index 35e7250330..c26c5486bc 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -104,7 +104,6 @@ App::DocumentObjectExecReturn *Fillet::execute() TopTools_ListOfShape aLarg; aLarg.Append(baseShape.getShape()); - bool failed = false; if (!BRepAlgo::IsValid(aLarg, shape.getShape(), Standard_False, Standard_False)) { ShapeFix_ShapeTolerance aSFT; aSFT.LimitTolerance(shape.getShape(), @@ -113,20 +112,15 @@ App::DocumentObjectExecReturn *Fillet::execute() TopAbs_SHAPE); } - if (!failed) { - // store shape before refinement - this->rawShape = shape; - shape = refineShapeIfActive(shape); - shape = getSolid(shape); - } + // store shape before refinement + this->rawShape = shape; + shape = refineShapeIfActive(shape); if (!isSingleSolidRuleSatisfied(shape.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } - this->Shape.setValue(shape); - if (failed) { - return new App::DocumentObjectExecReturn("Resulting shape is invalid"); - } + shape = getSolid(shape); + this->Shape.setValue(shape); return App::DocumentObject::StdReturn; } catch (Standard_Failure& e) { diff --git a/src/Mod/PartDesign/App/FeatureGroove.cpp b/src/Mod/PartDesign/App/FeatureGroove.cpp index 3df6e019eb..72d7d35076 100644 --- a/src/Mod/PartDesign/App/FeatureGroove.cpp +++ b/src/Mod/PartDesign/App/FeatureGroove.cpp @@ -185,17 +185,17 @@ App::DocumentObjectExecReturn *Groove::execute() }catch(Standard_Failure &) { return new App::DocumentObjectExecReturn("Failed to cut base feature"); } - boolOp = this->getSolid(boolOp); - if (boolOp.isNull()) + TopoShape solid = this->getSolid(boolOp); + if (solid.isNull()) return new App::DocumentObjectExecReturn("Resulting shape is not a solid"); // store shape before refinement this->rawShape = boolOp; boolOp = refineShapeIfActive(boolOp); - boolOp = getSolid(boolOp); if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } + boolOp = getSolid(boolOp); Shape.setValue(boolOp); return App::DocumentObject::StdReturn; } diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index 1bfe3cc696..ef7b3426af 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -266,10 +266,10 @@ App::DocumentObjectExecReturn *Loft::execute() // store shape before refinement this->rawShape = boolOp; boolOp = refineShapeIfActive(boolOp); - boolOp = getSolid(boolOp); if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } + boolOp = getSolid(boolOp); Shape.setValue(boolOp); return App::DocumentObject::StdReturn; } diff --git a/src/Mod/PartDesign/App/FeatureRevolution.cpp b/src/Mod/PartDesign/App/FeatureRevolution.cpp index d60b1f6558..e3fdf31575 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.cpp +++ b/src/Mod/PartDesign/App/FeatureRevolution.cpp @@ -228,7 +228,11 @@ App::DocumentObjectExecReturn* Revolution::execute() this->rawShape = result; result = refineShapeIfActive(result); } - this->Shape.setValue(getSolid(result)); + if (!isSingleSolidRuleSatisfied(result.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } + result = getSolid(result); + this->Shape.setValue(result); } else { return new App::DocumentObjectExecReturn( From 7335c798d13344ce356f793185506dafc8abe518 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 28 Jan 2025 01:46:38 +0100 Subject: [PATCH 013/141] PD: Use isSingleSolidRuleSatisfied() for pipe feature This fixes issue 18977 Fixes: 17ad40b2c9f0 ("PartDesign: Refactor single-solid rule enforcement") --- src/Mod/PartDesign/App/FeaturePipe.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index 08c4077948..f2358cd0e0 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -400,8 +400,7 @@ App::DocumentObjectExecReturn *Pipe::execute() if (boolOp.isNull()) return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); - int solidCount = countSolids(boolOp.getShape()); - if (solidCount > 1) { + if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } @@ -422,8 +421,7 @@ App::DocumentObjectExecReturn *Pipe::execute() if (boolOp.isNull()) return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); - int solidCount = countSolids(boolOp.getShape()); - if (solidCount > 1) { + if (!isSingleSolidRuleSatisfied(boolOp.getShape())) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); } From 86359a3183d99805c9469912861fcd0b21e90a51 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 30 Jan 2025 16:47:56 +0100 Subject: [PATCH 014/141] PD: Correctly handle single solid rule for loft with and without base --- src/Mod/PartDesign/App/FeatureLoft.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index ef7b3426af..becc62d406 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -234,6 +234,9 @@ App::DocumentObjectExecReturn *Loft::execute() result = shapes.front(); if(base.isNull()) { + if (!isSingleSolidRuleSatisfied(result.getShape())) { + return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported.")); + } Shape.setValue(getSolid(result)); return App::DocumentObject::StdReturn; } @@ -258,11 +261,11 @@ App::DocumentObjectExecReturn *Loft::execute() catch(Standard_Failure&) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Failed to perform boolean operation")); } - boolOp = this->getSolid(boolOp); + TopoShape solid = getSolid(boolOp); // lets check if the result is a solid - if (boolOp.isNull()) + if (solid.isNull()) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid")); - + } // store shape before refinement this->rawShape = boolOp; boolOp = refineShapeIfActive(boolOp); From 681be5b49c3799448fddef1a13b9bd74497670fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20=C3=89corchard?= Date: Wed, 25 Jun 2025 07:40:09 +0200 Subject: [PATCH 015/141] BIM: satisfy github-advanced-security MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gaël Écorchard --- src/Mod/BIM/importers/importDAE.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/BIM/importers/importDAE.py b/src/Mod/BIM/importers/importDAE.py index 07a16b70ad..8d787d2ed5 100644 --- a/src/Mod/BIM/importers/importDAE.py +++ b/src/Mod/BIM/importers/importDAE.py @@ -54,6 +54,7 @@ else: return text # \endcond + def xml_escape(text: str, entities: dict[str, str] = None) -> str: """Escape text for XML. @@ -197,6 +198,7 @@ def read(filename): # be within [0, 1]. OK. setattr(fc_mat, fc_field, getattr(material_node.effect, col_field)) except ValueError: + # The collada value is not compatible with FreeCAD. pass except TypeError: # color is not a tuple but a texture. From 76a0d9ffe3c1c3010c964690b7e340b65de9b01d Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Thu, 12 Jun 2025 07:29:51 +0200 Subject: [PATCH 016/141] Import: DXF parser, add stats reporting structure --- src/Mod/Import/App/dxf/dxf.cpp | 9 +++++++++ src/Mod/Import/App/dxf/dxf.h | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 257fb5a165..b47c75a296 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2342,6 +2342,7 @@ bool CDxfRead::SkipBlockContents() template void CDxfRead::UnsupportedFeature(const char* format, args&&... argValuess) { + m_stats.unsupportedFeaturesCount++; // NOLINTNEXTLINE(runtime/printf) std::string formattedMessage = fmt::sprintf(format, std::forward(argValuess)...); // We place these formatted messages in a map, count their occurrences and not their first @@ -2538,6 +2539,8 @@ bool CDxfRead::ReadVersion() m_version = RUnknown; } + m_stats.dxfVersion = m_record_data; + return ResolveEncoding(); } @@ -2606,6 +2609,9 @@ bool CDxfRead::ResolveEncoding() Py_DECREF(pyDecoder); Py_DECREF(pyUTF8Decoder); } + + m_stats.dxfEncoding = m_encoding; + return !m_encoding.empty(); } @@ -2759,6 +2765,9 @@ bool CDxfRead::ReadEntity() m_entityAttributes.m_paperSpace); // TODO: Ensure the stream is noboolalpha (for that // matter ensure the stream has the "C" locale SetupValueAttribute(eColor, m_entityAttributes.m_Color); + + m_stats.entityCounts[m_record_data]++; + // The entity record is already the current record and is already checked as a type 0 record if (IsObjectName("LINE")) { return ReadLine(); diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index c3da0d8fba..7af0b45a73 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -176,6 +176,18 @@ struct LWPolyDataOut point3D Extr; }; +// Statistics reporting structure +struct DxfImportStats +{ + double importTimeSeconds = 0.0; + std::string dxfVersion; + std::string dxfEncoding; + std::map entityCounts; + std::map importSettings; + int totalEntitiesCreated = 0; + int unsupportedFeaturesCount = 0; +}; + // "using" for enums is not supported by all platforms // https://stackoverflow.com/questions/41167119/how-to-fix-a-wsubobject-linkage-warning @@ -455,6 +467,7 @@ private: double m_unitScalingFactor = 0.0; protected: + DxfImportStats m_stats; // An additional scaling factor which can be modified before readDXF is called, and will be // incorporated into m_unitScalingFactor. void SetAdditionalScaling(double scaling) From 72ca1478e85b7a635abbd05b08933bc2fbd47607 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Thu, 12 Jun 2025 07:35:50 +0200 Subject: [PATCH 017/141] Import: DXF importer, populate stats reporting structure --- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 27 ++++++++++++++++++++++++++- src/Mod/Import/App/dxf/ImpExpDxf.h | 5 +++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 6b9279deaf..f05e6fed86 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -141,22 +141,32 @@ void ImpExpDxfRead::setOptions() { ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(getOptionSource().c_str()); + m_stats.importSettings.clear(); + m_preserveLayers = hGrp->GetBool("dxfUseDraftVisGroups", true); + m_stats.importSettings["Use layers"] = m_preserveLayers ? "Yes" : "No"; + m_preserveColors = hGrp->GetBool("dxfGetOriginalColors", true); + m_stats.importSettings["Use colors from the DXF file"] = m_preserveColors ? "Yes" : "No"; + // Default for creation type is to create draft objects. // The radio-button structure of the options dialog should generally prevent this condition. m_mergeOption = DraftObjects; + m_stats.importSettings["Merge option"] = "Create Draft objects"; // Default if (hGrp->GetBool("groupLayers", true)) { // Group all compatible objects together m_mergeOption = MergeShapes; + m_stats.importSettings["Merge option"] = "Group layers into blocks"; } else if (hGrp->GetBool("dxfCreatePart", true)) { // Create (non-draft) Shape objects when possible m_mergeOption = SingleShapes; + m_stats.importSettings["Merge option"] = "Create Part shapes"; } else if (hGrp->GetBool("dxfCreateDraft", true)) { // Create only Draft objects, making the result closest to drawn-from-scratch m_mergeOption = DraftObjects; + m_stats.importSettings["Merge option"] = "Create Draft objects"; } // TODO: joingeometry should give an intermediate between MergeShapes and SingleShapes which // will merge shapes that happen to join end-to-end. As such it should be in the radio button @@ -164,12 +174,25 @@ void ImpExpDxfRead::setOptions() // this really means is there should be an "Import as sketch" checkbox, and only the // MergeShapes, JoinShapes, and SingleShapes radio buttons should be allowed, i.e. Draft Objects // would be ignored. - SetAdditionalScaling(hGrp->GetFloat("dxfScaling", 1.0)); + bool joinGeometry = hGrp->GetBool("joingeometry", false); + m_stats.importSettings["Join geometry"] = joinGeometry ? "Yes" : "No"; + + double scaling = hGrp->GetFloat("dxfScaling", 1.0); + SetAdditionalScaling(scaling); + m_stats.importSettings["Manual scaling factor"] = std::to_string(scaling); m_importAnnotations = hGrp->GetBool("dxftext", false); + m_stats.importSettings["Import texts and dimensions"] = m_importAnnotations ? "Yes" : "No"; + m_importPoints = hGrp->GetBool("dxfImportPoints", true); + m_stats.importSettings["Import points"] = m_importPoints ? "Yes" : "No"; + m_importPaperSpaceEntities = hGrp->GetBool("dxflayout", false); + m_stats.importSettings["Import layout objects"] = m_importPaperSpaceEntities ? "Yes" : "No"; + m_importHiddenBlocks = hGrp->GetBool("dxfstarblocks", false); + m_stats.importSettings["Import hidden blocks"] = m_importHiddenBlocks ? "Yes" : "No"; + // TODO: There is currently no option for this: m_importFrozenLayers = // hGrp->GetBool("dxffrozenLayers", false); // TODO: There is currently no option for this: m_importHiddenLayers = @@ -771,6 +794,7 @@ std::string ImpExpDxfRead::Deformat(const char* text) void ImpExpDxfRead::DrawingEntityCollector::AddObject(const TopoDS_Shape& shape, const char* nameBase) { + Reader.IncrementCreatedObjectCount(); auto pcFeature = Reader.document->addObject(nameBase); pcFeature->Shape.setValue(shape); Reader.MoveToLayer(pcFeature); @@ -778,6 +802,7 @@ void ImpExpDxfRead::DrawingEntityCollector::AddObject(const TopoDS_Shape& shape, } void ImpExpDxfRead::DrawingEntityCollector::AddObject(FeaturePythonBuilder shapeBuilder) { + Reader.IncrementCreatedObjectCount(); App::FeaturePython* shape = shapeBuilder(Reader.OCSOrientationTransform); if (shape != nullptr) { Reader.MoveToLayer(shape); diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.h b/src/Mod/Import/App/dxf/ImpExpDxf.h index c486e6eb7d..989b62cf94 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.h +++ b/src/Mod/Import/App/dxf/ImpExpDxf.h @@ -204,6 +204,11 @@ private: std::string m_optionSource; protected: + friend class DrawingEntityCollector; + void IncrementCreatedObjectCount() + { + m_stats.totalEntitiesCreated++; + } virtual void ApplyGuiStyles(Part::Feature* /*object*/) const {} virtual void ApplyGuiStyles(App::FeaturePython* /*object*/) const From 78b720fd355a6ed6dcf65f85e4f1cb5cc62ec032 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Thu, 12 Jun 2025 09:09:59 +0200 Subject: [PATCH 018/141] Import: DXF importer, add Python bindings --- src/Mod/Import/App/AppImportPy.cpp | 1 + src/Mod/Import/App/dxf/ImpExpDxf.cpp | 24 ++++++++++++++++++++++++ src/Mod/Import/App/dxf/ImpExpDxf.h | 2 ++ src/Mod/Import/Gui/AppImportGuiPy.cpp | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index b4349587ef..91512a4a2e 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -415,6 +415,7 @@ private: dxf_file.setOptions(); dxf_file.DoRead(IgnoreErrors); pcDoc->recompute(); + return dxf_file.getStatsAsPyObject(); } catch (const Standard_Failure& e) { throw Py::RuntimeError(e.GetMessageString()); diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index f05e6fed86..467543eb07 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -1372,3 +1372,27 @@ void ImpExpDxfWrite::exportDiametricDim(Base::Vector3d textLocn, arc2[2] = arcPoint2.z; writeDiametricDim(text, arc1, arc2, dimText); } + +Py::Object ImpExpDxfRead::getStatsAsPyObject() +{ + Py::Dict statsDict; + + statsDict.setItem("dxfVersion", Py::String(m_stats.dxfVersion)); + statsDict.setItem("dxfEncoding", Py::String(m_stats.dxfEncoding)); + statsDict.setItem("totalEntitiesCreated", Py::Long(m_stats.totalEntitiesCreated)); + statsDict.setItem("unsupportedFeaturesCount", Py::Long(m_stats.unsupportedFeaturesCount)); + + Py::Dict entityCountsDict; + for (const auto& pair : m_stats.entityCounts) { + entityCountsDict.setItem(pair.first.c_str(), Py::Long(pair.second)); + } + statsDict.setItem("entityCounts", entityCountsDict); + + Py::Dict importSettingsDict; + for (const auto& pair : m_stats.importSettings) { + importSettingsDict.setItem(pair.first.c_str(), Py::String(pair.second)); + } + statsDict.setItem("importSettings", importSettingsDict); + + return statsDict; +} diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.h b/src/Mod/Import/App/dxf/ImpExpDxf.h index 989b62cf94..50b8afa558 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.h +++ b/src/Mod/Import/App/dxf/ImpExpDxf.h @@ -50,6 +50,8 @@ public: Py_XDECREF(DraftModule); } + Py::Object getStatsAsPyObject(); + bool ReadEntitiesSection() override; // CDxfRead's virtual functions diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 35319202c6..700f439736 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -403,6 +403,7 @@ private: dxf_file.setOptions(); dxf_file.DoRead(IgnoreErrors); pcDoc->recompute(); + return dxf_file.getStatsAsPyObject(); } catch (const Standard_Failure& e) { throw Py::RuntimeError(e.GetMessageString()); @@ -410,7 +411,6 @@ private: catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); } - return Py::None(); } Py::Object exportOptions(const Py::Tuple& args) From d17db2ded1d4fb6793e4aeec25f493947418d6b9 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Thu, 12 Jun 2025 09:20:28 +0200 Subject: [PATCH 019/141] Import: DXF Python frontend, implement stats reporter --- src/Mod/Draft/importDXF.py | 75 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 2f458b7ab6..191d04392b 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -2827,10 +2827,15 @@ def open(filename): FreeCAD.setActiveDocument(doc.Name) if gui: import ImportGui - ImportGui.readDXF(filename) + stats = ImportGui.readDXF(filename) else: import Import - Import.readDXF(filename) + stats = Import.readDXF(filename) + + if stats: + reporter = DxfImportReporter(stats) + reporter.report_to_console() + Draft.convert_draft_texts() # convert annotations to Draft texts doc.recompute() @@ -2869,10 +2874,15 @@ def insert(filename, docname): else: if gui: import ImportGui - ImportGui.readDXF(filename) + stats = ImportGui.readDXF(filename) else: import Import - Import.readDXF(filename) + stats = Import.readDXF(filename) + + if stats: + reporter = DxfImportReporter(stats) + reporter.report_to_console() + Draft.convert_draft_texts() # convert annotations to Draft texts doc.recompute() @@ -4197,3 +4207,60 @@ def readPreferences(): dxfDefaultColor = getColor() dxfExportBlocks = params.get_param("dxfExportBlocks") dxfScaling = params.get_param("dxfScaling") + + +class DxfImportReporter: + """Formats and reports statistics from a DXF import process.""" + def __init__(self, stats_dict): + self.stats = stats_dict + + def to_console_string(self): + """Formats the statistics into a human-readable string for console output.""" + if not self.stats: + return "DXF Import: No statistics were returned from the importer.\n" + + lines = ["\n--- DXF Import Summary ---"] + + # General Info + lines.append(f"DXF Version: {self.stats.get('dxfVersion', 'Unknown')}") + lines.append(f"File Encoding: {self.stats.get('dxfEncoding', 'Unknown')}") + # Timing will be 0.0 for now, but the line is ready for when it's fixed. + import_time = self.stats.get('importTimeSeconds', 0.0) + lines.append(f"Import Time: {import_time:.4f} seconds") + lines.append("") + + # Settings + lines.append("Import Settings:") + settings = self.stats.get('importSettings', {}) + if settings: + for key, value in sorted(settings.items()): + lines.append(f" - {key}: {value}") + else: + lines.append(" (No settings recorded)") + lines.append("") + + # Counts + lines.append("Entity Counts:") + total_read = 0 + entities = self.stats.get('entityCounts', {}) + if entities: + for key, value in sorted(entities.items()): + lines.append(f" - {key}: {value}") + total_read += value + lines.append("----------------------------") + lines.append(f" Total entities read: {total_read}") + else: + lines.append(" (No entities recorded)") + + lines.append(f"FreeCAD objects created: {self.stats.get('totalEntitiesCreated', 0)}") + lines.append(f"Unsupported features: {self.stats.get('unsupportedFeaturesCount', 0)}") + + lines.append("--- End of Summary ---\n") + return "\n".join(lines) + + def report_to_console(self): + """ + Prints the formatted statistics string to the FreeCAD console. + """ + output_string = self.to_console_string() + FCC.PrintMessage(output_string) From ea40128ea489c87fb76a1080cfa85fbd7e538e9e Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:21:36 +0200 Subject: [PATCH 020/141] Import: DXF parser/importer, improve scale reporting Report additional information about user scaling value, scaling info source and resulting scale, including units. --- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 4 ++ src/Mod/Import/App/dxf/dxf.cpp | 85 ++++++++++++++++++++++------ src/Mod/Import/App/dxf/dxf.h | 3 + 3 files changed, 75 insertions(+), 17 deletions(-) diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 467543eb07..5d48ce770e 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -1379,6 +1379,10 @@ Py::Object ImpExpDxfRead::getStatsAsPyObject() statsDict.setItem("dxfVersion", Py::String(m_stats.dxfVersion)); statsDict.setItem("dxfEncoding", Py::String(m_stats.dxfEncoding)); + statsDict.setItem("scalingSource", Py::String(m_stats.scalingSource)); + statsDict.setItem("fileUnits", Py::String(m_stats.fileUnits)); + statsDict.setItem("finalScalingFactor", Py::Float(m_stats.finalScalingFactor)); + statsDict.setItem("importTimeSeconds", Py::Float(m_stats.importTimeSeconds)); statsDict.setItem("totalEntitiesCreated", Py::Long(m_stats.totalEntitiesCreated)); statsDict.setItem("unsupportedFeaturesCount", Py::Long(m_stats.unsupportedFeaturesCount)); diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index b47c75a296..81117d3e36 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -26,6 +26,61 @@ using namespace std; + +namespace +{ + +std::string DxfUnitToString(DxfUnits::eDxfUnits_t unit) +{ + switch (unit) { + case DxfUnits::eInches: + return "Inches"; + case DxfUnits::eFeet: + return "Feet"; + case DxfUnits::eMiles: + return "Miles"; + case DxfUnits::eMillimeters: + return "Millimeters"; + case DxfUnits::eCentimeters: + return "Centimeters"; + case DxfUnits::eMeters: + return "Meters"; + case DxfUnits::eKilometers: + return "Kilometers"; + case DxfUnits::eMicroinches: + return "Microinches"; + case DxfUnits::eMils: + return "Mils"; + case DxfUnits::eYards: + return "Yards"; + case DxfUnits::eAngstroms: + return "Angstroms"; + case DxfUnits::eNanometers: + return "Nanometers"; + case DxfUnits::eMicrons: + return "Microns"; + case DxfUnits::eDecimeters: + return "Decimeters"; + case DxfUnits::eDekameters: + return "Dekameters"; + case DxfUnits::eHectometers: + return "Hectometers"; + case DxfUnits::eGigameters: + return "Gigameters"; + case DxfUnits::eAstronomicalUnits: + return "Astronomical Units"; + case DxfUnits::eLightYears: + return "Light Years"; + case DxfUnits::eParsecs: + return "Parsecs"; + case DxfUnits::eUnspecified: + default: + return "Unspecified"; + } +} + +} // namespace + static Base::Vector3d MakeVector3d(const double coordinates[3]) { // NOLINTNEXTLINE(readability/nolint) @@ -2818,13 +2873,11 @@ bool CDxfRead::ReadHeaderSection() if (m_record_type == eObjectType && IsObjectName("ENDSEC")) { if (m_unitScalingFactor == 0.0) { // Neither INSUNITS nor MEASUREMENT found, assume 1 DXF unit = 1mm - // TODO: Perhaps this default should depend on the current measuring units of the - // app. + // TODO: Perhaps this default should depend on the current project's unit system m_unitScalingFactor = m_additionalScaling; - ImportObservation("No INSUNITS or MEASUREMENT; setting scaling to 1 DXF unit = " - "%gmm based on DXF scaling option\n", - m_unitScalingFactor); + m_stats.fileUnits = "Unspecified (Defaulting to 1:1)"; } + m_stats.finalScalingFactor = m_unitScalingFactor; return true; } if (m_record_type != eVariableName) { @@ -2852,14 +2905,14 @@ bool CDxfRead::ReadVariable() if (!ParseValue(this, &varValue)) { ImportError("Failed to get integer from INSUNITS value '%s'\n", m_record_data); } - else if (auto units = DxfUnits::eDxfUnits_t(varValue); !DxfUnits::IsValid(units)) { - ImportError("Unknown value '%d' for INSUNITS\n", varValue); - } else { + auto units = DxfUnits::eDxfUnits_t(varValue); + if (!DxfUnits::IsValid(units)) { + units = DxfUnits::eUnspecified; + } m_unitScalingFactor = DxfUnits::Factor(units) * m_additionalScaling; - ImportObservation("Setting scaling to 1 DXF unit = %gmm based on INSUNITS and " - "DXF scaling option\n", - m_unitScalingFactor); + m_stats.scalingSource = "$INSUNITS"; + m_stats.fileUnits = DxfUnitToString(units); } return true; } @@ -2867,12 +2920,10 @@ bool CDxfRead::ReadVariable() get_next_record(); int varValue = 1; if (m_unitScalingFactor == 0.0 && ParseValue(this, &varValue)) { - m_unitScalingFactor = - DxfUnits::Factor(varValue != 0 ? DxfUnits::eMillimeters : DxfUnits::eInches) - * m_additionalScaling; - ImportObservation("Setting scaling to 1 DXF unit = %gmm based on MEASUREMENT and " - "DXF scaling option\n", - m_unitScalingFactor); + auto units = (varValue != 0 ? DxfUnits::eMillimeters : DxfUnits::eInches); + m_unitScalingFactor = DxfUnits::Factor(units) * m_additionalScaling; + m_stats.scalingSource = "$MEASUREMENT"; + m_stats.fileUnits = DxfUnitToString(units); } return true; } diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index 7af0b45a73..ac3d6b6f77 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -182,6 +182,9 @@ struct DxfImportStats double importTimeSeconds = 0.0; std::string dxfVersion; std::string dxfEncoding; + std::string scalingSource; + std::string fileUnits; + double finalScalingFactor = 1.0; std::map entityCounts; std::map importSettings; int totalEntitiesCreated = 0; From e8ce264507b38209ca597bd76d7fbb95e94cc252 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:22:03 +0200 Subject: [PATCH 021/141] Import: DXF parser/imported improve unsupported features count Classify unsupported features by type, and report on the breakdown. --- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 7 ++++++- src/Mod/Import/App/dxf/dxf.cpp | 2 +- src/Mod/Import/App/dxf/dxf.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 5d48ce770e..b9adb639e1 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -1384,7 +1384,6 @@ Py::Object ImpExpDxfRead::getStatsAsPyObject() statsDict.setItem("finalScalingFactor", Py::Float(m_stats.finalScalingFactor)); statsDict.setItem("importTimeSeconds", Py::Float(m_stats.importTimeSeconds)); statsDict.setItem("totalEntitiesCreated", Py::Long(m_stats.totalEntitiesCreated)); - statsDict.setItem("unsupportedFeaturesCount", Py::Long(m_stats.unsupportedFeaturesCount)); Py::Dict entityCountsDict; for (const auto& pair : m_stats.entityCounts) { @@ -1398,5 +1397,11 @@ Py::Object ImpExpDxfRead::getStatsAsPyObject() } statsDict.setItem("importSettings", importSettingsDict); + Py::Dict unsupportedFeaturesDict; + for (const auto& pair : m_stats.unsupportedFeatures) { + unsupportedFeaturesDict.setItem(pair.first.c_str(), Py::Long(pair.second)); + } + statsDict.setItem("unsupportedFeatures", unsupportedFeaturesDict); + return statsDict; } diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 81117d3e36..7028ff56a1 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2397,9 +2397,9 @@ bool CDxfRead::SkipBlockContents() template void CDxfRead::UnsupportedFeature(const char* format, args&&... argValuess) { - m_stats.unsupportedFeaturesCount++; // NOLINTNEXTLINE(runtime/printf) std::string formattedMessage = fmt::sprintf(format, std::forward(argValuess)...); + m_stats.unsupportedFeatures[formattedMessage]++; // We place these formatted messages in a map, count their occurrences and not their first // occurrence. if (m_unsupportedFeaturesNoted[formattedMessage].first++ == 0) { diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index ac3d6b6f77..b6a04a1cad 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -187,8 +187,8 @@ struct DxfImportStats double finalScalingFactor = 1.0; std::map entityCounts; std::map importSettings; + std::map unsupportedFeatures; int totalEntitiesCreated = 0; - int unsupportedFeaturesCount = 0; }; From ceb72924c292aaf78542c7763daef2fdcde18bfb Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Sat, 14 Jun 2025 09:33:02 +0200 Subject: [PATCH 022/141] Import: DXF parser, disable now redundant unsupported entities reporting --- src/Mod/Import/App/dxf/dxf.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 7028ff56a1..4be44063da 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2400,11 +2400,12 @@ void CDxfRead::UnsupportedFeature(const char* format, args&&... argValuess) // NOLINTNEXTLINE(runtime/printf) std::string formattedMessage = fmt::sprintf(format, std::forward(argValuess)...); m_stats.unsupportedFeatures[formattedMessage]++; + // *** This message is now disabled here because we use the stats reporter instead *** // We place these formatted messages in a map, count their occurrences and not their first // occurrence. - if (m_unsupportedFeaturesNoted[formattedMessage].first++ == 0) { - m_unsupportedFeaturesNoted[formattedMessage].second = m_line; - } + // if (m_unsupportedFeaturesNoted[formattedMessage].first++ == 0) { + // m_unsupportedFeaturesNoted[formattedMessage].second = m_line; + // } } bool CDxfRead::get_next_record() From 77e404787183d7a3f7b220cd0c9b5627609fa2aa Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Sat, 14 Jun 2025 08:28:53 +0200 Subject: [PATCH 023/141] Import: DXF frontend, improve scale reporting --- src/Mod/Draft/importDXF.py | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 191d04392b..84e1c8ed33 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -4215,7 +4215,9 @@ class DxfImportReporter: self.stats = stats_dict def to_console_string(self): - """Formats the statistics into a human-readable string for console output.""" + """ + Formats the statistics into a human-readable string for console output. + """ if not self.stats: return "DXF Import: No statistics were returned from the importer.\n" @@ -4224,7 +4226,21 @@ class DxfImportReporter: # General Info lines.append(f"DXF Version: {self.stats.get('dxfVersion', 'Unknown')}") lines.append(f"File Encoding: {self.stats.get('dxfEncoding', 'Unknown')}") - # Timing will be 0.0 for now, but the line is ready for when it's fixed. + + # Scaling Info + file_units = self.stats.get('fileUnits', 'Not specified') + source = self.stats.get('scalingSource', '') + if source: + lines.append(f"File Units: {file_units} (from {source})") + else: + lines.append(f"File Units: {file_units}") + + manual_scaling = self.stats.get('importSettings', {}).get('Manual scaling factor', '1.0') + lines.append(f"Manual Scaling Factor: {manual_scaling}") + + final_scaling = self.stats.get('finalScalingFactor', 1.0) + lines.append(f"Final Scaling: 1 DXF unit = {final_scaling:.4f} mm") + import_time = self.stats.get('importTimeSeconds', 0.0) lines.append(f"Import Time: {import_time:.4f} seconds") lines.append("") @@ -4251,9 +4267,16 @@ class DxfImportReporter: lines.append(f" Total entities read: {total_read}") else: lines.append(" (No entities recorded)") - lines.append(f"FreeCAD objects created: {self.stats.get('totalEntitiesCreated', 0)}") - lines.append(f"Unsupported features: {self.stats.get('unsupportedFeaturesCount', 0)}") + lines.append("") + + lines.append("Unsupported Features:") + unsupported = self.stats.get('unsupportedFeatures', {}) + if unsupported: + for key, value in sorted(unsupported.items()): + lines.append(f" - {key}: {value} time(s)") + else: + lines.append(" (None)") lines.append("--- End of Summary ---\n") return "\n".join(lines) From f84ed59a43a4ce67ef6728c0deb056ef963ab85f Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Fri, 13 Jun 2025 04:07:39 +0200 Subject: [PATCH 024/141] Import: DXF backend, frontent; add time measurement --- src/Mod/Draft/importDXF.py | 27 ++++++++++++++++++++------- src/Mod/Import/App/AppImportPy.cpp | 8 +++++++- src/Mod/Import/App/dxf/dxf.h | 4 ++++ src/Mod/Import/Gui/AppImportGuiPy.cpp | 7 +++++++ 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 84e1c8ed33..edde131cdb 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -54,6 +54,7 @@ import sys import os import math import re +import time import FreeCAD import Part import Draft @@ -2810,6 +2811,8 @@ def open(filename): Use local variables, not global variables. """ readPreferences() + total_start_time = time.perf_counter() + if dxfUseLegacyImporter: getDXFlibs() if dxfReader: @@ -2825,6 +2828,7 @@ def open(filename): doc = FreeCAD.newDocument(docname) doc.Label = docname FreeCAD.setActiveDocument(doc.Name) + stats = None if gui: import ImportGui stats = ImportGui.readDXF(filename) @@ -2832,8 +2836,9 @@ def open(filename): import Import stats = Import.readDXF(filename) + total_end_time = time.perf_counter() if stats: - reporter = DxfImportReporter(stats) + reporter = DxfImportReporter(stats, total_end_time - total_start_time) reporter.report_to_console() Draft.convert_draft_texts() # convert annotations to Draft texts @@ -2860,6 +2865,7 @@ def insert(filename, docname): Use local variables, not global variables. """ readPreferences() + total_start_time = time.perf_counter() try: doc = FreeCAD.getDocument(docname) except NameError: @@ -2872,6 +2878,7 @@ def insert(filename, docname): else: errorDXFLib(gui) else: + stats = None if gui: import ImportGui stats = ImportGui.readDXF(filename) @@ -2879,8 +2886,9 @@ def insert(filename, docname): import Import stats = Import.readDXF(filename) + total_end_time = time.perf_counter() if stats: - reporter = DxfImportReporter(stats) + reporter = DxfImportReporter(stats, total_end_time - total_start_time) reporter.report_to_console() Draft.convert_draft_texts() # convert annotations to Draft texts @@ -4211,8 +4219,9 @@ def readPreferences(): class DxfImportReporter: """Formats and reports statistics from a DXF import process.""" - def __init__(self, stats_dict): + def __init__(self, stats_dict, total_time=0.0): self.stats = stats_dict + self.total_time = total_time def to_console_string(self): """ @@ -4223,11 +4232,11 @@ class DxfImportReporter: lines = ["\n--- DXF Import Summary ---"] - # General Info + # General info lines.append(f"DXF Version: {self.stats.get('dxfVersion', 'Unknown')}") lines.append(f"File Encoding: {self.stats.get('dxfEncoding', 'Unknown')}") - # Scaling Info + # Scaling info file_units = self.stats.get('fileUnits', 'Not specified') source = self.stats.get('scalingSource', '') if source: @@ -4240,9 +4249,13 @@ class DxfImportReporter: final_scaling = self.stats.get('finalScalingFactor', 1.0) lines.append(f"Final Scaling: 1 DXF unit = {final_scaling:.4f} mm") + lines.append("") - import_time = self.stats.get('importTimeSeconds', 0.0) - lines.append(f"Import Time: {import_time:.4f} seconds") + # Timing + lines.append("Performance:") + cpp_time = self.stats.get('importTimeSeconds', 0.0) + lines.append(f" - C++ Import Time: {cpp_time:.4f} seconds") + lines.append(f" - Total Import Time: {self.total_time:.4f} seconds") lines.append("") # Settings diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index 91512a4a2e..362700b83c 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -48,6 +48,7 @@ #endif #endif +#include #include "dxf/ImpExpDxf.h" #include "SketchExportHelper.h" #include @@ -413,7 +414,13 @@ private: ImpExpDxfRead dxf_file(EncodedName, pcDoc); dxf_file.setOptionSource(defaultOptions); dxf_file.setOptions(); + + auto startTime = std::chrono::high_resolution_clock::now(); dxf_file.DoRead(IgnoreErrors); + auto endTime = std::chrono::high_resolution_clock::now(); + std::chrono::duration elapsed = endTime - startTime; + dxf_file.setImportTime(elapsed.count()); + pcDoc->recompute(); return dxf_file.getStatsAsPyObject(); } @@ -423,7 +430,6 @@ private: catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); } - return Py::None(); } diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index b6a04a1cad..8bd97937d4 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -862,6 +862,10 @@ public: { return m_fail; } + void setImportTime(double seconds) + { + m_stats.importTimeSeconds = seconds; + } void DoRead(bool ignore_errors = false); // this reads the file and calls the following functions virtual void StartImport() diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 700f439736..0e4dc03c11 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -46,6 +46,7 @@ #endif #endif +#include #include "ExportOCAFGui.h" #include "ImportOCAFGui.h" #include "OCAFBrowser.h" @@ -401,7 +402,13 @@ private: ImpExpDxfReadGui dxf_file(EncodedName, pcDoc); dxf_file.setOptionSource(defaultOptions); dxf_file.setOptions(); + + auto startTime = std::chrono::high_resolution_clock::now(); dxf_file.DoRead(IgnoreErrors); + auto endTime = std::chrono::high_resolution_clock::now(); + std::chrono::duration elapsed = endTime - startTime; + dxf_file.setImportTime(elapsed.count()); + pcDoc->recompute(); return dxf_file.getStatsAsPyObject(); } From d77cdf999b91b0da21cc8acf196b26a4850befa7 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Fri, 13 Jun 2025 04:30:53 +0200 Subject: [PATCH 025/141] Import: DXF parser, add DXF block count --- src/Mod/Import/App/dxf/dxf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 4be44063da..942838bf4f 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2349,6 +2349,7 @@ bool CDxfRead::ReadBlockInfo() int blockType = 0; std::string blockName; InitializeAttributes(); + m_stats.entityCounts["BLOCK"]++; // Both 2 and 3 are the block name. SetupStringAttribute(eName, blockName); SetupStringAttribute(eExtraText, blockName); From 9eaecf68030a89b65bebc30df91fd8595a41d486 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Fri, 13 Jun 2025 04:35:23 +0200 Subject: [PATCH 026/141] Import: DXF parser, add entities in paperspace count --- src/Mod/Import/App/dxf/dxf.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 942838bf4f..01d59a04d0 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2002,6 +2002,9 @@ void CDxfRead::ProcessAllEntityAttributes() void CDxfRead::ResolveEntityAttributes() { m_entityAttributes.ResolveBylayerAttributes(*this); + if (m_entityAttributes.m_paperSpace) { + m_stats.entityCounts["ENTITIES_IN_PAPERSPACE"]++; + } // TODO: Look at the space and layer (hidden/frozen?) and options and return false if the entity // is not needed. // TODO: INSERT must not call this because an INSERT on a hidden layer should always be From 789ca45280aea100328b070518f902b3b3e8d15e Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:47:05 +0200 Subject: [PATCH 027/141] Import: DXF importer, add code comments to C++ to Python stats passing function --- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index b9adb639e1..534f2bcf4e 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -1375,8 +1375,10 @@ void ImpExpDxfWrite::exportDiametricDim(Base::Vector3d textLocn, Py::Object ImpExpDxfRead::getStatsAsPyObject() { + // Create a Python dictionary to hold all import statistics. Py::Dict statsDict; + // Populate the dictionary with general information about the import. statsDict.setItem("dxfVersion", Py::String(m_stats.dxfVersion)); statsDict.setItem("dxfEncoding", Py::String(m_stats.dxfEncoding)); statsDict.setItem("scalingSource", Py::String(m_stats.scalingSource)); @@ -1385,23 +1387,27 @@ Py::Object ImpExpDxfRead::getStatsAsPyObject() statsDict.setItem("importTimeSeconds", Py::Float(m_stats.importTimeSeconds)); statsDict.setItem("totalEntitiesCreated", Py::Long(m_stats.totalEntitiesCreated)); + // Create a nested dictionary for the counts of each DXF entity type read. Py::Dict entityCountsDict; for (const auto& pair : m_stats.entityCounts) { entityCountsDict.setItem(pair.first.c_str(), Py::Long(pair.second)); } statsDict.setItem("entityCounts", entityCountsDict); + // Create a nested dictionary for the import settings used for this session. Py::Dict importSettingsDict; for (const auto& pair : m_stats.importSettings) { importSettingsDict.setItem(pair.first.c_str(), Py::String(pair.second)); } statsDict.setItem("importSettings", importSettingsDict); + // Create a nested dictionary for any unsupported DXF features encountered. Py::Dict unsupportedFeaturesDict; for (const auto& pair : m_stats.unsupportedFeatures) { unsupportedFeaturesDict.setItem(pair.first.c_str(), Py::Long(pair.second)); } statsDict.setItem("unsupportedFeatures", unsupportedFeaturesDict); + // Return the fully populated statistics dictionary to the Python caller. return statsDict; } From 3f606177e3f65e723912fc84469d84e5e08c2ee1 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:54:59 +0200 Subject: [PATCH 028/141] Import: DXF parser, remove original unsupported features count and warning --- src/Mod/Import/App/dxf/dxf.cpp | 17 ----------------- src/Mod/Import/App/dxf/dxf.h | 1 - 2 files changed, 18 deletions(-) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 01d59a04d0..7afbb3c887 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2404,12 +2404,6 @@ void CDxfRead::UnsupportedFeature(const char* format, args&&... argValuess) // NOLINTNEXTLINE(runtime/printf) std::string formattedMessage = fmt::sprintf(format, std::forward(argValuess)...); m_stats.unsupportedFeatures[formattedMessage]++; - // *** This message is now disabled here because we use the stats reporter instead *** - // We place these formatted messages in a map, count their occurrences and not their first - // occurrence. - // if (m_unsupportedFeaturesNoted[formattedMessage].first++ == 0) { - // m_unsupportedFeaturesNoted[formattedMessage].second = m_line; - // } } bool CDxfRead::get_next_record() @@ -2730,17 +2724,6 @@ void CDxfRead::DoRead(const bool ignore_errors /* = false */) } } FinishImport(); - - // Flush out any unsupported features messages - if (!m_unsupportedFeaturesNoted.empty()) { - ImportError("Unsupported DXF features:\n"); - for (auto& featureInfo : m_unsupportedFeaturesNoted) { - ImportError("%s: %d time(s) first at line %d\n", - featureInfo.first, - featureInfo.second.first, - featureInfo.second.second); - } - } } catch (const Base::Exception& e) { // This catches specific FreeCAD exceptions and re-throws them. diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index 8bd97937d4..caafca4989 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -716,7 +716,6 @@ protected: void UnsupportedFeature(const char* format, args&&... argValues); private: - std::map> m_unsupportedFeaturesNoted; std::string m_CodePage; // Code Page name from $DWGCODEPAGE or null if none/not read yet // The following was going to be python's canonical name for the encoding, but this is (a) not // easily found and (b) does not speed up finding the encoding object. From 89d2937afd822c8c1710865750861c44d989b185 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Sun, 22 Jun 2025 13:11:00 +0200 Subject: [PATCH 029/141] Import: DXF parser, fix macOS linker issue --- src/Mod/Import/App/dxf/dxf.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 7afbb3c887..b74284ad1f 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -3179,3 +3179,5 @@ Base::Color CDxfRead::ObjectColor(ColorIndex_t index) return result; } // NOLINTEND(cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers) + +template void CDxfRead::UnsupportedFeature<>(const char*); From 318f205708440bc8bc17c429f0f584b9a9a4a2a4 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Mon, 23 Jun 2025 23:01:39 +0200 Subject: [PATCH 030/141] Import: DXF backend/frontend, report more unsupported features info Now for unsupported features we report on line numbers and on the entity handle, in case that unsupported feature is a DXF entity. To avoid flooding the output, only a maximum of 5 instances are reported with details. The rest simply add up to the global count and are ellipsized in the report. Report output is now in sentence case. --- src/Mod/Draft/importDXF.py | 52 ++++++++++++++++++---------- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 9 ++++- src/Mod/Import/App/dxf/dxf.cpp | 6 ++-- src/Mod/Import/App/dxf/dxf.h | 4 ++- 4 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index edde131cdb..3791e910ca 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -4228,38 +4228,38 @@ class DxfImportReporter: Formats the statistics into a human-readable string for console output. """ if not self.stats: - return "DXF Import: No statistics were returned from the importer.\n" + return "DXF Import: no statistics were returned from the importer.\n" - lines = ["\n--- DXF Import Summary ---"] + lines = ["\n--- DXF import summary ---"] # General info - lines.append(f"DXF Version: {self.stats.get('dxfVersion', 'Unknown')}") - lines.append(f"File Encoding: {self.stats.get('dxfEncoding', 'Unknown')}") + lines.append(f"DXF version: {self.stats.get('dxfVersion', 'Unknown')}") + lines.append(f"File encoding: {self.stats.get('dxfEncoding', 'Unknown')}") # Scaling info file_units = self.stats.get('fileUnits', 'Not specified') source = self.stats.get('scalingSource', '') if source: - lines.append(f"File Units: {file_units} (from {source})") + lines.append(f"File units: {file_units} (from {source})") else: - lines.append(f"File Units: {file_units}") + lines.append(f"File units: {file_units}") manual_scaling = self.stats.get('importSettings', {}).get('Manual scaling factor', '1.0') - lines.append(f"Manual Scaling Factor: {manual_scaling}") + lines.append(f"Manual scaling factor: {manual_scaling}") final_scaling = self.stats.get('finalScalingFactor', 1.0) - lines.append(f"Final Scaling: 1 DXF unit = {final_scaling:.4f} mm") + lines.append(f"Final scaling: 1 DXF unit = {final_scaling:.4f} mm") lines.append("") # Timing lines.append("Performance:") cpp_time = self.stats.get('importTimeSeconds', 0.0) - lines.append(f" - C++ Import Time: {cpp_time:.4f} seconds") - lines.append(f" - Total Import Time: {self.total_time:.4f} seconds") + lines.append(f" - C++ import time: {cpp_time:.4f} seconds") + lines.append(f" - Total import time: {self.total_time:.4f} seconds") lines.append("") # Settings - lines.append("Import Settings:") + lines.append("Import settings:") settings = self.stats.get('importSettings', {}) if settings: for key, value in sorted(settings.items()): @@ -4269,7 +4269,7 @@ class DxfImportReporter: lines.append("") # Counts - lines.append("Entity Counts:") + lines.append("Entity counts:") total_read = 0 entities = self.stats.get('entityCounts', {}) if entities: @@ -4283,15 +4283,31 @@ class DxfImportReporter: lines.append(f"FreeCAD objects created: {self.stats.get('totalEntitiesCreated', 0)}") lines.append("") - lines.append("Unsupported Features:") + lines.append("Import issues and unsupported features:") unsupported = self.stats.get('unsupportedFeatures', {}) if unsupported: - for key, value in sorted(unsupported.items()): - lines.append(f" - {key}: {value} time(s)") - else: - lines.append(" (None)") + for key, occurrences in sorted(unsupported.items()): + count = len(occurrences) + max_details_to_show = 5 - lines.append("--- End of Summary ---\n") + details_list = [] + for i, (line, handle) in enumerate(occurrences): + if i >= max_details_to_show: + break + if handle: + details_list.append(f"line {line} (handle {handle})") + else: + details_list.append(f"line {line} (no handle available)") + + details_str = ", ".join(details_list) + if count > max_details_to_show: + lines.append(f" - {key}: {count} time(s). Examples: {details_str}, ...") + else: + lines.append(f" - {key}: {count} time(s) at {details_str}") + else: + lines.append(" (none)") + + lines.append("--- End of summary ---\n") return "\n".join(lines) def report_to_console(self): diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 534f2bcf4e..815624f038 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -1404,7 +1404,14 @@ Py::Object ImpExpDxfRead::getStatsAsPyObject() // Create a nested dictionary for any unsupported DXF features encountered. Py::Dict unsupportedFeaturesDict; for (const auto& pair : m_stats.unsupportedFeatures) { - unsupportedFeaturesDict.setItem(pair.first.c_str(), Py::Long(pair.second)); + Py::List occurrencesList; + for (const auto& occurrence : pair.second) { + Py::Tuple infoTuple(2); + infoTuple.setItem(0, Py::Long(occurrence.first)); + infoTuple.setItem(1, Py::String(occurrence.second)); + occurrencesList.append(infoTuple); + } + unsupportedFeaturesDict.setItem(pair.first.c_str(), occurrencesList); } statsDict.setItem("unsupportedFeatures", unsupportedFeaturesDict); diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index b74284ad1f..41f1f064dc 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2342,8 +2342,8 @@ bool CDxfRead::ReadDimension() bool CDxfRead::ReadUnknownEntity() { - UnsupportedFeature("Entity type '%s'", m_record_data); ProcessAllEntityAttributes(); + UnsupportedFeature("Entity type '%s'", m_record_data); return true; } @@ -2403,7 +2403,7 @@ void CDxfRead::UnsupportedFeature(const char* format, args&&... argValuess) { // NOLINTNEXTLINE(runtime/printf) std::string formattedMessage = fmt::sprintf(format, std::forward(argValuess)...); - m_stats.unsupportedFeatures[formattedMessage]++; + m_stats.unsupportedFeatures[formattedMessage].emplace_back(m_line, m_current_entity_handle); } bool CDxfRead::get_next_record() @@ -2798,6 +2798,8 @@ bool CDxfRead::ReadEntity() { InitializeAttributes(); m_entityAttributes.SetDefaults(); + m_current_entity_handle.clear(); + SetupStringAttribute(eHandle, m_current_entity_handle); EntityNormalVector.Set(0, 0, 1); Setup3DVectorAttribute(eExtrusionDirection, EntityNormalVector); SetupStringAttribute(eLinetypeName, m_entityAttributes.m_LineType); diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index caafca4989..1625822977 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -187,7 +187,7 @@ struct DxfImportStats double finalScalingFactor = 1.0; std::map entityCounts; std::map importSettings; - std::map unsupportedFeatures; + std::map>> unsupportedFeatures; int totalEntitiesCreated = 0; }; @@ -200,6 +200,7 @@ enum eDXFGroupCode_t ePrimaryText = 1, eName = 2, eExtraText = 3, + eHandle = 5, eLinetypeName = 6, eTextStyleName = 7, eLayerName = 8, @@ -462,6 +463,7 @@ private: bool m_not_eof = true; int m_line = 0; bool m_repeat_last_record = false; + std::string m_current_entity_handle; // The scaling from DXF units to millimetres. // This does not include the dxfScaling option From 41709fa3382454451f8b1f52a36918c046fc1c4f Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Tue, 24 Jun 2025 11:19:30 +0200 Subject: [PATCH 031/141] Import: DXF parser, correctly pass line no. and handle --- src/Mod/Import/App/dxf/dxf.cpp | 7 +++++-- src/Mod/Import/App/dxf/dxf.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 41f1f064dc..3e780d3e5b 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -2343,7 +2343,7 @@ bool CDxfRead::ReadDimension() bool CDxfRead::ReadUnknownEntity() { ProcessAllEntityAttributes(); - UnsupportedFeature("Entity type '%s'", m_record_data); + UnsupportedFeature("Entity type '%s'", m_current_entity_name.c_str()); return true; } @@ -2403,7 +2403,8 @@ void CDxfRead::UnsupportedFeature(const char* format, args&&... argValuess) { // NOLINTNEXTLINE(runtime/printf) std::string formattedMessage = fmt::sprintf(format, std::forward(argValuess)...); - m_stats.unsupportedFeatures[formattedMessage].emplace_back(m_line, m_current_entity_handle); + m_stats.unsupportedFeatures[formattedMessage].emplace_back(m_current_entity_line_number, + m_current_entity_handle); } bool CDxfRead::get_next_record() @@ -2796,6 +2797,8 @@ void CDxfRead::ProcessLayerReference(CDxfRead* object, void* target) } bool CDxfRead::ReadEntity() { + m_current_entity_line_number = m_line; + m_current_entity_name = m_record_data; InitializeAttributes(); m_entityAttributes.SetDefaults(); m_current_entity_handle.clear(); diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index 1625822977..92b3ce472c 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -463,6 +463,8 @@ private: bool m_not_eof = true; int m_line = 0; bool m_repeat_last_record = false; + int m_current_entity_line_number = 0; + std::string m_current_entity_name; std::string m_current_entity_handle; // The scaling from DXF units to millimetres. From 9ac905b140e63bb8b47f27ae3fe51ab8e151dd50 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Tue, 24 Jun 2025 11:19:46 +0200 Subject: [PATCH 032/141] Import: DXF reporter, add filename to report --- src/Mod/Draft/importDXF.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 3791e910ca..b6c38201f7 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -2838,7 +2838,7 @@ def open(filename): total_end_time = time.perf_counter() if stats: - reporter = DxfImportReporter(stats, total_end_time - total_start_time) + reporter = DxfImportReporter(filename, stats, total_end_time - total_start_time) reporter.report_to_console() Draft.convert_draft_texts() # convert annotations to Draft texts @@ -2888,7 +2888,7 @@ def insert(filename, docname): total_end_time = time.perf_counter() if stats: - reporter = DxfImportReporter(stats, total_end_time - total_start_time) + reporter = DxfImportReporter(filename, stats, total_end_time - total_start_time) reporter.report_to_console() Draft.convert_draft_texts() # convert annotations to Draft texts @@ -4219,7 +4219,8 @@ def readPreferences(): class DxfImportReporter: """Formats and reports statistics from a DXF import process.""" - def __init__(self, stats_dict, total_time=0.0): + def __init__(self, filename, stats_dict, total_time=0.0): + self.filename = filename self.stats = stats_dict self.total_time = total_time @@ -4231,6 +4232,7 @@ class DxfImportReporter: return "DXF Import: no statistics were returned from the importer.\n" lines = ["\n--- DXF import summary ---"] + lines.append(f"Import of file: '{self.filename}'\n") # General info lines.append(f"DXF version: {self.stats.get('dxfVersion', 'Unknown')}") @@ -4283,7 +4285,7 @@ class DxfImportReporter: lines.append(f"FreeCAD objects created: {self.stats.get('totalEntitiesCreated', 0)}") lines.append("") - lines.append("Import issues and unsupported features:") + lines.append("Unsupported features:") unsupported = self.stats.get('unsupportedFeatures', {}) if unsupported: for key, occurrences in sorted(unsupported.items()): From 0056f4d9a982e0cabcec91bd8a1419e1792299dc Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Tue, 24 Jun 2025 11:30:34 +0200 Subject: [PATCH 033/141] Import: DXF reporter, add unsupported indicator --- src/Mod/Draft/importDXF.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index b6c38201f7..b6d94016f9 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -4273,10 +4273,23 @@ class DxfImportReporter: # Counts lines.append("Entity counts:") total_read = 0 + unsupported_keys = self.stats.get('unsupportedFeatures', {}).keys() + unsupported_entity_names = set() + for key in unsupported_keys: + # Extract the entity name from the key string, e.g., 'HATCH' from "Entity type 'HATCH'" + entity_name_match = re.search(r"\'(.*?)\'", key) + if entity_name_match: + unsupported_entity_names.add(entity_name_match.group(1)) + + has_unsupported_indicator = False entities = self.stats.get('entityCounts', {}) if entities: for key, value in sorted(entities.items()): - lines.append(f" - {key}: {value}") + indicator = "" + if key in unsupported_entity_names: + indicator = " (*)" + has_unsupported_indicator = True + lines.append(f" - {key}: {value}{indicator}") total_read += value lines.append("----------------------------") lines.append(f" Total entities read: {total_read}") @@ -4284,6 +4297,9 @@ class DxfImportReporter: lines.append(" (No entities recorded)") lines.append(f"FreeCAD objects created: {self.stats.get('totalEntitiesCreated', 0)}") lines.append("") + if has_unsupported_indicator: + lines.append("(*) Entity type not supported by importer.") + lines.append("") lines.append("Unsupported features:") unsupported = self.stats.get('unsupportedFeatures', {}) From bca09d0ce6544f2339645a7b0a8da01f7bd37f47 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Wed, 25 Jun 2025 12:10:14 +0200 Subject: [PATCH 034/141] Gui: Use no_except=true for getExtensionByType in ViewProviderDragger Fixes: #22166 --- src/Gui/ViewProviderDragger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/ViewProviderDragger.cpp b/src/Gui/ViewProviderDragger.cpp index a78e890598..20a257d15d 100644 --- a/src/Gui/ViewProviderDragger.cpp +++ b/src/Gui/ViewProviderDragger.cpp @@ -174,7 +174,7 @@ App::PropertyPlacement* ViewProviderDragger::getPlacementProperty() const { auto object = getObject(); - if (auto linkExtension = object->getExtensionByType()) { + if (auto linkExtension = object->getExtensionByType(true)) { if (auto linkPlacementProp = linkExtension->getLinkPlacementProperty()) { return linkPlacementProp; } From a5eff619934b2ef92995f949fcf7590ab867b310 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Thu, 26 Jun 2025 10:11:26 +0200 Subject: [PATCH 035/141] Draft: Remove redundant QGroupBoxes from some of the array panels (#21980) * Draft: Remove main QGroupBox from Circular Array tool * Draft: Remove main QGroupBox from Polar Array tool * Draft: Remove main QGroupBox from Ortho Array tool * Draft: Remove AxisMode QGroup from Ortho Array tool * Draft: Remove main QGroup from ShapeString tool --- .../Resources/ui/TaskPanel_CircularArray.ui | 381 ++++---- .../Resources/ui/TaskPanel_OrthoArray.ui | 888 +++++++++--------- .../Resources/ui/TaskPanel_PolarArray.ui | 339 ++++--- src/Mod/Draft/Resources/ui/TaskShapeString.ui | 291 +++--- 4 files changed, 915 insertions(+), 984 deletions(-) diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui index d80e6c992d..5b693a37f6 100644 --- a/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui +++ b/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui @@ -27,252 +27,237 @@ - - - - 0 - 0 - + + + + + Distance from one layer of objects to the next layer of objects. + + + Radial distance + + + + + + + Distance from one layer of objects to the next layer of objects. + + + mm + + + 200.000000000000000 + + + + + + + Distance from one element in one ring of the array to the next element in the same ring. +It cannot be zero. + + + Tangential distance + + + + + + + Distance from one element in one ring of the array to the next element in the same ring. +It cannot be zero. + + + mm + + + 100.000000000000000 + + + + + + + Number of circular layers or rings to create, including a copy of the original object. +It must be at least 2. + + + Number of circular layers + + + + + + + Number of circular layers or rings to create, including a copy of the original object. +It must be at least 2. + + + 2 + + + 1000000 + + + 3 + + + + + + + The number of symmetry lines in the circular array. + + + Symmetry + + + + + + + The number of symmetry lines in the circular array. + + + 1 + + + 1 + + + + + + + + + The coordinates of the point through which the axis of rotation passes. +Change the direction of the axis itself in the property editor. - + Center of rotation - + - + - - - Distance from one layer of objects to the next layer of objects. - + - Radial distance + X - - - Distance from one layer of objects to the next layer of objects. + + + + 0 + 0 + mm - - 200.000000000000000 - - - - Distance from one element in one ring of the array to the next element in the same ring. -It cannot be zero. - + - Tangential distance + Y - - - Distance from one element in one ring of the array to the next element in the same ring. -It cannot be zero. + + + + 0 + 0 + mm - - 100.000000000000000 - - - - Number of circular layers or rings to create, including a copy of the original object. -It must be at least 2. - + - Number of circular layers + Z - - - Number of circular layers or rings to create, including a copy of the original object. -It must be at least 2. + + + + 0 + 0 + - - 2 - - - 1000000 - - - 3 - - - - - - - The number of symmetry lines in the circular array. - - - Symmetry - - - - - - - The number of symmetry lines in the circular array. - - - 1 - - - 1 + + mm - + - The coordinates of the point through which the axis of rotation passes. -Change the direction of the axis itself in the property editor. + Reset the coordinates of the center of rotation. - - Center of rotation + + Reset point - - - - - - - X - - - - - - - - 0 - 0 - - - - mm - - - - - - - Y - - - - - - - - 0 - 0 - - - - mm - - - - - - - Z - - - - - - - - 0 - 0 - - - - mm - - - - - - - - - Reset the coordinates of the center of rotation. - - - Reset point - - - - - - - - - - If checked, the resulting objects in the array will be fused if they touch each other. -This only works if "Link array" is off. - - - Fuse - - - - - - - If checked, the resulting object will be a "Link array" instead of a regular array. -A Link array is more efficient when creating multiple copies, but it cannot be fused together. - - - Link array - - - true - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + + + + + If checked, the resulting objects in the array will be fused if they touch each other. +This only works if "Link array" is off. + + + Fuse + + + + + + + If checked, the resulting object will be a "Link array" instead of a regular array. +A Link array is more efficient when creating multiple copies, but it cannot be fused together. + + + Link array + + + true + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui index 3538807d34..1910196747 100644 --- a/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui +++ b/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui @@ -27,480 +27,456 @@ - - - - 0 - 0 - + + + Toggle between Orthogonal mode and Linear mode. In Linear mode, you can select which axis to use. + + + Switch to linear mode + + + true + + + + + + + + + X axis + + + true + + + + + + + Y axis + + + false + + + + + + + Z axis + + + false + + + + + + + + + Number of elements in the array in the specified direction, including a copy of the original object. +The number must be at least 1 in each direction. - + Number of elements - + - - - Toggle between Orthogonal mode and Linear mode. In Linear mode, you can select which axis to use. - - - Axis mode - - - - - - Switch to linear mode - - - true - - - - - - - - - X axis - - - true - - - - - - - Y axis - - - false - - - - - - - Z axis - - - false - - - - - - - - - - - - Number of elements in the array in the specified direction, including a copy of the original object. -The number must be at least 1 in each direction. - - - Number of elements - - - - - - - - X - - - - - - - 1 - - - 1000000 - - - 2 - - - - - - - Y - - - - - - - 1 - - - 1000000 - - - 2 - - - - - - - Z - - - - - - - 1 - - - 1000000 - - - 1 - - - - - - - - - - - - Currently selected axis - - - - - - - - - - - - Distance between the elements in the X direction. -Normally, only the X value is necessary; the other two values can give an additional shift in their respective directions. -Negative values will result in copies produced in the negative direction. - - - X intervals - - - - - - - - X - - - - - - - - 0 - 0 - - - - mm - - - 100.000000000000000 - - - - - - - Y - - - - - - - - 0 - 0 - - - - mm - - - - - - - Z - - - - - - - - 0 - 0 - - - - mm - - - - - - - - - Reset the distances. - - - Reset X - - - - - - - - - - Distance between the elements in the Y direction. -Normally, only the Y value is necessary; the other two values can give an additional shift in their respective directions. -Negative values will result in copies produced in the negative direction. - - - Y intervals - - - - - - - - X - - - - - - - - 0 - 0 - - - - mm - - - - - - - Y - - - - - - - - 0 - 0 - - - - mm - - - 100.000000000000000 - - - - - - - Z - - - - - - - - 0 - 0 - - - - mm - - - - - - - - - Reset the distances. - - - Reset Y - - - - - - - - - - Distance between the elements in the Z direction. -Normally, only the Z value is necessary; the other two values can give an additional shift in their respective directions. -Negative values will result in copies produced in the negative direction. - - - Z intervals - - - - - - - - X - - - - - - - - 0 - 0 - - - - mm - - - - - - - Y - - - - - - - - 0 - 0 - - - - mm - - - - - - - Z - - - - - - - - 0 - 0 - - - - mm - - - 100.000000000000000 - - - - - - - - - Reset the distances. - - - Reset Z - - - - - - - - - - - - If checked, the resulting objects in the array will be fused if they touch each other. -This only works if "Link array" is off. - + + + - Fuse + X - - - - If checked, the resulting object will be a "Link array" instead of a regular array. -A Link array is more efficient when creating multiple copies, but it cannot be fused together. + + + + 1 + + 1000000 + + + 2 + + + + + - Link array + Y - - true + + + + + + 1 + + + 1000000 + + + 2 + + + + + + + Z + + + + + + + 1 + + + 1000000 + + + 1 - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + + + Currently selected axis + + + + + + + + + + + + Distance between the elements in the X direction. +Normally, only the X value is necessary; the other two values can give an additional shift in their respective directions. +Negative values will result in copies produced in the negative direction. + + + X intervals + + + + + + + + X + + + + + + + + 0 + 0 + + + + mm + + + 100.000000000000000 + + + + + + + Y + + + + + + + + 0 + 0 + + + + mm + + + + + + + Z + + + + + + + + 0 + 0 + + + + mm + + + + + + + + + Reset the distances. + + + Reset X + + + + + + + + + + Distance between the elements in the Y direction. +Normally, only the Y value is necessary; the other two values can give an additional shift in their respective directions. +Negative values will result in copies produced in the negative direction. + + + Y intervals + + + + + + + + X + + + + + + + + 0 + 0 + + + + mm + + + + + + + Y + + + + + + + + 0 + 0 + + + + mm + + + 100.000000000000000 + + + + + + + Z + + + + + + + + 0 + 0 + + + + mm + + + + + + + + + Reset the distances. + + + Reset Y + + + + + + + + + + Distance between the elements in the Z direction. +Normally, only the Z value is necessary; the other two values can give an additional shift in their respective directions. +Negative values will result in copies produced in the negative direction. + + + Z intervals + + + + + + + + X + + + + + + + + 0 + 0 + + + + mm + + + + + + + Y + + + + + + + + 0 + 0 + + + + mm + + + + + + + Z + + + + + + + + 0 + 0 + + + + mm + + + 100.000000000000000 + + + + + + + + + Reset the distances. + + + Reset Z + + + + + + + + + + + + If checked, the resulting objects in the array will be fused if they touch each other. +This only works if "Link array" is off. + + + Fuse + + + + + + + If checked, the resulting object will be a "Link array" instead of a regular array. +A Link array is more efficient when creating multiple copies, but it cannot be fused together. + + + Link array + + + true + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui index dbd90d4390..3f72ee0ce7 100644 --- a/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui +++ b/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui @@ -27,214 +27,199 @@ - - - - 0 - 0 - - - - - - - - - - - - Sweeping angle of the polar distribution. + + + + + Sweeping angle of the polar distribution. A negative angle produces a polar pattern in the opposite direction. The maximum absolute value is 360 degrees. - + + + Polar angle + + + + + + + Sweeping angle of the polar distribution. +A negative angle produces a polar pattern in the opposite direction. +The maximum absolute value is 360 degrees. + + + ° + + + -360.000000000000000 + + + 360.000000000000000 + + + 360.000000000000000 + + + + + + + Number of elements in the array, including a copy of the original object. +It must be at least 2. + + + Number of elements + + + + + + + Number of elements in the array, including a copy of the original object. +It must be at least 2. + + + 2 + + + 1000000 + + + 5 + + + + + + + + + The coordinates of the point through which the axis of rotation passes. +Change the direction of the axis itself in the property editor. + + + Center of rotation + + + + + + - Polar angle + X - - - Sweeping angle of the polar distribution. -A negative angle produces a polar pattern in the opposite direction. -The maximum absolute value is 360 degrees. + + + + 0 + 0 + - ° - - - -360.000000000000000 - - - 360.000000000000000 - - - 360.000000000000000 + mm - - - Number of elements in the array, including a copy of the original object. -It must be at least 2. - + - Number of elements + Y - - - Number of elements in the array, including a copy of the original object. -It must be at least 2. + + + + 0 + 0 + - - 2 - - - 1000000 - - - 5 + + mm - + + + + Z + + + + + + + + 0 + 0 + + + + mm + + + + - + - The coordinates of the point through which the axis of rotation passes. -Change the direction of the axis itself in the property editor. + Reset the coordinates of the center of rotation. - - Center of rotation + + Reset point - - - - - - - X - - - - - - - - 0 - 0 - - - - mm - - - - - - - Y - - - - - - - - 0 - 0 - - - - mm - - - - - - - Z - - - - - - - - 0 - 0 - - - - mm - - - - - - - - - Reset the coordinates of the center of rotation. - - - Reset point - - - - - - - - - - If checked, the resulting objects in the array will be fused if they touch each other. -This only works if "Link array" is off. - - - Fuse - - - - - - - If checked, the resulting object will be a "Link array" instead of a regular array. -A Link array is more efficient when creating multiple copies, but it cannot be fused together. - - - Link array - - - true - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + + + + + If checked, the resulting objects in the array will be fused if they touch each other. +This only works if "Link array" is off. + + + Fuse + + + + + + + If checked, the resulting object will be a "Link array" instead of a regular array. +A Link array is more efficient when creating multiple copies, but it cannot be fused together. + + + Link array + + + true + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/src/Mod/Draft/Resources/ui/TaskShapeString.ui b/src/Mod/Draft/Resources/ui/TaskShapeString.ui index 37a85179f7..4cdeeeffd7 100644 --- a/src/Mod/Draft/Resources/ui/TaskShapeString.ui +++ b/src/Mod/Draft/Resources/ui/TaskShapeString.ui @@ -27,160 +27,145 @@ - - - - 0 - 0 - - - - - - - - - - - - X - - - - - - - Enter coordinates or select point with mouse. - - - mm - - - - - - - Y - - - - - - - Enter coordinates or select point with mouse. - - - mm - - - - - - - Z - - - - - - - Enter coordinates or select point with mouse. - - - mm - - - - - - - Coordinates relative to global coordinate system. + + + + + X + + + + + + + Enter coordinates or select point with mouse. + + + mm + + + + + + + Y + + + + + + + Enter coordinates or select point with mouse. + + + mm + + + + + + + Z + + + + + + + Enter coordinates or select point with mouse. + + + mm + + + + + + + Coordinates relative to global coordinate system. Uncheck to use working plane coordinate system - - - Global - - - - - - - Reset 3D point selection - - - - - - Reset point - - - - - - - Height - - - - - - - Height of the result - - - mm - - - 0.000000000000000 - - - 10.000000000000000 - - - - - - - - - - - Text - - - - - - - Text to be made into ShapeString - - - - - - - Font file - - - - - - - Font files (*.ttc *.ttf *.otf *.pfb *.TTC *.TTF *.OTF *.PFB) - - - - - - - - - Qt::Vertical - - - - - + + + Global + + + + + + + Reset 3D point selection + + + + + + Reset point + + + + + + + Height + + + + + + + Height of the result + + + mm + + + 0.000000000000000 + + + 10.000000000000000 + + + + + + + + + + + Text + + + + + + + Text to be made into ShapeString + + + + + + + Font file + + + + + + + Font files (*.ttc *.ttf *.otf *.pfb *.TTC *.TTF *.OTF *.PFB) + + + + + + + + + Qt::Vertical + + From b0c63c55373c4dd5c708ab067990dd2323ae4374 Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Fri, 27 Jun 2025 10:25:36 +0100 Subject: [PATCH 036/141] [BIM][Draft] QCheckBox fix regressions introduced by PR #21939 (#22199) * [BIM][Draft] QCheckBox fix regressions introduced by PR #21939 * [BIM] Remove unwanted index values - CodeQL feedback --- src/Mod/BIM/bimcommands/BimClassification.py | 2 +- src/Mod/BIM/bimcommands/BimIfcProperties.py | 4 +- src/Mod/BIM/bimcommands/BimWall.py | 4 +- src/Mod/BIM/bimcommands/BimWindow.py | 4 +- src/Mod/Draft/DraftGui.py | 49 ++++++++++--------- .../Draft/draftguitools/gui_selectplane.py | 2 +- .../Draft/drafttaskpanels/task_shapestring.py | 4 +- 7 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/Mod/BIM/bimcommands/BimClassification.py b/src/Mod/BIM/bimcommands/BimClassification.py index 5c38462f6f..445ae2ea6b 100644 --- a/src/Mod/BIM/bimcommands/BimClassification.py +++ b/src/Mod/BIM/bimcommands/BimClassification.py @@ -670,7 +670,7 @@ class BIM_Classification: self.form.treeClass.setCurrentItem(self.form.treeClass.itemBelow(i)) def onVisible(self, index): - PARAMS.SetInt("BimClassificationVisibleState", index) + PARAMS.SetInt("BimClassificationVisibleState", getattr(index, "value", index)) self.updateObjects() def getIcon(self,obj): diff --git a/src/Mod/BIM/bimcommands/BimIfcProperties.py b/src/Mod/BIM/bimcommands/BimIfcProperties.py index d72d7cc9d4..42b107974b 100644 --- a/src/Mod/BIM/bimcommands/BimIfcProperties.py +++ b/src/Mod/BIM/bimcommands/BimIfcProperties.py @@ -760,14 +760,14 @@ class BIM_IfcProperties: self.updateDicts(remove=remove) def onSelected(self, index): - PARAMS.SetInt("IfcPropertiesSelectedState", index) + PARAMS.SetInt("IfcPropertiesSelectedState", getattr(index, "value", index)) self.objectslist, searchterms = self.rebuildObjectsList() self.form.searchField.clear() self.form.searchField.addItems(searchterms) self.update() def onVisible(self, index): - PARAMS.SetInt("IfcPropertiesVisibleState", index) + PARAMS.SetInt("IfcPropertiesVisibleState", getattr(index, "value", index)) self.update() diff --git a/src/Mod/BIM/bimcommands/BimWall.py b/src/Mod/BIM/bimcommands/BimWall.py index 08b3036dec..35c91d5938 100644 --- a/src/Mod/BIM/bimcommands/BimWall.py +++ b/src/Mod/BIM/bimcommands/BimWall.py @@ -430,11 +430,11 @@ class Arch_Wall: self.Offset = d params.set_param_arch("WallOffset", d) - def setUseSketch(self,i): + def setUseSketch(self, i): """Simple callback to set if walls should based on sketches.""" from draftutils import params - params.set_param_arch("WallSketches",bool(i)) + params.set_param_arch("WallSketches",bool(getattr(i, "value", i))) def createFromGUI(self): """Callback to create wall by using the _CommandWall.taskbox()""" diff --git a/src/Mod/BIM/bimcommands/BimWindow.py b/src/Mod/BIM/bimcommands/BimWindow.py index 7ae2e08769..aa98742c03 100644 --- a/src/Mod/BIM/bimcommands/BimWindow.py +++ b/src/Mod/BIM/bimcommands/BimWindow.py @@ -426,9 +426,9 @@ class Arch_Window: else: params.set_param_arch("WindowSill",d) - def setInclude(self,i): + def setInclude(self, i): - self.Include = bool(i) + self.Include = bool(getattr(i, "value", i)) def setParams(self,param,d): diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 01b7f1f95d..e4af383637 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -433,7 +433,7 @@ class DraftToolBar: QtCore.QObject.connect(self.lengthValue,QtCore.SIGNAL("valueChanged(double)"),self.changeLengthValue) QtCore.QObject.connect(self.angleValue,QtCore.SIGNAL("valueChanged(double)"),self.changeAngleValue) if hasattr(self.angleLock, "checkStateChanged"): # Qt version >= 6.7.0 - QtCore.QObject.connect(self.angleLock,QtCore.SIGNAL("checkStateChanged(int)"),self.toggleAngle) + self.angleLock.checkStateChanged.connect(self.toggleAngle) else: # Qt version < 6.7.0 QtCore.QObject.connect(self.angleLock,QtCore.SIGNAL("stateChanged(int)"),self.toggleAngle) QtCore.QObject.connect(self.radiusValue,QtCore.SIGNAL("valueChanged(double)"),self.changeRadiusValue) @@ -461,13 +461,13 @@ class DraftToolBar: QtCore.QObject.connect(self.undoButton,QtCore.SIGNAL("pressed()"),self.undoSegment) QtCore.QObject.connect(self.selectButton,QtCore.SIGNAL("pressed()"),self.selectEdge) if hasattr(self.continueCmd, "checkStateChanged"): # Qt version >= 6.7.0 - QtCore.QObject.connect(self.continueCmd,QtCore.SIGNAL("checkStateChanged(int)"),self.setContinue) - QtCore.QObject.connect(self.chainedModeCmd,QtCore.SIGNAL("checkStateChanged(int)"),self.setChainedMode) - QtCore.QObject.connect(self.isCopy,QtCore.SIGNAL("checkStateChanged(int)"),self.setCopymode) - QtCore.QObject.connect(self.isSubelementMode, QtCore.SIGNAL("checkStateChanged(int)"), self.setSubelementMode) - QtCore.QObject.connect(self.isRelative,QtCore.SIGNAL("checkStateChanged(int)"),self.setRelative) - QtCore.QObject.connect(self.isGlobal,QtCore.SIGNAL("checkStateChanged(int)"),self.setGlobal) - QtCore.QObject.connect(self.makeFace,QtCore.SIGNAL("checkStateChanged(int)"),self.setMakeFace) + self.continueCmd.checkStateChanged.connect(self.setContinue) + self.chainedModeCmd.checkStateChanged.connect(self.setChainedMode) + self.isCopy.checkStateChanged.connect(self.setCopymode) + self.isSubelementMode.checkStateChanged.connect(self.setSubelementMode) + self.isRelative.checkStateChanged.connect(self.setRelative) + self.isGlobal.checkStateChanged.connect(self.setGlobal) + self.makeFace.checkStateChanged.connect(self.setMakeFace) else: # Qt version < 6.7.0 QtCore.QObject.connect(self.continueCmd,QtCore.SIGNAL("stateChanged(int)"),self.setContinue) QtCore.QObject.connect(self.chainedModeCmd,QtCore.SIGNAL("stateChanged(int)"),self.setChainedMode) @@ -951,15 +951,15 @@ class DraftToolBar: #--------------------------------------------------------------------------- def setContinue(self, val): - params.set_param(FreeCAD.activeDraftCommand.featureName, bool(val), "Mod/Draft/ContinueMode") - self.continueMode = bool(val) - self.chainedModeCmd.setEnabled(not val) + params.set_param(FreeCAD.activeDraftCommand.featureName, bool(getattr(val, "value", val)), "Mod/Draft/ContinueMode") + self.continueMode = bool(getattr(val, "value", val)) + self.chainedModeCmd.setEnabled(not bool(getattr(val, "value", val))) def setChainedMode(self, val): - params.set_param("ChainedMode", bool(val)) - self.chainedMode = bool(val) - self.continueCmd.setEnabled(not val) - if val == False: + params.set_param("ChainedMode", bool(getattr(val, "value", val))) + self.chainedMode = bool(getattr(val, "value", val)) + self.continueCmd.setEnabled(not bool(getattr(val, "value", val))) + if bool(getattr(val, "value", val)) == False: # If user has deselected the checkbox, reactive the command # which will result in closing it FreeCAD.activeDraftCommand.Activated() @@ -971,10 +971,11 @@ class DraftToolBar: # gui_rectangles.py # gui_stretch.py def setRelative(self, val=-1): + val = getattr(val, "value", val) if val < 0: if hasattr(self.isRelative, "checkStateChanged"): # Qt version >= 6.7.0 QtCore.QObject.disconnect(self.isRelative, - QtCore.SIGNAL("checkStateChanged(int)"), + QtCore.SIGNAL("checkStateChanged(Qt::CheckState)"), self.setRelative) else: # Qt version < 6.7.0 QtCore.QObject.disconnect(self.isRelative, @@ -989,7 +990,7 @@ class DraftToolBar: self.relativeMode = val if hasattr(self.isRelative, "checkStateChanged"): # Qt version >= 6.7.0 QtCore.QObject.disconnect(self.isRelative, - QtCore.SIGNAL("checkStateChanged(int)"), + QtCore.SIGNAL("checkStateChanged(Qt::CheckState)"), self.setRelative) else: # Qt version < 6.7.0 QtCore.QObject.disconnect(self.isRelative, @@ -1003,28 +1004,28 @@ class DraftToolBar: self.updateSnapper() def setGlobal(self, val): - params.set_param("GlobalMode", bool(val)) - self.globalMode = bool(val) + params.set_param("GlobalMode", bool(getattr(val, "value", val))) + self.globalMode = bool(getattr(val, "value", val)) self.checkLocal() self.displayPoint(self.new_point, self.get_last_point()) self.updateSnapper() def setMakeFace(self, val): - params.set_param("MakeFaceMode", bool(val)) - self.makeFaceMode = bool(val) + params.set_param("MakeFaceMode", bool(getattr(val, "value", val))) + self.makeFaceMode = bool(getattr(val, "value", val)) def setCopymode(self, val): # special value for offset command if self.sourceCmd and self.sourceCmd.featureName == "Offset": - params.set_param("OffsetCopyMode", bool(val)) + params.set_param("OffsetCopyMode", bool(getattr(val, "value", val))) else: - params.set_param("CopyMode", bool(val)) + params.set_param("CopyMode", bool(getattr(val, "value", val))) # if CopyMode is changed ghosts must be updated. # Moveable children should not be included if CopyMode is True. self.sourceCmd.set_ghosts() def setSubelementMode(self, val): - params.set_param("SubelementMode", bool(val)) + params.set_param("SubelementMode", bool(getattr(val, "value", val))) self.sourceCmd.set_ghosts() def checkx(self): diff --git a/src/Mod/Draft/draftguitools/gui_selectplane.py b/src/Mod/Draft/draftguitools/gui_selectplane.py index 5baae69e38..84df475027 100644 --- a/src/Mod/Draft/draftguitools/gui_selectplane.py +++ b/src/Mod/Draft/draftguitools/gui_selectplane.py @@ -247,7 +247,7 @@ class Draft_SelectPlane: self.offset = q.Value def on_set_center(self, val): - self.center = bool(val) + self.center = bool(getattr(val, "value", val)) params.set_param("CenterPlaneOnView", self.center) def on_set_grid_size(self, text): diff --git a/src/Mod/Draft/drafttaskpanels/task_shapestring.py b/src/Mod/Draft/drafttaskpanels/task_shapestring.py index a1a182cf50..753f99baf5 100644 --- a/src/Mod/Draft/drafttaskpanels/task_shapestring.py +++ b/src/Mod/Draft/drafttaskpanels/task_shapestring.py @@ -86,7 +86,7 @@ class ShapeStringTaskPanel: self.form.sbX.valueChanged.connect(self.set_point_x) self.form.sbY.valueChanged.connect(self.set_point_y) self.form.sbZ.valueChanged.connect(self.set_point_z) - if hasattr(self.form.cbGlobalMode.checkbox_fuse, "checkStateChanged"): # Qt version >= 6.7.0 + if hasattr(self.form.cbGlobalMode, "checkStateChanged"): # Qt version >= 6.7.0 self.form.cbGlobalMode.checkStateChanged.connect(self.set_global_mode) else: # Qt version < 6.7.0 self.form.cbGlobalMode.stateChanged.connect(self.set_global_mode) @@ -160,7 +160,7 @@ class ShapeStringTaskPanel: params.set_param("ShapeStringFontFile", self.font_file) def set_global_mode(self, val): - self.global_mode = bool(val) + self.global_mode = bool(getattr(val, "value", val)) params.set_param("GlobalMode", self.global_mode) self.change_coord_labels() self.display_point(self.point) From deda767dd557dc7bce6a57466add2f1db233c258 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:39:01 +0000 Subject: [PATCH 037/141] Bump github/codeql-action from 3.29.0 to 3.29.1 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.29.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/ce28f5bb42b7a9f2c824e633a3f6ee835bab6858...39edc492dbe16b1465b0cafca41432d857bdb31a) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql.yml | 4 ++-- .github/workflows/codeql_cpp.yml | 4 ++-- .github/workflows/scorecards.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2ac54848fa..38795742c1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -82,7 +82,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 + uses: github/codeql-action/init@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -122,6 +122,6 @@ jobs: exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 + uses: github/codeql-action/analyze@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/codeql_cpp.yml b/.github/workflows/codeql_cpp.yml index 6f9045de64..366565db4b 100644 --- a/.github/workflows/codeql_cpp.yml +++ b/.github/workflows/codeql_cpp.yml @@ -98,7 +98,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 + uses: github/codeql-action/init@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -136,6 +136,6 @@ jobs: exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 + uses: github/codeql-action/analyze@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 686a4a9ff0..fe8f207d82 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -76,6 +76,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 + uses: github/codeql-action/upload-sarif@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1 with: sarif_file: results.sarif From 04cd342f59135c488c70096971bfcdb8e136a16b Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sat, 28 Jun 2025 08:42:35 -0500 Subject: [PATCH 038/141] FEM: Fix missing VTK headers in PreCompiled.h --- src/Mod/Fem/App/PreCompiled.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Fem/App/PreCompiled.h b/src/Mod/Fem/App/PreCompiled.h index dc915b7df7..5667031cb4 100644 --- a/src/Mod/Fem/App/PreCompiled.h +++ b/src/Mod/Fem/App/PreCompiled.h @@ -186,6 +186,7 @@ #include #include #include +#include #include #include #include @@ -200,6 +201,8 @@ #include #include #include +#include +#include #include #include From 79aa35a28855007bf1ceed5121dde14534e743a9 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 23 Jun 2025 22:51:57 -0500 Subject: [PATCH 039/141] Gui: Selectively disable MSVC 4251 warning This warning is not relevant to our project in this instance. We are not concerned about ABI-compatibility of DLLs since they are all compiled at the same time when building FreeCAD. --- src/Gui/DocumentObserver.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Gui/DocumentObserver.h b/src/Gui/DocumentObserver.h index 38600565cf..df8bb9fec6 100644 --- a/src/Gui/DocumentObserver.h +++ b/src/Gui/DocumentObserver.h @@ -306,6 +306,11 @@ private: ViewProviderWeakPtrT ptr; }; +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4251) // MSVC emits warning C4251 too conservatively for our use-case +#endif + /** * The DocumentObserver class simplifies the step to write classes that listen * to what happens inside a document. @@ -368,6 +373,10 @@ private: Connection connectDocumentDelete; }; +#ifdef _MSC_VER +# pragma warning(pop) +#endif + } //namespace Gui #endif // GUI_DOCUMENTOBSERVER_H From 6503d22fe7ad3b391e08f25fb7ed6c64cf343075 Mon Sep 17 00:00:00 2001 From: mosfet80 <10235105+mosfet80@users.noreply.github.com> Date: Tue, 24 Jun 2025 09:55:09 +0100 Subject: [PATCH 040/141] Clean EditableDatumLabel.cpp removed unused variable --- src/Gui/EditableDatumLabel.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Gui/EditableDatumLabel.cpp b/src/Gui/EditableDatumLabel.cpp index d0d36d1182..21e794d4fc 100644 --- a/src/Gui/EditableDatumLabel.cpp +++ b/src/Gui/EditableDatumLabel.cpp @@ -499,7 +499,6 @@ void EditableDatumLabel::setLockedAppearance(bool locked) { if (locked) { if (spinBox) { - QWidget* mdi = viewer->parentWidget(); // create lock icon label it it doesn't exist, if it does - show it if (!lockIconLabel) { From d0dcf76a26916b189bc8ee4a9b9266dbb3cb9bd2 Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Sun, 29 Jun 2025 02:14:30 +0200 Subject: [PATCH 041/141] FEM: Fix data extraction checkbox typo (#22225) * FEM: Update PostHistogramFieldAppEdit.ui * FEM: Update PostLineplotFieldAppEdit.ui * FEM: Update view_post_histogram.py --- src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui | 2 +- src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui | 2 +- src/Mod/Fem/femviewprovider/view_post_histogram.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui index 8e611e7790..feca6591da 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui @@ -65,7 +65,7 @@ - One field for each frames + One field for each frame diff --git a/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui index b0d1830852..33f36cf245 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui @@ -90,7 +90,7 @@ - One Y field for each frames + One Y field for each frame diff --git a/src/Mod/Fem/femviewprovider/view_post_histogram.py b/src/Mod/Fem/femviewprovider/view_post_histogram.py index 9f88ee2b57..12798dc813 100644 --- a/src/Mod/Fem/femviewprovider/view_post_histogram.py +++ b/src/Mod/Fem/femviewprovider/view_post_histogram.py @@ -396,7 +396,7 @@ class VPPostHistogram(view_base_fempostvisualization.VPPostVisualization): name="Cumulative", group="Histogram", doc=QT_TRANSLATE_NOOP( - "FEM", "If be the bars should show the cumulative sum left to right" + "FEM", "If the bars should show the cumulative sum left to right" ), value=False, ), From 45f305aa79f8a909cb35299c33cb21759ac6922f Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 16:05:49 +0200 Subject: [PATCH 042/141] OpenSCAD: Update UI strings for consistency --- src/Mod/OpenSCAD/OpenSCADCommands.py | 52 +++++++++---------- .../Resources/ui/openscadprefs-base.ui | 8 +-- src/Mod/OpenSCAD/prototype.py | 2 +- src/Mod/OpenSCAD/replaceobj.py | 4 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/Mod/OpenSCAD/OpenSCADCommands.py b/src/Mod/OpenSCAD/OpenSCADCommands.py index 6cc3513adc..d14a7a2121 100644 --- a/src/Mod/OpenSCAD/OpenSCADCommands.py +++ b/src/Mod/OpenSCAD/OpenSCADCommands.py @@ -98,7 +98,7 @@ class ExplodeGroup: def GetResources(self): return {'Pixmap' : 'OpenSCAD_Explode_Group', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ExplodeGroup', 'Explode Group'), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ExplodeGroup', 'Remove fusion, apply placement to children, and color randomly')} + 'ToolTip': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ExplodeGroup', 'Removes fusion and applies placement to children, and color randomly')} class ColorCodeShape: "Change the Color of selected or all Shapes based on their validity" @@ -114,7 +114,7 @@ class ColorCodeShape: def GetResources(self): return {'Pixmap' : 'OpenSCAD_ColorCodeShape', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ColorCodeShape', 'Color Shapes'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ColorCodeShape', 'Color Shapes by validity and type')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ColorCodeShape', 'Colors shapes by validity and type')} class Edgestofaces: def IsActive(self): @@ -133,8 +133,8 @@ class Edgestofaces: def GetResources(self): return {'Pixmap' : 'OpenSCAD_Edgestofaces', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Edgestofaces', 'Convert Edges To Faces'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD', 'Convert Edges to Faces')} + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Edgestofaces', 'Convert Edges to Faces'), + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD', 'Converts edges to faces')} class RefineShapeFeature: def IsActive(self): @@ -154,7 +154,7 @@ class RefineShapeFeature: def GetResources(self): return {'Pixmap' : 'OpenSCAD_RefineShapeFeature', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_RefineShapeFeature', 'Refine Shape Feature'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_RefineShapeFeature', 'Create Refine Shape Feature')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_RefineShapeFeature', 'Creates a refined shape')} class MirrorMeshFeature: def IsActive(self): @@ -184,7 +184,7 @@ class MirrorMeshFeature: def GetResources(self): return {'Pixmap' : 'OpenSCAD_MirrorMeshFeature', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_MirrorMeshFeature', 'Mirror Mesh Feature...'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_MirrorMeshFeature', 'Create Mirror Mesh Feature')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_MirrorMeshFeature', 'Mirrors the mesh')} class ScaleMeshFeature: def IsActive(self): @@ -212,8 +212,8 @@ class ScaleMeshFeature: FreeCAD.ActiveDocument.recompute() def GetResources(self): return {'Pixmap' : 'OpenSCAD_ScaleMeshFeature', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ScaleMeshFeature', 'Scale Mesh Feature...'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ScaleMeshFeature', 'Create Scale Mesh Feature')} + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ScaleMeshFeature', 'Scale Mesh Feature…'), + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ScaleMeshFeature', 'Scales the mesh')} class ResizeMeshFeature: @@ -242,8 +242,8 @@ class ResizeMeshFeature: FreeCAD.ActiveDocument.recompute() def GetResources(self): return {'Pixmap' : 'OpenSCAD_ResizeMeshFeature', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ResizeMeshFeature', 'Resize Mesh Feature...'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ResizeMeshFeature', 'Create Resize Mesh Feature')} + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ResizeMeshFeature', 'Resize Mesh Feature…'), + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ResizeMeshFeature', 'Resizes the mesh')} class IncreaseToleranceFeature: @@ -264,7 +264,7 @@ class IncreaseToleranceFeature: def GetResources(self): return {'Pixmap' : 'OpenSCAD_IncreaseToleranceFeature', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_IncreaseToleranceFeature', 'Increase Tolerance Feature'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_IncreaseToleranceFeature', 'Create Feature that allows increasing the tolerance')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_IncreaseToleranceFeature', 'Creates a feature that allows increasing the tolerance')} class ExpandPlacements: '''This should aid interactive repair in the future @@ -281,7 +281,7 @@ class ExpandPlacements: def GetResources(self): return {'Pixmap' : 'OpenSCAD_ExpandPlacements', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ExpandPlacements', 'Expand Placements'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ExpandPlacements', 'Expand all placements downwards in the Tree view')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ExpandPlacements', 'Expands all placements downwards in the tree view')} class ReplaceObject: def IsActive(self): @@ -298,11 +298,11 @@ class ReplaceObject: tuple((len(obj.InList)) for obj in objs) in ((0,1),(1,0)): replaceobj.replaceobjfromselection(objs) else: - FreeCAD.Console.PrintError(translate('OpenSCAD', 'Please select 3 objects first')+ '\n') + FreeCAD.Console.PrintError(translate('OpenSCAD', 'Select 3 objects first')+ '\n') def GetResources(self): return {'Pixmap' : 'OpenSCAD_ReplaceObject', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ReplaceObject', 'Replace Object'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ReplaceObject', 'Replace an object in the Tree view. Please select old, new, and parent object')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_ReplaceObject', 'Replaces an object in the tree view. Select old, new, and parent object')} class RemoveSubtree: def IsActive(self): @@ -314,7 +314,7 @@ class RemoveSubtree: def GetResources(self): return {'Pixmap' : 'OpenSCAD_RemoveSubtree', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_RemoveSubtree', 'Remove Objects and their Children'), + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_RemoveSubtree', 'Remove Objects and Children'), 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_RemoveSubtree', 'Removes the selected objects and all children that are not referenced from other objects')} class AddSCADWidget(QtGui.QWidget): @@ -332,10 +332,10 @@ class AddSCADWidget(QtGui.QWidget): self.textMsg.resize(self.textMsg.width(),h) self.buttonadd = QtGui.QPushButton(translate('OpenSCAD','Add')) self.buttonrefresh = QtGui.QPushButton(translate('OpenSCAD','Refresh')) - self.buttonclear = QtGui.QPushButton(translate('OpenSCAD','Clear code')) - self.buttonload = QtGui.QPushButton(translate('OpenSCAD','Open...')) - self.buttonsave = QtGui.QPushButton(translate('OpenSCAD','Save...')) - self.checkboxmesh = QtGui.QCheckBox(translate('OpenSCAD','as Mesh')) + self.buttonclear = QtGui.QPushButton(translate('OpenSCAD','Clear Code')) + self.buttonload = QtGui.QPushButton(translate('OpenSCAD','Open…')) + self.buttonsave = QtGui.QPushButton(translate('OpenSCAD','Save…')) + self.checkboxmesh = QtGui.QCheckBox(translate('OpenSCAD','as mesh')) layouth=QtGui.QHBoxLayout() layouth.addWidget(self.buttonadd) layouth.addWidget(self.buttonrefresh) @@ -526,9 +526,9 @@ class AddOpenSCADElement: def GetResources(self): return {'Pixmap' : 'OpenSCAD_AddOpenSCADElement', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_AddOpenSCADElement', 'Add OpenSCAD Element...'), + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_AddOpenSCADElement', 'Add OpenSCAD Element…'), 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_AddOpenSCADElement', - 'Add an OpenSCAD element by entering OpenSCAD code and executing the OpenSCAD binary')} + 'Adds an OpenSCAD element by entering OpenSCAD code and executing the OpenSCAD binary')} class OpenSCADMeshBoolean: def IsActive(self): @@ -541,9 +541,9 @@ class OpenSCADMeshBoolean: def GetResources(self): return {'Pixmap' : 'OpenSCAD_MeshBooleans', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_MeshBoolean','Mesh Boolean...'), + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_MeshBoolean','Mesh Boolean…'), 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_MeshBoolean', - 'Export objects as meshes and use OpenSCAD to perform a boolean operation')} + 'Exports objects as meshes and use OpenSCAD to perform a boolean operation')} class Hull: def IsActive(self): @@ -563,7 +563,7 @@ class Hull: def GetResources(self): return {'Pixmap' : 'OpenSCAD_Hull', 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Hull', 'Hull'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Hull', 'Use OpenSCAD to create a hull')} + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Hull', 'Creates a hull')} class Minkowski: def IsActive(self): @@ -582,8 +582,8 @@ class Minkowski: FreeCAD.ActiveDocument.recompute() def GetResources(self): return {'Pixmap' : 'OpenSCAD_Minkowski', - 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Minkowski', 'Minkowski sum'), - 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Minkowski', 'Use OpenSCAD to create a Minkowski sum')} + 'MenuText': QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Minkowski', 'Minkowski Sum'), + 'ToolTip' : QtCore.QT_TRANSLATE_NOOP('OpenSCAD_Minkowski', 'Creates a Minkowski sum')} FreeCADGui.addCommand('OpenSCAD_ColorCodeShape',ColorCodeShape()) FreeCADGui.addCommand('OpenSCAD_ExplodeGroup',ExplodeGroup()) diff --git a/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui b/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui index 73a1d28324..238ecd8959 100644 --- a/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui +++ b/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui @@ -11,7 +11,7 @@ - General settings + General @@ -71,7 +71,7 @@ - OpenSCAD import + OpenSCAD Import @@ -179,7 +179,7 @@ - Send to OpenSCAD via: + Send to OpenSCAD via @@ -258,7 +258,7 @@ - OpenSCAD export + OpenSCAD Export diff --git a/src/Mod/OpenSCAD/prototype.py b/src/Mod/OpenSCAD/prototype.py index 4e23a804ef..bff5f3fb8b 100644 --- a/src/Mod/OpenSCAD/prototype.py +++ b/src/Mod/OpenSCAD/prototype.py @@ -394,7 +394,7 @@ class Node: try: f = edgestofaces(edges) except Part.OCCError: - FreeCAD.Console.PrintError('processing of dxf import failed\nPlease rework \'%s\' manually\n' % layera) + FreeCAD.Console.PrintError('processing of dxf import failed\nRework \'%s\' manually\n' % layera) f = Part.Shape() #empty Shape obj = doc.addObject("Part::FeaturePython",'import_dxf_%s_%s'%(objname,layera)) ImportObject(obj,groupobj[0]) #This object is not mutable from the GUI diff --git a/src/Mod/OpenSCAD/replaceobj.py b/src/Mod/OpenSCAD/replaceobj.py index 5da3f08485..ea80f3ec8e 100644 --- a/src/Mod/OpenSCAD/replaceobj.py +++ b/src/Mod/OpenSCAD/replaceobj.py @@ -60,8 +60,8 @@ def replaceobjfromselection(objs): oldchild,newchild = objs parent = oldchild.InList[0] else: - raise ValueError("Selection ambiguous. Please select oldchild,\ - newchild and parent") + raise ValueError("Selection ambiguous. Select old child,\ + new child, and parent") elif len(objs) == 3: if objs[2] in objs[0].InList: oldchild, newchild, parent = objs elif objs[0] in objs[1].InList: parent, oldchild, newchild = objs From 21a2ee8238c4033f311d29cdb467fa46624f6fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <1289205+lahwaacz@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:57:09 +0200 Subject: [PATCH 043/141] Use vtkUnstructuredGrid::GetLinks instead of vtkUnstructuredGrid::GetCellLinks for VTK >= 9.3 The vtkUnstructuredGrid::GetCellLinks has been deprecated in VTK 9.3 and silently removed in 9.5: https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.3.md --- .../salomesmesh/inc/SMDS_UnstructuredGrid.hxx | 4 ++++ .../salomesmesh/src/SMDS/SMDS_Mesh.cpp | 4 ++++ .../salomesmesh/src/SMDS/SMDS_MeshNode.cpp | 24 +++++++++++++++++++ .../src/SMESH/SMESH_MeshEditor.cpp | 8 +++++++ 4 files changed, 40 insertions(+) diff --git a/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx index 7746581454..f02337cf52 100644 --- a/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx +++ b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx @@ -96,7 +96,11 @@ public: vtkCellLinks* GetLinks() { #ifdef VTK_CELL_ARRAY_V2 + #if VTK_VERSION_NUMBER_QUICK >= 90300000000 + return static_cast(vtkUnstructuredGrid::GetLinks()); + #else return static_cast(GetCellLinks()); + #endif #else return Links; #endif diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp index a987e05058..baa6eadc93 100644 --- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp +++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp @@ -4713,7 +4713,11 @@ void SMDS_Mesh::dumpGrid(string ficdump) } ficcon << "-------------------------------- connectivity " << nbPoints << endl; #ifdef VTK_CELL_ARRAY_V2 + #if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks *links = static_cast(myGrid->GetLinks()); + #else vtkCellLinks *links = static_cast(myGrid->GetCellLinks()); + #endif #else vtkCellLinks *links = myGrid->GetCellLinks(); #endif diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp index 7b8e7ae763..f5fc373f5d 100644 --- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp +++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp @@ -69,7 +69,11 @@ void SMDS_MeshNode::init(int id, int meshId, int shapeId, double x, double y, do SMDS_UnstructuredGrid * grid = mesh->getGrid(); vtkPoints *points = grid->GetPoints(); points->InsertPoint(myVtkID, x, y, z); +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + SMDS_CellLinks *cellLinks = dynamic_cast(grid->GetLinks()); +#else SMDS_CellLinks *cellLinks = dynamic_cast(grid->GetCellLinks()); +#endif assert(cellLinks); cellLinks->ResizeForPoint( myVtkID ); } @@ -191,7 +195,11 @@ public: SMDS_ElemIteratorPtr SMDS_MeshNode:: GetInverseElementIterator(SMDSAbs_ElementType type) const { +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID); +#else vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); +#endif //MESSAGE("myID " << myID << " ncells " << l.ncells); return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); } @@ -251,7 +259,11 @@ elementsIterator(SMDSAbs_ElementType type) const return SMDS_MeshElement::elementsIterator(SMDSAbs_Node); else { +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID); +#else vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); +#endif return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); } } @@ -350,7 +362,11 @@ void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME) const SMDS_MeshCell *cell = dynamic_cast (ME); assert(cell); SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks *Links = static_cast(grid->GetLinks()); +#else vtkCellLinks *Links = static_cast(grid->GetCellLinks()); +#endif Links->ResizeCellList(myVtkID, 1); Links->AddCellReference(cell->getVtkId(), myVtkID); } @@ -366,7 +382,11 @@ void SMDS_MeshNode::ClearInverseElements() bool SMDS_MeshNode::emptyInverseElements() { +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID); +#else vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); +#endif return (l.ncells == 0); } @@ -378,7 +398,11 @@ bool SMDS_MeshNode::emptyInverseElements() int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const { +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID); +#else vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); +#endif if ( type == SMDSAbs_All ) return l.ncells; diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp index a037b33af8..49b5f99cd6 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp @@ -11348,7 +11348,11 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector= 90300000000 + vtkCellLinks::Link l = static_cast(grid->GetLinks())->GetLink(oldId); +#else vtkCellLinks::Link l = static_cast(grid->GetCellLinks())->GetLink(oldId); +#endif for (int i=0; ifirst; //MESSAGE(" node " << oldId); +#if VTK_VERSION_NUMBER_QUICK >= 90300000000 + vtkCellLinks::Link l = static_cast(grid->GetLinks())->GetLink(oldId); +#else vtkCellLinks::Link l = static_cast(grid->GetCellLinks())->GetLink(oldId); +#endif for (int i = 0; i < l.ncells; i++) { int vtkId = l.cells[i]; From a1aaa15733b2bf5063ec7f6f76b77f01ce3846bf Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 16:33:07 +0200 Subject: [PATCH 044/141] Start: Update UI strings for consistency --- src/Mod/Start/Gui/AppStartGui.cpp | 2 +- src/Mod/Start/Gui/DlgStartPreferences.ui | 8 ++++---- src/Mod/Start/Gui/FirstStartWidget.cpp | 4 ++-- src/Mod/Start/Gui/Manipulator.cpp | 2 +- src/Mod/Start/Gui/StartView.cpp | 20 ++++++++++---------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Mod/Start/Gui/AppStartGui.cpp b/src/Mod/Start/Gui/AppStartGui.cpp index 6e0a02ed46..99caa2ab26 100644 --- a/src/Mod/Start/Gui/AppStartGui.cpp +++ b/src/Mod/Start/Gui/AppStartGui.cpp @@ -119,7 +119,7 @@ PyMOD_INIT_FUNC(StartGui) static StartGui::StartLauncher* launcher = new StartGui::StartLauncher(); Q_UNUSED(launcher) - Base::Console().log("Loading GUI of Start module... "); + Base::Console().log("Loading GUI of Start module… "); PyObject* mod = StartGui::initModule(); auto manipulator = std::make_shared(); Gui::WorkbenchManipulator::installManipulator(manipulator); diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index f48f860d30..c36a535538 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -45,7 +45,7 @@ An optional custom folder to be displayed on the Start page. -By using ";;" to separate paths, you can add several folders here. +Multiple folders can be added using ";;" to separate paths. Gui::FileChooser::Directory @@ -61,7 +61,7 @@ By using ";;" to separate paths, you can add several folders here. - If you want the examples to show on the first page + Shows example files on the start page Qt::RightToLeft @@ -83,7 +83,7 @@ By using ";;" to separate paths, you can add several folders here. - If the additional folder contents should include only .FCStd files + Show only FreeCAD files in additional folder Qt::RightToLeft @@ -111,7 +111,7 @@ By using ";;" to separate paths, you can add several folders here. - If checked, will automatically close the Start page when FreeCAD launches + The start page is closed automatically when FreeCAD launches Qt::RightToLeft diff --git a/src/Mod/Start/Gui/FirstStartWidget.cpp b/src/Mod/Start/Gui/FirstStartWidget.cpp index 324bdd080a..59c8ef4d8c 100644 --- a/src/Mod/Start/Gui/FirstStartWidget.cpp +++ b/src/Mod/Start/Gui/FirstStartWidget.cpp @@ -96,6 +96,6 @@ void FirstStartWidget::retranslateUi() _welcomeLabel->setText(QLatin1String("

") + tr("Welcome to %1").arg(application) + QLatin1String("

")); _descriptionLabel->setText( - tr("To get started, set your basic configuration options below.") + QLatin1String(" ") - + tr("These options (and many more) can be changed later in Preferences.")); + tr("Set your basic configuration options below.") + QLatin1String(" ") + + tr("These options (and many more) can be changed later in the preferences.")); } diff --git a/src/Mod/Start/Gui/Manipulator.cpp b/src/Mod/Start/Gui/Manipulator.cpp index f49af09e50..9c4662d597 100644 --- a/src/Mod/Start/Gui/Manipulator.cpp +++ b/src/Mod/Start/Gui/Manipulator.cpp @@ -46,7 +46,7 @@ CmdStart::CmdStart() sAppModule = "Start"; sGroup = QT_TR_NOOP("Start"); sMenuText = QT_TR_NOOP("&Start Page"); - sToolTipText = QT_TR_NOOP("Displays the Start Page"); + sToolTipText = QT_TR_NOOP("Displays the start page"); sWhatsThis = "Start_Start"; sStatusTip = sToolTipText; sPixmap = "StartCommandIcon"; diff --git a/src/Mod/Start/Gui/StartView.cpp b/src/Mod/Start/Gui/StartView.cpp index ce8c25d3a9..7035175292 100644 --- a/src/Mod/Start/Gui/StartView.cpp +++ b/src/Mod/Start/Gui/StartView.cpp @@ -190,28 +190,28 @@ StartView::StartView(QWidget* parent) void StartView::configureNewFileButtons(QLayout* layout) const { auto newEmptyFile = - gsl::owner(new NewFileButton({tr("Empty file"), - tr("Create a new empty FreeCAD file"), + gsl::owner(new NewFileButton({tr("Empty File"), + tr("Creates a new empty FreeCAD file"), QLatin1String(":/icons/document-new.svg")})); auto openFile = gsl::owner(new NewFileButton({tr("Open File"), - tr("Open an existing CAD file or 3D model"), + tr("Opens an existing CAD file or 3D model"), QLatin1String(":/icons/document-open.svg")})); auto partDesign = gsl::owner( - new NewFileButton({tr("Parametric Part"), - tr("Create a part with the Part Design workbench"), + new NewFileButton({tr("Parametric Body"), + tr("Creates a body with the Part Design workbench"), QLatin1String(":/icons/PartDesignWorkbench.svg")})); auto assembly = gsl::owner( new NewFileButton({tr("Assembly"), - tr("Create an assembly project"), + tr("Creates an assembly project"), QLatin1String(":/icons/AssemblyWorkbench.svg")})); auto draft = gsl::owner( new NewFileButton({tr("2D Draft"), - tr("Create a 2D Draft with the Draft workbench"), + tr("Creates a 2D draft document"), QLatin1String(":/icons/DraftWorkbench.svg")})); auto arch = gsl::owner(new NewFileButton({tr("BIM/Architecture"), - tr("Create an architectural project"), + tr("Creates an architectural project"), QLatin1String(":/icons/BIMWorkbench.svg")})); // TODO: Ensure all of the required WBs are actually available @@ -455,7 +455,7 @@ void StartView::retranslateUi() } QString application = QString::fromUtf8(App::Application::Config()["ExeName"].c_str()); - _openFirstStart->setText(tr("Open first start setup")); + _openFirstStart->setText(tr("Open First Start Setup")); _showOnStartupCheckBox->setText( - tr("Don't show this Start page again (start with blank screen)")); + tr("Do not show this Start page again (start with blank screen)")); } From c23e48aa6b497b33c046efa3079ea9c79bfdd6e1 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 29 Jun 2025 21:11:30 +0200 Subject: [PATCH 045/141] Contributing: Add requirement to clearly mark ownership for cherry-picked PRs (#22001) * Contributing: Add requirement to clearly mark ownership for cherry-picked PRs --------- Co-authored-by: Chris Hennes Co-authored-by: Furgo <148809153+furgo16@users.noreply.github.com> --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85ca8be3c9..c9ea701320 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,7 +58,11 @@ The FreeCAD Contribution Process is expressed here with the following specific g 10. Changes that break python API used by extensions SHALL be avoided. If it is not possible to avoid breaking changes, the amount of them MUST be minimized and PR MUST clearly describe all breaking changes with clear description on how to replace no longer working solution with newer one. Contributor SHOULD search for addons that will be broken and list them in the PR. 11. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION. 12. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state. -13. A “Valid PR” is one which satisfies the above requirements. +13. If a PR contains the work of another author (for example, if it is cherry-picked from a fork by someone other than the PR-submitter): + 1. the PR description MUST contain proper attribution as the first line, for example: "This is work of XYZ cherry-picked from "; + 2. all commits MUST have proper authorship, i.e. be authored by the original author and committed by the author of the PR; + 3. if changes to cherry-picked commits are necessary they SHOULD be done as follow-up commits. If it is not possible to do so, then the modified commits MUST contain a `Co-Authored-By` trailer in their commit message. +14. A “Valid PR” is one which satisfies the above requirements. ## 6. Process From d152bda85326431f35f42555df5ffe17d43c0fc4 Mon Sep 17 00:00:00 2001 From: Karliss Date: Wed, 18 Jun 2025 15:31:12 +0300 Subject: [PATCH 046/141] Sketcher: fix Esc can leave setting synchronization --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 353cc55d7d..317ca5ea1b 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -292,7 +292,7 @@ void ViewProviderSketch::ParameterObserver::initParameters() updateBoolProperty(string, property, true); }, &Client.AvoidRedundant}}, - {"updateEscapeKeyBehaviour", + {"LeaveSketchWithEscape", {[this](const std::string& string, App::Property* property) { updateEscapeKeyBehaviour(string, property); }, From 8ca70076836780886667a08cf82e0a57b3ac8d09 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 15:53:04 +0200 Subject: [PATCH 047/141] Inspection: Update UI strings for consistency --- src/Mod/Inspection/App/AppInspection.cpp | 2 +- src/Mod/Inspection/App/InspectionFeature.cpp | 4 ++-- src/Mod/Inspection/Gui/AppInspectionGui.cpp | 2 +- src/Mod/Inspection/Gui/Command.cpp | 10 +++++----- src/Mod/Inspection/Gui/ViewProviderInspection.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Mod/Inspection/App/AppInspection.cpp b/src/Mod/Inspection/App/AppInspection.cpp index acbbfa5191..13ed115ee6 100644 --- a/src/Mod/Inspection/App/AppInspection.cpp +++ b/src/Mod/Inspection/App/AppInspection.cpp @@ -57,7 +57,7 @@ PyMOD_INIT_FUNC(Inspection) // // PyObject* mod = Inspection::initModule(); - Base::Console().log("Loading Inspection module... done\n"); + Base::Console().log("Loading Inspection module… done\n"); // clang-format off Inspection::PropertyDistanceList ::init(); Inspection::Feature ::init(); diff --git a/src/Mod/Inspection/App/InspectionFeature.cpp b/src/Mod/Inspection/App/InspectionFeature.cpp index b21cc2dbbe..3b5aadcb13 100644 --- a/src/Mod/Inspection/App/InspectionFeature.cpp +++ b/src/Mod/Inspection/App/InspectionFeature.cpp @@ -869,7 +869,7 @@ App::DocumentObjectExecReturn* Feature::execute() DistanceInspection insp(this->SearchRadius.getValue(), actual, inspectNominal); unsigned long count = actual->countPoints(); std::stringstream str; - str << "Inspecting " << this->Label.getValue() << "..."; + str << "Inspecting " << this->Label.getValue() << "…"; Base::SequencerLauncher seq(str.str().c_str(), count); std::vector vals(count); @@ -958,7 +958,7 @@ App::DocumentObjectExecReturn* Feature::execute() else { // Single-threaded operation std::stringstream str; - str << "Inspecting " << this->Label.getValue() << "..."; + str << "Inspecting " << this->Label.getValue() << "…"; Base::SequencerLauncher seq(str.str().c_str(), count); for (unsigned int i = 0; i < count; i++) { diff --git a/src/Mod/Inspection/Gui/AppInspectionGui.cpp b/src/Mod/Inspection/Gui/AppInspectionGui.cpp index d19ececdb5..a1bda821b0 100644 --- a/src/Mod/Inspection/Gui/AppInspectionGui.cpp +++ b/src/Mod/Inspection/Gui/AppInspectionGui.cpp @@ -78,6 +78,6 @@ PyMOD_INIT_FUNC(InspectionGui) // PyObject* mod = InspectionGui::initModule(); - Base::Console().log("Loading GUI of Inspection module... done\n"); + Base::Console().log("Loading GUI of Inspection module… done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Inspection/Gui/Command.cpp b/src/Mod/Inspection/Gui/Command.cpp index 4089a27955..29ab5bec00 100644 --- a/src/Mod/Inspection/Gui/Command.cpp +++ b/src/Mod/Inspection/Gui/Command.cpp @@ -46,9 +46,9 @@ CmdVisualInspection::CmdVisualInspection() { sAppModule = "Inspection"; sGroup = QT_TR_NOOP("Inspection"); - sMenuText = QT_TR_NOOP("Visual inspection..."); - sToolTipText = QT_TR_NOOP("Visual inspection"); - sStatusTip = QT_TR_NOOP("Visual inspection"); + sMenuText = QT_TR_NOOP("Visual Inspection…"); + sToolTipText = QT_TR_NOOP("Inspects the objects visually"); + sStatusTip = sToolTipText; sWhatsThis = "Inspection_VisualInspection"; } @@ -72,8 +72,8 @@ CmdInspectElement::CmdInspectElement() { sAppModule = "Inspection"; sGroup = QT_TR_NOOP("Inspection"); - sMenuText = QT_TR_NOOP("Inspection..."); - sToolTipText = QT_TR_NOOP("Get distance information"); + sMenuText = QT_TR_NOOP("Inspection…"); + sToolTipText = QT_TR_NOOP("Inspects distance information"); sWhatsThis = "Inspection_InspectElement"; sStatusTip = sToolTipText; sPixmap = "inspect_pipette"; diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index b4b666525d..cd0728be80 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -561,7 +561,7 @@ void ViewProviderInspection::inspectCallback(void* ud, SoEventCallback* n) QAction* fl = menu.addAction(QObject::tr("Annotation")); fl->setCheckable(true); fl->setChecked(addflag); - QAction* cl = menu.addAction(QObject::tr("Leave info mode")); + QAction* cl = menu.addAction(QObject::tr("Leave Info Mode")); QAction* id = menu.exec(QCursor::pos()); if (fl == id) { addflag = fl->isChecked(); From 668d4c5d455de0089c1e88a7338ccf42f5723d55 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 13:24:54 +0200 Subject: [PATCH 048/141] Points: Update UI strings for consistency --- src/Mod/Points/App/AppPoints.cpp | 2 +- src/Mod/Points/App/PointsAlgos.cpp | 2 +- src/Mod/Points/Gui/AppPointsGui.cpp | 2 +- src/Mod/Points/Gui/Command.cpp | 34 +++++++++++++------------- src/Mod/Points/Gui/DlgPointsRead.ui | 38 ++++++++++++++--------------- src/Mod/Points/Gui/Workbench.cpp | 6 ++--- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/Mod/Points/App/AppPoints.cpp b/src/Mod/Points/App/AppPoints.cpp index b367009ac0..06c29385b0 100644 --- a/src/Mod/Points/App/AppPoints.cpp +++ b/src/Mod/Points/App/AppPoints.cpp @@ -42,7 +42,7 @@ PyMOD_INIT_FUNC(Points) { // clang-format off PyObject* pointsModule = Points::initModule(); - Base::Console().log("Loading Points module... done\n"); + Base::Console().log("Loading Points module… done\n"); // add python types Base::Interpreter().addType(&Points::PointsPy::Type, pointsModule, "Points"); diff --git a/src/Mod/Points/App/PointsAlgos.cpp b/src/Mod/Points/App/PointsAlgos.cpp index 9ef92cb80a..b09781805d 100644 --- a/src/Mod/Points/App/PointsAlgos.cpp +++ b/src/Mod/Points/App/PointsAlgos.cpp @@ -89,7 +89,7 @@ void PointsAlgos::LoadAscii(PointKernel& points, const char* FileName) // resize the PointKernel points.resize(LineCnt); - Base::SequencerLauncher seq("Loading points...", LineCnt); + Base::SequencerLauncher seq("Loading points…", LineCnt); // again to the beginning Base::ifstream file(fi, std::ios::in); diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp index 303ec357c9..359430780f 100644 --- a/src/Mod/Points/Gui/AppPointsGui.cpp +++ b/src/Mod/Points/Gui/AppPointsGui.cpp @@ -81,7 +81,7 @@ PyMOD_INIT_FUNC(PointsGui) PyMOD_Return(nullptr); } - Base::Console().log("Loading GUI of Points module... done\n"); + Base::Console().log("Loading GUI of Points module… done\n"); PyObject* mod = PointsGui::initModule(); // instantiating the commands diff --git a/src/Mod/Points/Gui/Command.cpp b/src/Mod/Points/Gui/Command.cpp index 3250fb6e35..d35a23b0d4 100644 --- a/src/Mod/Points/Gui/Command.cpp +++ b/src/Mod/Points/Gui/Command.cpp @@ -66,10 +66,10 @@ CmdPointsImport::CmdPointsImport() { sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Import points..."); + sMenuText = QT_TR_NOOP("Import Points…"); sToolTipText = QT_TR_NOOP("Imports a point cloud"); sWhatsThis = "Points_Import"; - sStatusTip = QT_TR_NOOP("Imports a point cloud"); + sStatusTip = sToolTipText; sPixmap = "Points_Import_Point_cloud"; } @@ -117,7 +117,7 @@ void CmdPointsImport::activated(int iMsg) msgBox.setWindowTitle(QObject::tr("Points not at Origin")); msgBox.setText(QObject::tr( "The Bounding Box of the imported points does not contain the origin. " - "Do you want to translate it to the origin?")); + "Translate it to the origin?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); auto ret = msgBox.exec(); @@ -151,7 +151,7 @@ CmdPointsExport::CmdPointsExport() { sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Export points..."); + sMenuText = QT_TR_NOOP("Export Points…"); sToolTipText = QT_TR_NOOP("Exports a point cloud"); sWhatsThis = "Points_Export"; sStatusTip = QT_TR_NOOP("Exports a point cloud"); @@ -199,9 +199,9 @@ CmdPointsTransform::CmdPointsTransform() sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); sMenuText = QT_TR_NOOP("Transform Points"); - sToolTipText = QT_TR_NOOP("Test to transform a point cloud"); + sToolTipText = QT_TR_NOOP("Tests to transform a point cloud"); sWhatsThis = "Points_Transform"; - sStatusTip = QT_TR_NOOP("Test to transform a point cloud"); + sStatusTip = sToolTipText; sPixmap = "Test1"; } @@ -237,10 +237,10 @@ CmdPointsConvert::CmdPointsConvert() { sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Convert to points..."); - sToolTipText = QT_TR_NOOP("Convert to points"); + sMenuText = QT_TR_NOOP("Convert to Points…"); + sToolTipText = QT_TR_NOOP("Converts to points"); sWhatsThis = "Points_Convert"; - sStatusTip = QT_TR_NOOP("Convert to points"); + sStatusTip = sToolTipText; sPixmap = "Points_Convert"; } @@ -325,10 +325,10 @@ CmdPointsPolyCut::CmdPointsPolyCut() { sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Cut point cloud"); + sMenuText = QT_TR_NOOP("Cut Point Cloud"); sToolTipText = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); sWhatsThis = "Points_PolyCut"; - sStatusTip = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); + sStatusTip = sToolTipText; sPixmap = "PolygonPick"; } @@ -373,10 +373,10 @@ CmdPointsMerge::CmdPointsMerge() { sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Merge point clouds"); - sToolTipText = QT_TR_NOOP("Merge several point clouds into one"); + sMenuText = QT_TR_NOOP("Merge Point Clouds"); + sToolTipText = QT_TR_NOOP("Merges several point clouds into one"); sWhatsThis = "Points_Merge"; - sStatusTip = QT_TR_NOOP("Merge several point clouds into one"); + sStatusTip = sToolTipText; sPixmap = "Points_Merge"; } @@ -435,10 +435,10 @@ CmdPointsStructure::CmdPointsStructure() { sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Structured point cloud"); - sToolTipText = QT_TR_NOOP("Convert points to structured point cloud"); + sMenuText = QT_TR_NOOP("Structured Point Cloud"); + sToolTipText = QT_TR_NOOP("Convert points to a structured point cloud"); sWhatsThis = "Points_Structure"; - sStatusTip = QT_TR_NOOP("Convert points to structured point cloud"); + sStatusTip = sToolTipText; sPixmap = "Points_Structure"; } diff --git a/src/Mod/Points/Gui/DlgPointsRead.ui b/src/Mod/Points/Gui/DlgPointsRead.ui index 72c1aaac35..5818037d06 100644 --- a/src/Mod/Points/Gui/DlgPointsRead.ui +++ b/src/Mod/Points/Gui/DlgPointsRead.ui @@ -11,7 +11,7 @@
- ASCII points import + ASCII Points Import @@ -31,7 +31,7 @@ - Template: + Template @@ -43,7 +43,7 @@ - Special lines + Special Lines @@ -55,7 +55,7 @@ - First line: + First Line @@ -98,7 +98,7 @@ - Cluster by lines starting with: + Cluster by lines starting with @@ -108,7 +108,7 @@ - Ignore lines starting with: + Ignore lines starting with @@ -123,7 +123,7 @@ - Point format + Point Format @@ -143,7 +143,7 @@ - Number separator: + Number separator @@ -177,7 +177,7 @@ - Points format: + Points format @@ -198,7 +198,7 @@ - Next block: + Next block @@ -206,7 +206,7 @@ - none + None @@ -226,7 +226,7 @@ - I (Gray value) + I (gray value) @@ -234,7 +234,7 @@ - Next block: + Next block @@ -242,7 +242,7 @@ - none + None @@ -262,7 +262,7 @@ - I (Gray value) + I (gray value) @@ -270,7 +270,7 @@ - Next block: + Next block @@ -278,7 +278,7 @@ - none + None @@ -298,7 +298,7 @@ - I (Gray value) + I (gray value) @@ -338,7 +338,7 @@ - Number of previewed lines: + Number of previewed lines diff --git a/src/Mod/Points/Gui/Workbench.cpp b/src/Mod/Points/Gui/Workbench.cpp index 61b420c97c..1b16f7b273 100644 --- a/src/Mod/Points/Gui/Workbench.cpp +++ b/src/Mod/Points/Gui/Workbench.cpp @@ -31,7 +31,7 @@ using namespace PointsGui; #if 0 // needed for Qt's lupdate utility - qApp->translate("Workbench", "Points tools"); + qApp->translate("Workbench", "Points Tools"); qApp->translate("Workbench", "&Points"); #endif @@ -46,7 +46,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const { Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root); - pnt->setCommand("Points tools"); + pnt->setCommand("Points Tools"); *pnt << "Points_Import" << "Points_Export" << "Separator" @@ -62,7 +62,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const // point tools Gui::ToolBarItem* root = new Gui::ToolBarItem; Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root); - pnt->setCommand("Points tools"); + pnt->setCommand("Points Tools"); *pnt << "Points_Import" << "Points_Export" << "Points_Convert" From a7344b0f788b83d2f875bf979d22acd72622a8f4 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:28:46 +0200 Subject: [PATCH 049/141] Update src/Mod/Points/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Points/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Points/Gui/Command.cpp b/src/Mod/Points/Gui/Command.cpp index d35a23b0d4..2f42ceff49 100644 --- a/src/Mod/Points/Gui/Command.cpp +++ b/src/Mod/Points/Gui/Command.cpp @@ -116,7 +116,7 @@ void CmdPointsImport::activated(int iMsg) msgBox.setIcon(QMessageBox::Question); msgBox.setWindowTitle(QObject::tr("Points not at Origin")); msgBox.setText(QObject::tr( - "The Bounding Box of the imported points does not contain the origin. " + "The bounding box of the imported points does not contain the origin. " "Translate it to the origin?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); From 43d63ecfeca0b944d9d332d75410c9491c1d5519 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:28:51 +0200 Subject: [PATCH 050/141] Update src/Mod/Points/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Points/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Points/Gui/Command.cpp b/src/Mod/Points/Gui/Command.cpp index 2f42ceff49..3d85db67c0 100644 --- a/src/Mod/Points/Gui/Command.cpp +++ b/src/Mod/Points/Gui/Command.cpp @@ -199,7 +199,7 @@ CmdPointsTransform::CmdPointsTransform() sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); sMenuText = QT_TR_NOOP("Transform Points"); - sToolTipText = QT_TR_NOOP("Tests to transform a point cloud"); + sToolTipText = QT_TR_NOOP("Performs tests to transform a point cloud"); sWhatsThis = "Points_Transform"; sStatusTip = sToolTipText; sPixmap = "Test1"; From 2e28cb38ef4737985929c3be9f2bbc38e17bde4f Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:28:56 +0200 Subject: [PATCH 051/141] Update src/Mod/Points/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Points/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Points/Gui/Command.cpp b/src/Mod/Points/Gui/Command.cpp index 3d85db67c0..56585f320f 100644 --- a/src/Mod/Points/Gui/Command.cpp +++ b/src/Mod/Points/Gui/Command.cpp @@ -326,7 +326,7 @@ CmdPointsPolyCut::CmdPointsPolyCut() sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); sMenuText = QT_TR_NOOP("Cut Point Cloud"); - sToolTipText = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); + sToolTipText = QT_TR_NOOP("Cuts a point cloud with a selected polygon"); sWhatsThis = "Points_PolyCut"; sStatusTip = sToolTipText; sPixmap = "PolygonPick"; From acc790cabff9321ee04572d163f53a9c4e8ff7b4 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:29:01 +0200 Subject: [PATCH 052/141] Update src/Mod/Points/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Points/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Points/Gui/Command.cpp b/src/Mod/Points/Gui/Command.cpp index 56585f320f..e6eff2757f 100644 --- a/src/Mod/Points/Gui/Command.cpp +++ b/src/Mod/Points/Gui/Command.cpp @@ -436,7 +436,7 @@ CmdPointsStructure::CmdPointsStructure() sAppModule = "Points"; sGroup = QT_TR_NOOP("Points"); sMenuText = QT_TR_NOOP("Structured Point Cloud"); - sToolTipText = QT_TR_NOOP("Convert points to a structured point cloud"); + sToolTipText = QT_TR_NOOP("Converts points to a structured point cloud"); sWhatsThis = "Points_Structure"; sStatusTip = sToolTipText; sPixmap = "Points_Structure"; From f59398e6a0d68932f5faa90e3e1f9b5584c6dfd3 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 13:59:08 +0200 Subject: [PATCH 053/141] Mesh: Update UI strings for consistency --- src/Mod/Mesh/App/AppMeshPy.cpp | 2 +- src/Mod/Mesh/App/MeshPy.xml | 2 +- src/Mod/Mesh/Gui/AppMeshGui.cpp | 2 +- src/Mod/Mesh/Gui/Command.cpp | 188 ++++++++++---------- src/Mod/Mesh/Gui/DlgEvaluateMesh.ui | 8 +- src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp | 2 +- src/Mod/Mesh/Gui/DlgEvaluateSettings.ui | 2 +- src/Mod/Mesh/Gui/DlgRegularSolid.ui | 42 ++--- src/Mod/Mesh/Gui/DlgSettingsImportExport.ui | 4 +- src/Mod/Mesh/Gui/DlgSettingsMeshView.ui | 4 +- src/Mod/Mesh/Gui/DlgSmoothing.ui | 6 +- src/Mod/Mesh/Gui/MeshEditor.cpp | 4 +- src/Mod/Mesh/Gui/RemeshGmsh.cpp | 2 +- src/Mod/Mesh/Gui/RemeshGmsh.ui | 10 +- src/Mod/Mesh/Gui/RemoveComponents.ui | 10 +- src/Mod/Mesh/Gui/Segmentation.ui | 10 +- src/Mod/Mesh/Gui/SegmentationBestFit.cpp | 2 +- src/Mod/Mesh/Gui/SegmentationBestFit.ui | 8 +- src/Mod/Mesh/Gui/Selection.ui | 2 +- src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp | 4 +- src/Mod/Mesh/Gui/ViewProvider.cpp | 16 +- src/Mod/Mesh/Gui/ViewProviderCurvature.cpp | 2 +- src/Mod/Mesh/Gui/Workbench.cpp | 40 ++--- 23 files changed, 186 insertions(+), 186 deletions(-) diff --git a/src/Mod/Mesh/App/AppMeshPy.cpp b/src/Mod/Mesh/App/AppMeshPy.cpp index 0bf62df25a..5d1bc69b3e 100644 --- a/src/Mod/Mesh/App/AppMeshPy.cpp +++ b/src/Mod/Mesh/App/AppMeshPy.cpp @@ -275,7 +275,7 @@ private: exporter = std::make_unique(outputFileName, exportFormat); } else { - std::string exStr("Can't determine mesh format from file name.\nPlease specify mesh " + std::string exStr("Cannot determine mesh format from file name.\nSpecify mesh " "format file extension: '"); exStr += outputFileName + "'"; throw Py::ValueError(exStr.c_str()); diff --git a/src/Mod/Mesh/App/MeshPy.xml b/src/Mod/Mesh/App/MeshPy.xml index f565f11ab8..ad4b52f713 100644 --- a/src/Mod/Mesh/App/MeshPy.xml +++ b/src/Mod/Mesh/App/MeshPy.xml @@ -176,7 +176,7 @@ lines = mesh.section(mesh2, [ConnectLines=True, MinDist=0.0001]) movePoint(int, Vector) This method moves the point in the mesh along the given vector. This affects the geometry of the mesh. - Be aware that after moving point(s) the mesh can + Be aware that after moving points the mesh can have self intersections! diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp index a5fb88d494..a4c6e7a419 100644 --- a/src/Mod/Mesh/Gui/AppMeshGui.cpp +++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp @@ -135,7 +135,7 @@ PyMOD_INIT_FUNC(MeshGui) PyMOD_Return(nullptr); } PyObject* mod = MeshGui::initModule(); - Base::Console().log("Loading GUI of Mesh module... done\n"); + Base::Console().log("Loading GUI of Mesh module… done\n"); // instantiating the commands CreateMeshCommands(); diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index 6f6212780e..7a3a9a093d 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -84,9 +84,9 @@ CmdMeshUnion::CmdMeshUnion() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Union"); - sToolTipText = sMenuText; + sToolTipText = QT_TR_NOOP("Unions the selected meshes"); sWhatsThis = "Mesh_Union"; - sStatusTip = sMenuText; + sStatusTip = sToolTipText; sPixmap = "Mesh_Union"; } @@ -142,8 +142,8 @@ void CmdMeshUnion::activated(int) Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), qApp->translate("Mesh_Union", - "OpenSCAD cannot be found on your system.\n" - "Please visit http://www.openscad.org/index.html to install it.")); + "OpenSCAD cannot be found on the system.\n" + "Visit http://www.openscad.org/index.html to install it.")); } } } @@ -163,9 +163,9 @@ CmdMeshDifference::CmdMeshDifference() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Difference"); - sToolTipText = sMenuText; + sToolTipText = QT_TR_NOOP("Creates the boolean difference of the selected meshes"); sWhatsThis = "Mesh_Difference"; - sStatusTip = sMenuText; + sStatusTip = sToolTipText; sPixmap = "Mesh_Difference"; } @@ -221,8 +221,8 @@ void CmdMeshDifference::activated(int) Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), qApp->translate("Mesh_Union", - "OpenSCAD cannot be found on your system.\n" - "Please visit http://www.openscad.org/index.html to install it.")); + "OpenSCAD cannot be found on the system.\n" + "Visit http://www.openscad.org/index.html to install it.")); } } } @@ -242,9 +242,9 @@ CmdMeshIntersection::CmdMeshIntersection() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Intersection"); - sToolTipText = sMenuText; + sToolTipText = QT_TR_NOOP("Intersects the selected meshes"); sWhatsThis = "Mesh_Intersection"; - sStatusTip = sMenuText; + sStatusTip = sToolTipText; sPixmap = "Mesh_Intersection"; } @@ -300,8 +300,8 @@ void CmdMeshIntersection::activated(int) Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), qApp->translate("Mesh_Union", - "OpenSCAD cannot be found on your system.\n" - "Please visit http://www.openscad.org/index.html to install it.")); + "OpenSCAD cannot be found on the system.\n" + "Visit http://www.openscad.org/index.html to install it.")); } } } @@ -320,10 +320,10 @@ CmdMeshImport::CmdMeshImport() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Import mesh..."); - sToolTipText = QT_TR_NOOP("Imports a mesh from file"); + sMenuText = QT_TR_NOOP("Import Mesh…"); + sToolTipText = QT_TR_NOOP("Imports a mesh from a file"); sWhatsThis = "Mesh_Import"; - sStatusTip = QT_TR_NOOP("Imports a mesh from file"); + sStatusTip = sToolTipText; sPixmap = "Mesh_Import"; } @@ -373,10 +373,10 @@ CmdMeshExport::CmdMeshExport() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Export mesh..."); - sToolTipText = QT_TR_NOOP("Exports a mesh to file"); + sMenuText = QT_TR_NOOP("Export Mesh…"); + sToolTipText = QT_TR_NOOP("Exports a mesh to a file"); sWhatsThis = "Mesh_Export"; - sStatusTip = QT_TR_NOOP("Exports a mesh to file"); + sStatusTip = sToolTipText; sPixmap = "Mesh_Export"; } @@ -456,10 +456,10 @@ CmdMeshFromGeometry::CmdMeshFromGeometry() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh from geometry..."); - sToolTipText = QT_TR_NOOP("Create mesh from the selected geometry"); + sMenuText = QT_TR_NOOP("Mesh From Geometry…"); + sToolTipText = QT_TR_NOOP("Creates a mesh from the selected geometry"); sWhatsThis = "Mesh_FromGeometry"; - sStatusTip = QT_TR_NOOP("Create mesh from the selected geometry"); + sStatusTip = sToolTipText; } void CmdMeshFromGeometry::activated(int) @@ -527,8 +527,8 @@ CmdMeshFromPartShape::CmdMeshFromPartShape() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh from shape..."); - sToolTipText = QT_TR_NOOP("Tessellate shape"); + sMenuText = QT_TR_NOOP("Mesh From Shape…"); + sToolTipText = QT_TR_NOOP("Tessellates the selected shape to a mesh"); sWhatsThis = "Mesh_FromPartShape"; sStatusTip = sToolTipText; sPixmap = "Mesh_FromPartShape.svg"; @@ -553,10 +553,10 @@ CmdMeshVertexCurvature::CmdMeshVertexCurvature() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Curvature plot"); + sMenuText = QT_TR_NOOP("Curvature Plot"); sToolTipText = QT_TR_NOOP("Calculates the curvature of the vertices of a mesh"); sWhatsThis = "Mesh_VertexCurvature"; - sStatusTip = QT_TR_NOOP("Calculates the curvature of the vertices of a mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_VertexCurvature"; } @@ -608,10 +608,10 @@ CmdMeshVertexCurvatureInfo::CmdMeshVertexCurvatureInfo() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Curvature info"); - sToolTipText = QT_TR_NOOP("Information about curvature"); + sMenuText = QT_TR_NOOP("Curvature Info"); + sToolTipText = QT_TR_NOOP("Displays information about the curvature"); sWhatsThis = "Mesh_CurvatureInfo"; - sStatusTip = QT_TR_NOOP("Information about curvature"); + sStatusTip = sToolTipText; sPixmap = "Mesh_CurvatureInfo"; } @@ -656,10 +656,10 @@ CmdMeshPolySegm::CmdMeshPolySegm() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Make segment"); + sMenuText = QT_TR_NOOP("Segment"); sToolTipText = QT_TR_NOOP("Creates a mesh segment"); sWhatsThis = "Mesh_PolySegm"; - sStatusTip = QT_TR_NOOP("Creates a mesh segment"); + sStatusTip = sToolTipText; sPixmap = "PolygonPick"; } @@ -715,10 +715,10 @@ CmdMeshAddFacet::CmdMeshAddFacet() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Add triangle"); - sToolTipText = QT_TR_NOOP("Add triangle manually to a mesh"); + sMenuText = QT_TR_NOOP("Triangle"); + sToolTipText = QT_TR_NOOP("Adds a triangle manually to a mesh"); sWhatsThis = "Mesh_AddFacet"; - sStatusTip = QT_TR_NOOP("Add triangle manually to a mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_AddFacet"; } @@ -764,10 +764,10 @@ CmdMeshPolyCut::CmdMeshPolyCut() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Cut mesh"); - sToolTipText = QT_TR_NOOP("Cuts a mesh with a picked polygon"); + sMenuText = QT_TR_NOOP("Cut"); + sToolTipText = QT_TR_NOOP("Cuts the mesh with a selected polygon"); sWhatsThis = "Mesh_PolyCut"; - sStatusTip = QT_TR_NOOP("Cuts a mesh with a picked polygon"); + sStatusTip = sToolTipText; sPixmap = "Mesh_PolyCut"; } @@ -829,7 +829,7 @@ CmdMeshPolyTrim::CmdMeshPolyTrim() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Trim mesh"); + sMenuText = QT_TR_NOOP("Trim"); sToolTipText = QT_TR_NOOP("Trims a mesh with a picked polygon"); sWhatsThis = "Mesh_PolyTrim"; sStatusTip = QT_TR_NOOP("Trims a mesh with a picked polygon"); @@ -894,9 +894,9 @@ CmdMeshTrimByPlane::CmdMeshTrimByPlane() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Trim mesh with a plane"); + sMenuText = QT_TR_NOOP("Trim With Plane"); sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); - sStatusTip = QT_TR_NOOP("Trims a mesh with a plane"); + sStatusTip = sToolTipText; sPixmap = "Mesh_TrimByPlane"; } @@ -923,9 +923,9 @@ CmdMeshSectionByPlane::CmdMeshSectionByPlane() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create section from mesh and plane"); - sToolTipText = QT_TR_NOOP("Section from mesh and plane"); - sStatusTip = QT_TR_NOOP("Section from mesh and plane"); + sMenuText = QT_TR_NOOP("Section From Plane"); + sToolTipText = QT_TR_NOOP("Sections the mesh with the selected plane"); + sStatusTip = sToolTipText; sPixmap = "Mesh_SectionByPlane"; } @@ -952,9 +952,9 @@ CmdMeshCrossSections::CmdMeshCrossSections() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Cross-sections..."); - sToolTipText = QT_TR_NOOP("Cross-sections"); - sStatusTip = QT_TR_NOOP("Cross-sections"); + sMenuText = QT_TR_NOOP("Cross-Sections…"); + sToolTipText = QT_TR_NOOP("Cross-sections the mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_CrossSections"; } @@ -981,10 +981,10 @@ CmdMeshPolySplit::CmdMeshPolySplit() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Split mesh"); + sMenuText = QT_TR_NOOP("Split"); sToolTipText = QT_TR_NOOP("Splits a mesh into two meshes"); sWhatsThis = "Mesh_PolySplit"; - sStatusTip = QT_TR_NOOP("Splits a mesh into two meshes"); + sStatusTip = sToolTipText; } void CmdMeshPolySplit::activated(int) @@ -1039,10 +1039,10 @@ CmdMeshEvaluation::CmdMeshEvaluation() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); // needs two ampersands to display one - sMenuText = QT_TR_NOOP("Evaluate and repair mesh..."); + sMenuText = QT_TR_NOOP("Evaluate and Repair…"); sToolTipText = QT_TR_NOOP("Opens a dialog to analyze and repair a mesh"); sWhatsThis = "Mesh_Evaluation"; - sStatusTip = QT_TR_NOOP("Opens a dialog to analyze and repair a mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_Evaluation"; } @@ -1083,10 +1083,10 @@ CmdMeshEvaluateFacet::CmdMeshEvaluateFacet() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Face info"); - sToolTipText = QT_TR_NOOP("Information about face"); + sMenuText = QT_TR_NOOP("Face Info"); + sToolTipText = QT_TR_NOOP("Displays information about the selected faces"); sWhatsThis = "Mesh_EvaluateFacet"; - sStatusTip = QT_TR_NOOP("Information about face"); + sStatusTip = sToolTipText; sPixmap = "Mesh_EvaluateFacet"; } @@ -1129,10 +1129,10 @@ CmdMeshRemoveComponents::CmdMeshRemoveComponents() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Remove components..."); - sToolTipText = QT_TR_NOOP("Remove topologic independent components from the mesh"); + sMenuText = QT_TR_NOOP("Remove Components…"); + sToolTipText = QT_TR_NOOP("Removes topologic independent components from the mesh"); sWhatsThis = "Mesh_RemoveComponents"; - sStatusTip = QT_TR_NOOP("Remove topologic independent components from the mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_RemoveComponents"; } @@ -1177,9 +1177,9 @@ CmdMeshRemeshGmsh::CmdMeshRemeshGmsh() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Refinement..."); - sToolTipText = QT_TR_NOOP("Refine existing mesh"); - sStatusTip = QT_TR_NOOP("Refine existing mesh"); + sMenuText = QT_TR_NOOP("Refinement…"); + sToolTipText = QT_TR_NOOP("Refines an existing mesh"); + sStatusTip = sToolTipText; sWhatsThis = "Mesh_RemeshGmsh"; sPixmap = "Mesh_RemeshGmsh"; } @@ -1211,10 +1211,10 @@ CmdMeshRemoveCompByHand::CmdMeshRemoveCompByHand() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Remove components by hand..."); - sToolTipText = QT_TR_NOOP("Mark a component to remove it from the mesh"); + sMenuText = QT_TR_NOOP("Remove Components Manually…"); + sToolTipText = QT_TR_NOOP("Marks a component to remove it from the mesh"); sWhatsThis = "Mesh_RemoveCompByHand"; - sStatusTip = QT_TR_NOOP("Mark a component to remove it from the mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_RemoveCompByHand"; } @@ -1258,10 +1258,10 @@ CmdMeshEvaluateSolid::CmdMeshEvaluateSolid() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Check solid mesh"); + sMenuText = QT_TR_NOOP("Evaluate Solid"); sToolTipText = QT_TR_NOOP("Checks whether the mesh is a solid"); sWhatsThis = "Mesh_EvaluateSolid"; - sStatusTip = QT_TR_NOOP("Checks whether the mesh is a solid"); + sStatusTip = sToolTipText; sPixmap = "Mesh_EvaluateSolid"; } @@ -1299,10 +1299,10 @@ CmdMeshSmoothing::CmdMeshSmoothing() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Smooth..."); - sToolTipText = QT_TR_NOOP("Smooth the selected meshes"); + sMenuText = QT_TR_NOOP("Smooth…"); + sToolTipText = QT_TR_NOOP("Smoothes the selected meshes"); sWhatsThis = "Mesh_Smoothing"; - sStatusTip = QT_TR_NOOP("Smooth the selected meshes"); + sStatusTip = sToolTipText; sPixmap = "Mesh_Smoothing"; } @@ -1328,10 +1328,10 @@ CmdMeshDecimating::CmdMeshDecimating() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Decimation..."); + sMenuText = QT_TR_NOOP("Decimate…"); sToolTipText = QT_TR_NOOP("Decimates a mesh"); - sWhatsThis = QT_TR_NOOP("Decimates a mesh"); - sStatusTip = QT_TR_NOOP("Decimates a mesh"); + sWhatsThis = "Mesh_Decimating"; + sStatusTip = sToolTipText; sPixmap = "Mesh_Decimating"; } @@ -1360,10 +1360,10 @@ CmdMeshHarmonizeNormals::CmdMeshHarmonizeNormals() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Harmonize normals"); + sMenuText = QT_TR_NOOP("Harmonize Normals"); sToolTipText = QT_TR_NOOP("Harmonizes the normals of the mesh"); sWhatsThis = "Mesh_HarmonizeNormals"; - sStatusTip = QT_TR_NOOP("Harmonizes the normals of the mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_HarmonizeNormals"; } @@ -1396,10 +1396,10 @@ CmdMeshFlipNormals::CmdMeshFlipNormals() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Flip normals"); - sToolTipText = QT_TR_NOOP("Flips the normals of the mesh"); + sMenuText = QT_TR_NOOP("Flip Normals"); + sToolTipText = QT_TR_NOOP("Flips the normals of the selected mesh"); sWhatsThis = "Mesh_FlipNormals"; - sStatusTip = QT_TR_NOOP("Flips the normals of the mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_FlipNormals"; } @@ -1432,10 +1432,10 @@ CmdMeshBoundingBox::CmdMeshBoundingBox() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Boundings info..."); + sMenuText = QT_TR_NOOP("Boundings Info…"); sToolTipText = QT_TR_NOOP("Shows the boundings of the selected mesh"); sWhatsThis = "Mesh_BoundingBox"; - sStatusTip = QT_TR_NOOP("Shows the boundings of the selected mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_BoundingBox"; } @@ -1484,10 +1484,10 @@ CmdMeshBuildRegularSolid::CmdMeshBuildRegularSolid() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Regular solid..."); + sMenuText = QT_TR_NOOP("Regular Solid…"); sToolTipText = QT_TR_NOOP("Builds a regular solid"); sWhatsThis = "Mesh_BuildRegularSolid"; - sStatusTip = QT_TR_NOOP("Builds a regular solid"); + sStatusTip = sToolTipText; sPixmap = "Mesh_BuildRegularSolid"; } @@ -1516,10 +1516,10 @@ CmdMeshFillupHoles::CmdMeshFillupHoles() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Fill holes..."); - sToolTipText = QT_TR_NOOP("Fill holes of the mesh"); + sMenuText = QT_TR_NOOP("Fill Holes…"); + sToolTipText = QT_TR_NOOP("Fills the holes of the mesh"); sWhatsThis = "Mesh_FillupHoles"; - sStatusTip = QT_TR_NOOP("Fill holes of the mesh"); + sStatusTip = sToolTipText; sPixmap = "Mesh_FillupHoles"; } @@ -1567,10 +1567,10 @@ CmdMeshFillInteractiveHole::CmdMeshFillInteractiveHole() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Close hole"); - sToolTipText = QT_TR_NOOP("Close holes interactively"); + sMenuText = QT_TR_NOOP("Close Holes"); + sToolTipText = QT_TR_NOOP("Closes holes interactively"); sWhatsThis = "Mesh_FillInteractiveHole"; - sStatusTip = QT_TR_NOOP("Close holes interactively"); + sStatusTip = sToolTipText; sPixmap = "Mesh_FillInteractiveHole"; } @@ -1614,10 +1614,10 @@ CmdMeshSegmentation::CmdMeshSegmentation() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh segments..."); - sToolTipText = QT_TR_NOOP("Create mesh segments"); + sMenuText = QT_TR_NOOP("Segmentation…"); + sToolTipText = QT_TR_NOOP("Creates new mesh segments"); sWhatsThis = "Mesh_Segmentation"; - sStatusTip = QT_TR_NOOP("Create mesh segments"); + sStatusTip = sToolTipText; sPixmap = "Mesh_Segmentation"; } @@ -1650,10 +1650,10 @@ CmdMeshSegmentationBestFit::CmdMeshSegmentationBestFit() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh segments from best-fit surfaces..."); - sToolTipText = QT_TR_NOOP("Create mesh segments from best-fit surfaces"); + sMenuText = QT_TR_NOOP("Segmentation From Best-Fit Surfaces…"); + sToolTipText = QT_TR_NOOP("Creates new mesh segments from the best-fit surfaces"); sWhatsThis = "Mesh_SegmentationBestFit"; - sStatusTip = QT_TR_NOOP("Create mesh segments from best-fit surfaces"); + sStatusTip = sToolTipText; sPixmap = "Mesh_SegmentationBestFit"; } @@ -1731,8 +1731,8 @@ CmdMeshSplitComponents::CmdMeshSplitComponents() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Split by components"); - sToolTipText = QT_TR_NOOP("Split selected mesh into its components"); + sMenuText = QT_TR_NOOP("Split by Components"); + sToolTipText = QT_TR_NOOP("Splits the selected mesh into its components"); sWhatsThis = "Mesh_SplitComponents"; sStatusTip = sToolTipText; sPixmap = "Mesh_SplitComponents"; @@ -1779,8 +1779,8 @@ CmdMeshScale::CmdMeshScale() { sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Scale..."); - sToolTipText = QT_TR_NOOP("Scale selected meshes"); + sMenuText = QT_TR_NOOP("Scale…"); + sToolTipText = QT_TR_NOOP("Scales the selected meshes"); sWhatsThis = "Mesh_Scale"; sStatusTip = sToolTipText; sPixmap = "Mesh_Scale"; diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMesh.ui b/src/Mod/Mesh/Gui/DlgEvaluateMesh.ui index 6e914f3f68..eed1ec682b 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMesh.ui +++ b/src/Mod/Mesh/Gui/DlgEvaluateMesh.ui @@ -20,7 +20,7 @@ - Mesh information + Mesh Information @@ -43,7 +43,7 @@ - Number of faces: + Number of faces @@ -76,7 +76,7 @@ - Number of edges: + Number of edges @@ -109,7 +109,7 @@ - Number of points: + Number of points diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp index 6ed255f1aa..00c5a2beaa 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp @@ -138,7 +138,7 @@ DlgEvaluateMeshImp::DlgEvaluateMeshImp(QWidget* parent, Qt::WindowFlags fl) d->showFoldsFunction(d->enableFoldsCheck); QPushButton* button = d->ui.buttonBox->button(QDialogButtonBox::Open); - button->setText(tr("Settings...")); + button->setText(tr("Settings…")); // try to attach to the active document this->onRefreshButtonClicked(); diff --git a/src/Mod/Mesh/Gui/DlgEvaluateSettings.ui b/src/Mod/Mesh/Gui/DlgEvaluateSettings.ui index 44a94b9238..b8240656d5 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateSettings.ui +++ b/src/Mod/Mesh/Gui/DlgEvaluateSettings.ui @@ -11,7 +11,7 @@ - Evaluation settings + Evaluation Settings diff --git a/src/Mod/Mesh/Gui/DlgRegularSolid.ui b/src/Mod/Mesh/Gui/DlgRegularSolid.ui index d8bb506ed6..5979118b29 100644 --- a/src/Mod/Mesh/Gui/DlgRegularSolid.ui +++ b/src/Mod/Mesh/Gui/DlgRegularSolid.ui @@ -26,7 +26,7 @@ - Solid: + Solid @@ -117,7 +117,7 @@ - Length: + Length @@ -140,7 +140,7 @@ - Width: + Width @@ -160,7 +160,7 @@ - Height: + Height @@ -216,7 +216,7 @@ - Radius: + Radius @@ -233,7 +233,7 @@ - Length: + Length @@ -270,7 +270,7 @@ - Edge length: + Edge length @@ -290,7 +290,7 @@ - Sampling: + Sampling @@ -350,7 +350,7 @@ - Radius 1: + Radius 1 @@ -367,7 +367,7 @@ - Radius 2: + Radius 2 @@ -384,7 +384,7 @@ - Length: + Length @@ -421,7 +421,7 @@ - Edge length: + Edge length @@ -438,7 +438,7 @@ - Sampling: + Sampling @@ -498,7 +498,7 @@ - Radius: + Radius @@ -535,7 +535,7 @@ - Sampling: + Sampling @@ -585,7 +585,7 @@ - Radius 1: + Radius 1 @@ -602,7 +602,7 @@ - Radius 2: + Radius 2 @@ -639,7 +639,7 @@ - Sampling: + Sampling @@ -689,7 +689,7 @@ - Radius 1: + Radius 1 @@ -706,7 +706,7 @@ - Radius 2: + Radius 2 @@ -743,7 +743,7 @@ - Sampling: + Sampling diff --git a/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui b/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui index 457e6a931f..2b38eb7fc6 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui +++ b/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui @@ -111,7 +111,7 @@ - Width: + Width @@ -135,7 +135,7 @@ - Height: + Height diff --git a/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui b/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui index 0834118847..87001c8c36 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui +++ b/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui @@ -11,7 +11,7 @@ - Mesh view + Mesh View @@ -32,7 +32,7 @@ - Default appearance for new meshes + Default Appearance for new Meshes diff --git a/src/Mod/Mesh/Gui/DlgSmoothing.ui b/src/Mod/Mesh/Gui/DlgSmoothing.ui index 69844eec0a..9d702b1d91 100644 --- a/src/Mod/Mesh/Gui/DlgSmoothing.ui +++ b/src/Mod/Mesh/Gui/DlgSmoothing.ui @@ -52,7 +52,7 @@ - Iterations: + Iterations @@ -69,7 +69,7 @@ - Lambda: + Lambda @@ -92,7 +92,7 @@ - Mu: + Mu diff --git a/src/Mod/Mesh/Gui/MeshEditor.cpp b/src/Mod/Mesh/Gui/MeshEditor.cpp index ef46e4d378..72cb10ec22 100644 --- a/src/Mod/Mesh/Gui/MeshEditor.cpp +++ b/src/Mod/Mesh/Gui/MeshEditor.cpp @@ -393,8 +393,8 @@ void MeshFaceAddition::addFacetCallback(void* ud, SoEventCallback* n) && mbe->getState() == SoButtonEvent::UP) { if (face->index.size() == 3) { QMenu menu; - QAction* add = menu.addAction(MeshFaceAddition::tr("Add triangle")); - QAction* swp = menu.addAction(MeshFaceAddition::tr("Flip normal")); + QAction* add = menu.addAction(MeshFaceAddition::tr("Add Triangle")); + QAction* swp = menu.addAction(MeshFaceAddition::tr("Flip Normal")); QAction* clr = menu.addAction(MeshFaceAddition::tr("Clear")); QAction* act = menu.exec(QCursor::pos()); if (act == add) { diff --git a/src/Mod/Mesh/Gui/RemeshGmsh.cpp b/src/Mod/Mesh/Gui/RemeshGmsh.cpp index 08a050a8f5..1e6f6a8121 100644 --- a/src/Mod/Mesh/Gui/RemeshGmsh.cpp +++ b/src/Mod/Mesh/Gui/RemeshGmsh.cpp @@ -240,7 +240,7 @@ void GmshWidget::started() if (!d->label) { d->label = new Gui::StatusWidget(this); d->label->setAttribute(Qt::WA_DeleteOnClose); - d->label->setStatusText(tr("Running Gmsh...")); + d->label->setStatusText(tr("Running Gmsh…")); d->label->show(); } } diff --git a/src/Mod/Mesh/Gui/RemeshGmsh.ui b/src/Mod/Mesh/Gui/RemeshGmsh.ui index 1f0eee53d3..88c74c7aa5 100644 --- a/src/Mod/Mesh/Gui/RemeshGmsh.ui +++ b/src/Mod/Mesh/Gui/RemeshGmsh.ui @@ -29,7 +29,7 @@ - Meshing: + Meshing @@ -39,7 +39,7 @@ - Max element size (0.0 = Auto): + Max element size (0.0 = Auto) @@ -65,7 +65,7 @@ - Min element size (0.0 = Auto): + Min element size (0.0 = Auto) @@ -91,7 +91,7 @@ - Angle: + Angle @@ -178,7 +178,7 @@ - Time: + Time diff --git a/src/Mod/Mesh/Gui/RemoveComponents.ui b/src/Mod/Mesh/Gui/RemoveComponents.ui index 6a144b4061..ab388b94b4 100644 --- a/src/Mod/Mesh/Gui/RemoveComponents.ui +++ b/src/Mod/Mesh/Gui/RemoveComponents.ui @@ -11,7 +11,7 @@ - Remove components + Remove Components @@ -86,7 +86,7 @@ - Pick triangle + Pick Triangle @@ -172,7 +172,7 @@ - Pick triangle + Pick Triangle @@ -189,7 +189,7 @@ - Region options + Region Options @@ -205,7 +205,7 @@ - Respect only triangles with normals facing screen + Respect only triangles with screen-facing normals true diff --git a/src/Mod/Mesh/Gui/Segmentation.ui b/src/Mod/Mesh/Gui/Segmentation.ui index fe4455f7a6..17f993b954 100644 --- a/src/Mod/Mesh/Gui/Segmentation.ui +++ b/src/Mod/Mesh/Gui/Segmentation.ui @@ -11,7 +11,7 @@ - Mesh segmentation + Mesh Segmentation @@ -106,7 +106,7 @@ - Tolerance (Flat) + Tolerance (flat) @@ -123,7 +123,7 @@ - Tolerance (Curved) + Tolerance (curved) @@ -232,7 +232,7 @@ - Max. Curvature + Maximum curvature @@ -266,7 +266,7 @@ - Min. Curvature + Minimum curvature diff --git a/src/Mod/Mesh/Gui/SegmentationBestFit.cpp b/src/Mod/Mesh/Gui/SegmentationBestFit.cpp index 5bb5cea1e4..c157e65383 100644 --- a/src/Mod/Mesh/Gui/SegmentationBestFit.cpp +++ b/src/Mod/Mesh/Gui/SegmentationBestFit.cpp @@ -170,7 +170,7 @@ ParametersDialog::ParametersDialog(std::vector& val, , parameter(std::move(par)) , myMesh(mesh) { - this->setWindowTitle(tr("Surface fit")); + this->setWindowTitle(tr("Surface Fit")); QGridLayout* gridLayout {}; gridLayout = new QGridLayout(this); diff --git a/src/Mod/Mesh/Gui/SegmentationBestFit.ui b/src/Mod/Mesh/Gui/SegmentationBestFit.ui index c777b53f46..6d7080347c 100644 --- a/src/Mod/Mesh/Gui/SegmentationBestFit.ui +++ b/src/Mod/Mesh/Gui/SegmentationBestFit.ui @@ -11,7 +11,7 @@ - Mesh segmentation + Mesh Segmentation @@ -26,7 +26,7 @@ - Parameters... + Parameters… @@ -79,7 +79,7 @@ - Parameters... + Parameters… @@ -132,7 +132,7 @@ - Parameters... + Parameters… diff --git a/src/Mod/Mesh/Gui/Selection.ui b/src/Mod/Mesh/Gui/Selection.ui index 4ed77db0e9..119c69952d 100644 --- a/src/Mod/Mesh/Gui/Selection.ui +++ b/src/Mod/Mesh/Gui/Selection.ui @@ -60,7 +60,7 @@ - Respect only triangles with normals facing screen + Respect only triangles with screen-facing normals true diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp index 997b8f8148..a309ff52c0 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp @@ -775,7 +775,7 @@ void SoFCIndexedFaceSet::generateGLArrays(SoGLRenderAction* action) if (numcolors != static_cast(numTria)) { SoDebugError::postWarning( "SoFCIndexedFaceSet::generateGLArrays", - "The number of faces (%d) doesn't match with the number of colors (%d).", + "The number of faces (%d) does not match with the number of colors (%d).", numTria, numcolors); } @@ -817,7 +817,7 @@ void SoFCIndexedFaceSet::generateGLArrays(SoGLRenderAction* action) if (numcolors != coords->getNum()) { SoDebugError::postWarning( "SoFCIndexedFaceSet::generateGLArrays", - "The number of points (%d) doesn't match with the number of colors (%d).", + "The number of points (%d) does not match with the number of colors (%d).", coords->getNum(), numcolors); } diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index c3e535c9c9..a4f017265a 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -792,7 +792,7 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch // toggle command to display components auto func = new Gui::ActionFunction(menu); - QAction* act = menu->addAction(QObject::tr("Display components")); + QAction* act = menu->addAction(QObject::tr("Display Components")); act->setCheckable(true); act->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && highlightMode == HighlighMode::Component); @@ -800,7 +800,7 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch this->setHighlightedComponents(on); }); - QAction* seg = menu->addAction(QObject::tr("Display segments")); + QAction* seg = menu->addAction(QObject::tr("Display Segments")); seg->setCheckable(true); seg->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && highlightMode == HighlighMode::Segment); @@ -808,7 +808,7 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch this->setHighlightedSegments(on); }); - QAction* col = menu->addAction(QObject::tr("Display colors")); + QAction* col = menu->addAction(QObject::tr("Display Colors")); col->setVisible(canHighlightColors()); col->setCheckable(true); col->setChecked(highlightMode == HighlighMode::Color); @@ -1678,7 +1678,7 @@ void ViewProviderMesh::faceInfoCallback(void* ud, SoEventCallback* cb) cb->setHandled(); // context-menu QMenu menu; - QAction* cl = menu.addAction(QObject::tr("Leave info mode")); + QAction* cl = menu.addAction(QObject::tr("Leave Info Mode")); QAction* id = menu.exec(QCursor::pos()); if (cl == id) { view->setEditing(false); @@ -1771,7 +1771,7 @@ void ViewProviderMesh::fillHoleCallback(void* ud, SoEventCallback* cb) cb->setHandled(); // context-menu QMenu menu; - QAction* cl = menu.addAction(QObject::tr("Leave hole-filling mode")); + QAction* cl = menu.addAction(QObject::tr("Leave Hole-Filling Mode")); QAction* id = menu.exec(QCursor::pos()); if (cl == id) { view->setEditing(false); @@ -1819,9 +1819,9 @@ void ViewProviderMesh::markPartCallback(void* ud, SoEventCallback* cb) cb->setHandled(); // context-menu QMenu menu; - QAction* cl = menu.addAction(QObject::tr("Leave removal mode")); - QAction* rm = menu.addAction(QObject::tr("Delete selected faces")); - QAction* cf = menu.addAction(QObject::tr("Clear selected faces")); + QAction* cl = menu.addAction(QObject::tr("Leave Removal Mode")); + QAction* rm = menu.addAction(QObject::tr("Delete Selected Faces")); + QAction* cf = menu.addAction(QObject::tr("Clear Selected Faces")); QAction* id = menu.exec(QCursor::pos()); if (cl == id) { view->setEditing(false); diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index 8067a19e1e..af5a69cd19 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -537,7 +537,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void* ud, SoEventCallback* QAction* fl = menu.addAction(QObject::tr("Annotation")); fl->setCheckable(true); fl->setChecked(addflag); - QAction* cl = menu.addAction(QObject::tr("Leave info mode")); + QAction* cl = menu.addAction(QObject::tr("Leave Info Mode")); QAction* id = menu.exec(QCursor::pos()); if (fl == id) { addflag = fl->isChecked(); diff --git a/src/Mod/Mesh/Gui/Workbench.cpp b/src/Mod/Mesh/Gui/Workbench.cpp index 12b184db43..e3a2e22b34 100644 --- a/src/Mod/Mesh/Gui/Workbench.cpp +++ b/src/Mod/Mesh/Gui/Workbench.cpp @@ -45,12 +45,12 @@ using namespace MeshGui; qApp->translate("Workbench", "Boolean"); qApp->translate("Workbench", "&Meshes"); qApp->translate("Workbench", "Cutting"); - qApp->translate("Workbench", "Mesh tools"); - qApp->translate("Workbench", "Mesh modify"); - qApp->translate("Workbench", "Mesh boolean"); - qApp->translate("Workbench", "Mesh cutting"); - qApp->translate("Workbench", "Mesh segmentation"); - qApp->translate("Workbench", "Mesh analyze"); + qApp->translate("Workbench", "Mesh Tools"); + qApp->translate("Workbench", "Mesh Modify"); + qApp->translate("Workbench", "Mesh Boolean"); + qApp->translate("Workbench", "Mesh Cutting"); + qApp->translate("Workbench", "Mesh Segmentation"); + qApp->translate("Workbench", "Mesh Analyze"); #endif /// @namespace MeshGui @class Workbench @@ -66,27 +66,27 @@ public: { // NOLINTBEGIN labelPoints = new QLabel(); - labelPoints->setText(QObject::tr("Number of points:")); + labelPoints->setText(QObject::tr("Number of points")); labelFacets = new QLabel(); - labelFacets->setText(QObject::tr("Number of facets:")); + labelFacets->setText(QObject::tr("Number of facets")); numPoints = new QLabel(); numFacets = new QLabel(); labelMin = new QLabel(); - labelMin->setText(QObject::tr("Minimum bound:")); + labelMin->setText(QObject::tr("Minimum bound")); labelMax = new QLabel(); - labelMax->setText(QObject::tr("Maximum bound:")); + labelMax->setText(QObject::tr("Maximum bound")); numMin = new QLabel(); numMax = new QLabel(); // NOLINTEND QGroupBox* box = new QGroupBox(); - box->setTitle(QObject::tr("Mesh info box")); - box->setWindowTitle(QObject::tr("Mesh info")); + box->setTitle(QObject::tr("Mesh Info Box")); + box->setWindowTitle(QObject::tr("Mesh Info")); // box->setAutoFillBackground(true); QGridLayout* grid = new QGridLayout(box); grid->addWidget(labelPoints, 0, 0); @@ -241,14 +241,14 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); Gui::ToolBarItem* mesh = new Gui::ToolBarItem(root); - mesh->setCommand("Mesh tools"); + mesh->setCommand("Mesh Tools"); *mesh << "Mesh_Import" << "Mesh_Export" << "Mesh_FromPartShape" << "Mesh_BuildRegularSolid"; Gui::ToolBarItem* modifying = new Gui::ToolBarItem(root); - modifying->setCommand("Mesh modify"); + modifying->setCommand("Mesh Modify"); *modifying << "Mesh_HarmonizeNormals" << "Mesh_FlipNormals" << "Mesh_FillupHoles" @@ -261,13 +261,13 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "Mesh_Scale"; Gui::ToolBarItem* boolean = new Gui::ToolBarItem(root); - boolean->setCommand("Mesh boolean"); + boolean->setCommand("Mesh Boolean"); *boolean << "Mesh_Union" << "Mesh_Intersection" << "Mesh_Difference"; Gui::ToolBarItem* cutting = new Gui::ToolBarItem(root); - cutting->setCommand("Mesh cutting"); + cutting->setCommand("Mesh Cutting"); *cutting << "Mesh_PolyCut" << "Mesh_PolyTrim" << "Mesh_TrimByPlane" @@ -275,14 +275,14 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "Mesh_CrossSections"; Gui::ToolBarItem* compseg = new Gui::ToolBarItem(root); - compseg->setCommand("Mesh segmentation"); + compseg->setCommand("Mesh Segmentation"); *compseg << "Mesh_Merge" << "Mesh_SplitComponents" << "Mesh_Segmentation" << "Mesh_SegmentationBestFit"; Gui::ToolBarItem* analyze = new Gui::ToolBarItem(root); - analyze->setCommand("Mesh analyze"); + analyze->setCommand("Mesh Analyze"); *analyze << "Mesh_Evaluation" << "Mesh_EvaluateFacet" << "Mesh_VertexCurvature" @@ -301,13 +301,13 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::ToolBarItem* mesh; mesh = new Gui::ToolBarItem(root); - mesh->setCommand("Mesh tools"); + mesh->setCommand("Mesh Tools"); *mesh << "Mesh_Import" << "Mesh_Export" << "Mesh_PolyCut"; mesh = new Gui::ToolBarItem(root); - mesh->setCommand("Mesh test suite"); + mesh->setCommand("Mesh Test Suite"); *mesh << "Mesh_Demolding" << "Mesh_Transform" << "Separator"; From 54af8d18e727a47ccf27aec6e14ff401a39f9595 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:20:16 +0200 Subject: [PATCH 054/141] Update src/Mod/Mesh/App/AppMeshPy.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/App/AppMeshPy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/App/AppMeshPy.cpp b/src/Mod/Mesh/App/AppMeshPy.cpp index 5d1bc69b3e..cb4bd8ae98 100644 --- a/src/Mod/Mesh/App/AppMeshPy.cpp +++ b/src/Mod/Mesh/App/AppMeshPy.cpp @@ -275,7 +275,7 @@ private: exporter = std::make_unique(outputFileName, exportFormat); } else { - std::string exStr("Cannot determine mesh format from file name.\nSpecify mesh " + std::string exStr("Cannot determine the mesh format from the file name.\nSpecify mesh " "format file extension: '"); exStr += outputFileName + "'"; throw Py::ValueError(exStr.c_str()); From 84c73b096c3d16689083367be159d6f1a2438542 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:20:23 +0200 Subject: [PATCH 055/141] Update src/Mod/Mesh/App/MeshPy.xml Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/App/MeshPy.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/App/MeshPy.xml b/src/Mod/Mesh/App/MeshPy.xml index ad4b52f713..e2cc580a65 100644 --- a/src/Mod/Mesh/App/MeshPy.xml +++ b/src/Mod/Mesh/App/MeshPy.xml @@ -176,7 +176,7 @@ lines = mesh.section(mesh2, [ConnectLines=True, MinDist=0.0001]) movePoint(int, Vector) This method moves the point in the mesh along the given vector. This affects the geometry of the mesh. - Be aware that after moving points the mesh can + Be aware that moving points may cause self-intersections. have self intersections! From d8cd6d184c9e72b7df7cfc294e5b163c6169064b Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:20:55 +0200 Subject: [PATCH 056/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index 7a3a9a093d..b359ae7b89 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -84,7 +84,7 @@ CmdMeshUnion::CmdMeshUnion() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Union"); - sToolTipText = QT_TR_NOOP("Unions the selected meshes"); + sToolTipText = QT_TR_NOOP("Unites the selected meshes"); sWhatsThis = "Mesh_Union"; sStatusTip = sToolTipText; sPixmap = "Mesh_Union"; From d6f92c4521431c7aecead4ee826e0905a824fa34 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:21:05 +0200 Subject: [PATCH 057/141] Update src/Mod/Mesh/App/MeshPy.xml Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/App/MeshPy.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Mod/Mesh/App/MeshPy.xml b/src/Mod/Mesh/App/MeshPy.xml index e2cc580a65..7acbb5f69a 100644 --- a/src/Mod/Mesh/App/MeshPy.xml +++ b/src/Mod/Mesh/App/MeshPy.xml @@ -177,7 +177,6 @@ lines = mesh.section(mesh2, [ConnectLines=True, MinDist=0.0001]) This method moves the point in the mesh along the given vector. This affects the geometry of the mesh. Be aware that moving points may cause self-intersections. - have self intersections! From 7704a311bc8d3c30ad5d2a4d0c88ecbd905fe601 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:21:15 +0200 Subject: [PATCH 058/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index b359ae7b89..d8c42422f9 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -242,7 +242,7 @@ CmdMeshIntersection::CmdMeshIntersection() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Intersection"); - sToolTipText = QT_TR_NOOP("Intersects the selected meshes"); + sToolTipText = QT_TR_NOOP("Creates a boolean intersection from the selected meshes"); sWhatsThis = "Mesh_Intersection"; sStatusTip = sToolTipText; sPixmap = "Mesh_Intersection"; From 9ac06adaeb2db7393e9b3ea9868655ac5efb2b39 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:21:24 +0200 Subject: [PATCH 059/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index d8c42422f9..ad078aef2f 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -163,7 +163,7 @@ CmdMeshDifference::CmdMeshDifference() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Difference"); - sToolTipText = QT_TR_NOOP("Creates the boolean difference of the selected meshes"); + sToolTipText = QT_TR_NOOP("Creates a boolean difference of the selected meshes"); sWhatsThis = "Mesh_Difference"; sStatusTip = sToolTipText; sPixmap = "Mesh_Difference"; From b04c3cf2ece4b544ab46c9083bc8306a6197c797 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:21:34 +0200 Subject: [PATCH 060/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index ad078aef2f..bfe257eac7 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -830,7 +830,7 @@ CmdMeshPolyTrim::CmdMeshPolyTrim() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Trim"); - sToolTipText = QT_TR_NOOP("Trims a mesh with a picked polygon"); + sToolTipText = QT_TR_NOOP("Trims a mesh with a selected polygon"); sWhatsThis = "Mesh_PolyTrim"; sStatusTip = QT_TR_NOOP("Trims a mesh with a picked polygon"); sPixmap = "Mesh_PolyTrim"; From eca350af44a6601331d969a26a541b2cfc9e9aeb Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:21:45 +0200 Subject: [PATCH 061/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index bfe257eac7..f46eda9294 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -895,7 +895,7 @@ CmdMeshTrimByPlane::CmdMeshTrimByPlane() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Trim With Plane"); - sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); + sToolTipText = QT_TR_NOOP("Trims a mesh by removing faces on one side of a selected plane"); sStatusTip = sToolTipText; sPixmap = "Mesh_TrimByPlane"; } From 9c3df46c3aec430c962bbc6ee8a8b7cd98e99bde Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:21:57 +0200 Subject: [PATCH 062/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index f46eda9294..30eab8382a 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -953,7 +953,7 @@ CmdMeshCrossSections::CmdMeshCrossSections() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Cross-Sections…"); - sToolTipText = QT_TR_NOOP("Cross-sections the mesh"); + sToolTipText = QT_TR_NOOP("Creates cross-sections of the mesh"); sStatusTip = sToolTipText; sPixmap = "Mesh_CrossSections"; } From d7546665f8f151f71aea686f04e092d76fce950e Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:22:05 +0200 Subject: [PATCH 063/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index 30eab8382a..d8b4b803a5 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -982,7 +982,7 @@ CmdMeshPolySplit::CmdMeshPolySplit() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Split"); - sToolTipText = QT_TR_NOOP("Splits a mesh into two meshes"); + sToolTipText = QT_TR_NOOP("Splits a mesh into 2 meshes"); sWhatsThis = "Mesh_PolySplit"; sStatusTip = sToolTipText; } From eddfa744a99f71945bb37a385cc4c2871a726e9d Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:22:14 +0200 Subject: [PATCH 064/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index d8b4b803a5..e350a6cba5 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -1130,7 +1130,7 @@ CmdMeshRemoveComponents::CmdMeshRemoveComponents() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Remove Components…"); - sToolTipText = QT_TR_NOOP("Removes topologic independent components from the mesh"); + sToolTipText = QT_TR_NOOP("Removes topologically independent components from the mesh"); sWhatsThis = "Mesh_RemoveComponents"; sStatusTip = sToolTipText; sPixmap = "Mesh_RemoveComponents"; From 73b8eccf76116687beafdfd6b715132ad40de66b Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:22:22 +0200 Subject: [PATCH 065/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index e350a6cba5..e1abfdd154 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -1517,7 +1517,7 @@ CmdMeshFillupHoles::CmdMeshFillupHoles() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Fill Holes…"); - sToolTipText = QT_TR_NOOP("Fills the holes of the mesh"); + sToolTipText = QT_TR_NOOP("Fills holes in the mesh"); sWhatsThis = "Mesh_FillupHoles"; sStatusTip = sToolTipText; sPixmap = "Mesh_FillupHoles"; From 7540f91bb7c17883271b0ee1aa147c9d49b25531 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:22:29 +0200 Subject: [PATCH 066/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index e1abfdd154..4d947076c4 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -1568,7 +1568,7 @@ CmdMeshFillInteractiveHole::CmdMeshFillInteractiveHole() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Close Holes"); - sToolTipText = QT_TR_NOOP("Closes holes interactively"); + sToolTipText = QT_TR_NOOP("Closes holes interactively in the mesh"); sWhatsThis = "Mesh_FillInteractiveHole"; sStatusTip = sToolTipText; sPixmap = "Mesh_FillInteractiveHole"; From a29673929fecf5d4b36065b3d420f8144552ece9 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:23:05 +0200 Subject: [PATCH 067/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index 4d947076c4..7ff76988b5 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -1615,7 +1615,7 @@ CmdMeshSegmentation::CmdMeshSegmentation() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Segmentation…"); - sToolTipText = QT_TR_NOOP("Creates new mesh segments"); + sToolTipText = QT_TR_NOOP("Creates new mesh segments from the mesh"); sWhatsThis = "Mesh_Segmentation"; sStatusTip = sToolTipText; sPixmap = "Mesh_Segmentation"; From b3a1831870f0c677625acc36abd92b4b2923b026 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:23:12 +0200 Subject: [PATCH 068/141] Update src/Mod/Mesh/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index 7ff76988b5..e1ebe7789c 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -1780,7 +1780,7 @@ CmdMeshScale::CmdMeshScale() sAppModule = "Mesh"; sGroup = QT_TR_NOOP("Mesh"); sMenuText = QT_TR_NOOP("Scale…"); - sToolTipText = QT_TR_NOOP("Scales the selected meshes"); + sToolTipText = QT_TR_NOOP("Scales the selected mesh objects"); sWhatsThis = "Mesh_Scale"; sStatusTip = sToolTipText; sPixmap = "Mesh_Scale"; From 6495ae2ce8d1884d40517ef6e6c6a89b028c3311 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:49:40 +0200 Subject: [PATCH 069/141] Update src/Mod/Mesh/Gui/DlgSettingsMeshView.ui Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Mesh/Gui/DlgSettingsMeshView.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui b/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui index 87001c8c36..fba15b76b6 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui +++ b/src/Mod/Mesh/Gui/DlgSettingsMeshView.ui @@ -32,7 +32,7 @@ - Default Appearance for new Meshes + Default Appearance for New Meshes From 92d54f60345f9f1d0b2d480f0cc8f1dd04b74079 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 15:46:41 +0200 Subject: [PATCH 070/141] ReverseEngineering: Update UI strings for consistency --- .../App/AppReverseEngineering.cpp | 2 +- .../ReverseEngineering/App/RegionGrowing.cpp | 2 +- .../Gui/AppReverseEngineeringGui.cpp | 2 +- src/Mod/ReverseEngineering/Gui/Command.cpp | 49 +++++++++---------- .../ReverseEngineering/Gui/FitBSplineCurve.ui | 2 +- .../Gui/FitBSplineSurface.cpp | 2 +- .../Gui/FitBSplineSurface.ui | 10 ++-- .../ReverseEngineering/Gui/Segmentation.ui | 2 +- .../Gui/SegmentationManual.ui | 8 +-- src/Mod/ReverseEngineering/Gui/Workbench.cpp | 2 +- 10 files changed, 40 insertions(+), 41 deletions(-) diff --git a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp index ca4848c8e5..858fb90edd 100644 --- a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp +++ b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp @@ -999,7 +999,7 @@ PyMOD_INIT_FUNC(ReverseEngineering) } PyObject* mod = Reen::initModule(); - Base::Console().log("Loading ReverseEngineering module... done\n"); + Base::Console().log("Loading ReverseEngineering module… done\n"); PyMOD_Return(mod); } // clang-format on diff --git a/src/Mod/ReverseEngineering/App/RegionGrowing.cpp b/src/Mod/ReverseEngineering/App/RegionGrowing.cpp index 75c98dd08e..c0c9b6c122 100644 --- a/src/Mod/ReverseEngineering/App/RegionGrowing.cpp +++ b/src/Mod/ReverseEngineering/App/RegionGrowing.cpp @@ -105,7 +105,7 @@ void RegionGrowing::perform(int ksearch) void RegionGrowing::perform(const std::vector& myNormals) { if (myPoints.size() != myNormals.size()) { - throw Base::RuntimeError("Number of points doesn't match with number of normals"); + throw Base::RuntimeError("Number of points does not match with number of normals"); } pcl::PointCloud::Ptr cloud(new pcl::PointCloud); diff --git a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp index ef9ec5e51d..3ae29c3393 100644 --- a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp +++ b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp @@ -82,7 +82,7 @@ PyMOD_INIT_FUNC(ReverseEngineeringGui) } PyObject* mod = ReverseEngineeringGui::initModule(); - Base::Console().log("Loading GUI of ReverseEngineering module... done\n"); + Base::Console().log("Loading GUI of ReverseEngineering module… done\n"); // instantiating the commands CreateReverseEngineeringCommands(); diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index 09b72958e6..0eb065d0b1 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -68,8 +68,8 @@ CmdApproxCurve::CmdApproxCurve() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Approximate B-spline curve..."); - sToolTipText = QT_TR_NOOP("Approximate a B-spline curve"); + sMenuText = QT_TR_NOOP("Approximate B-Spline Curve…"); + sToolTipText = QT_TR_NOOP("Approximates a B-spline curve"); sWhatsThis = "Reen_ApproxCurve"; sStatusTip = sToolTipText; } @@ -81,7 +81,7 @@ void CmdApproxCurve::activated(int) if (obj.size() != 1 || !(obj.at(0)->isDerivedFrom())) { QMessageBox::warning(Gui::getMainWindow(), qApp->translate("Reen_ApproxSurface", "Wrong selection"), - qApp->translate("Reen_ApproxSurface", "Please select a point cloud.")); + qApp->translate("Reen_ApproxSurface", "Select a point cloud.")); return; } @@ -101,8 +101,8 @@ CmdApproxSurface::CmdApproxSurface() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Approximate B-spline surface..."); - sToolTipText = QT_TR_NOOP("Approximate a B-spline surface"); + sMenuText = QT_TR_NOOP("Approximate B-Spline Surface…"); + sToolTipText = QT_TR_NOOP("Approximates a B-spline surface"); sWhatsThis = "Reen_ApproxSurface"; sStatusTip = sToolTipText; sPixmap = "actions/FitSurface"; @@ -119,7 +119,7 @@ void CmdApproxSurface::activated(int) QMessageBox::warning( Gui::getMainWindow(), qApp->translate("Reen_ApproxSurface", "Wrong selection"), - qApp->translate("Reen_ApproxSurface", "Please select a point cloud or mesh.")); + qApp->translate("Reen_ApproxSurface", "Select a point cloud or mesh.")); return; } @@ -140,7 +140,7 @@ CmdApproxPlane::CmdApproxPlane() sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); sMenuText = QT_TR_NOOP("Plane"); - sToolTipText = QT_TR_NOOP("Approximate a plane"); + sToolTipText = QT_TR_NOOP("Approximates a plane"); sWhatsThis = "Reen_ApproxPlane"; sStatusTip = sToolTipText; } @@ -248,7 +248,7 @@ CmdApproxCylinder::CmdApproxCylinder() sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); sMenuText = QT_TR_NOOP("Cylinder"); - sToolTipText = QT_TR_NOOP("Approximate a cylinder"); + sToolTipText = QT_TR_NOOP("Approximates a cylinder"); sWhatsThis = "Reen_ApproxCylinder"; sStatusTip = sToolTipText; } @@ -316,7 +316,7 @@ CmdApproxSphere::CmdApproxSphere() sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); sMenuText = QT_TR_NOOP("Sphere"); - sToolTipText = QT_TR_NOOP("Approximate a sphere"); + sToolTipText = QT_TR_NOOP("Approximates a sphere"); sWhatsThis = "Reen_ApproxSphere"; sStatusTip = sToolTipText; } @@ -363,8 +363,8 @@ CmdApproxPolynomial::CmdApproxPolynomial() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Polynomial surface"); - sToolTipText = QT_TR_NOOP("Approximate a polynomial surface"); + sMenuText = QT_TR_NOOP("Polynomial Surface"); + sToolTipText = QT_TR_NOOP("Approximates a polynomial surface"); sWhatsThis = "Reen_ApproxPolynomial"; sStatusTip = sToolTipText; } @@ -421,8 +421,8 @@ CmdSegmentation::CmdSegmentation() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Mesh segmentation..."); - sToolTipText = QT_TR_NOOP("Create mesh segments"); + sMenuText = QT_TR_NOOP("Mesh Segmentation…"); + sToolTipText = QT_TR_NOOP("Creates mesh segments"); sWhatsThis = "Reen_Segmentation"; sStatusTip = sToolTipText; } @@ -453,8 +453,8 @@ CmdSegmentationManual::CmdSegmentationManual() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Manual segmentation..."); - sToolTipText = QT_TR_NOOP("Create mesh segments manually"); + sMenuText = QT_TR_NOOP("Manual Segmentation…"); + sToolTipText = QT_TR_NOOP("Creates mesh segments manually"); sWhatsThis = "Reen_SegmentationManual"; sStatusTip = sToolTipText; } @@ -483,8 +483,8 @@ CmdSegmentationFromComponents::CmdSegmentationFromComponents() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("From components"); - sToolTipText = QT_TR_NOOP("Create mesh segments from components"); + sMenuText = QT_TR_NOOP("From Components"); + sToolTipText = QT_TR_NOOP("Creates mesh segments from components"); sWhatsThis = "Reen_SegmentationFromComponents"; sStatusTip = sToolTipText; } @@ -533,8 +533,8 @@ CmdMeshBoundary::CmdMeshBoundary() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Wire from mesh boundary..."); - sToolTipText = QT_TR_NOOP("Create wire from mesh boundaries"); + sMenuText = QT_TR_NOOP("Wire From Mesh Boundary…"); + sToolTipText = QT_TR_NOOP("Creates a wire from mesh boundaries"); sWhatsThis = "Reen_Segmentation"; sStatusTip = sToolTipText; } @@ -598,7 +598,7 @@ CmdPoissonReconstruction::CmdPoissonReconstruction() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Poisson..."); + sMenuText = QT_TR_NOOP("Poisson…"); sToolTipText = QT_TR_NOOP("Poisson surface reconstruction"); sWhatsThis = "Reen_PoissonReconstruction"; sStatusTip = sToolTipText; @@ -610,10 +610,9 @@ void CmdPoissonReconstruction::activated(int) std::vector obj = Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); if (obj.size() != 1) { - QMessageBox::warning( - Gui::getMainWindow(), - qApp->translate("Reen_ApproxSurface", "Wrong selection"), - qApp->translate("Reen_ApproxSurface", "Please select a single point cloud.")); + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("Reen_ApproxSurface", "Wrong selection"), + qApp->translate("Reen_ApproxSurface", "Select a single point cloud.")); return; } @@ -633,7 +632,7 @@ CmdViewTriangulation::CmdViewTriangulation() { sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Structured point clouds"); + sMenuText = QT_TR_NOOP("Structured Point Clouds"); sToolTipText = QT_TR_NOOP("Triangulation of structured point clouds"); sStatusTip = QT_TR_NOOP("Triangulation of structured point clouds"); sWhatsThis = "Reen_ViewTriangulation"; diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.ui b/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.ui index 4deef0e30d..2633f94f3f 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.ui +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.ui @@ -11,7 +11,7 @@ - Fit B-spline curve + Fit B-Spline Curve diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp index de9da74cec..925c1c47e4 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp @@ -203,7 +203,7 @@ bool FitBSplineSurfaceWidget::accept() QMessageBox::warning( this, tr("Wrong selection"), - tr("Please select a single placement object to get local orientation.")); + tr("Select a single placement object to get local orientation.")); return false; } diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.ui b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.ui index e6c8516d95..3f43855c50 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.ui +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.ui @@ -11,13 +11,13 @@ - Fit B-spline surface + Fit B-Spline Surface - u-Direction + U-Direction @@ -84,7 +84,7 @@ - v-Direction + V-Direction @@ -228,7 +228,7 @@ - Create placement + Create Placement @@ -244,7 +244,7 @@ - Total Weight + Total weight Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/Mod/ReverseEngineering/Gui/Segmentation.ui b/src/Mod/ReverseEngineering/Gui/Segmentation.ui index 9b98a70a49..b994fb24a3 100644 --- a/src/Mod/ReverseEngineering/Gui/Segmentation.ui +++ b/src/Mod/ReverseEngineering/Gui/Segmentation.ui @@ -11,7 +11,7 @@ - Mesh segmentation + Mesh Segmentation diff --git a/src/Mod/ReverseEngineering/Gui/SegmentationManual.ui b/src/Mod/ReverseEngineering/Gui/SegmentationManual.ui index 437fb2f599..10d363031a 100644 --- a/src/Mod/ReverseEngineering/Gui/SegmentationManual.ui +++ b/src/Mod/ReverseEngineering/Gui/SegmentationManual.ui @@ -11,7 +11,7 @@ - Manual segmentation + Manual Mesh Segmentation @@ -95,7 +95,7 @@ - Pick triangle + Pick Triangle @@ -278,7 +278,7 @@ - Region options + Region Options @@ -294,7 +294,7 @@ - Respect only triangles with normals facing screen + Respect only triangles with screen-facing normals true diff --git a/src/Mod/ReverseEngineering/Gui/Workbench.cpp b/src/Mod/ReverseEngineering/Gui/Workbench.cpp index 662f9fee6d..c0463a04df 100644 --- a/src/Mod/ReverseEngineering/Gui/Workbench.cpp +++ b/src/Mod/ReverseEngineering/Gui/Workbench.cpp @@ -50,7 +50,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const reen->setCommand("&Reverse Engineering"); Gui::MenuItem* reconstruct = new Gui::MenuItem(); - reconstruct->setCommand("Surface reconstruction"); + reconstruct->setCommand("Surface Reconstruction"); *reconstruct << "Reen_PoissonReconstruction" << "Reen_ViewTriangulation"; *reen << reconstruct; From abb4554d2a96a9960a9e4f341c7cd38eb1e64fbc Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:30:40 +0200 Subject: [PATCH 071/141] Update src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp index 858fb90edd..965f096e2b 100644 --- a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp +++ b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp @@ -999,7 +999,7 @@ PyMOD_INIT_FUNC(ReverseEngineering) } PyObject* mod = Reen::initModule(); - Base::Console().log("Loading ReverseEngineering module… done\n"); + Base::Console().log("Loading Reverse Engineering module… done\n"); PyMOD_Return(mod); } // clang-format on From 5d6cce130fe16705b6609ed778fb1bbe4ebbf4cc Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:30:48 +0200 Subject: [PATCH 072/141] Update src/Mod/ReverseEngineering/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/ReverseEngineering/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index 0eb065d0b1..f3acc03d16 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -422,7 +422,7 @@ CmdSegmentation::CmdSegmentation() sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); sMenuText = QT_TR_NOOP("Mesh Segmentation…"); - sToolTipText = QT_TR_NOOP("Creates mesh segments"); + sToolTipText = QT_TR_NOOP("Creates separate mesh segments based on surface types"); sWhatsThis = "Reen_Segmentation"; sStatusTip = sToolTipText; } From 0fd20e2d2b5fff78205d87f1f355129f6cf4c34f Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:30:54 +0200 Subject: [PATCH 073/141] Update src/Mod/ReverseEngineering/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/ReverseEngineering/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index f3acc03d16..ce325060aa 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -599,7 +599,7 @@ CmdPoissonReconstruction::CmdPoissonReconstruction() sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); sMenuText = QT_TR_NOOP("Poisson…"); - sToolTipText = QT_TR_NOOP("Poisson surface reconstruction"); + sToolTipText = QT_TR_NOOP("Performs Poisson surface reconstruction"); sWhatsThis = "Reen_PoissonReconstruction"; sStatusTip = sToolTipText; } From 04fb11f2a9b6a7319a7647bd61c79f686a5fd085 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:31:00 +0200 Subject: [PATCH 074/141] Update src/Mod/ReverseEngineering/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/ReverseEngineering/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index ce325060aa..3d8b02f0d4 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -633,7 +633,7 @@ CmdViewTriangulation::CmdViewTriangulation() sAppModule = "Reen"; sGroup = QT_TR_NOOP("Reverse Engineering"); sMenuText = QT_TR_NOOP("Structured Point Clouds"); - sToolTipText = QT_TR_NOOP("Triangulation of structured point clouds"); + sToolTipText = QT_TR_NOOP("Triangulates structured point clouds"); sStatusTip = QT_TR_NOOP("Triangulation of structured point clouds"); sWhatsThis = "Reen_ViewTriangulation"; } From 185dfdf1e068958fa616ac8bc2045d65f185dba0 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:31:06 +0200 Subject: [PATCH 075/141] Update src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp index 925c1c47e4..fe2b69232d 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp @@ -203,7 +203,7 @@ bool FitBSplineSurfaceWidget::accept() QMessageBox::warning( this, tr("Wrong selection"), - tr("Select a single placement object to get local orientation.")); + tr("Select a single placement object to get the local orientation.")); return false; } From 4d7484725175aca3662c352785a1078e3283f414 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 11:38:18 +0200 Subject: [PATCH 076/141] Surface: Update UI strings for consistency --- src/Mod/Surface/App/AppSurface.cpp | 2 +- src/Mod/Surface/App/FeatureFilling.cpp | 4 +-- src/Mod/Surface/Gui/AppSurfaceGui.cpp | 2 +- .../Surface/Gui/Blending/TaskBlendCurve.ui | 6 ++--- src/Mod/Surface/Gui/Command.cpp | 27 +++++++++---------- src/Mod/Surface/Gui/TaskFilling.cpp | 2 +- src/Mod/Surface/Gui/TaskFilling.ui | 12 ++++----- src/Mod/Surface/Gui/TaskFillingEdge.ui | 12 ++++----- src/Mod/Surface/Gui/TaskFillingVertex.ui | 6 ++--- src/Mod/Surface/Gui/TaskGeomFillSurface.cpp | 2 +- src/Mod/Surface/Gui/TaskGeomFillSurface.ui | 2 +- src/Mod/Surface/Gui/TaskSections.cpp | 2 +- src/Mod/Surface/Gui/TaskSections.ui | 6 ++--- 13 files changed, 42 insertions(+), 43 deletions(-) diff --git a/src/Mod/Surface/App/AppSurface.cpp b/src/Mod/Surface/App/AppSurface.cpp index 0108acbbdc..171aff3791 100644 --- a/src/Mod/Surface/App/AppSurface.cpp +++ b/src/Mod/Surface/App/AppSurface.cpp @@ -71,7 +71,7 @@ PyMOD_INIT_FUNC(Surface) } PyObject* mod = Surface::initModule(); - Base::Console().log("Loading Surface module... done\n"); + Base::Console().log("Loading Surface module… done\n"); Base::Interpreter().addType(&Surface::BlendPointPy::Type, mod, "BlendPoint"); Base::Interpreter().addType(&Surface::BlendCurvePy::Type, mod, "BlendCurve"); diff --git a/src/Mod/Surface/App/FeatureFilling.cpp b/src/Mod/Surface/App/FeatureFilling.cpp index 68a1a68887..6f26149248 100644 --- a/src/Mod/Surface/App/FeatureFilling.cpp +++ b/src/Mod/Surface/App/FeatureFilling.cpp @@ -200,7 +200,7 @@ void Filling::addConstraints(BRepFill_Filling& builder, } } else { - Standard_Failure::Raise("Number of links doesn't match with number of orders"); + Standard_Failure::Raise("Number of links does not match with number of orders"); } } @@ -231,7 +231,7 @@ void Filling::addConstraints(BRepFill_Filling& builder, } } else { - Standard_Failure::Raise("Number of links doesn't match with number of orders"); + Standard_Failure::Raise("Number of links does not match with number of orders"); } } diff --git a/src/Mod/Surface/Gui/AppSurfaceGui.cpp b/src/Mod/Surface/Gui/AppSurfaceGui.cpp index 6b58be7835..71f5155740 100644 --- a/src/Mod/Surface/Gui/AppSurfaceGui.cpp +++ b/src/Mod/Surface/Gui/AppSurfaceGui.cpp @@ -87,6 +87,6 @@ PyMOD_INIT_FUNC(SurfaceGui) // clang-format on PyObject* mod = SurfaceGui::initModule(); - Base::Console().log("Loading GUI of Surface module... done\n"); + Base::Console().log("Loading GUI of Surface module… done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Surface/Gui/Blending/TaskBlendCurve.ui b/src/Mod/Surface/Gui/Blending/TaskBlendCurve.ui index 8b53aef23a..15b9793b69 100644 --- a/src/Mod/Surface/Gui/Blending/TaskBlendCurve.ui +++ b/src/Mod/Surface/Gui/Blending/TaskBlendCurve.ui @@ -11,13 +11,13 @@ - Blending curve + Blend Curve - Start edge + Start Edge @@ -110,7 +110,7 @@ - End edge + End Edge diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index 633df06552..4b3436015c 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -53,9 +53,8 @@ CmdSurfaceCut::CmdSurfaceCut() { sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Surface Cut function"); - sToolTipText = QT_TR_NOOP("Cuts a shape with another Shape.\n" - "It returns a modified version of the first shape"); + sMenuText = QT_TR_NOOP("Surface Cut Function"); + sToolTipText = QT_TR_NOOP("Cuts a shape with another shape"); sWhatsThis = "Surface_Cut"; sStatusTip = sToolTipText; sPixmap = "Surface_Cut"; @@ -112,7 +111,7 @@ CmdSurfaceFilling::CmdSurfaceFilling() { sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Filling..."); + sMenuText = QT_TR_NOOP("Filling…"); sToolTipText = QT_TR_NOOP("Creates a surface from a series of picked boundary edges.\n" "Additionally, the surface may be constrained by non-boundary edges\n" "and non-boundary vertices."); @@ -146,8 +145,8 @@ CmdSurfaceGeomFillSurface::CmdSurfaceGeomFillSurface() { sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Fill boundary curves"); - sToolTipText = QT_TR_NOOP("Creates a surface from two, three or four boundary edges."); + sMenuText = QT_TR_NOOP("Fill Boundary Curves"); + sToolTipText = QT_TR_NOOP("Creates a surface from 2, 3, or 4 boundary edges"); sWhatsThis = "Surface_GeomFillSurface"; sStatusTip = sToolTipText; sPixmap = "Surface_GeomFillSurface"; @@ -178,9 +177,9 @@ CmdSurfaceCurveOnMesh::CmdSurfaceCurveOnMesh() { sAppModule = "MeshPart"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Curve on 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."); + "This command only works with a mesh object."); sWhatsThis = "Surface_CurveOnMesh"; sStatusTip = sToolTipText; sPixmap = "Surface_CurveOnMesh"; @@ -217,7 +216,7 @@ CmdBlendCurve::CmdBlendCurve() sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); sMenuText = QT_TR_NOOP("Blend Curve"); - sToolTipText = QT_TR_NOOP("Join two edges with high continuity"); + sToolTipText = QT_TR_NOOP("Joins 2 edges with continuity"); sStatusTip = sToolTipText; sWhatsThis = "BlendCurve"; sPixmap = "Surface_BlendCurve"; @@ -276,9 +275,9 @@ CmdSurfaceExtendFace::CmdSurfaceExtendFace() { sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Extend face"); - sToolTipText = QT_TR_NOOP("Extrapolates the selected face or surface at its boundaries\n" - "with its local U and V parameters."); + sMenuText = QT_TR_NOOP("Extend Face"); + sToolTipText = QT_TR_NOOP("Extrapolates the selected face or surface at its boundaries with " + "its local U and V parameters"); sWhatsThis = "Surface_ExtendFace"; sStatusTip = sToolTipText; sPixmap = "Surface_ExtendFace"; @@ -323,8 +322,8 @@ CmdSurfaceSections::CmdSurfaceSections() { sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Sections..."); - sToolTipText = QT_TR_NOOP("Creates a surface from a series of sectional edges."); + sMenuText = QT_TR_NOOP("Sections…"); + sToolTipText = QT_TR_NOOP("Creates a surface from a series of sectional edges"); sStatusTip = sToolTipText; sWhatsThis = "Surface_Sections"; sPixmap = "Surface_Sections"; diff --git a/src/Mod/Surface/Gui/TaskFilling.cpp b/src/Mod/Surface/Gui/TaskFilling.cpp index 23f3dc315d..56dd99970b 100644 --- a/src/Mod/Surface/Gui/TaskFilling.cpp +++ b/src/Mod/Surface/Gui/TaskFilling.cpp @@ -62,7 +62,7 @@ namespace SurfaceGui void ViewProviderFilling::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { QAction* act; - act = menu->addAction(QObject::tr("Edit filling"), receiver, member); + act = menu->addAction(QObject::tr("Edit Filling"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); PartGui::ViewProviderSpline::setupContextMenu(menu, receiver, member); } diff --git a/src/Mod/Surface/Gui/TaskFilling.ui b/src/Mod/Surface/Gui/TaskFilling.ui index 71639f3261..f457ff1a6d 100644 --- a/src/Mod/Surface/Gui/TaskFilling.ui +++ b/src/Mod/Surface/Gui/TaskFilling.ui @@ -25,7 +25,7 @@ - Support surface + Support Surface @@ -41,10 +41,10 @@ - Add the edges that will limit the surface. + Edges that will limit the surface - Boundary edges + Boundary Edges @@ -108,7 +108,7 @@ - Drag the items to reorder the list. + Drag the items to reorder the list @@ -128,7 +128,7 @@ - Faces: + Faces
@@ -148,7 +148,7 @@
- Continuity: + Continuity diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.ui b/src/Mod/Surface/Gui/TaskFillingEdge.ui index 2527280827..9d8d0ba2cd 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.ui +++ b/src/Mod/Surface/Gui/TaskFillingEdge.ui @@ -17,17 +17,17 @@ - Edge constraints + Edge Constraints - Add edges that will be used to constrain the surface, -that is, the surface will be forced to pass through these edges. + Edges that will be used to constrain the surface, +that is, the surface will be forced to pass through these edges - Non-boundary edges + Non-Boundary Edges @@ -91,7 +91,7 @@ that is, the surface will be forced to pass through these edges. - Faces: + Faces @@ -111,7 +111,7 @@ that is, the surface will be forced to pass through these edges. - Continuity: + Continuity diff --git a/src/Mod/Surface/Gui/TaskFillingVertex.ui b/src/Mod/Surface/Gui/TaskFillingVertex.ui index a9dc91b7e0..32a5c9bd22 100644 --- a/src/Mod/Surface/Gui/TaskFillingVertex.ui +++ b/src/Mod/Surface/Gui/TaskFillingVertex.ui @@ -11,17 +11,17 @@ - Vertex constraints + Vertex Constraints - Add vertices that will be used to constrain the surface, + Vertices that will be used to constrain the surface, that is, the surface will be forced to pass through these points. - Non-boundary vertices + Non-Boundary Vertices diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp index 2c5caa111a..8a204a05ef 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp @@ -60,7 +60,7 @@ void ViewProviderGeomFillSurface::setupContextMenu(QMenu* menu, const char* member) { QAction* act; - act = menu->addAction(QObject::tr("Edit filling"), receiver, member); + act = menu->addAction(QObject::tr("Edit Filling"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); PartGui::ViewProviderSpline::setupContextMenu(menu, receiver, member); } diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.ui b/src/Mod/Surface/Gui/TaskGeomFillSurface.ui index 178423fa73..d2a17f2994 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.ui +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.ui @@ -23,7 +23,7 @@ - Fill type: + Fill Type diff --git a/src/Mod/Surface/Gui/TaskSections.cpp b/src/Mod/Surface/Gui/TaskSections.cpp index 75d68ad0d2..7cbee3c0a8 100644 --- a/src/Mod/Surface/Gui/TaskSections.cpp +++ b/src/Mod/Surface/Gui/TaskSections.cpp @@ -57,7 +57,7 @@ namespace SurfaceGui void ViewProviderSections::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { QAction* act; - act = menu->addAction(QObject::tr("Edit sections"), receiver, member); + act = menu->addAction(QObject::tr("Edit Sections"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); PartGui::ViewProviderSpline::setupContextMenu(menu, receiver, member); } diff --git a/src/Mod/Surface/Gui/TaskSections.ui b/src/Mod/Surface/Gui/TaskSections.ui index 7f242afc74..a74cd881a4 100644 --- a/src/Mod/Surface/Gui/TaskSections.ui +++ b/src/Mod/Surface/Gui/TaskSections.ui @@ -11,17 +11,17 @@ - Sectional edges + Sectional Edges - Add the edges that will be sectional cuts of the surface, + Edges that will be sectional cuts of the surface, that is, the surface will be forced to pass through these edges. - Sectional edges + Sectional Edges From c1dca4515138b1e4269f2474e5207ba2fec85837 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:23:48 +0200 Subject: [PATCH 077/141] Update src/Mod/Surface/App/FeatureFilling.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/App/FeatureFilling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Surface/App/FeatureFilling.cpp b/src/Mod/Surface/App/FeatureFilling.cpp index 6f26149248..fc9dc06ad1 100644 --- a/src/Mod/Surface/App/FeatureFilling.cpp +++ b/src/Mod/Surface/App/FeatureFilling.cpp @@ -200,7 +200,7 @@ void Filling::addConstraints(BRepFill_Filling& builder, } } else { - Standard_Failure::Raise("Number of links does not match with number of orders"); + Standard_Failure::Raise("Number of links does not match with the number of orders"); } } From a8cea551a0cfd1850bcfd31ed5030cbb6a85c299 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:23:53 +0200 Subject: [PATCH 078/141] Update src/Mod/Surface/App/FeatureFilling.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/App/FeatureFilling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Surface/App/FeatureFilling.cpp b/src/Mod/Surface/App/FeatureFilling.cpp index fc9dc06ad1..0462603745 100644 --- a/src/Mod/Surface/App/FeatureFilling.cpp +++ b/src/Mod/Surface/App/FeatureFilling.cpp @@ -231,7 +231,7 @@ void Filling::addConstraints(BRepFill_Filling& builder, } } else { - Standard_Failure::Raise("Number of links does not match with number of orders"); + Standard_Failure::Raise("Number of links does not match with the number of orders"); } } From 503b2fe808833cc33e720177b65c2d7505e9e779 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:24:17 +0200 Subject: [PATCH 079/141] Update src/Mod/Surface/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index 4b3436015c..ac392c21c6 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -54,7 +54,7 @@ CmdSurfaceCut::CmdSurfaceCut() sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); sMenuText = QT_TR_NOOP("Surface Cut Function"); - sToolTipText = QT_TR_NOOP("Cuts a shape with another shape"); + sToolTipText = QT_TR_NOOP("Cuts one shape using another"); sWhatsThis = "Surface_Cut"; sStatusTip = sToolTipText; sPixmap = "Surface_Cut"; From b5ab0dcbb7b257e625067a2b88fd614b305da21a Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:24:27 +0200 Subject: [PATCH 080/141] Update src/Mod/Surface/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index ac392c21c6..7dc682244f 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -53,7 +53,7 @@ CmdSurfaceCut::CmdSurfaceCut() { sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Surface Cut Function"); + sMenuText = QT_TR_NOOP("Surface Cut"); sToolTipText = QT_TR_NOOP("Cuts one shape using another"); sWhatsThis = "Surface_Cut"; sStatusTip = sToolTipText; From f77b90d9c8d17e5da53826846a741b487500cf94 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:24:35 +0200 Subject: [PATCH 081/141] Update src/Mod/Surface/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index 7dc682244f..c172d47bfa 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -112,7 +112,7 @@ CmdSurfaceFilling::CmdSurfaceFilling() sAppModule = "Surface"; sGroup = QT_TR_NOOP("Surface"); sMenuText = QT_TR_NOOP("Filling…"); - sToolTipText = QT_TR_NOOP("Creates a surface from a series of picked boundary edges.\n" + sToolTipText = QT_TR_NOOP("Creates a surface from a series of selected boundary edges.\n" "Additionally, the surface may be constrained by non-boundary edges\n" "and non-boundary vertices."); sStatusTip = sToolTipText; From 1d3358c3910edae7179fb0f6ff6ac8dcdc78f1f4 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:24:42 +0200 Subject: [PATCH 082/141] Update src/Mod/Surface/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/Command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index c172d47bfa..9bfa5c0bd6 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -113,8 +113,8 @@ CmdSurfaceFilling::CmdSurfaceFilling() sGroup = QT_TR_NOOP("Surface"); sMenuText = QT_TR_NOOP("Filling…"); sToolTipText = QT_TR_NOOP("Creates a surface from a series of selected boundary edges.\n" - "Additionally, the surface may be constrained by non-boundary edges\n" - "and non-boundary vertices."); + "Additionally, the surface may be constrained by edges and\n" + "vertices that are not on the boundary."); sStatusTip = sToolTipText; sWhatsThis = "Surface_Filling"; sPixmap = "Surface_Filling"; From 459d22bc0e9cdd7c05b6f8914ed5aa86f1f43a86 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:25:23 +0200 Subject: [PATCH 083/141] Update src/Mod/Surface/Gui/TaskFillingVertex.ui Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/TaskFillingVertex.ui | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Surface/Gui/TaskFillingVertex.ui b/src/Mod/Surface/Gui/TaskFillingVertex.ui index 32a5c9bd22..9acec821c4 100644 --- a/src/Mod/Surface/Gui/TaskFillingVertex.ui +++ b/src/Mod/Surface/Gui/TaskFillingVertex.ui @@ -17,8 +17,7 @@ - Vertices that will be used to constrain the surface, -that is, the surface will be forced to pass through these points. + Constrains the surface to pass through the selected vertices Non-Boundary Vertices From 9db457af8cf94657e7057d203730dbfb905fb092 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:25:33 +0200 Subject: [PATCH 084/141] Update src/Mod/Surface/Gui/TaskFillingEdge.ui Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/TaskFillingEdge.ui | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.ui b/src/Mod/Surface/Gui/TaskFillingEdge.ui index 9d8d0ba2cd..76eb425797 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.ui +++ b/src/Mod/Surface/Gui/TaskFillingEdge.ui @@ -23,8 +23,7 @@ - Edges that will be used to constrain the surface, -that is, the surface will be forced to pass through these edges + Constrains the surface to pass through the selected edges Non-Boundary Edges From 4d55b42096bc90bb0ec8eafd6c61c3bc4651d429 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:25:41 +0200 Subject: [PATCH 085/141] Update src/Mod/Surface/Gui/TaskSections.ui Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Surface/Gui/TaskSections.ui | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Surface/Gui/TaskSections.ui b/src/Mod/Surface/Gui/TaskSections.ui index a74cd881a4..f090477d16 100644 --- a/src/Mod/Surface/Gui/TaskSections.ui +++ b/src/Mod/Surface/Gui/TaskSections.ui @@ -17,8 +17,7 @@ - Edges that will be sectional cuts of the surface, -that is, the surface will be forced to pass through these edges. + Constrains the surface to follow the selected sectional edges Sectional Edges From 807e38953e1fffc889ca451a2c5f1b13b7d54901 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 16:19:26 +0200 Subject: [PATCH 086/141] Robot: Update UI strings for consistency --- src/Mod/Robot/App/AppRobot.cpp | 2 +- src/Mod/Robot/Gui/AppRobotGui.cpp | 2 +- src/Mod/Robot/Gui/Command.cpp | 16 ++++----- src/Mod/Robot/Gui/CommandExport.cpp | 8 ++--- src/Mod/Robot/Gui/CommandInsertRobot.cpp | 12 +++---- src/Mod/Robot/Gui/CommandTrajectory.cpp | 30 ++++++++--------- src/Mod/Robot/Gui/TaskEdge2TracParameter.ui | 4 +-- src/Mod/Robot/Gui/TaskRobot6Axis.ui | 2 +- src/Mod/Robot/Gui/TaskRobotMessages.ui | 2 +- .../Gui/TaskTrajectoryDressUpParameter.ui | 20 +++++------ src/Mod/Robot/Gui/Workbench.cpp | 33 +++++++++---------- 11 files changed, 65 insertions(+), 66 deletions(-) diff --git a/src/Mod/Robot/App/AppRobot.cpp b/src/Mod/Robot/App/AppRobot.cpp index 03f15bb67a..c6e286fdac 100644 --- a/src/Mod/Robot/App/AppRobot.cpp +++ b/src/Mod/Robot/App/AppRobot.cpp @@ -109,7 +109,7 @@ PyMOD_INIT_FUNC(Robot) } PyObject* robotModule = Robot::initModule(); - Base::Console().log("Loading Robot module... done\n"); + Base::Console().log("Loading Robot module… done\n"); // Add Types to module Base::Interpreter().addType(&Robot::Robot6AxisPy ::Type,robotModule,"Robot6Axis"); diff --git a/src/Mod/Robot/Gui/AppRobotGui.cpp b/src/Mod/Robot/Gui/AppRobotGui.cpp index b7609b0fd3..5e53149020 100644 --- a/src/Mod/Robot/Gui/AppRobotGui.cpp +++ b/src/Mod/Robot/Gui/AppRobotGui.cpp @@ -100,7 +100,7 @@ PyMOD_INIT_FUNC(RobotGui) PyMOD_Return(nullptr); } PyObject* mod = RobotGui::initModule(); - Base::Console().log("Loading GUI of Robot module... done\n"); + Base::Console().log("Loading GUI of Robot module… done\n"); // instantiating the commands CreateRobotCommands(); diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index 3f12910daa..562db41fcf 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -49,8 +49,8 @@ CmdRobotSetHomePos::CmdRobotSetHomePos() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Set the home position"); - sToolTipText = QT_TR_NOOP("Set the home position"); + sMenuText = QT_TR_NOOP("Set Home Position"); + sToolTipText = QT_TR_NOOP("Sets the home position"); sWhatsThis = "Robot_SetHomePos"; sStatusTip = sToolTipText; sPixmap = "Robot_SetHomePos"; @@ -108,8 +108,8 @@ CmdRobotRestoreHomePos::CmdRobotRestoreHomePos() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Move to home"); - sToolTipText = QT_TR_NOOP("Move to home"); + sMenuText = QT_TR_NOOP("Move to Home"); + sToolTipText = QT_TR_NOOP("Moves to home"); sWhatsThis = "Robot_RestoreHomePos"; sStatusTip = sToolTipText; sPixmap = "Robot_RestoreHomePos"; @@ -161,8 +161,8 @@ CmdRobotConstraintAxle::CmdRobotConstraintAxle() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Place robot..."); - sToolTipText = QT_TR_NOOP("Place a robot (experimental!)"); + sMenuText = QT_TR_NOOP("Place Robot…"); + sToolTipText = QT_TR_NOOP("Places a robot"); sWhatsThis = "Robot_Create"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; @@ -209,8 +209,8 @@ CmdRobotSimulate::CmdRobotSimulate() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Simulate a trajectory"); - sToolTipText = QT_TR_NOOP("Run a simulation on a trajectory"); + sMenuText = QT_TR_NOOP("Simulate Trajectory"); + sToolTipText = QT_TR_NOOP("Runs a simulation on a trajectory"); sWhatsThis = "Robot_Simulate"; sStatusTip = sToolTipText; sPixmap = "Robot_Simulate"; diff --git a/src/Mod/Robot/Gui/CommandExport.cpp b/src/Mod/Robot/Gui/CommandExport.cpp index 567482260f..8597a0247c 100644 --- a/src/Mod/Robot/Gui/CommandExport.cpp +++ b/src/Mod/Robot/Gui/CommandExport.cpp @@ -44,8 +44,8 @@ CmdRobotExportKukaCompact::CmdRobotExportKukaCompact() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka compact subroutine..."); - sToolTipText = QT_TR_NOOP("Export the trajectory as a compact KRL subroutine."); + sMenuText = QT_TR_NOOP("Kuka Compact Subroutine…"); + sToolTipText = QT_TR_NOOP("Exports the trajectory as a compact KRL subroutine"); sWhatsThis = "Robot_ExportKukaCompact"; sStatusTip = sToolTipText; sPixmap = "Robot_Export"; @@ -119,8 +119,8 @@ CmdRobotExportKukaFull::CmdRobotExportKukaFull() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka full subroutine..."); - sToolTipText = QT_TR_NOOP("Export the trajectory as a full KRL subroutine."); + sMenuText = QT_TR_NOOP("Kuka Full Subroutine…"); + sToolTipText = QT_TR_NOOP("Exports the trajectory as a full KRL subroutine"); sWhatsThis = "Robot_ExportKukaFull"; sStatusTip = sToolTipText; sPixmap = "Robot_Export"; diff --git a/src/Mod/Robot/Gui/CommandInsertRobot.cpp b/src/Mod/Robot/Gui/CommandInsertRobot.cpp index d4d9de09d4..163c433ac0 100644 --- a/src/Mod/Robot/Gui/CommandInsertRobot.cpp +++ b/src/Mod/Robot/Gui/CommandInsertRobot.cpp @@ -45,7 +45,7 @@ CmdRobotInsertKukaIR500::CmdRobotInsertKukaIR500() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR500"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR500 into the document."); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR500 into the document"); sWhatsThis = "Robot_InsertKukaIR500"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; @@ -96,7 +96,7 @@ CmdRobotInsertKukaIR16::CmdRobotInsertKukaIR16() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR16"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR16 into the document."); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR16 into the document"); sWhatsThis = "Robot_InsertKukaIR16"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; @@ -144,7 +144,7 @@ CmdRobotInsertKukaIR210::CmdRobotInsertKukaIR210() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR210"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR210 into the document."); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR210 into the document"); sWhatsThis = "Robot_InsertKukaIR210"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; @@ -191,7 +191,7 @@ CmdRobotInsertKukaIR125::CmdRobotInsertKukaIR125() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR125"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR125 into the document."); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR125 into the document"); sWhatsThis = "Robot_InsertKukaIR125"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; @@ -238,8 +238,8 @@ CmdRobotAddToolShape::CmdRobotAddToolShape() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Add tool"); - sToolTipText = QT_TR_NOOP("Add a tool shape to the robot"); + sMenuText = QT_TR_NOOP("Tool"); + sToolTipText = QT_TR_NOOP("Adds a tool shape to the robot"); sWhatsThis = "Robot_AddToolShape"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index 5a60f1884d..f678258fd4 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -53,8 +53,8 @@ CmdRobotCreateTrajectory::CmdRobotCreateTrajectory() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Create trajectory"); - sToolTipText = QT_TR_NOOP("Create a new empty trajectory"); + sMenuText = QT_TR_NOOP("Trajectory"); + sToolTipText = QT_TR_NOOP("Creates a new empty trajectory"); sWhatsThis = "Robot_CreateTrajectory"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateTrajectory"; @@ -88,7 +88,7 @@ CmdRobotInsertWaypoint::CmdRobotInsertWaypoint() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Insert in trajectory"); - sToolTipText = QT_TR_NOOP("Insert robot Tool location into trajectory"); + sToolTipText = QT_TR_NOOP("Insert robot tool location into the trajectory"); sWhatsThis = "Robot_InsertWaypoint"; sStatusTip = sToolTipText; sPixmap = "Robot_InsertWaypoint"; @@ -156,8 +156,8 @@ CmdRobotInsertWaypointPreselect::CmdRobotInsertWaypointPreselect() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Insert in trajectory"); - sToolTipText = QT_TR_NOOP("Insert preselection position into trajectory (W)"); + sMenuText = QT_TR_NOOP("Insert in Trajectory"); + sToolTipText = QT_TR_NOOP("Inserts the preselection position into the trajectory (W)"); sWhatsThis = "Robot_InsertWaypointPreselect"; sStatusTip = sToolTipText; sPixmap = "Robot_InsertWaypointPre"; @@ -233,9 +233,9 @@ CmdRobotSetDefaultOrientation::CmdRobotSetDefaultOrientation() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Set default orientation"); + sMenuText = QT_TR_NOOP("Set Default Orientation"); sToolTipText = - QT_TR_NOOP("Set the default orientation for subsequent commands for waypoint creation"); + QT_TR_NOOP("Sets the default orientation for subsequent commands for waypoint creation"); sWhatsThis = "Robot_SetDefaultOrientation"; sStatusTip = sToolTipText; sPixmap = nullptr; @@ -277,8 +277,8 @@ CmdRobotSetDefaultValues::CmdRobotSetDefaultValues() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Set default values"); - sToolTipText = QT_TR_NOOP("Set the default values for speed, acceleration and continuity for " + sMenuText = QT_TR_NOOP("Set Default Values"); + sToolTipText = QT_TR_NOOP("Sets the default values for speed, acceleration, and continuity for " "subsequent commands of waypoint creation"); sWhatsThis = "Robot_SetDefaultValues"; sStatusTip = sToolTipText; @@ -358,8 +358,8 @@ CmdRobotEdge2Trac::CmdRobotEdge2Trac() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Edge to Trajectory..."); - sToolTipText = QT_TR_NOOP("Generate a Trajectory from a set of edges"); + sMenuText = QT_TR_NOOP("Edge to Trajectory…"); + sToolTipText = QT_TR_NOOP("Generates a trajectory from a set of edges"); sWhatsThis = "Robot_Edge2Trac"; sStatusTip = sToolTipText; sPixmap = "Robot_Edge2Trac"; @@ -424,9 +424,9 @@ CmdRobotTrajectoryDressUp::CmdRobotTrajectoryDressUp() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Dress-up trajectory..."); + sMenuText = QT_TR_NOOP("Dress-Up Trajectory…"); sToolTipText = - QT_TR_NOOP("Create a dress-up object which overrides some aspects of a trajectory"); + QT_TR_NOOP("Creates a dress-up object which overrides some aspects of a trajectory"); sWhatsThis = "Robot_TrajectoryDressUp"; sStatusTip = sToolTipText; sPixmap = "Robot_TrajectoryDressUp"; @@ -481,8 +481,8 @@ CmdRobotTrajectoryCompound::CmdRobotTrajectoryCompound() { sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Trajectory compound..."); - sToolTipText = QT_TR_NOOP("Group and connect some trajectories to one"); + sMenuText = QT_TR_NOOP("Trajectory Compound…"); + sToolTipText = QT_TR_NOOP("Groups and connects some trajectories to one"); sWhatsThis = "Robot_TrajectoryCompound"; sStatusTip = sToolTipText; sPixmap = "Robot_TrajectoryCompound"; diff --git a/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui b/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui index 5b9ce5fbb1..07e7e28c2c 100644 --- a/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui +++ b/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui @@ -26,7 +26,7 @@ - Hide / Show + Hide/Show @@ -69,7 +69,7 @@ - Sizing Value: + Sizing Value diff --git a/src/Mod/Robot/Gui/TaskRobot6Axis.ui b/src/Mod/Robot/Gui/TaskRobot6Axis.ui index 479ed81eba..30e333b2b8 100644 --- a/src/Mod/Robot/Gui/TaskRobot6Axis.ui +++ b/src/Mod/Robot/Gui/TaskRobot6Axis.ui @@ -342,7 +342,7 @@ - ... + diff --git a/src/Mod/Robot/Gui/TaskRobotMessages.ui b/src/Mod/Robot/Gui/TaskRobotMessages.ui index 4370dac0b8..cbb9e9b06a 100644 --- a/src/Mod/Robot/Gui/TaskRobotMessages.ui +++ b/src/Mod/Robot/Gui/TaskRobotMessages.ui @@ -17,7 +17,7 @@ - clear + Clear diff --git a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui index ec2be73fe0..6395b02fd5 100644 --- a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui +++ b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui @@ -17,7 +17,7 @@ - Speed & Acceleration: + Speed & acceleration @@ -26,7 +26,7 @@ - Speed: + Speed @@ -63,7 +63,7 @@ - Accel: + Acceleration @@ -99,7 +99,7 @@ - Don't change Cont + Do not change Cont @@ -124,7 +124,7 @@ - Position and Orientation: + Position and orientation @@ -146,7 +146,7 @@ false - ... + @@ -156,22 +156,22 @@ - Don't change Position & Orientation + Don not change position & orientation - Use Orientation + Use orientation - Add Position + Add position - Add Orientation + Add orientation diff --git a/src/Mod/Robot/Gui/Workbench.cpp b/src/Mod/Robot/Gui/Workbench.cpp index 8b7bfb6ced..d38510dbf0 100644 --- a/src/Mod/Robot/Gui/Workbench.cpp +++ b/src/Mod/Robot/Gui/Workbench.cpp @@ -45,11 +45,11 @@ using namespace RobotGui; #if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Robot"); - qApp->translate("Workbench", "Insert Robots"); + qApp->translate("Workbench", "Insert Robot"); qApp->translate("Workbench", "&Robot"); - qApp->translate("Workbench", "Export trajectory"); - qApp->translate("Gui::TaskView::TaskWatcherCommands", "Trajectory tools"); - qApp->translate("Gui::TaskView::TaskWatcherCommands", "Robot tools"); + qApp->translate("Workbench", "Export Trajectory"); + qApp->translate("Gui::TaskView::TaskWatcherCommands", "Trajectory Tools"); + qApp->translate("Gui::TaskView::TaskWatcherCommands", "Robot Tools"); qApp->translate("Gui::TaskView::TaskWatcherCommands", "Insert Robot"); #endif @@ -69,13 +69,12 @@ void Workbench::activated() if (!fi.exists()) { Gui::WaitCursor wc; wc.restoreCursor(); - QMessageBox::warning( - Gui::getMainWindow(), - QObject::tr("No robot files installed"), - QObject::tr("Please visit %1 and copy the files to %2") - .arg(QStringLiteral("https://github.com/FreeCAD/FreeCAD/tree/master" - "/src/Mod/Robot/Lib/Kuka"), - dir)); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No robot files installed"), + QObject::tr("Visit %1 and copy the files to %2") + .arg(QStringLiteral("https://github.com/FreeCAD/FreeCAD/tree/main" + "/src/Mod/Robot/Lib/Kuka"), + dir)); wc.setWaitCursor(); } @@ -104,26 +103,26 @@ void Workbench::activated() new Gui::TaskView::TaskWatcherCommands("SELECT Robot::TrajectoryObject COUNT 1" "SELECT Robot::RobotObject COUNT 1", RobotAndTrac, - "Trajectory tools", + "Trajectory Tools", "Robot_InsertWaypoint")); Watcher.push_back(new TaskWatcherRobot); Watcher.push_back(new Gui::TaskView::TaskWatcherCommands("SELECT Robot::RobotObject COUNT 1", Robot, - "Robot tools", + "Robot Tools", "Robot_CreateRobot")); Watcher.push_back( new Gui::TaskView::TaskWatcherCommands("SELECT Robot::TrajectoryObject COUNT 1", TracSingle, - "Trajectory tools", + "Trajectory Tools", "Robot_CreateRobot")); Watcher.push_back( new Gui::TaskView::TaskWatcherCommands("SELECT Robot::TrajectoryObject COUNT 2..", TracMore, - "Trajectory tools", + "Trajectory Tools", "Robot_CreateRobot")); Watcher.push_back( @@ -173,7 +172,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const // analyze Gui::MenuItem* insertRobots = new Gui::MenuItem; - insertRobots->setCommand("Insert Robots"); + insertRobots->setCommand("Insert Robot"); *insertRobots << "Robot_InsertKukaIR500" << "Robot_InsertKukaIR210" << "Robot_InsertKukaIR125" @@ -183,7 +182,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const // boolean Gui::MenuItem* exportM = new Gui::MenuItem; - exportM->setCommand("Export trajectory"); + exportM->setCommand("Export Trajectory"); *exportM << "Robot_ExportKukaCompact" << "Robot_ExportKukaFull"; From 50e5c40bb9067ebd53ca9d6e7b4f024f7ae9a6f2 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:51:58 +0200 Subject: [PATCH 087/141] Update src/Mod/Robot/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index 562db41fcf..f13afc7f5c 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -109,7 +109,7 @@ CmdRobotRestoreHomePos::CmdRobotRestoreHomePos() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Move to Home"); - sToolTipText = QT_TR_NOOP("Moves to home"); + sToolTipText = QT_TR_NOOP("Moves to the home position"); sWhatsThis = "Robot_RestoreHomePos"; sStatusTip = sToolTipText; sPixmap = "Robot_RestoreHomePos"; From 4897a670aaf37bbab8bd544f05e4af87cf873009 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:52:15 +0200 Subject: [PATCH 088/141] Update src/Mod/Robot/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index f13afc7f5c..9fda46e1b6 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -162,7 +162,7 @@ CmdRobotConstraintAxle::CmdRobotConstraintAxle() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Place Robot…"); - sToolTipText = QT_TR_NOOP("Places a robot"); + sToolTipText = QT_TR_NOOP("Places a robot in the document"); sWhatsThis = "Robot_Create"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; From 111233137218757b05b1b0eab8120d52b89b3816 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:52:25 +0200 Subject: [PATCH 089/141] Update src/Mod/Robot/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index 9fda46e1b6..8d306e8209 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -210,7 +210,7 @@ CmdRobotSimulate::CmdRobotSimulate() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Simulate Trajectory"); - sToolTipText = QT_TR_NOOP("Runs a simulation on a trajectory"); + sToolTipText = QT_TR_NOOP("Simulates robot movement along a selected trajectory"); sWhatsThis = "Robot_Simulate"; sStatusTip = sToolTipText; sPixmap = "Robot_Simulate"; From 6e772b70fd8607d5c29e8cc6f8dbb38102f07e47 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:52:36 +0200 Subject: [PATCH 090/141] Update src/Mod/Robot/Gui/CommandInsertRobot.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandInsertRobot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandInsertRobot.cpp b/src/Mod/Robot/Gui/CommandInsertRobot.cpp index 163c433ac0..203342cabc 100644 --- a/src/Mod/Robot/Gui/CommandInsertRobot.cpp +++ b/src/Mod/Robot/Gui/CommandInsertRobot.cpp @@ -96,7 +96,7 @@ CmdRobotInsertKukaIR16::CmdRobotInsertKukaIR16() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR16"); - sToolTipText = QT_TR_NOOP("Inserts a Kuka IR16 into the document"); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR16 robot into the scene"); sWhatsThis = "Robot_InsertKukaIR16"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; From e525ffa2f697b39e1abf40eb51a8b3ee7e1a1eea Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:52:42 +0200 Subject: [PATCH 091/141] Update src/Mod/Robot/Gui/CommandInsertRobot.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandInsertRobot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandInsertRobot.cpp b/src/Mod/Robot/Gui/CommandInsertRobot.cpp index 203342cabc..c3c342986c 100644 --- a/src/Mod/Robot/Gui/CommandInsertRobot.cpp +++ b/src/Mod/Robot/Gui/CommandInsertRobot.cpp @@ -144,7 +144,7 @@ CmdRobotInsertKukaIR210::CmdRobotInsertKukaIR210() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR210"); - sToolTipText = QT_TR_NOOP("Inserts a Kuka IR210 into the document"); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR210 robot into the scene"); sWhatsThis = "Robot_InsertKukaIR210"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; From ef3bdf348d3478366064a4544e30ab045dc0792f Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:52:50 +0200 Subject: [PATCH 092/141] Update src/Mod/Robot/Gui/CommandInsertRobot.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandInsertRobot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandInsertRobot.cpp b/src/Mod/Robot/Gui/CommandInsertRobot.cpp index c3c342986c..917fd3c5b3 100644 --- a/src/Mod/Robot/Gui/CommandInsertRobot.cpp +++ b/src/Mod/Robot/Gui/CommandInsertRobot.cpp @@ -191,7 +191,7 @@ CmdRobotInsertKukaIR125::CmdRobotInsertKukaIR125() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Kuka IR125"); - sToolTipText = QT_TR_NOOP("Inserts a Kuka IR125 into the document"); + sToolTipText = QT_TR_NOOP("Inserts a Kuka IR125 robot into the scene"); sWhatsThis = "Robot_InsertKukaIR125"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; From d250cd51bcfcea837099116174467ce30553e0e1 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:52:57 +0200 Subject: [PATCH 093/141] Update src/Mod/Robot/Gui/CommandTrajectory.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandTrajectory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index f678258fd4..509cfdb257 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -88,7 +88,7 @@ CmdRobotInsertWaypoint::CmdRobotInsertWaypoint() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Insert in trajectory"); - sToolTipText = QT_TR_NOOP("Insert robot tool location into the trajectory"); + sToolTipText = QT_TR_NOOP("Inserts the robot tool location into the trajectory"); sWhatsThis = "Robot_InsertWaypoint"; sStatusTip = sToolTipText; sPixmap = "Robot_InsertWaypoint"; From 71d5c8f898b372c7256cb37a89753cd423fcf9a1 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:53:03 +0200 Subject: [PATCH 094/141] Update src/Mod/Robot/Gui/CommandTrajectory.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandTrajectory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index 509cfdb257..ff529678a3 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -359,7 +359,7 @@ CmdRobotEdge2Trac::CmdRobotEdge2Trac() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Edge to Trajectory…"); - sToolTipText = QT_TR_NOOP("Generates a trajectory from a set of edges"); + sToolTipText = QT_TR_NOOP("Generates a trajectory from the selected edges"); sWhatsThis = "Robot_Edge2Trac"; sStatusTip = sToolTipText; sPixmap = "Robot_Edge2Trac"; From af578634e41114435e32ca838ab657132c7d6434 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:53:10 +0200 Subject: [PATCH 095/141] Update src/Mod/Robot/Gui/CommandTrajectory.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandTrajectory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index ff529678a3..fba4451306 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -426,7 +426,7 @@ CmdRobotTrajectoryDressUp::CmdRobotTrajectoryDressUp() sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Dress-Up Trajectory…"); sToolTipText = - QT_TR_NOOP("Creates a dress-up object which overrides some aspects of a trajectory"); + QT_TR_NOOP("Creates a dress-up object that overrides aspects of a trajectory"); sWhatsThis = "Robot_TrajectoryDressUp"; sStatusTip = sToolTipText; sPixmap = "Robot_TrajectoryDressUp"; From 15494b5e5e066e22d25c3f3a12c1ffb660036fb1 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:53:17 +0200 Subject: [PATCH 096/141] Update src/Mod/Robot/Gui/CommandTrajectory.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Robot/Gui/CommandTrajectory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index fba4451306..25b2b2be1d 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -482,7 +482,7 @@ CmdRobotTrajectoryCompound::CmdRobotTrajectoryCompound() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Trajectory Compound…"); - sToolTipText = QT_TR_NOOP("Groups and connects some trajectories to one"); + sToolTipText = QT_TR_NOOP("Groups and connects multiple trajectories into one"); sWhatsThis = "Robot_TrajectoryCompound"; sStatusTip = sToolTipText; sPixmap = "Robot_TrajectoryCompound"; From 934929516a0d10c632fd12f821788dc6e912863e Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:55:46 +0200 Subject: [PATCH 097/141] Update src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui --- src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui index 6395b02fd5..6f025563f8 100644 --- a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui +++ b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui @@ -99,7 +99,8 @@ - Do not change Cont + Do not change continous mode + From 1421c4ced99f5faf87b35699a70e12dcad922246 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 07:56:36 +0000 Subject: [PATCH 098/141] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/Mod/Robot/Gui/CommandTrajectory.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index 25b2b2be1d..4d974bfc87 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -425,8 +425,7 @@ CmdRobotTrajectoryDressUp::CmdRobotTrajectoryDressUp() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Dress-Up Trajectory…"); - sToolTipText = - QT_TR_NOOP("Creates a dress-up object that overrides aspects of a trajectory"); + sToolTipText = QT_TR_NOOP("Creates a dress-up object that overrides aspects of a trajectory"); sWhatsThis = "Robot_TrajectoryDressUp"; sStatusTip = sToolTipText; sPixmap = "Robot_TrajectoryDressUp"; From b86a553423e57746c63115b12d0604b3e41c99ab Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:03:25 +0200 Subject: [PATCH 099/141] Update src/Mod/Robot/Gui/Command.cpp --- src/Mod/Robot/Gui/Command.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index 8d306e8209..5b017efcb6 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -162,7 +162,8 @@ CmdRobotConstraintAxle::CmdRobotConstraintAxle() sAppModule = "Robot"; sGroup = QT_TR_NOOP("Robot"); sMenuText = QT_TR_NOOP("Place Robot…"); - sToolTipText = QT_TR_NOOP("Places a robot in the document"); + sToolTipText = QT_TR_NOOP("Places a robot in the scene"); + sWhatsThis = "Robot_Create"; sStatusTip = sToolTipText; sPixmap = "Robot_CreateRobot"; From c5ddbb8a16ae8b7f7db3d2d268099c22ab5b530e Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 13:14:43 +0200 Subject: [PATCH 100/141] Spreadsheet: Update UI strings for consistency --- src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp | 2 +- src/Mod/Spreadsheet/Gui/Command.cpp | 60 +++++++++---------- src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp | 2 +- src/Mod/Spreadsheet/Gui/DlgBindSheet.ui | 8 +-- src/Mod/Spreadsheet/Gui/DlgSettings.ui | 12 ++-- src/Mod/Spreadsheet/Gui/DlgSheetConf.ui | 8 +-- src/Mod/Spreadsheet/Gui/LineEdit.cpp | 2 +- src/Mod/Spreadsheet/Gui/PropertiesDialog.ui | 2 +- src/Mod/Spreadsheet/Gui/Sheet.ui | 4 +- src/Mod/Spreadsheet/Gui/SheetTableView.cpp | 54 ++++++++--------- src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp | 2 +- .../Gui/ViewProviderSpreadsheet.cpp | 4 +- src/Mod/Spreadsheet/Gui/Workbench.cpp | 12 ++-- src/Mod/Spreadsheet/Gui/ZoomableView.cpp | 2 +- 14 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp b/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp index 2a1778cca2..eb98e4d70f 100644 --- a/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp +++ b/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp @@ -152,6 +152,6 @@ PyMOD_INIT_FUNC(SpreadsheetGui) loadSpreadsheetResource(); PyObject* mod = SpreadsheetGui::initModule(); - Base::Console().log("Loading GUI of Spreadsheet module... done\n"); + Base::Console().log("Loading GUI of Spreadsheet module… done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index a9430fcf97..3d333df4d8 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -58,8 +58,8 @@ CmdSpreadsheetMergeCells::CmdSpreadsheetMergeCells() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Merge cells"); - sToolTipText = QT_TR_NOOP("Merge selected cells"); + sMenuText = QT_TR_NOOP("&Merge Cells"); + sToolTipText = QT_TR_NOOP("Merges the selected cells"); sWhatsThis = "Spreadsheet_MergeCells"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetMergeCells"; @@ -119,8 +119,8 @@ CmdSpreadsheetSplitCell::CmdSpreadsheetSplitCell() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Sp&lit cell"); - sToolTipText = QT_TR_NOOP("Split previously merged cells"); + sMenuText = QT_TR_NOOP("Sp&lit Cell"); + sToolTipText = QT_TR_NOOP("Splits the selected and previously merged cell"); sWhatsThis = "Spreadsheet_SplitCell"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetSplitCell"; @@ -181,8 +181,8 @@ CmdSpreadsheetImport::CmdSpreadsheetImport() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Import spreadsheet"); - sToolTipText = QT_TR_NOOP("Import CSV file into spreadsheet"); + sMenuText = QT_TR_NOOP("&Import Spreadsheet"); + sToolTipText = QT_TR_NOOP("Imports a CSV file into the spreadsheet"); sWhatsThis = "Spreadsheet_Import"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetImport"; @@ -233,8 +233,8 @@ CmdSpreadsheetExport::CmdSpreadsheetExport() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Export spreadsheet"); - sToolTipText = QT_TR_NOOP("Export spreadsheet to CSV file"); + sMenuText = QT_TR_NOOP("&Export Spreadsheet"); + sToolTipText = QT_TR_NOOP("Exports the spreadsheet to a CSV file"); sWhatsThis = "Spreadsheet_Export"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetExport"; @@ -279,8 +279,8 @@ CmdSpreadsheetAlignLeft::CmdSpreadsheetAlignLeft() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align &left"); - sToolTipText = QT_TR_NOOP("Left-align contents of selected cells"); + sMenuText = QT_TR_NOOP("Align &Left"); + sToolTipText = QT_TR_NOOP("Left-aligns the contents of the selected cells"); sWhatsThis = "Spreadsheet_AlignLeft"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignLeft"; @@ -336,8 +336,8 @@ CmdSpreadsheetAlignCenter::CmdSpreadsheetAlignCenter() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align ¢er"); - sToolTipText = QT_TR_NOOP("Center-align contents of selected cells"); + sMenuText = QT_TR_NOOP("Align Horizontal &Center"); + sToolTipText = QT_TR_NOOP("Horizontally center-aligns the contents of the selected cells"); sWhatsThis = "Spreadsheet_AlignCenter"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignCenter"; @@ -393,8 +393,8 @@ CmdSpreadsheetAlignRight::CmdSpreadsheetAlignRight() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align &right"); - sToolTipText = QT_TR_NOOP("Right-align contents of selected cells"); + sMenuText = QT_TR_NOOP("Align &Right"); + sToolTipText = QT_TR_NOOP("Right-aligns the contents of the selected cells"); sWhatsThis = "Spreadsheet_AlignRight"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignRight"; @@ -450,8 +450,8 @@ CmdSpreadsheetAlignTop::CmdSpreadsheetAlignTop() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align &top"); - sToolTipText = QT_TR_NOOP("Top-align contents of selected cells"); + sMenuText = QT_TR_NOOP("Align &Top"); + sToolTipText = QT_TR_NOOP("Top-aligns the contents the of selected cells"); sWhatsThis = "Spreadsheet_AlignTop"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignTop"; @@ -507,8 +507,8 @@ CmdSpreadsheetAlignBottom::CmdSpreadsheetAlignBottom() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align &bottom"); - sToolTipText = QT_TR_NOOP("Bottom-align contents of selected cells"); + sMenuText = QT_TR_NOOP("Align &Bottom"); + sToolTipText = QT_TR_NOOP("Bottom-aligns the contents of the selected cells"); sWhatsThis = "Spreadsheet_AlignBottom"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignBottom"; @@ -564,8 +564,8 @@ CmdSpreadsheetAlignVCenter::CmdSpreadsheetAlignVCenter() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Vertically center-align"); - sToolTipText = QT_TR_NOOP("Vertically center-align contents of selected cells"); + sMenuText = QT_TR_NOOP("Align &Vertical Center"); + sToolTipText = QT_TR_NOOP("Vertically center-aligns the contents of the selected cells"); sWhatsThis = "Spreadsheet_AlignVCenter"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignVCenter"; @@ -621,8 +621,8 @@ CmdSpreadsheetStyleBold::CmdSpreadsheetStyleBold() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Bold text"); - sToolTipText = QT_TR_NOOP("Set text in selected cells bold"); + sMenuText = QT_TR_NOOP("&Bold Text"); + sToolTipText = QT_TR_NOOP("Sets the text in the selected cells bold"); sWhatsThis = "Spreadsheet_StyleBold"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetStyleBold"; @@ -705,8 +705,8 @@ CmdSpreadsheetStyleItalic::CmdSpreadsheetStyleItalic() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Italic text"); - sToolTipText = QT_TR_NOOP("Set text in selected cells italic"); + sMenuText = QT_TR_NOOP("&Italic Iext"); + sToolTipText = QT_TR_NOOP("Sets the text in the selected cells italic"); sWhatsThis = "Spreadsheet_StyleItalic"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetStyleItalic"; @@ -789,8 +789,8 @@ CmdSpreadsheetStyleUnderline::CmdSpreadsheetStyleUnderline() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Underline text"); - sToolTipText = QT_TR_NOOP("Underline text in selected cells"); + sMenuText = QT_TR_NOOP("&Underline Text"); + sToolTipText = QT_TR_NOOP("Underlines the text in the selected cells"); sWhatsThis = "Spreadsheet_StyleUnderline"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetStyleUnderline"; @@ -873,8 +873,8 @@ CmdSpreadsheetSetAlias::CmdSpreadsheetSetAlias() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Set alias"); - sToolTipText = QT_TR_NOOP("Set alias for selected cell"); + sMenuText = QT_TR_NOOP("Set Alias"); + sToolTipText = QT_TR_NOOP("Sets an alias for the selected cell"); sWhatsThis = "Spreadsheet_SetAlias"; sStatusTip = sToolTipText; sAccel = "Ctrl+Shift+A"; @@ -944,8 +944,8 @@ CmdCreateSpreadsheet::CmdCreateSpreadsheet() { sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("&Create spreadsheet"); - sToolTipText = QT_TR_NOOP("Create a new spreadsheet"); + sMenuText = QT_TR_NOOP("&New Spreadsheet"); + sToolTipText = QT_TR_NOOP("Creates a new spreadsheet"); sWhatsThis = "Spreadsheet_CreateSheet"; sStatusTip = sToolTipText; sPixmap = "Spreadsheet"; diff --git a/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp b/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp index 2b359cc4dc..a7f191367c 100644 --- a/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp +++ b/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp @@ -223,7 +223,7 @@ void DlgBindSheet::accept() tr("Bind cells"), tr("Source and target cell count mismatch. " "Partial binding may still work.\n\n" - "Do you want to continue?"), + "Continue?"), QMessageBox::Yes | QMessageBox::No); if (res == QMessageBox::No) { return; diff --git a/src/Mod/Spreadsheet/Gui/DlgBindSheet.ui b/src/Mod/Spreadsheet/Gui/DlgBindSheet.ui index fb95876a65..61e537e7e9 100644 --- a/src/Mod/Spreadsheet/Gui/DlgBindSheet.ui +++ b/src/Mod/Spreadsheet/Gui/DlgBindSheet.ui @@ -33,7 +33,7 @@ - Bind cells: + Bind cells @@ -66,7 +66,7 @@ - To cells: + To cells @@ -95,7 +95,7 @@ The expression must evaluate to a string of some cell address. End cell address to bind to. -Type '=' if you want to use an expression. +Type '=' to use an expression. The expression must evaluate to a string of some cell address. @@ -114,7 +114,7 @@ The expression must evaluate to a string of some cell address. - Sheet: + Sheet diff --git a/src/Mod/Spreadsheet/Gui/DlgSettings.ui b/src/Mod/Spreadsheet/Gui/DlgSettings.ui index e6f19c4313..8779610d7e 100644 --- a/src/Mod/Spreadsheet/Gui/DlgSettings.ui +++ b/src/Mod/Spreadsheet/Gui/DlgSettings.ui @@ -29,7 +29,7 @@ - If checked, use the custom presentation to display cell string. + Uses the custom presentation to display cell string Show alias in cell with format @@ -45,7 +45,7 @@ - Set a zoom level for table view from 60% to 160%. + Defines a default zoom level for table view from 60% to 160% % @@ -73,7 +73,7 @@ - Default zoom level: + Default zoom level @@ -128,7 +128,7 @@ Defaults to: %V = %A - Delimiter Character: + Delimiter character @@ -188,7 +188,7 @@ Defaults to: %V = %A - Quote Character: + Quote character @@ -220,7 +220,7 @@ Defaults to: %V = %A - Escape Character: + Escape character diff --git a/src/Mod/Spreadsheet/Gui/DlgSheetConf.ui b/src/Mod/Spreadsheet/Gui/DlgSheetConf.ui index 799b9f103f..56996a9860 100644 --- a/src/Mod/Spreadsheet/Gui/DlgSheetConf.ui +++ b/src/Mod/Spreadsheet/Gui/DlgSheetConf.ui @@ -17,7 +17,7 @@ - Cell range: + Cell range @@ -54,7 +54,7 @@ by that property. - Property: + Property @@ -69,14 +69,14 @@ switch the design configuration. The property will be created if not exist. - Group: + Group - Optional property group name. + Optional property group name diff --git a/src/Mod/Spreadsheet/Gui/LineEdit.cpp b/src/Mod/Spreadsheet/Gui/LineEdit.cpp index 48e5dcae92..3410433b47 100644 --- a/src/Mod/Spreadsheet/Gui/LineEdit.cpp +++ b/src/Mod/Spreadsheet/Gui/LineEdit.cpp @@ -57,7 +57,7 @@ void LineEdit::setDocumentObject(const App::DocumentObject* currentDocObj, bool QPointer active_view = Gui::MainWindow::getInstance()->activeWindow(); if (!active_view) { Base::Console().developerWarning("LineEdit::setDocumentObject", - "The active view is not Spreadsheet"); + "The active view is not a spreadsheet"); return; } QPointer zv = active_view->findChild(); diff --git a/src/Mod/Spreadsheet/Gui/PropertiesDialog.ui b/src/Mod/Spreadsheet/Gui/PropertiesDialog.ui index a5f6cd3f65..fc54aa4d7d 100644 --- a/src/Mod/Spreadsheet/Gui/PropertiesDialog.ui +++ b/src/Mod/Spreadsheet/Gui/PropertiesDialog.ui @@ -11,7 +11,7 @@ - Cell properties + Cell Properties diff --git a/src/Mod/Spreadsheet/Gui/Sheet.ui b/src/Mod/Spreadsheet/Gui/Sheet.ui index 9d1f78bfe0..467be1c347 100644 --- a/src/Mod/Spreadsheet/Gui/Sheet.ui +++ b/src/Mod/Spreadsheet/Gui/Sheet.ui @@ -19,7 +19,7 @@ - &Content: + &Content cellContent @@ -36,7 +36,7 @@ - &Alias: + &Alias cellAlias diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp index 7d71dd7bd3..f220339e56 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp @@ -139,20 +139,20 @@ SheetTableView::SheetTableView(QWidget* parent) Q_UNUSED(isContiguous) /*: This is shown in the context menu for the vertical header in a spreadsheet. The number refers to how many lines are selected and will be inserted. */ - auto insertBefore = menu.addAction(tr("Insert %n row(s) above", "", selection.size())); + auto insertBefore = menu.addAction(tr("Insert %n Row(s) Above", "", selection.size())); connect(insertBefore, &QAction::triggered, this, &SheetTableView::insertRows); if (max < model()->rowCount() - 1) { auto insertAfter = - menu.addAction(tr("Insert %n row(s) below", "", selection.size())); + menu.addAction(tr("Insert %n Row(s) Below", "", selection.size())); connect(insertAfter, &QAction::triggered, this, &SheetTableView::insertRowsAfter); } } else { - auto insert = menu.addAction(tr("Insert %n non-contiguous rows", "", selection.size())); + auto insert = menu.addAction(tr("Insert %n Non-Contiguous Rows", "", selection.size())); connect(insert, &QAction::triggered, this, &SheetTableView::insertRows); } - auto remove = menu.addAction(tr("Remove row(s)", "", selection.size())); + auto remove = menu.addAction(tr("Remove Rows", "", selection.size())); connect(remove, &QAction::triggered, this, &SheetTableView::removeRows); menu.exec(QCursor::pos()); }); @@ -166,12 +166,12 @@ SheetTableView::SheetTableView(QWidget* parent) Q_UNUSED(isContiguous) /*: This is shown in the context menu for the horizontal header in a spreadsheet. The number refers to how many lines are selected and will be inserted. */ - auto insertAbove = menu.addAction(tr("Insert %n column(s) left", "", selection.size())); + auto insertAbove = menu.addAction(tr("Insert %n Column(s) Left", "", selection.size())); connect(insertAbove, &QAction::triggered, this, &SheetTableView::insertColumns); if (max < model()->columnCount() - 1) { auto insertAfter = - menu.addAction(tr("Insert %n column(s) right", "", selection.size())); + menu.addAction(tr("Insert %n Column(s) Right", "", selection.size())); connect(insertAfter, &QAction::triggered, this, @@ -180,15 +180,15 @@ SheetTableView::SheetTableView(QWidget* parent) } else { auto insert = - menu.addAction(tr("Insert %n non-contiguous columns", "", selection.size())); + menu.addAction(tr("Insert %n Non-Contiguous Columns", "", selection.size())); connect(insert, &QAction::triggered, this, &SheetTableView::insertColumns); } - auto remove = menu.addAction(tr("Remove column(s)", "", selection.size())); + auto remove = menu.addAction(tr("Remove Column(s)", "", selection.size())); connect(remove, &QAction::triggered, this, &SheetTableView::removeColumns); menu.exec(QCursor::pos()); }); - actionProperties = new QAction(tr("Properties..."), this); + actionProperties = new QAction(tr("Properties…"), this); addAction(actionProperties); horizontalHeader()->setContextMenuPolicy(Qt::CustomContextMenu); @@ -204,11 +204,11 @@ SheetTableView::SheetTableView(QWidget* parent) connect(actionRecompute, &QAction::triggered, this, &SheetTableView::onRecompute); contextMenu.addAction(actionRecompute); - actionBind = new QAction(tr("Bind..."), this); + actionBind = new QAction(tr("Bind…"), this); connect(actionBind, &QAction::triggered, this, &SheetTableView::onBind); contextMenu.addAction(actionBind); - actionConf = new QAction(tr("Configuration table..."), this); + actionConf = new QAction(tr("Configuration Table…"), this); connect(actionConf, &QAction::triggered, this, &SheetTableView::onConfSetup); contextMenu.addAction(actionConf); @@ -216,9 +216,9 @@ SheetTableView::SheetTableView(QWidget* parent) verticalHeader()->addAction(actionBind); contextMenu.addSeparator(); - actionMerge = contextMenu.addAction(tr("Merge cells")); + actionMerge = contextMenu.addAction(tr("Merge Cells")); connect(actionMerge, &QAction::triggered, this, &SheetTableView::mergeCells); - actionSplit = contextMenu.addAction(tr("Split cells")); + actionSplit = contextMenu.addAction(tr("Split Cells")); connect(actionSplit, &QAction::triggered, this, &SheetTableView::splitCell); contextMenu.addSeparator(); @@ -241,7 +241,7 @@ SheetTableView::SheetTableView(QWidget* parent) void SheetTableView::onRecompute() { - Gui::Command::openCommand("Recompute cells"); + Gui::Command::openCommand("Recompute Cells"); for (auto& range : selectedRanges()) { Gui::cmdAppObjectArgs(sheet, "recomputeCells('%s', '%s')", @@ -351,7 +351,7 @@ void SheetTableView::insertRows() std::sort(sortedRows.begin(), sortedRows.end()); /* Insert rows */ - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert rows")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert Rows")); std::vector::const_reverse_iterator it = sortedRows.rbegin(); while (it != sortedRows.rend()) { int prev = *it; @@ -384,7 +384,7 @@ void SheetTableView::insertRowsAfter() assert(max - min == rows.size() - 1); Q_UNUSED(min) - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert rows")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert Rows")); Gui::cmdAppObjectArgs(sheet, "insertRows('%s', %d)", rowName(max + 1).c_str(), rows.size()); Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -404,7 +404,7 @@ void SheetTableView::removeRows() std::sort(sortedRows.begin(), sortedRows.end(), std::greater<>()); /* Remove rows */ - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove rows")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove Rows")); for (const auto& it : sortedRows) { Gui::cmdAppObjectArgs(sheet, "removeRows('%s', %d)", rowName(it).c_str(), 1); } @@ -426,7 +426,7 @@ void SheetTableView::insertColumns() std::sort(sortedColumns.begin(), sortedColumns.end()); /* Insert columns */ - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert columns")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert Columns")); std::vector::const_reverse_iterator it = sortedColumns.rbegin(); while (it != sortedColumns.rend()) { int prev = *it; @@ -459,7 +459,7 @@ void SheetTableView::insertColumnsAfter() assert(max - min == columns.size() - 1); Q_UNUSED(min) - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert columns")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert Columns")); Gui::cmdAppObjectArgs(sheet, "insertColumns('%s', %d)", columnName(max + 1).c_str(), @@ -482,7 +482,7 @@ void SheetTableView::removeColumns() std::sort(sortedColumns.begin(), sortedColumns.end(), std::greater<>()); /* Remove columns */ - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove rows")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove Rows")); for (const auto& it : sortedColumns) { Gui::cmdAppObjectArgs(sheet, "removeColumns('%s', %d)", columnName(it).c_str(), 1); } @@ -667,16 +667,16 @@ bool SheetTableView::event(QEvent* event) } } else if (event && event->type() == QEvent::LanguageChange) { - actionProperties->setText(tr("Properties...")); + actionProperties->setText(tr("Properties…")); actionRecompute->setText(tr("Recompute")); - actionConf->setText(tr("Configuration table...")); - actionMerge->setText(tr("Merge cells")); - actionSplit->setText(tr("Split cells")); + actionConf->setText(tr("Configuration Table…")); + actionMerge->setText(tr("Merge Cells")); + actionSplit->setText(tr("Split Cells")); actionCopy->setText(tr("Copy")); actionPaste->setText(tr("Paste")); actionCut->setText(tr("Cut")); actionDel->setText(tr("Delete")); - actionBind->setText(tr("Bind...")); + actionBind->setText(tr("Bind…")); } return QTableView::event(event); } @@ -686,7 +686,7 @@ void SheetTableView::deleteSelection() QModelIndexList selection = selectionModel()->selectedIndexes(); if (!selection.empty()) { - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear cell(s)")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear Cells")); std::vector ranges = selectedRanges(); std::vector::const_iterator i = ranges.begin(); @@ -757,7 +757,7 @@ void SheetTableView::cutSelection() void SheetTableView::pasteClipboard() { - App::AutoTransaction committer("Paste cell"); + App::AutoTransaction committer("Paste Cell"); try { bool copy = true; auto ranges = sheet->getCopyOrCutRange(copy); diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index 725c893eba..30dec6fcc2 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -189,7 +189,7 @@ bool SheetView::onMsg(const char* pMsg, const char**) else if (strcmp("Std_Delete", pMsg) == 0) { std::vector ranges = selectedRanges(); if (sheet->hasCell(ranges)) { - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear cell(s)")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear Cells")); std::vector::const_iterator i = ranges.begin(); for (; i != ranges.end(); ++i) { FCMD_OBJ_CMD(sheet, "clear('" << i->rangeString() << "')"); diff --git a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp index cc09cbb5ee..b7a8461bc1 100644 --- a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp +++ b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp @@ -106,7 +106,7 @@ void ViewProviderSheet::exportAsFile() QString selectedFilter; QString formatList = QObject::tr("CSV (*.csv *.CSV);;All (*)"); QString fileName = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), - QObject::tr("Export file"), + QObject::tr("Export File"), QString(), formatList, &selectedFilter); @@ -131,7 +131,7 @@ void ViewProviderSheet::exportAsFile() void ViewProviderSheet::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { QAction* act; - act = menu->addAction(QObject::tr("Show spreadsheet"), receiver, member); + act = menu->addAction(QObject::tr("Show Spreadsheet"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); } diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index 7a58ca9388..5b73c43d54 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -91,9 +91,9 @@ void Workbench::activated() workbenchHelper.get(), &WorkbenchHelper::setForegroundColor); } - foregroundColor->setToolTip(QObject::tr("Set cell(s) text color")); - foregroundColor->setWhatsThis(QObject::tr("Sets the Spreadsheet cell(s) text color")); - foregroundColor->setStatusTip(QObject::tr("Set cell(s) text color")); + foregroundColor->setToolTip(QObject::tr("Set cells text color")); + foregroundColor->setWhatsThis(QObject::tr("Sets the Spreadsheet cells text color")); + foregroundColor->setStatusTip(QObject::tr("Set cells text color")); bar->addWidget(foregroundColor); QList bgList = Gui::getMainWindow()->findChildren( @@ -111,10 +111,10 @@ void Workbench::activated() workbenchHelper.get(), &WorkbenchHelper::setBackgroundColor); } - backgroundColor->setToolTip(QObject::tr("Set cell(s) background color")); + backgroundColor->setToolTip(QObject::tr("Set cells background color")); backgroundColor->setWhatsThis( - QObject::tr("Sets the Spreadsheet cell(s) background color")); - backgroundColor->setStatusTip(QObject::tr("Set cell(s) background color")); + QObject::tr("Sets the Spreadsheet cells background color")); + backgroundColor->setStatusTip(QObject::tr("Set cells background color")); bar->addWidget(backgroundColor); initialized = false; diff --git a/src/Mod/Spreadsheet/Gui/ZoomableView.cpp b/src/Mod/Spreadsheet/Gui/ZoomableView.cpp index 52128dbf0c..82988cce34 100644 --- a/src/Mod/Spreadsheet/Gui/ZoomableView.cpp +++ b/src/Mod/Spreadsheet/Gui/ZoomableView.cpp @@ -109,7 +109,7 @@ ZoomableView::ZoomableView(Ui::Sheet* ui) connect(ui->zoomMinus, &QToolButton::clicked, this, &ZoomableView::zoomOut); connect(ui->zoomTB, &QToolButton::clicked, ui->zoomSlider, [zoomSlider = ui->zoomSlider]() { - const QString title = tr("Zoom level"), label = tr("New zoom level:"); + const QString title = tr("Zoom Level"), label = tr("New zoom level:"); constexpr int min = ZoomableView::min, max = ZoomableView::max, step = 10; const int val = zoomSlider->value(); bool ok; From 71ec5e8050a826da916c2d7b0cca64a62c5417a8 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:43:15 +0200 Subject: [PATCH 101/141] Update src/Mod/Spreadsheet/Gui/Workbench.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index 5b73c43d54..5c95518f40 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -113,7 +113,7 @@ void Workbench::activated() } backgroundColor->setToolTip(QObject::tr("Set cells background color")); backgroundColor->setWhatsThis( - QObject::tr("Sets the Spreadsheet cells background color")); + QObject::tr("Sets the spreadsheet cells background color")); backgroundColor->setStatusTip(QObject::tr("Set cells background color")); bar->addWidget(backgroundColor); From 27c4cf52e04f96ed9423582788c6d086c5f99e8b Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:43:36 +0200 Subject: [PATCH 102/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 3d333df4d8..11b5ee6e29 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -120,7 +120,7 @@ CmdSpreadsheetSplitCell::CmdSpreadsheetSplitCell() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Sp&lit Cell"); - sToolTipText = QT_TR_NOOP("Splits the selected and previously merged cell"); + sToolTipText = QT_TR_NOOP("Splits a previously merged cell"); sWhatsThis = "Spreadsheet_SplitCell"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetSplitCell"; From 07c35c1a833286a55d6235714f506a460f63d483 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:43:47 +0200 Subject: [PATCH 103/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 11b5ee6e29..d16acb5a5a 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -182,7 +182,7 @@ CmdSpreadsheetImport::CmdSpreadsheetImport() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("&Import Spreadsheet"); - sToolTipText = QT_TR_NOOP("Imports a CSV file into the spreadsheet"); + sToolTipText = QT_TR_NOOP("Imports a CSV file into a new spreadsheet"); sWhatsThis = "Spreadsheet_Import"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetImport"; From 9c6aa7267f01755dea86661834b45fe30e90c563 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:44:02 +0200 Subject: [PATCH 104/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index d16acb5a5a..5a196fa6f2 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -280,7 +280,7 @@ CmdSpreadsheetAlignLeft::CmdSpreadsheetAlignLeft() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Align &Left"); - sToolTipText = QT_TR_NOOP("Left-aligns the contents of the selected cells"); + sToolTipText = QT_TR_NOOP("Aligns cell contents to the left"); sWhatsThis = "Spreadsheet_AlignLeft"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignLeft"; From b90cbcca081ecf6ded027280dc8bafc9b1a15301 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:44:09 +0200 Subject: [PATCH 105/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 5a196fa6f2..a9e50cc7af 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -337,7 +337,7 @@ CmdSpreadsheetAlignCenter::CmdSpreadsheetAlignCenter() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Align Horizontal &Center"); - sToolTipText = QT_TR_NOOP("Horizontally center-aligns the contents of the selected cells"); + sToolTipText = QT_TR_NOOP("Aligns cell contents to the horizontal center"); sWhatsThis = "Spreadsheet_AlignCenter"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignCenter"; From 6c32e8ae076eb6f2f90a9261b946e0469ddbb73a Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:44:15 +0200 Subject: [PATCH 106/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index a9e50cc7af..85f69d7e2a 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -394,7 +394,7 @@ CmdSpreadsheetAlignRight::CmdSpreadsheetAlignRight() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Align &Right"); - sToolTipText = QT_TR_NOOP("Right-aligns the contents of the selected cells"); + sToolTipText = QT_TR_NOOP("Aligns cell contents to the right"); sWhatsThis = "Spreadsheet_AlignRight"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignRight"; From bea7c631e810cb227d94d942987c46f8fe0445a9 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:44:26 +0200 Subject: [PATCH 107/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 85f69d7e2a..76fc814881 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -451,7 +451,7 @@ CmdSpreadsheetAlignTop::CmdSpreadsheetAlignTop() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Align &Top"); - sToolTipText = QT_TR_NOOP("Top-aligns the contents the of selected cells"); + sToolTipText = QT_TR_NOOP("Aligns cell contents to the top"); sWhatsThis = "Spreadsheet_AlignTop"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignTop"; From 7eb21b99517285a7a442f73826d852ac52505129 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:44:36 +0200 Subject: [PATCH 108/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 76fc814881..5fc52323e1 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -508,7 +508,7 @@ CmdSpreadsheetAlignBottom::CmdSpreadsheetAlignBottom() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Align &Bottom"); - sToolTipText = QT_TR_NOOP("Bottom-aligns the contents of the selected cells"); + sToolTipText = QT_TR_NOOP("Aligns cell contents to the bottom"); sWhatsThis = "Spreadsheet_AlignBottom"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignBottom"; From 87c7dd6163c0c2b0dd248eeb686643c6bba8669f Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:45:20 +0200 Subject: [PATCH 109/141] Update src/Mod/Spreadsheet/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 5fc52323e1..fdf8db56bb 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -565,7 +565,7 @@ CmdSpreadsheetAlignVCenter::CmdSpreadsheetAlignVCenter() sAppModule = "Spreadsheet"; sGroup = QT_TR_NOOP("Spreadsheet"); sMenuText = QT_TR_NOOP("Align &Vertical Center"); - sToolTipText = QT_TR_NOOP("Vertically center-aligns the contents of the selected cells"); + sToolTipText = QT_TR_NOOP("Aligns cell contents to the vertical center"); sWhatsThis = "Spreadsheet_AlignVCenter"; sStatusTip = sToolTipText; sPixmap = "SpreadsheetAlignVCenter"; From 4332a95b49805e322956a210c5a54bccb91c446c Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:45:29 +0200 Subject: [PATCH 110/141] Update src/Mod/Spreadsheet/Gui/Workbench.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index 5c95518f40..ba5fc761ed 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -92,7 +92,7 @@ void Workbench::activated() &WorkbenchHelper::setForegroundColor); } foregroundColor->setToolTip(QObject::tr("Set cells text color")); - foregroundColor->setWhatsThis(QObject::tr("Sets the Spreadsheet cells text color")); + foregroundColor->setWhatsThis(QObject::tr("Sets the text color of spreadsheet cells")); foregroundColor->setStatusTip(QObject::tr("Set cells text color")); bar->addWidget(foregroundColor); From ee926ba67f15eb49cdb1bfc095723f12e5146584 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:45:39 +0200 Subject: [PATCH 111/141] Update src/Mod/Spreadsheet/Gui/Workbench.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index ba5fc761ed..ab7192582a 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -91,7 +91,7 @@ void Workbench::activated() workbenchHelper.get(), &WorkbenchHelper::setForegroundColor); } - foregroundColor->setToolTip(QObject::tr("Set cells text color")); + foregroundColor->setToolTip(QObject::tr("Sets the text color of cells")); foregroundColor->setWhatsThis(QObject::tr("Sets the text color of spreadsheet cells")); foregroundColor->setStatusTip(QObject::tr("Set cells text color")); bar->addWidget(foregroundColor); From 2f8b4f01069f96ea57d1c8e809a8fd19c87c758d Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:45:51 +0200 Subject: [PATCH 112/141] Update src/Mod/Spreadsheet/Gui/Workbench.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index ab7192582a..8a53de9933 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -111,7 +111,7 @@ void Workbench::activated() workbenchHelper.get(), &WorkbenchHelper::setBackgroundColor); } - backgroundColor->setToolTip(QObject::tr("Set cells background color")); + backgroundColor->setToolTip(QObject::tr("Sets the background color of cells")); backgroundColor->setWhatsThis( QObject::tr("Sets the spreadsheet cells background color")); backgroundColor->setStatusTip(QObject::tr("Set cells background color")); From c7952719f38ea967062b77b3c89eef5e870510f7 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:46:02 +0200 Subject: [PATCH 113/141] Update src/Mod/Spreadsheet/Gui/Workbench.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index 8a53de9933..ac6e3f8a31 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -93,7 +93,7 @@ void Workbench::activated() } foregroundColor->setToolTip(QObject::tr("Sets the text color of cells")); foregroundColor->setWhatsThis(QObject::tr("Sets the text color of spreadsheet cells")); - foregroundColor->setStatusTip(QObject::tr("Set cells text color")); + foregroundColor->setStatusTip(QObject::tr("Sets the text color of spreadsheet cells")); bar->addWidget(foregroundColor); QList bgList = Gui::getMainWindow()->findChildren( From 53c367f4b56722b3cc790b99d6ce9d043ddaa8a9 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:46:10 +0200 Subject: [PATCH 114/141] Update src/Mod/Spreadsheet/Gui/Workbench.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Spreadsheet/Gui/Workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index ac6e3f8a31..19cbaf235a 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -114,7 +114,7 @@ void Workbench::activated() backgroundColor->setToolTip(QObject::tr("Sets the background color of cells")); backgroundColor->setWhatsThis( QObject::tr("Sets the spreadsheet cells background color")); - backgroundColor->setStatusTip(QObject::tr("Set cells background color")); + backgroundColor->setStatusTip(QObject::tr("Sets the background color of cells")); bar->addWidget(backgroundColor); initialized = false; From 483dbbae336779880916db03af256c1850c9210b Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Sun, 29 Jun 2025 15:25:02 +0200 Subject: [PATCH 115/141] FEM: Update UI strings for consistency --- src/Mod/Fem/App/AppFem.cpp | 2 +- src/Mod/Fem/Gui/AppFemGui.cpp | 2 +- src/Mod/Fem/Gui/BoxWidget.ui | 6 +- src/Mod/Fem/Gui/Command.cpp | 128 +++++++------- src/Mod/Fem/Gui/CylinderWidget.ui | 12 +- src/Mod/Fem/Gui/DlgSettingsFemCcx.ui | 22 +-- src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp | 2 +- src/Mod/Fem/Gui/DlgSettingsFemElmer.ui | 12 +- src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp | 2 +- src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui | 6 +- src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui | 2 +- src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp | 2 +- src/Mod/Fem/Gui/DlgSettingsFemMystran.ui | 2 +- src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp | 2 +- src/Mod/Fem/Gui/DlgSettingsFemZ88.ui | 6 +- src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp | 2 +- src/Mod/Fem/Gui/PlaneWidget.ui | 12 +- .../Fem/Gui/Resources/ui/BodyHeatSource.ui | 8 +- .../Fem/Gui/Resources/ui/ConstraintCentrif.ui | 4 +- .../Resources/ui/ConstraintSectionPrint.ui | 2 +- src/Mod/Fem/Gui/Resources/ui/ConstraintTie.ui | 4 +- .../Fem/Gui/Resources/ui/CurrentDensity.ui | 14 +- .../Gui/Resources/ui/ElectricChargeDensity.ui | 10 +- .../Resources/ui/ElectrostaticPotential.ui | 24 +-- .../Fem/Gui/Resources/ui/ElementFluid1D.ui | 42 ++--- .../Fem/Gui/Resources/ui/ElementGeometry1D.ui | 30 ++-- .../Fem/Gui/Resources/ui/ElementGeometry2D.ui | 4 +- .../Fem/Gui/Resources/ui/ElementRotation1D.ui | 6 +- src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui | 20 +-- .../Gui/Resources/ui/InitialFlowVelocity.ui | 20 +-- .../Fem/Gui/Resources/ui/InitialPressure.ui | 4 +- src/Mod/Fem/Gui/Resources/ui/Magnetization.ui | 8 +- src/Mod/Fem/Gui/Resources/ui/Material.ui | 18 +- .../Gui/Resources/ui/MaterialReinforcement.ui | 2 +- .../Fem/Gui/Resources/ui/MeshBoundaryLayer.ui | 6 +- src/Mod/Fem/Gui/Resources/ui/MeshGmsh.ui | 12 +- src/Mod/Fem/Gui/Resources/ui/MeshGroup.ui | 4 +- .../Gui/Resources/ui/MeshGroupXDMFExport.ui | 2 +- src/Mod/Fem/Gui/Resources/ui/MeshNetgen.ui | 18 +- src/Mod/Fem/Gui/Resources/ui/MeshRegion.ui | 4 +- .../Resources/ui/PostHistogramFieldAppEdit.ui | 4 +- .../ui/PostHistogramFieldViewEdit.ui | 6 +- .../Resources/ui/PostHistogramIndexAppEdit.ui | 4 +- .../Resources/ui/PostLineplotFieldAppEdit.ui | 6 +- .../Resources/ui/PostLineplotFieldViewEdit.ui | 6 +- .../Resources/ui/PostLineplotIndexAppEdit.ui | 4 +- .../Resources/ui/PostTableFieldViewEdit.ui | 2 +- src/Mod/Fem/Gui/Resources/ui/ResultHints.ui | 4 +- src/Mod/Fem/Gui/Resources/ui/ResultShow.ui | 32 ++-- .../Fem/Gui/Resources/ui/SolverCalculiX.ui | 8 +- .../Fem/Gui/Resources/ui/SolverCcxTools.ui | 14 +- src/Mod/Fem/Gui/Resources/ui/TaskPostGlyph.ui | 6 +- .../Fem/Gui/Resources/ui/TaskPostHistogram.ui | 4 +- .../Fem/Gui/Resources/ui/TaskPostLineplot.ui | 6 +- src/Mod/Fem/Gui/SphereWidget.ui | 6 +- src/Mod/Fem/Gui/TaskAnalysisInfo.ui | 2 +- src/Mod/Fem/Gui/TaskCreateElementSet.ui | 6 +- src/Mod/Fem/Gui/TaskCreateNodeSet.ui | 4 +- src/Mod/Fem/Gui/TaskFemConstraint.ui | 2 +- src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp | 7 +- src/Mod/Fem/Gui/TaskFemConstraintBearing.ui | 2 +- src/Mod/Fem/Gui/TaskFemConstraintContact.ui | 10 +- .../Fem/Gui/TaskFemConstraintDisplacement.ui | 16 +- src/Mod/Fem/Gui/TaskFemConstraintFixed.ui | 2 +- .../Gui/TaskFemConstraintFluidBoundary.cpp | 2 +- .../Fem/Gui/TaskFemConstraintFluidBoundary.ui | 2 +- src/Mod/Fem/Gui/TaskFemConstraintForce.cpp | 2 +- src/Mod/Fem/Gui/TaskFemConstraintForce.ui | 2 +- src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui | 14 +- .../TaskFemConstraintInitialTemperature.ui | 2 +- src/Mod/Fem/Gui/TaskFemConstraintPressure.ui | 4 +- src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui | 46 +++--- src/Mod/Fem/Gui/TaskFemConstraintSpring.ui | 9 +- .../Fem/Gui/TaskFemConstraintTemperature.ui | 2 +- .../Fem/Gui/TaskFemConstraintTransform.cpp | 2 +- src/Mod/Fem/Gui/TaskFemConstraintTransform.ui | 12 +- .../Fem/Gui/TaskPanelConstraintTemperature.ui | 4 +- .../Fem/Gui/TaskPanelInitialTemperature.ui | 5 +- src/Mod/Fem/Gui/TaskPostBoxes.cpp | 18 +- src/Mod/Fem/Gui/TaskPostCalculator.ui | 10 +- src/Mod/Fem/Gui/TaskPostClip.ui | 4 +- src/Mod/Fem/Gui/TaskPostContours.ui | 8 +- src/Mod/Fem/Gui/TaskPostDataAlongLine.ui | 6 +- src/Mod/Fem/Gui/TaskPostDataAtPoint.ui | 8 +- src/Mod/Fem/Gui/TaskPostExtraction.cpp | 2 +- src/Mod/Fem/Gui/TaskPostExtraction.ui | 2 +- src/Mod/Fem/Gui/TaskPostFrames.ui | 4 +- src/Mod/Fem/Gui/TaskPostScalarClip.ui | 4 +- src/Mod/Fem/Gui/TaskPostWarpVector.ui | 4 +- src/Mod/Fem/Gui/TaskTetParameter.ui | 18 +- src/Mod/Fem/Gui/ViewProviderAnalysis.cpp | 2 +- src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp | 2 +- src/Mod/Fem/Gui/Workbench.cpp | 52 +++--- src/Mod/Fem/femcommands/commands.py | 156 +++++++++--------- src/Mod/Fem/femguiutils/data_extraction.py | 2 +- .../disambiguate_solid_selection.py | 4 +- src/Mod/Fem/femguiutils/extract_link_view.py | 2 +- src/Mod/Fem/femguiutils/selection_widgets.py | 6 +- .../femtaskpanels/task_constraint_centrif.py | 6 +- .../Fem/femtaskpanels/task_post_extractor.py | 4 +- .../Fem/femtaskpanels/task_post_histogram.py | 8 +- .../Fem/femtaskpanels/task_post_lineplot.py | 8 +- src/Mod/Fem/femtaskpanels/task_post_table.py | 4 +- 103 files changed, 545 insertions(+), 558 deletions(-) diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index e59e7930fe..fcbdca4d3e 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -87,7 +87,7 @@ PyMOD_INIT_FUNC(Fem) PyMOD_Return(nullptr); } PyObject* femModule = Fem::initModule(); - Base::Console().log("Loading Fem module... done\n"); + Base::Console().log("Loading Fem module… done\n"); // clang-format off Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule); diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index 139fa2a4ef..10d0d1fb66 100644 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -104,7 +104,7 @@ PyMOD_INIT_FUNC(FemGui) } PyObject* mod = FemGui::initModule(); - Base::Console().log("Loading GUI of Fem module... done\n"); + Base::Console().log("Loading GUI of FEM module… done\n"); // instantiating the commands CreateFemCommands(); diff --git a/src/Mod/Fem/Gui/BoxWidget.ui b/src/Mod/Fem/Gui/BoxWidget.ui index e50053bbe0..470bf2174e 100644 --- a/src/Mod/Fem/Gui/BoxWidget.ui +++ b/src/Mod/Fem/Gui/BoxWidget.ui @@ -29,7 +29,7 @@ - x + X @@ -58,7 +58,7 @@ - y + Y @@ -81,7 +81,7 @@ - z + Z diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 3711b1df7a..6b496c6dcf 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -240,7 +240,7 @@ CmdFemConstraintBearing::CmdFemConstraintBearing() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Bearing constraint"); + sMenuText = QT_TR_NOOP("Bearing Constraint"); sToolTipText = QT_TR_NOOP("Creates a bearing constraint"); sWhatsThis = "FEM_ConstraintBearing"; sStatusTip = sToolTipText; @@ -288,7 +288,7 @@ CmdFemConstraintContact::CmdFemConstraintContact() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Contact constraint"); + sMenuText = QT_TR_NOOP("Contact Constraint"); sToolTipText = QT_TR_NOOP("Creates a contact constraint between faces"); sWhatsThis = "FEM_ConstraintContact"; sStatusTip = sToolTipText; @@ -354,7 +354,7 @@ CmdFemConstraintDisplacement::CmdFemConstraintDisplacement() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Displacement boundary condition"); + sMenuText = QT_TR_NOOP("Displacement Boundary Condition"); sToolTipText = QT_TR_NOOP("Creates a displacement boundary condition for a geometric entity"); sWhatsThis = "FEM_ConstraintDisplacement"; sStatusTip = sToolTipText; @@ -404,7 +404,7 @@ CmdFemConstraintFixed::CmdFemConstraintFixed() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Fixed boundary condition"); + sMenuText = QT_TR_NOOP("Fixed Boundary Condition"); sToolTipText = QT_TR_NOOP("Creates a fixed boundary condition for a geometric entity"); sWhatsThis = "FEM_ConstraintFixed"; sStatusTip = sToolTipText; @@ -454,7 +454,7 @@ CmdFemConstraintRigidBody::CmdFemConstraintRigidBody() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Rigid body constraint"); + sMenuText = QT_TR_NOOP("Rigid Body Constraint"); sToolTipText = QT_TR_NOOP("Creates a rigid body constraint for a geometric entity"); sWhatsThis = "FEM_ConstraintRigidBody"; sStatusTip = sToolTipText; @@ -506,7 +506,7 @@ CmdFemConstraintFluidBoundary::CmdFemConstraintFluidBoundary() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Fluid boundary condition"); + sMenuText = QT_TR_NOOP("Fluid Boundary Condition"); sToolTipText = QT_TR_NOOP("Create fluid boundary condition on face entity for Computional Fluid Dynamics"); sWhatsThis = "FEM_ConstraintFluidBoundary"; @@ -558,7 +558,7 @@ CmdFemConstraintForce::CmdFemConstraintForce() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Force load"); + sMenuText = QT_TR_NOOP("Force Load"); sToolTipText = QT_TR_NOOP("Creates a force load applied to a geometric entity"); sWhatsThis = "FEM_ConstraintForce"; sStatusTip = sToolTipText; @@ -615,7 +615,7 @@ CmdFemConstraintGear::CmdFemConstraintGear() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Gear constraint"); + sMenuText = QT_TR_NOOP("Gear Constraint"); sToolTipText = QT_TR_NOOP("Creates a gear constraint"); sWhatsThis = "FEM_ConstraintGear"; sStatusTip = sToolTipText; @@ -663,7 +663,7 @@ CmdFemConstraintHeatflux::CmdFemConstraintHeatflux() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Heat flux load"); + sMenuText = QT_TR_NOOP("Heat Flux Load"); sToolTipText = QT_TR_NOOP("Creates a heat flux load acting on a face"); sWhatsThis = "FEM_ConstraintHeatflux"; sStatusTip = sToolTipText; @@ -724,7 +724,7 @@ CmdFemConstraintInitialTemperature::CmdFemConstraintInitialTemperature() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Initial temperature"); + sMenuText = QT_TR_NOOP("Initial Iemperature"); sToolTipText = QT_TR_NOOP("Creates an initial temperature acting on a body"); sWhatsThis = "FEM_ConstraintInitialTemperature"; sStatusTip = sToolTipText; @@ -775,7 +775,7 @@ CmdFemConstraintPlaneRotation::CmdFemConstraintPlaneRotation() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Plane multi-point constraint"); + sMenuText = QT_TR_NOOP("Plane Multi-Point Constraint"); sToolTipText = QT_TR_NOOP("Creates a plane multi-point constraint for a face"); sWhatsThis = "FEM_ConstraintPlaneRotation"; sStatusTip = sToolTipText; @@ -826,7 +826,7 @@ CmdFemConstraintPressure::CmdFemConstraintPressure() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Pressure load"); + sMenuText = QT_TR_NOOP("Pressure Load"); sToolTipText = QT_TR_NOOP("Creates a pressure load acting on a face"); sWhatsThis = "FEM_ConstraintPressure"; sStatusTip = sToolTipText; @@ -882,7 +882,7 @@ CmdFemConstraintSpring::CmdFemConstraintSpring() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Spring"); + sMenuText = QT_TR_NOOP("Spring Constraint"); sToolTipText = QT_TR_NOOP("Creates a spring acting on a face"); sWhatsThis = "FEM_ConstraintSpring"; sStatusTip = sToolTipText; @@ -937,7 +937,7 @@ CmdFemConstraintPulley::CmdFemConstraintPulley() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Pulley constraint"); + sMenuText = QT_TR_NOOP("Pulley Constraint"); sToolTipText = QT_TR_NOOP("Creates a pulley constraint"); sWhatsThis = "FEM_ConstraintPulley"; sStatusTip = sToolTipText; @@ -990,7 +990,7 @@ CmdFemConstraintTemperature::CmdFemConstraintTemperature() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Temperature boundary condition"); + sMenuText = QT_TR_NOOP("Temperature Boundary Condition"); sToolTipText = QT_TR_NOOP("Creates a temperature/concentrated heat flux load acting on a face"); sWhatsThis = "FEM_ConstraintTemperature"; sStatusTip = sToolTipText; @@ -1041,8 +1041,8 @@ CmdFemConstraintTransform::CmdFemConstraintTransform() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Local coordinate system"); - sToolTipText = QT_TR_NOOP("Create a local coordinate system on a face"); + sMenuText = QT_TR_NOOP("Local Coordinate System"); + sToolTipText = QT_TR_NOOP("Creates a local coordinate system on a face"); sWhatsThis = "FEM_ConstraintTransform"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintTransform"; @@ -1128,8 +1128,8 @@ CmdFemDefineNodesSet::CmdFemDefineNodesSet() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Node set by poly"); - sToolTipText = QT_TR_NOOP("Create node set by Poly"); + sMenuText = QT_TR_NOOP("Node Set by Poly"); + sToolTipText = QT_TR_NOOP("Creates a node set by poly"); sWhatsThis = "FEM_DefineNodesSet"; sStatusTip = QT_TR_NOOP("Create node set by Poly"); sPixmap = "FEM_CreateNodesSet"; @@ -1187,7 +1187,7 @@ CmdFemCreateNodesSet::CmdFemCreateNodesSet() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Nodes set"); + sMenuText = QT_TR_NOOP("Nodes Set"); sToolTipText = QT_TR_NOOP("Creates a FEM mesh nodes set"); sWhatsThis = "FEM_CreateNodesSet"; sStatusTip = sToolTipText; @@ -1222,10 +1222,10 @@ void CmdFemCreateNodesSet::activated(int) doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } else { - QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("CmdFemCreateNodesSet", "Wrong selection"), - qApp->translate("CmdFemCreateNodesSet", - "Select a single FEM mesh or nodes set, please.")); + QMessageBox::warning( + Gui::getMainWindow(), + qApp->translate("CmdFemCreateNodesSet", "Wrong selection"), + qApp->translate("CmdFemCreateNodesSet", "Select a single FEM mesh or nodes set.")); } } @@ -1280,8 +1280,8 @@ CmdFemDefineElementsSet::CmdFemDefineElementsSet() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Element set by poly"); - sToolTipText = QT_TR_NOOP("Create Element set by Poly"); + sMenuText = QT_TR_NOOP("Element Set by Poly"); + sToolTipText = QT_TR_NOOP("Create element set by poly"); sWhatsThis = "FEM_DefineElementsSet"; sStatusTip = QT_TR_NOOP("Create Element set by Poly"); sPixmap = "FEM_CreateElementsSet"; @@ -1335,7 +1335,7 @@ CmdFemCreateElementsSet::CmdFemCreateElementsSet() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Erase elements"); + sMenuText = QT_TR_NOOP("Erase Elements"); sToolTipText = QT_TR_NOOP("Creates a FEM mesh elements set"); sWhatsThis = "FEM_CreateElementsSet"; sStatusTip = sToolTipText; @@ -1372,10 +1372,9 @@ void CmdFemCreateElementsSet::activated(int) doCommand(Gui, "Gui.activeDocument().setEdit('%s')", uniqueElementsName.c_str()); } else { - QMessageBox::warning( - Gui::getMainWindow(), - qApp->translate("CmdFemCreateElementsSet", "Wrong selection"), - qApp->translate("CmdFemCreateNodesSet", "Select a single FEM Mesh, please.")); + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("CmdFemCreateElementsSet", "Wrong selection"), + qApp->translate("CmdFemCreateNodesSet", "Select a single FEM Mesh.")); } } @@ -1398,7 +1397,7 @@ CmdFemCompEmConstraints::CmdFemCompEmConstraints() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Electromagnetic boundary conditions"); + sMenuText = QT_TR_NOOP("Electromagnetic Boundary Conditions"); sToolTipText = QT_TR_NOOP("Electromagnetic boundary conditions"); sWhatsThis = "FEM_CompEmConstraints"; sStatusTip = sToolTipText; @@ -1541,7 +1540,7 @@ CmdFemCompEmEquations::CmdFemCompEmEquations() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Electromagnetic equations"); + sMenuText = QT_TR_NOOP("Electromagnetic Qquations"); sToolTipText = QT_TR_NOOP("Electromagnetic equations for the Elmer solver"); sWhatsThis = "FEM_CompEmEquations"; sStatusTip = sToolTipText; @@ -1709,7 +1708,7 @@ CmdFemCompMechEquations::CmdFemCompMechEquations() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Mechanical equations"); + sMenuText = QT_TR_NOOP("Mechanical Equations"); sToolTipText = QT_TR_NOOP("Mechanical equations for the Elmer solver"); sWhatsThis = "FEM_CompMechEquations"; sStatusTip = sToolTipText; @@ -2028,9 +2027,9 @@ CmdFemPostClipFilter::CmdFemPostClipFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Region clip filter"); + sMenuText = QT_TR_NOOP("Region Clip Filter"); sToolTipText = - QT_TR_NOOP("Define/create a clip filter which uses functions to define the clipped region"); + QT_TR_NOOP("Defines a clip filter which uses functions to define the clipped region"); sWhatsThis = "FEM_PostFilterClipRegion"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterClipRegion"; @@ -2066,8 +2065,8 @@ CmdFemPostCutFilter::CmdFemPostCutFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Function cut filter"); - sToolTipText = QT_TR_NOOP("Cut the data along an implicit function"); + sMenuText = QT_TR_NOOP("Function Cut Filter"); + sToolTipText = QT_TR_NOOP("Cuts the data along an implicit function"); sWhatsThis = "FEM_PostFilterCutFunction"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterCutFunction"; @@ -2103,8 +2102,8 @@ CmdFemPostDataAlongLineFilter::CmdFemPostDataAlongLineFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Line clip filter"); - sToolTipText = QT_TR_NOOP("Define/create a clip filter which clips a field along a line"); + sMenuText = QT_TR_NOOP("Line Clip Filter"); + sToolTipText = QT_TR_NOOP("Defines a clip filter which clips a field along a line"); sWhatsThis = "FEM_PostFilterDataAlongLine"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterDataAlongLine"; @@ -2140,8 +2139,8 @@ CmdFemPostDataAtPointFilter::CmdFemPostDataAtPointFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Data at point clip filter"); - sToolTipText = QT_TR_NOOP("Define/create a clip filter which clips a field data at point"); + sMenuText = QT_TR_NOOP("Data at Point Clip Filter"); + sToolTipText = QT_TR_NOOP("Defines a clip filter which clips a field data at point"); sWhatsThis = "FEM_PostFilterDataAtPoint"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterDataAtPoint"; @@ -2178,8 +2177,8 @@ CmdFemPostLinearizedStressesFilter::CmdFemPostLinearizedStressesFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Stress linearization plot"); - sToolTipText = QT_TR_NOOP("Define/create stress linearization plots"); + sMenuText = QT_TR_NOOP("Stress Linearization Plot"); + sToolTipText = QT_TR_NOOP("Defines a stress linearization plot"); sWhatsThis = "FEM_PostFilterLinearizedStresses"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterLinearizedStresses"; @@ -2217,18 +2216,16 @@ void CmdFemPostLinearizedStressesFilter::activated(int) QMessageBox::warning( Gui::getMainWindow(), qApp->translate("CmdFemPostLinearizedStressesFilter", "Wrong selection"), - qApp->translate( - "CmdFemPostLinearizedStressesFilter", - "Select a Clip filter which clips a STRESS field along a line, please.")); + qApp->translate("CmdFemPostLinearizedStressesFilter", + "Select a Clip filter which clips a STRESS field along a line.")); } } else { QMessageBox::warning( Gui::getMainWindow(), qApp->translate("CmdFemPostLinearizedStressesFilter", "Wrong selection"), - qApp->translate( - "CmdFemPostLinearizedStressesFilter", - "Select a Clip filter which clips a STRESS field along a line, please.")); + qApp->translate("CmdFemPostLinearizedStressesFilter", + "Select a Clip filter which clips a STRESS field along a line.")); } } @@ -2253,9 +2250,8 @@ CmdFemPostScalarClipFilter::CmdFemPostScalarClipFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Scalar clip filter"); - sToolTipText = - QT_TR_NOOP("Define/create a clip filter which clips a field with a scalar value"); + sMenuText = QT_TR_NOOP("Scalar Clip Filter"); + sToolTipText = QT_TR_NOOP("Defines a clip filter which clips a field with a scalar value"); sWhatsThis = "FEM_PostFilterClipScalar"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterClipScalar"; @@ -2291,8 +2287,8 @@ CmdFemPostWarpVectorFilter::CmdFemPostWarpVectorFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Warp filter"); - sToolTipText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); + sMenuText = QT_TR_NOOP("Warp Filter"); + sToolTipText = QT_TR_NOOP("Warps the geometry along a vector field by a certain factor"); sWhatsThis = "FEM_PostFilterWarp"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterWarp"; @@ -2328,7 +2324,7 @@ CmdFemPostContoursFilter::CmdFemPostContoursFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Contours filter"); + sMenuText = QT_TR_NOOP("Contours Filter"); sToolTipText = QT_TR_NOOP("Define/create a contours filter which displays iso contours"); sWhatsThis = "FEM_PostFilterContours"; sStatusTip = sToolTipText; @@ -2365,8 +2361,8 @@ CmdFemPostCalculatorFilter::CmdFemPostCalculatorFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Calculator filter"); - sToolTipText = QT_TR_NOOP("Create new fields from current data"); + sMenuText = QT_TR_NOOP("Calculator Filter"); + sToolTipText = QT_TR_NOOP("Creates a new field from current data"); sWhatsThis = "FEM_PostFilterCalculator"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterCalculator"; @@ -2401,8 +2397,8 @@ CmdFemPostFunctions::CmdFemPostFunctions() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Filter functions"); - sToolTipText = QT_TR_NOOP("Functions for use in postprocessing filter..."); + sMenuText = QT_TR_NOOP("Filter Functions"); + sToolTipText = QT_TR_NOOP("Functions for use in postprocessing filter"); sWhatsThis = "FEM_PostCreateFunctions"; sStatusTip = sToolTipText; eType = eType | ForEdit; @@ -2524,7 +2520,7 @@ void CmdFemPostFunctions::activated(int iMsg) else { QMessageBox::warning(Gui::getMainWindow(), qApp->translate("CmdFemPostClipFilter", "Wrong selection"), - qApp->translate("CmdFemPostClipFilter", "Select a pipeline, please.")); + qApp->translate("CmdFemPostClipFilter", "Select a pipeline.")); } // Since the default icon is reset when enabling/disabling the command we have @@ -2622,8 +2618,8 @@ CmdFemPostApllyChanges::CmdFemPostApllyChanges() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Apply changes to pipeline"); - sToolTipText = QT_TR_NOOP("Apply changes to parameters directly and not on recompute only..."); + sMenuText = QT_TR_NOOP("Apply Changes to Pipeline"); + sToolTipText = QT_TR_NOOP("Applies changes to parameters directly and not on recompute only"); sWhatsThis = "FEM_PostApplyChanges"; sStatusTip = sToolTipText; sPixmap = "view-refresh"; @@ -2663,7 +2659,7 @@ CmdFemPostPipelineFromResult::CmdFemPostPipelineFromResult() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Post pipeline from result"); + sMenuText = QT_TR_NOOP("Post Pipeline From Result"); sToolTipText = QT_TR_NOOP("Creates a post processing pipeline from a result object"); sWhatsThis = "FEM_PostPipelineFromResult"; sStatusTip = sToolTipText; @@ -2743,7 +2739,7 @@ void CmdFemPostPipelineFromResult::activated(int) QMessageBox::warning( Gui::getMainWindow(), qApp->translate("CmdFemPostPipelineFromResult", "Wrong selection type"), - qApp->translate("CmdFemPostPipelineFromResult", "Select a result object, please.")); + qApp->translate("CmdFemPostPipelineFromResult", "Select a result object.")); } } @@ -2763,7 +2759,7 @@ CmdFemPostBranchFilter::CmdFemPostBranchFilter() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Pipeline branch"); + sMenuText = QT_TR_NOOP("Pipeline Branch"); sToolTipText = QT_TR_NOOP("Branches the pipeline into a new path"); sWhatsThis = "FEM_PostBranchFilter"; sStatusTip = sToolTipText; diff --git a/src/Mod/Fem/Gui/CylinderWidget.ui b/src/Mod/Fem/Gui/CylinderWidget.ui index 50be1be6fa..b7f3557b9d 100644 --- a/src/Mod/Fem/Gui/CylinderWidget.ui +++ b/src/Mod/Fem/Gui/CylinderWidget.ui @@ -23,7 +23,7 @@ - x + X @@ -46,7 +46,7 @@ - y + Y @@ -69,7 +69,7 @@ - z + Z @@ -107,7 +107,7 @@ - x + X @@ -130,7 +130,7 @@ - y + Y @@ -153,7 +153,7 @@ - z + Z diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui b/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui index 0f5302aa46..6f16628be2 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui @@ -116,7 +116,7 @@ - Input file Editor + Input file editor @@ -148,7 +148,7 @@ - External editor: + External editor @@ -199,7 +199,7 @@ - Analysis defaults + Analysis Defaults @@ -283,7 +283,7 @@ - Solver defaults + Solver Defaults @@ -304,14 +304,14 @@ - Time Initial Step + Initial time step - Time End + End time @@ -334,7 +334,7 @@ - Number of CPU's to use + Number of CPUs to use @@ -525,7 +525,7 @@ - Time Minimum Step + Minimum time step @@ -655,7 +655,7 @@ - Time Maximum Step + Maximum time step @@ -721,7 +721,7 @@ Only takes effect if 'Pipeline only' is enabled - Thermo mechanical defaults + Thermo Mechanical Defaults @@ -757,7 +757,7 @@ Only takes effect if 'Pipeline only' is enabled - Frequency defaults + Frequency Defaults diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp index eca76761c8..145a392acf 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp @@ -154,7 +154,7 @@ void DlgSettingsFemCcxImp::onfileNameChanged(QString FileName) QMessageBox::critical(this, tr("File does not exist"), tr("The specified executable\n'%1'\n does not exist!\n" - "Specify another file please.") + "Specify another file.") .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemElmer.ui b/src/Mod/Fem/Gui/DlgSettingsFemElmer.ui index 187c14405d..04ec2bd10f 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemElmer.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemElmer.ui @@ -26,7 +26,7 @@ Qt::LeftToRight - Elmer binaries + Elmer Binaries Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -35,7 +35,7 @@ - ElmerGrid: + ElmerGrid @@ -138,7 +138,7 @@ - ElmerSolver: + ElmerSolver @@ -202,7 +202,7 @@ - Multithreading: + Multithreading @@ -214,7 +214,7 @@ true - CPU cores to be used: + CPU cores to be used @@ -258,7 +258,7 @@ - Multi-core CPU support: + Multi-core CPU support diff --git a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp index bd7e9ed950..adbd9ed9f4 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp @@ -111,7 +111,7 @@ void DlgSettingsFemElmerImp::onfileNameChanged(QString FileName) QMessageBox::critical(this, tr("File does not exist"), tr("The specified executable\n'%1'\n does not exist!\n" - "Specify another file please.") + "Specify another file.") .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui index be630db29f..98cfe834c4 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui @@ -28,7 +28,7 @@ - Working directory for solving analysis and Gmsh meshing + Working Directory for Solving Analysis and Gmsh Meshing @@ -184,7 +184,7 @@ - Path: + Path 10 @@ -276,7 +276,7 @@ true - Create mesh groups for analysis reference shapes (highly experimental) + Create mesh groups for analysis reference shapes (experimental) false diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui b/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui index eceddf9a99..d86711d295 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemGmsh.ui @@ -26,7 +26,7 @@ Qt::LeftToRight - Gmsh binary + Gmsh Binary Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp index c5b789f117..eecdd566d3 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp @@ -90,7 +90,7 @@ void DlgSettingsFemGmshImp::onfileNameChanged(QString FileName) QMessageBox::critical(this, tr("File does not exist"), tr("The specified executable\n'%1'\n does not exist!\n" - "Specify another file please.") + "Specify another file.") .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMystran.ui b/src/Mod/Fem/Gui/DlgSettingsFemMystran.ui index 0513f101c7..f8c5e82b28 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMystran.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemMystran.ui @@ -26,7 +26,7 @@ Qt::LeftToRight - Mystran binary + Mystran Binary Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp index 39840d1870..d5eef4e3bb 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp @@ -80,7 +80,7 @@ void DlgSettingsFemMystranImp::onfileNameChanged(QString FileName) QMessageBox::critical(this, tr("File does not exist"), tr("The specified executable\n'%1'\n does not exist!\n" - "Specify another file please.") + "Specify another file.") .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemZ88.ui b/src/Mod/Fem/Gui/DlgSettingsFemZ88.ui index 856dacd0e9..6eca0d916e 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemZ88.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemZ88.ui @@ -26,7 +26,7 @@ Qt::LeftToRight - Z88 binary + Z88 Binary Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -135,7 +135,7 @@ Qt::LeftToRight - Solver settings + Solver Settings Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -237,7 +237,7 @@ that "MAXGS" needs to be increased. - Max places in coincidence vector + Maximum places in coincidence vector diff --git a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp index 46afdac3f6..91cab3df54 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp @@ -106,7 +106,7 @@ void DlgSettingsFemZ88Imp::onfileNameChanged(QString FileName) QMessageBox::critical(this, tr("File does not exist"), tr("The specified z88r executable\n'%1'\n does not exist!\n" - "Specify another file please.") + "Specify another file.") .arg(FileName)); return; } diff --git a/src/Mod/Fem/Gui/PlaneWidget.ui b/src/Mod/Fem/Gui/PlaneWidget.ui index a4b7c5ec59..81cf1d0ef2 100644 --- a/src/Mod/Fem/Gui/PlaneWidget.ui +++ b/src/Mod/Fem/Gui/PlaneWidget.ui @@ -23,7 +23,7 @@ - x + X @@ -40,7 +40,7 @@ - y + Y @@ -57,7 +57,7 @@ - z + Z @@ -83,7 +83,7 @@ - x + X @@ -100,7 +100,7 @@ - y + Y @@ -117,7 +117,7 @@ - z + Z diff --git a/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui b/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui index 50a3fd7461..85e0344003 100644 --- a/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui +++ b/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -32,7 +32,7 @@ - Mode: + Mode @@ -42,7 +42,7 @@ - Total Power: + Total power @@ -83,7 +83,7 @@ - Dissipation Rate: + Dissipation rate diff --git a/src/Mod/Fem/Gui/Resources/ui/ConstraintCentrif.ui b/src/Mod/Fem/Gui/Resources/ui/ConstraintCentrif.ui index e658e30b70..d2d8ea2005 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ConstraintCentrif.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ConstraintCentrif.ui @@ -11,7 +11,7 @@ - Centrif parameter + Centrif Parameter @@ -31,7 +31,7 @@ - Rotation Frequency: + Rotation frequency diff --git a/src/Mod/Fem/Gui/Resources/ui/ConstraintSectionPrint.ui b/src/Mod/Fem/Gui/Resources/ui/ConstraintSectionPrint.ui index 3e40f33bb6..b527d15572 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ConstraintSectionPrint.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ConstraintSectionPrint.ui @@ -11,7 +11,7 @@ - SectionPrint parameter + Section Print Parameter diff --git a/src/Mod/Fem/Gui/Resources/ui/ConstraintTie.ui b/src/Mod/Fem/Gui/Resources/ui/ConstraintTie.ui index c33c39b6eb..b553ebcd85 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ConstraintTie.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ConstraintTie.ui @@ -11,7 +11,7 @@ - Tie parameter + Tie Parameter @@ -60,7 +60,7 @@ - Enable Adjust + Enable adjust diff --git a/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui b/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui index b3030d591b..ec83aeddb9 100644 --- a/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -20,13 +20,13 @@ - Select Custom mode to enable vector current density + Select custom mode to enable vector current density - Mode: + Mode @@ -75,7 +75,7 @@ with harmonic/oscillating driving current - x + X @@ -126,7 +126,7 @@ with harmonic/oscillating driving current - y + Y @@ -177,7 +177,7 @@ with harmonic/oscillating driving current - z + Z @@ -260,7 +260,7 @@ with harmonic/oscillating driving current - Normal: + Normal diff --git a/src/Mod/Fem/Gui/Resources/ui/ElectricChargeDensity.ui b/src/Mod/Fem/Gui/Resources/ui/ElectricChargeDensity.ui index 77def88519..ae6d8e76e7 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElectricChargeDensity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElectricChargeDensity.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -22,7 +22,7 @@ - Mode: + Mode @@ -52,7 +52,7 @@ - Density: + Density @@ -95,7 +95,7 @@ - Density: + Density @@ -138,7 +138,7 @@ - Total Charge: + Total charge diff --git a/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui b/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui index 50fc5e15c5..7d4ffb0def 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -23,7 +23,7 @@ - Boundary Condition: + Boundary condition @@ -47,7 +47,7 @@ - Potential: + Potential @@ -81,7 +81,7 @@ To define scalar potential and magnetic vector potential - Electromagnetic Potential + Electromagnetic potential true @@ -191,7 +191,7 @@ with a harmonic/oscillating driving force true - x + X @@ -254,7 +254,7 @@ Note: has no effect if a solid was selected true - y + Y @@ -317,7 +317,7 @@ Note: has no effect if a solid was selected true - z + Z @@ -388,7 +388,7 @@ Note: has no effect if a solid was selected Whether the boundary condition defines a farfield potential - Electric Infinity + Electric infinity @@ -398,7 +398,7 @@ Note: has no effect if a solid was selected Whether the boundary condition defines a constant potential - Potential Constant + Potential constant @@ -416,7 +416,7 @@ Note: has no effect if a solid was selected - Electric Flux Density: + Electric flux density @@ -442,10 +442,10 @@ Note: has no effect if a solid was selected - Capacitance Body: + Capacitance body - Enabled by 'Calculate Capacity Matrix' in Electrostatic equation + Enabled by 'Calculate capacity matrix' in Electrostatic equation diff --git a/src/Mod/Fem/Gui/Resources/ui/ElementFluid1D.ui b/src/Mod/Fem/Gui/Resources/ui/ElementFluid1D.ui index 35779494cd..4fde05b58d 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElementFluid1D.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElementFluid1D.ui @@ -42,7 +42,7 @@ - Liquid Section Parameter + Liquid section parameter @@ -61,7 +61,7 @@ - Pipe Area + Pipe area @@ -82,7 +82,7 @@ - Hydraulic Radius + Hydraulic radius @@ -103,7 +103,7 @@ - Manning Coefficient + Manning coefficient @@ -131,7 +131,7 @@ - Initial Area + Initial area @@ -152,7 +152,7 @@ - Enlarged Area + Enlarged area @@ -177,7 +177,7 @@ - Initial Area + Initial area @@ -198,7 +198,7 @@ - Contracted Area + Contracted area @@ -366,7 +366,7 @@ - Pipe Area + Pipe area @@ -387,7 +387,7 @@ - Entrance Area + Entrance area @@ -412,7 +412,7 @@ - Pipe Area + Pipe area @@ -433,7 +433,7 @@ - Diaphragm Area + Diaphragm area @@ -458,7 +458,7 @@ - Pipe Area + Pipe area @@ -479,7 +479,7 @@ - Bend Radius/Pipe Diameter + Bend radius / pipe diameter @@ -506,7 +506,7 @@ - Bend Angle + Bend angle @@ -558,7 +558,7 @@ - Pipe Area + Pipe area @@ -610,7 +610,7 @@ - Pump Characteristic + Pump characteristic @@ -714,7 +714,7 @@ - Pipe Area + Pipe area @@ -735,7 +735,7 @@ - Hydraulic Radius + Hydraulic radius @@ -826,7 +826,7 @@ - Gas Section Parameter + Gas section parameter @@ -840,7 +840,7 @@ - Open Channel Section Parameter + Open channel section parameter diff --git a/src/Mod/Fem/Gui/Resources/ui/ElementGeometry1D.ui b/src/Mod/Fem/Gui/Resources/ui/ElementGeometry1D.ui index 0c3559333b..b28f2951ff 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElementGeometry1D.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElementGeometry1D.ui @@ -11,13 +11,13 @@ - Beam section parameter + Beam Section Parameter - Cross section parameter + Cross-Section Parameter @@ -38,7 +38,7 @@ - Width: + Width @@ -64,7 +64,7 @@ - Height: + Height @@ -101,7 +101,7 @@ - Diameter: + Diameter @@ -138,7 +138,7 @@ - Outer diameter: + Outer diameter @@ -164,7 +164,7 @@ - Thickness: + Thickness @@ -201,7 +201,7 @@ - Axis1 Length: + Axis1 length @@ -233,7 +233,7 @@ - Axis2 Length: + Axis2 length @@ -276,7 +276,7 @@ - Height: + Height @@ -308,7 +308,7 @@ - Width: + Width @@ -340,7 +340,7 @@ - T1 Thickness: + T1 thickness @@ -372,7 +372,7 @@ - T2 Thickness: + T2 thickness @@ -404,7 +404,7 @@ - T3 Thickness: + T3 thickness @@ -436,7 +436,7 @@ - T4 Thickness: + T4 thickness diff --git a/src/Mod/Fem/Gui/Resources/ui/ElementGeometry2D.ui b/src/Mod/Fem/Gui/Resources/ui/ElementGeometry2D.ui index ff687edf8a..3b5d663c23 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElementGeometry2D.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElementGeometry2D.ui @@ -11,7 +11,7 @@ - Shell thickness parameter + Shell Thickness Parameter @@ -34,7 +34,7 @@ - Thickness: + Thickness diff --git a/src/Mod/Fem/Gui/Resources/ui/ElementRotation1D.ui b/src/Mod/Fem/Gui/Resources/ui/ElementRotation1D.ui index c01b66b142..ebb7a85999 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElementRotation1D.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElementRotation1D.ui @@ -11,13 +11,13 @@ - Beam section rotation + Beam Section Rotation - Cross section parameter + Cross-Section Parameter @@ -86,7 +86,7 @@ - Rotation: + Rotation diff --git a/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui b/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui index 8f02645e72..6241a06bbb 100644 --- a/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -22,14 +22,14 @@ false - formula + Formula - unspecified + Unspecified true @@ -39,7 +39,7 @@ - Velocity x: + Velocity X @@ -70,21 +70,21 @@ false - formula + Formula - Velocity y: + Velocity Y - unspecified + Unspecified true @@ -115,7 +115,7 @@ - unspecified + Unspecified true @@ -128,14 +128,14 @@ false - formula + Formula - Velocity z: + Velocity Z diff --git a/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui b/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui index 2df9fc21bf..b051e2e788 100644 --- a/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -22,14 +22,14 @@ false - formula + Formula - unspecified + Unspecified true @@ -39,7 +39,7 @@ - Velocity x: + Velocity X @@ -70,21 +70,21 @@ false - formula + Formula - Velocity y: + Velocity Y - unspecified + Unspecified true @@ -115,7 +115,7 @@ - unspecified + Unspecified true @@ -128,14 +128,14 @@ false - formula + Formula - Velocity z: + Velocity Z diff --git a/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui b/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui index 741dc19567..603c70983e 100644 --- a/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui +++ b/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui @@ -11,13 +11,13 @@ - Analysis feature properties + Analysis Feature Properties - Pressure: + Pressure diff --git a/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui b/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui index 86aa5b930e..29e57a4ab2 100644 --- a/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui +++ b/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui @@ -11,7 +11,7 @@ - Analysis feature properties + Analysis Feature Properties @@ -53,7 +53,7 @@ with harmonic/oscillating driving current - x + X @@ -104,7 +104,7 @@ with harmonic/oscillating driving current - y + Y @@ -155,7 +155,7 @@ with harmonic/oscillating driving current - z + Z diff --git a/src/Mod/Fem/Gui/Resources/ui/Material.ui b/src/Mod/Fem/Gui/Resources/ui/Material.ui index dea6f96b2b..e0975b7b69 100755 --- a/src/Mod/Fem/Gui/Resources/ui/Material.ui +++ b/src/Mod/Fem/Gui/Resources/ui/Material.ui @@ -11,7 +11,7 @@ - FEM material + FEM Material @@ -37,7 +37,7 @@ - Density: + Density @@ -99,7 +99,7 @@ - Young's Modulus: + Young's modulus @@ -139,7 +139,7 @@ - Poisson Ratio: + Poisson ratio @@ -198,7 +198,7 @@ - Kinematic Viscosity: + Kinematic viscosity @@ -260,7 +260,7 @@ - Thermal Conductivity: + Thermal conductivity @@ -300,7 +300,7 @@ - Expansion Coefficient: + Expansion coefficient @@ -340,7 +340,7 @@ - Reference Temperature: + Reference temperature Reference temperature for thermal expansion @@ -383,7 +383,7 @@ - Specific Heat Capacity: + Specific heat capacity diff --git a/src/Mod/Fem/Gui/Resources/ui/MaterialReinforcement.ui b/src/Mod/Fem/Gui/Resources/ui/MaterialReinforcement.ui index 78a7372b82..b6ba6e5e06 100755 --- a/src/Mod/Fem/Gui/Resources/ui/MaterialReinforcement.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MaterialReinforcement.ui @@ -11,7 +11,7 @@ - FEM material reinforcement + FEM Material Reinforcement Qt::LeftToRight diff --git a/src/Mod/Fem/Gui/Resources/ui/MeshBoundaryLayer.ui b/src/Mod/Fem/Gui/Resources/ui/MeshBoundaryLayer.ui index dd86713cab..7dc153ceb0 100644 --- a/src/Mod/Fem/Gui/Resources/ui/MeshBoundaryLayer.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MeshBoundaryLayer.ui @@ -11,7 +11,7 @@ - Mesh boundary layer settings + Mesh Boundary Layer Settings @@ -31,7 +31,7 @@ - Max Layers + Maximum layers @@ -48,7 +48,7 @@ - Min/1st thickness + Minimum/1st thickness diff --git a/src/Mod/Fem/Gui/Resources/ui/MeshGmsh.ui b/src/Mod/Fem/Gui/Resources/ui/MeshGmsh.ui index 368ecb6493..a34639eb46 100644 --- a/src/Mod/Fem/Gui/Resources/ui/MeshGmsh.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MeshGmsh.ui @@ -34,7 +34,7 @@ - Element Dimension: + Element dimension @@ -44,7 +44,7 @@ - Maximum Size: + Maximum size @@ -82,7 +82,7 @@ - Minimum Size: + Minimum size @@ -123,7 +123,7 @@ - Element Order: + Element order @@ -169,7 +169,7 @@ - Time: + Time @@ -195,7 +195,7 @@ - Gmsh version + Gmsh Version diff --git a/src/Mod/Fem/Gui/Resources/ui/MeshGroup.ui b/src/Mod/Fem/Gui/Resources/ui/MeshGroup.ui index 42ca395ad7..0cc8c41909 100644 --- a/src/Mod/Fem/Gui/Resources/ui/MeshGroup.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MeshGroup.ui @@ -11,7 +11,7 @@ - Mesh group + Mesh Group @@ -23,7 +23,7 @@ - Identifier used for mesh export + Identifier Used for Mesh Export diff --git a/src/Mod/Fem/Gui/Resources/ui/MeshGroupXDMFExport.ui b/src/Mod/Fem/Gui/Resources/ui/MeshGroupXDMFExport.ui index aa55e691db..8d168c2035 100644 --- a/src/Mod/Fem/Gui/Resources/ui/MeshGroupXDMFExport.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MeshGroupXDMFExport.ui @@ -20,7 +20,7 @@ - Mesh groups detected. Please choose values for the different groups. + Mesh groups detected. Choose values for the different groups. diff --git a/src/Mod/Fem/Gui/Resources/ui/MeshNetgen.ui b/src/Mod/Fem/Gui/Resources/ui/MeshNetgen.ui index 24907dd711..e5f0c45d4f 100644 --- a/src/Mod/Fem/Gui/Resources/ui/MeshNetgen.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MeshNetgen.ui @@ -34,7 +34,7 @@ - Fineness: + Fineness @@ -44,7 +44,7 @@ - Maximum Size: + Maximum size @@ -79,7 +79,7 @@ - Minimum Size: + Minimum size @@ -114,14 +114,14 @@ - Second Order + Second order - Growth Rate: + Growth rate @@ -144,7 +144,7 @@ - Curvature Safety: + Curvature safety @@ -161,7 +161,7 @@ - Segments Per Edge: + Segments per edge @@ -217,7 +217,7 @@ - Time: + Time @@ -243,7 +243,7 @@ - Netgen version + Netgen Version diff --git a/src/Mod/Fem/Gui/Resources/ui/MeshRegion.ui b/src/Mod/Fem/Gui/Resources/ui/MeshRegion.ui index 99929c556b..b77fae80f1 100644 --- a/src/Mod/Fem/Gui/Resources/ui/MeshRegion.ui +++ b/src/Mod/Fem/Gui/Resources/ui/MeshRegion.ui @@ -11,7 +11,7 @@ - Mesh refinement + Mesh Refinement @@ -34,7 +34,7 @@ - Max element size: + Maximum element size diff --git a/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui index feca6591da..f9508c65d0 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldAppEdit.ui @@ -31,7 +31,7 @@ - Field: + Field @@ -58,7 +58,7 @@ - Frames: + Frames diff --git a/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldViewEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldViewEdit.ui index 5fe4a7d3dc..c971d0b3c6 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldViewEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostHistogramFieldViewEdit.ui @@ -86,7 +86,7 @@ - Lines: + Lines @@ -109,7 +109,7 @@ - Bars: + Bars @@ -119,7 +119,7 @@ - Legend: + Legend diff --git a/src/Mod/Fem/Gui/Resources/ui/PostHistogramIndexAppEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostHistogramIndexAppEdit.ui index 496f42229b..ec19dfcc03 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostHistogramIndexAppEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostHistogramIndexAppEdit.ui @@ -31,7 +31,7 @@ - Field: + Field @@ -58,7 +58,7 @@ - Index: + Index diff --git a/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui index 33f36cf245..32f300dca4 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldAppEdit.ui @@ -29,7 +29,7 @@ - X Field: + X field @@ -56,7 +56,7 @@ - Y Field: + Y field @@ -83,7 +83,7 @@ - Frames: + Frames diff --git a/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldViewEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldViewEdit.ui index f197016d12..bdc8866852 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldViewEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostLineplotFieldViewEdit.ui @@ -31,7 +31,7 @@ - Marker: + Marker @@ -59,7 +59,7 @@ - Legend: + Legend @@ -84,7 +84,7 @@ - Line: + Line diff --git a/src/Mod/Fem/Gui/Resources/ui/PostLineplotIndexAppEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostLineplotIndexAppEdit.ui index ba4ab0ead3..2fd3e8dc35 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostLineplotIndexAppEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostLineplotIndexAppEdit.ui @@ -29,7 +29,7 @@ - Y Field: + Y field @@ -56,7 +56,7 @@ - Index: + Index diff --git a/src/Mod/Fem/Gui/Resources/ui/PostTableFieldViewEdit.ui b/src/Mod/Fem/Gui/Resources/ui/PostTableFieldViewEdit.ui index 6b3000248a..7119dad94d 100644 --- a/src/Mod/Fem/Gui/Resources/ui/PostTableFieldViewEdit.ui +++ b/src/Mod/Fem/Gui/Resources/ui/PostTableFieldViewEdit.ui @@ -39,7 +39,7 @@ - Name: + Name diff --git a/src/Mod/Fem/Gui/Resources/ui/ResultHints.ui b/src/Mod/Fem/Gui/Resources/ui/ResultHints.ui index 1f0b12cb90..3ebf9535a3 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ResultHints.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ResultHints.ui @@ -11,13 +11,13 @@ - Hints user defined equations + Hints User-Defined Equations - Available result types: + Available Result Types diff --git a/src/Mod/Fem/Gui/Resources/ui/ResultShow.ui b/src/Mod/Fem/Gui/Resources/ui/ResultShow.ui index d2e43b1a46..57b92ff9b3 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ResultShow.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ResultShow.ui @@ -11,7 +11,7 @@ - Show result + Show Result @@ -23,7 +23,7 @@ - Result type + Result Type @@ -53,7 +53,7 @@ - Displacement Magnitude + Displacement magnitude @@ -80,7 +80,7 @@ - Max Principal Stress + Maximum principal stress @@ -100,7 +100,7 @@ - Min Principal Stress + Minimum principal stress @@ -120,7 +120,7 @@ - Max Shear Stress (Tresca) + Maximum shear stress (Tresca) @@ -133,14 +133,14 @@ - Equivalent Plastic Strain + Equivalent plastic strain - Mass Flow Rate + Mass flow rate @@ -160,7 +160,7 @@ - Network Pressure + Network pressure @@ -178,7 +178,7 @@ - Min: + Minimum @@ -198,7 +198,7 @@ - Max: + Maximum @@ -309,7 +309,7 @@ false - Slider Max + Slider maximum @@ -379,7 +379,7 @@ - Number of Steps per Cycle + Number of steps per cycle @@ -426,7 +426,7 @@ - Number of Cycles + Number of cycles @@ -464,7 +464,7 @@ - Frame Rate + Frame rate @@ -519,7 +519,7 @@ - User defined equation + User-Defined Equation diff --git a/src/Mod/Fem/Gui/Resources/ui/SolverCalculiX.ui b/src/Mod/Fem/Gui/Resources/ui/SolverCalculiX.ui index 890991abe1..cc4f0869b6 100644 --- a/src/Mod/Fem/Gui/Resources/ui/SolverCalculiX.ui +++ b/src/Mod/Fem/Gui/Resources/ui/SolverCalculiX.ui @@ -17,7 +17,7 @@ - Working Directory + Working directory @@ -63,7 +63,7 @@ - ... + @@ -83,7 +83,7 @@ - Analysis Type: + Analysis type @@ -123,7 +123,7 @@ - Time: + Time diff --git a/src/Mod/Fem/Gui/Resources/ui/SolverCcxTools.ui b/src/Mod/Fem/Gui/Resources/ui/SolverCcxTools.ui index 7e7f8d9ec8..dba5117f6a 100644 --- a/src/Mod/Fem/Gui/Resources/ui/SolverCcxTools.ui +++ b/src/Mod/Fem/Gui/Resources/ui/SolverCcxTools.ui @@ -11,13 +11,13 @@ - Mechanical analysis + Mechanical Analysis - Working directory + Working Directory @@ -42,7 +42,7 @@ true - ... + @@ -52,7 +52,7 @@ - Analysis type + Analysis Type @@ -107,7 +107,7 @@ - Write .inp file + Write .inp File @@ -117,7 +117,7 @@ false - Edit .inp file + Edit .inp File @@ -148,7 +148,7 @@ - Time: + Time diff --git a/src/Mod/Fem/Gui/Resources/ui/TaskPostGlyph.ui b/src/Mod/Fem/Gui/Resources/ui/TaskPostGlyph.ui index 84fde6626e..abe03aab00 100644 --- a/src/Mod/Fem/Gui/Resources/ui/TaskPostGlyph.ui +++ b/src/Mod/Fem/Gui/Resources/ui/TaskPostGlyph.ui @@ -11,7 +11,7 @@ - Glyph settings + Glyph Settings @@ -308,10 +308,10 @@ true - Defines the maximal number of vertices used for "Uniform Sampling" masking mode + Defines the maximum number of vertices used for "Uniform Sampling" masking mode - Max + Maximum diff --git a/src/Mod/Fem/Gui/Resources/ui/TaskPostHistogram.ui b/src/Mod/Fem/Gui/Resources/ui/TaskPostHistogram.ui index a753071f9a..e98462d1e0 100644 --- a/src/Mod/Fem/Gui/Resources/ui/TaskPostHistogram.ui +++ b/src/Mod/Fem/Gui/Resources/ui/TaskPostHistogram.ui @@ -11,7 +11,7 @@ - Glyph settings + Glyph Settings Qt::LeftToRight @@ -153,7 +153,7 @@ - Y Axis + Y-axis diff --git a/src/Mod/Fem/Gui/Resources/ui/TaskPostLineplot.ui b/src/Mod/Fem/Gui/Resources/ui/TaskPostLineplot.ui index bec95e063f..6535921604 100644 --- a/src/Mod/Fem/Gui/Resources/ui/TaskPostLineplot.ui +++ b/src/Mod/Fem/Gui/Resources/ui/TaskPostLineplot.ui @@ -11,7 +11,7 @@ - Glyph settings + Glyph Settings Qt::LeftToRight @@ -132,7 +132,7 @@ - Y Axis + Y-axis @@ -145,7 +145,7 @@ If the scale data is a vector this property decides if the glyph is scaled by vector magnitude or by the individual components - X Axis + X-axis diff --git a/src/Mod/Fem/Gui/SphereWidget.ui b/src/Mod/Fem/Gui/SphereWidget.ui index a89fe1ed18..1137a0afed 100644 --- a/src/Mod/Fem/Gui/SphereWidget.ui +++ b/src/Mod/Fem/Gui/SphereWidget.ui @@ -23,7 +23,7 @@ - x + X @@ -46,7 +46,7 @@ - y + Y @@ -69,7 +69,7 @@ - z + Z diff --git a/src/Mod/Fem/Gui/TaskAnalysisInfo.ui b/src/Mod/Fem/Gui/TaskAnalysisInfo.ui index a331f2d928..05a18a54e1 100644 --- a/src/Mod/Fem/Gui/TaskAnalysisInfo.ui +++ b/src/Mod/Fem/Gui/TaskAnalysisInfo.ui @@ -29,7 +29,7 @@ - Meshes: + Meshes diff --git a/src/Mod/Fem/Gui/TaskCreateElementSet.ui b/src/Mod/Fem/Gui/TaskCreateElementSet.ui index 00006588f4..2ea54bc06b 100644 --- a/src/Mod/Fem/Gui/TaskCreateElementSet.ui +++ b/src/Mod/Fem/Gui/TaskCreateElementSet.ui @@ -32,7 +32,7 @@ - Erase Elements by Polygon + Erase elements by polygon @@ -53,7 +53,7 @@ - Delete New Meshes + Delete new meshes @@ -74,7 +74,7 @@ - Copy Result Mesh + Copy result mesh diff --git a/src/Mod/Fem/Gui/TaskCreateNodeSet.ui b/src/Mod/Fem/Gui/TaskCreateNodeSet.ui index 8df736b3b6..3111157d1a 100644 --- a/src/Mod/Fem/Gui/TaskCreateNodeSet.ui +++ b/src/Mod/Fem/Gui/TaskCreateNodeSet.ui @@ -93,7 +93,7 @@ - Angle-search + Angle-Search @@ -108,7 +108,7 @@ - Stop angle: + Stop angle diff --git a/src/Mod/Fem/Gui/TaskFemConstraint.ui b/src/Mod/Fem/Gui/TaskFemConstraint.ui index 3507f1a03e..f084306ead 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraint.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraint.ui @@ -20,7 +20,7 @@ - Add reference + Add Reference diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp index 3d7ef0d44b..dc867d86be 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp @@ -166,10 +166,9 @@ void TaskFemConstraintBearing::onSelectionChanged(const Gui::SelectionChanges& m std::vector SubElements = pcConstraint->References.getSubValues(); if (!Objects.empty()) { - QMessageBox::warning( - this, - tr("Selection error"), - tr("Please use only a single reference for bearing constraint")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Use only a single reference for bearing constraint")); return; } if (subName.substr(0, 4) != "Face") { diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.ui b/src/Mod/Fem/Gui/TaskFemConstraintBearing.ui index 367a53b500..8a2e3a5a17 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.ui @@ -17,7 +17,7 @@ - Add reference + Add Reference diff --git a/src/Mod/Fem/Gui/TaskFemConstraintContact.ui b/src/Mod/Fem/Gui/TaskFemConstraintContact.ui index 3fca07dde2..0ff3b4e419 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintContact.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintContact.ui @@ -154,7 +154,7 @@ - Contact Stiffness + Contact stiffness @@ -177,7 +177,7 @@ - Clearance Adjustment + Clearance adjustment @@ -200,14 +200,14 @@ - Enable Friction + Enable friction - Friction Coefficient + Friction coefficient @@ -230,7 +230,7 @@ - Stick Slope + Stick slope diff --git a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.ui b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.ui index ec311c8ec8..4b5868c51e 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.ui @@ -38,7 +38,7 @@ - Click Add or Remove and select geometric element(s) + Click Add or Remove and select geometric elements @@ -104,7 +104,7 @@ - Displacement x + Displacement X true @@ -137,7 +137,7 @@ for the Elmer solver - Displacement y + Displacement Y true @@ -170,7 +170,7 @@ for the Elmer solver - Displacement z + Displacement Z true @@ -229,7 +229,7 @@ generated by the flow - Rotations are only valid for Beam and Shell elements. + Rotations are only valid for beam and shell elements false @@ -242,7 +242,7 @@ generated by the flow - Rotation x + Rotation X true @@ -261,7 +261,7 @@ generated by the flow - Rotation y + Rotation Y true @@ -280,7 +280,7 @@ generated by the flow - Rotation z + Rotation Z true diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.ui b/src/Mod/Fem/Gui/TaskFemConstraintFixed.ui index 09c0d6b836..a0f9dd16d8 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.ui @@ -17,7 +17,7 @@ - Click Add or Remove and select geometric element(s) + Click Add or Remove and select geometric elements diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp index de5947fd17..8f5088640a 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp @@ -630,7 +630,7 @@ void TaskFemConstraintFluidBoundary::onButtonDirection(const bool pressed) // get vector of selected objects of active document std::vector selection = Gui::Selection().getSelectionEx(); if (selection.empty()) { - QMessageBox::warning(this, tr("Empty selection"), tr("Select an edge or a face, please.")); + QMessageBox::warning(this, tr("Empty selection"), tr("Select an edge or a face.")); return; } Fem::ConstraintFluidBoundary* pcConstraint = diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.ui b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.ui index ad3b78fe1c..25c2f793e2 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.ui @@ -67,7 +67,7 @@ - Select multiple face(s), click Add or Remove + Select multiple faces, click Add or Remove diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp index 861656318d..d95938440e 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp @@ -308,7 +308,7 @@ void TaskFemConstraintForce::onButtonDirection(const bool pressed) auto link = getDirection(Gui::Selection().getSelectionEx()); if (!link.first) { - QMessageBox::warning(this, tr("Wrong selection"), tr("Select an edge or a face, please.")); + QMessageBox::warning(this, tr("Wrong selection"), tr("Select an edge or a face.")); return; } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.ui b/src/Mod/Fem/Gui/TaskFemConstraintForce.ui index 7b46ea0ec9..156af8b330 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.ui @@ -29,7 +29,7 @@ - Click Add or Remove and select geometric element(s) + Click Add or Remove and select geometric elements diff --git a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui index aaf9c32964..8e1c79a829 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui @@ -11,13 +11,13 @@ - Task Fem Heat flux Load + Task Heat Flux Load - Click Add or Remove and select face(s) + Click Add or Remove and select faces @@ -67,7 +67,7 @@ - Constraint Type + Constraint type @@ -93,7 +93,7 @@ - Surface Heat Flux + Surface heat flux @@ -130,7 +130,7 @@ - Film Coefficient + Film coefficient @@ -153,7 +153,7 @@ - Ambient Temperature + Ambient temperature @@ -215,7 +215,7 @@ - Ambient Temperature + Ambient temperature diff --git a/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.ui b/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.ui index d4af9edc9e..b2b11f469c 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.ui @@ -17,7 +17,7 @@ - Insert component's initial temperature: + Initial temperature Qt::AlignCenter diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.ui b/src/Mod/Fem/Gui/TaskFemConstraintPressure.ui index 85e8e899f8..9fb6bc5228 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.ui @@ -17,7 +17,7 @@ - Click Add or Remove and select face(s) + Click Add or Remove and select faces @@ -84,7 +84,7 @@ - Reverse Direction + Reverse direction diff --git a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui index ac004e91f5..c6bb3f9d1d 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui @@ -17,7 +17,7 @@ - Click Add or Remove and select geometric element(s) + Click Add or Remove and select geometric elements @@ -80,7 +80,7 @@ - X: + X @@ -103,7 +103,7 @@ - Y: + Y @@ -126,7 +126,7 @@ - Z: + Z @@ -180,21 +180,21 @@ - X: + X - Y: + Y - Z: + Z @@ -228,21 +228,21 @@ - X: + X - Y: + Y - Z: + Z @@ -306,21 +306,21 @@ - X: + X - Y: + Y - Z: + Z @@ -397,21 +397,21 @@ - X: + X - Y: + Y - Z: + Z @@ -445,21 +445,21 @@ - X: + X - Y: + Y - Z: + Z @@ -496,7 +496,7 @@ - Angle: + Angle @@ -534,21 +534,21 @@ - X: + X - Y: + Y - Z: + Z diff --git a/src/Mod/Fem/Gui/TaskFemConstraintSpring.ui b/src/Mod/Fem/Gui/TaskFemConstraintSpring.ui index 5161d3912e..3a829a55d2 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintSpring.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintSpring.ui @@ -17,7 +17,7 @@ - Click Add or Remove and select face(s) + Click Add or Remove and select faces @@ -72,7 +72,7 @@ - Normal Stiffness + Normal stiffness @@ -95,7 +95,7 @@ - Tangential Stiffness + Tangential stiffness @@ -119,8 +119,7 @@ - What stiffness should be -used for the Elmer solver + Stiffness used for the Elmer solver diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.ui b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.ui index e989be71b3..803ad8d08c 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.ui @@ -29,7 +29,7 @@ - Click Add or Remove and select geometric element(s) + Click Add or Remove and select geometric elements diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp index c8c006f680..4b399e1737 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp @@ -200,7 +200,7 @@ TaskFemConstraintTransform::TaskFemConstraintTransform( if ((p == 0) && (!Objects.empty())) { QMessageBox::warning(this, tr("Analysis feature update error"), - tr("The transformable faces have changed. Please add only the " + tr("The transformable faces have changed. Add only the " "transformable faces and remove non-transformable faces!")); return; } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTransform.ui b/src/Mod/Fem/Gui/TaskFemConstraintTransform.ui index 9adc553c4d..731c9f2c6c 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTransform.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintTransform.ui @@ -113,7 +113,7 @@ - X: + X @@ -130,7 +130,7 @@ - Y: + Y @@ -147,7 +147,7 @@ - Z: + Z @@ -164,7 +164,7 @@ - Angle: + Angle @@ -187,7 +187,7 @@ - Transformable surfaces + Transformable Surfaces @@ -206,7 +206,7 @@ - Transformable surfaces + Transformable Surfaces diff --git a/src/Mod/Fem/Gui/TaskPanelConstraintTemperature.ui b/src/Mod/Fem/Gui/TaskPanelConstraintTemperature.ui index dc9187866b..48e30dbfdc 100644 --- a/src/Mod/Fem/Gui/TaskPanelConstraintTemperature.ui +++ b/src/Mod/Fem/Gui/TaskPanelConstraintTemperature.ui @@ -23,7 +23,7 @@ - Select the vertices, lines and surfaces: + Select the vertices, lines and surfaces @@ -36,7 +36,7 @@ - Temperature: + Temperature diff --git a/src/Mod/Fem/Gui/TaskPanelInitialTemperature.ui b/src/Mod/Fem/Gui/TaskPanelInitialTemperature.ui index 9503786806..7d74680d51 100644 --- a/src/Mod/Fem/Gui/TaskPanelInitialTemperature.ui +++ b/src/Mod/Fem/Gui/TaskPanelInitialTemperature.ui @@ -23,8 +23,7 @@ - Insert component's - initial temperature: + Initial temperature Qt::AlignCenter @@ -40,7 +39,7 @@ - Temperature: + Temperature diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index e50bb0bf98..1166da49f8 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -436,7 +436,7 @@ TaskPostDisplay::TaskPostDisplay(ViewProviderFemPostObject* view, QWidget* paren // setup the ui ui->setupUi(this); setWindowTitle( - tr("Result display options")); // set title here as setupUi overrides the constructor title + tr("Result Display Options")); // set title here as setupUi overrides the constructor title setupConnections(); // update all fields @@ -608,7 +608,7 @@ TaskPostBranch::TaskPostBranch(ViewProviderFemPostBranchFilter* view, QWidget* p { // setup the ui ui->setupUi(this); - setWindowTitle(tr("Branch behaviour")); + setWindowTitle(tr("Branch Behaviour")); setupConnections(); // populate the data @@ -663,7 +663,7 @@ TaskPostDataAlongLine::TaskPostDataAlongLine(ViewProviderFemPostDataAlongLine* v { // setup the ui ui->setupUi(this); - setWindowTitle(tr("Data along a line options")); + setWindowTitle(tr("Data Along a Line Options")); setupConnectionsStep1(); QSize size = ui->point1X->sizeForText(QStringLiteral("000000000000")); @@ -1084,7 +1084,7 @@ TaskPostDataAtPoint::TaskPostDataAtPoint(ViewProviderFemPostDataAtPoint* view, Q { // setup the ui ui->setupUi(this); - setWindowTitle(tr("Data at point options")); + setWindowTitle(tr("Data at Point Options")); setupConnections(); QSize size = ui->centerX->sizeForText(QStringLiteral("000000000000")); @@ -1442,7 +1442,7 @@ TaskPostClip::TaskPostClip(ViewProviderFemPostClip* view, // setup the ui ui->setupUi(this); - setWindowTitle(tr("Clip region, choose implicit function")); + setWindowTitle(tr("Clip Region, Choose Implicit Function")); setupConnections(); // the layout for the container widget @@ -1593,7 +1593,7 @@ TaskPostContours::TaskPostContours(ViewProviderFemPostContours* view, QWidget* p { // setup the ui ui->setupUi(this); - setWindowTitle(tr("Contours filter options")); + setWindowTitle(tr("Contours Filter Options")); QMetaObject::connectSlotsByName(this); auto obj = getObject(); @@ -1752,7 +1752,7 @@ TaskPostCut::TaskPostCut(ViewProviderFemPostCut* view, App::PropertyLink* functi // setup the ui ui->setupUi(this); - setWindowTitle(tr("Function cut, choose implicit function")); + setWindowTitle(tr("Function Cut, Choose Implicit Function")); setupConnections(); // the layout for the container widget @@ -1885,7 +1885,7 @@ TaskPostScalarClip::TaskPostScalarClip(ViewProviderFemPostScalarClip* view, QWid { // setup the ui ui->setupUi(this); - setWindowTitle(tr("Scalar clip options")); + setWindowTitle(tr("Scalar Clip Options")); setupConnections(); // load the default values @@ -2006,7 +2006,7 @@ TaskPostWarpVector::TaskPostWarpVector(ViewProviderFemPostWarpVector* view, QWid { // setup the ui ui->setupUi(this); - setWindowTitle(tr("Warp options")); + setWindowTitle(tr("Warp Options")); setupConnections(); // load the default values for warp display diff --git a/src/Mod/Fem/Gui/TaskPostCalculator.ui b/src/Mod/Fem/Gui/TaskPostCalculator.ui index 3d90b1eea0..1c81400c96 100644 --- a/src/Mod/Fem/Gui/TaskPostCalculator.ui +++ b/src/Mod/Fem/Gui/TaskPostCalculator.ui @@ -25,7 +25,7 @@ - Field Name: + Field name @@ -59,7 +59,7 @@ - Scalars: + Scalars @@ -69,7 +69,7 @@ - Vectors: + Vectors @@ -79,7 +79,7 @@ - Operators: + Operators @@ -99,7 +99,7 @@ - Replace invalid data: + Replace invalid data Replacement value for invalid operations diff --git a/src/Mod/Fem/Gui/TaskPostClip.ui b/src/Mod/Fem/Gui/TaskPostClip.ui index 70bdd19377..65560a37d3 100644 --- a/src/Mod/Fem/Gui/TaskPostClip.ui +++ b/src/Mod/Fem/Gui/TaskPostClip.ui @@ -70,14 +70,14 @@ - Inside Out + Inside out - Cut Cells + Cut cells diff --git a/src/Mod/Fem/Gui/TaskPostContours.ui b/src/Mod/Fem/Gui/TaskPostContours.ui index eb6bd9df53..18ebb8fa20 100644 --- a/src/Mod/Fem/Gui/TaskPostContours.ui +++ b/src/Mod/Fem/Gui/TaskPostContours.ui @@ -22,7 +22,7 @@ - Vector: + Vector @@ -32,7 +32,7 @@ - Field: + Field @@ -45,7 +45,7 @@ - Number of contours: + Number of contours @@ -84,7 +84,7 @@ - Relaxation Factor: + Relaxation factor diff --git a/src/Mod/Fem/Gui/TaskPostDataAlongLine.ui b/src/Mod/Fem/Gui/TaskPostDataAlongLine.ui index 4c3e0fc6c5..ccaff5656d 100644 --- a/src/Mod/Fem/Gui/TaskPostDataAlongLine.ui +++ b/src/Mod/Fem/Gui/TaskPostDataAlongLine.ui @@ -61,7 +61,7 @@ - x + X @@ -100,7 +100,7 @@ - y + Y @@ -139,7 +139,7 @@ - z + Z diff --git a/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui b/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui index 8450a5f73b..502b578632 100644 --- a/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui +++ b/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui @@ -26,7 +26,7 @@ - x + X @@ -55,7 +55,7 @@ - y + Y @@ -84,7 +84,7 @@ - z + Z @@ -119,7 +119,7 @@ - Value: + Value diff --git a/src/Mod/Fem/Gui/TaskPostExtraction.cpp b/src/Mod/Fem/Gui/TaskPostExtraction.cpp index e61033957c..1c80786c8b 100644 --- a/src/Mod/Fem/Gui/TaskPostExtraction.cpp +++ b/src/Mod/Fem/Gui/TaskPostExtraction.cpp @@ -53,7 +53,7 @@ TaskPostExtraction::TaskPostExtraction(ViewProviderFemPostObject* view, QWidget* // we load the python implementation, and try to get the widget from it, to add // directly our widget - setWindowTitle(tr("Data and extractions")); + setWindowTitle(tr("Data and Extractions")); Base::PyGILStateLocker lock; diff --git a/src/Mod/Fem/Gui/TaskPostExtraction.ui b/src/Mod/Fem/Gui/TaskPostExtraction.ui index 7387ffb7de..3e528b76a4 100644 --- a/src/Mod/Fem/Gui/TaskPostExtraction.ui +++ b/src/Mod/Fem/Gui/TaskPostExtraction.ui @@ -59,7 +59,7 @@ - Data used in: + Data used in Qt::AlignmentFlag::AlignBottom|Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft diff --git a/src/Mod/Fem/Gui/TaskPostFrames.ui b/src/Mod/Fem/Gui/TaskPostFrames.ui index a799044291..1377e138b1 100644 --- a/src/Mod/Fem/Gui/TaskPostFrames.ui +++ b/src/Mod/Fem/Gui/TaskPostFrames.ui @@ -31,14 +31,14 @@ - Type of frames: + Type of frames - Ressonance Frequencies + Ressonance frequencies diff --git a/src/Mod/Fem/Gui/TaskPostScalarClip.ui b/src/Mod/Fem/Gui/TaskPostScalarClip.ui index 4f843e6a33..82f6d7a18e 100644 --- a/src/Mod/Fem/Gui/TaskPostScalarClip.ui +++ b/src/Mod/Fem/Gui/TaskPostScalarClip.ui @@ -98,7 +98,7 @@ - Min scalar + Minimum scalar @@ -118,7 +118,7 @@ Qt::LeftToRight - Max scalar + Maximum scalar Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/Mod/Fem/Gui/TaskPostWarpVector.ui b/src/Mod/Fem/Gui/TaskPostWarpVector.ui index 9c080ff08c..66e0d94e2e 100644 --- a/src/Mod/Fem/Gui/TaskPostWarpVector.ui +++ b/src/Mod/Fem/Gui/TaskPostWarpVector.ui @@ -95,7 +95,7 @@ - Min warp + Minimum warp @@ -115,7 +115,7 @@ Qt::LeftToRight - Max warp + Maximum warp Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/Mod/Fem/Gui/TaskTetParameter.ui b/src/Mod/Fem/Gui/TaskTetParameter.ui index 7ad2b55f93..2048aaaae0 100644 --- a/src/Mod/Fem/Gui/TaskTetParameter.ui +++ b/src/Mod/Fem/Gui/TaskTetParameter.ui @@ -25,7 +25,7 @@ - Max. Size: + Maximum size @@ -43,7 +43,7 @@ - Min. Size: + Minimum size @@ -68,7 +68,7 @@ - Fineness: + Fineness @@ -112,7 +112,7 @@ - Growth Rate: + Growth rate @@ -126,7 +126,7 @@ - Number of Segments per Edge: + Number of segments per edge @@ -143,7 +143,7 @@ - Number of Segments per Radius: + Number of segments per radius @@ -181,7 +181,7 @@ - Node count: + Node count @@ -195,7 +195,7 @@ - Triangle count: + Triangle count @@ -209,7 +209,7 @@ - Tetrahedron count: + Tetrahedron count diff --git a/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp b/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp index 1aaff2ab6b..44ab249090 100644 --- a/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp +++ b/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp @@ -161,7 +161,7 @@ void ViewProviderFemAnalysis::show() void ViewProviderFemAnalysis::setupContextMenu(QMenu* menu, QObject*, const char*) { Gui::ActionFunction* func = new Gui::ActionFunction(menu); - QAction* act = menu->addAction(tr("Activate analysis")); + QAction* act = menu->addAction(tr("Activate Analysis")); func->trigger(act, [this]() { this->doubleClicked(); }); diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp index 040e9194cc..c49ca9abd9 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp @@ -156,7 +156,7 @@ std::vector ViewProviderFemConstraint::claimChildren() con void ViewProviderFemConstraint::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { QAction* act; - act = menu->addAction(QObject::tr("Edit analysis feature"), receiver, member); + act = menu->addAction(QObject::tr("Edit Analysis Feature"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); ViewProviderGeometryObject::setupContextMenu(menu, receiver, diff --git a/src/Mod/Fem/Gui/Workbench.cpp b/src/Mod/Fem/Gui/Workbench.cpp index 31f396fbe9..ac530a3023 100644 --- a/src/Mod/Fem/Gui/Workbench.cpp +++ b/src/Mod/Fem/Gui/Workbench.cpp @@ -47,20 +47,20 @@ using namespace FemGui; qApp->translate("Workbench", "&Materials"); qApp->translate("Workbench", "Element Geometry"); qApp->translate("Workbench", "&Element Geometry"); - qApp->translate("Workbench", "Electrostatic boundary conditions"); - qApp->translate("Workbench", "&Electrostatic boundary conditions"); - qApp->translate("Workbench", "Fluid boundary conditions"); - qApp->translate("Workbench", "&Fluid boundary conditions"); - qApp->translate("Workbench", "Electromagnetic boundary conditions"); - qApp->translate("Workbench", "&Electromagnetic boundary conditions"); - qApp->translate("Workbench", "Geometrical analysis features"); - qApp->translate("Workbench", "&Geometrical analysis features"); - qApp->translate("Workbench", "Mechanical boundary conditions and loads"); - qApp->translate("Workbench", "&Mechanical boundary conditions and loads"); - qApp->translate("Workbench", "Thermal boundary conditions and loads"); - qApp->translate("Workbench", "&Thermal boundary conditions and loads"); - qApp->translate("Workbench", "Analysis features without solver"); - qApp->translate("Workbench", "&Analysis features without solver"); + qApp->translate("Workbench", "Electrostatic Boundary Conditions"); + qApp->translate("Workbench", "&Electrostatic Boundary Conditions"); + qApp->translate("Workbench", "Fluid Boundary Conditions"); + qApp->translate("Workbench", "&Fluid Boundary Conditions"); + qApp->translate("Workbench", "Electromagnetic Boundary Conditions"); + qApp->translate("Workbench", "&Electromagnetic Boundary Conditions"); + qApp->translate("Workbench", "Geometrical Analysis Features"); + qApp->translate("Workbench", "&Geometrical Analysis Features"); + qApp->translate("Workbench", "Mechanical Boundary Conditions and Loads"); + qApp->translate("Workbench", "&Mechanical Boundary Conditions and Loads"); + qApp->translate("Workbench", "Thermal Boundary Conditions and Loads"); + qApp->translate("Workbench", "&Thermal Boundary Conditions and Loads"); + qApp->translate("Workbench", "Analysis Features Without Solver"); + qApp->translate("Workbench", "&Analysis Features Without Solver"); qApp->translate("Workbench", "Overwrite Constants"); qApp->translate("Workbench", "&Overwrite Constants"); // @@ -72,8 +72,8 @@ using namespace FemGui; // qApp->translate("Workbench", "Results"); qApp->translate("Workbench", "&Results"); - qApp->translate("Workbench", "Filter functions"); - qApp->translate("Workbench", "&Filter functions"); + qApp->translate("Workbench", "Filter Functions"); + qApp->translate("Workbench", "&Filter Functions"); // qApp->translate("Workbench", "Utilities"); #endif @@ -114,24 +114,24 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "FEM_ElementFluid1D"; Gui::ToolBarItem* electromag = new Gui::ToolBarItem(root); - electromag->setCommand("Electromagnetic boundary conditions"); + electromag->setCommand("Electromagnetic Boundary Conditions"); *electromag << "FEM_CompEmConstraints"; Gui::ToolBarItem* fluid = new Gui::ToolBarItem(root); - fluid->setCommand("Fluid boundary conditions"); + fluid->setCommand("Fluid Boundary Conditions"); *fluid << "FEM_ConstraintInitialFlowVelocity" << "FEM_ConstraintInitialPressure" << "Separator" << "FEM_ConstraintFlowVelocity"; Gui::ToolBarItem* geom = new Gui::ToolBarItem(root); - geom->setCommand("Geometrical analysis features"); + geom->setCommand("Geometrical Analysis Features"); *geom << "FEM_ConstraintPlaneRotation" << "FEM_ConstraintSectionPrint" << "FEM_ConstraintTransform"; Gui::ToolBarItem* mech = new Gui::ToolBarItem(root); - mech->setCommand("Mechanical boundary conditions and loads"); + mech->setCommand("Mechanical Boundary Conditions and Loads"); *mech << "FEM_ConstraintFixed" << "FEM_ConstraintRigidBody" << "FEM_ConstraintDisplacement" @@ -145,7 +145,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "FEM_ConstraintSelfWeight"; Gui::ToolBarItem* thermal = new Gui::ToolBarItem(root); - thermal->setCommand("Thermal boundary conditions and loads"); + thermal->setCommand("Thermal Boundary Conditions and Loads"); *thermal << "FEM_ConstraintInitialTemperature" << "Separator" << "FEM_ConstraintHeatflux" @@ -251,27 +251,27 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "FEM_ElementFluid1D"; Gui::MenuItem* elec = new Gui::MenuItem; - elec->setCommand("&Electromagnetic boundary conditions"); + elec->setCommand("&Electromagnetic Boundary Conditions"); *elec << "FEM_ConstraintElectrostaticPotential" << "FEM_ConstraintCurrentDensity" << "FEM_ConstraintMagnetization" << "FEM_ConstraintElectricChargeDensity"; Gui::MenuItem* fluid = new Gui::MenuItem; - fluid->setCommand("&Fluid boundary conditions"); + fluid->setCommand("&Fluid Boundary Conditions"); *fluid << "FEM_ConstraintInitialFlowVelocity" << "FEM_ConstraintInitialPressure" << "Separator" << "FEM_ConstraintFlowVelocity"; Gui::MenuItem* geom = new Gui::MenuItem; - geom->setCommand("&Geometrical analysis features"); + geom->setCommand("&Geometrical Analysis Features"); *geom << "FEM_ConstraintPlaneRotation" << "FEM_ConstraintSectionPrint" << "FEM_ConstraintTransform"; Gui::MenuItem* mech = new Gui::MenuItem; - mech->setCommand("&Mechanical boundary conditions and loads"); + mech->setCommand("&Mechanical Boundary Conditions and Loads"); *mech << "FEM_ConstraintFixed" << "FEM_ConstraintRigidBody" << "FEM_ConstraintDisplacement" @@ -285,7 +285,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "FEM_ConstraintSelfWeight"; Gui::MenuItem* thermal = new Gui::MenuItem; - thermal->setCommand("&Thermal boundary conditions and loads"); + thermal->setCommand("&Thermal Boundary Conditions and Loads"); *thermal << "FEM_ConstraintInitialTemperature" << "Separator" << "FEM_ConstraintHeatflux" diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 5d662074be..061561cd26 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -57,7 +57,7 @@ class _Analysis(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_Analysis", "Analysis container") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_Analysis", "New Analysis") self.accel = "S, A" self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_Analysis", "Creates an analysis container with default solver" @@ -92,9 +92,9 @@ class _ClippingPlaneAdd(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ClippingPlaneAdd", "Clipping plane on face") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ClippingPlaneAdd", "Clipping Plane on Face") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ClippingPlaneAdd", "Add a clipping plane on a selected face" + "FEM_ClippingPlaneAdd", "Adds a clipping plane on a selected face" ) self.is_active = "with_document" @@ -147,7 +147,7 @@ class _ClippingPlaneRemoveAll(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ClippingPlaneRemoveAll", "Remove all clipping planes" + "FEM_ClippingPlaneRemoveAll", "Remove all Clipping Planes" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ClippingPlaneRemoveAll", "Removes all clipping planes" @@ -171,11 +171,11 @@ class _ConstantVacuumPermittivity(CommandManager): super().__init__() self.pixmap = "fem-solver-analysis-thermomechanical.svg" self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstantVacuumPermittivity", "Constant vacuum permittivity" + "FEM_ConstantVacuumPermittivity", "Constant Vacuum Permittivity" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstantVacuumPermittivity", - "Creates a FEM constant vacuum permittivity to overwrite standard value", + "Creates a constant vacuum permittivity to overwrite standard value", ) self.is_active = "with_document" self.is_active = "with_analysis" @@ -188,7 +188,7 @@ class _ConstraintBodyHeatSource(CommandManager): def __init__(self): super().__init__() self.pixmap = "FEM_ConstraintBodyHeatSource" - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintBodyHeatSource", "Body heat source") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintBodyHeatSource", "Body Heat Source") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintBodyHeatSource", "Creates a body heat source" ) @@ -201,7 +201,7 @@ class _ConstraintCentrif(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintCentrif", "Centrifugal load") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintCentrif", "Centrifugal Load") self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintCentrif", "Creates a centrifugal load") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -214,7 +214,7 @@ class _ConstraintCurrentDensity(CommandManager): super().__init__() self.pixmap = "FEM_ConstraintCurrentDensity" self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintCurrentDensity", "Current density boundary condition" + "FEM_ConstraintCurrentDensity", "Current Density Boundary Condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintCurrentDensity", @@ -231,10 +231,10 @@ class _ConstraintElectricChargeDensity(CommandManager): super().__init__() self.pixmap = "FEM_ConstraintElectricChargeDensity" self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintElectricChargeDensity", "Electric charge density" + "FEM_ConstraintElectricChargeDensity", "Electric Charge Density" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintElectricChargeDensity", "Creates a electric charge density" + "FEM_ConstraintElectricChargeDensity", "Creates an electric charge density" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -247,7 +247,7 @@ class _ConstraintElectrostaticPotential(CommandManager): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintElectrostaticPotential", - "Electrostatic potential boundary condition", + "Electrostatic Potential Boundary Condition", ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintElectrostaticPotential", @@ -263,7 +263,7 @@ class _ConstraintFlowVelocity(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintFlowVelocity", "Flow velocity boundary condition" + "FEM_ConstraintFlowVelocity", "Flow Velocity Boundary Condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintFlowVelocity", "Creates a flow velocity boundary condition" @@ -278,11 +278,11 @@ class _ConstraintInitialFlowVelocity(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintInitialFlowVelocity", "Initial flow velocity condition" + "FEM_ConstraintInitialFlowVelocity", "Initial Flow Velocity Condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialFlowVelocity", - "Creates initial flow velocity condition", + "Creates an initial flow velocity condition", ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -294,7 +294,7 @@ class _ConstraintInitialPressure(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintInitialPressure", "Initial pressure condition" + "FEM_ConstraintInitialPressure", "Initial Pressure Condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialPressure", "Creates an initial pressure condition" @@ -309,7 +309,7 @@ class _ConstraintMagnetization(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_ConstraintMagnetization", "Magnetization boundary condition" + "FEM_ConstraintMagnetization", "Magnetization Boundary Condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintMagnetization", "Creates a magnetization boundary condition" @@ -323,7 +323,7 @@ class _ConstraintSectionPrint(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintSectionPrint", "Section print feature") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintSectionPrint", "Section Print Feature") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintSectionPrint", "Creates a section print feature" ) @@ -336,7 +336,7 @@ class _ConstraintSelfWeight(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintSelfWeight", "Gravity load") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintSelfWeight", "Gravity Load") self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintSelfWeight", "Creates a gravity load") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_noset_edit" @@ -347,7 +347,7 @@ class _ConstraintTie(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintTie", "Tie constraint") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintTie", "Tie Constraint") self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_ConstraintTie", "Creates a tie constraint") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -358,9 +358,9 @@ class _ElementFluid1D(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementFluid1D", "Fluid section for 1D flow") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementFluid1D", "Fluid Section for 1D Flow") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ElementFluid1D", "Creates a FEM fluid section for 1D flow" + "FEM_ElementFluid1D", "Creates a fluid section for 1D flow" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -371,10 +371,8 @@ class _ElementGeometry1D(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementGeometry1D", "Beam cross section") - self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ElementGeometry1D", "Creates a FEM beam cross section" - ) + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementGeometry1D", "Beam Cross Section") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_ElementGeometry1D", "Creates a beam cross section") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -384,9 +382,9 @@ class _ElementGeometry2D(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementGeometry2D", "Shell plate thickness") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementGeometry2D", "Shell Plate Thickness") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ElementGeometry2D", "Creates a FEM shell plate thickness" + "FEM_ElementGeometry2D", "Creates a shell plate thickness" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -397,8 +395,8 @@ class _ElementRotation1D(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementRotation1D", "Beam rotation") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_ElementRotation1D", "Creates a FEM beam rotation") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ElementRotation1D", "Beam Rotation") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_ElementRotation1D", "Creates a beam rotation") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_noset_edit" @@ -408,10 +406,10 @@ class _EquationDeformation(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationDeformation", "Deformation equation") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationDeformation", "Deformation Equation") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_EquationDeformation", - "Creates a FEM equation for deformation (nonlinear elasticity)", + "Creates an equation for deformation (nonlinear elasticity)", ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -422,9 +420,9 @@ class _EquationElasticity(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationElasticity", "Elasticity equation") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationElasticity", "Elasticity Equation") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_EquationElasticity", "Creates a FEM equation for elasticity (stress)" + "FEM_EquationElasticity", "Creates an equation for elasticity (stress)" ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -435,9 +433,9 @@ class _EquationElectricforce(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationElectricforce", "Electricforce equation") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationElectricforce", "Electricforce Equation") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_EquationElectricforce", "Creates a FEM equation for electric forces" + "FEM_EquationElectricforce", "Creates an equation for electric forces" ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -448,9 +446,9 @@ class _EquationElectrostatic(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationElectrostatic", "Electrostatic equation") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationElectrostatic", "Electrostatic Equation") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_EquationElectrostatic", "Creates a FEM equation for electrostatic" + "FEM_EquationElectrostatic", "Creates an equation for electrostatic" ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -461,8 +459,8 @@ class _EquationFlow(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlow", "Flow equation") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlow", "Creates a FEM equation for flow") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlow", "Flow Equation") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlow", "Creates an equation for flow") self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -472,8 +470,8 @@ class _EquationFlux(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlux", "Flux equation") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlux", "Creates a FEM equation for flux") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlux", "Flux Equation") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_EquationFlux", "Creates an equation for flux") self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -483,8 +481,8 @@ class _EquationHeat(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationHeat", "Heat equation") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_EquationHeat", "Creates a FEM equation for heat") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationHeat", "Heat Equation") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_EquationHeat", "Creates an equation for heat") self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -495,11 +493,11 @@ class _EquationMagnetodynamic(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_EquationMagnetodynamic", "Magnetodynamic equation" + "FEM_EquationMagnetodynamic", "Magnetodynamic Equation" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_EquationMagnetodynamic", - "Creates a FEM equation for magnetodynamic forces", + "Creates an equation for magnetodynamic forces", ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -511,11 +509,11 @@ class _EquationMagnetodynamic2D(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_EquationMagnetodynamic2D", "Magnetodynamic2D equation" + "FEM_EquationMagnetodynamic2D", "Magnetodynamic2D Equation" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_EquationMagnetodynamic2D", - "Creates a FEM equation for 2D magnetodynamic forces", + "Creates an equation for 2D magnetodynamic forces", ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -526,9 +524,9 @@ class _EquationStaticCurrent(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationStaticCurrent", "Static current equation") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_EquationStaticCurrent", "Static Current Equation") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_EquationStaticCurrent", "Creates a FEM equation for static current" + "FEM_EquationStaticCurrent", "Creates an equation for static current" ) self.is_active = "with_solver_elmer" self.do_activated = "add_obj_on_gui_selobj_expand_noset_edit" @@ -540,7 +538,7 @@ class _Examples(CommandManager): def __init__(self): super().__init__() self.pixmap = "FemWorkbench" - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_Examples", "Open FEM examples") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_Examples", "FEM Examples") self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_Examples", "Opens the FEM examples") self.is_active = "always" @@ -555,7 +553,7 @@ class _MaterialEditor(CommandManager): def __init__(self): super().__init__() self.pixmap = "Arch_Material_Group" - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MaterialEditor", "Material editor") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MaterialEditor", "Material Editor") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MaterialEditor", "Opens the FreeCAD material editor" ) @@ -571,8 +569,8 @@ class _MaterialFluid(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "Material for fluid") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "Creates a FEM material for fluid") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "Fluid Material") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "Creates a fluid material") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -583,10 +581,10 @@ class _MaterialMechanicalNonlinear(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_MaterialMechanicalNonlinear", "Nonlinear mechanical material" + "FEM_MaterialMechanicalNonlinear", "Non-Linear Mechanical Material" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_MaterialMechanicalNonlinear", "Creates a nonlinear mechanical material" + "FEM_MaterialMechanicalNonlinear", "Creates a non-linear mechanical material" ) self.is_active = "with_material_solid" @@ -650,7 +648,7 @@ class _MaterialReinforced(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_MaterialReinforced", "Reinforced material (concrete)" + "FEM_MaterialReinforced", "Reinforced Material (Concrete)" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MaterialReinforced", @@ -665,9 +663,9 @@ class _MaterialSolid(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MaterialSolid", "Material for solid") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MaterialSolid", "Solid Material") self.accel = "M, S" - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MaterialSolid", "Creates a FEM material for solid") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MaterialSolid", "Creates a solid material") self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -677,7 +675,7 @@ class _FEMMesh2Mesh(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_FEMMesh2Mesh", "FEM mesh to mesh") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_FEMMesh2Mesh", "FEM Mesh to Mesh") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_FEMMesh2Mesh", "Converts the surface of a FEM mesh to a mesh" ) @@ -719,9 +717,9 @@ class _MeshBoundaryLayer(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshBoundaryLayer", "FEM mesh boundary layer") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshBoundaryLayer", "Mesh Boundary Layer") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_MeshBoundaryLayer", "Creates a FEM mesh boundary layer" + "FEM_MeshBoundaryLayer", "Creates a mesh boundary layer" ) self.is_active = "with_gmsh_femmesh" self.do_activated = "add_obj_on_gui_selobj_set_edit" @@ -732,8 +730,8 @@ class _MeshClear(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM mesh") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the Mesh of a FEM mesh object") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the mesh of a FEM mesh object") self.is_active = "with_femmesh" def Activated(self): @@ -752,7 +750,7 @@ class _MeshDisplayInfo(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshDisplayInfo", "Display FEM mesh info") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshDisplayInfo", "Display Mesh Info") self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshDisplayInfo", "Displays FEM mesh information") self.is_active = "with_femmesh" @@ -776,7 +774,7 @@ class _MeshGmshFromShape(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshGmshFromShape", "FEM mesh from shape by Gmsh") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshGmshFromShape", "Mesh From Shape by Gmsh") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MeshGmshFromShape", "Creates a FEM mesh from a shape by Gmsh mesher" ) @@ -826,8 +824,8 @@ class _MeshGroup(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshGroup", "FEM mesh group") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshGroup", "Creates a FEM mesh group") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshGroup", "Mesh Group") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshGroup", "Creates a mesh group") self.is_active = "with_gmsh_femmesh" self.do_activated = "add_obj_on_gui_selobj_set_edit" @@ -837,9 +835,7 @@ class _MeshNetgenFromShape(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP( - "FEM_MeshNetgenFromShape", "FEM mesh from shape by Netgen" - ) + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshNetgenFromShape", "Mesh From Shape by Netgen") self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MeshNetgenFromShape", "Creates a FEM mesh from a solid or face shape by Netgen internal mesher", @@ -893,7 +889,7 @@ class _MeshRegion(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshRegion", "FEM mesh refinement") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshRegion", "Mesh Refinement") self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshRegion", "Creates a FEM mesh refinement") self.is_active = "with_femmesh" self.do_activated = "add_obj_on_gui_selobj_set_edit" @@ -904,10 +900,10 @@ class _ResultShow(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ResultShow", "Show result") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ResultShow", "Show Result") self.accel = "R, S" self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ResultShow", "Shows and visualizes selected result data" + "FEM_ResultShow", "Shows and visualizes the selected result data" ) self.is_active = "with_selresult" @@ -920,10 +916,10 @@ class _ResultsPurge(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ResultsPurge", "Purge results") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_ResultsPurge", "Purge Results") self.accel = "R, P" self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_ResultsPurge", "Purges all results from active analysis" + "FEM_ResultsPurge", "Purges all results from the active analysis" ) self.is_active = "with_analysis" @@ -1091,7 +1087,7 @@ class _SolverControl(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_SolverControl", "Solver job control") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_SolverControl", "Solver Job Control") self.accel = "S, T" self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_SolverControl", @@ -1159,7 +1155,7 @@ class _SolverRun(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_SolverRun", "Run solver calculations") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_SolverRun", "Run Solver") self.accel = "S, R" self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_SolverRun", "Runs the calculations for the selected solver" @@ -1222,11 +1218,11 @@ class _PostFilterGlyph(CommandManager): def __init__(self): super().__init__() - self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_PostFilterGlyph", "Glyph filter") + self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_PostFilterGlyph", "Glyph Filter") self.accel = "F, G" self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_PostFilterGlyph", - "Post processing filter that adds glyphs to the mesh vertices for vertex data visualization", + "Adds a post-processing filter that adds glyphs to the mesh vertices for vertex data visualization", ) self.is_active = "with_vtk_selresult" self.do_activated = "add_filter_set_edit" diff --git a/src/Mod/Fem/femguiutils/data_extraction.py b/src/Mod/Fem/femguiutils/data_extraction.py index dfe0cea7f8..7ff7bee9b2 100644 --- a/src/Mod/Fem/femguiutils/data_extraction.py +++ b/src/Mod/Fem/femguiutils/data_extraction.py @@ -105,7 +105,7 @@ class DataExtraction(_BasePostTaskPanel): def showSummary(self): dialog = QtGui.QDialog(self.widget) - dialog.setWindowTitle(f"Data summary of {self.Object.Label}") + dialog.setWindowTitle(f"Data Summary of {self.Object.Label}") widget = vtk_table_view.VtkTableView(self.summary_model) layout = QtGui.QVBoxLayout() layout.addWidget(widget) diff --git a/src/Mod/Fem/femguiutils/disambiguate_solid_selection.py b/src/Mod/Fem/femguiutils/disambiguate_solid_selection.py index 543885350f..c74fd82d75 100644 --- a/src/Mod/Fem/femguiutils/disambiguate_solid_selection.py +++ b/src/Mod/Fem/femguiutils/disambiguate_solid_selection.py @@ -142,9 +142,7 @@ def disambiguate_solid_selection( # Build menu menu_of_solids = QtGui.QMenu() - label = menu_of_solids.addAction( - "Selected entity belongs to multiple solids, please pick one ..." - ) + label = menu_of_solids.addAction("Selected entity belongs to multiple solids, pick one…") label.setDisabled(True) for index in solid_indices: diff --git a/src/Mod/Fem/femguiutils/extract_link_view.py b/src/Mod/Fem/femguiutils/extract_link_view.py index eec8ba6927..c5fcef014f 100644 --- a/src/Mod/Fem/femguiutils/extract_link_view.py +++ b/src/Mod/Fem/femguiutils/extract_link_view.py @@ -207,7 +207,7 @@ class _ElideToolButton(QtGui.QToolButton): # we add the margin between icon and text txt_size -= margin - txt_min = fm.boundingRect("...").width() + txt_min = fm.boundingRect("…").width() # should we center the icon? xpos = margin diff --git a/src/Mod/Fem/femguiutils/selection_widgets.py b/src/Mod/Fem/femguiutils/selection_widgets.py index 1c8df15e34..908a8932b1 100644 --- a/src/Mod/Fem/femguiutils/selection_widgets.py +++ b/src/Mod/Fem/femguiutils/selection_widgets.py @@ -292,7 +292,7 @@ class GeometryElementsSelection(QtGui.QWidget): def initUI(self): # ArchPanel is coded without ui-file too # title - self.setWindowTitle(self.tr("Geometry reference selector")) + self.setWindowTitle(self.tr("Geometry Reference Selector")) # button self.pushButton_Add = QtGui.QPushButton(self.tr("Add")) self.pushButton_Remove = QtGui.QPushButton(self.tr("Remove")) @@ -433,8 +433,8 @@ class GeometryElementsSelection(QtGui.QWidget): def references_list_right_clicked(self, QPos): self.contextMenu = QtGui.QMenu() - menu_item_remove_selected = self.contextMenu.addAction("Remove selected geometry") - menu_item_remove_all = self.contextMenu.addAction("Clear list") + menu_item_remove_selected = self.contextMenu.addAction("Remove Selected Geometry") + menu_item_remove_all = self.contextMenu.addAction("Clear List") if not self.references: menu_item_remove_selected.setDisabled(True) menu_item_remove_all.setDisabled(True) diff --git a/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py b/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py index bf7def12ab..5c158b5e6e 100644 --- a/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py +++ b/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py @@ -86,7 +86,7 @@ class _TaskPanel(base_femtaskpanel._BaseTaskPanel): msgBox.setText( f"Constraint Centrif requires exactly one line\n\nfound references: {items}" ) - msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Axis selection") + msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Axis Selection") retryButton = msgBox.addButton(QtGui.QMessageBox.Retry) ignoreButton = msgBox.addButton(QtGui.QMessageBox.Ignore) msgBox.exec_() @@ -110,7 +110,7 @@ class _TaskPanel(base_femtaskpanel._BaseTaskPanel): msgBox = QtGui.QMessageBox() msgBox.setIcon(QtGui.QMessageBox.Question) msgBox.setText("Constraint Centrif requires at least one solid") - msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Body selection") + msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Body Selection") retryButton = msgBox.addButton(QtGui.QMessageBox.Retry) ignoreButton = msgBox.addButton(QtGui.QMessageBox.Ignore) msgBox.exec_() @@ -126,7 +126,7 @@ class _TaskPanel(base_femtaskpanel._BaseTaskPanel): msgBox = QtGui.QMessageBox() msgBox.setIcon(QtGui.QMessageBox.Question) msgBox.setText("Rotational speed is zero") - msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Rotational speed setting") + msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Rotational Speed Setting") retryButton = msgBox.addButton(QtGui.QMessageBox.Retry) ignoreButton = msgBox.addButton(QtGui.QMessageBox.Ignore) msgBox.exec_() diff --git a/src/Mod/Fem/femtaskpanels/task_post_extractor.py b/src/Mod/Fem/femtaskpanels/task_post_extractor.py index 9c54352f10..0fb683dcb2 100644 --- a/src/Mod/Fem/femtaskpanels/task_post_extractor.py +++ b/src/Mod/Fem/femtaskpanels/task_post_extractor.py @@ -45,10 +45,10 @@ class _ExtractorTaskPanel(base_fempostpanel._BasePostTaskPanel): # form is used to display individual task panels app = obj.ViewObject.Proxy.get_app_edit_widget(self) - app.setWindowTitle("Data extraction") + app.setWindowTitle("Data Extraction") app.setWindowIcon(obj.ViewObject.Icon) view = obj.ViewObject.Proxy.get_view_edit_widget(self) - view.setWindowTitle("Visualization settings") + view.setWindowTitle("Visualization Settings") view.setWindowIcon(obj.ViewObject.Icon) self.form = [app, view] diff --git a/src/Mod/Fem/femtaskpanels/task_post_histogram.py b/src/Mod/Fem/femtaskpanels/task_post_histogram.py index df70e2f18d..0cc7a820bf 100644 --- a/src/Mod/Fem/femtaskpanels/task_post_histogram.py +++ b/src/Mod/Fem/femtaskpanels/task_post_histogram.py @@ -53,10 +53,10 @@ class _TaskPanel(base_fempostpanel._BasePostTaskPanel): self.data_widget = QtGui.QWidget() hbox = QtGui.QHBoxLayout() self.data_widget.show_plot = QtGui.QPushButton() - self.data_widget.show_plot.setText(translate("FEM", "Show plot")) + self.data_widget.show_plot.setText(translate("FEM", "Show Plot")) hbox.addWidget(self.data_widget.show_plot) self.data_widget.show_table = QtGui.QPushButton() - self.data_widget.show_table.setText(translate("FEM", "Show data")) + self.data_widget.show_table.setText(translate("FEM", "Show Data")) hbox.addWidget(self.data_widget.show_table) vbox = QtGui.QVBoxLayout() vbox.addItem(hbox) @@ -66,14 +66,14 @@ class _TaskPanel(base_fempostpanel._BasePostTaskPanel): vbox.addWidget(extracts) self.data_widget.setLayout(vbox) - self.data_widget.setWindowTitle(translate("FEM", "Histogram data")) + self.data_widget.setWindowTitle(translate("FEM", "Histogram Data")) self.data_widget.setWindowIcon(FreeCADGui.getIcon(":/icons/FEM_PostHistogram.svg")) # histogram parameter widget self.view_widget = FreeCADGui.PySideUic.loadUi( FreeCAD.getHomePath() + "Mod/Fem/Resources/ui/TaskPostHistogram.ui" ) - self.view_widget.setWindowTitle(translate("FEM", "Histogram view settings")) + self.view_widget.setWindowTitle(translate("FEM", "Histogram View Settings")) self.view_widget.setWindowIcon(FreeCADGui.getIcon(":/icons/FEM_PostHistogram.svg")) self.__init_widgets() diff --git a/src/Mod/Fem/femtaskpanels/task_post_lineplot.py b/src/Mod/Fem/femtaskpanels/task_post_lineplot.py index f5598e1874..3857b15add 100644 --- a/src/Mod/Fem/femtaskpanels/task_post_lineplot.py +++ b/src/Mod/Fem/femtaskpanels/task_post_lineplot.py @@ -53,10 +53,10 @@ class _TaskPanel(base_fempostpanel._BasePostTaskPanel): self.data_widget = QtGui.QWidget() hbox = QtGui.QHBoxLayout() self.data_widget.show_plot = QtGui.QPushButton() - self.data_widget.show_plot.setText(translate("FEM", "Show plot")) + self.data_widget.show_plot.setText(translate("FEM", "Show Plot")) hbox.addWidget(self.data_widget.show_plot) self.data_widget.show_table = QtGui.QPushButton() - self.data_widget.show_table.setText(translate("FEM", "Show data")) + self.data_widget.show_table.setText(translate("FEM", "Show Data")) hbox.addWidget(self.data_widget.show_table) vbox = QtGui.QVBoxLayout() vbox.addItem(hbox) @@ -66,14 +66,14 @@ class _TaskPanel(base_fempostpanel._BasePostTaskPanel): vbox.addWidget(extracts) self.data_widget.setLayout(vbox) - self.data_widget.setWindowTitle(translate("FEM", "Lineplot data")) + self.data_widget.setWindowTitle(translate("FEM", "Lineplot Data")) self.data_widget.setWindowIcon(FreeCADGui.getIcon(":/icons/FEM_PostLineplot.svg")) # lineplot parameter widget self.view_widget = FreeCADGui.PySideUic.loadUi( FreeCAD.getHomePath() + "Mod/Fem/Resources/ui/TaskPostLineplot.ui" ) - self.view_widget.setWindowTitle(translate("FEM", "Lineplot view settings")) + self.view_widget.setWindowTitle(translate("FEM", "Lineplot View Settings")) self.view_widget.setWindowIcon(FreeCADGui.getIcon(":/icons/FEM_PostLineplot.svg")) self.__init_widgets() diff --git a/src/Mod/Fem/femtaskpanels/task_post_table.py b/src/Mod/Fem/femtaskpanels/task_post_table.py index 98fd1686d6..0125431d9f 100644 --- a/src/Mod/Fem/femtaskpanels/task_post_table.py +++ b/src/Mod/Fem/femtaskpanels/task_post_table.py @@ -51,7 +51,7 @@ class _TaskPanel(base_fempostpanel._BasePostTaskPanel): # data widget self.data_widget = QtGui.QWidget() self.data_widget.show_table = QtGui.QPushButton() - self.data_widget.show_table.setText(translate("FEM", "Show table")) + self.data_widget.show_table.setText(translate("FEM", "Show Table")) vbox = QtGui.QVBoxLayout() vbox.addWidget(self.data_widget.show_table) @@ -61,7 +61,7 @@ class _TaskPanel(base_fempostpanel._BasePostTaskPanel): vbox.addWidget(extracts) self.data_widget.setLayout(vbox) - self.data_widget.setWindowTitle(translate("FEM", "Table data")) + self.data_widget.setWindowTitle(translate("FEM", "Table Data")) self.data_widget.setWindowIcon(FreeCADGui.getIcon(":/icons/FEM_PostSpreadsheet.svg")) self.__init_widgets() From 45bcd8ce6ee84d0ee6f840b37ba38ba265c4855e Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:25:55 +0200 Subject: [PATCH 116/141] Update src/Mod/Fem/App/AppFem.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/App/AppFem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index fcbdca4d3e..5062d958fa 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -87,7 +87,7 @@ PyMOD_INIT_FUNC(Fem) PyMOD_Return(nullptr); } PyObject* femModule = Fem::initModule(); - Base::Console().log("Loading Fem module… done\n"); + Base::Console().log("Loading FEM module… done\n"); // clang-format off Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule); From 2c53040755395da6bad3b8674a0d7fd29bb7cb8f Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:26:06 +0200 Subject: [PATCH 117/141] Update src/Mod/Fem/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 6b496c6dcf..66a417755e 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -724,7 +724,7 @@ CmdFemConstraintInitialTemperature::CmdFemConstraintInitialTemperature() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Initial Iemperature"); + sMenuText = QT_TR_NOOP("Initial Temperature"); sToolTipText = QT_TR_NOOP("Creates an initial temperature acting on a body"); sWhatsThis = "FEM_ConstraintInitialTemperature"; sStatusTip = sToolTipText; From de4763d1f7ec0afb65c3df2b1ad056f917e7ad6e Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:26:36 +0200 Subject: [PATCH 118/141] Update src/Mod/Fem/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 66a417755e..4199911b64 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -2225,7 +2225,7 @@ void CmdFemPostLinearizedStressesFilter::activated(int) Gui::getMainWindow(), qApp->translate("CmdFemPostLinearizedStressesFilter", "Wrong selection"), qApp->translate("CmdFemPostLinearizedStressesFilter", - "Select a Clip filter which clips a STRESS field along a line.")); + "Select a clip filter which clips a stress field along a line.")); } } From 373b94ea1292ce4eaa99e52112e4e115144c25b3 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:26:47 +0200 Subject: [PATCH 119/141] Update src/Mod/Fem/Gui/DlgSettingsFemCcx.ui Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/Gui/DlgSettingsFemCcx.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui b/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui index 6f16628be2..6f6cfbee7d 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcx.ui @@ -721,7 +721,7 @@ Only takes effect if 'Pipeline only' is enabled - Thermo Mechanical Defaults + Thermo-Mechanical Defaults From 690fef734cb078663fb4c92cedb6a97fba008f08 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:28:21 +0200 Subject: [PATCH 120/141] Update src/Mod/Fem/femcommands/commands.py Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/femcommands/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 061561cd26..6b994672e2 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -731,7 +731,7 @@ class _MeshClear(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the mesh of a FEM mesh object") + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the mesh of an FEM mesh object") self.is_active = "with_femmesh" def Activated(self): From 8e69f876af312880993fc0275de7259564a7c14e Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:28:30 +0200 Subject: [PATCH 121/141] Update src/Mod/Fem/femtaskpanels/task_constraint_centrif.py Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/femtaskpanels/task_constraint_centrif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py b/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py index 5c158b5e6e..171ec33986 100644 --- a/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py +++ b/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py @@ -110,7 +110,7 @@ class _TaskPanel(base_femtaskpanel._BaseTaskPanel): msgBox = QtGui.QMessageBox() msgBox.setIcon(QtGui.QMessageBox.Question) msgBox.setText("Constraint Centrif requires at least one solid") - msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Body Selection") + msgBox.setWindowTitle("FEM Constraint Centrifuge - Body Selection") retryButton = msgBox.addButton(QtGui.QMessageBox.Retry) ignoreButton = msgBox.addButton(QtGui.QMessageBox.Ignore) msgBox.exec_() From 3d154e64c7c832143fbfdffcd3799b1b6830e7c6 Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:28:36 +0200 Subject: [PATCH 122/141] Update src/Mod/Fem/femtaskpanels/task_constraint_centrif.py Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Fem/femtaskpanels/task_constraint_centrif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py b/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py index 171ec33986..80104762fa 100644 --- a/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py +++ b/src/Mod/Fem/femtaskpanels/task_constraint_centrif.py @@ -126,7 +126,7 @@ class _TaskPanel(base_femtaskpanel._BaseTaskPanel): msgBox = QtGui.QMessageBox() msgBox.setIcon(QtGui.QMessageBox.Question) msgBox.setText("Rotational speed is zero") - msgBox.setWindowTitle("FreeCAD FEM Constraint Centrif - Rotational Speed Setting") + msgBox.setWindowTitle("FEM Constraint Centrifuge - Rotational Speed Setting") retryButton = msgBox.addButton(QtGui.QMessageBox.Retry) ignoreButton = msgBox.addButton(QtGui.QMessageBox.Ignore) msgBox.exec_() From b6e51d6b69bed8f4e970c8802427c7894cf1e2fa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 07:33:11 +0000 Subject: [PATCH 123/141] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/Mod/Fem/femcommands/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 6b994672e2..c8341d589f 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -731,7 +731,9 @@ class _MeshClear(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh") - self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the mesh of an FEM mesh object") + self.tooltip = Qt.QT_TRANSLATE_NOOP( + "FEM_MeshClear", "Clears the mesh of an FEM mesh object" + ) self.is_active = "with_femmesh" def Activated(self): From 6f18b152ed0b4a786d9f0840250e8e960d4f84fc Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 21 May 2025 00:06:37 +0200 Subject: [PATCH 124/141] Remove unused deprecated functions Remove unused deprecated functions --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 186 ------------------ src/Mod/PartDesign/App/FeatureSketchBased.h | 9 - 2 files changed, 195 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 709ae3ba99..761519429b 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -290,19 +290,6 @@ TopoShape ProfileBased::getTopoShapeVerifiedFace(bool silent, throw Base::CADKernelError("Cannot make face from profile"); } - // Toponaming April 2024: This appears to be new feature, not TNP: -// if (doFit && (std::abs(Fit.getValue()) > Precision::Confusion() -// || std::abs(InnerFit.getValue()) > Precision::Confusion())) { -// -// if (!shape.isNull()) -// shape = shape.makeElementOffsetFace(Fit.getValue(), -// InnerFit.getValue(), -// static_cast(FitJoin.getValue()), -// static_cast(InnerFitJoin.getValue())); -// if (!openshape.isNull()) -// openshape.makeElementOffset2D(Fit.getValue()); -// } - if (!openshape.isNull()) { if (shape.isNull()) { shape = openshape; @@ -781,99 +768,6 @@ void ProfileBased::getFaceFromLinkSub(TopoDS_Face& upToFace, const App::Property throw Base::ValueError("SketchBased: Failed to extract face"); } -// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible. -void ProfileBased::getUpToFace(TopoDS_Face& upToFace, - const TopoDS_Shape& support, - const TopoDS_Shape& sketchshape, - const std::string& method, - const gp_Dir& dir) -{ - - if ((method == "UpToLast") || (method == "UpToFirst")) { - // Check for valid support object - if (support.IsNull()) - throw Base::ValueError("SketchBased: Up to face: No support in Sketch and no base feature!"); - - std::vector cfaces = Part::findAllFacesCutBy(support, sketchshape, dir); - if (cfaces.empty()) - throw Base::ValueError("SketchBased: No faces found in this direction"); - - // Find nearest/furthest face - std::vector::const_iterator it, it_near, it_far; - it_near = it_far = cfaces.begin(); - for (it = cfaces.begin(); it != cfaces.end(); it++) - if (it->distsq > it_far->distsq) - it_far = it; - else if (it->distsq < it_near->distsq) - it_near = it; - upToFace = (method == "UpToLast" ? it_far->face : it_near->face); - } - - // Check whether the face has limits or not. Unlimited faces have no wire - // Note: Datum planes are always unlimited - TopExp_Explorer Ex(upToFace, TopAbs_WIRE); - if (Ex.More()) { - // Remove the limits of the upToFace so that the extrusion works even if sketchshape is larger - // than the upToFace - bool remove_limits = false; - for (Ex.Init(sketchshape, TopAbs_FACE); Ex.More(); Ex.Next()) { - // Get outermost wire of sketch face - TopoDS_Face sketchface = TopoDS::Face(Ex.Current()); - TopoDS_Wire outerWire = ShapeAnalysis::OuterWire(sketchface); - if (!checkWireInsideFace(outerWire, upToFace, dir)) { - remove_limits = true; - break; - } - } - - // It must also be checked that all projected inner wires of the upToFace - // lie outside the sketch shape. If this is not the case then the sketch - // shape is not completely covered by the upToFace. See #0003141 - if (!remove_limits) { - TopoDS_Wire outerWire = ShapeAnalysis::OuterWire(upToFace); - for (Ex.Init(upToFace, TopAbs_WIRE); Ex.More(); Ex.Next()) { - if (!outerWire.IsSame(Ex.Current())) { - BRepProj_Projection proj(TopoDS::Wire(Ex.Current()), sketchshape, -dir); - if (proj.More()) { - remove_limits = true; - break; - } - } - } - } - - if (remove_limits) { - // Note: Using an unlimited face every time gives unnecessary failures for concave faces - TopLoc_Location loc = upToFace.Location(); - BRepAdaptor_Surface adapt(upToFace, Standard_False); - // use the placement of the adapter, not of the upToFace - loc = TopLoc_Location(adapt.Trsf()); - BRepBuilderAPI_MakeFace mkFace(adapt.Surface().Surface(), Precision::Confusion()); - if (!mkFace.IsDone()) - throw Base::ValueError("SketchBased: Up To Face: Failed to create unlimited face"); - upToFace = TopoDS::Face(mkFace.Shape()); - upToFace.Location(loc); - } - } - - // Check that the upToFace is either not parallel to the extrusion direction - // and that upToFace is not too near - if (upToFace.IsNull()) - throw Base::ValueError("SketchBased: The UpTo-Face is null!"); - BRepAdaptor_Surface upToFaceSurface(TopoDS::Face(upToFace)); - BRepExtrema_DistShapeShape distSS(sketchshape, upToFace); - if (upToFaceSurface.GetType() == GeomAbs_Plane) { - // Check that the upToFace is not parallel to the extrusion direction - if (dir.IsNormal(upToFaceSurface.Plane().Axis().Direction(), Precision::Confusion())) - throw Base::ValueError( - "SketchBased: The UpTo-Face must not be parallel to the extrusion direction!"); - - // Check the distance if the upToFace is normal to the extrusion direction - if (dir.IsParallel(upToFaceSurface.Plane().Axis().Direction(), Precision::Confusion())) - if (distSS.Value() < Precision::Confusion()) - throw Base::ValueError("SketchBased: The UpTo-Face is too close to the sketch"); - } -} void ProfileBased::getUpToFace(TopoShape& upToFace, const TopoShape& support, @@ -932,31 +826,6 @@ void ProfileBased::getUpToFace(TopoShape& upToFace, } } -// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible. -void ProfileBased::addOffsetToFace(TopoDS_Face& upToFace, const gp_Dir& dir, double offset) -{ - // Move the face in the extrusion direction - // TODO: For non-planar faces, we could consider offsetting the surface - if (fabs(offset) > Precision::Confusion()) { - BRepAdaptor_Surface upToFaceSurface(TopoDS::Face(upToFace)); - if (upToFaceSurface.GetType() == GeomAbs_Plane) { - gp_Trsf mov; - mov.SetTranslation(offset * gp_Vec(dir)); - TopLoc_Location loc(mov); - upToFace.Move(loc); - - // When using the face with BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) - // then the algorithm expects that the 'NaturalRestriction' flag is set in order - // to work as expected (see generatePrism()) - BRep_Builder builder; - builder.NaturalRestriction(upToFace, Standard_True); - } - else { - throw Base::TypeError("SketchBased: Up to Face: Offset not supported yet for non-planar faces"); - } - } -} - void ProfileBased::addOffsetToFace(TopoShape& upToFace, const gp_Dir& dir, double offset) { // Move the face in the extrusion direction @@ -1001,7 +870,6 @@ bool ProfileBased::checkWireInsideFace(const TopoDS_Wire& wire, const TopoDS_Fac bool ProfileBased::checkLineCrossesFace(const gp_Lin& line, const TopoDS_Face& face) { -#if 1 BRepBuilderAPI_MakeEdge mkEdge(line); TopoDS_Wire wire = ShapeAnalysis::OuterWire(face); BRepExtrema_DistShapeShape distss(wire, mkEdge.Shape(), Precision::Confusion()); @@ -1089,60 +957,6 @@ bool ProfileBased::checkLineCrossesFace(const gp_Lin& line, const TopoDS_Face& f } return false; -#else - // This is not as easy as it looks, because a distance of zero might be OK if - // the axis touches the sketchshape in a linear edge or a vertex - // Note: This algorithm doesn't catch cases where the sketchshape touches the - // axis in two or more points - // Note: And it only works on closed outer wires - TopoDS_Wire outerWire = ShapeAnalysis::OuterWire(face); - BRepBuilderAPI_MakeEdge mkEdge(line); - if (!mkEdge.IsDone()) - throw Base::RuntimeError("Revolve: Unexpected OCE failure"); - BRepAdaptor_Curve axis(TopoDS::Edge(mkEdge.Shape())); - - TopExp_Explorer ex; - int intersections = 0; - std::vector intersectionpoints; - - // Note: We need to look at every edge separately to catch coincident lines - for (ex.Init(outerWire, TopAbs_EDGE); ex.More(); ex.Next()) { - BRepAdaptor_Curve edge(TopoDS::Edge(ex.Current())); - Extrema_ExtCC intersector(axis, edge); - - if (intersector.IsDone()) { - for (int i = 1; i <= intersector.NbExt(); i++) { - - if (intersector.SquareDistance(i) < Precision::Confusion()) { - if (intersector.IsParallel()) { - // A line that is coincident with the axis produces three intersections - // 1 with the line itself and 2 with the adjacent edges - intersections -= 2; - } - else { - Extrema_POnCurv p1, p2; - intersector.Points(i, p1, p2); - intersectionpoints.push_back(p1.Value()); - intersections++; - } - } - } - } - } - - // Note: We might check this inside the loop but then we have to rely on TopExp_Explorer - // returning the wire's edges in adjacent order (because of the coincident line checking) - if (intersections > 1) { - // Check that we don't touch the sketchface just in two identical vertices - if ((intersectionpoints.size() == 2) && - (intersectionpoints[0].IsEqual(intersectionpoints[1], Precision::Confusion()))) - return false; - else - return true; - } - - return false; -#endif } void ProfileBased::remapSupportShape(const TopoDS_Shape & newShape) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h index 8d71e1c1b8..dfa73cb87b 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.h +++ b/src/Mod/PartDesign/App/FeatureSketchBased.h @@ -158,15 +158,6 @@ protected: /// Extract a face from a given LinkSub static void getFaceFromLinkSub(TopoDS_Face& upToFace, const App::PropertyLinkSub& refFace); - /// Find a valid face to extrude up to - static void getUpToFace(TopoDS_Face& upToFace, - const TopoDS_Shape& support, - const TopoDS_Shape& sketchshape, - const std::string& method, - const gp_Dir& dir); - - /// Add an offset to the face - static void addOffsetToFace(TopoDS_Face& upToFace, const gp_Dir& dir, double offset); /// Extract a face from a given LinkSub static void getUpToFaceFromLinkSub(TopoShape& upToFace, const App::PropertyLinkSub& refFace); From 0f5d0207cddce3712527f1bc352db6a63ad00edb Mon Sep 17 00:00:00 2001 From: Luz Paz Date: Tue, 24 Jun 2025 08:46:01 -0400 Subject: [PATCH 125/141] codespell: add 3 false positives to ignore list Added `InvertIn, LeadIn, linez` ref: https://github.com/FreeCAD/FreeCAD/pull/22137/files --- .github/codespellignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/codespellignore b/.github/codespellignore index 85641cfdea..46cc2a5d0d 100644 --- a/.github/codespellignore +++ b/.github/codespellignore @@ -33,9 +33,12 @@ froms hist indicies inout +invertin isnt ist itsel +leadin +linez lod mantatory mata From dd5cb6aa6107a83f41fbc453b87d6a526b216cce Mon Sep 17 00:00:00 2001 From: Ryan K <114723629+ryankembrey@users.noreply.github.com> Date: Tue, 1 Jul 2025 02:04:12 +1000 Subject: [PATCH 126/141] TechDraw: ActiveView rework (#22107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * TechDraw: Rework ActiveView * Update src/Mod/TechDraw/Gui/TaskActiveView.cpp Co-authored-by: Benjamin Bræstrup Sayoc --------- Co-authored-by: Ryan Kembrey Co-authored-by: Benjamin Bræstrup Sayoc --- src/Mod/TechDraw/Gui/Command.cpp | 5 +- src/Mod/TechDraw/Gui/TaskActiveView.cpp | 312 +++++++++++------------- src/Mod/TechDraw/Gui/TaskActiveView.h | 4 +- 3 files changed, 153 insertions(+), 168 deletions(-) diff --git a/src/Mod/TechDraw/Gui/Command.cpp b/src/Mod/TechDraw/Gui/Command.cpp index 507df68de5..23dc276c78 100644 --- a/src/Mod/TechDraw/Gui/Command.cpp +++ b/src/Mod/TechDraw/Gui/Command.cpp @@ -693,8 +693,9 @@ CmdTechDrawActiveView::CmdTechDrawActiveView() : Command("TechDraw_ActiveView") { sAppModule = "TechDraw"; sGroup = QT_TR_NOOP("TechDraw"); - sMenuText = QT_TR_NOOP("Insert Active View (3D View)"); - sToolTipText = sMenuText; + sMenuText = QT_TR_NOOP("Insert Active View"); + sToolTipText = "Insert an image of the active 3D model in current page.\n" + "If multiple 3D models are active, a selection dialog will be shown."; sWhatsThis = "TechDraw_ActiveView"; sStatusTip = sToolTipText; sPixmap = "actions/TechDraw_ActiveView"; diff --git a/src/Mod/TechDraw/Gui/TaskActiveView.cpp b/src/Mod/TechDraw/Gui/TaskActiveView.cpp index 99790fa7a7..a6b0742c6e 100644 --- a/src/Mod/TechDraw/Gui/TaskActiveView.cpp +++ b/src/Mod/TechDraw/Gui/TaskActiveView.cpp @@ -29,6 +29,7 @@ #endif // #ifndef _PreComp_ #include +#include #include #include #include @@ -56,10 +57,10 @@ using DU = DrawUtil; constexpr int SXGAWidth{1280}; constexpr int SXGAHeight{1024}; -//ctor for creation +// ctor for creation TaskActiveView::TaskActiveView(TechDraw::DrawPage* pageFeat) - : ui(new Ui_TaskActiveView), m_pageFeat(pageFeat), m_imageFeat(nullptr), m_btnOK(nullptr), - m_btnCancel(nullptr) + : ui(new Ui_TaskActiveView), m_pageFeat(pageFeat), m_imageFeat(nullptr), + m_previewImageFeat(nullptr), m_btnOK(nullptr), m_btnCancel(nullptr) { ui->setupUi(this); @@ -68,117 +69,88 @@ TaskActiveView::TaskActiveView(TechDraw::DrawPage* pageFeat) setUiPrimary(); connect(ui->cbCrop, &QCheckBox::clicked, this, &TaskActiveView::onCropChanged); + + // For live preview + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create ActiveView")); + + m_previewImageFeat = createActiveView(); + if (!m_previewImageFeat) { + Gui::Command::abortCommand(); + this->setEnabled(false); + return; + } + + connect(ui->qsbWidth, &Gui::QuantitySpinBox::editingFinished, this, &TaskActiveView::updatePreview); + connect(ui->qsbHeight, &Gui::QuantitySpinBox::editingFinished, this, &TaskActiveView::updatePreview); + connect(ui->cbUse3d, &QCheckBox::clicked, this, &TaskActiveView::updatePreview); + connect(ui->cbNoBG, &QCheckBox::clicked, this, &TaskActiveView::updatePreview); + connect(ui->ccBgColor, &QPushButton::clicked, this, &TaskActiveView::updatePreview); + connect(ui->cbCrop, &QCheckBox::clicked, this, &TaskActiveView::updatePreview); + + updatePreview(); } -TaskActiveView::~TaskActiveView() {} - -void TaskActiveView::updateTask() +TaskActiveView::~TaskActiveView() { - // blockUpdate = true; - - // blockUpdate = false; -} - -void TaskActiveView::changeEvent(QEvent* e) -{ - if (e->type() == QEvent::LanguageChange) { - ui->retranslateUi(this); + if (m_previewImageFeat) { + Gui::Command::abortCommand(); } } -void TaskActiveView::setUiPrimary() +bool TaskActiveView::accept() { - // Base::Console().message("TAV::setUiPrimary()\n"); - setWindowTitle(QObject::tr("ActiveView to TD View")); - ui->cbCrop->setChecked(false); - enableCrop(false); - // cropping is in mm, but image size is in pixels/scene units - ui->qsbWidth->setValue(Rez::appX(SXGAWidth)); - ui->qsbHeight->setValue(Rez::appX(SXGAHeight)); + if (m_previewImageFeat) { + Gui::Command::commitCommand(); + m_imageFeat = m_previewImageFeat; + m_previewImageFeat = nullptr; + } + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); + return true; } -void TaskActiveView::blockButtons(bool b) { Q_UNUSED(b); } - -TechDraw::DrawViewImage* TaskActiveView::createActiveView() +bool TaskActiveView::reject() { - // Base::Console().message("TAV::createActiveView()\n"); + if (m_previewImageFeat) { + Gui::Command::abortCommand(); + m_previewImageFeat = nullptr; + } + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); + return true; +} - //make sure there is an 3D MDI to grab!! - if (!Gui::getMainWindow()) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No Main Window"), - QObject::tr("Can not find the main window")); - return nullptr; +void TaskActiveView::updatePreview() +{ + if (!m_previewImageFeat) { + return; } - App::Document* pageDocument = m_pageFeat->getDocument(); - std::string documentName = m_pageFeat->getDocument()->getName(); - Gui::Document* pageGuiDocument = - Gui::Application::Instance->getDocument(pageDocument->getName()); - - //if the active view is a 3d window, use that. View3DInventor* view3d = qobject_cast(Gui::getMainWindow()->activeWindow()); if (!view3d) { - // active view is not a 3D view, try to find one in the current document + Gui::Document* pageGuiDocument = + Gui::Application::Instance->getDocument(m_pageFeat->getDocument()->getName()); auto views3dAll = pageGuiDocument->getMDIViewsOfType(Gui::View3DInventor::getClassTypeId()); if (!views3dAll.empty()) { view3d = qobject_cast(views3dAll.front()); - } - else { - //this code is only for the rare case where the page's document does not have a - //3D window. It might occur if the user closes the 3D window, but leaves, for - //example, a DrawPage window open. - //the active window is not a 3D view, and the page's document does not have a - //3D view, so try to find one somewhere among the open windows. - auto mdiWindows = Gui::getMainWindow()->windows(); - for (auto& mdi : mdiWindows) { - auto mdiView = qobject_cast(mdi); - if (mdiView) { - view3d = mdiView; - break; - } - } + } else { + auto mdiWindows = Gui::getMainWindow()->windows(); + for (auto& mdi : mdiWindows) { + auto mdiView = qobject_cast(mdi); + if (mdiView) { + view3d = mdiView; + break; + } + } } } if (!view3d) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No 3D Viewer"), - QObject::tr("Can not find a 3D viewer")); - return nullptr; + Base::Console().warning("TaskActiveView::updatePreview - No 3D View found.\n"); + return; } - //we are sure we have a 3D window! - - const std::string objectName{"ActiveView"}; - std::string imageName = m_pageFeat->getDocument()->getUniqueObjectName(objectName.c_str()); - std::string generatedSuffix {imageName.substr(objectName.length())}; - std::string imageType = "TechDraw::DrawViewImage"; - + App::Document* doc = m_previewImageFeat->getDocument(); std::string pageName = m_pageFeat->getNameInDocument(); + std::string imageName = m_previewImageFeat->getNameInDocument(); - //the Page's document may not be the active one, so we need to get the right - //document by name instead of using ActiveDocument - Command::doCommand(Command::Doc, "App.getDocument('%s').addObject('%s','%s')", - documentName.c_str(), imageType.c_str(), imageName.c_str()); - - Command::doCommand(Command::Doc, "App.activeDocument().%s.translateLabel('DrawActiveView', 'ActiveView', '%s')", - imageName.c_str(), imageName.c_str()); - - Command::doCommand(Command::Doc, "App.getDocument('%s').%s.addView(App.getDocument('%s').%s)", - documentName.c_str(), pageName.c_str(), documentName.c_str(), - imageName.c_str()); - - App::Document* doc = m_pageFeat->getDocument(); - std::string special = "/" + imageName + "image.png"; - std::string dir = doc->TransientDir.getValue(); - std::string fileSpec = dir + special; - - //fixes fail to create 2nd Active view with same name in old docs - Base::FileInfo fi(fileSpec); - if (fi.exists()) { - //old filename were unique by pageName + imageName only - fi.deleteFile(); - } - - //better way of making temp file name std::string baseName = pageName + imageName; std::string tempName = Base::FileInfo::getTempFileName(baseName.c_str(), doc->TransientDir.getValue()) + ".png"; @@ -198,55 +170,29 @@ TechDraw::DrawViewImage* TaskActiveView::createActiveView() imageHeight = Rez::guiX(ui->qsbHeight->rawValue()); } - QImage image(imageWidth, imageHeight, - QImage::Format_RGB32); //arbitrary initial image size. - image.fill(QColor(Qt::transparent)); + QImage image(imageWidth, imageHeight, QImage::Format_ARGB32_Premultiplied); + image.fill(Qt::transparent); Grabber3d::quickView(view3d, bg, image); - bool success = image.save(QString::fromStdString(tempName)); - - if (!success) { - Base::Console().error("ActiveView could not save file: %s\n", fileSpec.c_str()); + if (!image.save(QString::fromStdString(tempName), "PNG")) { + Base::Console().error("ActiveView could not save file: %s\n", tempName.c_str()); } tempName = DU::cleanFilespecBackslash(tempName); - Command::doCommand(Command::Doc, "App.getDocument('%s').%s.ImageFile = '%s'", - documentName.c_str(), imageName.c_str(), tempName.c_str()); - Command::doCommand(Command::Doc, "App.getDocument('%s').%s.Width = %.5f", documentName.c_str(), - imageName.c_str(), ui->qsbWidth->rawValue()); - Command::doCommand(Command::Doc, "App.getDocument('%s').%s.Height = %.5f", documentName.c_str(), - imageName.c_str(), ui->qsbHeight->rawValue()); + m_previewImageFeat->ImageFile.setValue(tempName); + m_previewImageFeat->Width.setValue(ui->qsbWidth->rawValue()); + m_previewImageFeat->Height.setValue(ui->qsbHeight->rawValue()); - App::DocumentObject* newObj = m_pageFeat->getDocument()->getObject(imageName.c_str()); - TechDraw::DrawViewImage* newImg = dynamic_cast(newObj); - if (!newObj || !newImg) - throw Base::RuntimeError("TaskActiveView - new image object not found"); - Gui::Document* guiDoc = Gui::Application::Instance->getDocument(newImg->getDocument()); - if (guiDoc) { - Gui::ViewProvider* vp = guiDoc->getViewProvider(newImg); - if (vp) { - auto vpImage = freecad_cast(vp); - if (vpImage) { + if (auto* guiDoc = Gui::Application::Instance->getDocument(doc)) { + if (auto* vp = guiDoc->getViewProvider(m_previewImageFeat)) { + if (auto* vpImage = freecad_cast(vp)) { vpImage->Crop.setValue(ui->cbCrop->isChecked()); } } } - return newImg; + m_previewImageFeat->recomputeFeature(); } -void TaskActiveView::onCropChanged() -{ - enableCrop(ui->cbCrop->isChecked()); -} - -void TaskActiveView::enableCrop(bool state) -{ - ui->qsbHeight->setEnabled(state); - ui->qsbWidth->setEnabled(state); -} - -//****************************************************************************** - void TaskActiveView::saveButtons(QPushButton* btnOK, QPushButton* btnCancel) { m_btnOK = btnOK; @@ -259,36 +205,77 @@ void TaskActiveView::enableTaskButtons(bool b) m_btnCancel->setEnabled(b); } -//****************************************************************************** +void TaskActiveView::blockButtons(bool b) { Q_UNUSED(b); } -bool TaskActiveView::accept() +// Slots +void TaskActiveView::onCropChanged() { - // Base::Console().message("TAV::accept()\n"); - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create ActiveView")); - m_imageFeat = createActiveView(); - // m_imageFeat->requestPaint(); - if (m_imageFeat) { - m_imageFeat->recomputeFeature(); + enableCrop(ui->cbCrop->isChecked()); +} + +// Private helper methods +void TaskActiveView::setUiPrimary() +{ + setWindowTitle(QObject::tr("Insert Active View")); + ui->cbCrop->setChecked(false); + enableCrop(false); + ui->qsbWidth->setValue(Rez::appX(SXGAWidth)); + ui->qsbHeight->setValue(Rez::appX(SXGAHeight)); +} + +void TaskActiveView::enableCrop(bool state) +{ + ui->qsbHeight->setEnabled(state); + ui->qsbWidth->setEnabled(state); +} + +TechDraw::DrawViewImage* TaskActiveView::createActiveView() +{ + View3DInventor* view3d = qobject_cast(Gui::getMainWindow()->activeWindow()); + if (!view3d) { + // Fallback 1: Try to find a 3D view in the page's document + Gui::Document* pageGuiDocument = + Gui::Application::Instance->getDocument(m_pageFeat->getDocument()->getName()); + if (pageGuiDocument) { + auto views3dAll = pageGuiDocument->getMDIViewsOfType(Gui::View3DInventor::getClassTypeId()); + if (!views3dAll.empty()) { + view3d = qobject_cast(views3dAll.front()); + } + } + } + if (!view3d) { + // This check is simplified as the more complex fallback is in updatePreview + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No 3D Viewer"), + QObject::tr("Can not find a 3D viewer")); + return nullptr; } - Gui::Command::updateActive(); - Gui::Command::commitCommand(); - Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); + App::Document* pageDocument = m_pageFeat->getDocument(); + const std::string objectName{"ActiveView"}; + const std::string imageType = "TechDraw::DrawViewImage"; - return true; + std::string sObjName = pageDocument->getUniqueObjectName(objectName.c_str()); + + pageDocument->addObject(imageType.c_str(), sObjName.c_str()); + App::DocumentObject* newObj = pageDocument->getObject(sObjName.c_str()); + + m_pageFeat->addView(newObj); + newObj->Label.setValue("ActiveView"); + + return static_cast(newObj); } -bool TaskActiveView::reject() +void TaskActiveView::changeEvent(QEvent* e) { - // Base::Console().message("TAV::reject()\n"); - //nothing to remove. - - Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().recompute()"); - Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); - - return false; + if (e->type() == QEvent::LanguageChange) { + ui->retranslateUi(this); + } } -///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void TaskActiveView::updateTask() +{ +} + TaskDlgActiveView::TaskDlgActiveView(TechDraw::DrawPage* page) : TaskDialog() { widget = new TaskActiveView(page); @@ -300,23 +287,6 @@ TaskDlgActiveView::TaskDlgActiveView(TechDraw::DrawPage* page) : TaskDialog() TaskDlgActiveView::~TaskDlgActiveView() {} -void TaskDlgActiveView::update() -{ - // widget->updateTask(); -} - -void TaskDlgActiveView::modifyStandardButtons(QDialogButtonBox* box) -{ - QPushButton* btnOK = box->button(QDialogButtonBox::Ok); - QPushButton* btnCancel = box->button(QDialogButtonBox::Cancel); - widget->saveButtons(btnOK, btnCancel); -} - -//==== calls from the TaskView =============================================================== -void TaskDlgActiveView::open() {} - -void TaskDlgActiveView::clicked(int) {} - bool TaskDlgActiveView::accept() { widget->accept(); @@ -329,4 +299,18 @@ bool TaskDlgActiveView::reject() return true; } +void TaskDlgActiveView::modifyStandardButtons(QDialogButtonBox* box) +{ + QPushButton* btnOK = box->button(QDialogButtonBox::Ok); + QPushButton* btnCancel = box->button(QDialogButtonBox::Cancel); + widget->saveButtons(btnOK, btnCancel); +} + +void TaskDlgActiveView::open() {} + +void TaskDlgActiveView::clicked(int) {} + +void TaskDlgActiveView::update() {} + + #include diff --git a/src/Mod/TechDraw/Gui/TaskActiveView.h b/src/Mod/TechDraw/Gui/TaskActiveView.h index 556598440b..d7102559b0 100644 --- a/src/Mod/TechDraw/Gui/TaskActiveView.h +++ b/src/Mod/TechDraw/Gui/TaskActiveView.h @@ -74,17 +74,17 @@ protected: private Q_SLOTS: void onCropChanged(); + void updatePreview(); private: std::unique_ptr ui; TechDraw::DrawPage* m_pageFeat; TechDraw::DrawViewImage* m_imageFeat; + TechDraw::DrawViewImage* m_previewImageFeat; QPushButton* m_btnOK; QPushButton* m_btnCancel; - - }; From 8add557e2fd21af92b7b3f1e25460526bce7da0f Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Thu, 26 Jun 2025 12:01:08 +0200 Subject: [PATCH 127/141] Draft: fix setting of self.Type Fixes #17750. `self.Type` should be set in `__init__` and `loads`, and not in `onDocumentRestored`. --- src/Mod/Draft/draftobjects/dimension.py | 12 ++++++++---- src/Mod/Draft/draftobjects/hatch.py | 10 ++++------ src/Mod/Draft/draftobjects/label.py | 6 ++++-- src/Mod/Draft/draftobjects/text.py | 14 ++++++-------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/Mod/Draft/draftobjects/dimension.py b/src/Mod/Draft/draftobjects/dimension.py index 684d86be16..8a6e58a475 100644 --- a/src/Mod/Draft/draftobjects/dimension.py +++ b/src/Mod/Draft/draftobjects/dimension.py @@ -217,8 +217,8 @@ class LinearDimension(DimensionBase): def __init__(self, obj): obj.Proxy = self - self.set_properties(obj) self.Type = "LinearDimension" + self.set_properties(obj) def set_properties(self, obj): """Set basic properties only if they don't exist.""" @@ -306,7 +306,6 @@ class LinearDimension(DimensionBase): gui_utils.restore_view_object( obj, vp_module="view_dimension", vp_class="ViewProviderLinearDimension" ) - self.Type = "LinearDimension" if not getattr(obj, "ViewObject", None): return @@ -315,6 +314,9 @@ class LinearDimension(DimensionBase): return super().update_properties_0v21(obj, vobj) + def loads(self, state): + self.Type = "LinearDimension" + def onChanged(self, obj, prop): """Execute when a property is changed. @@ -513,8 +515,8 @@ class AngularDimension(DimensionBase): def __init__(self, obj): obj.Proxy = self - self.set_properties(obj) self.Type = "AngularDimension" + self.set_properties(obj) def set_properties(self, obj): """Set basic properties only if they don't exist.""" @@ -583,7 +585,6 @@ class AngularDimension(DimensionBase): gui_utils.restore_view_object( obj, vp_module="view_dimension", vp_class="ViewProviderAngularDimension" ) - self.Type = "AngularDimension" if not getattr(obj, "ViewObject", None): return @@ -592,6 +593,9 @@ class AngularDimension(DimensionBase): return super().update_properties_0v21(obj, vobj) + def loads(self, state): + self.Type = "AngularDimension" + def transform(self, obj, pla): """Transform the object by applying a placement.""" import Part diff --git a/src/Mod/Draft/draftobjects/hatch.py b/src/Mod/Draft/draftobjects/hatch.py index a74c5cb49e..8de4cadb30 100644 --- a/src/Mod/Draft/draftobjects/hatch.py +++ b/src/Mod/Draft/draftobjects/hatch.py @@ -39,6 +39,7 @@ class Hatch(DraftObject): def __init__(self,obj): obj.Proxy = self + self.Type = "Hatch" self.setProperties(obj) def setProperties(self,obj): @@ -63,7 +64,6 @@ class Hatch(DraftObject): obj.addProperty("App::PropertyBool","Translate","Hatch", QT_TRANSLATE_NOOP("App::Property","If set to False, hatch is applied as is to the faces, without translation (this might give wrong results for non-XY faces)"), locked=True) obj.Translate = True - self.Type = "Hatch" def onDocumentRestored(self,obj): self.setProperties(obj) @@ -73,12 +73,10 @@ class Hatch(DraftObject): ) def dumps(self): + return - return None - - def loads(self,state): - - return None + def loads(self, state): + self.Type = "Hatch" def execute(self,obj): diff --git a/src/Mod/Draft/draftobjects/label.py b/src/Mod/Draft/draftobjects/label.py index 306429bc75..245452b484 100644 --- a/src/Mod/Draft/draftobjects/label.py +++ b/src/Mod/Draft/draftobjects/label.py @@ -45,8 +45,8 @@ class Label(DraftAnnotation): def __init__(self, obj): obj.Proxy = self - self.set_properties(obj) self.Type = "Label" + self.set_properties(obj) def set_properties(self, obj): """Set properties only if they don't exist.""" @@ -234,7 +234,6 @@ class Label(DraftAnnotation): """Execute code when the document is restored.""" super().onDocumentRestored(obj) gui_utils.restore_view_object(obj, vp_module="view_label", vp_class="ViewProviderLabel") - self.Type = "Label" if not getattr(obj, "ViewObject", None): return @@ -243,6 +242,9 @@ class Label(DraftAnnotation): return self.update_properties_0v21(obj, vobj) + def loads(self, state): + self.Type = "Label" + def update_properties_0v21(self, obj, vobj): """Update view properties.""" old_fontname = vobj.TextFont diff --git a/src/Mod/Draft/draftobjects/text.py b/src/Mod/Draft/draftobjects/text.py index 59f13b5ded..eb32bfce5a 100644 --- a/src/Mod/Draft/draftobjects/text.py +++ b/src/Mod/Draft/draftobjects/text.py @@ -42,8 +42,8 @@ class Text(DraftAnnotation): def __init__(self, obj): obj.Proxy = self - self.set_properties(obj) self.Type = "Text" + self.set_properties(obj) def set_properties(self, obj): """Add properties to the object and set them.""" @@ -77,11 +77,8 @@ class Text(DraftAnnotation): """Execute code when the document is restored.""" super().onDocumentRestored(obj) gui_utils.restore_view_object(obj, vp_module="view_text", vp_class="ViewProviderText") - # See loads: old_type is None for new objects. - old_type = self.Type - self.Type = "Text" - - if old_type is None: + # See loads: + if self.stored_type is None: return if not getattr(obj, "ViewObject", None): return @@ -96,10 +93,11 @@ class Text(DraftAnnotation): _wrn("v0.21, " + obj.Label + ", " + translate("draft", "renamed 'DisplayMode' options to 'World/Screen'")) - def loads(self,state): + def loads(self, state): # Before update_properties_0v21 the self.Type value was stored. # We use this to identify older objects that need to be updated. - self.Type = state + self.stored_type = state + self.Type = "Text" # Alias for compatibility with v0.18 and earlier From 90a6bb7ea4e9da9ff89107887fc4dc543a50ea4f Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Thu, 26 Jun 2025 13:58:12 +0200 Subject: [PATCH 128/141] BIM: fix setting of self.Type Fixes #21364. `self.Type` should be set in `__init__` and `loads`, and not in `onDocumentRestored`. Additionally: fixed mistake in `loads` in ifc_objects.py. --- src/Mod/BIM/ArchAxis.py | 4 ++-- src/Mod/BIM/ArchAxisSystem.py | 4 ++-- src/Mod/BIM/ArchBuilding.py | 6 +++++- src/Mod/BIM/ArchBuildingPart.py | 7 +++---- src/Mod/BIM/ArchComponent.py | 10 +++------- src/Mod/BIM/ArchCurtainWall.py | 7 +++++-- src/Mod/BIM/ArchEquipment.py | 7 +++++-- src/Mod/BIM/ArchFence.py | 7 ++----- src/Mod/BIM/ArchFloor.py | 5 +++-- src/Mod/BIM/ArchFrame.py | 6 +++++- src/Mod/BIM/ArchGrid.py | 4 ++-- src/Mod/BIM/ArchPanel.py | 6 +++++- src/Mod/BIM/ArchPipe.py | 6 +++++- src/Mod/BIM/ArchPrecast.py | 6 +++++- src/Mod/BIM/ArchProject.py | 10 +++++++++- src/Mod/BIM/ArchRebar.py | 6 +++++- src/Mod/BIM/ArchReference.py | 5 ++--- src/Mod/BIM/ArchRoof.py | 8 +++++--- src/Mod/BIM/ArchSectionPlane.py | 4 ++-- src/Mod/BIM/ArchSite.py | 4 ++-- src/Mod/BIM/ArchSpace.py | 6 +++++- src/Mod/BIM/ArchStairs.py | 10 +++++----- src/Mod/BIM/ArchStructure.py | 11 ++++++++--- src/Mod/BIM/ArchTruss.py | 6 +++++- src/Mod/BIM/ArchWall.py | 3 ++- src/Mod/BIM/ArchWindow.py | 6 +++++- src/Mod/BIM/nativeifc/ifc_objects.py | 5 ++--- 27 files changed, 109 insertions(+), 60 deletions(-) diff --git a/src/Mod/BIM/ArchAxis.py b/src/Mod/BIM/ArchAxis.py index f39afa3a83..3f1d2a6384 100644 --- a/src/Mod/BIM/ArchAxis.py +++ b/src/Mod/BIM/ArchAxis.py @@ -66,6 +66,7 @@ class _Axis: def __init__(self,obj): obj.Proxy = self + self.Type = "Axis" self.setProperties(obj) def setProperties(self,obj): @@ -89,7 +90,6 @@ class _Axis: if not "Limit" in pl: obj.addProperty("App::PropertyLength","Limit","Axis", QT_TRANSLATE_NOOP("App::Property","If not zero, the axes are not represented as one full line but as two lines of the given length"), locked=True) obj.Limit=0 - self.Type = "Axis" def onDocumentRestored(self,obj): @@ -139,7 +139,7 @@ class _Axis: def loads(self,state): - return None + self.Type = "Axis" def getPoints(self,obj): diff --git a/src/Mod/BIM/ArchAxisSystem.py b/src/Mod/BIM/ArchAxisSystem.py index 558f2ccef7..eda8409d07 100644 --- a/src/Mod/BIM/ArchAxisSystem.py +++ b/src/Mod/BIM/ArchAxisSystem.py @@ -59,6 +59,7 @@ class _AxisSystem: def __init__(self,obj): obj.Proxy = self + self.Type = "AxisSystem" self.setProperties(obj) def setProperties(self,obj): @@ -68,7 +69,6 @@ class _AxisSystem: obj.addProperty("App::PropertyLinkList","Axes","AxisSystem", QT_TRANSLATE_NOOP("App::Property","The axes this system is made of"), locked=True) if not "Placement" in pl: obj.addProperty("App::PropertyPlacement","Placement","AxisSystem",QT_TRANSLATE_NOOP("App::Property","The placement of this axis system"), locked=True) - self.Type = "AxisSystem" def onDocumentRestored(self,obj): @@ -97,7 +97,7 @@ class _AxisSystem: def loads(self,state): - return None + self.Type = "AxisSystem" def getPoints(self,obj): diff --git a/src/Mod/BIM/ArchBuilding.py b/src/Mod/BIM/ArchBuilding.py index cf0f2a0fe8..9e8f049321 100644 --- a/src/Mod/BIM/ArchBuilding.py +++ b/src/Mod/BIM/ArchBuilding.py @@ -275,6 +275,7 @@ class _Building(ArchFloor._Floor): def __init__(self,obj): ArchFloor._Floor.__init__(self,obj) + self.Type = "Building" self.setProperties(obj) obj.IfcType = "Building" @@ -285,13 +286,16 @@ class _Building(ArchFloor._Floor): obj.addProperty("App::PropertyEnumeration","BuildingType","Arch",QT_TRANSLATE_NOOP("App::Property","The type of this building"), locked=True) obj.BuildingType = BuildingTypes obj.setEditorMode('Height',2) - self.Type = "Building" def onDocumentRestored(self,obj): ArchFloor._Floor.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Building" + class _ViewProviderBuilding(ArchFloor._ViewProviderFloor): diff --git a/src/Mod/BIM/ArchBuildingPart.py b/src/Mod/BIM/ArchBuildingPart.py index f335579d6c..78aed908ba 100644 --- a/src/Mod/BIM/ArchBuildingPart.py +++ b/src/Mod/BIM/ArchBuildingPart.py @@ -210,6 +210,7 @@ class BuildingPart(ArchIFC.IfcProduct): def __init__(self,obj): obj.Proxy = self + self.Type = "BuildingPart" obj.addExtension('App::GroupExtensionPython') #obj.addExtension('App::OriginGroupExtensionPython') self.setProperties(obj) @@ -242,8 +243,6 @@ class BuildingPart(ArchIFC.IfcProduct): if not "MaterialsTable" in pl: obj.addProperty("App::PropertyMap","MaterialsTable","BuildingPart",QT_TRANSLATE_NOOP("App::Property","A MaterialName:SolidIndexesList map that relates material names with solid indexes to be used when referencing this object from other files"), locked=True) - self.Type = "BuildingPart" - def onDocumentRestored(self,obj): self.setProperties(obj) @@ -254,7 +253,7 @@ class BuildingPart(ArchIFC.IfcProduct): def loads(self,state): - return None + self.Type = "BuildingPart" def onBeforeChange(self,obj,prop): @@ -861,7 +860,7 @@ class ViewProviderBuildingPart: def activate(self, action=None): from draftutils.utils import toggle_working_plane vobj = self.Object.ViewObject - + if (not hasattr(vobj,"DoubleClickActivates")) or vobj.DoubleClickActivates: if toggle_working_plane(self.Object, action, restore=True): print("Setting active working plane to: ", self.Object.Label) diff --git a/src/Mod/BIM/ArchComponent.py b/src/Mod/BIM/ArchComponent.py index 9c403a3606..7ca305eb66 100644 --- a/src/Mod/BIM/ArchComponent.py +++ b/src/Mod/BIM/ArchComponent.py @@ -185,8 +185,8 @@ class Component(ArchIFC.IfcProduct): def __init__(self, obj): obj.Proxy = self - Component.setProperties(self, obj) self.Type = "Component" + Component.setProperties(self,obj) def setProperties(self, obj): """Give the component its component specific properties, such as material. @@ -240,7 +240,6 @@ class Component(ArchIFC.IfcProduct): self.Subvolume = None #self.MoveWithHost = False - self.Type = "Component" def onDocumentRestored(self, obj): """Method run when the document is restored. Re-add the Arch component properties. @@ -277,13 +276,10 @@ class Component(ArchIFC.IfcProduct): obj.Shape = shape def dumps(self): - # for compatibility with 0.17 - if hasattr(self,"Type"): - return self.Type - return "Component" + return None def loads(self,state): - return None + self.Type = "Component" def onBeforeChange(self,obj,prop): """Method called before the object has a property changed. diff --git a/src/Mod/BIM/ArchCurtainWall.py b/src/Mod/BIM/ArchCurtainWall.py index fa394454b5..3aeeb11ff7 100644 --- a/src/Mod/BIM/ArchCurtainWall.py +++ b/src/Mod/BIM/ArchCurtainWall.py @@ -82,6 +82,7 @@ class CurtainWall(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "CurtainWall" self.setProperties(obj) obj.IfcType = "Curtain Wall" @@ -184,13 +185,15 @@ class CurtainWall(ArchComponent.Component): if not "OverrideEdges" in pl: # PropertyStringList obj.addProperty("App::PropertyStringList","OverrideEdges","CurtainWall",QT_TRANSLATE_NOOP("App::Property","Input are index numbers of edges of Base ArchSketch/Sketch geometries (in Edit mode). Selected edges are used to create the shape of this Arch Curtain Wall (instead of using all edges by default). [ENHANCED by ArchSketch] GUI 'Edit Curtain Wall' Tool is provided in external Add-on ('SketchArch') to let users to select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used. Property is ignored if Base ArchSketch provided the selected edges."), locked=True) - self.Type = "CurtainWall" - def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "CurtainWall" + def onChanged(self,obj,prop): ArchComponent.Component.onChanged(self,obj,prop) diff --git a/src/Mod/BIM/ArchEquipment.py b/src/Mod/BIM/ArchEquipment.py index dd71a37cd2..ecc819cf55 100644 --- a/src/Mod/BIM/ArchEquipment.py +++ b/src/Mod/BIM/ArchEquipment.py @@ -152,7 +152,7 @@ class _Equipment(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) - obj.Proxy = self + self.Type = "Equipment" self.setProperties(obj) from ArchIFC import IfcTypes if "Furniture" in IfcTypes: @@ -198,7 +198,6 @@ class _Equipment(ArchComponent.Component): obj.setEditorMode("VerticalArea",2) obj.setEditorMode("HorizontalArea",2) obj.setEditorMode("PerimeterLength",2) - self.Type = "Equipment" def onDocumentRestored(self,obj): @@ -208,6 +207,10 @@ class _Equipment(ArchComponent.Component): # Add features in the SketchArch External Add-on, if present self.addSketchArchFeatures(obj) + def loads(self,state): + + self.Type = "Equipment" + def onChanged(self,obj,prop): self.hideSubobjects(obj,prop) diff --git a/src/Mod/BIM/ArchFence.py b/src/Mod/BIM/ArchFence.py index 9d81179ba3..a7bbe0a0eb 100644 --- a/src/Mod/BIM/ArchFence.py +++ b/src/Mod/BIM/ArchFence.py @@ -50,6 +50,7 @@ class _Fence(ArchComponent.Component): def __init__(self, obj): ArchComponent.Component.__init__(self, obj) + self.Type = "Fence" self.setProperties(obj) # Does a IfcType exist? # obj.IfcType = "Fence" @@ -82,19 +83,15 @@ class _Fence(ArchComponent.Component): "App::Property", "The number of posts used to build the fence"), locked=True) obj.setEditorMode("NumberOfPosts", 1) - self.Type = "Fence" - def dumps(self): if hasattr(self, 'sectionFaceNumbers'): return self.sectionFaceNumbers - return None def loads(self, state): if state is not None and isinstance(state, tuple): self.sectionFaceNumbers = state[0] - - return None + self.Type = "Fence" def execute(self, obj): import Part diff --git a/src/Mod/BIM/ArchFloor.py b/src/Mod/BIM/ArchFloor.py index 168cab8256..d607432b63 100644 --- a/src/Mod/BIM/ArchFloor.py +++ b/src/Mod/BIM/ArchFloor.py @@ -196,7 +196,9 @@ class _Floor(ArchIFC.IfcProduct): """ def __init__(self,obj): + obj.Proxy = self + self.Type = "Floor" self.Object = obj _Floor.setProperties(self,obj) self.IfcType = "Building Storey" @@ -216,7 +218,6 @@ class _Floor(ArchIFC.IfcProduct): if not hasattr(obj,"Placement"): # obj can be a Part Feature and already has a placement obj.addProperty("App::PropertyPlacement","Placement","Base",QT_TRANSLATE_NOOP("App::Property","The placement of this object"), locked=True) - self.Type = "Floor" def onDocumentRestored(self,obj): """Method run when the document is restored. Re-adds the properties.""" @@ -229,7 +230,7 @@ class _Floor(ArchIFC.IfcProduct): def loads(self,state): - return None + self.Type = "Floor" def onChanged(self,obj,prop): """Method called when the object has a property changed. diff --git a/src/Mod/BIM/ArchFrame.py b/src/Mod/BIM/ArchFrame.py index f329f819cf..1dd982546c 100644 --- a/src/Mod/BIM/ArchFrame.py +++ b/src/Mod/BIM/ArchFrame.py @@ -58,6 +58,7 @@ class _Frame(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Frame" self.setProperties(obj) obj.IfcType = "Railing" @@ -82,13 +83,16 @@ class _Frame(ArchComponent.Component): obj.Edges = ["All edges","Vertical edges","Horizontal edges","Bottom horizontal edges","Top horizontal edges"] if not "Fuse" in pl: obj.addProperty("App::PropertyBool","Fuse","Frame",QT_TRANSLATE_NOOP("App::Property","If true, geometry is fused, otherwise a compound"), locked=True) - self.Type = "Frame" def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Frame" + def execute(self,obj): if self.clone(obj): diff --git a/src/Mod/BIM/ArchGrid.py b/src/Mod/BIM/ArchGrid.py index 527fa40d06..2d654fdb7d 100644 --- a/src/Mod/BIM/ArchGrid.py +++ b/src/Mod/BIM/ArchGrid.py @@ -58,6 +58,7 @@ class ArchGrid: def __init__(self,obj): obj.Proxy = self + self.Type = "Grid" self.setProperties(obj) def setProperties(self,obj): @@ -88,7 +89,6 @@ class ArchGrid: obj.addProperty("App::PropertyBool","Reorient","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'When in edge midpoint mode, if this grid must reorient its children along edge normals or not'), locked=True) if not "HiddenFaces" in pl: obj.addProperty("App::PropertyIntegerList","HiddenFaces","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The indices of faces to hide'), locked=True) - self.Type = "Grid" def onDocumentRestored(self,obj): @@ -251,7 +251,7 @@ class ArchGrid: def loads(self,state): - return None + self.Type = "Grid" class ViewProviderArchGrid: diff --git a/src/Mod/BIM/ArchPanel.py b/src/Mod/BIM/ArchPanel.py index c6d47e80a8..7e20679af8 100644 --- a/src/Mod/BIM/ArchPanel.py +++ b/src/Mod/BIM/ArchPanel.py @@ -67,6 +67,7 @@ class _Panel(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Panel" self.setProperties(obj) obj.IfcType = "Plate" @@ -104,7 +105,6 @@ class _Panel(ArchComponent.Component): obj.FaceMaker = ["None","Simple","Cheese","Bullseye"] if not "Normal" in pl: obj.addProperty("App::PropertyVector","Normal","Panel",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"), locked=True) - self.Type = "Panel" obj.setEditorMode("VerticalArea",2) obj.setEditorMode("HorizontalArea",2) @@ -113,6 +113,10 @@ class _Panel(ArchComponent.Component): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Panel" + def execute(self,obj): "creates the panel shape" diff --git a/src/Mod/BIM/ArchPipe.py b/src/Mod/BIM/ArchPipe.py index 8071fe8b95..e000a0e419 100644 --- a/src/Mod/BIM/ArchPipe.py +++ b/src/Mod/BIM/ArchPipe.py @@ -61,6 +61,7 @@ class _ArchPipe(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Pipe" self.setProperties(obj) # IfcPipeSegment is new in IFC4 from ArchIFC import IfcTypes @@ -94,13 +95,16 @@ class _ArchPipe(ArchComponent.Component): if not "ProfileType" in pl: obj.addProperty("App::PropertyEnumeration", "ProfileType", "Pipe", QT_TRANSLATE_NOOP("App::Property","If not based on a profile, this controls the profile of this pipe"), locked=True) obj.ProfileType = ["Circle", "Square", "Rectangle"] - self.Type = "Pipe" def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Pipe" + def onChanged(self, obj, prop): if prop == "IfcType": root = ArchIFC.IfcProduct() diff --git a/src/Mod/BIM/ArchPrecast.py b/src/Mod/BIM/ArchPrecast.py index c56022f1b6..40906941d6 100644 --- a/src/Mod/BIM/ArchPrecast.py +++ b/src/Mod/BIM/ArchPrecast.py @@ -62,6 +62,7 @@ class _Precast(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Precast" _Precast.setProperties(self,obj) def setProperties(self,obj): @@ -75,13 +76,16 @@ class _Precast(ArchComponent.Component): obj.addProperty("App::PropertyDistance","Height","Structure",QT_TRANSLATE_NOOP("App::Property","The height of this element"), locked=True) if not "Nodes" in pl: obj.addProperty("App::PropertyVectorList","Nodes","Structure",QT_TRANSLATE_NOOP("App::Property","The structural nodes of this element"), locked=True) - self.Type = "Precast" def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) _Precast.setProperties(self,obj) + def loads(self,state): + + self.Type = "Precast" + def execute(self,obj): if self.clone(obj): diff --git a/src/Mod/BIM/ArchProject.py b/src/Mod/BIM/ArchProject.py index 207fb13eff..7374824f0f 100644 --- a/src/Mod/BIM/ArchProject.py +++ b/src/Mod/BIM/ArchProject.py @@ -66,6 +66,7 @@ class _Project(ArchIFC.IfcContext): def __init__(self, obj): obj.Proxy = self + self.Type = "Project" self.setProperties(obj) obj.IfcType = "Project" @@ -80,12 +81,19 @@ class _Project(ArchIFC.IfcContext): pl = obj.PropertiesList if not hasattr(obj,"Group"): obj.addExtension("App::GroupExtensionPython") - self.Type = "Project" def onDocumentRestored(self, obj): """Method run when the document is restored. Re-add the properties.""" self.setProperties(obj) + def dumps(self): + + return None + + def loads(self,state): + + self.Type = "Project" + def addObject(self,obj,child): "Adds an object to the group of this BuildingPart" diff --git a/src/Mod/BIM/ArchRebar.py b/src/Mod/BIM/ArchRebar.py index 8e6d22ac84..3b735ffc66 100644 --- a/src/Mod/BIM/ArchRebar.py +++ b/src/Mod/BIM/ArchRebar.py @@ -70,6 +70,7 @@ class _Rebar(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Rebar" self.setProperties(obj) obj.IfcType = "Reinforcing Bar" @@ -113,13 +114,16 @@ class _Rebar(ArchComponent.Component): QT_TRANSLATE_NOOP("App::Property", "The rebar mark"), locked=True, ) - self.Type = "Rebar" def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Rebar" + def getBaseAndAxis(self,wire): "returns a base point and orientation axis from the base wire" diff --git a/src/Mod/BIM/ArchReference.py b/src/Mod/BIM/ArchReference.py index 5321081acb..3374cc730b 100644 --- a/src/Mod/BIM/ArchReference.py +++ b/src/Mod/BIM/ArchReference.py @@ -63,8 +63,8 @@ class ArchReference: def __init__(self, obj): obj.Proxy = self - ArchReference.setProperties(self, obj) self.Type = "Reference" + ArchReference.setProperties(self, obj) self.reload = True @@ -90,7 +90,6 @@ class ArchReference: if not "FuseArch" in pl: t = QT_TRANSLATE_NOOP("App::Property","Fuse objects of same material") obj.addProperty("App::PropertyBool","FuseArch", "Reference", t, locked=True) - self.Type = "Reference" def onDocumentRestored(self, obj): @@ -109,7 +108,7 @@ class ArchReference: def loads(self, state): - return None + self.Type = "Reference" def onChanged(self, obj, prop): diff --git a/src/Mod/BIM/ArchRoof.py b/src/Mod/BIM/ArchRoof.py index 4c323e24fb..6a980aeb23 100644 --- a/src/Mod/BIM/ArchRoof.py +++ b/src/Mod/BIM/ArchRoof.py @@ -153,9 +153,9 @@ class _Roof(ArchComponent.Component): '''The Roof object''' def __init__(self, obj): ArchComponent.Component.__init__(self, obj) + self.Type = "Roof" self.setProperties(obj) obj.IfcType = "Roof" - obj.Proxy = self def setProperties(self, obj): pl = obj.PropertiesList @@ -227,12 +227,14 @@ class _Roof(ArchComponent.Component): "Roof", QT_TRANSLATE_NOOP("App::Property", "An optional object that defines a volume to be subtracted from walls. If field is set - it has a priority over auto-generated subvolume"), locked=True) - self.Type = "Roof" def onDocumentRestored(self, obj): ArchComponent.Component.onDocumentRestored(self, obj) self.setProperties(obj) + def loads(self,state): + self.Type = "Roof" + def flipEdges(self, edges): edges.reverse() newEdges = [] @@ -784,7 +786,7 @@ class _Roof(ArchComponent.Component): # TODO 2025.6.15: See github issue #21633: Find better way # to test and maybe to split suface point up and down # and extrude separately - + # Not sure if it is pointing towards and/or above horizon # (upward or downward), or it is curve surface, just add. faces.append(f) diff --git a/src/Mod/BIM/ArchSectionPlane.py b/src/Mod/BIM/ArchSectionPlane.py index bc2526d8ab..84444756c0 100644 --- a/src/Mod/BIM/ArchSectionPlane.py +++ b/src/Mod/BIM/ArchSectionPlane.py @@ -820,6 +820,7 @@ class _SectionPlane: def __init__(self,obj): obj.Proxy = self + self.Type = "SectionPlane" self.setProperties(obj) def setProperties(self,obj): @@ -841,7 +842,6 @@ class _SectionPlane: obj.UseMaterialColorForFill = False if not "Depth" in pl: obj.addProperty("App::PropertyLength","Depth","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Geometry further than this value will be cut off. Keep zero for unlimited."), locked=True) - self.Type = "SectionPlane" def onDocumentRestored(self,obj): @@ -883,7 +883,7 @@ class _SectionPlane: def loads(self,state): - return None + self.Type = "SectionPlane" class _ViewProviderSectionPlane: diff --git a/src/Mod/BIM/ArchSite.py b/src/Mod/BIM/ArchSite.py index b1ff111b0a..2d80e8f825 100644 --- a/src/Mod/BIM/ArchSite.py +++ b/src/Mod/BIM/ArchSite.py @@ -504,6 +504,7 @@ class _Site(ArchIFC.IfcProduct): def __init__(self,obj): obj.Proxy = self + self.Type = "Site" self.setProperties(obj) obj.IfcType = "Site" obj.CompositionType = "ELEMENT" @@ -576,7 +577,6 @@ class _Site(ArchIFC.IfcProduct): obj.addProperty("App::PropertyInteger","TimeZone","Site",QT_TRANSLATE_NOOP("App::Property","The time zone where this site is located"), locked=True) if not "EPWFile" in pl: obj.addProperty("App::PropertyFileIncluded","EPWFile","Site",QT_TRANSLATE_NOOP("App::Property","An optional EPW File for the location of this site. Refer to the Site documentation to know how to obtain one"), locked=True) - self.Type = "Site" def onDocumentRestored(self,obj): """Method run when the document is restored. Re-adds the properties.""" @@ -758,7 +758,7 @@ class _Site(ArchIFC.IfcProduct): def loads(self,state): - return None + self.Type = "Site" class _ViewProviderSite: diff --git a/src/Mod/BIM/ArchSpace.py b/src/Mod/BIM/ArchSpace.py index 8805e12202..f5f47e7e6a 100644 --- a/src/Mod/BIM/ArchSpace.py +++ b/src/Mod/BIM/ArchSpace.py @@ -190,6 +190,7 @@ class _Space(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Space" self.setProperties(obj) obj.IfcType = "Space" obj.CompositionType = "ELEMENT" @@ -231,13 +232,16 @@ class _Space(ArchComponent.Component): if not "AreaCalculationType" in pl: obj.addProperty("App::PropertyEnumeration", "AreaCalculationType", "Space",QT_TRANSLATE_NOOP("App::Property","Defines the calculation type for the horizontal area and its perimeter length"), locked=True) obj.AreaCalculationType = AreaCalculationType - self.Type = "Space" def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Space" + def execute(self,obj): if self.clone(obj): diff --git a/src/Mod/BIM/ArchStairs.py b/src/Mod/BIM/ArchStairs.py index 7974675025..ddb0f0e313 100644 --- a/src/Mod/BIM/ArchStairs.py +++ b/src/Mod/BIM/ArchStairs.py @@ -67,6 +67,7 @@ class _Stairs(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Stairs" self.setProperties(obj) obj.IfcType = "Stair" @@ -226,8 +227,6 @@ class _Stairs(ArchComponent.Component): if not hasattr(self,"ArchSkPropSetListPrev"): self.ArchSkPropSetListPrev = [] - self.Type = "Stairs" - def dumps(self): # Supercede Arch.Component.dumps() dump = super().dumps() @@ -249,6 +248,7 @@ class _Stairs(ArchComponent.Component): elif state[0] != 'Stairs': # model before merging super.dumps/loads() self.ArchSkPropSetPickedUuid = state[0] self.ArchSkPropSetListPrev = state[1] + self.Type = "Stairs" def onDocumentRestored(self,obj): @@ -337,7 +337,7 @@ class _Stairs(ArchComponent.Component): self.pseudosteps = [] self.pseudorisers = [] - + self.structures = [] pl = obj.Placement landings = 0 # TODO Any use? 2018.7.15 @@ -1306,7 +1306,7 @@ class _Stairs(ArchComponent.Component): lProfile[-1] = lProfile[-1].add(-vRiserThickness) resHeight1 = structureThickness/math.cos(ang) dh = s2 - float(hgt)/numOfSteps - + resHeight2 = ((numOfSteps-1)*vHeight.Length) - dh if endstairsup == "toFlightThickness": @@ -1362,7 +1362,7 @@ class _Stairs(ArchComponent.Component): struct = struct.extrude(evec) elif structure in ["One stringer","Two stringers"]: - # setup stringerWidth + # setup stringerWidth if not stringerWidth: stringerWidth = obj.StringerWidth.Value diff --git a/src/Mod/BIM/ArchStructure.py b/src/Mod/BIM/ArchStructure.py index f0844d6bf9..14e9985359 100644 --- a/src/Mod/BIM/ArchStructure.py +++ b/src/Mod/BIM/ArchStructure.py @@ -667,6 +667,7 @@ class _Structure(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Structure" self.setProperties(obj) obj.IfcType = "Beam" @@ -730,8 +731,6 @@ class _Structure(ArchComponent.Component): if not hasattr(self,"ArchSkPropSetListPrev"): self.ArchSkPropSetListPrev = [] - self.Type = "Structure" - def dumps(self): # Supercede Arch.Component.dumps() dump = super().dumps() @@ -753,6 +752,7 @@ class _Structure(ArchComponent.Component): elif state[0] != 'Structure': # model before merging super.dumps/loads() self.ArchSkPropSetPickedUuid = state[0] self.ArchSkPropSetListPrev = state[1] + self.Type = "Structure" def onDocumentRestored(self,obj): @@ -1086,7 +1086,7 @@ class _Structure(ArchComponent.Component): def onChanged(self,obj,prop): # check the flag indicating if we are currently in the process of - # restoring document; if not, no further code is run as getExtrusionData() + # restoring document; if not, no further code is run as getExtrusionData() # below return error when some properties are not added by onDocumentRestored() if FreeCAD.ActiveDocument.Restoring: return @@ -1530,9 +1530,14 @@ class _StructuralSystem(ArchComponent.Component): # OBSOLETE - All Arch objects def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "StructuralSystem" + obj.addProperty("App::PropertyLinkList","Axes","Arch",QT_TRANSLATE_NOOP("App::Property","Axes systems this structure is built on"), locked=True) obj.addProperty("App::PropertyIntegerList","Exclude","Arch",QT_TRANSLATE_NOOP("App::Property","The element numbers to exclude when this structure is based on axes"), locked=True) obj.addProperty("App::PropertyBool","Align","Arch",QT_TRANSLATE_NOOP("App::Property","If true the element are aligned with axes"), locked=True).Align = False + + def loads(self,state): + self.Type = "StructuralSystem" def execute(self,obj): diff --git a/src/Mod/BIM/ArchTruss.py b/src/Mod/BIM/ArchTruss.py index 7b6108607b..b6f8403603 100644 --- a/src/Mod/BIM/ArchTruss.py +++ b/src/Mod/BIM/ArchTruss.py @@ -62,6 +62,7 @@ class Truss(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Truss" self.setProperties(obj) obj.IfcType = "Beam" @@ -125,13 +126,16 @@ class Truss(ArchComponent.Component): obj.addProperty("App::PropertyEnumeration","RodMode","Truss", QT_TRANSLATE_NOOP("App::Property","How to draw the rods"), locked=True) obj.RodMode = rodmodes - self.Type = "Truss" def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) self.setProperties(obj) + def loads(self,state): + + self.Type = "Truss" + def onChanged(self,obj,prop): ArchComponent.Component.onChanged(self,obj,prop) diff --git a/src/Mod/BIM/ArchWall.py b/src/Mod/BIM/ArchWall.py index 067d7da978..2418598d14 100644 --- a/src/Mod/BIM/ArchWall.py +++ b/src/Mod/BIM/ArchWall.py @@ -149,6 +149,7 @@ class _Wall(ArchComponent.Component): def __init__(self, obj): ArchComponent.Component.__init__(self, obj) + self.Type = "Wall" self.setProperties(obj) obj.IfcType = "Wall" @@ -229,7 +230,6 @@ class _Wall(ArchComponent.Component): if not hasattr(self,"ArchSkPropSetListPrev"): self.ArchSkPropSetListPrev = [] self.connectEdges = [] - self.Type = "Wall" def dumps(self): dump = super().dumps() @@ -250,6 +250,7 @@ class _Wall(ArchComponent.Component): elif state[0] != 'Wall': # model before merging super.dumps/loads() self.ArchSkPropSetPickedUuid = state[0] self.ArchSkPropSetListPrev = state[1] + self.Type = "Wall" def onDocumentRestored(self,obj): """Method run when the document is restored. Re-adds the Arch component, and Arch wall properties.""" diff --git a/src/Mod/BIM/ArchWindow.py b/src/Mod/BIM/ArchWindow.py index 54af545600..84ba0d9fd4 100644 --- a/src/Mod/BIM/ArchWindow.py +++ b/src/Mod/BIM/ArchWindow.py @@ -98,6 +98,7 @@ class _Window(ArchComponent.Component): def __init__(self,obj): ArchComponent.Component.__init__(self,obj) + self.Type = "Window" self.setProperties(obj) obj.IfcType = "Window" obj.MoveWithHost = True @@ -178,7 +179,6 @@ class _Window(ArchComponent.Component): obj.setEditorMode("VerticalArea",2) obj.setEditorMode("HorizontalArea",2) obj.setEditorMode("PerimeterLength",2) - self.Type = "Window" def onDocumentRestored(self,obj): @@ -195,6 +195,10 @@ class _Window(ArchComponent.Component): if hasattr(obj, 'AttachmentOffsetXyzAndRotation'): self.atthOff = obj.AttachmentOffsetXyzAndRotation.Base + def loads(self,state): + + self.Type = "Window" + def onBeforeChange(self,obj,prop): if prop in ["Base","WindowParts","Placement","HoleDepth","Height","Width","Hosts"]: diff --git a/src/Mod/BIM/nativeifc/ifc_objects.py b/src/Mod/BIM/nativeifc/ifc_objects.py index 3557c72ed7..f13bd21752 100644 --- a/src/Mod/BIM/nativeifc/ifc_objects.py +++ b/src/Mod/BIM/nativeifc/ifc_objects.py @@ -123,7 +123,7 @@ class ifc_object: the object references a Type that has a Classification property, so we move copy the Type's property to our actual object. """ - + if not getattr(obj, "Type", None): return @@ -170,9 +170,8 @@ class ifc_object: return getattr(self, "Type", None) def loads(self, state): - if state and hasattr(state, "Type"): + if state: self.Type = state - return None def execute(self, obj): from . import ifc_generator # lazy import From b7ac8a7afe72c2cdd38c092617c33be7215bf133 Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Mon, 30 Jun 2025 18:12:02 +0200 Subject: [PATCH 129/141] Inform Coin to use EGL when on Wayland (#21917) * Inform Coin to use EGL when on Wayland * Only check for Wayland on Linux and BSD --- src/Gui/Application.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 7b99d70022..41a1bf7993 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -2295,6 +2295,13 @@ void Application::runApplication() int argc = App::Application::GetARGC(); GUISingleApplication mainApp(argc, App::Application::GetARGV()); +#if defined(FC_OS_LINUX) || defined(FC_OS_BSD) + // If QT is running with native Wayland then inform Coin to use EGL + if (QGuiApplication::platformName() == QString::fromStdString("wayland")) { + setenv("COIN_EGL", "1", 1); + } +#endif + // Make sure that we use '.' as decimal point. See also // http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559846 // and issue #0002891 From 5aaf46aa8b2255e168d07fb4a3c65290ce601545 Mon Sep 17 00:00:00 2001 From: Samuel Abels Date: Thu, 26 Jun 2025 17:41:15 +0200 Subject: [PATCH 130/141] Avoid triggering circular imports by using traceback instead of inspect --- src/Gui/ApplicationPy.cpp | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp index f198251d75..4315e4f6c1 100644 --- a/src/Gui/ApplicationPy.cpp +++ b/src/Gui/ApplicationPy.cpp @@ -1293,23 +1293,35 @@ PyObject* ApplicationPy::sAddCommand(PyObject * /*self*/, PyObject *args) std::string group; try { Base::PyGILStateLocker lock; - Py::Module mod(PyImport_ImportModule("inspect"), true); - if (mod.isNull()) { - PyErr_SetString(PyExc_ImportError, "Cannot load inspect module"); + + // Get the traceback module. + Py::Module tb(PyImport_ImportModule("traceback"), true); + if (tb.isNull()) { + PyErr_SetString(PyExc_ImportError, "Cannot load traceback module"); return nullptr; } - Py::Callable inspect(mod.getAttr("stack")); - Py::List list(inspect.apply()); - std::string file; - // usually this is the file name of the calling script - Py::Object info = list.getItem(0); - PyObject *pyfile = PyStructSequence_GET_ITEM(*info,1); - if(!pyfile) { - throw Py::Exception(); + // Extract the stack information. + Py::Callable extract(tb.getAttr("extract_stack")); + Py::List stack = extract.apply(); + if (stack.size() <= 0) { + PyErr_SetString(PyExc_RuntimeError, "traceback.extract_stack() returned empty result"); + return nullptr; } - file = Py::Object(pyfile).as_string(); + // Extract the filename and line number. + Py::Tuple entry(stack.getItem(0)); + Py::Object filename_obj = entry[0]; + if (!filename_obj.isString()) { + throw Py::Exception(); + } + std::string file = Py::String(filename_obj).as_std_string(); + if (file.empty()) { + PyErr_SetString(PyExc_RuntimeError, "Failed to identify caller from stack"); + return nullptr; + } + + // Split path into file and module name. Base::FileInfo fi(file); // convert backslashes to slashes file = fi.filePath(); From f952728809607014b4abf48475101495c472ef1d Mon Sep 17 00:00:00 2001 From: Samuel Abels Date: Fri, 27 Jun 2025 16:20:01 +0200 Subject: [PATCH 131/141] remove unused import of PartGui --- src/Mod/CAM/Path/Base/Gui/IconViewProvider.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Mod/CAM/Path/Base/Gui/IconViewProvider.py b/src/Mod/CAM/Path/Base/Gui/IconViewProvider.py index 83ab71aabd..87cb85751c 100644 --- a/src/Mod/CAM/Path/Base/Gui/IconViewProvider.py +++ b/src/Mod/CAM/Path/Base/Gui/IconViewProvider.py @@ -22,7 +22,6 @@ import FreeCAD import Path -import PathGui import importlib __title__ = "CAM Icon ViewProvider" From 36659f017673a4453d3cfe28f3c89e85a06da9fd Mon Sep 17 00:00:00 2001 From: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:51:46 +0200 Subject: [PATCH 132/141] Sketcher: Update UI strings for consistency (#22167) * Sketcher: Update UI strings for consistency * Update src/Mod/Sketcher/App/Sketch.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Update src/Mod/Sketcher/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Update src/Mod/Sketcher/App/SketchObject.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Update src/Mod/Sketcher/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Update src/Mod/Sketcher/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Update src/Mod/Sketcher/Gui/Command.cpp Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com> --- src/Mod/Sketcher/App/AppSketcher.cpp | 2 +- src/Mod/Sketcher/App/Sketch.cpp | 6 +- src/Mod/Sketcher/App/SketchObject.cpp | 14 +- src/Mod/Sketcher/Gui/AppSketcherGui.cpp | 2 +- src/Mod/Sketcher/Gui/Command.cpp | 91 ++++----- src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp | 10 +- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 170 +++++++--------- src/Mod/Sketcher/Gui/CommandCreateGeo.cpp | 191 +++++++++--------- .../Sketcher/Gui/CommandSketcherBSpline.cpp | 37 ++-- .../Sketcher/Gui/CommandSketcherOverlay.cpp | 33 ++- src/Mod/Sketcher/Gui/CommandSketcherTools.cpp | 102 +++++----- .../Gui/CommandSketcherVirtualSpace.cpp | 8 +- src/Mod/Sketcher/Gui/EditDatumDialog.cpp | 12 +- src/Mod/Sketcher/Gui/InsertDatum.ui | 6 +- src/Mod/Sketcher/Gui/SketchMirrorDialog.ui | 8 +- .../Sketcher/Gui/SketchOrientationDialog.ui | 12 +- .../Gui/SketchRectangularArrayDialog.ui | 14 +- .../Gui/SketcherRegularPolygonDialog.ui | 4 +- src/Mod/Sketcher/Gui/SketcherSettings.ui | 35 ++-- .../Gui/SketcherSettingsAppearance.ui | 37 ++-- .../Sketcher/Gui/SketcherSettingsDisplay.ui | 43 ++-- src/Mod/Sketcher/Gui/SketcherSettingsGrid.ui | 28 +-- .../Sketcher/Gui/TaskSketcherConstraints.cpp | 16 +- .../Sketcher/Gui/TaskSketcherConstraints.ui | 8 +- src/Mod/Sketcher/Gui/TaskSketcherElements.cpp | 99 +++++---- src/Mod/Sketcher/Gui/TaskSketcherElements.ui | 6 +- .../Gui/TaskSketcherGeneral.ui.autosave | 2 +- src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp | 2 +- src/Mod/Sketcher/Gui/TaskSketcherMessages.ui | 2 +- .../Gui/TaskSketcherSolverAdvanced.ui | 34 ++-- .../Sketcher/Gui/TaskSketcherValidation.cpp | 22 +- .../Sketcher/Gui/TaskSketcherValidation.ui | 31 ++- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 24 +-- src/Mod/Sketcher/Gui/Workbench.cpp | 55 ++--- 34 files changed, 577 insertions(+), 589 deletions(-) diff --git a/src/Mod/Sketcher/App/AppSketcher.cpp b/src/Mod/Sketcher/App/AppSketcher.cpp index 97766496eb..042fd33c2e 100644 --- a/src/Mod/Sketcher/App/AppSketcher.cpp +++ b/src/Mod/Sketcher/App/AppSketcher.cpp @@ -99,7 +99,7 @@ PyMOD_INIT_FUNC(Sketcher) Sketcher::Measure ::initialize(); - Base::Console().log("Loading Sketcher module... done\n"); + Base::Console().log("Loading Sketcher module… done\n"); PyMOD_Return(sketcherModule); } diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 97d001c03d..7120cd2fad 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -2966,8 +2966,8 @@ int Sketch::addTangentLineAtBSplineKnotConstraint(int checkedlinegeoId, // For now we just throw an error. Base::Console().error( - "addTangentLineAtBSplineKnotConstraint: This method cannot set tangent constraint " - "at end knots of a B-spline. Please constrain the start/end points instead.\n"); + "addTangentLineAtBSplineKnotConstraint: This method cannot set tangent constraints " + "at end knots of a B-spline. Constrain the start/end points instead.\n"); return -1; } } @@ -3020,7 +3020,7 @@ int Sketch::addTangentLineEndpointAtBSplineKnotConstraint(int checkedlinegeoId, // For now we just throw an error. Base::Console().error("addTangentLineEndpointAtBSplineKnotConstraint: This method " "cannot set tangent constraint at end knots of a B-spline. " - "Please constrain the start/end points instead.\n"); + "Constrain the start/end points instead.\n"); return -1; } } diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 1102153654..b1a7433052 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3821,7 +3821,7 @@ int SketchObject::join(int geoId1, Sketcher::PointPos posId1, int geoId2, Sketch if (Sketcher::PointPos::start != posId1 && Sketcher::PointPos::end != posId1 && Sketcher::PointPos::start != posId2 && Sketcher::PointPos::end != posId2) { - THROWM(ValueError, "Invalid position(s): points must be start or end points of a curve."); + THROWM(ValueError, "Invalid positions: points must be start or end points of a curve."); return -1; } @@ -9445,16 +9445,16 @@ void SketchObject::getConstraintIndices(int GeoId, std::vector& constraintL void SketchObject::appendConflictMsg(const std::vector& conflicting, std::string& msg) { appendConstraintsMsg(conflicting, - "Please remove the following conflicting constraint:\n", - "Please remove at least one of the following conflicting constraints:\n", + "Remove the following conflicting constraint:", + "Remove at least one of the following conflicting constraints:", msg); } void SketchObject::appendRedundantMsg(const std::vector& redundant, std::string& msg) { appendConstraintsMsg(redundant, - "Please remove the following redundant constraint:", - "Please remove the following redundant constraints:", + "Remove the following redundant constraint:", + "Remove the following redundant constraints:", msg); } @@ -9462,8 +9462,8 @@ void SketchObject::appendMalformedConstraintsMsg(const std::vector& malform std::string& msg) { appendConstraintsMsg(malformed, - "Please remove the following malformed constraint:", - "Please remove the following malformed constraints:", + "Remove the following malformed constraint:", + "Remove the following malformed constraints:", msg); } diff --git a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp index 2fdb7597d0..e27a0eb2e9 100644 --- a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp +++ b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp @@ -99,7 +99,7 @@ PyMOD_INIT_FUNC(SketcherGui) } PyObject* sketcherGuiModule = SketcherGui::initModule(); - Base::Console().log("Loading GUI of Sketcher module... done\n"); + Base::Console().log("Loading GUI of Sketcher module… done\n"); Gui::BitmapFactory().addPath(QStringLiteral(":/icons/constraints")); Gui::BitmapFactory().addPath(QStringLiteral(":/icons/elements")); diff --git a/src/Mod/Sketcher/Gui/Command.cpp b/src/Mod/Sketcher/Gui/Command.cpp index 4a1478d339..661321d07b 100644 --- a/src/Mod/Sketcher/Gui/Command.cpp +++ b/src/Mod/Sketcher/Gui/Command.cpp @@ -152,8 +152,8 @@ CmdSketcherNewSketch::CmdSketcherNewSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create sketch"); - sToolTipText = QT_TR_NOOP("Create a new sketch."); + sMenuText = QT_TR_NOOP("New Sketch"); + sToolTipText = QT_TR_NOOP("Creates a new sketch"); sWhatsThis = "Sketcher_NewSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_NewSketch"; @@ -191,14 +191,14 @@ void CmdSketcherNewSketch::activated(int iMsg) Gui::TranslatedUserWarning( getActiveGuiDocument(), QObject::tr("Sketch mapping"), - QObject::tr("Can't map the sketch to selected object. %1.").arg(msg_str)); + QObject::tr("Cannot map the sketch to the selected object. %1.").arg(msg_str)); return; } if (validModes.size() > 1) { validModes.insert(validModes.begin(), Attacher::mmDeactivated); bool ok; QStringList items; - items.push_back(QObject::tr("Don't attach")); + items.push_back(QObject::tr("Do not attach")); int iSugg = 0;// index of the auto-suggested mode in the list of valid modes for (size_t i = 0; i < validModes.size(); ++i) { auto uiStrings = @@ -331,8 +331,8 @@ CmdSketcherEditSketch::CmdSketcherEditSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Edit sketch"); - sToolTipText = QT_TR_NOOP("Edit the selected sketch."); + sMenuText = QT_TR_NOOP("Edit Sketch"); + sToolTipText = QT_TR_NOOP("Opens the selected sketch for editing"); sWhatsThis = "Sketcher_EditSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_EditSketch"; @@ -362,8 +362,8 @@ CmdSketcherLeaveSketch::CmdSketcherLeaveSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Leave sketch"); - sToolTipText = QT_TR_NOOP("Finish editing the active sketch."); + sMenuText = QT_TR_NOOP("Leave Sketch"); + sToolTipText = QT_TR_NOOP("Exits the active sketch"); sWhatsThis = "Sketcher_LeaveSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_LeaveSketch"; @@ -400,10 +400,10 @@ CmdSketcherStopOperation::CmdSketcherStopOperation() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Stop operation"); - sToolTipText = QT_TR_NOOP("When in edit mode, " - "stop the active operation " - "(drawing, constraining, etc.)."); + sMenuText = QT_TR_NOOP("Stop Operation"); + sToolTipText = QT_TR_NOOP("Stops the active operation while in edit mode"); + + sWhatsThis = "Sketcher_StopOperation"; sStatusTip = sToolTipText; sPixmap = "process-stop"; @@ -436,9 +436,9 @@ CmdSketcherReorientSketch::CmdSketcherReorientSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Reorient sketch..."); - sToolTipText = QT_TR_NOOP("Place the selected sketch on one of the global coordinate planes.\n" - "This will clear the 'AttachmentSupport' property, if any."); + sMenuText = QT_TR_NOOP("Reorient Sketch…"); + sToolTipText = QT_TR_NOOP("Places the selected sketch on one of the global coordinate planes.\n" + "This will clear the AttachmentSupport property."); sWhatsThis = "Sketcher_ReorientSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ReorientSketch"; @@ -455,7 +455,7 @@ void CmdSketcherReorientSketch::activated(int iMsg) qApp->translate("Sketcher_ReorientSketch", "Sketch has support"), qApp->translate("Sketcher_ReorientSketch", "Sketch with a support face cannot be reoriented.\n" - "Do you want to detach it from the support?"), + "Detach it from the support?"), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::No) return; @@ -573,11 +573,9 @@ CmdSketcherMapSketch::CmdSketcherMapSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Attach sketch..."); + sMenuText = QT_TR_NOOP("Attach Sketch…"); sToolTipText = QT_TR_NOOP( - "Set the 'AttachmentSupport' of a sketch.\n" - "First select the supporting geometry, for example, a face or an edge of a solid object,\n" - "then call this command, then choose the desired sketch."); + "Attaches a sketch to the selected geometry element"); sWhatsThis = "Sketcher_MapSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_MapSketch"; @@ -624,7 +622,7 @@ void CmdSketcherMapSketch::activated(int iMsg) qApp->translate("Sketcher_MapSketch", "No sketch found"), sketchInSelection ? qApp->translate("Sketcher_MapSketch", "Cannot attach sketch to itself!") - : qApp->translate("Sketcher_MapSketch", "The document doesn't have a sketch")); + : qApp->translate("Sketcher_MapSketch", "The document does not contain a sketch")); return; } @@ -797,9 +795,8 @@ CmdSketcherViewSketch::CmdSketcherViewSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("View sketch"); - sToolTipText = QT_TR_NOOP("When in edit mode, " - "set the camera orientation perpendicular to the sketch plane."); + sMenuText = QT_TR_NOOP("Align View to Sketch"); + sToolTipText = QT_TR_NOOP("Aligns the camera orientation perpendicular to the active sketch plane"); sWhatsThis = "Sketcher_ViewSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ViewSketch"; @@ -832,9 +829,9 @@ CmdSketcherValidateSketch::CmdSketcherValidateSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Validate sketch..."); - sToolTipText = QT_TR_NOOP("Validates a sketch by looking at missing coincidences,\n" - "invalid constraints, degenerated geometry, etc."); + sMenuText = QT_TR_NOOP("Validate Sketch…"); + sToolTipText = QT_TR_NOOP("Validates a sketch by checking for missing coincidences,\n" + "invalid constraints, and degenerate geometry"); sWhatsThis = "Sketcher_ValidateSketch"; sStatusTip = sToolTipText; eType = 0; @@ -850,7 +847,7 @@ void CmdSketcherValidateSketch::activated(int iMsg) Gui::TranslatedUserWarning( getActiveGuiDocument(), qApp->translate("CmdSketcherValidateSketch", "Wrong selection"), - qApp->translate("CmdSketcherValidateSketch", "Select only one sketch.")); + qApp->translate("CmdSketcherValidateSketch", "Select only 1 sketch.")); return; } @@ -872,10 +869,10 @@ CmdSketcherMirrorSketch::CmdSketcherMirrorSketch() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Mirror sketch"); + sMenuText = QT_TR_NOOP("Mirror Sketch"); sToolTipText = QT_TR_NOOP("Creates a new mirrored sketch for each selected sketch\n" "by using the X or Y axes, or the origin point,\n" - "as mirroring reference."); + "as mirroring reference"); sWhatsThis = "Sketcher_MirrorSketch"; sStatusTip = sToolTipText; eType = 0; @@ -891,7 +888,7 @@ void CmdSketcherMirrorSketch::activated(int iMsg) Gui::TranslatedUserWarning( getActiveGuiDocument(), qApp->translate("CmdSketcherMirrorSketch", "Wrong selection"), - qApp->translate("CmdSketcherMirrorSketch", "Select one or more sketches.")); + qApp->translate("CmdSketcherMirrorSketch", "Select at least 1 sketch")); return; } @@ -999,8 +996,8 @@ CmdSketcherMergeSketches::CmdSketcherMergeSketches() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Merge sketches"); - sToolTipText = QT_TR_NOOP("Create a new sketch from merging two or more selected sketches."); + sMenuText = QT_TR_NOOP("Merge Sketches"); + sToolTipText = QT_TR_NOOP("Creates a new sketch by merging at least 2 selected sketches"); sWhatsThis = "Sketcher_MergeSketches"; sStatusTip = sToolTipText; eType = 0; @@ -1016,7 +1013,7 @@ void CmdSketcherMergeSketches::activated(int iMsg) Gui::TranslatedUserWarning( getActiveGuiDocument(), qApp->translate("CmdSketcherMergeSketches", "Wrong selection"), - qApp->translate("CmdSketcherMergeSketches", "Select at least two sketches.")); + qApp->translate("CmdSketcherMergeSketches", "Select at least 2 sketches")); return; } @@ -1099,9 +1096,8 @@ CmdSketcherViewSection::CmdSketcherViewSection() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("View section"); - sToolTipText = QT_TR_NOOP("When in edit mode, " - "switch between section view and full view."); + sMenuText = QT_TR_NOOP("Toggle Section View"); + sToolTipText = QT_TR_NOOP("Toggles between section view and full view"); sWhatsThis = "Sketcher_ViewSection"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ViewSection"; @@ -1175,11 +1171,11 @@ public: void languageChange() { gridAutoSpacing->setText(tr("Grid auto spacing")); - gridAutoSpacing->setToolTip(tr("Resize grid automatically depending on zoom.")); + gridAutoSpacing->setToolTip(tr("Automatically adjusts the grid spacing based on the zoom level")); gridAutoSpacing->setStatusTip(gridAutoSpacing->toolTip()); sizeLabel->setText(tr("Spacing")); - gridSizeBox->setToolTip(tr("Distance between two subsequent grid lines.")); + gridSizeBox->setToolTip(tr("Distance between two subsequent grid lines")); } protected: @@ -1279,9 +1275,9 @@ CmdSketcherGrid::CmdSketcherGrid() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Toggle grid"); + sMenuText = QT_TR_NOOP("Toggle Grid"); sToolTipText = - QT_TR_NOOP("Toggle the grid in the sketch. In the menu you can change grid settings."); + QT_TR_NOOP("Toggles the grid display in the active sketch"); sWhatsThis = "Sketcher_Grid"; sStatusTip = sToolTipText; eType = 0; @@ -1435,8 +1431,8 @@ public: angleLabel->setText(tr("Snap angle")); snapAngle->setToolTip( - tr("Angular step for tools that use 'Snap at Angle' (line for instance). Hold CTRL to " - "enable 'Snap at Angle'. The angle starts from the positive X axis of the sketch.")); + tr("Sets the angular step for tools using 'Snap at angle' (e.g., line). Hold Ctrl to " + "enable 'Snap at angle'. The angle starts from the positive X-axis of the sketch.")); } protected: @@ -1542,10 +1538,9 @@ CmdSketcherSnap::CmdSketcherSnap() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Toggle snap"); + sMenuText = QT_TR_NOOP("Toggle Snap"); sToolTipText = - QT_TR_NOOP("Toggle all snap functionality. In the menu you can toggle 'Snap to grid' and " - "'Snap to objects' individually, and change further snap settings."); + QT_TR_NOOP("Toggles snapping"); sWhatsThis = "Sketcher_Snap"; sStatusTip = sToolTipText; eType = 0; @@ -1802,8 +1797,8 @@ CmdRenderingOrder::CmdRenderingOrder() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Configure rendering order"); - sToolTipText = QT_TR_NOOP("Reorder the items in the list to configure rendering order."); + sMenuText = QT_TR_NOOP("Rendering Order"); + sToolTipText = QT_TR_NOOP("Reorders items in the rendering order"); sWhatsThis = "Sketcher_RenderingOrder"; sStatusTip = sToolTipText; eType = 0; diff --git a/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp b/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp index 8b6b16d565..1d0ae479e7 100644 --- a/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp +++ b/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp @@ -70,8 +70,8 @@ CmdSketcherToggleConstruction::CmdSketcherToggleConstruction() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Toggle construction geometry"); - sToolTipText = QT_TR_NOOP("Toggles the toolbar or selected geometry to/from construction mode"); + sMenuText = QT_TR_NOOP("Construction Geometry"); + sToolTipText = QT_TR_NOOP("Toggles between defining geometry and construction geometry modes"); sWhatsThis = "Sketcher_ToggleConstruction"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ToggleConstruction"; @@ -167,7 +167,7 @@ void CmdSketcherToggleConstruction::activated(int iMsg) if (selection.size() != 1) { Gui::TranslatedUserWarning(Obj, QObject::tr("Wrong selection"), - QObject::tr("Select edge(s) from the sketch.")); + QObject::tr("Select edges from the sketch")); return; } @@ -176,12 +176,12 @@ void CmdSketcherToggleConstruction::activated(int iMsg) if (SubNames.empty()) { Gui::TranslatedUserWarning(Obj, QObject::tr("Wrong selection"), - QObject::tr("Select edge(s) from the sketch.")); + QObject::tr("Select edges from the sketch")); return; } // undo command open - openCommand(QT_TRANSLATE_NOOP("Command", "Toggle draft from/to draft")); + openCommand(QT_TRANSLATE_NOOP("Command", "Toggle construction geometry")); // go through the selected subelements bool verticesonly = true; diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index 0d43068a92..833d9a0d0d 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -226,7 +226,7 @@ bool removeRedundantPointOnObject(SketchObject* Obj, int GeoId1, int GeoId2, int // at this point it is already solved. tryAutoRecomputeIfNotSolve(Obj); - notifyConstraintSubstitutions(QObject::tr("One or two point on object constraint(s) was/were deleted, " + notifyConstraintSubstitutions(QObject::tr("One or two point-on-object constraints were deleted, " "since the latest constraint being applied internally applies point-on-object as well.")); // TODO: find way to get selection here, or clear elsewhere @@ -758,7 +758,7 @@ void SketcherGui::notifyConstraintSubstitutions(const QString& message) QLatin1String("NotifyConstraintSubstitutions"), true,// Default ParamEntry true,// checkbox state - QObject::tr("Keep notifying me of constraint substitutions")); + QObject::tr("Keep notifying about constraint substitutions")); } // returns true if successful, false otherwise @@ -772,7 +772,7 @@ bool addConstraintSafely(SketchObject* obj, std::function constraintaddi // Untranslated developer intended messages (i.e. to the Report View) // Example of exception carrying a static string with a pair in the "Notifications" context Gui::NotifyUserError(obj, - QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), + QT_TRANSLATE_NOOP("Notifications", "Invalid constraint"), e.what()); Gui::Command::abortCommand(); @@ -784,7 +784,7 @@ bool addConstraintSafely(SketchObject* obj, std::function constraintaddi Gui::TranslatedUserError( obj, QObject::tr("Error"), - QObject::tr("Unexpected error. More information may be available in the Report View.")); + QObject::tr("Unexpected error. More information may be available in the report view.")); Gui::Command::abortCommand(); @@ -836,7 +836,7 @@ int SketchSelection::setUp() if (selection.size() == 1) { // if one selectetd, only sketch allowed. should be done by activity of command if (!selection[0].getObject()->isDerivedFrom()) { - ErrorMsg = QObject::tr("Only sketch and its support are allowed to be selected."); + ErrorMsg = QObject::tr("Only the sketch and its support are allowed to be selected"); return -1; } @@ -847,7 +847,7 @@ int SketchSelection::setUp() SketchObj = static_cast(selection[0].getObject()); // check if the none sketch object is the support of the sketch if (selection[1].getObject() != SketchObj->AttachmentSupport.getValue()) { - ErrorMsg = QObject::tr("Only sketch and its support are allowed to be selected."); + ErrorMsg = QObject::tr("Only the sketch and its support may be selected"); return -1; } // assume always a Part::Feature derived object as support @@ -859,7 +859,7 @@ int SketchSelection::setUp() SketchObj = static_cast(selection[1].getObject()); // check if the none sketch object is the support of the sketch if (selection[0].getObject() != SketchObj->AttachmentSupport.getValue()) { - ErrorMsg = QObject::tr("Only sketch and its support are allowed to be selected."); + ErrorMsg = QObject::tr("Only the sketch and its support may be selected"); return -1; } // assume always a Part::Feature derived object as support @@ -1402,7 +1402,7 @@ public: sAppModule = "Sketcher"; sGroup = "Sketcher"; sMenuText = QT_TR_NOOP("Dimension"); - sToolTipText = QT_TR_NOOP("Dimension tools."); + sToolTipText = QT_TR_NOOP("Dimension tools"); sWhatsThis = "Sketcher_CompDimensionTools"; sStatusTip = sToolTipText; eType = ForEdit; @@ -1475,7 +1475,7 @@ public: sAppModule = "Sketcher"; sGroup = "Sketcher"; sMenuText = QT_TR_NOOP("Constrain"); - sToolTipText = QT_TR_NOOP("Constrain tools."); + sToolTipText = QT_TR_NOOP("Constrain tools"); sWhatsThis = "Sketcher_CompConstrainTools"; sStatusTip = sToolTipText; eType = ForEdit; @@ -1505,8 +1505,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Toggle constraints"); - sToolTipText = QT_TR_NOOP("Toggle constrain tools."); + sMenuText = QT_TR_NOOP("Toggle Constraints"); + sToolTipText = QT_TR_NOOP("Toggle constrain tools"); sWhatsThis = "Sketcher_CompToggleConstraints"; sStatusTip = sToolTipText; eType = ForEdit; @@ -2295,23 +2295,23 @@ protected: createArcLengthConstrain(geoId, onSketchPos); } if (availableConstraint == AvailableConstraint::THIRD) { - restartCommand(QT_TRANSLATE_NOOP("Command", "Add Radius constraint")); + restartCommand(QT_TRANSLATE_NOOP("Command", "Add radius constraint")); createRadiusDiameterConstrain(geoId, onSketchPos, true); } if (availableConstraint == AvailableConstraint::FOURTH) { - restartCommand(QT_TRANSLATE_NOOP("Command", "Add Radius constraint")); + restartCommand(QT_TRANSLATE_NOOP("Command", "Add radius constraint")); createRadiusDiameterConstrain(geoId, onSketchPos, false); availableConstraint = AvailableConstraint::RESET; } } else { if (availableConstraint == AvailableConstraint::FIRST) { - restartCommand(QT_TRANSLATE_NOOP("Command", "Add Radius constraint")); + restartCommand(QT_TRANSLATE_NOOP("Command", "Add radius constraint")); createRadiusDiameterConstrain(geoId, onSketchPos, true); selAllowed = true; } if (availableConstraint == AvailableConstraint::SECOND) { - restartCommand(QT_TRANSLATE_NOOP("Command", "Add Radius constraint")); + restartCommand(QT_TRANSLATE_NOOP("Command", "Add radius constraint")); createRadiusDiameterConstrain(geoId, onSketchPos, false); if (!isArcOfCircle(*Obj->getGeometry(geoId))) { //This way if key is pressed again it goes back to FIRST @@ -2984,9 +2984,7 @@ CmdSketcherDimension::CmdSketcherDimension() sAppModule = "Sketcher"; sGroup = "Sketcher"; sMenuText = QT_TR_NOOP("Dimension"); - sToolTipText = QT_TR_NOOP("Constrain contextually based on your selection.\n" - "Depending on your selection you might have several constraints available. You can cycle through them using M key.\n" - "Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel."); + sToolTipText = QT_TR_NOOP("Constrains contextually based on the selection. The type can be changed with the M key."); sWhatsThis = "Sketcher_Dimension"; sStatusTip = sToolTipText; sPixmap = "Constraint_Dimension"; @@ -3040,8 +3038,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain horizontal/vertical"); - sToolTipText = QT_TR_NOOP("Constrains a single line to either horizontal or vertical."); + sMenuText = QT_TR_NOOP("Horizontal/Vertical Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements either horizontally or vertically"); sWhatsThis = "Sketcher_CompHorVer"; sStatusTip = sToolTipText; eType = ForEdit; @@ -3094,7 +3092,7 @@ bool canHorVerBlock(Sketcher::SketchObject* Obj, int geoId) Gui::TranslatedUserWarning( Obj, QObject::tr("Impossible constraint"), - QObject::tr("The selected edge already has a Block constraint!")); + QObject::tr("The selected edge already has a block constraint!")); return false; } } @@ -3170,7 +3168,7 @@ void horVerActivated(CmdSketcherConstraint* cmd, std::string type) Gui::TranslatedUserWarning( Obj, QObject::tr("Impossible constraint"), - QObject::tr("The selected item(s) can't accept a horizontal or vertical constraint!")); + QObject::tr("The selected items cannot be constrained horizontally or vertically!")); return; } @@ -3358,8 +3356,8 @@ CmdSketcherConstrainHorVer::CmdSketcherConstrainHorVer() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain horizontal/vertical"); - sToolTipText = QT_TR_NOOP("Constrains a single line to either horizontal or vertical, whichever is closer to current alignment."); + sMenuText = QT_TR_NOOP("Horizontal/Vertical Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements either horizontally or vertically, based on their closest alignment"); sWhatsThis = "Sketcher_ConstrainHorVer"; sStatusTip = sToolTipText; sPixmap = "Constraint_HorVer"; @@ -3404,8 +3402,8 @@ CmdSketcherConstrainHorizontal::CmdSketcherConstrainHorizontal() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain horizontal"); - sToolTipText = QT_TR_NOOP("Create a horizontal constraint on the selected item"); + sMenuText = QT_TR_NOOP("Horizontal Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements horizontally"); sWhatsThis = "Sketcher_ConstrainHorizontal"; sStatusTip = sToolTipText; sPixmap = "Constraint_Horizontal"; @@ -3449,8 +3447,8 @@ CmdSketcherConstrainVertical::CmdSketcherConstrainVertical() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain vertical"); - sToolTipText = QT_TR_NOOP("Create a vertical constraint on the selected item"); + sMenuText = QT_TR_NOOP("Vertical Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements vertically"); sWhatsThis = "Sketcher_ConstrainVertical"; sStatusTip = sToolTipText; sPixmap = "Constraint_Vertical"; @@ -3495,10 +3493,8 @@ CmdSketcherConstrainLock::CmdSketcherConstrainLock() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain lock"); - sToolTipText = QT_TR_NOOP("Create both a horizontal " - "and a vertical distance constraint\n" - "on the selected vertex"); + sMenuText = QT_TR_NOOP("Lock Position"); + sToolTipText = QT_TR_NOOP("Constrains the selected vertices by adding horizontal and vertical distance constraints"); sWhatsThis = "Sketcher_ConstrainLock"; sStatusTip = sToolTipText; sPixmap = "Constraint_Lock"; @@ -3782,8 +3778,8 @@ CmdSketcherConstrainBlock::CmdSketcherConstrainBlock() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain block"); - sToolTipText = QT_TR_NOOP("Block the selected edge from moving"); + sMenuText = QT_TR_NOOP("Block Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected edges as fixed"); sWhatsThis = "Sketcher_ConstrainBlock"; sStatusTip = sToolTipText; sPixmap = "Constraint_Block"; @@ -3828,7 +3824,7 @@ void CmdSketcherConstrainBlock::activated(int iMsg) || Obj->getLastHasRedundancies()) { Gui::TranslatedUserWarning(Obj, QObject::tr("Wrong solver status"), - QObject::tr("A Block constraint cannot be added " + QObject::tr("A block constraint cannot be added " "if the sketch is unsolved " "or there are redundant and " "conflicting constraints.")); @@ -3864,7 +3860,7 @@ void CmdSketcherConstrainBlock::activated(int iMsg) Gui::TranslatedUserWarning( Obj, QObject::tr("Double constraint"), - QObject::tr("The selected edge already has a Block constraint!")); + QObject::tr("The selected edge already has a block constraint!")); return; } @@ -3917,7 +3913,7 @@ void CmdSketcherConstrainBlock::applyConstraint(std::vector& selSeq, Gui::TranslatedUserWarning( Obj, QObject::tr("Double constraint"), - QObject::tr("The selected edge already has a Block constraint!")); + QObject::tr("The selected edge already has a block constraint!")); return; } @@ -3982,9 +3978,8 @@ CmdSketcherConstrainCoincidentUnified::CmdSketcherConstrainCoincidentUnified(con { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain coincident"); - sToolTipText = QT_TR_NOOP("Create a coincident constraint between points, or fix a point on an edge, " - "or a concentric constraint between circles, arcs, and ellipses"); + sMenuText = QT_TR_NOOP("Coincident Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements to be coincident"); sWhatsThis = "Sketcher_ConstrainCoincidentUnified"; sStatusTip = sToolTipText; sPixmap = "Constraint_Coincident"; @@ -4495,9 +4490,8 @@ CmdSketcherConstrainCoincident::CmdSketcherConstrainCoincident() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain coincident"); - sToolTipText = QT_TR_NOOP("Create a coincident constraint between points, or a concentric " - "constraint between circles, arcs, and ellipses"); + sMenuText = QT_TR_NOOP("Coincident Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements to be coincident"); sWhatsThis = "Sketcher_ConstrainCoincident"; sStatusTip = sToolTipText; sPixmap = "Constraint_PointOnPoint"; @@ -4546,8 +4540,8 @@ CmdSketcherConstrainPointOnObject::CmdSketcherConstrainPointOnObject() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain point on object"); - sToolTipText = QT_TR_NOOP("Fix a point onto an object"); + sMenuText = QT_TR_NOOP("Point-On-Object Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected point onto the selected object"); sWhatsThis = "Sketcher_ConstrainPointOnObject"; sStatusTip = sToolTipText; sPixmap = "Constraint_PointOnObject"; @@ -4598,9 +4592,8 @@ CmdSketcherConstrainDistance::CmdSketcherConstrainDistance() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain distance"); - sToolTipText = QT_TR_NOOP("Fix a length of a line or the distance between a line and a vertex " - "or between two circles"); + sMenuText = QT_TR_NOOP("Distance Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the vertical distance between two points, or from a point to the origin if one is selected"); sWhatsThis = "Sketcher_ConstrainDistance"; sStatusTip = sToolTipText; sPixmap = "Constraint_Length"; @@ -4746,7 +4739,7 @@ void CmdSketcherConstrainDistance::activated(int iMsg) std::abs(-pnt.x * d.y + pnt.y * d.x + pnt1.x * pnt2.y - pnt2.x * pnt1.y) / d.Length(); - openCommand(QT_TRANSLATE_NOOP("Command", "Add point to line Distance constraint")); + openCommand(QT_TRANSLATE_NOOP("Command", "Add point to line distance constraint")); Gui::cmdAppObjectArgs(selection[0].getObject(), "addConstraint(Sketcher.Constraint('Distance',%d,%d,%d,%f))", GeoId1, @@ -4776,7 +4769,7 @@ void CmdSketcherConstrainDistance::activated(int iMsg) Base::Vector3d d = center - pnt; double ActDist = std::abs(d.Length() - radius); - openCommand(QT_TRANSLATE_NOOP("Command", "Add point to circle Distance constraint")); + openCommand(QT_TRANSLATE_NOOP("Command", "Add point to circle distance constraint")); Gui::cmdAppObjectArgs(selection[0].getObject(), "addConstraint(Sketcher.Constraint('Distance',%d,%d,%d,%f))", GeoId1, @@ -5116,7 +5109,7 @@ void CmdSketcherConstrainDistance::applyConstraint(std::vector& selSe std::abs(-pnt.x * d.y + pnt.y * d.x + pnt1.x * pnt2.y - pnt2.x * pnt1.y) / d.Length(); - openCommand(QT_TRANSLATE_NOOP("Command", "Add point to line Distance constraint")); + openCommand(QT_TRANSLATE_NOOP("Command", "Add point to line distance constraint")); Gui::cmdAppObjectArgs(Obj, "addConstraint(Sketcher.Constraint('Distance',%d,%d,%d,%f))", GeoId1, @@ -5246,9 +5239,8 @@ CmdSketcherConstrainDistanceX::CmdSketcherConstrainDistanceX() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain horizontal distance"); - sToolTipText = QT_TR_NOOP("Fix the horizontal distance " - "between two points or line ends"); + sMenuText = QT_TR_NOOP("Horizontal Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the horizontal distance between two points, or from a point to the origin if one is selected"); sWhatsThis = "Sketcher_ConstrainDistanceX"; sStatusTip = sToolTipText; sPixmap = "Constraint_HorizontalDistance"; @@ -5548,8 +5540,8 @@ CmdSketcherConstrainDistanceY::CmdSketcherConstrainDistanceY() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain vertical distance"); - sToolTipText = QT_TR_NOOP("Fix the vertical distance between two points or line ends"); + sMenuText = QT_TR_NOOP("Vertical Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the vertical distance between the selected elements"); sWhatsThis = "Sketcher_ConstrainDistanceY"; sStatusTip = sToolTipText; sPixmap = "Constraint_VerticalDistance"; @@ -5844,8 +5836,8 @@ CmdSketcherConstrainParallel::CmdSketcherConstrainParallel() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain parallel"); - sToolTipText = QT_TR_NOOP("Create a parallel constraint between two lines"); + sMenuText = QT_TR_NOOP("Parallel Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected lines to be parallel"); sWhatsThis = "Sketcher_ConstrainParallel"; sStatusTip = sToolTipText; sPixmap = "Constraint_Parallel"; @@ -6007,8 +5999,8 @@ CmdSketcherConstrainPerpendicular::CmdSketcherConstrainPerpendicular() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain perpendicular"); - sToolTipText = QT_TR_NOOP("Create a perpendicular constraint between two lines"); + sMenuText = QT_TR_NOOP("Perpendicular Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected lines to be perpendicular"); sWhatsThis = "Sketcher_ConstrainPerpendicular"; sStatusTip = sToolTipText; sPixmap = "Constraint_Perpendicular"; @@ -6772,8 +6764,8 @@ CmdSketcherConstrainTangent::CmdSketcherConstrainTangent() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain tangent or collinear"); - sToolTipText = QT_TR_NOOP("Create a tangent or collinear constraint between two entities"); + sMenuText = QT_TR_NOOP("Tangent/Collinear Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements to be tangent or collinear"); sWhatsThis = "Sketcher_ConstrainTangent"; sStatusTip = sToolTipText; sPixmap = "Constraint_Tangent"; @@ -7647,8 +7639,8 @@ CmdSketcherConstrainRadius::CmdSketcherConstrainRadius() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain radius"); - sToolTipText = QT_TR_NOOP("Fix the radius of a circle or an arc"); + sMenuText = QT_TR_NOOP("Radius Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the radius of the selected circle or arc"); sWhatsThis = "Sketcher_ConstrainRadius"; sStatusTip = sToolTipText; sPixmap = "Constraint_Radius"; @@ -8010,8 +8002,8 @@ CmdSketcherConstrainDiameter::CmdSketcherConstrainDiameter() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain diameter"); - sToolTipText = QT_TR_NOOP("Fix the diameter of a circle or an arc"); + sMenuText = QT_TR_NOOP("Diameter Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the diameter of the selected circle or arc"); sWhatsThis = "Sketcher_ConstrainDiameter"; sStatusTip = sToolTipText; sPixmap = "Constraint_Diameter"; @@ -8328,9 +8320,8 @@ CmdSketcherConstrainRadiam::CmdSketcherConstrainRadiam() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain auto radius/diameter"); - sToolTipText = QT_TR_NOOP( - "Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen"); + sMenuText = QT_TR_NOOP("Radius/Diameter Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the radius of the selected arc or the diameter of the selected circle"); sWhatsThis = "Sketcher_ConstrainRadiam"; sStatusTip = sToolTipText; sPixmap = "Constraint_Radiam"; @@ -8697,8 +8688,8 @@ CmdSketcherCompConstrainRadDia::CmdSketcherCompConstrainRadDia() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain arc or circle"); - sToolTipText = QT_TR_NOOP("Constrain an arc or a circle"); + sMenuText = QT_TR_NOOP("Radius/Diameter Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the radius or diameter of an arc or a circle"); sWhatsThis = "Sketcher_CompConstrainRadDia"; sStatusTip = sToolTipText; sAccel = "R"; @@ -8857,8 +8848,8 @@ CmdSketcherConstrainAngle::CmdSketcherConstrainAngle() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain angle"); - sToolTipText = QT_TR_NOOP("Fix the angle of a line or the angle between two lines"); + sMenuText = QT_TR_NOOP("Angle Dimension"); + sToolTipText = QT_TR_NOOP("Constrains the angle of the selected elements"); sWhatsThis = "Sketcher_ConstrainAngle"; sStatusTip = sToolTipText; sPixmap = "Constraint_InternalAngle"; @@ -9310,9 +9301,9 @@ CmdSketcherConstrainEqual::CmdSketcherConstrainEqual() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain equal"); + sMenuText = QT_TR_NOOP("Equal Constraint"); sToolTipText = - QT_TR_NOOP("Create an equality constraint between two lines or between circles and arcs"); + QT_TR_NOOP("Constrains the selected edges or circles to be equal"); sWhatsThis = "Sketcher_ConstrainEqual"; sStatusTip = sToolTipText; sPixmap = "Constraint_EqualLength"; @@ -9552,10 +9543,8 @@ CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain symmetric"); - sToolTipText = QT_TR_NOOP("Create a symmetry constraint " - "between two points\n" - "with respect to a line or a third point"); + sMenuText = QT_TR_NOOP("Symmetric Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements to be symmetric"); sWhatsThis = "Sketcher_ConstrainSymmetric"; sStatusTip = sToolTipText; sPixmap = "Constraint_Symmetric"; @@ -9897,10 +9886,8 @@ CmdSketcherConstrainSnellsLaw::CmdSketcherConstrainSnellsLaw() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain refraction (Snell's law)"); - sToolTipText = QT_TR_NOOP("Create a refraction law (Snell's law)" - "constraint between two endpoints of rays\n" - "and an edge as an interface."); + sMenuText = QT_TR_NOOP("Refraction Constraint"); + sToolTipText = QT_TR_NOOP("Constrains the selected elements based on the refraction law (Snell's Law)"); sWhatsThis = "Sketcher_ConstrainSnellsLaw"; sStatusTip = sToolTipText; sPixmap = "Constraint_SnellsLaw"; @@ -10008,7 +9995,7 @@ void CmdSketcherConstrainSnellsLaw::activated(int iMsg) QDialog dlg(Gui::getMainWindow()); Ui::InsertDatum ui_Datum; ui_Datum.setupUi(&dlg); - dlg.setWindowTitle(EditDatumDialog::tr("Refractive index ratio")); + dlg.setWindowTitle(EditDatumDialog::tr("Refractive Index Ratio")); ui_Datum.label->setText(EditDatumDialog::tr("Ratio n2/n1:")); Base::Quantity init_val; init_val.setUnit(Base::Unit()); @@ -10096,8 +10083,8 @@ CmdSketcherChangeDimensionConstraint::CmdSketcherChangeDimensionConstraint() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Change value"); - sToolTipText = QT_TR_NOOP("Change the value of a dimensional constraint"); + sMenuText = QT_TR_NOOP("Edit Value"); + sToolTipText = QT_TR_NOOP("Edits the value of a dimensional constraint"); sWhatsThis = "Sketcher_ChangeDimensionConstraint"; sStatusTip = sToolTipText; eType = ForEdit; @@ -10150,10 +10137,8 @@ CmdSketcherToggleDrivingConstraint::CmdSketcherToggleDrivingConstraint() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Toggle driving/reference constraint"); - sToolTipText = QT_TR_NOOP("Set the toolbar, " - "or the selected constraints,\n" - "into driving or reference mode"); + sMenuText = QT_TR_NOOP("Toggle Driving/Reference Constraints"); + sToolTipText = QT_TR_NOOP("Toggles between driving and reference mode of the selected constraints and commands"); sWhatsThis = "Sketcher_ToggleDrivingConstraint"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ToggleConstraint"; @@ -10307,9 +10292,8 @@ CmdSketcherToggleActiveConstraint::CmdSketcherToggleActiveConstraint() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Activate/deactivate constraint"); - sToolTipText = QT_TR_NOOP("Activates or deactivates " - "the selected constraints"); + sMenuText = QT_TR_NOOP("Toggle Constraints"); + sToolTipText = QT_TR_NOOP("Toggles the state of the selected constraints"); sWhatsThis = "Sketcher_ToggleActiveConstraint"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ToggleActiveConstraint"; diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index 45c92e6a17..fb7564fa73 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -111,8 +111,8 @@ CmdSketcherCreatePoint::CmdSketcherCreatePoint() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create point"); - sToolTipText = QT_TR_NOOP("Create a point in the sketch"); + sMenuText = QT_TR_NOOP("Point"); + sToolTipText = QT_TR_NOOP("Creates a point"); sWhatsThis = "Sketcher_CreatePoint"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreatePoint"; @@ -142,8 +142,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create polyline"); - sToolTipText = QT_TR_NOOP("Create a polyline in the sketch. 'M' Key cycles behaviour"); + sMenuText = QT_TR_NOOP("Polyline"); + sToolTipText = QT_TR_NOOP("Creates a continuous polyline"); sWhatsThis = "Sketcher_CompLine"; sStatusTip = sToolTipText; sAccel = "G, M"; @@ -199,8 +199,8 @@ CmdSketcherCreateLine::CmdSketcherCreateLine() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create line"); - sToolTipText = QT_TR_NOOP("Create a line in the sketch"); + sMenuText = QT_TR_NOOP("Line"); + sToolTipText = QT_TR_NOOP("Creates a line"); sWhatsThis = "Sketcher_CreateLine"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateLine"; @@ -230,8 +230,9 @@ CmdSketcherCreatePolyline::CmdSketcherCreatePolyline() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create polyline"); - sToolTipText = QT_TR_NOOP("Create a polyline in the sketch. 'M' Key cycles behaviour"); + sMenuText = QT_TR_NOOP("Polyline"); + sToolTipText = + QT_TR_NOOP("Creates a continuous polyline. Press the 'M' key to switch segment modes"); sWhatsThis = "Sketcher_CreatePolyline"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreatePolyline"; @@ -263,8 +264,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc"); - sToolTipText = QT_TR_NOOP("Create an arc in the sketch"); + sMenuText = QT_TR_NOOP("Arc"); + sToolTipText = QT_TR_NOOP("Creates an arc"); sWhatsThis = "Sketcher_CompCreateArc"; sStatusTip = sToolTipText; sAccel = "G, A"; @@ -331,8 +332,8 @@ CmdSketcherCreateArc::CmdSketcherCreateArc() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc by center"); - sToolTipText = QT_TR_NOOP("Create an arc by its center and by its end points"); + sMenuText = QT_TR_NOOP("Arc From Center"); + sToolTipText = QT_TR_NOOP("Creates an arc defined by a center point and an end point"); sWhatsThis = "Sketcher_CreateArc"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateArc"; @@ -363,8 +364,8 @@ CmdSketcherCreate3PointArc::CmdSketcherCreate3PointArc() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc by 3 points"); - sToolTipText = QT_TR_NOOP("Create an arc by its end points and a point along the arc"); + sMenuText = QT_TR_NOOP("Arc From 3 Points"); + sToolTipText = QT_TR_NOOP("Creates an arc defined by 2 end points and 1 point on the arc"); sWhatsThis = "Sketcher_Create3PointArc"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Create3PointArc"; @@ -396,8 +397,8 @@ CmdSketcherCreateArcOfEllipse::CmdSketcherCreateArcOfEllipse() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc of ellipse"); - sToolTipText = QT_TR_NOOP("Create an arc of ellipse in the sketch"); + sMenuText = QT_TR_NOOP("Elliptical Arc"); + sToolTipText = QT_TR_NOOP("Creates an elliptical arc"); sWhatsThis = "Sketcher_CreateArcOfEllipse"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateElliptical_Arc"; @@ -427,8 +428,8 @@ CmdSketcherCreateArcOfHyperbola::CmdSketcherCreateArcOfHyperbola() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc of hyperbola"); - sToolTipText = QT_TR_NOOP("Create an arc of hyperbola in the sketch"); + sMenuText = QT_TR_NOOP("Hyperbolic Arc"); + sToolTipText = QT_TR_NOOP("Creates a hyperbolic arc"); sWhatsThis = "Sketcher_CreateArcOfHyperbola"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateHyperbolic_Arc"; @@ -457,8 +458,8 @@ CmdSketcherCreateArcOfParabola::CmdSketcherCreateArcOfParabola() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc of parabola"); - sToolTipText = QT_TR_NOOP("Create an arc of parabola in the sketch"); + sMenuText = QT_TR_NOOP("Parabolic Arc"); + sToolTipText = QT_TR_NOOP("Creates a parabolic arc"); sWhatsThis = "Sketcher_CreateArcOfParabola"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateParabolic_Arc"; @@ -489,8 +490,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create conic"); - sToolTipText = QT_TR_NOOP("Create a conic in the sketch"); + sMenuText = QT_TR_NOOP("Conic"); + sToolTipText = QT_TR_NOOP("Creates a conic"); sWhatsThis = "Sketcher_CompCreateConic"; sStatusTip = sToolTipText; sAccel = "G, C"; @@ -555,8 +556,8 @@ CmdSketcherCreateCircle::CmdSketcherCreateCircle() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create circle by center"); - sToolTipText = QT_TR_NOOP("Create a circle in the sketch"); + sMenuText = QT_TR_NOOP("Circle From Center"); + sToolTipText = QT_TR_NOOP("Creates a circle from a center and rim point"); sWhatsThis = "Sketcher_CreateCircle"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateCircle"; @@ -586,8 +587,8 @@ CmdSketcherCreate3PointCircle::CmdSketcherCreate3PointCircle() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create circle by 3 points"); - sToolTipText = QT_TR_NOOP("Create a circle by 3 perimeter points"); + sMenuText = QT_TR_NOOP("Circle From 3 Points"); + sToolTipText = QT_TR_NOOP("Creates a circle from 3 perimeter points"); sWhatsThis = "Sketcher_Create3PointCircle"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Create3PointCircle"; @@ -623,8 +624,8 @@ CmdSketcherCreateEllipseByCenter::CmdSketcherCreateEllipseByCenter() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create ellipse by center"); - sToolTipText = QT_TR_NOOP("Create an ellipse by center in the sketch"); + sMenuText = QT_TR_NOOP("Ellipse From Center"); + sToolTipText = QT_TR_NOOP("Creates an ellipse from a center and rim point"); sWhatsThis = "Sketcher_CreateEllipseByCenter"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateEllipseByCenter"; @@ -658,8 +659,8 @@ CmdSketcherCreateEllipseBy3Points::CmdSketcherCreateEllipseBy3Points() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create ellipse by 3 points"); - sToolTipText = QT_TR_NOOP("Create an ellipse by 3 points in the sketch"); + sMenuText = QT_TR_NOOP("Ellipse From 3 Points"); + sToolTipText = QT_TR_NOOP("Creates an ellipse from 3 points on its perimeter"); sWhatsThis = "Sketcher_CreateEllipseBy3Points"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateEllipse_3points"; @@ -693,8 +694,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create rectangle"); - sToolTipText = QT_TR_NOOP("Creates a rectangle in the sketch"); + sMenuText = QT_TR_NOOP("Rectangle"); + sToolTipText = QT_TR_NOOP("Creates a rectangle"); sWhatsThis = "Sketcher_CompCreateRectangles"; sStatusTip = sToolTipText; sAccel = "G, R"; @@ -754,8 +755,8 @@ CmdSketcherCreateRectangle::CmdSketcherCreateRectangle() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create rectangle"); - sToolTipText = QT_TR_NOOP("Create a rectangle in the sketch"); + sMenuText = QT_TR_NOOP("Rectangle"); + sToolTipText = QT_TR_NOOP("Creates a rectangle from 2 corner points"); sWhatsThis = "Sketcher_CreateRectangle"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateRectangle"; @@ -787,8 +788,8 @@ CmdSketcherCreateRectangleCenter::CmdSketcherCreateRectangleCenter() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create centered rectangle"); - sToolTipText = QT_TR_NOOP("Create a centered rectangle in the sketch"); + sMenuText = QT_TR_NOOP("Centered Rectangle"); + sToolTipText = QT_TR_NOOP("Creates a centered rectangle from a center and a corner point"); sWhatsThis = "Sketcher_CreateRectangle_Center"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateRectangle_Center"; @@ -821,8 +822,8 @@ CmdSketcherCreateOblong::CmdSketcherCreateOblong() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create rounded rectangle"); - sToolTipText = QT_TR_NOOP("Create a rounded rectangle in the sketch"); + sMenuText = QT_TR_NOOP("Rounded Rectangle"); + sToolTipText = QT_TR_NOOP("Creates a rounded rectangle from 2 corner points"); sWhatsThis = "Sketcher_CreateOblong"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateOblong"; @@ -857,8 +858,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create regular polygon"); - sToolTipText = QT_TR_NOOP("Create a regular polygon in the sketcher"); + sMenuText = QT_TR_NOOP("Polygon"); + sToolTipText = QT_TR_NOOP("Creates a regular polygon from a center and corner point"); sWhatsThis = "Sketcher_CompCreateRegularPolygon"; sStatusTip = sToolTipText; sAccel = "G, P, 3"; @@ -931,8 +932,8 @@ CmdSketcherCreateTriangle::CmdSketcherCreateTriangle() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create equilateral triangle"); - sToolTipText = QT_TR_NOOP("Create an equilateral triangle in the sketch"); + sMenuText = QT_TR_NOOP("Triangle"); + sToolTipText = QT_TR_NOOP("Creates an equilateral triangle from a center and corner point"); sWhatsThis = "Sketcher_CreateTriangle"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateTriangle"; @@ -962,8 +963,8 @@ CmdSketcherCreateSquare::CmdSketcherCreateSquare() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create square"); - sToolTipText = QT_TR_NOOP("Create a square in the sketch"); + sMenuText = QT_TR_NOOP("Square"); + sToolTipText = QT_TR_NOOP("Creates a square from a center and corner point"); sWhatsThis = "Sketcher_CreateSquare"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateSquare"; @@ -993,8 +994,8 @@ CmdSketcherCreatePentagon::CmdSketcherCreatePentagon() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create pentagon"); - sToolTipText = QT_TR_NOOP("Create a pentagon in the sketch"); + sMenuText = QT_TR_NOOP("Pentagon"); + sToolTipText = QT_TR_NOOP("Creates a pentagon from a center and corner point"); sWhatsThis = "Sketcher_CreatePentagon"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreatePentagon"; @@ -1024,8 +1025,8 @@ CmdSketcherCreateHexagon::CmdSketcherCreateHexagon() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create hexagon"); - sToolTipText = QT_TR_NOOP("Create a hexagon in the sketch"); + sMenuText = QT_TR_NOOP("Hexagon"); + sToolTipText = QT_TR_NOOP("Creates a hexagon from a center and corner point"); sWhatsThis = "Sketcher_CreateHexagon"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateHexagon"; @@ -1055,8 +1056,8 @@ CmdSketcherCreateHeptagon::CmdSketcherCreateHeptagon() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create heptagon"); - sToolTipText = QT_TR_NOOP("Create a heptagon in the sketch"); + sMenuText = QT_TR_NOOP("Heptagon"); + sToolTipText = QT_TR_NOOP("Creates a heptagon from a center and corner point"); sWhatsThis = "Sketcher_CreateHeptagon"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateHeptagon"; @@ -1086,8 +1087,8 @@ CmdSketcherCreateOctagon::CmdSketcherCreateOctagon() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create octagon"); - sToolTipText = QT_TR_NOOP("Create an octagon in the sketch"); + sMenuText = QT_TR_NOOP("Octagon"); + sToolTipText = QT_TR_NOOP("Creates an octagon from a center and corner point"); sWhatsThis = "Sketcher_CreateOctagon"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateOctagon"; @@ -1117,8 +1118,8 @@ CmdSketcherCreateRegularPolygon::CmdSketcherCreateRegularPolygon() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create regular polygon"); - sToolTipText = QT_TR_NOOP("Create a regular polygon in the sketch"); + sMenuText = QT_TR_NOOP("Polygon"); + sToolTipText = QT_TR_NOOP("Creates a regular polygon from a center and corner point"); sWhatsThis = "Sketcher_CreateRegularPolygon"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateRegularPolygon"; @@ -1156,8 +1157,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Slots"); - sToolTipText = QT_TR_NOOP("Slot tools."); + sMenuText = QT_TR_NOOP("Slot"); + sToolTipText = QT_TR_NOOP("Slot tools"); sWhatsThis = "Sketcher_CompSlot"; sStatusTip = sToolTipText; sAccel = "G, S"; @@ -1212,8 +1213,8 @@ CmdSketcherCreateSlot::CmdSketcherCreateSlot() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create slot"); - sToolTipText = QT_TR_NOOP("Create a slot in the sketch"); + sMenuText = QT_TR_NOOP("Slot"); + sToolTipText = QT_TR_NOOP("Creates a slot"); sWhatsThis = "Sketcher_CreateSlot"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateSlot"; @@ -1243,8 +1244,8 @@ CmdSketcherCreateArcSlot::CmdSketcherCreateArcSlot() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create arc slot"); - sToolTipText = QT_TR_NOOP("Create an arc slot in the sketch"); + sMenuText = QT_TR_NOOP("Arc Slot"); + sToolTipText = QT_TR_NOOP("Creates an arc slot"); sWhatsThis = "Sketcher_CreateArcSlot"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateArcSlot"; @@ -1276,8 +1277,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create B-spline"); - sToolTipText = QT_TR_NOOP("Create a B-spline in the sketch"); + sMenuText = QT_TR_NOOP("B-Spline"); + sToolTipText = QT_TR_NOOP("Creates a B-spline curve defined by control points"); sWhatsThis = "Sketcher_CompCreateBSpline"; sStatusTip = sToolTipText; sAccel = "G, B, B"; @@ -1342,8 +1343,8 @@ CmdSketcherCreateBSpline::CmdSketcherCreateBSpline() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create B-spline"); - sToolTipText = QT_TR_NOOP("Create a B-spline by control points in the sketch."); + sMenuText = QT_TR_NOOP("B-Spline"); + sToolTipText = QT_TR_NOOP("Creates a B-spline curve defined by control points"); sWhatsThis = "Sketcher_CreateBSpline"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateBSpline"; @@ -1379,8 +1380,8 @@ CmdSketcherCreatePeriodicBSpline::CmdSketcherCreatePeriodicBSpline() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create periodic B-spline"); - sToolTipText = QT_TR_NOOP("Create a periodic B-spline by control points in the sketch."); + sMenuText = QT_TR_NOOP("Periodic B-Spline"); + sToolTipText = QT_TR_NOOP("Creates a periodic B-spline curve defined by control points"); sWhatsThis = "Sketcher_CreatePeriodicBSpline"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Create_Periodic_BSpline"; @@ -1415,8 +1416,8 @@ CmdSketcherCreateBSplineByInterpolation::CmdSketcherCreateBSplineByInterpolation { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create B-spline by knots"); - sToolTipText = QT_TR_NOOP("Create a B-spline by knots, i.e. by interpolation, in the sketch."); + sMenuText = QT_TR_NOOP("B-Spline From Knots"); + sToolTipText = QT_TR_NOOP("Creates a B-spline from knots, i.e. from interpolation"); sWhatsThis = "Sketcher_CreateBSplineByInterpolation"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateBSplineByInterpolation"; @@ -1452,9 +1453,8 @@ CmdSketcherCreatePeriodicBSplineByInterpolation::CmdSketcherCreatePeriodicBSplin { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create periodic B-spline by knots"); - sToolTipText = - QT_TR_NOOP("Create a periodic B-spline by knots, i.e. by interpolation, in the sketch."); + sMenuText = QT_TR_NOOP("Periodic B-Spline From Knots"); + sToolTipText = QT_TR_NOOP("Creates a periodic B-spline defined by knots using interpolation"); sWhatsThis = "Sketcher_CreatePeriodicBSplineByInterpolation"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreatePeriodicBSplineByInterpolation"; @@ -1491,8 +1491,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create fillet or chamfer"); - sToolTipText = QT_TR_NOOP("Create a fillet or chamfer between two lines"); + sMenuText = QT_TR_NOOP("Fillet/Chamfer"); + sToolTipText = QT_TR_NOOP("Creates a fillet or chamfer between 2 lines"); sWhatsThis = "Sketcher_CompCreateFillets"; sStatusTip = sToolTipText; sAccel = "G, F, F"; @@ -1525,8 +1525,8 @@ CmdSketcherCreateFillet::CmdSketcherCreateFillet() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create fillet"); - sToolTipText = QT_TR_NOOP("Create a fillet between two lines or at a coincident point"); + sMenuText = QT_TR_NOOP("Fillet"); + sToolTipText = QT_TR_NOOP("Creates a fillet between 2 selected lines or 1 coincident point"); sWhatsThis = "Sketcher_CreateFillet"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateFillet"; @@ -1556,8 +1556,8 @@ CmdSketcherCreateChamfer::CmdSketcherCreateChamfer() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create chamfer"); - sToolTipText = QT_TR_NOOP("Create a chamfer between two lines or at a coincident point"); + sMenuText = QT_TR_NOOP("Chamfer"); + sToolTipText = QT_TR_NOOP("Creates a chamfer between 2 selected lines or 1 coincident point"); sWhatsThis = "Sketcher_CreateChamfer"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CreateChamfer"; @@ -1589,8 +1589,8 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Curve Edition"); - sToolTipText = QT_TR_NOOP("Curve Edition tools."); + sMenuText = QT_TR_NOOP("Edit Edges"); + sToolTipText = QT_TR_NOOP("Edge editing tools"); sWhatsThis = "Sketcher_CompCurveEdition"; sStatusTip = sToolTipText; sAccel = "G, T"; @@ -1623,8 +1623,8 @@ CmdSketcherTrimming::CmdSketcherTrimming() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Trim edge"); - sToolTipText = QT_TR_NOOP("Trim an edge with respect to the picked position"); + sMenuText = QT_TR_NOOP("Trim Edge"); + sToolTipText = QT_TR_NOOP("Trims an edge with respect to the selected position"); sWhatsThis = "Sketcher_Trimming"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Trimming"; @@ -1653,8 +1653,8 @@ CmdSketcherExtend::CmdSketcherExtend() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Extend edge"); - sToolTipText = QT_TR_NOOP("Extend an edge with respect to the picked position"); + sMenuText = QT_TR_NOOP("Extend Edge"); + sToolTipText = QT_TR_NOOP("Extends an edge with respect to the selected position"); sWhatsThis = "Sketcher_Extend"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Extend"; @@ -1683,8 +1683,8 @@ CmdSketcherSplit::CmdSketcherSplit() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Split edge"); - sToolTipText = QT_TR_NOOP("Splits an edge into two while preserving constraints"); + sMenuText = QT_TR_NOOP("Split Edge"); + sToolTipText = QT_TR_NOOP("Splits an edge into 2 segements while preserving constraints"); sWhatsThis = "Sketcher_Split"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Split"; @@ -1714,8 +1714,9 @@ public: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create external"); - sToolTipText = QT_TR_NOOP("Create external edges linked to external geometries."); + sMenuText = QT_TR_NOOP("External Geometry"); + sToolTipText = + QT_TR_NOOP("Creates sketch elements linked to geometry defined outside the sketch"); sWhatsThis = "Sketcher_CompExternal"; sStatusTip = sToolTipText; sAccel = "G, X"; @@ -1770,10 +1771,8 @@ CmdSketcherProjection::CmdSketcherProjection() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create external projection geometry"); - sToolTipText = QT_TR_NOOP("Create the projection edges of an external geometry.\n" - "External edges can be either defining or construction geometries.\n" - "You can use the toggle construction tool."); + sMenuText = QT_TR_NOOP("External Projection"); + sToolTipText = QT_TR_NOOP("Creates the projection of external geometry in the sketch plane"); sWhatsThis = "Sketcher_Projection"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Projection"; @@ -1807,11 +1806,9 @@ CmdSketcherIntersection::CmdSketcherIntersection() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create external intersection geometry"); + sMenuText = QT_TR_NOOP("External Intersection"); sToolTipText = - QT_TR_NOOP("Create the intersection edges of an external geometry with the sketch plane.\n" - "External edges can be either defining or construction geometries.\n" - "You can use the toggle construction tool."); + QT_TR_NOOP("Creates the intersection of external geometry with the sketch plane"); sWhatsThis = "Sketcher_Intersection"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Intersection"; @@ -1846,8 +1843,8 @@ CmdSketcherCarbonCopy::CmdSketcherCarbonCopy() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Create carbon copy"); - sToolTipText = QT_TR_NOOP("Copy the geometry of another sketch"); + sMenuText = QT_TR_NOOP("Carbon Copy"); + sToolTipText = QT_TR_NOOP("Copies the geometry of another sketch"); sWhatsThis = "Sketcher_CarbonCopy"; sStatusTip = sToolTipText; sPixmap = "Sketcher_CarbonCopy"; diff --git a/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp b/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp index 81da9dd727..8bc5e61a9d 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp @@ -111,7 +111,7 @@ CmdSketcherConvertToNURBS::CmdSketcherConvertToNURBS() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Convert geometry to B-spline"); + sMenuText = QT_TR_NOOP("Geometry to B-Spline"); sToolTipText = QT_TR_NOOP("Converts the selected geometry to a B-spline"); sWhatsThis = "Sketcher_BSplineConvertToNURBS"; sStatusTip = sToolTipText; @@ -187,7 +187,7 @@ CmdSketcherIncreaseDegree::CmdSketcherIncreaseDegree() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Increase B-spline degree"); + sMenuText = QT_TR_NOOP("Increase B-Spline Degree"); sToolTipText = QT_TR_NOOP("Increases the degree of the B-spline"); sWhatsThis = "Sketcher_BSplineIncreaseDegree"; sStatusTip = sToolTipText; @@ -264,7 +264,7 @@ CmdSketcherDecreaseDegree::CmdSketcherDecreaseDegree() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Decrease B-spline degree"); + sMenuText = QT_TR_NOOP("Decrease B-Spline Degree"); sToolTipText = QT_TR_NOOP("Decreases the degree of the B-spline"); sWhatsThis = "Sketcher_BSplineDecreaseDegree"; sStatusTip = sToolTipText; @@ -346,7 +346,7 @@ CmdSketcherIncreaseKnotMultiplicity::CmdSketcherIncreaseKnotMultiplicity() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Increase knot multiplicity"); + sMenuText = QT_TR_NOOP("Increase Knot Multiplicity"); sToolTipText = QT_TR_NOOP("Increases the multiplicity of the selected knot of a B-spline"); sWhatsThis = "Sketcher_BSplineIncreaseKnotMultiplicity"; sStatusTip = sToolTipText; @@ -377,8 +377,7 @@ void CmdSketcherIncreaseKnotMultiplicity::activated(int iMsg) Gui::TranslatedUserWarning( getActiveGuiDocument()->getDocument(), QObject::tr("Wrong selection"), - QObject::tr( - "The selection comprises more than one item. Please select just one knot.")); + QObject::tr("The selection comprises more than one item. Select just one knot.")); return; } @@ -494,7 +493,7 @@ CmdSketcherDecreaseKnotMultiplicity::CmdSketcherDecreaseKnotMultiplicity() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Decrease knot multiplicity"); + sMenuText = QT_TR_NOOP("Decrease Knot Multiplicity"); sToolTipText = QT_TR_NOOP("Decreases the multiplicity of the selected knot of a B-spline"); sWhatsThis = "Sketcher_BSplineDecreaseKnotMultiplicity"; sStatusTip = sToolTipText; @@ -525,8 +524,7 @@ void CmdSketcherDecreaseKnotMultiplicity::activated(int iMsg) Gui::TranslatedUserWarning( getActiveGuiDocument()->getDocument(), QObject::tr("Wrong selection"), - QObject::tr( - "The selection comprises more than one item. Please select just one knot.")); + QObject::tr("The selection comprises more than one item. Select just one knot.")); return; } @@ -632,7 +630,7 @@ CmdSketcherCompModifyKnotMultiplicity::CmdSketcherCompModifyKnotMultiplicity() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Modify knot multiplicity"); + sMenuText = QT_TR_NOOP("Modify Knot Multiplicity"); sToolTipText = QT_TR_NOOP("Modifies the multiplicity of the selected knot of a B-spline"); sWhatsThis = "Sketcher_CompModifyKnotMultiplicity"; sStatusTip = sToolTipText; @@ -886,9 +884,10 @@ CmdSketcherInsertKnot::CmdSketcherInsertKnot() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Insert knot"); - sToolTipText = QT_TR_NOOP("Inserts knot at given parameter. If a knot already exists at that " - "parameter, it's multiplicity is increased by one."); + sMenuText = QT_TR_NOOP("Insert Knot"); + sToolTipText = + QT_TR_NOOP("Inserts a knot at a given parameter. If a knot already exists at that " + "parameter, its multiplicity is increased by 1."); sWhatsThis = "Sketcher_BSplineInsertKnot"; sStatusTip = sToolTipText; sPixmap = "Sketcher_BSplineInsertKnot"; @@ -917,7 +916,7 @@ void CmdSketcherInsertKnot::activated(int iMsg) // as we need only one object to get the new GeoId after multiplicity change Gui::TranslatedUserWarning(getActiveGuiDocument()->getDocument(), QObject::tr("Selection is empty"), - QObject::tr("Nothing is selected. Please select a B-spline.")); + QObject::tr("Nothing is selected. Select a B-spline.")); return; } @@ -935,8 +934,8 @@ void CmdSketcherInsertKnot::activated(int iMsg) Gui::TranslatedUserWarning( Obj, QObject::tr("Wrong selection"), - QObject::tr("Please select a B-spline to insert a knot (not a knot on it). " - "If the curve is not a B-spline, please convert it into one first.")); + QObject::tr("Select a B-spline to insert a knot (not a knot on it). " + "If the curve is not a B-spline, convert it into one first.")); } getSelection().clearSelection(); @@ -954,8 +953,8 @@ CmdSketcherJoinCurves::CmdSketcherJoinCurves() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Join curves"); - sToolTipText = QT_TR_NOOP("Join two curves at selected end points"); + sMenuText = QT_TR_NOOP("Join Curves"); + sToolTipText = QT_TR_NOOP("Joins 2 curves at selected end points"); sWhatsThis = "Sketcher_JoinCurves"; sStatusTip = sToolTipText; sPixmap = "Sketcher_JoinCurves"; @@ -990,7 +989,7 @@ void CmdSketcherJoinCurves::activated(int iMsg) Gui::TranslatedUserWarning( Obj, QObject::tr("Selection is empty"), - QObject::tr("Nothing is selected. Please select end points of curves.")); + QObject::tr("Nothing is selected. Select end points of curves.")); return; } case 1: { diff --git a/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp b/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp index 0e0158f73e..a9c46f6582 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp @@ -64,8 +64,8 @@ CmdSketcherBSplineDegree::CmdSketcherBSplineDegree() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide B-spline degree"); - sToolTipText = QT_TR_NOOP("Switches between showing and hiding the degree for all B-splines"); + sMenuText = QT_TR_NOOP("Toggle B-Spline Degree"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of the degree for all B-splines"); sWhatsThis = "Sketcher_BSplineDegree"; sStatusTip = sToolTipText; sPixmap = "Sketcher_BSplineDegree"; @@ -93,9 +93,8 @@ CmdSketcherBSplinePolygon::CmdSketcherBSplinePolygon() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide B-spline control polygon"); - sToolTipText = - QT_TR_NOOP("Switches between showing and hiding the control polygons for all B-splines"); + sMenuText = QT_TR_NOOP("Toggle B-Spline Control Polygon"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of the control polygons for all B-splines"); sWhatsThis = "Sketcher_BSplinePolygon"; sStatusTip = sToolTipText; sPixmap = "Sketcher_BSplinePolygon"; @@ -123,9 +122,8 @@ CmdSketcherBSplineComb::CmdSketcherBSplineComb() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide B-spline curvature comb"); - sToolTipText = - QT_TR_NOOP("Switches between showing and hiding the curvature comb for all B-splines"); + sMenuText = QT_TR_NOOP("Toggle B-Spline Curvature Comb"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of the curvature comb for all B-splines"); sWhatsThis = "Sketcher_BSplineComb"; sStatusTip = sToolTipText; sPixmap = "Sketcher_BSplineComb"; @@ -153,9 +151,8 @@ CmdSketcherBSplineKnotMultiplicity::CmdSketcherBSplineKnotMultiplicity() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide B-spline knot multiplicity"); - sToolTipText = - QT_TR_NOOP("Switches between showing and hiding the knot multiplicity for all B-splines"); + sMenuText = QT_TR_NOOP("Toggle B-spline knot multiplicity"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of the knot multiplicity for all B-splines"); sWhatsThis = "Sketcher_BSplineKnotMultiplicity"; sStatusTip = sToolTipText; sPixmap = "Sketcher_BSplineKnotMultiplicity"; @@ -183,9 +180,8 @@ CmdSketcherBSplinePoleWeight::CmdSketcherBSplinePoleWeight() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide B-spline control point weight"); - sToolTipText = QT_TR_NOOP( - "Switches between showing and hiding the control point weight for all B-splines"); + sMenuText = QT_TR_NOOP("Toggle B-Spline Control Point Weight"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of control point weights for all B-splines"); sWhatsThis = "Sketcher_BSplinePoleWeight"; sStatusTip = sToolTipText; sPixmap = "Sketcher_BSplinePoleWeight"; @@ -214,8 +210,8 @@ CmdSketcherCompBSplineShowHideGeometryInformation:: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide B-spline information layer"); - sToolTipText = sMenuText; + sMenuText = QT_TR_NOOP("Toggle B-Spline Information Layer"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of the information layer for all B-splines"); sWhatsThis = "Sketcher_CompBSplineShowHideGeometryInformation"; sStatusTip = sToolTipText; eType = ForEdit; @@ -359,9 +355,8 @@ CmdSketcherArcOverlay::CmdSketcherArcOverlay() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide circular helper for arcs"); - sToolTipText = - QT_TR_NOOP("Switches between showing and hiding the circular helper for all arcs"); + sMenuText = QT_TR_NOOP("Toggle Circular Helper for Arcs"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of the circular helpers for all arcs"); sWhatsThis = "Sketcher_ArcOverlay"; sStatusTip = sToolTipText; sPixmap = "Sketcher_ArcOverlay"; diff --git a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp index 13ccbea6cd..554c87eb35 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp @@ -222,8 +222,8 @@ CmdSketcherCopyClipboard::CmdSketcherCopyClipboard() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("C&opy in sketcher"); - sToolTipText = QT_TR_NOOP("Copy selected geometries and constraints to the clipboard"); + sMenuText = QT_TR_NOOP("C&opy Elements"); + sToolTipText = QT_TR_NOOP("Copies the selected geometries and constraints to the clipboard"); sWhatsThis = "Sketcher_CopyClipboard"; sStatusTip = sToolTipText; sPixmap = "edit-copy"; @@ -253,8 +253,8 @@ CmdSketcherCut::CmdSketcherCut() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("C&ut in sketcher"); - sToolTipText = QT_TR_NOOP("Cut selected geometries and constraints to the clipboard"); + sMenuText = QT_TR_NOOP("C&ut Elements"); + sToolTipText = QT_TR_NOOP("Cuts the selected geometries and constraints to the clipboard"); sWhatsThis = "Sketcher_Cut"; sStatusTip = sToolTipText; sPixmap = "edit-cut"; @@ -293,8 +293,8 @@ CmdSketcherPaste::CmdSketcherPaste() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("P&aste in sketcher"); - sToolTipText = QT_TR_NOOP("Paste selected geometries and constraints from the clipboard"); + sMenuText = QT_TR_NOOP("P&aste Elements"); + sToolTipText = QT_TR_NOOP("Pastes the geometries and constraints from the clipboard into the sketch"); sWhatsThis = "Sketcher_Paste"; sStatusTip = sToolTipText; sPixmap = "edit-paste"; @@ -341,9 +341,9 @@ CmdSketcherSelectConstraints::CmdSketcherSelectConstraints() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select associated constraints"); + sMenuText = QT_TR_NOOP("Select Associated Constraints"); sToolTipText = - QT_TR_NOOP("Select the constraints associated with the selected geometrical elements"); + QT_TR_NOOP("Selects the constraints associated with the selected geometrical elements"); sWhatsThis = "Sketcher_SelectConstraints"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectConstraints"; @@ -425,8 +425,8 @@ CmdSketcherSelectOrigin::CmdSketcherSelectOrigin() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select origin"); - sToolTipText = QT_TR_NOOP("Select the local origin point of the sketch"); + sMenuText = QT_TR_NOOP("Select Origin"); + sToolTipText = QT_TR_NOOP("Selects the local origin point of the sketch"); sWhatsThis = "Sketcher_SelectOrigin"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectOrigin"; @@ -469,8 +469,8 @@ CmdSketcherSelectVerticalAxis::CmdSketcherSelectVerticalAxis() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select vertical axis"); - sToolTipText = QT_TR_NOOP("Select the local vertical axis of the sketch"); + sMenuText = QT_TR_NOOP("Select Vertical Axis"); + sToolTipText = QT_TR_NOOP("Selects the local vertical axis of the sketch"); sWhatsThis = "Sketcher_SelectVerticalAxis"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectVerticalAxis"; @@ -510,8 +510,8 @@ CmdSketcherSelectHorizontalAxis::CmdSketcherSelectHorizontalAxis() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select horizontal axis"); - sToolTipText = QT_TR_NOOP("Select the local horizontal axis of the sketch"); + sMenuText = QT_TR_NOOP("Select Horizontal Axis"); + sToolTipText = QT_TR_NOOP("Selects the local horizontal axis of the sketch"); sWhatsThis = "Sketcher_SelectHorizontalAxis"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectHorizontalAxis"; @@ -550,8 +550,8 @@ CmdSketcherSelectRedundantConstraints::CmdSketcherSelectRedundantConstraints() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select redundant constraints"); - sToolTipText = QT_TR_NOOP("Select redundant constraints"); + sMenuText = QT_TR_NOOP("Select Redundant Constraints"); + sToolTipText = QT_TR_NOOP("Selects all redundant constraints"); sWhatsThis = "Sketcher_SelectRedundantConstraints"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectRedundantConstraints"; @@ -608,8 +608,8 @@ CmdSketcherSelectMalformedConstraints::CmdSketcherSelectMalformedConstraints() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select malformed constraints"); - sToolTipText = QT_TR_NOOP("Select malformed constraints"); + sMenuText = QT_TR_NOOP("Select Malformed Constraints"); + sToolTipText = QT_TR_NOOP("Selects all malformed constraints"); sWhatsThis = "Sketcher_SelectMalformedConstraints"; sStatusTip = sToolTipText; eType = ForEdit; @@ -663,8 +663,8 @@ CmdSketcherSelectPartiallyRedundantConstraints::CmdSketcherSelectPartiallyRedund { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select partially redundant constraints"); - sToolTipText = QT_TR_NOOP("Select partially redundant constraints"); + sMenuText = QT_TR_NOOP("Select Partially Redundant Constraints"); + sToolTipText = QT_TR_NOOP("Selects all partially redundant constraints"); sWhatsThis = "Sketcher_SelectPartiallyRedundantConstraints"; sStatusTip = sToolTipText; eType = ForEdit; @@ -719,8 +719,8 @@ CmdSketcherSelectConflictingConstraints::CmdSketcherSelectConflictingConstraints { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select conflicting constraints"); - sToolTipText = QT_TR_NOOP("Select conflicting constraints"); + sMenuText = QT_TR_NOOP("Select Conflicting Constraints"); + sToolTipText = QT_TR_NOOP("Selects all conflicting constraints"); sWhatsThis = "Sketcher_SelectConflictingConstraints"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectConflictingConstraints"; @@ -777,9 +777,9 @@ CmdSketcherSelectElementsAssociatedWithConstraints:: { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select associated geometry"); + sMenuText = QT_TR_NOOP("Select Associated Geometry"); sToolTipText = - QT_TR_NOOP("Select the geometrical elements associated with the selected constraints"); + QT_TR_NOOP("Selects the geometrical elements associated with the selected constraints"); sWhatsThis = "Sketcher_SelectElementsAssociatedWithConstraints"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectElementsAssociatedWithConstraints"; @@ -897,9 +897,9 @@ CmdSketcherSelectElementsWithDoFs::CmdSketcherSelectElementsWithDoFs() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Select under-constrained elements"); - sToolTipText = QT_TR_NOOP("Select geometrical elements where the solver still detects " - "unconstrained degrees of freedom."); + sMenuText = QT_TR_NOOP("Select Under-Constrained Elements"); + sToolTipText = QT_TR_NOOP("Selects geometrical elements where the solver still detects " + "unconstrained degrees of freedom"); sWhatsThis = "Sketcher_SelectElementsWithDoFs"; sStatusTip = sToolTipText; sPixmap = "Sketcher_SelectElementsWithDoFs"; @@ -986,8 +986,8 @@ CmdSketcherRestoreInternalAlignmentGeometry::CmdSketcherRestoreInternalAlignment { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Show/hide internal geometry"); - sToolTipText = QT_TR_NOOP("Show all internal geometry or hide unused internal geometry"); + sMenuText = QT_TR_NOOP("Toggle Internal Geometry"); + sToolTipText = QT_TR_NOOP("Toggles the visibility of all internal geometry"); sWhatsThis = "Sketcher_RestoreInternalAlignmentGeometry"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Element_Ellipse_All"; @@ -1101,9 +1101,9 @@ CmdSketcherSymmetry::CmdSketcherSymmetry() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Symmetry"); + sMenuText = QT_TR_NOOP("Mirror"); sToolTipText = - QT_TR_NOOP("Creates symmetric of selected geometry. After starting the tool select the reference line or point."); + QT_TR_NOOP("Creates a mirrored copy of the selected geometry"); sWhatsThis = "Sketcher_Symmetry"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Symmetry"; @@ -1919,7 +1919,7 @@ CmdSketcherRectangularArray::CmdSketcherRectangularArray() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Rectangular array"); + sMenuText = QT_TR_NOOP("Rectangular Array"); sToolTipText = QT_TR_NOOP("Creates a rectangular array pattern of the geometry taking as " "reference the last selected point"); sWhatsThis = "Sketcher_RectangularArray"; @@ -2071,8 +2071,8 @@ CmdSketcherDeleteAllGeometry::CmdSketcherDeleteAllGeometry() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Delete all geometry"); - sToolTipText = QT_TR_NOOP("Delete all geometry and constraints in the current sketch, " + sMenuText = QT_TR_NOOP("Delete All Geometry"); + sToolTipText = QT_TR_NOOP("Deletes all geometry and their constraints in the current sketch, " "with the exception of external geometry"); sWhatsThis = "Sketcher_DeleteAllGeometry"; sStatusTip = sToolTipText; @@ -2087,8 +2087,8 @@ void CmdSketcherDeleteAllGeometry::activated(int iMsg) int ret = QMessageBox::question( Gui::getMainWindow(), - QObject::tr("Delete All Geometry"), - QObject::tr("Are you really sure you want to delete all geometry and constraints?"), + QObject::tr("Delete all geometry"), + QObject::tr("Delete all geometry and constraints?"), QMessageBox::Yes, QMessageBox::Cancel); // use an equality constraint @@ -2136,8 +2136,8 @@ CmdSketcherDeleteAllConstraints::CmdSketcherDeleteAllConstraints() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Delete all constraints"); - sToolTipText = QT_TR_NOOP("Delete all constraints in the sketch"); + sMenuText = QT_TR_NOOP("Delete All Constraints"); + sToolTipText = QT_TR_NOOP("Deletes all constraints in the sketch"); sWhatsThis = "Sketcher_DeleteAllConstraints"; sStatusTip = sToolTipText; sPixmap = "Sketcher_DeleteConstraints"; @@ -2151,8 +2151,8 @@ void CmdSketcherDeleteAllConstraints::activated(int iMsg) int ret = QMessageBox::question( Gui::getMainWindow(), - QObject::tr("Delete All Constraints"), - QObject::tr("Are you really sure you want to delete all the constraints?"), + QObject::tr("Delete all constraints"), + QObject::tr("Delete all the constraints in the sketch?"), QMessageBox::Yes, QMessageBox::Cancel); @@ -2161,7 +2161,7 @@ void CmdSketcherDeleteAllConstraints::activated(int iMsg) Sketcher::SketchObject* Obj = getSketchObject(); try { - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Delete All Constraints")); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Delete all constraints")); Gui::cmdAppObjectArgs(Obj, "deleteAllConstraints()"); Gui::Command::commitCommand(); } @@ -2203,8 +2203,8 @@ CmdSketcherRemoveAxesAlignment::CmdSketcherRemoveAxesAlignment() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Remove axes alignment"); - sToolTipText = QT_TR_NOOP("Modifies constraints to remove axes alignment while trying to " + sMenuText = QT_TR_NOOP("Remove Axes Alignment"); + sToolTipText = QT_TR_NOOP("Modifies the constraints to remove axes alignment while trying to " "preserve the constraint relationship of the selection"); sWhatsThis = "Sketcher_RemoveAxesAlignment"; sStatusTip = sToolTipText; @@ -2323,8 +2323,8 @@ CmdSketcherOffset::CmdSketcherOffset() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Offset geometry"); - sToolTipText = QT_TR_NOOP("Offset selected geometries. A positive offset length makes the offset go outward, a negative length inward."); + sMenuText = QT_TR_NOOP("Offset"); + sToolTipText = QT_TR_NOOP("Offsets the selected geometry: positive values offset outward, negative values inward"); sWhatsThis = "Sketcher_Offset"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Offset"; @@ -2406,8 +2406,8 @@ CmdSketcherRotate::CmdSketcherRotate() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Rotate / Polar transform"); - sToolTipText = QT_TR_NOOP("Rotate selected geometries, making n copies, enable creation of circular patterns."); + sMenuText = QT_TR_NOOP("Rotate/Polar Transform"); + sToolTipText = QT_TR_NOOP("Rotates the selected geometry by creating 'n' copies, enabling circular pattern creation"); sWhatsThis = "Sketcher_Rotate"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Rotate"; @@ -2440,8 +2440,8 @@ CmdSketcherScale::CmdSketcherScale() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Scale transform"); - sToolTipText = QT_TR_NOOP("Scale selected geometries. After selecting the center point you can either enter the scale factor, or select two reference points then scale factor = length(p2-center) / length(p1-center)."); + sMenuText = QT_TR_NOOP("Scale"); + sToolTipText = QT_TR_NOOP("Scales the selected geometries"); sWhatsThis = "Sketcher_Scale"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Scale"; @@ -2474,8 +2474,8 @@ CmdSketcherTranslate::CmdSketcherTranslate() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Move / Array transform"); - sToolTipText = QT_TR_NOOP("Translate selected geometries. Enable creation of i * j copies."); + sMenuText = QT_TR_NOOP("Move / Array Transform"); + sToolTipText = QT_TR_NOOP("Translates the selected geometries and enables the creation of 'i' * 'j' copies"); sWhatsThis = "Sketcher_Translate"; sStatusTip = sToolTipText; sPixmap = "Sketcher_Translate"; diff --git a/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp b/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp index 4af8107eb2..9e04753465 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp @@ -91,7 +91,7 @@ CmdSketcherSwitchVirtualSpace::CmdSketcherSwitchVirtualSpace() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Switch virtual space"); + sMenuText = QT_TR_NOOP("Switch Virtual Space"); sToolTipText = QT_TR_NOOP("Switches the selected constraints or the view to the other virtual space"); sWhatsThis = "Sketcher_SwitchVirtualSpace"; @@ -117,7 +117,7 @@ void CmdSketcherSwitchVirtualSpace::activated(int iMsg) || !selection[0].isObjectTypeOf(Sketcher::SketchObject::getClassTypeId())) { Gui::TranslatedUserWarning(getActiveGuiDocument(), QObject::tr("Wrong selection"), - QObject::tr("Select constraint(s) from the sketch.")); + QObject::tr("Select constraints from the sketch.")); return; } @@ -126,7 +126,7 @@ void CmdSketcherSwitchVirtualSpace::activated(int iMsg) if (SubNames.empty()) { Gui::TranslatedUserWarning(getActiveGuiDocument(), QObject::tr("Wrong selection"), - QObject::tr("Select constraint(s) from the sketch.")); + QObject::tr("Select constraints from the sketch.")); return; } @@ -153,7 +153,7 @@ void CmdSketcherSwitchVirtualSpace::activated(int iMsg) if (SubNames.empty()) { Gui::TranslatedUserWarning(getActiveGuiDocument(), QObject::tr("Wrong selection"), - QObject::tr("Select constraint(s) from the sketch.")); + QObject::tr("Select constraints from the sketch.")); return; } diff --git a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp index d3f8ac32b7..b2278d8530 100644 --- a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp +++ b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp @@ -118,41 +118,41 @@ int EditDatumDialog::exec(bool atCursor) ui_ins_datum->labelEdit->setEntryName(QByteArray("DatumValue")); if (Constr->Type == Sketcher::Angle) { datum = Base::toDegrees(datum); - dlg.setWindowTitle(tr("Insert angle")); + dlg.setWindowTitle(tr("Insert Angle")); init_val.setUnit(Base::Unit::Angle); ui_ins_datum->label->setText(tr("Angle:")); ui_ins_datum->labelEdit->setParamGrpPath( QByteArray("User parameter:BaseApp/History/SketcherAngle")); } else if (Constr->Type == Sketcher::Radius) { - dlg.setWindowTitle(tr("Insert radius")); + dlg.setWindowTitle(tr("Insert Radius")); init_val.setUnit(Base::Unit::Length); ui_ins_datum->label->setText(tr("Radius:")); ui_ins_datum->labelEdit->setParamGrpPath( QByteArray("User parameter:BaseApp/History/SketcherLength")); } else if (Constr->Type == Sketcher::Diameter) { - dlg.setWindowTitle(tr("Insert diameter")); + dlg.setWindowTitle(tr("Insert Diameter")); init_val.setUnit(Base::Unit::Length); ui_ins_datum->label->setText(tr("Diameter:")); ui_ins_datum->labelEdit->setParamGrpPath( QByteArray("User parameter:BaseApp/History/SketcherLength")); } else if (Constr->Type == Sketcher::Weight) { - dlg.setWindowTitle(tr("Insert weight")); + dlg.setWindowTitle(tr("Insert Weight")); ui_ins_datum->label->setText(tr("Weight:")); ui_ins_datum->labelEdit->setParamGrpPath( QByteArray("User parameter:BaseApp/History/SketcherWeight")); } else if (Constr->Type == Sketcher::SnellsLaw) { - dlg.setWindowTitle(tr("Refractive index ratio", "Constraint_SnellsLaw")); + dlg.setWindowTitle(tr("Refractive Index Ratio", "Constraint_SnellsLaw")); ui_ins_datum->label->setText(tr("Ratio n2/n1:", "Constraint_SnellsLaw")); ui_ins_datum->labelEdit->setParamGrpPath( QByteArray("User parameter:BaseApp/History/SketcherRefrIndexRatio")); ui_ins_datum->labelEdit->setSingleStep(0.05); } else { - dlg.setWindowTitle(tr("Insert length")); + dlg.setWindowTitle(tr("Insert Length")); init_val.setUnit(Base::Unit::Length); ui_ins_datum->label->setText(tr("Length:")); ui_ins_datum->labelEdit->setParamGrpPath( diff --git a/src/Mod/Sketcher/Gui/InsertDatum.ui b/src/Mod/Sketcher/Gui/InsertDatum.ui index fa0ee8964a..aaa343ff36 100644 --- a/src/Mod/Sketcher/Gui/InsertDatum.ui +++ b/src/Mod/Sketcher/Gui/InsertDatum.ui @@ -20,7 +20,7 @@ - Insert datum + Insert Datum @@ -28,7 +28,7 @@ - datum: + Datum @@ -45,7 +45,7 @@ - Name (optional) + Name diff --git a/src/Mod/Sketcher/Gui/SketchMirrorDialog.ui b/src/Mod/Sketcher/Gui/SketchMirrorDialog.ui index 0b46c3f993..dad737dc1e 100644 --- a/src/Mod/Sketcher/Gui/SketchMirrorDialog.ui +++ b/src/Mod/Sketcher/Gui/SketchMirrorDialog.ui @@ -11,19 +11,19 @@ - Select Mirror Axis/Point + Select Mirror Axis or Point - Select Mirror Axis/Point + Select Mirror Axis or Point - X-Axis + X-axis true @@ -33,7 +33,7 @@ - Y-Axis + Y-axis diff --git a/src/Mod/Sketcher/Gui/SketchOrientationDialog.ui b/src/Mod/Sketcher/Gui/SketchOrientationDialog.ui index 748322e657..e0efce274e 100644 --- a/src/Mod/Sketcher/Gui/SketchOrientationDialog.ui +++ b/src/Mod/Sketcher/Gui/SketchOrientationDialog.ui @@ -11,19 +11,19 @@ - Choose orientation + Choose Orientation - Sketch orientation + Sketch Orientation - XY-Plane + XY-plane true @@ -33,14 +33,14 @@ - XZ-Plane + XZ-plane - YZ-Plane + YZ-plane @@ -78,7 +78,7 @@ - Offset: + Offset diff --git a/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.ui b/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.ui index cf6c11c4d2..70ea10b4c9 100644 --- a/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.ui +++ b/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.ui @@ -14,7 +14,7 @@ - Create array + Create Array @@ -22,7 +22,7 @@ - Columns: + Columns @@ -49,7 +49,7 @@ - Rows: + Rows @@ -90,8 +90,7 @@ - If selected, each element in the array is constrained -with respect to the others using construction lines + Constrains each element in the array with respect to the others using construction lines Qt::LeftToRight @@ -113,9 +112,8 @@ with respect to the others using construction lines - If selected, it substitutes dimensional constraints by geometric constraints -in the copies, so that a change in the original element is directly -reflected on copies + Substitutes dimensional constraints by geometric constraints +in the copies, so that a change in the original element is reflected on copies Clone diff --git a/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.ui b/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.ui index e28f7f4b70..75dbd21310 100644 --- a/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.ui +++ b/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.ui @@ -14,7 +14,7 @@ - Create regular polygon + Create Regular Polygon @@ -22,7 +22,7 @@ - Number of sides: + Number of sides diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.ui b/src/Mod/Sketcher/Gui/SketcherSettings.ui index 6c3a0dc52d..ca3ef8bc83 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettings.ui @@ -17,14 +17,13 @@ - Task panel widgets + Task Panel Widgets - Sketcher dialog will have additional section -'Advanced solver control' to adjust solver settings + Displays the additional section 'Advanced solver control' to adjust solver settings in the task view Show section 'Advanced solver control' @@ -43,7 +42,7 @@ - Dragging performance + Dragging Performance @@ -105,10 +104,10 @@ Requires to re-enter edit mode to take effect. - New constraints that would be redundant will automatically be removed + Automatically removes newly added redundant constraints - Auto remove redundants + Auto remove redundant constraints false @@ -124,7 +123,7 @@ Requires to re-enter edit mode to take effect. - Allow leaving sketch edit mode when pressing Esc button + Allows to leave the sketch edit mode by pressing the Esc key Esc can leave sketch edit mode @@ -162,10 +161,10 @@ Requires to re-enter edit mode to take effect. - Unify Coincident and PointOnObject in a single tool. + Unifies the coincident and point-on-object constraints in a single tool - Unify Coincident and PointOnObject + Unify coincident and point-on-object constraints true @@ -181,10 +180,10 @@ Requires to re-enter edit mode to take effect. - Use the automatic horizontal/vertical constraint tool. This create a command group in which you have the auto tool, horizontal and vertical. + Unifies the horizontal and vertical constraints to an automatic command - Auto tool for Horizontal/Vertical + Auto tool for horizontal/vertical constraints true @@ -200,7 +199,7 @@ Requires to re-enter edit mode to take effect. - If checked, show a command group button that contains both the polyline and line commands. Otherwise, each command has its own separate button. + Shows a command group button that contains both the polyline and line commands. Otherwise, each command has its own separate button. Group the polyline and line commands @@ -219,7 +218,7 @@ Requires to re-enter edit mode to take effect. - If checked then external geometry is always added as reference, otherwise it's added according to the current construction mode. + Always adds external geometry as construction geometry. Otherwise, it is added according to the current construction mode. Always add external geometry as reference @@ -247,7 +246,7 @@ Requires to re-enter edit mode to take effect. - Dimension constraint + Dimension Constraint @@ -274,14 +273,14 @@ This setting is only for the toolbar. Whichever you choose, all tools are always - Dimension tool diameter/radius mode: + Dimension tool diameter/radius mode - Dimensioning constraints: + Dimensioning constraints @@ -323,13 +322,13 @@ This setting is only for the toolbar. Whichever you choose, all tools are always - Tool parameters + Tool Parameters - On-View-Parameters: + On-view-parameters (OVP) diff --git a/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui b/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui index f279c9ee5c..8cdf655e67 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui @@ -17,7 +17,7 @@ - Working colors + Working Colors @@ -111,8 +111,7 @@ - Color of crosshair cursor. -(The one you get when creating a new sketch element.) + Color of the crosshair cursor @@ -137,7 +136,7 @@ - Geometric element colors + Geometric Element Colors @@ -255,7 +254,7 @@ - Line pattern of normal edges. + Line pattern of normal edges -1 @@ -265,7 +264,7 @@ - Width of normal edges. + Width of normal edges px @@ -352,7 +351,7 @@ - Line pattern of construction edges. + Line pattern of construction edges -1 @@ -362,7 +361,7 @@ - Width of construction edges. + Width of construction edges px @@ -449,7 +448,7 @@ - Line pattern of internal aligned edges. + Line pattern of internal aligned edges -1 @@ -459,7 +458,7 @@ - Width of internal aligned edges. + Width of internal aligned edges px @@ -520,7 +519,7 @@ - Line pattern of external edges. + Line pattern of external edges -1 @@ -530,7 +529,7 @@ - Width of external edges. + Width of external edges px @@ -591,7 +590,7 @@ - Line pattern of external defining edges. + Line pattern of external defining edges -1 @@ -601,7 +600,7 @@ - Width of external defining edges. + Width of external defining edges px @@ -704,7 +703,7 @@ - Constraint colors + Constraint Colors @@ -745,7 +744,7 @@ - Dimensional constraint + Dimensional constraints @@ -772,7 +771,7 @@ - Reference constraint + Reference constraints @@ -826,7 +825,7 @@ - Deactivated constraint + Deactivated constraints @@ -871,7 +870,7 @@ - Colors outside Sketcher + Colors Outside Sketcher diff --git a/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui b/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui index d01fd62539..553096f918 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui @@ -17,7 +17,7 @@ - Sketch editing + Sketch Editing @@ -39,7 +39,7 @@ - The 3D view is scaled based on this factor. + Scales the 3D view based on this factor Qt::ImhPreferNumbers @@ -70,7 +70,7 @@ - The number of polygons used for geometry approximation. + The number of polygons used for geometry approximation 50 @@ -89,7 +89,7 @@ - If checked, displays the name on dimensional constraints (if exists). + Displays names of dimensional constraints, if they exist Show dimensional constraint name with format @@ -141,7 +141,7 @@ Defaults to: %N = %V - The current sketcher creation tool will remain active after creation. + Keeps the current Sketcher tool active after creating geometry Geometry creation "Continue Mode" @@ -160,7 +160,7 @@ Defaults to: %N = %V - Font size used for labels and constraints. + Font size used for labels and constraints px @@ -218,7 +218,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - The current constraint creation tool will remain active after creation. + Keeps the current Sketcher constraint tool active after creating geometry Constraint creation "Continue Mode" @@ -237,10 +237,10 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - Cursor position coordinates will be displayed beside cursor while editing sketch. + Displays cursor position coordinates next to the cursor while editing a sketch - Show coordinates beside cursor while editing + Displays coordinates next to the cursor while editing true @@ -256,7 +256,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - A dialog will pop up to input a value for new dimensional constraints. + Opens a dialog to input a value for new dimensional constraints after creation Ask for value after creating a dimensional constraint @@ -275,7 +275,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - Cursor coordinates will use the system decimals setting instead of the short form. + Cursor coordinates will use the system decimals setting instead of the short form Use system decimals setting for cursor coordinates @@ -321,13 +321,13 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - Visibility automation + Visibility Automation - When opening a sketch, hide all features that depend on it. + Hides all object features that depend on the opened sketch Hide all objects that depend on the sketch @@ -346,7 +346,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - When opening a sketch, show sources for external geometry links. + Shows source objects which are used for external geometry in the opened sketch Show objects used for external geometry @@ -365,7 +365,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - When opening a sketch, show objects the sketch is attached to. + Shows objects the opened sketch is attached to Show objects that the sketch is attached to @@ -384,7 +384,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - When closing a sketch, move camera back to where it was before the sketch was opened. + Restores the camera position after closing the sketch Restore camera position after editing @@ -403,7 +403,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - When entering edit mode, force orthographic view of camera. + Forces the camera to an orthographic view when editing a sketch. Works only when "Restore camera position after editing" is enabled. @@ -423,11 +423,10 @@ Works only when "Restore camera position after editing" is enabled. - Open a sketch in Section View mode by default. -Then objects are only visible behind the sketch plane. + Opens a sketch in section view mode, showing only objects behind the sketch plane - Open sketch in Section View mode + Open sketch in section view mode false @@ -468,10 +467,10 @@ Then objects are only visible behind the sketch plane. - Applies current visibility automation settings to all sketches in open documents. + Applies current visibility automation settings to all sketches in the open documents - Apply to existing sketches + Apply to Existing Sketches diff --git a/src/Mod/Sketcher/Gui/SketcherSettingsGrid.ui b/src/Mod/Sketcher/Gui/SketcherSettingsGrid.ui index 6d671fcb0e..0692d0395a 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettingsGrid.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettingsGrid.ui @@ -17,7 +17,7 @@ - Grid settings + Grid Settings @@ -32,7 +32,7 @@ true - A grid will be shown + Displays a grid in the active sketch Grid @@ -54,10 +54,10 @@ true - Automatically adapt grid spacing based on the viewer dimensions. + Automatically adapts grid spacing based on the viewer dimensions - Grid Auto Spacing + Grid auto-spacing GridAuto @@ -81,7 +81,7 @@ Distance between two subsequent grid lines. -If 'Grid Auto Spacing' is enabled, will be used as base value. +If 'Grid auto-apacing' is enabled, it will be used as the base value mm @@ -122,8 +122,8 @@ If 'Grid Auto Spacing' is enabled, will be used as base value. - While using 'Grid Auto Spacing' this sets a threshold in pixel to the grid spacing. -The grid spacing change if it becomes smaller than this number of pixel. + While using 'Grid auto-spacing', this sets a pixel threshold for grid spacing. +The grid spacing changes if it becomes smaller than the specified pixel size. px @@ -151,7 +151,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Grid display + Grid Display @@ -163,7 +163,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Minor grid lines + Minor Grid Lines @@ -185,7 +185,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Line pattern used for grid lines. + Line pattern used for grid lines -1 @@ -269,7 +269,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Major grid lines + Major Grid Lines @@ -281,7 +281,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Major grid line every: + Major grid line interval gridNumberSubdivision @@ -291,7 +291,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Every N lines there will be a major line. Set to 1 to disable major lines. + Displays a major grid line every 'n' minor lines. Enter 1 to disable major lines 1 @@ -323,7 +323,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - Line pattern used for grid division. + Line pattern used for grid division -1 diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp index b7fa77f62c..e57ad24140 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp @@ -560,12 +560,12 @@ void ConstraintView::contextMenuEvent(QContextMenuEvent* event) // This does the same as a double-click and thus it should be the first action and with bold // text - QAction* change = menu.addAction(tr("Change value"), this, &ConstraintView::modifyCurrentItem); + QAction* change = menu.addAction(tr("Change Value"), this, &ConstraintView::modifyCurrentItem); change->setEnabled(isQuantity); menu.setDefaultAction(change); QAction* driven = - menu.addAction(tr("Toggle to/from reference"), this, &ConstraintView::updateDrivingStatus); + menu.addAction(tr("Toggle Driving/Reference"), this, &ConstraintView::updateDrivingStatus); driven->setEnabled(isToggleDriving); QAction* activate = menu.addAction( @@ -573,9 +573,9 @@ void ConstraintView::contextMenuEvent(QContextMenuEvent* event) activate->setEnabled(!items.isEmpty()); menu.addSeparator(); - QAction* show = menu.addAction(tr("Show constraints"), this, &ConstraintView::showConstraints); + QAction* show = menu.addAction(tr("Show Constraints"), this, &ConstraintView::showConstraints); show->setEnabled(!items.isEmpty()); - QAction* hide = menu.addAction(tr("Hide constraints"), this, &ConstraintView::hideConstraints); + QAction* hide = menu.addAction(tr("Hide Constraints"), this, &ConstraintView::hideConstraints); hide->setEnabled(!items.isEmpty()); menu.addSeparator(); @@ -592,7 +592,7 @@ void ConstraintView::contextMenuEvent(QContextMenuEvent* event) rename->setEnabled(item != nullptr); QAction* center = - menu.addAction(tr("Center sketch"), this, &ConstraintView::centerSelectedItems); + menu.addAction(tr("Center Sketch"), this, &ConstraintView::centerSelectedItems); center->setEnabled(item != nullptr); QAction* remove = menu.addAction(tr("Delete"), this, &ConstraintView::deleteSelectedItems); @@ -600,7 +600,7 @@ void ConstraintView::contextMenuEvent(QContextMenuEvent* event) remove->setEnabled(!items.isEmpty()); QAction* swap = menu.addAction( - tr("Swap constraint names"), this, &ConstraintView::swapNamedOfSelectedItems); + tr("Swap Constraint Names"), this, &ConstraintView::swapNamedOfSelectedItems); swap->setEnabled(items.size() == 2); menu.exec(event->globalPos()); @@ -843,8 +843,8 @@ TaskSketcherConstraints::TaskSketcherConstraints(ViewProviderSketch* sketchView) // FIXME there is probably a smarter way to handle this menu // FIXME translations aren't updated automatically at language change QAction* action1 = new QAction(tr("Auto constraints"), this); - QAction* action2 = new QAction(tr("Auto remove redundants"), this); - QAction* action3 = new QAction(tr("Show only filtered Constraints"), this); + QAction* action2 = new QAction(tr("Auto remove redundant constraints"), this); + QAction* action3 = new QAction(tr("Display only filtered constraints"), this); QAction* action4 = new QAction(tr("Extended information (in widget)"), this); QAction* action5 = new QAction(tr("Hide internal alignment (in widget)"), this); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.ui b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.ui index 0e322aa4f9..5d1c975c2b 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.ui +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.ui @@ -37,7 +37,7 @@ - Check to toggle filters + Toggles the chosen constraint filters padding-right: 0px; margin-right: 0px @@ -56,13 +56,13 @@ - Click to show filters + Filters constraints by type padding-left: 0px; margin-left: 0px - Filters + Filter QToolButton::MenuButtonPopup @@ -84,7 +84,7 @@ - Show/hide all listed constraints from 3D view. (same as ticking/unticking all listed constraints in list below) + Toggles the visibility of all listed constraints from the 3D view diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp index c649182d5c..b7f03f3ee6 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp @@ -62,28 +62,51 @@ using namespace Gui::TaskView; // Translation block for context menu: do not remove #if 0 QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Point Coincidence"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Point on Object"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Vertical Constraint"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Horizontal Constraint"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Parallel Constraint"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Perpendicular Constraint"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Tangent Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Equal Length"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Symmetric"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Equal Constraint"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Symmetric Constraint"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Block Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Lock Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Horizontal Distance"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Vertical Distance"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Length Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Radius Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Diameter Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Radiam Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Angle Constraint"); -QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Toggle construction geometry"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Lock Position"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Horizontal Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Vertical Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Length Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Radius Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Diameter Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Radius or Diameter Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Angle Dimension"); + +QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Construction Geometry"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Select Constraints"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Select Origin"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Select Horizontal Axis"); + QT_TRANSLATE_NOOP("SketcherGui::ElementView", "Select Vertical Axis"); + #endif /// Inserts a QAction into an existing menu @@ -667,90 +690,90 @@ void ElementView::contextMenuEvent(QContextMenuEvent* event) // CONTEXT_ITEM(ICONSTR,NAMESTR,CMDSTR,FUNC,ACTSONSELECTION) CONTEXT_ITEM("Constraint_PointOnPoint", - "Point Coincidence", + "Point coincidence", "Sketcher_ConstrainCoincident", doPointCoincidence, true) CONTEXT_ITEM("Constraint_PointOnObject", - "Point on Object", + "Point on object", "Sketcher_ConstrainPointOnObject", doPointOnObjectConstraint, true) CONTEXT_ITEM("Constraint_Horizontal", - "Horizontal Constraint", + "Horizontal constraint", "Sketcher_ConstrainHorizontal", doHorizontalConstraint, true) CONTEXT_ITEM("Constraint_Vertical", - "Vertical Constraint", + "Vertical constraint", "Sketcher_ConstrainVertical", doVerticalConstraint, true) CONTEXT_ITEM("Constraint_Parallel", - "Parallel Constraint", + "Parallel constraint", "Sketcher_ConstrainParallel", doParallelConstraint, true) CONTEXT_ITEM("Constraint_Perpendicular", - "Perpendicular Constraint", + "Perpendicular constraint", "Sketcher_ConstrainPerpendicular", doPerpendicularConstraint, true) CONTEXT_ITEM("Constraint_Tangent", - "Tangent Constraint", + "Tangent constraint", "Sketcher_ConstrainTangent", doTangentConstraint, true) CONTEXT_ITEM("Constraint_EqualLength", - "Equal Length", + "Equal constraint", "Sketcher_ConstrainEqual", doEqualConstraint, true) CONTEXT_ITEM("Constraint_Symmetric", - "Symmetric", + "Symmetric constraint", "Sketcher_ConstrainSymmetric", doSymmetricConstraint, true) CONTEXT_ITEM( - "Constraint_Block", "Block Constraint", "Sketcher_ConstrainBlock", doBlockConstraint, true) + "Constraint_Block", "Block constraint", "Sketcher_ConstrainBlock", doBlockConstraint, true) CONTEXT_ITEM("Constraint_HorizontalDistance", - "Horizontal Distance", + "Horizontal dimension", "Sketcher_ConstrainDistanceX", doHorizontalDistance, true) CONTEXT_ITEM("Constraint_VerticalDistance", - "Vertical Distance", + "Vertical dimension", "Sketcher_ConstrainDistanceY", doVerticalDistance, true) CONTEXT_ITEM("Constraint_Length", - "Length Constraint", + "Length dimension", "Sketcher_ConstrainDistance", doLengthConstraint, true) CONTEXT_ITEM("Constraint_Radiam", - "Radiam Constraint", + "Radius or diameter", "Sketcher_ConstrainRadiam", doRadiamConstraint, true) CONTEXT_ITEM("Constraint_Radius", - "Radius Constraint", + "Radius", "Sketcher_ConstrainRadius", doRadiusConstraint, true) CONTEXT_ITEM("Constraint_Diameter", - "Diameter Constraint", + "Diameter", "Sketcher_ConstrainDiameter", doDiameterConstraint, true) CONTEXT_ITEM("Constraint_InternalAngle", - "Angle Constraint", + "Angle", "Sketcher_ConstrainAngle", doAngleConstraint, true) CONTEXT_ITEM( - "Constraint_Lock", "Lock Constraint", "Sketcher_ConstrainLock", doLockConstraint, true) + "Constraint_Lock", "Lock", "Sketcher_ConstrainLock", doLockConstraint, true) menu.addSeparator(); @@ -763,19 +786,19 @@ void ElementView::contextMenuEvent(QContextMenuEvent* event) menu.addSeparator(); CONTEXT_ITEM("Sketcher_SelectConstraints", - "Select Constraints", + "Select constraints", "Sketcher_SelectConstraints", doSelectConstraints, true) CONTEXT_ITEM( "Sketcher_SelectOrigin", "Select Origin", "Sketcher_SelectOrigin", doSelectOrigin, false) CONTEXT_ITEM("Sketcher_SelectHorizontalAxis", - "Select Horizontal Axis", + "Select horizontal axis", "Sketcher_SelectHorizontalAxis", doSelectHAxis, false) CONTEXT_ITEM("Sketcher_SelectVerticalAxis", - "Select Vertical Axis", + "Select vertical axis", "Sketcher_SelectVerticalAxis", doSelectVAxis, false) @@ -1898,21 +1921,21 @@ void TaskSketcherElements::slotElementsChanged() ? (QStringLiteral("-") + tr("Construction")) : (internalAligned ? (QStringLiteral("-") + tr("Internal")) : QStringLiteral(""))) - : (QStringLiteral("%1-").arg(i) + tr("Elliptical Arc"))) + : (QStringLiteral("%1-").arg(i) + tr("Elliptical arc"))) : type == Part::GeomArcOfHyperbola::getClassTypeId() ? (isNamingBoxChecked ? (tr("Hyperbolic Arc") + IdInformation()) + (construction ? (QStringLiteral("-") + tr("Construction")) : (internalAligned ? (QStringLiteral("-") + tr("Internal")) : QStringLiteral(""))) - : (QStringLiteral("%1-").arg(i) + tr("Hyperbolic Arc"))) + : (QStringLiteral("%1-").arg(i) + tr("Hyperbolic arc"))) : type == Part::GeomArcOfParabola::getClassTypeId() ? (isNamingBoxChecked ? (tr("Parabolic Arc") + IdInformation()) + (construction ? (QStringLiteral("-") + tr("Construction")) : (internalAligned ? (QStringLiteral("-") + tr("Internal")) : QStringLiteral(""))) - : (QStringLiteral("%1-").arg(i) + tr("Parabolic Arc"))) + : (QStringLiteral("%1-").arg(i) + tr("Parabolic arc"))) : type == Part::GeomBSplineCurve::getClassTypeId() ? (isNamingBoxChecked ? (tr("B-spline") + IdInformation()) + (construction @@ -2016,15 +2039,15 @@ void TaskSketcherElements::slotElementsChanged() : type == Part::GeomArcOfEllipse::getClassTypeId() ? (isNamingBoxChecked ? (tr("Elliptical Arc") + linkname) - : (QStringLiteral("%1-").arg(i - 2) + tr("Elliptical Arc"))) + : (QStringLiteral("%1-").arg(i - 2) + tr("Elliptical arc"))) : type == Part::GeomArcOfHyperbola::getClassTypeId() ? (isNamingBoxChecked ? (tr("Hyperbolic Arc") + linkname) - : (QStringLiteral("%1-").arg(i - 2) + tr("Hyperbolic Arc"))) + : (QStringLiteral("%1-").arg(i - 2) + tr("Hyperbolic arc"))) : type == Part::GeomArcOfParabola::getClassTypeId() ? (isNamingBoxChecked ? (tr("Parabolic Arc") + linkname) - : (QStringLiteral("%1-").arg(i - 2) + tr("Parabolic Arc"))) + : (QStringLiteral("%1-").arg(i - 2) + tr("Parabolic arc"))) : type == Part::GeomBSplineCurve::getClassTypeId() ? (isNamingBoxChecked ? (tr("B-spline") + linkname) : (QStringLiteral("%1-").arg(i - 2) + tr("B-spline"))) diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.ui b/src/Mod/Sketcher/Gui/TaskSketcherElements.ui index 4ff1609321..f29e3d8b60 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.ui +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.ui @@ -37,7 +37,7 @@ - Check to toggle filters + Toggles the chosen element filters padding-right: 0px; margin-right: 0px @@ -56,13 +56,13 @@ - Click to show filters + Filters elements by type padding-left: 0px; margin-left: 0px - Filters + Filter QToolButton::MenuButtonPopup diff --git a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.ui.autosave b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.ui.autosave index 3b73e8be00..c8e320f693 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.ui.autosave +++ b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.ui.autosave @@ -54,7 +54,7 @@ - Auto Recompute + Auto recompute diff --git a/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp b/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp index 2a7f2e908c..945d83dfef 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp @@ -96,7 +96,7 @@ TaskSketcherMessages::TaskSketcherMessages(ViewProviderSketch* sketchView) sketchView->getSketchObject()->noRecomputes = !state; - QAction* action = new QAction(tr("Auto update"), this); + QAction* action = new QAction(tr("Auto Update"), this); action->setToolTip(tr("Executes a recomputation of active document after every sketch action")); action->setCheckable(true); action->setChecked(state); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherMessages.ui b/src/Mod/Sketcher/Gui/TaskSketcherMessages.ui index fb9d04e8e5..b46c8b6e35 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherMessages.ui +++ b/src/Mod/Sketcher/Gui/TaskSketcherMessages.ui @@ -37,7 +37,7 @@ - Forces recomputation of active document + Forces the recomputation of the active document diff --git a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.ui b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.ui index 764858ba02..ffbabb9a5e 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.ui +++ b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.ui @@ -19,17 +19,17 @@ - Default algorithm used for Sketch solving + Default algorithm used for solving the sketch - Default solver: + Default solver - Solver is used for solving the geometry. + Solver used for solving the geometry. LevenbergMarquardt and DogLeg are trust region optimization algorithms. BFGS solver uses the Broyden–Fletcher–Goldfarb–Shanno algorithm. @@ -69,7 +69,7 @@ BFGS solver uses the Broyden–Fletcher–Goldfarb–Shanno algorithm. Type of function to apply in DogLeg for the Gauss step - DogLeg Gauss step: + DogLeg Gauss step @@ -114,7 +114,7 @@ BFGS solver uses the Broyden–Fletcher–Goldfarb–Shanno algorithm. Maximum number of iterations of the default algorithm - Maximum iterations: + Maximum iterations @@ -147,10 +147,10 @@ BFGS solver uses the Broyden–Fletcher–Goldfarb–Shanno algorithm. - If selected, the Maximum iterations value is multiplied by the sketch size + Scales the maximum iteration count based on the sketch size - Sketch size multiplier: + Sketch size multiplier @@ -163,7 +163,7 @@ BFGS solver uses the Broyden–Fletcher–Goldfarb–Shanno algorithm. - Maximum iterations will be multiplied by number of parameters + Scales the maximum iteration count based on the number of parameters Qt::RightToLeft @@ -189,7 +189,7 @@ BFGS solver uses the Broyden–Fletcher–Goldfarb–Shanno algorithm. Error threshold under which convergence is reached - Convergence: + Convergence @@ -298,7 +298,7 @@ to determine whether a solution converges or not Algorithm used for the rank revealing QR decomposition - QR algorithm: + QR algorithm @@ -367,10 +367,10 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster - Solving algorithm used for determination of Redundant constraints + Solving algorithm used to detect redundant constraints - Redundant solver: + Redundant solver @@ -412,10 +412,10 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster - Maximum number of iterations of the solver used for determination of Redundant constraints + Maximum number of iterations of the solver used to detect redundant constraints - Redundant max. iterations: + Maximum redundant solver iterations @@ -448,10 +448,10 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster - If selected, the Maximum iterations value for the redundant algorithm is multiplied by the sketch size + Multiplies the maximum iterations value for the redundant algorithm by the sketch size - Redundant sketch size multiplier: + Redundant sketch size multiplier @@ -589,7 +589,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually fasterDegree of verbosity of the debug output to the console - Console debug mode: + Console debug mode diff --git a/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp b/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp index 95a5bac2ac..ea07d60487 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp @@ -286,10 +286,10 @@ void SketcherValidation::onFindReversedClicked() Gui::TranslatedUserWarning( *sketch, tr("Reversed external geometry"), - tr("%1 reversed external-geometry arcs were found. Their endpoints are" - " encircled in 3D view.\n\n" + tr("%1 reversed external geometry arcs were found. Their endpoints are" + " encircled in the 3D view.\n\n" "%2 constraints are linking to the endpoints. The constraints have" - " been listed in Report view (menu View -> Panels -> Report view).\n\n" + " been listed in the report view (menu View -> Panels -> Report view).\n\n" "Click \"Swap endpoints in constraints\" button to reassign endpoints." " Do this only once to sketches created in FreeCAD older than v0.15") .arg(points.size() / 2) @@ -301,8 +301,8 @@ void SketcherValidation::onFindReversedClicked() Gui::TranslatedUserWarning( *sketch, tr("Reversed external geometry"), - tr("%1 reversed external-geometry arcs were found. Their endpoints are " - "encircled in 3D view.\n\n" + tr("%1 reversed external geometry arcs were found. Their endpoints are " + "encircled in the 3D view.\n\n" "However, no constraints linking to the endpoints were found.") .arg(points.size() / 2)); @@ -312,7 +312,7 @@ void SketcherValidation::onFindReversedClicked() else { Gui::TranslatedNotification(*sketch, tr("Reversed external geometry"), - tr("No reversed external-geometry arcs were found.")); + tr("No reversed external geometry arcs were found.")); } } @@ -351,7 +351,7 @@ void SketcherValidation::onOrientLockEnableClicked() *sketch, tr("Constraint orientation locking"), tr("Orientation locking was enabled and recomputed for %1 constraints. The" - " constraints have been listed in Report view (menu View -> Panels ->" + " constraints have been listed in the report view (menu View -> Panels ->" " Report view).") .arg(n)); @@ -372,7 +372,7 @@ void SketcherValidation::onOrientLockDisableClicked() *sketch, tr("Constraint orientation locking"), tr("Orientation locking was disabled for %1 constraints. The" - " constraints have been listed in Report view (menu View -> Panels ->" + " constraints have been listed in the report view (menu View -> Panels ->" " Report view). Note that for all future constraints, the locking still" " defaults to ON.") .arg(n)); @@ -389,9 +389,9 @@ void SketcherValidation::onDelConstrExtrClicked() int reply = QMessageBox::question( this, tr("Delete constraints to external geom."), - tr("You are about to delete ALL constraints that deal with external geometry. This is " - "useful to rescue a sketch with broken/changed links to external geometry. Are you sure " - "you want to delete the constraints?"), + tr("This will delete all constraints that deal with external geometry. This is " + "useful to rescue a sketch with broken or changed links to external geometry. Delete " + "the constraints?"), QMessageBox::No | QMessageBox::Yes, QMessageBox::No); if (reply != QMessageBox::Yes) { diff --git a/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui b/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui index 4376b79207..efbe91d8e4 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui +++ b/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui @@ -11,13 +11,13 @@ - Sketcher validation + Sketch Validation - Open and non-manifold vertexes + Open and Non-Manifold Vertices @@ -35,11 +35,10 @@ - Highlights open and non-manifold vertexes that could lead to error if sketch is used to generate solids -This is purely based on topological shape of the sketch and not on its geometry/constrain set. + Highlights open and non-manifold vertices that could lead to errors if the sketch is used to generate solids. This is purely based on the topological shape of the sketch and not on its geometry/constraint set. - Highlight troublesome vertexes + Highlight Troublesome Vertices @@ -49,30 +48,30 @@ This is purely based on topological shape of the sketch and not on its geometry/ - Fixes found missing coincidences by adding extra coincident constrains + Fixes missing coincidences by adding extra coincident constraints - Missing coincidences + Missing Coincidences - Tolerance: + Tolerance - Defines the X/Y tolerance inside which missing coincidences are searched. + Defines the X/Y tolerance within which missing coincidences are detected - If checked, construction geometries are ignored in the search + Ignores construction geometry in the search Ignore construction geometry @@ -106,7 +105,7 @@ This is done by analyzing the sketch geometries and constraints. - Invalid constraints + Invalid Constraints @@ -135,7 +134,7 @@ This is done by analyzing the sketch geometries and constraints. Deletes constraints referring to external geometry - Delete constraints to external geom. + Delete Constraints Linked to External Geometry @@ -145,7 +144,7 @@ This is done by analyzing the sketch geometries and constraints. - Degenerated geometry + Degenerate Geometry @@ -174,7 +173,7 @@ This is done by analyzing the sketch geometries and constraints. - Reversed external geometry + Reversed External Geometry @@ -193,7 +192,7 @@ This is done by analyzing the sketch geometries and constraints. Fixes found reversed external geometries by swapping their endpoints - Swap endpoints in constraints + Swap Endpoints in Constraints @@ -203,7 +202,7 @@ This is done by analyzing the sketch geometries and constraints. - Constraint orientation locking + Constraint Orientation Locking diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 317ca5ea1b..2cd9a5eed3 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -2965,7 +2965,7 @@ void ViewProviderSketch::attach(App::DocumentObject* pcFeat) void ViewProviderSketch::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { - menu->addAction(tr("Edit sketch"), receiver, member); + menu->addAction(tr("Edit Sketch"), receiver, member); // Call the extensions ViewProvider::setupContextMenu(menu, receiver, member); } @@ -2983,7 +2983,7 @@ bool ViewProviderSketch::setEdit(int ModNum) if (dlg && !sketchDlg) { QMessageBox msgBox(Gui::getMainWindow()); msgBox.setText(tr("A dialog is already open in the task panel")); - msgBox.setInformativeText(tr("Do you want to close this dialog?")); + msgBox.setInformativeText(tr("Close this dialog?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); @@ -3002,8 +3002,8 @@ bool ViewProviderSketch::setEdit(int ModNum) if (!sketch->evaluateConstraints()) { QMessageBox box(Gui::getMainWindow()); box.setIcon(QMessageBox::Critical); - box.setWindowTitle(tr("Invalid sketch")); - box.setText(tr("Do you want to open the sketch validation tool?")); + box.setWindowTitle(tr("Invalid Sketch")); + box.setText(tr("Open the sketch validation tool?")); box.setInformativeText(tr("The sketch is invalid and cannot be edited.")); box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); box.setDefaultButton(QMessageBox::Yes); @@ -3148,15 +3148,15 @@ bool ViewProviderSketch::setEdit(int ModNum) QString ViewProviderSketch::appendConflictMsg(const std::vector& conflicting) { - return appendConstraintMsg(tr("Please remove the following constraint:"), - tr("Please remove at least one of the following constraints:"), + return appendConstraintMsg(tr("Remove the following constraint:"), + tr("Remove at least one of the following constraints:"), conflicting); } QString ViewProviderSketch::appendRedundantMsg(const std::vector& redundant) { - return appendConstraintMsg(tr("Please remove the following redundant constraint:"), - tr("Please remove the following redundant constraints:"), + return appendConstraintMsg(tr("Remove the following redundant constraint:"), + tr("Remove the following redundant constraints:"), redundant); } @@ -3169,8 +3169,8 @@ QString ViewProviderSketch::appendPartiallyRedundantMsg(const std::vector& QString ViewProviderSketch::appendMalformedMsg(const std::vector& malformed) { - return appendConstraintMsg(tr("Please remove the following malformed constraint:"), - tr("Please remove the following malformed constraints:"), + return appendConstraintMsg(tr("Remove the following malformed constraint:"), + tr("Remove the following malformed constraints:"), malformed); } @@ -3268,7 +3268,7 @@ void ViewProviderSketch::UpdateSolverInformation() signalSetUp(QStringLiteral("under_constrained"), tr("Under-constrained:") + QLatin1String(" "), QStringLiteral("#dofs"), - tr("%n DoF(s)", "", dofs)); + tr("%n Degrees of Freedom", "", dofs)); } else { signalSetUp( @@ -4095,7 +4095,7 @@ void ViewProviderSketch::generateContextMenu() bool onlyOrigin = false; Gui::MenuItem menu; - menu.setCommand("Sketcher context"); + menu.setCommand("Sketcher Context"); std::vector selection = Gui::Selection().getSelectionEx(0, Sketcher::SketchObject::getClassTypeId()); diff --git a/src/Mod/Sketcher/Gui/Workbench.cpp b/src/Mod/Sketcher/Gui/Workbench.cpp index 12440499ce..27f4760869 100644 --- a/src/Mod/Sketcher/Gui/Workbench.cpp +++ b/src/Mod/Sketcher/Gui/Workbench.cpp @@ -37,14 +37,15 @@ using namespace SketcherGui; qApp->translate("Workbench","P&rofiles"); qApp->translate("Workbench","S&ketch"); qApp->translate("Workbench", "Sketcher"); - qApp->translate("Workbench", "Sketcher edit mode"); - qApp->translate("Workbench", "Sketcher geometries"); - qApp->translate("Workbench", "Sketcher constraints"); - qApp->translate("Workbench", "Sketcher tools"); - qApp->translate("Workbench", "Sketcher B-spline tools"); - qApp->translate("Workbench", "Sketcher visual"); - qApp->translate("Workbench", "Sketcher virtual space"); - qApp->translate("Workbench", "Sketcher edit tools"); + qApp->translate("Workbench", "Sketcher Edit Mode"); + + qApp->translate("Workbench", "Geometries"); + qApp->translate("Workbench", "Constraints"); + qApp->translate("Workbench", "Sketcher Helpers"); + qApp->translate("Workbench", "B-Spline Tools"); + qApp->translate("Workbench", "Visual Tools"); + qApp->translate("Workbench", "Virtual Space"); + qApp->translate("Workbench", "Sketcher Edit Tools"); #endif /// @namespace SketcherGui @class Workbench @@ -73,23 +74,23 @@ Gui::MenuItem* Workbench::setupMenuBar() const // == Sketcher menu ========================================== Gui::MenuItem* geom = new Gui::MenuItem(); - geom->setCommand("Sketcher geometries"); + geom->setCommand("Geometries"); addSketcherWorkbenchGeometries(*geom); Gui::MenuItem* cons = new Gui::MenuItem(); - cons->setCommand("Sketcher constraints"); + cons->setCommand("Constraints"); addSketcherWorkbenchConstraints(*cons); Gui::MenuItem* consaccel = new Gui::MenuItem(); - consaccel->setCommand("Sketcher tools"); + consaccel->setCommand("Sketcher Tools"); addSketcherWorkbenchTools(*consaccel); Gui::MenuItem* bsplines = new Gui::MenuItem(); - bsplines->setCommand("Sketcher B-spline tools"); + bsplines->setCommand("B-Spline Tools"); addSketcherWorkbenchBSplines(*bsplines); Gui::MenuItem* visual = new Gui::MenuItem(); - visual->setCommand("Sketcher visual"); + visual->setCommand("Visual Helpers"); addSketcherWorkbenchVisual(*visual); Gui::MenuItem* sketch = new Gui::MenuItem; @@ -112,37 +113,37 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem* sketcherEditMode = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - sketcherEditMode->setCommand("Sketcher edit mode"); + sketcherEditMode->setCommand("Sketcher Edit Mode"); addSketcherWorkbenchSketchEditModeActions(*sketcherEditMode); Gui::ToolBarItem* geom = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - geom->setCommand("Sketcher geometries"); + geom->setCommand("Geometries"); addSketcherWorkbenchGeometries(*geom); Gui::ToolBarItem* cons = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - cons->setCommand("Sketcher constraints"); + cons->setCommand("Constraints"); addSketcherWorkbenchConstraints(*cons); Gui::ToolBarItem* consaccel = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - consaccel->setCommand("Sketcher tools"); + consaccel->setCommand("Sketcher Tools"); addSketcherWorkbenchTools(*consaccel); Gui::ToolBarItem* bspline = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - bspline->setCommand("Sketcher B-spline tools"); + bspline->setCommand("B-Spline Tools"); addSketcherWorkbenchBSplines(*bspline); Gui::ToolBarItem* visual = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - visual->setCommand("Sketcher visual"); + visual->setCommand("Visual Helpers"); addSketcherWorkbenchVisual(*visual); Gui::ToolBarItem* edittools = new Gui::ToolBarItem(root, Gui::ToolBarItem::DefaultVisibility::Unavailable); - edittools->setCommand("Sketcher edit tools"); + edittools->setCommand("Sketcher Edit Tools"); addSketcherWorkbenchEditTools(*edittools); return root; @@ -160,13 +161,13 @@ namespace { inline const QStringList editModeToolbarNames() { - return QStringList {QStringLiteral("Sketcher edit mode"), - QStringLiteral("Sketcher geometries"), - QStringLiteral("Sketcher constraints"), - QStringLiteral("Sketcher tools"), - QStringLiteral("Sketcher B-spline tools"), - QStringLiteral("Sketcher visual"), - QStringLiteral("Sketcher edit tools")}; + return QStringList {QStringLiteral("Edit Mode"), + QStringLiteral("Geometries"), + QStringLiteral("Constraints"), + QStringLiteral("Sketcher Tools"), + QStringLiteral("B-Spline Tools"), + QStringLiteral("Visual Helpers"), + QStringLiteral("Sketcher Edit Tools")}; } inline const QStringList nonEditModeToolbarNames() From 21eff412386e5647f91c97b011a15a0ca6cf7a94 Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:55:42 +0200 Subject: [PATCH 133/141] FEM: Update Command.cpp --- src/Mod/Fem/Gui/Command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 4199911b64..9b4c3a6f49 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -1540,7 +1540,7 @@ CmdFemCompEmEquations::CmdFemCompEmEquations() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Electromagnetic Qquations"); + sMenuText = QT_TR_NOOP("Electromagnetic Equations"); sToolTipText = QT_TR_NOOP("Electromagnetic equations for the Elmer solver"); sWhatsThis = "FEM_CompEmEquations"; sStatusTip = sToolTipText; From 3515db4a3b09615215046e9de7b1a0f89d2409d5 Mon Sep 17 00:00:00 2001 From: David Carter Date: Tue, 1 Jul 2025 21:11:45 -0400 Subject: [PATCH 134/141] Materials: Add support for embedded images Adds support for file types other than PNG to embedded images in materials. Adds checks to prevent crashing when an unsupported image type is used. --- src/Mod/Material/Gui/BaseDelegate.cpp | 2 +- src/Mod/Material/Gui/ImageEdit.cpp | 2 +- src/Mod/Material/Gui/MaterialsEditor.cpp | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Mod/Material/Gui/BaseDelegate.cpp b/src/Mod/Material/Gui/BaseDelegate.cpp index 12291aaf93..cf7b8cf375 100644 --- a/src/Mod/Material/Gui/BaseDelegate.cpp +++ b/src/Mod/Material/Gui/BaseDelegate.cpp @@ -126,7 +126,7 @@ void BaseDelegate::paintImage(QPainter* painter, QImage img; if (!propertyValue.isEmpty()) { QByteArray by = QByteArray::fromBase64(propertyValue.toUtf8()); - img = QImage::fromData(by, "PNG").scaled(64, 64, Qt::KeepAspectRatio); + img = QImage::fromData(by).scaled(64, 64, Qt::KeepAspectRatio); } QRect target(option.rect); if (target.width() > target.height()) { diff --git a/src/Mod/Material/Gui/ImageEdit.cpp b/src/Mod/Material/Gui/ImageEdit.cpp index 4629b3b053..5a0367b85a 100644 --- a/src/Mod/Material/Gui/ImageEdit.cpp +++ b/src/Mod/Material/Gui/ImageEdit.cpp @@ -134,7 +134,7 @@ ImageEdit::ImageEdit(const QString& propertyName, QString value = _property->getString(); if (!value.isEmpty()) { QByteArray by = QByteArray::fromBase64(value.toUtf8()); - QImage img = QImage::fromData(by, "PNG"); + QImage img = QImage::fromData(by); _pixmap = QPixmap::fromImage(img); } showPixmap(); diff --git a/src/Mod/Material/Gui/MaterialsEditor.cpp b/src/Mod/Material/Gui/MaterialsEditor.cpp index 1375a308cb..44d33e5d06 100644 --- a/src/Mod/Material/Gui/MaterialsEditor.cpp +++ b/src/Mod/Material/Gui/MaterialsEditor.cpp @@ -940,12 +940,11 @@ bool MaterialsEditor::updateTexturePreview() const try { auto property = _material->getAppearanceProperty(QStringLiteral("TextureImage")); if (!property->isNull()) { - // Base::Console().log("Has 'TextureImage'\n"); auto propertyValue = property->getString(); if (!propertyValue.isEmpty()) { QByteArray by = QByteArray::fromBase64(propertyValue.toUtf8()); - image = QImage::fromData(by, "PNG"); //.scaled(64, 64, Qt::KeepAspectRatio); - hasImage = true; + image = QImage::fromData(by); + hasImage = !image.isNull(); } } } @@ -962,9 +961,11 @@ bool MaterialsEditor::updateTexturePreview() const if (!image.load(filePath)) { Base::Console().log("Unable to load image '%s'\n", filePath.toStdString().c_str()); - // return; // ??? + hasImage = false; + } + else { + hasImage = !image.isNull(); } - hasImage = true; } } catch (const Materials::PropertyNotFound&) { From 82aad7c1043d91a988c4eff3ecccc2253360454e Mon Sep 17 00:00:00 2001 From: Pieter Hijma Date: Wed, 2 Jul 2025 16:34:17 +0200 Subject: [PATCH 135/141] Core: Fix property rename test --- tests/src/App/Property.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/src/App/Property.cpp b/tests/src/App/Property.cpp index 7333909544..6eaab505cb 100644 --- a/tests/src/App/Property.cpp +++ b/tests/src/App/Property.cpp @@ -278,6 +278,9 @@ TEST_F(RenameProperty, updateExpressionDifferentContainer) EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), nullptr); EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), prop); EXPECT_EQ(prop2->getValue(), Value); + + // Tear down + _doc->removeObject(varSet2->getNameInDocument()); } // Tests whether we can rename a property that is used in an expression in a different document @@ -313,6 +316,9 @@ TEST_F(RenameProperty, updateExpressionDifferentDocument) EXPECT_EQ(varSet->getDynamicPropertyByName("Variable"), nullptr); EXPECT_EQ(varSet->getDynamicPropertyByName("NewName"), prop); EXPECT_EQ(prop2->getValue(), Value); + + // Tear down + doc->removeObject(varSet2->getNameInDocument()); } // Tests whether we can rename a property and undo it From 93b8d66835c5c670b4afe5f0d9d0979e8cf75b53 Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:41:39 +0200 Subject: [PATCH 136/141] Core: Update DlgSettingsLightSources.ui --- src/Gui/PreferencePages/DlgSettingsLightSources.ui | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Gui/PreferencePages/DlgSettingsLightSources.ui b/src/Gui/PreferencePages/DlgSettingsLightSources.ui index 59f516abd5..7f543a6c3a 100644 --- a/src/Gui/PreferencePages/DlgSettingsLightSources.ui +++ b/src/Gui/PreferencePages/DlgSettingsLightSources.ui @@ -22,9 +22,6 @@ 2 - - Adjust the orientation of the directional light source by dragging the handle with the mouse or use the spin boxes for fine tuning. - Preview From 8f8b1afc8c20dfc1cd8d31ecf9670604e40a07a7 Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:07:02 +0200 Subject: [PATCH 137/141] FEM: Update TaskPostFrames.ui --- src/Mod/Fem/Gui/TaskPostFrames.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/TaskPostFrames.ui b/src/Mod/Fem/Gui/TaskPostFrames.ui index 1377e138b1..8c11d0562f 100644 --- a/src/Mod/Fem/Gui/TaskPostFrames.ui +++ b/src/Mod/Fem/Gui/TaskPostFrames.ui @@ -38,7 +38,7 @@ - Ressonance frequencies + Resonant frequencies From 914b566677630a2a86268ccafa001b2fe719cc32 Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:07:44 +0200 Subject: [PATCH 138/141] FEM: Update commands.py --- src/Mod/Fem/femcommands/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index c8341d589f..85a8420f53 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -732,7 +732,7 @@ class _MeshClear(CommandManager): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh") self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_MeshClear", "Clears the mesh of an FEM mesh object" + "FEM_MeshClear", "Clears the mesh of a FEM mesh object" ) self.is_active = "with_femmesh" From c593d8e8c1a650f4bb8fffeb2694baa5fc4a4cfc Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:10:15 +0200 Subject: [PATCH 139/141] FEM: Update Command.cpp --- src/Mod/Fem/Gui/Command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 9b4c3a6f49..26c50f9af5 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -882,8 +882,8 @@ CmdFemConstraintSpring::CmdFemConstraintSpring() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Spring Constraint"); - sToolTipText = QT_TR_NOOP("Creates a spring acting on a face"); + sMenuText = QT_TR_NOOP("Spring Boundary Condition"); + sToolTipText = QT_TR_NOOP("Creates a spring boundary condition on a face"); sWhatsThis = "FEM_ConstraintSpring"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintSpring"; From 43cb525948ae695aeb959bf2ab025dfea6d69e1c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 08:20:07 +0000 Subject: [PATCH 140/141] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/Mod/Fem/femcommands/commands.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 85a8420f53..061561cd26 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -731,9 +731,7 @@ class _MeshClear(CommandManager): def __init__(self): super().__init__() self.menutext = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM Mesh") - self.tooltip = Qt.QT_TRANSLATE_NOOP( - "FEM_MeshClear", "Clears the mesh of a FEM mesh object" - ) + self.tooltip = Qt.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clears the mesh of a FEM mesh object") self.is_active = "with_femmesh" def Activated(self): From 423f3cca6bebeabe2c810c10bb00b04a5dc5337d Mon Sep 17 00:00:00 2001 From: David Carter Date: Thu, 3 Jul 2025 14:32:27 -0400 Subject: [PATCH 141/141] Materials: Add import for unimplemented fields Adds import/export support for unimplemented material fields. This includes reference source and URLs, and tag fields. Tag support remains unimplemented in the editor, but is supported by a number of materials in the FCMat files. They can be accessed in both C++ and Python. --- src/Mod/Material/App/MaterialLoader.cpp | 11 +++++++++++ src/Mod/Material/App/Materials.cpp | 19 +++++++++++++++++++ src/Mod/Material/App/Materials.h | 10 ++++------ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/Mod/Material/App/MaterialLoader.cpp b/src/Mod/Material/App/MaterialLoader.cpp index 175f3caaf5..fbe0c4639d 100644 --- a/src/Mod/Material/App/MaterialLoader.cpp +++ b/src/Mod/Material/App/MaterialLoader.cpp @@ -180,12 +180,23 @@ void MaterialYamlEntry::addToTree( QString author = yamlValue(yamlModel["General"], "Author", ""); QString license = yamlValue(yamlModel["General"], "License", ""); QString description = yamlValue(yamlModel["General"], "Description", ""); + QString sourceReference = yamlValue(yamlModel["General"], "ReferenceSource", ""); + QString sourceURL = yamlValue(yamlModel["General"], "SourceURL", ""); std::shared_ptr finalModel = std::make_shared(library, directory, uuid, name); finalModel->setAuthor(author); finalModel->setLicense(license); finalModel->setDescription(description); + finalModel->setReference(sourceReference); + finalModel->setURL(sourceURL); + + if (yamlModel["General"]["Tags"]) { + auto tags = readList(yamlModel["General"]["Tags"]); + for (auto tag : *tags) { + finalModel->addTag(tag.toString()); + } + } // Add inheritance list if (yamlModel["Inherits"]) { diff --git a/src/Mod/Material/App/Materials.cpp b/src/Mod/Material/App/Materials.cpp index f2122dbf77..11afb9f78f 100644 --- a/src/Mod/Material/App/Materials.cpp +++ b/src/Mod/Material/App/Materials.cpp @@ -699,6 +699,19 @@ void Material::removeUUID(QSet& uuidList, const QString& uuid) uuidList.remove(uuid); } +void Material::addTag(const QString& tag) +{ + auto trimmed = tag.trimmed(); + if (!trimmed.isEmpty()) { + _tags.insert(trimmed); + } +} + +void Material::removeTag(const QString& tag) +{ + _tags.remove(tag); +} + void Material::addPhysical(const QString& uuid) { if (hasPhysicalModel(uuid)) { @@ -1327,6 +1340,12 @@ void Material::saveGeneral(QTextStream& stream) const if (!_reference.isEmpty()) { stream << " ReferenceSource: \"" << MaterialValue::escapeString(_reference) << "\"\n"; } + if (!_tags.isEmpty()) { + stream << " Tags:\n"; + for (auto tag : _tags) { + stream << " - \"" << tag << "\"\n"; + } + } } void Material::saveInherits(QTextStream& stream) const diff --git a/src/Mod/Material/App/Materials.h b/src/Mod/Material/App/Materials.h index 31cac1986f..e83c37f070 100644 --- a/src/Mod/Material/App/Materials.h +++ b/src/Mod/Material/App/Materials.h @@ -282,13 +282,11 @@ public: { _editState = ModelEdit_None; } - void addTag(const QString& tag) + void addTag(const QString& tag); + void removeTag(const QString& tag); + bool hasTag(const QString& tag) { - Q_UNUSED(tag); - } - void removeTag(const QString& tag) - { - Q_UNUSED(tag); + return _tags.contains(tag); } void addPhysical(const QString& uuid); void removePhysical(const QString& uuid);