From 1b957e98bc07157855c93b3b3c4d099cca180599 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 4 Dec 2012 11:32:30 +0100 Subject: [PATCH] Fixes for OCC 6.3 --- src/Mod/PartDesign/App/FeatureDraft.cpp | 1 + src/Mod/PartDesign/App/FeatureSketchBased.cpp | 5 ++++ src/Mod/PartDesign/CMakeLists.txt | 25 ++----------------- src/Mod/PartDesign/Gui/Workbench.cpp | 5 +--- src/Mod/PartDesign/InitGui.py | 1 - 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureDraft.cpp b/src/Mod/PartDesign/App/FeatureDraft.cpp index 38ed3e713..422c1a827 100644 --- a/src/Mod/PartDesign/App/FeatureDraft.cpp +++ b/src/Mod/PartDesign/App/FeatureDraft.cpp @@ -47,6 +47,7 @@ # include #endif +#include #include #include "FeatureDraft.h" diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 5a9aaa41c..6d2fb9b3b 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -57,6 +57,7 @@ # include # include # include +# include #endif @@ -562,7 +563,11 @@ const bool SketchBased::checkLineCrossesFace(const gp_Lin &line, const TopoDS_Fa for (int i = 1; i <= intersector.NbExt(); i++) { +#if OCC_VERSION_HEX >= 0x060500 if (intersector.SquareDistance(i) < Precision::Confusion()) { +#else + if (intersector.Value(i) < Precision::Confusion()) { +#endif if (intersector.IsParallel()) { // A line that is coincident with the axis produces three intersections // 1 with the line itself and 2 with the adjacent edges diff --git a/src/Mod/PartDesign/CMakeLists.txt b/src/Mod/PartDesign/CMakeLists.txt index 72c01c533..956811364 100644 --- a/src/Mod/PartDesign/CMakeLists.txt +++ b/src/Mod/PartDesign/CMakeLists.txt @@ -44,27 +44,10 @@ SOURCE_GROUP("wizardshaft" FILES ${WizardShaft_SRCS}) SET(all_wizardshaft_files ${WizardShaft_SRCS}) ADD_CUSTOM_TARGET(WizardShaft ALL - SOURCES ${all_wizardshaft_files} + SOURCES ${all_wizardshaft_files} ) -SET(FeatureBore_SRCS - FeatureBore/__init__.py - FeatureBore/FeatureBore.py - FeatureBore/TaskBore.py -) -SOURCE_GROUP("featurebore" FILES ${FeatureBore_SRCS}) - -SET(FeatureBore_UI - FeatureBore/TaskBore.ui -) - -SET(all_featurebore_files ${FeatureBore_SRCS} ${FeatureBore_UI}) - -ADD_CUSTOM_TARGET(FeatureBore ALL - SOURCES ${all_featurebore_files} -) - -SET(all_files ${all_featurebore_files} ${all_wizardshaft_files}) +SET(all_files ${all_wizardshaft_files}) fc_copy_sources(Mod/PartDesign "${CMAKE_BINARY_DIR}/Mod/PartDesign" ${all_files}) @@ -73,8 +56,4 @@ INSTALL( ${WizardShaft_SRCS} DESTINATION Mod/PartDesign/WizardShaft - FILES - ${FeatureBore_SRCS} - DESTINATION - Mod/PartDesign/FeatureBore ) diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 5d39779d1..5a11069c1 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -87,7 +87,6 @@ void Workbench::activated() "PartDesign_Fillet", "PartDesign_Chamfer", "PartDesign_Draft", - "PartDesign_Bore", 0}; Watcher.push_back(new Gui::TaskView::TaskWatcherCommands( "SELECT Part::Feature SUBELEMENT Face COUNT 1", @@ -220,9 +219,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "PartDesign_LinearPattern" << "PartDesign_PolarPattern" // << "PartDesign_Scaled" - << "PartDesign_MultiTransform" - << "Separator" - << "PartDesign_Bore" + << "PartDesign_MultiTransform"; // 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 // not deployed either hence the check for the existence of the command. diff --git a/src/Mod/PartDesign/InitGui.py b/src/Mod/PartDesign/InitGui.py index 6f67a02b7..8b590eafb 100644 --- a/src/Mod/PartDesign/InitGui.py +++ b/src/Mod/PartDesign/InitGui.py @@ -31,7 +31,6 @@ class PartDesignWorkbench ( Workbench ): "PartDesign workbench object" - from FeatureBore import TaskBore Icon = """ /* XPM */ static char * partdesign_xpm[] = {