PD: for better cohesion do not call generateTaperedPrism inside generatePrism

This commit is contained in:
wmayer
2022-02-14 00:46:48 +01:00
parent af8cf76c50
commit 15ff4c8f94
4 changed files with 32 additions and 28 deletions

View File

@@ -219,8 +219,14 @@ App::DocumentObjectExecReturn *Pocket::execute()
}
else {
TopoDS_Shape prism;
generatePrism(prism, profileshape, method, dir, L, L2, TaperAngle.getValue(), TaperAngle2.getValue(),
Midplane.getValue(), Reversed.getValue());
if (hasTaperedAngle()) {
if (Reversed.getValue())
dir.Reverse();
generateTaperedPrism(prism, profileshape, method, dir, L, L2, TaperAngle.getValue(), TaperAngle2.getValue(), Midplane.getValue());
}
else {
generatePrism(prism, profileshape, method, dir, L, L2, Midplane.getValue(), Reversed.getValue());
}
if (prism.IsNull())
return new App::DocumentObjectExecReturn("Pocket: Resulting shape is empty");