Fix some typos and whitespace

This commit is contained in:
luz paz
2022-02-12 07:58:39 -05:00
committed by Uwe
parent 84dc25bcb3
commit 6718d8797e
8 changed files with 29 additions and 27 deletions

View File

@@ -79,7 +79,7 @@ class PyObjectBase;
* @remark One big consequence of this specification is that the programmer must know whether the Python interpreter
* gets the Python object or not. If the interpreter gets the object then it decrements the counter later on when
* the internal variable is freed. In case the interpreter doesn't get this object then the programmer must do the
* decrement on his own.
* decrement on their own.
*
* @note To not to undermine this specification the programmer must make sure to get the Python object always via
* GetPyObject().

View File

@@ -523,7 +523,7 @@ an empty dictionary if there is no intersection.
<UserDocu>getPlanarSegments(dev,[min faces=0]) -> list
Get all planes of the mesh as segment.
In the worst case each triangle can be regarded as single
plane if none of its neighours is coplanar.</UserDocu>
plane if none of its neighbours is coplanar.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getSegmentsOfType" Const="true">

View File

@@ -1987,7 +1987,7 @@ class FindUnifiedRegions:
tfBB_Area = tfBB.XLength * tfBB.YLength
# self._showShape(topFace, 'topFaceAlt_2_{}'.format(fNum))
if tfBB_Area < (fBB_Area * 0.9):
msg = "Faild to extract processing region for Face {}\n".format(
msg = "Failed to extract processing region for Face {}\n".format(
fNum
)
FreeCAD.Console.PrintError(msg)

View File

@@ -36,7 +36,7 @@ namespace KDL {
* class MySolver : public SolverI
* {
* public:
* static const int E_CHILDFAILD = xxx;
* static const int E_CHILDFAILED = xxx;
*
* MySolver(SomeOtherSolver& other);
* virtual ~MySolver();

View File

@@ -156,7 +156,7 @@ CmdTechDrawExtensionInsertDiameter::CmdTechDrawExtensionInsertDiameter()
void CmdTechDrawExtensionInsertDiameter::activated(int iMsg)
{
Q_UNUSED(iMsg);
execInsertPrefixChar(this, "");
execInsertPrefixChar(this, "");
}
bool CmdTechDrawExtensionInsertDiameter::isActive(void)

View File

@@ -1640,7 +1640,7 @@ CmdTechDrawExtendShortenLineGroup::CmdTechDrawExtendShortenLineGroup()
void CmdTechDrawExtendShortenLineGroup::activated(int iMsg)
{
// Base::Console().Message("CMD::ExtendShortenLineGroup - activated(%d)\n", iMsg);
// Base::Console().Message("CMD::ExtendShortenLineGroup - activated(%d)\n", iMsg);
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
if (dlg != nullptr) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"),
@@ -1772,7 +1772,7 @@ void CmdTechDrawExtensionAreaAnnotation::activated(int iMsg)
std::static_pointer_cast<TechDraw::Generic>(faceEdges[n]);
if ((nextEdge->points.at(0)-facePoints.back()).Length() < 0.01)
facePoints.push_back(nextEdge->points.at(1));
else
else
facePoints.push_back(nextEdge->points.at(0));
}
facePoints.push_back(facePoints.front());
@@ -1789,10 +1789,10 @@ void CmdTechDrawExtensionAreaAnnotation::activated(int iMsg)
}
faceArea = abs(faceArea)/2.0;
totalArea = totalArea + faceArea;
totalPoints = totalPoints + facePoints.size();
totalPoints = totalPoints + facePoints.size();
}
}
// if area calculation was successfull, wie start the command
// if area calculation was successful, start the command
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Calculate Face Area"));
// at first we create the balloon
std::string balloonName = _createBalloon(this, objFeat);
@@ -1800,15 +1800,15 @@ void CmdTechDrawExtensionAreaAnnotation::activated(int iMsg)
balloon = dynamic_cast<TechDraw::DrawViewBalloon *>(this->getDocument()->getObject(balloonName.c_str()));
if (!balloon)
throw Base::TypeError("CmdTechDrawNewBalloon - balloon not found\n");
// the balloon has been created successfull
// we calculate needed variables
// the balloon has been created successfully
// calculate needed variables
double scale = objFeat->getScale();
totalArea = totalArea*10*10; // Todo: get factor cm->mm if cm set
std::stringstream balloonText;
balloonText << " " << totalArea << " cm2 ";
xCenter = (xCenter/totalPoints)/scale;
yCenter = (yCenter/totalPoints)/scale;
// we set the attributes in the data tab's fields
// set the attributes in the data tab's fields
balloon->SourceView.setValue(objFeat);
balloon->BubbleShape.setValue("Rectangle");
balloon->EndType.setValue("None");
@@ -1820,14 +1820,14 @@ void CmdTechDrawExtensionAreaAnnotation::activated(int iMsg)
balloon->ShapeScale.setValue(0.75);
balloon->ScaleType.setValue("Page");
balloon->Text.setValue(balloonText.str());
// we look for the ballons's view provider
// look for the ballons's view provider
TechDraw::DrawPage* page = objFeat->findParentPage();
Gui::Document* guiDoc = Gui::Application::Instance->getDocument(page->getDocument());
auto viewProvider = static_cast<ViewProviderBalloon*>(guiDoc->getViewProvider(balloon));
if (viewProvider)
{
// view provider successfull found,
// we set the attributes in the view tab's fields
// view provider successfully found,
// set the attributes in the view tab's fields
viewProvider->Fontsize.setValue(2.0);
viewProvider->LineWidth.setValue(0.75);
viewProvider->LineVisible.setValue(false);
@@ -1868,7 +1868,7 @@ namespace TechDrawGui {
std::string pageName = viewPage->getDrawPage()->getNameInDocument();
cmd->doCommand(cmd->Doc, "App.activeDocument().addObject('TechDraw::DrawViewBalloon','%s')",
featName.c_str());
cmd->doCommand(cmd->Doc, "App.activeDocument().%s.addView(App.activeDocument().%s)",
cmd->doCommand(cmd->Doc, "App.activeDocument().%s.addView(App.activeDocument().%s)",
pageName.c_str(), featName.c_str());
return featName;
}

View File

@@ -8,13 +8,13 @@ class _TEMPLATEPY_Workbench ( Workbench ):
Icon = FreeCAD.getUserAppDataDir() + "Mod/_TEMPLATEPY_/Resources/icons/_TEMPLATEPY_Workbench.svg"
MenuText = "_TEMPLATEPY_"
ToolTip = "_TEMPLATEPY_ workbench"
def Initialize(self):
# load the module
import _TEMPLATEPY_Gui
self.appendToolbar('_TEMPLATEPY_',['_TEMPLATEPY__HelloWorld'])
self.appendMenu('_TEMPLATEPY_',['_TEMPLATEPY__HelloWorld'])
def GetClassName(self):
return "Gui::PythonWorkbench"

View File

@@ -1,14 +1,16 @@
# _TEMPLATE_ gui init module
# (c) 2001 Juergen Riegel LGPL
class _TEMPLATE_Workbench ( Workbench ):
"_TEMPLATE_ workbench object"
MenuText = "_TEMPLATE_"
ToolTip = "_TEMPLATE_ workbench"
def Initialize(self):
# load the module
import _TEMPLATE_Gui
def GetClassName(self):
return "_TEMPLATE_Gui::Workbench"
class _TEMPLATE_Workbench (Workbench):
"_TEMPLATE_ workbench object"
MenuText = "_TEMPLATE_"
ToolTip = "_TEMPLATE_ workbench"
def Initialize(self):
# load the module
import _TEMPLATE_Gui
def GetClassName(self):
return "_TEMPLATE_Gui::Workbench"
Gui.addWorkbench(_TEMPLATE_Workbench())