PartDesign: Fix small bugs in the Pipe feature

- Previously a subtractive pipe on a body with no solids would create a solid. Now Pipe will generate an error.
- Fix incorrect property header. Previously Pipe was identifying itself as Pad (copy paste error)
This commit is contained in:
David Osterberg
2021-01-08 13:33:37 +01:00
committed by abdullahtahiriyo
parent 8924bd4734
commit de5c8574d3
2 changed files with 9 additions and 6 deletions

View File

@@ -303,6 +303,9 @@ App::DocumentObjectExecReturn *Pipe::execute(void)
AddSubShape.setValue(result);
if(base.IsNull()) {
if (getAddSubType() == FeatureAddSub::Subtractive)
return new App::DocumentObjectExecReturn("Pipe: There is nothing to subtract from\n");
result = refineShapeIfActive(result);
Shape.setValue(getSolid(result));
return App::DocumentObject::StdReturn;