Part: add ViewProviderProjectOnSurface

This commit is contained in:
wmayer
2024-03-25 17:33:22 +01:00
committed by wwmayer
parent 070300f3a7
commit baac64f40f
4 changed files with 104 additions and 0 deletions

View File

@@ -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();

View File

@@ -213,6 +213,8 @@ SET(PartGui_SRCS
ViewProviderPython.h
ViewProviderBoolean.cpp
ViewProviderBoolean.h
ViewProviderProjectOnSurface.cpp
ViewProviderProjectOnSurface.h
ViewProviderRuledSurface.cpp
ViewProviderRuledSurface.h
ViewProviderPrimitive.cpp

View File

@@ -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 <wmayer[at]users.sourceforge.net> *
* *
* 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 *
* <https://www.gnu.org/licenses/>. *
* *
**************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#include <QAction>
#include <QMenu>
#endif
#include "ViewProviderProjectOnSurface.h"
#include "DlgProjectionOnSurface.h"
#include <Gui/Control.h>
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;

View File

@@ -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 <wmayer[at]users.sourceforge.net> *
* *
* 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 *
* <https://www.gnu.org/licenses/>. *
* *
**************************************************************************/
#ifndef PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H
#define PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H
#include <Mod/Part/Gui/ViewProvider.h>
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