diff --git a/src/Mod/Drawing/App/FeaturePage.cpp b/src/Mod/Drawing/App/FeaturePage.cpp index c1730ebc4..0af2e7f4d 100644 --- a/src/Mod/Drawing/App/FeaturePage.cpp +++ b/src/Mod/Drawing/App/FeaturePage.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "FeaturePage.h" #include "FeatureView.h" @@ -86,10 +87,11 @@ void FeaturePage::onChanged(const App::Property* prop) App::DocumentObjectExecReturn *FeaturePage::execute(void) { - if(Template.getValue() == "") + std::string temp = Template.getValue(); + if (temp.empty()) return App::DocumentObject::StdReturn; - Base::FileInfo fi(Template.getValue()); + Base::FileInfo fi(temp); if (!fi.isReadable()) { // if there is a old absolute template file set use a redirect fi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName()); @@ -186,8 +188,9 @@ std::vector FeaturePage::getEditableTextsFromTemplate(void) const { std::vector eds; - if (Template.getValue() != "") { - Base::FileInfo tfi(Template.getValue()); + std::string temp = Template.getValue(); + if (!temp.empty()) { + Base::FileInfo tfi(temp); if (!tfi.isReadable()) { // if there is a old absolute template file set use a redirect tfi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + tfi.fileName()); diff --git a/src/Mod/Part/App/PartFeature.h b/src/Mod/Part/App/PartFeature.h index 9bb4bd49a..5c08151bc 100644 --- a/src/Mod/Part/App/PartFeature.h +++ b/src/Mod/Part/App/PartFeature.h @@ -71,21 +71,21 @@ public: virtual std::vector getPySubObjects(const std::vector&) const; /** - /* Find the origin of a reference, e.g. the vertex or edge in a sketch that - /* produced a face - */ + * Find the origin of a reference, e.g. the vertex or edge in a sketch that + * produced a face + */ const TopoDS_Shape findOriginOf(const TopoDS_Shape& reference); protected: void onChanged(const App::Property* prop); TopLoc_Location getLocation() const; /** - /* Build a history of changes - /* MakeShape: The operation that created the changes, e.g. BRepAlgoAPI_Common - /* type: The type of object we are interested in, e.g. TopAbs_FACE - /* newS: The new shape that was created by the operation - /* oldS: The original shape prior to the operation - */ + * Build a history of changes + * MakeShape: The operation that created the changes, e.g. BRepAlgoAPI_Common + * type: The type of object we are interested in, e.g. TopAbs_FACE + * newS: The new shape that was created by the operation + * oldS: The original shape prior to the operation + */ ShapeHistory buildHistory(BRepBuilderAPI_MakeShape&, TopAbs_ShapeEnum type, const TopoDS_Shape& newS, const TopoDS_Shape& oldS); ShapeHistory joinHistory(const ShapeHistory&, const ShapeHistory&); @@ -121,9 +121,9 @@ public: // Utility methods /** -/* Find all faces cut by a line through the centre of gravity of a given face -/* Useful for the "up to face" options to pocket or pad -*/ + * Find all faces cut by a line through the centre of gravity of a given face + * Useful for the "up to face" options to pocket or pad + */ struct cutFaces { TopoDS_Face face; double distsq; @@ -137,3 +137,4 @@ std::vector findAllFacesCutBy(const TopoDS_Shape& shape, #endif // PART_FEATURE_H + diff --git a/src/Mod/Part/Gui/Makefile.am b/src/Mod/Part/Gui/Makefile.am index 15a2a094a..f214d928d 100644 --- a/src/Mod/Part/Gui/Makefile.am +++ b/src/Mod/Part/Gui/Makefile.am @@ -19,6 +19,7 @@ BUILT_SOURCES=\ ui_TaskFaceColors.h \ ui_TaskShapeBuilder.h \ ui_TaskLoft.h \ + ui_TaskSweep.h \ moc_CrossSections.cpp \ moc_DlgBooleanOperation.cpp \ moc_DlgExtrusion.cpp \ @@ -35,6 +36,7 @@ BUILT_SOURCES=\ moc_TaskFaceColors.cpp \ moc_TaskShapeBuilder.cpp \ moc_TaskLoft.cpp \ + moc_TaskSweep.cpp \ qrc_Part.cpp libPartGui_la_SOURCES=\ @@ -73,6 +75,8 @@ libPartGui_la_SOURCES=\ TaskShapeBuilder.h \ TaskLoft.cpp \ TaskLoft.h \ + TaskSweep.cpp \ + TaskSweep.h \ PreCompiled.cpp \ PreCompiled.h \ SoBrepShape.cpp \ @@ -230,6 +234,7 @@ EXTRA_DIST = \ TaskFaceColors.ui \ TaskShapeBuilder.ui \ TaskLoft.ui \ + TaskSweep.ui \ Resources/Part.qrc \ Resources/translations/Part_af.qm \ Resources/translations/Part_af.ts \ diff --git a/src/Mod/PartDesign/App/Makefile.am b/src/Mod/PartDesign/App/Makefile.am index 54d59e3bd..a3b251dec 100644 --- a/src/Mod/PartDesign/App/Makefile.am +++ b/src/Mod/PartDesign/App/Makefile.am @@ -17,6 +17,8 @@ libPartDesign_la_SOURCES=\ FeatureChamfer.h \ FeatureDressUp.cpp \ FeatureDressUp.h \ + FeatureGroove.cpp \ + FeatureGroove.h \ Body.cpp \ Body.h \ FeatureSketchBased.cpp \ diff --git a/src/Mod/PartDesign/Gui/Makefile.am b/src/Mod/PartDesign/Gui/Makefile.am index f7bbf7054..9977ac0c1 100644 --- a/src/Mod/PartDesign/Gui/Makefile.am +++ b/src/Mod/PartDesign/Gui/Makefile.am @@ -8,8 +8,10 @@ BUILT_SOURCES=\ moc_TaskPocketParameters.cpp \ moc_TaskChamferParameters.cpp \ moc_TaskFilletParameters.cpp \ + moc_TaskGrooveParameters.cpp \ moc_TaskHoleParameters.cpp \ moc_TaskRevolutionParameters.cpp \ + ui_TaskGrooveParameters.h \ ui_TaskPadParameters.h \ ui_TaskPatternRectangularParameters.h \ ui_TaskPocketParameters.h \ @@ -32,6 +34,8 @@ libPartDesignGui_la_SOURCES=\ Command.cpp \ PreCompiled.cpp \ PreCompiled.h \ + TaskGrooveParameters.cpp \ + TaskGrooveParameters.h \ TaskPadParameters.cpp \ TaskPadParameters.h \ TaskPatternRectangularParameters.cpp \ @@ -58,6 +62,8 @@ libPartDesignGui_la_SOURCES=\ ViewProviderChamfer.h \ ViewProviderFillet.cpp \ ViewProviderFillet.h \ + ViewProviderGroove.cpp \ + ViewProviderGroove.h \ ViewProviderRevolution.cpp \ ViewProviderRevolution.h \ ViewProviderPatternRectangular.cpp \