diff --git a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp index e0c771d733..063ec7269a 100644 --- a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp @@ -202,10 +202,8 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) path = searchAction.getPath(); if(path){ SoNode* node = path->getTail(); - if (!node || node->getTypeId() != SoVRMLTransform::getClassTypeId()) - throw; // should not happen - std::string typeName = (const char*)node->getTypeId().getName(); - Axis1Node = static_cast(node); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) + Axis1Node = static_cast(node); } // Axis 2 searchAction.setName("FREECAD_AXIS2"); @@ -215,10 +213,8 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) path = searchAction.getPath(); if(path){ SoNode* node = path->getTail(); - if (!node || node->getTypeId() != SoVRMLTransform::getClassTypeId()) - throw; // should not happen - std::string typeName = (const char*)node->getTypeId().getName(); - Axis2Node = static_cast(node); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) + Axis2Node = static_cast(node); } // Axis 3 searchAction.setName("FREECAD_AXIS3"); @@ -228,10 +224,8 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) path = searchAction.getPath(); if(path){ SoNode* node = path->getTail(); - if (!node || node->getTypeId() != SoVRMLTransform::getClassTypeId()) - throw; // should not happen - std::string typeName = (const char*)node->getTypeId().getName(); - Axis3Node = static_cast(node); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) + Axis3Node = static_cast(node); } // Axis 4 searchAction.setName("FREECAD_AXIS4"); @@ -241,10 +235,8 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) path = searchAction.getPath(); if(path){ SoNode* node = path->getTail(); - if (!node || node->getTypeId() != SoVRMLTransform::getClassTypeId()) - throw; // should not happen - std::string typeName = (const char*)node->getTypeId().getName(); - Axis4Node = static_cast(node); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) + Axis4Node = static_cast(node); } // Axis 5 searchAction.setName("FREECAD_AXIS5"); @@ -254,10 +246,8 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) path = searchAction.getPath(); if(path){ SoNode* node = path->getTail(); - if (!node || node->getTypeId() != SoVRMLTransform::getClassTypeId()) - throw; // should not happen - std::string typeName = (const char*)node->getTypeId().getName(); - Axis5Node = static_cast(node); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) + Axis5Node = static_cast(node); } // Axis 6 searchAction.setName("FREECAD_AXIS6"); @@ -267,10 +257,8 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) path = searchAction.getPath(); if(path){ SoNode* node = path->getTail(); - if (!node || node->getTypeId() != SoVRMLTransform::getClassTypeId()) - throw; // should not happen - std::string typeName = (const char*)node->getTypeId().getName(); - Axis6Node = static_cast(node); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) + Axis6Node = static_cast(node); } if(Axis1Node) Axis1Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis1.getValue()*(M_PI/180)); diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp index 65553f05fe..10f4b33665 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp @@ -197,7 +197,7 @@ GeomFill_FillingStyle GeomFillSurface::getFillingStyle() return static_cast(FillType.getValue()); default: Standard_Failure::Raise("Filling style must be 0 (Stretch), 1 (Coons), or 2 (Curved).\n"); - throw; // this is to shut up the compiler + return GeomFill_StretchStyle; // this is to shut up the compiler } }