Misc. typo, grammar, and whitespace fixes

[skip ci]
This commit is contained in:
luz.paz
2018-11-26 15:55:30 -05:00
committed by Yorik van Havre
parent 70049f1b6b
commit cfbfa9dc6b
4 changed files with 269 additions and 269 deletions

View File

@@ -76,7 +76,7 @@ class ObjectSurface(PathOp.ObjectOp):
obj.addProperty("App::PropertyPercent", "StepOver", "Surface", QtCore.QT_TRANSLATE_NOOP("App::Property", "Step over percentage of the drop cutter path"))
obj.addProperty("App::PropertyDistance", "DepthOffset", "Surface", QtCore.QT_TRANSLATE_NOOP("App::Property", "Z-axis offset from the surface of the object"))
obj.addProperty("App::PropertyFloatConstraint", "SampleInterval", "Surface", QtCore.QT_TRANSLATE_NOOP("App::Property", "The Sample Interval. Small values cause long wait times"))
obj.addProperty("App::PropertyBool", "Optimize", "Surface", QtCore.QT_TRANSLATE_NOOP("App::Property", "Enable optimization which removes unecessary points from G-Code output"))
obj.addProperty("App::PropertyBool", "Optimize", "Surface", QtCore.QT_TRANSLATE_NOOP("App::Property", "Enable optimization which removes unnecessary points from G-Code output"))
obj.BoundBox = ['Stock', 'BaseBoundBox']
obj.DropCutterDir = ['X', 'Y']
obj.Algorithm = ['OCL Dropcutter', 'OCL Waterline']

View File

