remove pointless Section option from boolean operation in PD

This commit is contained in:
wmayer
2017-11-04 13:46:42 +01:00
parent d4136b9698
commit 2f2ba28156
3 changed files with 1 additions and 18 deletions

View File

@@ -26,13 +26,11 @@
# include <BRepAlgoAPI_Fuse.hxx>
# include <BRepAlgoAPI_Cut.hxx>
# include <BRepAlgoAPI_Common.hxx>
# include <BRepAlgoAPI_Section.hxx>
# include <gp_Trsf.hxx>
# include <gp_Pnt.hxx>
# include <gp_Dir.hxx>
# include <gp_Vec.hxx>
# include <gp_Ax1.hxx>
#include <BRepBuilderAPI_GTransform.hxx>
#endif
#include "Body.h"
@@ -48,7 +46,7 @@ namespace PartDesign {
PROPERTY_SOURCE_WITH_EXTENSIONS(PartDesign::Boolean, PartDesign::Feature)
const char* Boolean::TypeEnums[]= {"Fuse","Cut","Common","Section",NULL};
const char* Boolean::TypeEnums[]= {"Fuse","Cut","Common",NULL};
Boolean::Boolean()
{
@@ -139,15 +137,6 @@ App::DocumentObjectExecReturn *Boolean::execute(void)
if (!mkCommon.IsDone())
return new App::DocumentObjectExecReturn("Common operation failed");
boolOp = mkCommon.Shape();
} else if (type == "Section") {
BRepAlgoAPI_Section mkSection(result, shape);
if (!mkSection.IsDone())
return new App::DocumentObjectExecReturn("Section failed");
// we have to get the solids
boolOp = this->getSolid(mkSection.Shape());
// lets check if the result is a solid
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn("Resulting shape is not a solid");
}
result = boolOp; // Use result of this operation for fuse/cut of next body

View File

@@ -211,7 +211,6 @@ void TaskBooleanParameters::onTypeChanged(int index)
case 0: pcBoolean->Type.setValue("Fuse"); break;
case 1: pcBoolean->Type.setValue("Cut"); break;
case 2: pcBoolean->Type.setValue("Common"); break;
case 3: pcBoolean->Type.setValue("Section"); break;
default: pcBoolean->Type.setValue("Fuse");
}

View File

@@ -58,11 +58,6 @@
<string>Common</string>
</property>
</item>
<item>
<property name="text">
<string>Section</string>
</property>
</item>
</widget>
</item>
</layout>