diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index 6d6288ed5b..638d69828d 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -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); diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index a06da743e8..c7dbfcc1ec 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -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);