diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index 73c931bc66..9de0d18578 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -70,6 +70,7 @@ #include "ViewProviderPlaneParametric.h" #include "ViewProviderPointParametric.h" #include "ViewProviderPrism.h" +#include "ViewProviderProjectOnSurface.h" #include "ViewProviderRegularPolygon.h" #include "ViewProviderRuledSurface.h" #include "ViewProviderSphereParametric.h" @@ -209,6 +210,7 @@ PyMOD_INIT_FUNC(PartGui) PartGui::ViewProviderTorusParametric ::init(); PartGui::ViewProviderRuledSurface ::init(); PartGui::ViewProviderFace ::init(); + PartGui::ViewProviderProjectOnSurface ::init(); PartGui::DimensionLinear ::initClass(); PartGui::DimensionAngular ::initClass(); PartGui::ArcEngine ::initClass(); diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt index 46505f716a..d2b2f9cf9f 100644 --- a/src/Mod/Part/Gui/CMakeLists.txt +++ b/src/Mod/Part/Gui/CMakeLists.txt @@ -213,6 +213,8 @@ SET(PartGui_SRCS ViewProviderPython.h ViewProviderBoolean.cpp ViewProviderBoolean.h + ViewProviderProjectOnSurface.cpp + ViewProviderProjectOnSurface.h ViewProviderRuledSurface.cpp ViewProviderRuledSurface.h ViewProviderPrimitive.cpp diff --git a/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp new file mode 100644 index 0000000000..a262735bf2 --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2019 Manuel Apeltauer, direkt cnc-systeme GmbH * + * Copyright (c) 2024 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD 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 * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + +#include "PreCompiled.h" +#ifndef _PreComp_ +#include +#include +#endif + +#include "ViewProviderProjectOnSurface.h" +#include "DlgProjectionOnSurface.h" +#include + + +using namespace PartGui; + +PROPERTY_SOURCE(PartGui::ViewProviderProjectOnSurface, PartGui::ViewProviderPart) + + +ViewProviderProjectOnSurface::ViewProviderProjectOnSurface() +{ + const unsigned int color = 0x8ae23400; + LineColor.setValue(color); + ShapeColor.setValue(color); + PointColor.setValue(color); + Transparency.setValue(0); +} + +ViewProviderProjectOnSurface::~ViewProviderProjectOnSurface() = default; diff --git a/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h new file mode 100644 index 0000000000..c50ec32686 --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2019 Manuel Apeltauer, direkt cnc-systeme GmbH * + * Copyright (c) 2024 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD 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 * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + + +#ifndef PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H +#define PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H + +#include + + +namespace PartGui { + + +class PartGuiExport ViewProviderProjectOnSurface : public ViewProviderPart +{ + PROPERTY_HEADER_WITH_OVERRIDE(PartGui::ViewProviderProjectOnSurface); + +public: + /// constructor + ViewProviderProjectOnSurface(); + /// destructor + ~ViewProviderProjectOnSurface() override; +}; + +} // namespace PartGui + + +#endif // PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H +