diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index f24c556ce6..2cce78edce 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3001,30 +3001,6 @@ bool SketchObject::evaluateSupport(void) Part::Feature *part = static_cast(Support.getValue()); if (!part || !part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) return false; - - const std::vector &sub = Support.getSubValues(); - assert(sub.size()==1); - // get the selected sub shape (a Face) - const Part::TopoShape &shape = part->Shape.getShape(); - - if (shape._Shape.IsNull()) - return false; - - TopoDS_Shape sh; - try { - sh = shape.getSubShape(sub[0].c_str()); - } - catch (Standard_Failure) { - return false; - } - const TopoDS_Face &face = TopoDS::Face(sh); - if (face.IsNull()) - return false; - - BRepAdaptor_Surface adapt(face); - if (adapt.GetType() != GeomAbs_Plane) - return false; // No planar face - return true; } @@ -3994,13 +3970,8 @@ void SketchObject::onChanged(const App::Property* prop) void SketchObject::onDocumentRestored() { try { - if(Support.getValue()) { - validateExternalLinks(); - rebuildExternalGeometry(); - } - else { - rebuildVertexIndex(); - } + validateExternalLinks(); + rebuildExternalGeometry(); Constraints.acceptGeometry(getCompleteGeometry()); } catch (...) { diff --git a/src/Mod/Sketcher/Gui/Command.cpp b/src/Mod/Sketcher/Gui/Command.cpp index 9349d2b6a9..bf8d8b49ae 100644 --- a/src/Mod/Sketcher/Gui/Command.cpp +++ b/src/Mod/Sketcher/Gui/Command.cpp @@ -367,7 +367,6 @@ void CmdSketcherReorientSketch::activated(int iMsg) if (ret == QMessageBox::No) return; sketch->Support.setValue(0); - sketch->delAllExternal(); } // ask user for orientation