From 3e5c374a9bb84434c129f8d7bc1b721bb3978144 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 8 Jun 2012 18:02:35 +0200 Subject: [PATCH] Fix build errors on Windows, fix a couple of bugs --- src/Mod/Part/App/PartFeature.cpp | 2 +- src/Mod/Part/App/PartFeature.h | 2 ++ src/Mod/PartDesign/App/FeaturePad.cpp | 5 +++-- src/Mod/PartDesign/App/FeaturePocket.cpp | 1 + src/Mod/PartDesign/Gui/Command.cpp | 5 +++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index ed936a46b..45e0076e9 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -272,6 +272,7 @@ template class PartExport FeaturePythonT; } // ---------------------------------------------------------------- + #include #include #include @@ -318,4 +319,3 @@ std::vector Part::findAllFacesCutBy( return result; } -// -------------------------------------------------------------------- diff --git a/src/Mod/Part/App/PartFeature.h b/src/Mod/Part/App/PartFeature.h index ed3de3737..9bb4bd49a 100644 --- a/src/Mod/Part/App/PartFeature.h +++ b/src/Mod/Part/App/PartFeature.h @@ -128,6 +128,8 @@ struct cutFaces { TopoDS_Face face; double distsq; }; + +PartExport std::vector findAllFacesCutBy(const TopoDS_Shape& shape, const TopoDS_Shape& face, const gp_Dir& dir); diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index c7742c1f4..c5791abcd 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -26,6 +26,7 @@ //# include //# include # include +# include # include # include # include @@ -87,7 +88,7 @@ App::DocumentObjectExecReturn *Pad::execute(void) return new App::DocumentObjectExecReturn("Length of pad too small"); double L2 = Length2.getValue(); if ((std::string(Type.getValueAsString()) == "TwoLengths") && (L < Precision::Confusion())) - return new App::DocumentObjectExecReturn("Second length of pad too small"); + return new App::DocumentObjectExecReturn("Second length of pad too small"); App::DocumentObject* link = Sketch.getValue(); if (!link) @@ -178,7 +179,7 @@ App::DocumentObjectExecReturn *Pad::execute(void) it_near = it; upToFace = (std::string(Type.getValueAsString()) == "UpToLast" ? it_far->face : it_near->face); } else { - if (FaceName.getValue() == "") + if (FaceName.isEmpty()) return new App::DocumentObjectExecReturn("Cannot extrude up to face: No face selected"); // Get active object, this is the object that the user referenced when he clicked on the face! diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index c7f4fa8ac..b6aec7dcd 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -27,6 +27,7 @@ # include # include # include +# include # include # include # include diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index d671fbe46..c69df762f 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -338,10 +338,11 @@ CmdPartDesignGroove::CmdPartDesignGroove() sAppModule = "PartDesign"; sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Groove"); - sToolTipText = QT_TR_NOOP("Revolve a selected sketch"); + sToolTipText = QT_TR_NOOP("Groove a selected sketch"); sWhatsThis = sToolTipText; sStatusTip = sToolTipText; - sPixmap = "PartDesign_Groove"; + //sPixmap = "PartDesign_Groove"; + sPixmap = "PartDesign_Revolution"; } void CmdPartDesignGroove::activated(int iMsg)