Misc. typos

Found via `codespell`
This commit is contained in:
luz.paz
2019-02-05 20:24:25 -05:00
committed by Yorik van Havre
parent 0802908e52
commit cb4a0adf71
16 changed files with 59 additions and 62 deletions

View File

@@ -77,7 +77,7 @@ MODALT = MODS[Draft.getParam("modalt",2)]
def msg(text=None,mode=None):
"prints the given message on the FreeCAD status bar"
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetBool("Verbose",True):
if not text:
if not text:
FreeCAD.Console.PrintMessage("")
else:
if mode == 'warning':
@@ -779,7 +779,7 @@ class Wire(Line):
class BSpline(Line):
"a FreeCAD command for creating a b-spline"
"a FreeCAD command for creating a B-spline"
def __init__(self):
Line.__init__(self,wiremode=True)
@@ -2900,7 +2900,7 @@ class Stretch(Modifier):
def proceed(self):
if self.call:
self.view.removeEventCallback("SoEvent",self.call)
self.view.removeEventCallback("SoEvent",self.call)
supported = ["Rectangle","Wire","BSpline","BezCurve","Sketch"]
self.sel = []
for obj in FreeCADGui.Selection.getSelection():
@@ -2910,7 +2910,7 @@ class Stretch(Modifier):
if obj.Base:
if Draft.getType(obj.Base) in supported:
self.sel.append([obj.Base,obj.Placement])
elif Draft.getType(obj.Base) in ["Offset2D","Array"]:
base = None
if hasattr(obj.Base,"Source") and obj.Base.Source:

View File

