Fix problems with unlimited external geometry
Caused by recent changes by abdullah, which assumes there is external geometry only if sketch has support. http://forum.freecadweb.org/viewtopic.php?f=3&t=12746&p=102087#p102087
This commit is contained in:
parent
e675c43ddf
commit
81015b3f44
|
@ -3001,30 +3001,6 @@ bool SketchObject::evaluateSupport(void)
|
|||
Part::Feature *part = static_cast<Part::Feature*>(Support.getValue());
|
||||
if (!part || !part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
|
||||
return false;
|
||||
|
||||
const std::vector<std::string> &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 (...) {
|
||||
|
|
|
@ -367,7 +367,6 @@ void CmdSketcherReorientSketch::activated(int iMsg)
|
|||
if (ret == QMessageBox::No)
|
||||
return;
|
||||
sketch->Support.setValue(0);
|
||||
sketch->delAllExternal();
|
||||
}
|
||||
|
||||
// ask user for orientation
|
||||
|
|
Loading…
Reference in New Issue
Block a user