Misc. typo and whitespace fixes
Found via `codespell`
This commit is contained in:
@@ -1360,7 +1360,7 @@ ELSE(NOT BUILD_QT5)
|
||||
IF(DEFINED PySide_FOUND)
|
||||
MESSAGE(STATUS "PySide: ${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
IF(NOT PYSIDE_INCLUDE_DIR)
|
||||
MESSAGE(STATUS " IncludeDir: Unable to find, python version missmatch?")
|
||||
MESSAGE(STATUS " IncludeDir: Unable to find, python version mismatch?")
|
||||
ENDIF(NOT PYSIDE_INCLUDE_DIR)
|
||||
ELSE(DEFINED PySide_FOUND)
|
||||
MESSAGE(STATUS "PySide: not found (only searched if MACPORTS_PREFIX is defined)")
|
||||
@@ -1375,7 +1375,7 @@ ELSE(NOT BUILD_QT5)
|
||||
IF(DEFINED PySide2_FOUND)
|
||||
MESSAGE(STATUS "PySide2: ${PySide2_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
IF(NOT PYSIDE_INCLUDE_DIR)
|
||||
MESSAGE(STATUS " IncludeDir: Unable to find, python version missmatch?")
|
||||
MESSAGE(STATUS " IncludeDir: Unable to find, python version mismatch?")
|
||||
ENDIF(NOT PYSIDE_INCLUDE_DIR)
|
||||
ELSE(DEFINED PySide2_FOUND)
|
||||
MESSAGE(STATUS "PySide2: not found")
|
||||
|
||||
@@ -2064,7 +2064,7 @@ void Application::ParseOptions(int ac, char ** av)
|
||||
#endif
|
||||
;
|
||||
|
||||
// Ignored options, will be safely ignored. Mostly used by underlaying libs.
|
||||
// Ignored options, will be safely ignored. Mostly used by underlying libs.
|
||||
//boost::program_options::options_description x11("X11 options");
|
||||
//x11.add_options()
|
||||
// ("display", boost::program_options::value< string >(), "set the X-Server")
|
||||
|
||||
@@ -77,7 +77,7 @@ def makeRebar(baseobj=None,sketch=None,diameter=None,amount=1,offset=None,name="
|
||||
sketch.ViewObject.hide()
|
||||
obj.Host = baseobj
|
||||
elif sketch and not baseobj:
|
||||
# a rebar could be based on a wire without the existance of a Structure
|
||||
# a rebar could be based on a wire without the existence of a Structure
|
||||
obj.Base = sketch
|
||||
if FreeCAD.GuiUp:
|
||||
sketch.ViewObject.hide()
|
||||
|
||||
@@ -282,10 +282,10 @@ class Compass(object):
|
||||
def setZOffset(self, offsetInMillimeters):
|
||||
from pivy import coin
|
||||
self.transform.translation.setValue(0, 0, offsetInMillimeters)
|
||||
|
||||
|
||||
def scale(self, area):
|
||||
from pivy import coin
|
||||
|
||||
|
||||
scale = round(max(math.sqrt(area.getValueAs("m^2").Value) / 10, 1))
|
||||
|
||||
self.transform.scaleFactor.setValue(coin.SbVec3f(scale, scale, 1))
|
||||
@@ -528,7 +528,7 @@ class _Site(ArchFloor._Floor):
|
||||
"App::Property", "The rotation of the Compass relative to the Site"))
|
||||
if not "UpdateDeclination" in pl:
|
||||
obj.addProperty("App::PropertyBool", "UpdateDeclination", "Compass", QT_TRANSLATE_NOOP(
|
||||
"App::Property", "Update the Declination value based on the compass roation"))
|
||||
"App::Property", "Update the Declination value based on the compass rotation"))
|
||||
self.Type = "Site"
|
||||
obj.setEditorMode('Height',2)
|
||||
|
||||
@@ -696,7 +696,7 @@ class _ViewProviderSite(ArchFloor._ViewProviderFloor):
|
||||
if not "Orientation" in pl:
|
||||
vobj.addProperty("App::PropertyEnumeration", "Orientation", "Site", QT_TRANSLATE_NOOP(
|
||||
"App::Property", "When set to 'True North' the whole geometry will be rotated to match the true north of this site"))
|
||||
|
||||
|
||||
vobj.Orientation = ["Project North", "True North"]
|
||||
vobj.Orientation = "Project North"
|
||||
|
||||
@@ -809,31 +809,31 @@ class _ViewProviderSite(ArchFloor._ViewProviderFloor):
|
||||
self.addTrueNorthRotation()
|
||||
else:
|
||||
self.removeTrueNorthRotation()
|
||||
|
||||
|
||||
def addTrueNorthRotation(self):
|
||||
if hasattr(self, 'trueNorthRotation') and self.trueNorthRotation is not None:
|
||||
return
|
||||
|
||||
|
||||
from pivy import coin
|
||||
|
||||
|
||||
self.trueNorthRotation = coin.SoTransform()
|
||||
|
||||
sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
|
||||
sg.insertChild(self.trueNorthRotation, 0)
|
||||
|
||||
self.updateTrueNorthRotation()
|
||||
|
||||
|
||||
def removeTrueNorthRotation(self):
|
||||
if hasattr(self, 'trueNorthRotation') and self.trueNorthRotation is not None:
|
||||
sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
|
||||
|
||||
sg.removeChild(self.trueNorthRotation)
|
||||
self.trueNorthRotation = None
|
||||
|
||||
|
||||
def updateTrueNorthRotation(self):
|
||||
if hasattr(self, 'trueNorthRotation') and self.trueNorthRotation is not None:
|
||||
from pivy import coin
|
||||
|
||||
|
||||
angle = self.Object.Declination.Value
|
||||
|
||||
self.trueNorthRotation.rotation.setValue(coin.SbVec3f(0, 0, 1), math.radians(-angle))
|
||||
@@ -866,11 +866,11 @@ class _ViewProviderSite(ArchFloor._ViewProviderFloor):
|
||||
zOffset = boundBox.ZMax = pos.z
|
||||
|
||||
self.compass.setZOffset(zOffset + 1000)
|
||||
|
||||
|
||||
def updateCompassScale(self, obj):
|
||||
if not hasattr(self, 'compass'):
|
||||
return
|
||||
|
||||
|
||||
self.compass.scale(obj.ProjectedArea)
|
||||
|
||||
|
||||
|
||||
@@ -1221,7 +1221,7 @@ def get_pressure_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj
|
||||
# depreciated method for pressure faces for constraint pressure and finite solid element mesh
|
||||
# why did we switch to the get_ccxelement_faces_from_binary_search?
|
||||
# just performance?
|
||||
# TODO: Find the forum topic disscussion with ulrich1a and post a link
|
||||
# TODO: Find the forum topic discussion with ulrich1a and post a link
|
||||
def get_pressure_obj_faces_depreciated(femmesh, femobj):
|
||||
pressure_faces = []
|
||||
for o, elem_tup in femobj['Object'].References:
|
||||
|
||||
@@ -71,7 +71,7 @@ ViewProviderBody::ViewProviderBody()
|
||||
DisplayModeBody.setEnums(BodyModeEnum);
|
||||
|
||||
sPixmap = "PartDesign_Body_Tree.svg";
|
||||
|
||||
|
||||
Gui::ViewProviderOriginGroupExtension::initExtension(this);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ void ViewProviderBody::attach(App::DocumentObject *pcFeat)
|
||||
{
|
||||
// call parent attach method
|
||||
ViewProviderPart::attach(pcFeat);
|
||||
|
||||
|
||||
//set default display mode
|
||||
onChanged(&DisplayModeBody);
|
||||
|
||||
@@ -108,8 +108,8 @@ void ViewProviderBody::attach(App::DocumentObject *pcFeat)
|
||||
// TODO Add activate () call (2015-09-08, Fat-Zer)
|
||||
|
||||
void ViewProviderBody::setDisplayMode(const char* ModeName) {
|
||||
|
||||
//if we show "Through" we must avoid to set the display mask modes, as this would result
|
||||
|
||||
//if we show "Through" we must avoid to set the display mask modes, as this would result
|
||||
//in going into "tip" mode. When through is chosen the child features are displayed, and all
|
||||
//we need to ensure is that the display mode change is propagated to them from within the
|
||||
//onChanged() method.
|
||||
@@ -118,15 +118,15 @@ void ViewProviderBody::setDisplayMode(const char* ModeName) {
|
||||
}
|
||||
|
||||
void ViewProviderBody::setOverrideMode(const std::string& mode) {
|
||||
|
||||
|
||||
//if we are in through mode, we need to ensure that the override mode is not set for the body
|
||||
//(as this would result in "tip" mode), it is enough when the children are set to the correct
|
||||
//override mode.
|
||||
|
||||
//(as this would result in "tip" mode), it is enough when the children are set to the correct
|
||||
//override mode.
|
||||
|
||||
if(DisplayModeBody.getValue() != 0)
|
||||
Gui::ViewProvider::setOverrideMode(mode);
|
||||
else
|
||||
overrideMode = mode;
|
||||
overrideMode = mode;
|
||||
}
|
||||
|
||||
void ViewProviderBody::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
||||
@@ -224,8 +224,8 @@ void ViewProviderBody::updateData(const App::Property* prop)
|
||||
updateOriginDatumSize ();
|
||||
//ensure all model features are in visual body mode
|
||||
setVisualBodyMode(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (prop == &body->Tip) {
|
||||
// We changed Tip
|
||||
App::DocumentObject* tip = body->Tip.getValue();
|
||||
@@ -246,9 +246,9 @@ void ViewProviderBody::updateData(const App::Property* prop)
|
||||
|
||||
|
||||
void ViewProviderBody::slotChangedObjectApp ( const App::DocumentObject& obj, const App::Property& prop ) {
|
||||
|
||||
|
||||
if (!obj.isDerivedFrom ( Part::Feature::getClassTypeId () ) ||
|
||||
obj.isDerivedFrom ( Part::BodyBase::getClassTypeId () ) ) { // we are intrested only in Part::Features and not in bodies
|
||||
obj.isDerivedFrom ( Part::BodyBase::getClassTypeId () ) ) { // we are interested only in Part::Features, not in bodies
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -288,16 +288,16 @@ void ViewProviderBody::slotChangedObjectGui (
|
||||
|
||||
void ViewProviderBody::updateOriginDatumSize () {
|
||||
PartDesign::Body *body = static_cast<PartDesign::Body *> ( getObject() );
|
||||
|
||||
|
||||
// Use different bounding boxes for datums and for origins:
|
||||
Gui::Document* gdoc = Gui::Application::Instance->getDocument(getObject()->getDocument());
|
||||
if(!gdoc)
|
||||
if(!gdoc)
|
||||
return;
|
||||
|
||||
|
||||
Gui::MDIView* view = gdoc->getViewOfViewProvider(this);
|
||||
if(!view)
|
||||
return;
|
||||
|
||||
|
||||
Gui::View3DInventorViewer* viewer = static_cast<Gui::View3DInventor*>(view)->getViewer();
|
||||
SoGetBoundingBoxAction bboxAction(viewer->getSoRenderManager()->getViewportRegion());
|
||||
|
||||
@@ -359,11 +359,11 @@ void ViewProviderBody::updateOriginDatumSize () {
|
||||
}
|
||||
|
||||
void ViewProviderBody::onChanged(const App::Property* prop) {
|
||||
|
||||
|
||||
if(prop == &DisplayModeBody) {
|
||||
|
||||
|
||||
if ( DisplayModeBody.getValue() == 0 ) {
|
||||
//if we are in an override mode we need to make sure to come out, because
|
||||
//if we are in an override mode we need to make sure to come out, because
|
||||
//otherwise the maskmode is blocked and won't go into "through"
|
||||
if(getOverrideMode() != "As Is") {
|
||||
auto mode = getOverrideMode();
|
||||
@@ -384,16 +384,16 @@ void ViewProviderBody::onChanged(const App::Property* prop) {
|
||||
// #0002559: Body becomes visible upon changing DisplayModeBody
|
||||
Visibility.touch();
|
||||
}
|
||||
else
|
||||
else
|
||||
unifyVisualProperty(prop);
|
||||
|
||||
|
||||
PartGui::ViewProviderPartExt::onChanged(prop);
|
||||
}
|
||||
|
||||
|
||||
void ViewProviderBody::unifyVisualProperty(const App::Property* prop) {
|
||||
|
||||
if(prop == &Visibility ||
|
||||
if(prop == &Visibility ||
|
||||
prop == &Selectable ||
|
||||
prop == &DisplayModeBody)
|
||||
return;
|
||||
@@ -403,7 +403,7 @@ void ViewProviderBody::unifyVisualProperty(const App::Property* prop) {
|
||||
PartDesign::Body *body = static_cast<PartDesign::Body *> ( getObject() );
|
||||
auto features = body->Group.getValues();
|
||||
for(auto feature : features) {
|
||||
|
||||
|
||||
if(!feature->isDerivedFrom(PartDesign::Feature::getClassTypeId()))
|
||||
continue;
|
||||
|
||||
@@ -420,7 +420,7 @@ void ViewProviderBody::setVisualBodyMode(bool bodymode) {
|
||||
PartDesign::Body *body = static_cast<PartDesign::Body *> ( getObject() );
|
||||
auto features = body->Group.getValues();
|
||||
for(auto feature : features) {
|
||||
|
||||
|
||||
if(!feature->isDerivedFrom(PartDesign::Feature::getClassTypeId()))
|
||||
continue;
|
||||
|
||||
@@ -430,8 +430,8 @@ void ViewProviderBody::setVisualBodyMode(bool bodymode) {
|
||||
}
|
||||
|
||||
std::vector< std::string > ViewProviderBody::getDisplayModes(void) const {
|
||||
|
||||
//we get all display modes and remove the "Group" mode, as this is what we use for "Through"
|
||||
|
||||
//we get all display modes and remove the "Group" mode, as this is what we use for "Through"
|
||||
//body display mode
|
||||
std::vector< std::string > modes = ViewProviderPart::getDisplayModes();
|
||||
modes.erase(modes.begin());
|
||||
|
||||
@@ -230,7 +230,7 @@ static bool getShapePlane(const TopoDS_Shape &shape, gp_Pln &pln) {
|
||||
//
|
||||
// ADD NOTE: Okay, one thing I find out that for face shape, this
|
||||
// FindSurface may produce plane at the wrong position, so use
|
||||
// adaptor to get the underlaying surface plane directly (see
|
||||
// adaptor to get the underlying surface plane directly (see
|
||||
// above). It remains to be seen that if FindSurface has the same
|
||||
// problem on wires
|
||||
pln = GeomAdaptor_Surface(finder.Surface()).Plane();
|
||||
@@ -333,7 +333,7 @@ static std::vector<gp_Pnt> discretize(const TopoDS_Edge &edge, double deflection
|
||||
// first and last parameters. Passing the original curve first and last
|
||||
// parameters works fine. The following algorithm uses the original curve
|
||||
// parameters, and skip those out of range. The algorithm shall work the
|
||||
// same for any other discetization algorithm, althgouth it seems only
|
||||
// same for any other discetization algorithm, althgouth it seems only
|
||||
// QuasiUniformDeflection has this bug.
|
||||
|
||||
GCPnts_QuasiUniformDeflection discretizer(curve, deflection, first, last);
|
||||
@@ -1826,7 +1826,7 @@ TopoDS_Shape Area::getShape(int index) {
|
||||
}
|
||||
|
||||
TopoDS_Shape Area::makeOffset(int index,PARAM_ARGS(PARAM_FARG,AREA_PARAMS_OFFSET),
|
||||
int reorient, bool from_center)
|
||||
int reorient, bool from_center)
|
||||
{
|
||||
build();
|
||||
AREA_SECTION(makeOffset,index,PARAM_FIELDS(PARAM_FARG,AREA_PARAMS_OFFSET),reorient,from_center);
|
||||
@@ -1910,7 +1910,7 @@ void Area::makeOffset(list<shared_ptr<CArea> > &areas,
|
||||
last_stepover = 0;
|
||||
}
|
||||
for(int i=0;count<0||i<count;++i,offset+=stepover) {
|
||||
if(from_center)
|
||||
if(from_center)
|
||||
areas.push_front(make_shared<CArea>());
|
||||
else
|
||||
areas.push_back(make_shared<CArea>());
|
||||
@@ -1951,7 +1951,7 @@ void Area::makeOffset(list<shared_ptr<CArea> > &areas,
|
||||
if(count>1)
|
||||
FC_TIME_LOG(t1,"makeOffset " << i << '/' << count);
|
||||
if(area.m_curves.empty()) {
|
||||
if(from_center)
|
||||
if(from_center)
|
||||
areas.pop_front();
|
||||
else
|
||||
areas.pop_back();
|
||||
@@ -2088,7 +2088,7 @@ TopoDS_Shape Area::makePocket(int index, PARAM_ARGS(PARAM_FARG,AREA_PARAMS_POCKE
|
||||
done = true;
|
||||
break;
|
||||
}default:
|
||||
throw Base::ValueError("unknown poket mode");
|
||||
throw Base::ValueError("unknown pocket mode");
|
||||
}
|
||||
|
||||
if(!done) {
|
||||
@@ -2220,7 +2220,7 @@ TopoDS_Shape Area::toShape(const CCurve &_c, const gp_Trsf *trsf, int reorient)
|
||||
builder.Add(compound,hWires->Value(i));
|
||||
shape = compound;
|
||||
}
|
||||
|
||||
|
||||
if(trsf)
|
||||
shape.Move(TopLoc_Location(*trsf));
|
||||
return shape;
|
||||
@@ -2654,7 +2654,7 @@ struct ShapeInfo{
|
||||
std::list<TopoDS_Shape> wires;
|
||||
|
||||
if(myWires.empty() ||
|
||||
pstart.SquareDistance(myStartPt)>Precision::SquareConfusion())
|
||||
pstart.SquareDistance(myStartPt)>Precision::SquareConfusion())
|
||||
{
|
||||
nearest(pstart);
|
||||
if(myWires.empty())
|
||||
@@ -2834,7 +2834,7 @@ typedef Standard_Real (gp_Pnt::*AxisGetter)() const;
|
||||
typedef void (gp_Pnt::*AxisSetter)(Standard_Real);
|
||||
|
||||
std::list<TopoDS_Shape> Area::sortWires(const std::list<TopoDS_Shape> &shapes,
|
||||
bool has_start, gp_Pnt *_pstart, gp_Pnt *_pend,
|
||||
bool has_start, gp_Pnt *_pstart, gp_Pnt *_pend,
|
||||
double *stepdown_hint, short *_parc_plane,
|
||||
PARAM_ARGS(PARAM_FARG,AREA_PARAMS_SORT))
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3805,7 +3805,7 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
|
||||
}
|
||||
catch(Base::CADKernelError &e) {
|
||||
// it is "just" a visualisation matter OCC could not calculate the curvature
|
||||
// terminating here would mean that the other shapes would not be drawed.
|
||||
// terminating here would mean that the other shapes would not be drawn.
|
||||
// Solution: Report the issue and set dummy curvature to 0
|
||||
e.ReportException();
|
||||
Base::Console().Error("Curvature graph for B-Spline with GeoId=%d could not be calculated.\n", GeoId);
|
||||
@@ -4017,7 +4017,7 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
|
||||
}
|
||||
catch(Base::CADKernelError &e) {
|
||||
// it is "just" a visualisation matter OCC could not calculate the curvature
|
||||
// terminating here would mean that the other shapes would not be drawed.
|
||||
// terminating here would mean that the other shapes would not be drawn.
|
||||
// Solution: Report the issue and set dummy curvature to 0
|
||||
e.ReportException();
|
||||
Base::Console().Error("Curvature graph for B-Spline with GeoId=%d could not be calculated.\n", GeoId);
|
||||
|
||||
Reference in New Issue
Block a user