Possible solution to a problem in pad/pocket up-to-face

Somehow we weren't able to pad/pocket up-to-face when the profile sketch
is made on a datum plane
This commit is contained in:
AjinkyaDahale
2017-03-06 15:49:34 +05:30
committed by Yorik van Havre
parent d920cf419d
commit 6a385f5ee3
3 changed files with 7 additions and 2 deletions

View File

@@ -31,7 +31,7 @@
<Methode Name="setEdit">
<Documentation>
<UserDocu>
setEdit([String:Name|ViewProvider|DocumentObjet]|,mod)
setEdit([String:Name|ViewProvider|DocumentObject]|,mod)
Set the given object in edit mode.
</UserDocu>
</Documentation>

View File

@@ -217,4 +217,3 @@ App::DocumentObjectExecReturn *Pocket::execute(void)
return new App::DocumentObjectExecReturn(e.what());
}
}

View File

@@ -272,6 +272,12 @@ const TopoDS_Face ProfileBased::getSupportFace() const {
if (part && part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
const std::vector<std::string> &sub = Support.getSubValues();
assert(sub.size()==1);
if (sub.at(0) == "") {
// This seems to happen when sketch is on a datum plane
return TopoDS::Face(Feature::makeShapeFromPlane(sketch));
}
// get the selected sub shape (a Face)
const Part::TopoShape &shape = part->Shape.getShape();
if (shape.getShape().IsNull())