diff --git a/src/Mod/Part/App/PrimitiveFeature.h b/src/Mod/Part/App/PrimitiveFeature.h index 4f1be5a9a..9fbf133af 100644 --- a/src/Mod/Part/App/PrimitiveFeature.h +++ b/src/Mod/Part/App/PrimitiveFeature.h @@ -67,6 +67,10 @@ public: App::DocumentObjectExecReturn *execute(void); short mustExecute() const; void onChanged(const App::Property*); + /// returns the type name of the ViewProvider + const char* getViewProviderName(void) const { + return "PartGui::ViewProviderPointParametric"; + } //@} }; @@ -238,6 +242,10 @@ public: /// recalculate the feature App::DocumentObjectExecReturn *execute(void); short mustExecute() const; + /// returns the type name of the ViewProvider + const char* getViewProviderName(void) const { + return "PartGui::ViewProviderHelixParametric"; + } //@} protected: @@ -295,6 +303,10 @@ public: App::DocumentObjectExecReturn *execute(void); short mustExecute() const; void onChanged(const App::Property*); + /// returns the type name of the ViewProvider + const char* getViewProviderName(void) const { + return "PartGui::ViewProviderEllipseParametric"; + } //@} private: diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index d6a0967fe..e7a02cc7f 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -38,6 +38,9 @@ #include "ViewProviderBoolean.h" #include "ViewProviderCircleParametric.h" #include "ViewProviderLineParametric.h" +#include "ViewProviderPointParametric.h" +#include "ViewProviderEllipseParametric.h" +#include "ViewProviderHelixParametric.h" #include "DlgSettingsGeneral.h" #include "DlgSettings3DViewPartImp.h" @@ -116,6 +119,9 @@ void PartGuiExport initPartGui() PartGui::ViewProviderMultiCommon ::init(); PartGui::ViewProviderCircleParametric ::init(); PartGui::ViewProviderLineParametric ::init(); + PartGui::ViewProviderPointParametric ::init(); + PartGui::ViewProviderEllipseParametric ::init(); + PartGui::ViewProviderHelixParametric ::init(); PartGui::Workbench ::init(); diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt index ddec97a3b..3085bc5f1 100644 --- a/src/Mod/Part/Gui/CMakeLists.txt +++ b/src/Mod/Part/Gui/CMakeLists.txt @@ -140,6 +140,12 @@ SET(PartGui_SRCS ViewProviderCircleParametric.h ViewProviderLineParametric.cpp ViewProviderLineParametric.h + ViewProviderPointParametric.cpp + ViewProviderPointParametric.h + ViewProviderEllipseParametric.cpp + ViewProviderEllipseParametric.h + ViewProviderHelixParametric.cpp + ViewProviderHelixParametric.h ViewProviderCurveNet.cpp ViewProviderCurveNet.h ViewProviderImport.cpp diff --git a/src/Mod/Part/Gui/ViewProviderBox.cpp b/src/Mod/Part/Gui/ViewProviderBox.cpp index f6a81705e..96815c696 100644 --- a/src/Mod/Part/Gui/ViewProviderBox.cpp +++ b/src/Mod/Part/Gui/ViewProviderBox.cpp @@ -48,7 +48,7 @@ PROPERTY_SOURCE(PartGui::ViewProviderBox, PartGui::ViewProviderPart) ViewProviderBox::ViewProviderBox() { - sPixmap = "Part_Box.svg"; + sPixmap = "Tree_Part.svg"; } ViewProviderBox::~ViewProviderBox() diff --git a/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp b/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp new file mode 100644 index 000000000..1c4cdb998 --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (c) 2004 Jürgen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#include "PreCompiled.h" + +#ifndef _PreComp_ +#endif + +/// Here the FreeCAD includes sorted by Base,App,Gui...... +#include + +#include "ViewProviderEllipseParametric.h" + + +//#include "Tree.h" + + + +using namespace PartGui; +using namespace std; + + +//************************************************************************** +// Construction/Destruction + +PROPERTY_SOURCE(PartGui::ViewProviderEllipseParametric, PartGui::ViewProviderPart) + + +ViewProviderEllipseParametric::ViewProviderEllipseParametric() +{ + sPixmap = "Part_Ellipse_Parametric.svg"; +} + +ViewProviderEllipseParametric::~ViewProviderEllipseParametric() +{ + +} + + + +// ********************************************************************************** + +std::vector ViewProviderEllipseParametric::getDisplayModes(void) const +{ + // get the modes of the father + std::vector StrList; + + // add your own modes + StrList.push_back("Flat Lines"); + StrList.push_back("Shaded"); + StrList.push_back("Wireframe"); + StrList.push_back("Points"); + + return StrList; +} diff --git a/src/Mod/Part/Gui/ViewProviderEllipseParametric.h b/src/Mod/Part/Gui/ViewProviderEllipseParametric.h new file mode 100644 index 000000000..a788d40ff --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderEllipseParametric.h @@ -0,0 +1,64 @@ +/*************************************************************************** + * Copyright (c) 2004 Jürgen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#ifndef PARTGUI_VIEWPROVIDERELLIPSEPARAMETRIC_H +#define PARTGUI_VIEWPROVIDERELLIPSEPARAMETRIC_H + +#include "ViewProvider.h" + + +class TopoDS_Shape; +class TopoDS_Face; +class SoSeparator; +class SbVec3f; +class SoTransform; + +namespace Gui { + class View3DInventorViewer; + class SoFCSelection; +} + +namespace PartGui { + + +class PartGuiExport ViewProviderEllipseParametric:public ViewProviderPart +{ + PROPERTY_HEADER(PartGui::ViewProviderEllipseParametric); + +public: + /// constructor + ViewProviderEllipseParametric(); + /// destructor + virtual ~ViewProviderEllipseParametric(); + + std::vector getDisplayModes(void) const; + +protected: + +}; + +} // namespace PartGui + + +#endif // PARTGUI_VIEWPROVIDERELLIPSEPARAMETRIC_H + diff --git a/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp b/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp new file mode 100644 index 000000000..d943a3011 --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (c) 2004 Jürgen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#include "PreCompiled.h" + +#ifndef _PreComp_ +#endif + +/// Here the FreeCAD includes sorted by Base,App,Gui...... +#include + +#include "ViewProviderHelixParametric.h" + + +//#include "Tree.h" + + + +using namespace PartGui; +using namespace std; + + +//************************************************************************** +// Construction/Destruction + +PROPERTY_SOURCE(PartGui::ViewProviderHelixParametric, PartGui::ViewProviderPart) + + +ViewProviderHelixParametric::ViewProviderHelixParametric() +{ + sPixmap = "Part_Helix_Parametric.svg"; +} + +ViewProviderHelixParametric::~ViewProviderHelixParametric() +{ + +} + + + +// ********************************************************************************** + +std::vector ViewProviderHelixParametric::getDisplayModes(void) const +{ + // get the modes of the father + std::vector StrList; + + // add your own modes + StrList.push_back("Flat Lines"); + StrList.push_back("Shaded"); + StrList.push_back("Wireframe"); + StrList.push_back("Points"); + + return StrList; +} diff --git a/src/Mod/Part/Gui/ViewProviderHelixParametric.h b/src/Mod/Part/Gui/ViewProviderHelixParametric.h new file mode 100644 index 000000000..c8a9bfe0b --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderHelixParametric.h @@ -0,0 +1,64 @@ +/*************************************************************************** + * Copyright (c) 2004 Jürgen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#ifndef PARTGUI_VIEWPROVIDERHELIXPARAMETRIC_H +#define PARTGUI_VIEWPROVIDERHELIXPARAMETRIC_H + +#include "ViewProvider.h" + + +class TopoDS_Shape; +class TopoDS_Face; +class SoSeparator; +class SbVec3f; +class SoTransform; + +namespace Gui { + class View3DInventorViewer; + class SoFCSelection; +} + +namespace PartGui { + + +class PartGuiExport ViewProviderHelixParametric:public ViewProviderPart +{ + PROPERTY_HEADER(PartGui::ViewProviderHelixParametric); + +public: + /// constructor + ViewProviderHelixParametric(); + /// destructor + virtual ~ViewProviderHelixParametric(); + + std::vector getDisplayModes(void) const; + +protected: + +}; + +} // namespace PartGui + + +#endif // PARTGUI_VIEWPROVIDERHELIXPARAMETRIC_H + diff --git a/src/Mod/Part/Gui/ViewProviderPointParametric.cpp b/src/Mod/Part/Gui/ViewProviderPointParametric.cpp new file mode 100644 index 000000000..e18182f28 --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderPointParametric.cpp @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (c) 2004 Jürgen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#include "PreCompiled.h" + +#ifndef _PreComp_ +#endif + +/// Here the FreeCAD includes sorted by Base,App,Gui...... +#include + +#include "ViewProviderPointParametric.h" + + +//#include "Tree.h" + + + +using namespace PartGui; +using namespace std; + + +//************************************************************************** +// Construction/Destruction + +PROPERTY_SOURCE(PartGui::ViewProviderPointParametric, PartGui::ViewProviderPart) + + +ViewProviderPointParametric::ViewProviderPointParametric() +{ + sPixmap = "Part_Point_Parametric.svg"; +} + +ViewProviderPointParametric::~ViewProviderPointParametric() +{ + +} + + + +// ********************************************************************************** + +std::vector ViewProviderPointParametric::getDisplayModes(void) const +{ + // get the modes of the father + std::vector StrList; + + // add your own modes + StrList.push_back("Flat Lines"); + StrList.push_back("Shaded"); + StrList.push_back("Wireframe"); + StrList.push_back("Points"); + + return StrList; +} diff --git a/src/Mod/Part/Gui/ViewProviderPointParametric.h b/src/Mod/Part/Gui/ViewProviderPointParametric.h new file mode 100644 index 000000000..2130d270d --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderPointParametric.h @@ -0,0 +1,64 @@ +/*************************************************************************** + * Copyright (c) 2004 Jürgen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#ifndef PARTGUI_VIEWPROVIDERPOINTPARAMETRIC_H +#define PARTGUI_VIEWPROVIDERPOINTPARAMETRIC_H + +#include "ViewProvider.h" + + +class TopoDS_Shape; +class TopoDS_Face; +class SoSeparator; +class SbVec3f; +class SoTransform; + +namespace Gui { + class View3DInventorViewer; + class SoFCSelection; +} + +namespace PartGui { + + +class PartGuiExport ViewProviderPointParametric:public ViewProviderPart +{ + PROPERTY_HEADER(PartGui::ViewProviderPointParametric); + +public: + /// constructor + ViewProviderPointParametric(); + /// destructor + virtual ~ViewProviderPointParametric(); + + std::vector getDisplayModes(void) const; + +protected: + +}; + +} // namespace PartGui + + +#endif // PARTGUI_VIEWPROVIDERPOINTPARAMETRIC_H +