@@ -51,7 +51,7 @@ using namespace Sketcher;
// returns a string which represents the object e.g. when printed in python
std::string SketchObjectPy::representation(void) const
{
{
return "<Sketcher::SketchObject>";
}
@@ -66,7 +66,7 @@ PyObject* SketchObjectPy::solve(PyObject *args)
PyObject* SketchObjectPy::addGeometry(PyObject *args)
{
PyObject *pcObj;
PyObject *pcObj;
PyObject* construction; // this is an optional argument default false
bool isConstruction;
if (!PyArg_ParseTuple(args, "OO!", &pcObj, &PyBool_Type, &construction)) {
@@ -99,7 +99,7 @@ PyObject* SketchObjectPy::addGeometry(PyObject *args)
Part::GeomArcOfEllipse aoe;
aoe.setHandle(trim);
ret = this->getSketchObjectPtr()->addGeometry(&aoe,isConstruction);
}
}
else {
std::stringstream str;
str << "Unsupported geometry type: " << geo->getTypeId().getName();
@@ -232,7 +232,7 @@ PyObject* SketchObjectPy::deleteAllConstraints(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
if (this->getSketchObjectPtr()->deleteAllConstraints()) {
std::stringstream str;
str << "Unable to delete Constraints";
@@ -416,7 +416,7 @@ PyObject* SketchObjectPy::carbonCopy(PyObject *args)
Sketcher::SketchObject* skObj = this->getSketchObjectPtr();
App::DocumentObject * Obj = skObj->getDocument()->getObject(ObjectName);
if (!Obj) {
std::stringstream str;
str << ObjectName << " does not exist in the document";
@@ -430,7 +430,7 @@ PyObject* SketchObjectPy::carbonCopy(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
// add the external
if (skObj->carbonCopy(Obj, PyObject_IsTrue(construction) ? true : false) < 0) {
std::stringstream str;
@@ -438,7 +438,7 @@ PyObject* SketchObjectPy::carbonCopy(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
@@ -713,7 +713,7 @@ PyObject* SketchObjectPy::setDriving(PyObject *args)
{
PyObject* driving;
int constrid;
if (!PyArg_ParseTuple(args, "iO!", &constrid, &PyBool_Type, &driving))
return 0;
@@ -736,7 +736,7 @@ PyObject* SketchObjectPy::setDatumsDriving(PyObject *args)
if (this->getSketchObjectPtr()->setDatumsDriving(PyObject_IsTrue(driving) ? true : false)) {
std::stringstream str;
str << "Not able set all dimensionals driving/refernce";
str << "Not able set all dimensionals driving/reference";
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
@@ -764,7 +764,7 @@ PyObject* SketchObjectPy::getDriving(PyObject *args)
{
int constrid;
bool driving;
if (!PyArg_ParseTuple(args, "i", &constrid))
return 0;
@@ -779,7 +779,7 @@ PyObject* SketchObjectPy::getDriving(PyObject *args)
PyObject* SketchObjectPy::toggleDriving(PyObject *args)
{
int constrid;
if (!PyArg_ParseTuple(args, "i", &constrid))
return 0;
@@ -1002,7 +1002,7 @@ PyObject* SketchObjectPy::addSymmetric(PyObject *args)
int ret = this->getSketchObjectPtr()->addSymmetric(geoIdList,refGeoId,(Sketcher::PointPos) refPosId) + 1;
if(ret == -1)
throw Py::TypeError("Symmetric operation unsuccessful!");
throw Py::TypeError("Symmetric operation unsuccessful!");
std::size_t numGeo = geoIdList.size();
Py::Tuple tuple(numGeo);
@@ -1044,7 +1044,7 @@ PyObject* SketchObjectPy::addCopy(PyObject *args)
}
int ret = this->getSketchObjectPtr()->addCopy(geoIdList, vect, false, PyObject_IsTrue(clone) ? true : false) + 1;
if(ret == -1)
throw Py::TypeError("Copy operation unsuccessful!");
@@ -1060,7 +1060,7 @@ PyObject* SketchObjectPy::addCopy(PyObject *args)
std::string error = std::string("type must be list of GeoIds, not ");
error += pcObj->ob_type->tp_name;
throw Py::TypeError(error);
throw Py::TypeError(error);
}
PyObject* SketchObjectPy::addMove(PyObject *args)
@@ -1087,10 +1087,10 @@ PyObject* SketchObjectPy::addMove(PyObject *args)
}
this->getSketchObjectPtr()->addCopy(geoIdList, vect, true);
Py_Return;
}
std::string error = std::string("type must be list of GeoIds, not ");
error += pcObj->ob_type->tp_name;
throw Py::TypeError(error);
@@ -1103,8 +1103,8 @@ PyObject* SketchObjectPy::addRectangularArray(PyObject *args)
double perpscale=1.0;
PyObject* constraindisplacement= Py_False;
PyObject* clone= Py_False;
if (!PyArg_ParseTuple(args, "OO!O!ii|O!d", &pcObj, &(Base::VectorPy::Type), &pcVect,
if (!PyArg_ParseTuple(args, "OO!O!ii|O!d", &pcObj, &(Base::VectorPy::Type), &pcVect,
&PyBool_Type, &clone, &rows, &cols, &PyBool_Type, &constraindisplacement,&perpscale))
return 0;
@@ -1124,9 +1124,9 @@ PyObject* SketchObjectPy::addRectangularArray(PyObject *args)
#endif
}
int ret = this->getSketchObjectPtr()->addCopy(geoIdList,vect, false, PyObject_IsTrue(clone) ? true : false,
int ret = this->getSketchObjectPtr()->addCopy(geoIdList,vect, false, PyObject_IsTrue(clone) ? true : false,
rows, cols, PyObject_IsTrue(constraindisplacement) ? true : false, perpscale) + 1;
if(ret == -1)
throw Py::TypeError("Copy operation unsuccessful!");
Py_Return;
@@ -1134,7 +1134,7 @@ PyObject* SketchObjectPy::addRectangularArray(PyObject *args)
std::string error = std::string("type must be list of GeoIds, not ");
error += pcObj->ob_type->tp_name;
throw Py::TypeError(error);
throw Py::TypeError(error);
}
PyObject* SketchObjectPy::calculateAngleViaPoint(PyObject *args)
@@ -1214,7 +1214,7 @@ PyObject* SketchObjectPy::ExposeInternalGeometry(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
@@ -1232,7 +1232,7 @@ PyObject* SketchObjectPy::DeleteUnusedInternalGeometry(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
@@ -1291,17 +1291,17 @@ PyObject* SketchObjectPy::increaseBSplineDegree(PyObject *args)
{
int GeoId;
int incr = 1;
if (!PyArg_ParseTuple(args, "i|i", &GeoId, &incr))
return 0;
if (this->getSketchObjectPtr()->increaseBSplineDegree(GeoId, incr)==false) {
std::stringstream str;
str << "Degree increase failed for: " << GeoId;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
@@ -1320,14 +1320,14 @@ PyObject* SketchObjectPy::modifyBSplineKnotMultiplicity(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
PyObject* SketchObjectPy::autoconstraint(PyObject *args)
{
double precision = Precision::Confusion() * 1000;
double angleprecision = M_PI/8;
double angleprecision = M_PI/8;
PyObject* includeconstruction = Py_True;
@@ -1346,7 +1346,7 @@ PyObject* SketchObjectPy::autoconstraint(PyObject *args)
PyObject* SketchObjectPy::detectMissingPointOnPointConstraints(PyObject *args)
{
double precision = Precision::Confusion() * 1000;
double precision = Precision::Confusion() * 1000;
PyObject* includeconstruction = Py_True;
if (!PyArg_ParseTuple(args, "|dO!", &precision, &PyBool_Type, &includeconstruction))
@@ -1357,7 +1357,7 @@ PyObject* SketchObjectPy::detectMissingPointOnPointConstraints(PyObject *args)
PyObject* SketchObjectPy::detectMissingVerticalHorizontalConstraints(PyObject *args)
{
double angleprecision = M_PI/8;
double angleprecision = M_PI/8;
if (!PyArg_ParseTuple(args, "|d", &angleprecision))
return 0;
@@ -1367,7 +1367,7 @@ PyObject* SketchObjectPy::detectMissingVerticalHorizontalConstraints(PyObject *a
PyObject* SketchObjectPy::detectMissingEqualityConstraints(PyObject *args)
{
double precision = Precision::Confusion() * 1000;
double precision = Precision::Confusion() * 1000;
if (!PyArg_ParseTuple(args, "|d", &precision))
return 0;
@@ -1377,7 +1377,7 @@ PyObject* SketchObjectPy::detectMissingEqualityConstraints(PyObject *args)
PyObject* SketchObjectPy::analyseMissingPointOnPointCoincident(PyObject *args)
{
double angleprecision = M_PI/8;
double angleprecision = M_PI/8;
if (!PyArg_ParseTuple(args, "|d", &angleprecision))
return 0;
@@ -1427,12 +1427,12 @@ PyObject* SketchObjectPy::makeMissingEquality(PyObject *args)
PyObject* SketchObjectPy::autoRemoveRedundants(PyObject *args)
{
PyObject* updategeo = Py_True;
if (!PyArg_ParseTuple(args, "|O!", &PyBool_Type, &updategeo))
return 0;
this->getSketchObjectPtr()->autoRemoveRedundants(PyObject_IsTrue(updategeo) ? true : false);
Py_Return;
}
@@ -1480,7 +1480,7 @@ void SketchObjectPy::setMissingPointOnPointConstraints(Py::List arg)
Py::List SketchObjectPy::getMissingVerticalHorizontalConstraints(void) const
{
std::vector<ConstraintIds> constraints = this->getSketchObjectPtr()->getMissingVerticalHorizontalConstraints();
Py::List list;
for (auto c : constraints) {
Py::Tuple t(5);
@@ -1497,12 +1497,12 @@ Py::List SketchObjectPy::getMissingVerticalHorizontalConstraints(void) const
void SketchObjectPy::setMissingVerticalHorizontalConstraints(Py::List arg)
{
std::vector<ConstraintIds> constraints;
auto checkpos = [](Py::Tuple &t,int i) {
auto checkitem = [](Py::Tuple &t,int i, int val) {return long(Py::Long(t.getItem(i)))==val;};
return (checkitem(t,i,0)?Sketcher::none:(checkitem(t,i,1)?Sketcher::start:(checkitem(t,i,2)?Sketcher::end:Sketcher::mid)));
};
for (auto ti : arg) {
Py::Tuple t(ti);
ConstraintIds c;
@@ -1561,7 +1561,7 @@ void SketchObjectPy::setMissingLineEqualityConstraints(Py::List arg)
Py::List SketchObjectPy::getMissingRadiusConstraints(void) const
{
std::vector<ConstraintIds> constraints = this->getSketchObjectPtr()->getMissingRadiusConstraints();
Py::List list;
for (auto c : constraints) {
Py::Tuple t(4);

File diff suppressed because it is too large Load Diff

View File

@@ -66,7 +66,7 @@
<item row="1" column="1">
<widget class="Gui::PrefCheckBox" name="checkBox_1">
<property name="toolTip">
<string>if you want the examples to show on the first page</string>
<string>If you want the examples to show on the first page</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
@@ -107,7 +107,7 @@
<item row="2" column="1">
<widget class="Gui::PrefFileChooser" name="fileChooser_3">
<property name="toolTip">
<string>an optional custom folder to be displayed at the bottom of the first page</string>
<string>An optional custom folder to be displayed at the bottom of the first page</string>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
@@ -164,7 +164,7 @@
</size>
</property>
<property name="toolTip">
<string>the background of the main start page area</string>
<string>The background of the main start page area</string>
</property>
<property name="color">
<color>
@@ -215,7 +215,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>in external browser</string>
<string>In external browser</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>InWeb</cstring>
@@ -246,7 +246,7 @@
</size>
</property>
<property name="toolTip">
<string>the color of the version text</string>
<string>The color of the version text</string>
</property>
<property name="color">
<color>
@@ -273,7 +273,7 @@
<item row="4" column="1">
<widget class="Gui::PrefFileChooser" name="fileChooser_2">
<property name="toolTip">
<string>an optional image to display as background</string>
<string>An optional image to display as background</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>BackgroundImage</cstring>
@@ -318,7 +318,7 @@
</size>
</property>
<property name="toolTip">
<string>the color of the text on he main pages</string>
<string>The color of the text on the main pages</string>
</property>
<property name="color">
<color>
@@ -358,7 +358,7 @@
</size>
</property>
<property name="toolTip">
<string>the color of the links</string>
<string>The color of the links</string>
</property>
<property name="color">
<color>
@@ -384,7 +384,7 @@
</size>
</property>
<property name="toolTip">
<string>the background color of the boxes inside the pages</string>
<string>The background color of the boxes inside the pages</string>
</property>
<property name="color">
<color>
@@ -417,7 +417,7 @@
</size>
</property>
<property name="toolTip">
<string>the background color behind the panels</string>
<string>The background color behind the panels</string>
</property>
<property name="color">
<color>
@@ -446,7 +446,7 @@
</size>
</property>
<property name="toolTip">
<string>the down gradient for the background color (currently unsupported)</string>
<string>The down gradient for the background color (currently unsupported)</string>
</property>
<property name="color">
<color>
@@ -593,7 +593,7 @@
<item row="0" column="0">
<widget class="QLabel" name="autoModuleLabel">
<property name="text">
<string>Switch workbench after loafing</string>
<string>Switch workbench after loading</string>
</property>
</widget>
</item>