@@ -453,7 +453,7 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh, vtkSmartPointer<vtkUnstruct
double coords[3] = {double(node->X()*scale), double(node->Y()*scale), double(node->Z()*scale)};
points->InsertPoint(node->GetID()-1, coords);
// memory is allocated by VTK points size for max node id, not for point count
// if the SMESH mesh has gaps in node numbering, points without any element assignement will be inserted in these point gaps too
// if the SMESH mesh has gaps in node numbering, points without any element assignment will be inserted in these point gaps too
// this needs to be taken into account on node mapping when FreeCAD FEM results are exported to vtk
}
grid->SetPoints(points);
@@ -780,7 +780,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, vtkSmar
const Fem::FemResultObject* res = static_cast<const Fem::FemResultObject*>(result);
const vtkIdType nPoints = grid->GetNumberOfPoints();
// we need the coresponding mesh to get the correct id for the result data (when the freecad smesh mesh has gaps in the points
// we need the corresponding mesh to get the correct id for the result data (when the freecad smesh mesh has gaps in the points
// vtk has more points. Vtk does not support point gaps, thus the gaps are filled with points. Then the mapping must be correct)
App::DocumentObject* meshObj = res->Mesh.getValue();
if (!meshObj || !meshObj->isDerivedFrom(FemMeshObject::getClassTypeId())) {
@@ -807,7 +807,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, vtkSmar
data->SetNumberOfTuples(nPoints);
data->SetName(it->c_str());
//we need to set values for the unused points.
//we need to set values for the unused points.
//TODO: ensure that the result bar does not include the used 0 if it is not part of the result (e.g. does the result bar show 0 as smallest value?)
if (nPoints != field->getSize()) {
double tuple[] = {0,0,0};
@@ -844,7 +844,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, vtkSmar
data->SetNumberOfValues(nPoints);
data->SetName(it->c_str());
//we need to set values for the unused points.
//we need to set values for the unused points.
//TODO: ensure that the result bar does not include the used 0 if it is not part of the result (e.g. does the result bar show 0 as smallest value?)
if (nPoints != field->getSize()) {
for (vtkIdType i=0; i<nPoints; ++i) {

View File

@@ -220,7 +220,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(ViewProviderFemCo
}
}
pcSolver = NULL; // this is an private object of type Fem::FemSolverObject*
pcSolver = NULL; // this is an private object of type Fem::FemSolverObject*
if (pcAnalysis) {
std::vector<App::DocumentObject*> fem = pcAnalysis->Group.getValues();
for (std::vector<App::DocumentObject*>::iterator it = fem.begin(); it != fem.end(); ++it) {
@@ -620,7 +620,7 @@ void TaskFemConstraintFluidBoundary::onSelectionChanged(const Gui::SelectionChan
void TaskFemConstraintFluidBoundary::onBoundaryTypeChanged(void)
{
Fem::ConstraintFluidBoundary* pcConstraint = static_cast<Fem::ConstraintFluidBoundary*>(ConstraintView->getObject());
// temperarily change BoundaryType property, but command transaction should reset it back if you 'reject' late
// temporarily change BoundaryType property, but command transaction should reset it back if you 'reject' late
pcConstraint->BoundaryType.setValue(ui->comboBoundaryType->currentIndex());
updateBoundaryTypeUI();
@@ -675,7 +675,7 @@ void TaskFemConstraintFluidBoundary::onButtonDirection(const bool pressed) {
Gui::Selection().clearSelection();
/* minor bug: once Direction property(edge link) is cleared in UI, arrow direction is not updated.
Direction property can not be easily setup in C++, see example at the end of this file `accept()`
redraw will only happen once taskpanel is closed,
redraw will only happen once taskpanel is closed,
*/
//pcConstraint->Direction.setValue(pressed);
}

View File

@@ -87,7 +87,7 @@ unittest.TextTestRunner().run(mytest)
# open files from FEM test suite source code
# be careful on updating these files, they consist the original results!
# TODO update files, becaus some of them have non existing FEM object classes
# TODO update files, because some of them have non-existing FEM object classes
doc = FreeCAD.open(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/testfiles/ccx/cube.FCStd')
doc = FreeCAD.open(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/testfiles/ccx/cube_frequency.FCStd')
doc = FreeCAD.open(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/testfiles/ccx/cube_static.FCStd')
@@ -114,4 +114,3 @@ doc = FreeCAD.open(FreeCAD.ConfigGet("AppHomePath") + 'data/examples/Fem.FCStd')
doc = FreeCAD.open(FreeCAD.ConfigGet("AppHomePath") + 'data/examples/Fem2.FCStd')
'''

View File

@@ -100,7 +100,7 @@ def getMaterialAttributeStructure(withSpaces=None):
''''''
# material properties
# see the following resources in the FreeCAD wiki for more informations about the material specific properties:
# see the following resources in the FreeCAD wiki for more information about the material specific properties:
# https://www.freecadweb.org/wiki/Material_data_model
# https://www.freecadweb.org/wiki/Material

View File

@@ -106,7 +106,7 @@ private:
//
// target_count : target nr. of triangles
// tolerance : tolerance for the quadratic errors
// aggressiveness : sharpness to increase the threashold.
// aggressiveness : sharpness to increase the threshold.
// 5..8 are good numbers
// more iterations yield higher quality
// If the passed tolerance is > 0 then this will be used to check

View File

@@ -418,7 +418,7 @@ def callopenscadmeshstring(scadstr):
def meshopinline(opname,iterable1):
"""uses OpenSCAD to combine meshes
takes the name of the CGAL operation and an iterable (tuple,list) of
takes the name of the CGAL operation and an iterable (tuple,list) of
FreeCAD Mesh objects
includes all the mesh data in the SCAD file
"""
@@ -428,7 +428,7 @@ def meshopinline(opname,iterable1):
def meshoptempfile(opname,iterable1):
"""uses OpenSCAD to combine meshes
takes the name of the CGAL operation and an iterable (tuple,list) of
takes the name of the CGAL operation and an iterable (tuple,list) of
FreeCAD Mesh objects
uses stl files to supply the mesh data
"""
@@ -554,7 +554,7 @@ def process3D_ObjectsViaOpenSCADShape(ObjList,Operation,maxmeshpoints=None):
def process3D_ObjectsViaOpenSCAD(doc,ObjList,Operation):
solid = process3D_ObjectsViaOpenSCADShape(ObjList,Operation)
if solid is not None:
obj=doc.addObject('Part::Feature',Operation) #non parametric objec
obj=doc.addObject('Part::Feature',Operation) #non-parametric object
obj.Shape=solid#.removeSplitter()
if FreeCAD.GuiUp:
for index in ObjList :

View File

@@ -1,7 +1,7 @@
from .CompoundFilter import makeCompoundFilter
from .CompoundFilter import makeCompoundFilter
def explodeCompound(compound_obj, b_group = None):
"""explodeCompound(compound_obj, b_group = None): creates a bunch of compound filters, to extract every child of a compount into a separate object.
"""explodeCompound(compound_obj, b_group = None): creates a bunch of compound filters, to extract every child of a compound into a separate object.
group: if True, Group is always made. If False, group is never made. If None, group is made if there is more than one child.
returns: (group_object, list_of_child_objects)"""
sh = compound_obj.Shape
@@ -10,7 +10,7 @@ def explodeCompound(compound_obj, b_group = None):
b_group = n > 1
if b_group:
group = compound_obj.Document.addObject('App::DocumentObjectGroup','GrExplode_'+compound_obj.Name)
group.Label = 'Exploded {obj.Label}'.format(obj = compound_obj)
group.Label = 'Exploded {obj.Label}'.format(obj = compound_obj)
else:
group = compound_obj.Document
features_created = []

View File

@@ -495,7 +495,7 @@ class TestPathGeom(PathTestBase):
self.assertEdgeShapesMatch(edge, PathGeom.flipEdge(edge))
def test75(self):
'''Flip a b-spline'''
'''Flip a B-spline'''
spline = Part.BSplineCurve()
spline.interpolate([Vector(1,2,3), Vector(-3,0,7), Vector(-3,1,9), Vector(1, 3, 5)])
edge = Part.Edge(spline)

View File

@@ -4725,7 +4725,7 @@ public:
// as the ones created by this tool are intended for the b-spline endpoints, and not for the poles,
// so here we retrieve any autoconstraint on those poles' center and mangle it to the endpoint.
if (ConstrMethod == 0) {
for(auto & constr : static_cast<Sketcher::SketchObject *>(sketchgui->getObject())->Constraints.getValues()) {
if(constr->First == FirstPoleGeoId && constr->FirstPos == Sketcher::mid) {
constr->First = currentgeoid;

View File

@@ -335,7 +335,7 @@ void GeomFillSurface::createBSplineSurface(TopoDS_Wire& aWire)
curves.push_back(bspline);
}
else {
// try to convert it into a b-spline
// try to convert it into a B-spline
BRepBuilderAPI_NurbsConvert mkNurbs(edge);
TopoDS_Edge nurbs = TopoDS::Edge(mkNurbs.Shape());
// avoid copying