From 12c5e1f92f040eb8ef033b973489a3981acbe8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Mon, 6 Jul 2015 21:13:10 +0200 Subject: [PATCH] remove hole feature A hole feature is something needed, however, the current implementation does not use the attacher code which would made it intuitive and compatibel to other workbench tools. A reimplementation is needed. --- src/Mod/PartDesign/App/AppPartDesign.cpp | 4 ++-- src/Mod/PartDesign/CMakeLists.txt | 20 ++++++++++---------- src/Mod/PartDesign/Gui/CMakeLists.txt | 14 +++++++------- src/Mod/PartDesign/Gui/Workbench.cpp | 3 ++- src/Mod/PartDesign/InitGui.py | 8 ++++---- src/Mod/PartDesign/InitGui.py.orig | 22 ++++++++++++---------- 6 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/Mod/PartDesign/App/AppPartDesign.cpp b/src/Mod/PartDesign/App/AppPartDesign.cpp index ec897df14..71dc825fe 100644 --- a/src/Mod/PartDesign/App/AppPartDesign.cpp +++ b/src/Mod/PartDesign/App/AppPartDesign.cpp @@ -46,7 +46,7 @@ #include "FeaturePolarPattern.h" #include "FeatureScaled.h" #include "FeatureMultiTransform.h" -#include "FeatureHole.h" +//#include "FeatureHole.h" #include "DatumPlane.h" #include "DatumLine.h" #include "DatumPoint.h" @@ -93,7 +93,7 @@ PyMODINIT_FUNC init_PartDesign() PartDesign::PolarPattern ::init(); PartDesign::Scaled ::init(); PartDesign::MultiTransform ::init(); - PartDesign::Hole ::init(); + //PartDesign::Hole ::init(); PartDesign::Body ::init(); PartDesign::Pad ::init(); PartDesign::Pocket ::init(); diff --git a/src/Mod/PartDesign/CMakeLists.txt b/src/Mod/PartDesign/CMakeLists.txt index d9451ce03..236b9d370 100644 --- a/src/Mod/PartDesign/CMakeLists.txt +++ b/src/Mod/PartDesign/CMakeLists.txt @@ -89,17 +89,17 @@ SET(FeatureHole_UI SET(all_featurehole_files ${FeatureHole_SRCS} ${FeatureHole_UI}) -ADD_CUSTOM_TARGET(FeatureHole ALL - SOURCES ${all_featurehole_files} -) +#ADD_CUSTOM_TARGET(FeatureHole ALL +# SOURCES ${all_featurehole_files} +#) -SET(all_files ${all_featurehole_files}) +#SET(all_files ${all_featurehole_files}) fc_copy_sources(Mod/PartDesign "${CMAKE_BINARY_DIR}/Mod/PartDesign" ${all_files}) -INSTALL( - FILES - ${FeatureHole_SRCS} - DESTINATION - Mod/PartDesign/FeatureHole -) +#INSTALL( +# FILES +# ${FeatureHole_SRCS} +# DESTINATION +# Mod/PartDesign/FeatureHole +#) diff --git a/src/Mod/PartDesign/Gui/CMakeLists.txt b/src/Mod/PartDesign/Gui/CMakeLists.txt index b17dd789a..0913059bc 100644 --- a/src/Mod/PartDesign/Gui/CMakeLists.txt +++ b/src/Mod/PartDesign/Gui/CMakeLists.txt @@ -37,7 +37,7 @@ set(PartDesignGui_MOC_HDRS TaskDraftParameters.h TaskThicknessParameters.h TaskDressUpParameters.h - TaskHoleParameters.h + #TaskHoleParameters.h TaskRevolutionParameters.h TaskGrooveParameters.h TaskTransformedMessages.h @@ -67,7 +67,7 @@ set(PartDesignGui_UIC_SRCS TaskDraftParameters.ui TaskThicknessParameters.ui TaskBooleanParameters.ui - TaskHoleParameters.ui + #TaskHoleParameters.ui TaskRevolutionParameters.ui TaskGrooveParameters.ui TaskTransformedMessages.ui @@ -92,8 +92,8 @@ SET(PartDesignGuiViewProvider_SRCS CommandPrimitive.cpp ViewProviderBody.h ViewProviderPad.cpp ViewProviderPad.h - ViewProviderHole.cpp - ViewProviderHole.h + #ViewProviderHole.cpp + #ViewProviderHole.h ViewProviderPocket.cpp ViewProviderPocket.h ViewProviderChamfer.cpp @@ -199,9 +199,9 @@ SET(PartDesignGuiTaskDlgs_SRCS TaskMultiTransformParameters.ui TaskMultiTransformParameters.cpp TaskMultiTransformParameters.h - TaskHoleParameters.ui - TaskHoleParameters.cpp - TaskHoleParameters.h + #TaskHoleParameters.ui + #TaskHoleParameters.cpp + #TaskHoleParameters.h TaskDatumParameters.ui TaskDatumParameters.cpp TaskDatumParameters.h diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 4a25ec23f..d7eb7cedf 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -781,7 +781,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Separator" << "PartDesign_Boolean" << "Separator" - << "PartDesign_Hole"; + //<< "PartDesign_Hole" + << "PartDesign_InvoluteGear"; // For 0.13 a couple of python packages like numpy, matplotlib and others // are not deployed with the installer on Windows. Thus, the WizardShaft is diff --git a/src/Mod/PartDesign/InitGui.py b/src/Mod/PartDesign/InitGui.py index 8185fc7b6..5a6dba048 100644 --- a/src/Mod/PartDesign/InitGui.py +++ b/src/Mod/PartDesign/InitGui.py @@ -52,10 +52,10 @@ class PartDesignWorkbench ( Workbench ): import InvoluteGearFeature except ImportError: print "Involute gear module cannot be loaded" - try: - from FeatureHole import HoleGui - except: - pass + #try: + # from FeatureHole import HoleGui + #except: + # pass def GetClassName(self): return "PartDesignGui::Workbench" diff --git a/src/Mod/PartDesign/InitGui.py.orig b/src/Mod/PartDesign/InitGui.py.orig index 000525634..06a1f693d 100644 --- a/src/Mod/PartDesign/InitGui.py.orig +++ b/src/Mod/PartDesign/InitGui.py.orig @@ -46,15 +46,17 @@ class PartDesignWorkbench ( Workbench ): from FeatureHole import HoleGui except: pass -<<<<<<< 1cdecc120fcdcd3447f72fdd734cf6c4f78b056b +<<<<<<< b5588a8b68f0650311b83fab5cf5afffd31f9a5f import PartDesignGui import PartDesign try: import InvoluteGearFeature except ImportError: print "Involute gear module cannot be loaded" - def GetClassName(self): - return "PartDesignGui::Workbench" + try: + from FeatureHole import HoleGui + except: + pass ======= import PartDesignGui import PartDesign @@ -62,13 +64,13 @@ class PartDesignWorkbench ( Workbench ): import InvoluteGearFeature except ImportError: print "Involute gear module cannot be loaded" - try: - from FeatureHole import HoleGui - except: - pass + #try: + # from FeatureHole import HoleGui + #except: + # pass +>>>>>>> remove hole feature - def GetClassName(self): - return "PartDesignGui::Workbench" ->>>>>>> some fixes + def GetClassName(self): + return "PartDesignGui::Workbench" Gui.addWorkbench(PartDesignWorkbench())