Give user feedback about not being able to extrude UpToFace if sketch is on a datum plane

This commit is contained in:
jrheinlaender 2013-07-07 11:30:00 +02:00 committed by Stefan Tröger
parent c5358ee307
commit 1e615043cd
2 changed files with 6 additions and 0 deletions

View File

@ -157,6 +157,9 @@ App::DocumentObjectExecReturn *Pad::execute(void)
TopoDS_Shape prism;
std::string method(Type.getValueAsString());
if (method == "UpToFirst" || method == "UpToLast" || method == "UpToFace") {
// TODO: Write our own PrismMaker which does not depend on a solid base shape
if (base.IsNull())
return new App::DocumentObjectExecReturn("Pad: Extruding up to a face is only possible if the sketch is located on a face");
// Note: This will return an unlimited planar face if support is a datum plane
TopoDS_Face supportface = getSupportFace();
supportface.Move(invObjLoc);

View File

@ -134,6 +134,9 @@ App::DocumentObjectExecReturn *Pocket::execute(void)
std::string method(Type.getValueAsString());
if (method == "UpToFirst" || method == "UpToFace") {
if (base.IsNull())
return new App::DocumentObjectExecReturn("Pocket: Extruding up to a face is only possible if the sketch is located on a face");
// Note: This will return an unlimited planar face if support is a datum plane
TopoDS_Face supportface = getSupportFace();
supportface.Move(invObjLoc);