From 76f2b120ff041809b62bdb05d2f1b317bc7141bb Mon Sep 17 00:00:00 2001 From: paddle Date: Fri, 13 Jun 2025 16:57:43 +0200 Subject: [PATCH] Sketcher: Port and fix internal faces from RealThunder's branch Co-authored-by: Zheng Lei Co-authored-by: Kacper Donat Co-authored-by: Pierre-Louis Boyer --- src/Mod/Part/Gui/AppPartGui.cpp | 1 + src/Mod/Part/Gui/SoFCShapeObject.cpp | 17 ++ src/Mod/Part/Gui/SoFCShapeObject.h | 24 ++- src/Mod/Part/Gui/ViewProviderExt.cpp | 17 ++ src/Mod/Part/Gui/ViewProviderExt.h | 11 +- .../Part/Gui/ViewProviderPreviewExtension.cpp | 14 +- .../Part/Gui/ViewProviderPreviewExtension.h | 12 +- src/Mod/Sketcher/Gui/AppSketcherGui.cpp | 1 + src/Mod/Sketcher/Gui/SketcherSettings.cpp | 9 +- src/Mod/Sketcher/Gui/SketcherSettings.ui | 16 ++ .../Gui/SketcherSettingsAppearance.ui | 181 ++++++++++-------- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 177 +++++++++++++++-- src/Mod/Sketcher/Gui/ViewProviderSketch.h | 30 +++ 13 files changed, 391 insertions(+), 119 deletions(-) diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index ce4e6c3848..c83446945a 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -163,6 +163,7 @@ PyMOD_INIT_FUNC(PartGui) PartGui::SoBrepEdgeSet ::initClass(); PartGui::SoBrepPointSet ::initClass(); PartGui::SoFCControlPoints ::initClass(); + PartGui::SoFCShape ::initClass(); PartGui::SoPreviewShape ::initClass(); PartGui::ViewProviderAttachExtension ::init(); PartGui::ViewProviderAttachExtensionPython ::init(); diff --git a/src/Mod/Part/Gui/SoFCShapeObject.cpp b/src/Mod/Part/Gui/SoFCShapeObject.cpp index c6b1f31955..048c04e314 100644 --- a/src/Mod/Part/Gui/SoFCShapeObject.cpp +++ b/src/Mod/Part/Gui/SoFCShapeObject.cpp @@ -47,6 +47,23 @@ using namespace PartGui; +SO_NODE_SOURCE(SoFCShape); + +SoFCShape::SoFCShape() + : coords(new SoCoordinate3) + , norm(new SoNormal) + , faceset(new SoBrepFaceSet) + , lineset(new SoBrepEdgeSet) + , nodeset(new SoBrepPointSet) +{ + SO_NODE_CONSTRUCTOR(SoFCShape); +} + +void SoFCShape::initClass() +{ + SO_NODE_INIT_CLASS(SoFCShape, SoSeparator, "Separator"); +} + SO_NODE_SOURCE(SoFCControlPoints) void SoFCControlPoints::initClass() diff --git a/src/Mod/Part/Gui/SoFCShapeObject.h b/src/Mod/Part/Gui/SoFCShapeObject.h index 834a344856..84589b9b8a 100644 --- a/src/Mod/Part/Gui/SoFCShapeObject.h +++ b/src/Mod/Part/Gui/SoFCShapeObject.h @@ -23,14 +23,34 @@ #ifndef PARTGUI_SOFCSHAPEOBJECT_H #define PARTGUI_SOFCSHAPEOBJECT_H +#include "SoBrepEdgeSet.h" +#include "SoBrepFaceSet.h" +#include "SoBrepPointSet.h" + #include #include +#include +#include +#include #include -#include - namespace PartGui { +class PartGuiExport SoFCShape : public SoSeparator { + using inherited = SoSeparator; + SO_NODE_HEADER(SoFCShape); + +public: + SoFCShape(); + static void initClass(); + + SoCoordinate3* coords; + SoNormal* norm; + SoBrepFaceSet* faceset; + SoBrepEdgeSet* lineset; + SoBrepPointSet* nodeset; +}; + class PartGuiExport SoFCControlPoints : public SoShape { using inherited = SoShape; diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index 4445637018..3de944e65f 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -1311,6 +1311,23 @@ void ViewProviderPartExt::setupCoinGeometry(TopoDS_Shape shape, # endif } +void ViewProviderPartExt::setupCoinGeometry(TopoDS_Shape shape, + SoFCShape* node, + double deviation, + double angularDeflection, + bool normalsFromUV) +{ + setupCoinGeometry(shape, + node->coords, + node->faceset, + node->norm, + node->lineset, + node->nodeset, + deviation, + angularDeflection, + normalsFromUV); +} + void ViewProviderPartExt::updateVisual() { Gui::SoUpdateVBOAction action; diff --git a/src/Mod/Part/Gui/ViewProviderExt.h b/src/Mod/Part/Gui/ViewProviderExt.h index 9c1391fdd3..1f6950d50f 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.h +++ b/src/Mod/Part/Gui/ViewProviderExt.h @@ -23,6 +23,9 @@ #ifndef PARTGUI_VIEWPROVIDERPARTEXT_H #define PARTGUI_VIEWPROVIDERPARTEXT_H +#include "SoFCShapeObject.h" + + #include #include @@ -169,7 +172,13 @@ public: SoBrepPointSet* nodeset, double deviation, double angularDeflection, - bool normalsFromUV); + bool normalsFromUV = false); + + static void setupCoinGeometry(TopoDS_Shape shape, + SoFCShape* node, + double deviation, + double angularDeflection, + bool normalsFromUV = false); protected: bool setEdit(int ModNum) override; diff --git a/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp b/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp index 0cc338ae33..24fd32232d 100644 --- a/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp +++ b/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp @@ -45,11 +45,6 @@ SO_NODE_SOURCE(SoPreviewShape); const SbColor SoPreviewShape::defaultColor = SbColor(1.F, 0.F, 1.F); SoPreviewShape::SoPreviewShape() - : coords(new SoCoordinate3) - , norm(new SoNormal) - , faceset(new PartGui::SoBrepFaceSet) - , lineset(new PartGui::SoBrepEdgeSet) - , nodeset(new PartGui::SoBrepPointSet) { SO_NODE_CONSTRUCTOR(SoPreviewShape); @@ -216,14 +211,9 @@ void ViewProviderPreviewExtension::updatePreviewShape(Part::TopoShape shape, const auto updatePreviewShape = [vp](SoPreviewShape* preview, Part::TopoShape shape) { ViewProviderPartExt::setupCoinGeometry(shape.getShape(), - preview->coords, - preview->faceset, - preview->norm, - preview->lineset, - preview->nodeset, + preview, vp->Deviation.getValue(), - vp->AngularDeflection.getValue(), - false); + vp->AngularDeflection.getValue()); }; try { diff --git a/src/Mod/Part/Gui/ViewProviderPreviewExtension.h b/src/Mod/Part/Gui/ViewProviderPreviewExtension.h index 137c3079fb..98bd54c92a 100644 --- a/src/Mod/Part/Gui/ViewProviderPreviewExtension.h +++ b/src/Mod/Part/Gui/ViewProviderPreviewExtension.h @@ -27,6 +27,7 @@ #include "SoBrepEdgeSet.h" #include "SoBrepFaceSet.h" #include "SoBrepPointSet.h" +#include "SoFCShapeObject.h" #include @@ -47,8 +48,8 @@ namespace PartGui { -class PartGuiExport SoPreviewShape : public SoSeparator { - using inherited = SoSeparator; +class PartGuiExport SoPreviewShape : public SoFCShape { + using inherited = SoFCShape; SO_NODE_HEADER(SoPreviewShape); public: @@ -62,13 +63,6 @@ public: SoSFColor color; SoSFFloat transparency; SoSFFloat lineWidth; - - SoCoordinate3* coords; - SoNormal* norm; - - SoBrepFaceSet* faceset; - SoBrepEdgeSet* lineset; - SoBrepPointSet* nodeset; }; class PartGuiExport ViewProviderPreviewExtension : public Gui::ViewProviderExtension { diff --git a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp index e27a0eb2e9..c636aa293c 100644 --- a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp +++ b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp @@ -134,6 +134,7 @@ PyMOD_INIT_FUNC(SketcherGui) SketcherGui::ViewProviderCustom ::init(); SketcherGui::ViewProviderCustomPython ::init(); SketcherGui::SoZoomTranslation ::initClass(); + SketcherGui::SoSketchFaces ::initClass(); SketcherGui::PropertyConstraintListItem ::init(); SketcherGui::ViewProviderSketchGeometryExtension ::init(); diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp index 7a752ba8b9..11db4327d2 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp +++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp @@ -113,6 +113,7 @@ void SketcherSettings::saveSettings() ui->checkBoxHorVerAuto->onSave(); ui->checkBoxLineGroup->onSave(); ui->checkBoxAddExtGeo->onSave(); + ui->checkBoxMakeInternals->onSave(); enum { @@ -190,8 +191,7 @@ void SketcherSettings::loadSettings() ui->checkBoxHorVerAuto->onRestore(); setProperty("checkBoxHorVerAuto", ui->checkBoxHorVerAuto->isChecked()); ui->checkBoxAddExtGeo->onRestore(); - setProperty("checkBoxLineGroup", ui->checkBoxLineGroup->isChecked()); - ui->checkBoxAddExtGeo->onRestore(); + ui->checkBoxMakeInternals->onRestore(); // Dimensioning constraints mode ui->dimensioningMode->clear(); @@ -597,6 +597,8 @@ void SketcherSettingsAppearance::saveSettings() ui->ExternalWidth->onSave(); ui->ExternalDefiningWidth->onSave(); + ui->InternalFaceColor->onSave(); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Sketcher/View"); QVariant data = ui->EdgePattern->itemData(ui->EdgePattern->currentIndex()); @@ -652,6 +654,9 @@ void SketcherSettingsAppearance::loadSettings() ui->ExternalWidth->onRestore(); ui->ExternalDefiningWidth->onRestore(); + ui->InternalFaceColor->setAllowTransparency(true); + ui->InternalFaceColor->onRestore(); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Sketcher/View"); int pattern = hGrp->GetInt("EdgePattern", 0b1111111111111111); diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.ui b/src/Mod/Sketcher/Gui/SketcherSettings.ui index 3ccac90e36..a21f5462f2 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettings.ui @@ -234,6 +234,22 @@ Requires to re-enter edit mode to take effect. + + + + Closed loops will automatically generate internal faces which are selectable to be used with other tools + + + Generate internal faces + + + Mod/Sketcher + + + MakeInternals + + + diff --git a/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui b/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui index 574fedeadd..ec66e0dfeb 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettingsAppearance.ui @@ -872,83 +872,112 @@ Colors Outside Sketcher - + - - - - - Vertex - - - - - - - Color of vertices outside edit mode - - - - 255 - 255 - 255 - - - - SketchVertexColor - - - View - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 200 - 0 - - - - Edge - - - - - - - Color of edges outside edit mode - - - - 255 - 255 - 255 - - - - SketchEdgeColor - - - View - - - - + + + Vertex + + + + + + + Color of vertices outside edit mode + + + + 255 + 255 + 255 + + + + SketchVertexColor + + + View + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 200 + 0 + + + + Edge + + + + + + + Color of edges outside edit mode + + + + 255 + 255 + 255 + + + + SketchEdgeColor + + + View + + + + + + + Face + + + + + + + + 0 + 0 + + + + Color of internal faces formed by intersecting geometry or closed loops in the sketch + + + + 84 + 171 + 255 + + + + SketchFaceColor + + + Mod/Sketcher/General + + diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 81f7a243a9..0dc4c5330c 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -54,6 +54,7 @@ #include #include #include +// #include #include #include #include @@ -74,6 +75,8 @@ #include "ViewProviderSketchGeometryExtension.h" #include "Workbench.h" +#include + // clang-format off FC_LOG_LEVEL_INIT("Sketch", true, true) @@ -150,6 +153,20 @@ void ViewProviderSketch::ParameterObserver::updateColorProperty(const std::strin colorprop->setValue(elementAppColor); } +void ViewProviderSketch::ParameterObserver::updateShapeAppearanceProperty(const std::string& string, App::Property* property) +{ + auto matProp = static_cast(property); + + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + unsigned long shcol = hGrp->GetUnsigned(string.c_str(), 0x54abff40); + float r = ((shcol >> 24) & 0xff) / 255.0; + float g = ((shcol >> 16) & 0xff) / 255.0; + float b = ((shcol >> 8) & 0xff) / 255.0; + float a = (shcol & 0xff) / 255.0; + matProp->setDiffuseColor(r, g, b); + matProp->setTransparency(1 - a); +} + void ViewProviderSketch::ParameterObserver::updateGridSize(const std::string& string, App::Property* property) { @@ -380,6 +397,13 @@ void ViewProviderSketch::ParameterObserver::initParameters() } }, &Client.PointColor}}, + {"SketchFaceColor", + {[this](const std::string& string, App::Property* property) { + if (Client.AutoColor.getValue()) { + updateShapeAppearanceProperty(string, property); + } + }, + &Client.ShapeAppearance}}, }; for (auto& val : parameterMap) { @@ -463,7 +487,30 @@ QString ViewProviderSketch::ToolManager::getToolWidgetText() const } } +/*************************** SoSketchFaces **************************/ +SO_NODE_SOURCE(SoSketchFaces); + +SoSketchFaces::SoSketchFaces(){ + SO_NODE_CONSTRUCTOR(SoSketchFaces); + + SO_NODE_ADD_FIELD(color, (SbColor(1.0f, 1.0f, 1.0f))); + SO_NODE_ADD_FIELD(transparency, (0.8)); + // + auto* material = new SoMaterial; + material->diffuseColor.connectFrom(&color); + material->transparency.connectFrom(&transparency); + + SoSeparator::addChild(material); + SoSeparator::addChild(coords); + SoSeparator::addChild(norm); + SoSeparator::addChild(faceset); +} + +void SoSketchFaces::initClass() +{ + SO_NODE_INIT_CLASS(SoSketchFaces, SoFCShape, "FCShape"); +} /*************************** ViewProviderSketch **************************/ @@ -477,7 +524,6 @@ SbVec2s ViewProviderSketch::DoubleClick::newCursorPos; // Construction/Destruction /* TRANSLATOR SketcherGui::ViewProviderSketch */ - PROPERTY_SOURCE_WITH_EXTENSIONS(SketcherGui::ViewProviderSketch, PartGui::ViewProvider2DObject) @@ -485,6 +531,8 @@ ViewProviderSketch::ViewProviderSketch() : SelectionObserver(false) , toolManager(this) , Mode(STATUS_NONE) + , pcSketchFaces(new SoSketchFaces) + , pcSketchFacesToggle(new SoToggleSwitch) , listener(nullptr) , editCoinManager(nullptr) , snapManager(nullptr) @@ -588,6 +636,10 @@ ViewProviderSketch::ViewProviderSketch() rubberband = std::make_unique(); cameraSensor.setFunction(&ViewProviderSketch::camSensCB); + + updateColorPropertiesVisibility(); + + pcSketchFacesToggle->addChild(pcSketchFaces); } ViewProviderSketch::~ViewProviderSketch() @@ -2895,10 +2947,22 @@ void ViewProviderSketch::drawEditMarkers(const std::vector& Edit } void ViewProviderSketch::updateData(const App::Property* prop) { - ViewProvider2DObject::updateData(prop); + if (std::string(prop->getName()) != "ShapeMaterial") { + // We don't want material to override the colors of sketches. + ViewProvider2DObject::updateData(prop); + } - if (prop != &getSketchObject()->Constraints) + if (prop == &getSketchObject()->InternalShape) { + const auto& shape = getSketchObject()->InternalShape.getValue(); + setupCoinGeometry(shape, + pcSketchFaces, + Deviation.getValue(), + AngularDeflection.getValue()); + } + + if (prop != &getSketchObject()->Constraints) { signalElementsChanged(); + } } void ViewProviderSketch::slotSolverUpdate() @@ -2931,6 +2995,8 @@ void ViewProviderSketch::slotSolverUpdate() void ViewProviderSketch::onChanged(const App::Property* prop) { + ViewProvider2DObject::onChanged(prop); + if (prop == &VisualLayerList) { if (isInEditMode()) { // Configure and rebuild Coin SceneGraph @@ -2940,23 +3006,38 @@ void ViewProviderSketch::onChanged(const App::Property* prop) } if (prop == &AutoColor) { - auto usesAutomaticColors = AutoColor.getValue(); - - // when auto color is enabled don't save color information in the document - // so it does not cause unnecessary updates if multiple users use different colors - LineColor.setStatus(App::Property::Transient, usesAutomaticColors); - PointColor.setStatus(App::Property::Transient, usesAutomaticColors); - - // and mark this property as read-only hidden so it's not possible to change manually - LineColor.setStatus(App::Property::ReadOnly, usesAutomaticColors); - LineColor.setStatus(App::Property::Hidden, usesAutomaticColors); - PointColor.setStatus(App::Property::ReadOnly, usesAutomaticColors); - PointColor.setStatus(App::Property::Hidden, usesAutomaticColors); - + updateColorPropertiesVisibility(); return; } - ViewProvider2DObject::onChanged(prop); + if (prop == &Visibility) { + pcSketchFacesToggle->on = Visibility.getValue(); + return; + } + + if (prop == &ShapeAppearance) { + pcSketchFaces->color.setValue(Base::convertTo(ShapeAppearance.getDiffuseColor())); + pcSketchFaces->transparency.setValue(ShapeAppearance.getTransparency()); + } +} + +void SketcherGui::ViewProviderSketch::updateColorPropertiesVisibility() +{ + auto usesAutomaticColors = AutoColor.getValue(); + + // when auto color is enabled don't save color information in the document + // so it does not cause unnecessary updates if multiple users use different colors + LineColor.setStatus(App::Property::Transient, usesAutomaticColors); + PointColor.setStatus(App::Property::Transient, usesAutomaticColors); + ShapeAppearance.setStatus(App::Property::Transient, usesAutomaticColors); + + // and mark this property as read-only hidden so it's not possible to change manually + LineColor.setStatus(App::Property::ReadOnly, usesAutomaticColors); + LineColor.setStatus(App::Property::Hidden, usesAutomaticColors); + PointColor.setStatus(App::Property::ReadOnly, usesAutomaticColors); + PointColor.setStatus(App::Property::Hidden, usesAutomaticColors); + ShapeAppearance.setStatus(App::Property::ReadOnly, usesAutomaticColors); + ShapeAppearance.setStatus(App::Property::Hidden, usesAutomaticColors); } void SketcherGui::ViewProviderSketch::startRestoring() @@ -2987,12 +3068,74 @@ void SketcherGui::ViewProviderSketch::finishRestoring() // update colors according to current user preferences pObserver->updateFromParameter("SketchEdgeColor"); pObserver->updateFromParameter("SketchVertexColor"); + pObserver->updateFromParameter("SketchFaceColor"); + + updateColorPropertiesVisibility(); + } + + if (getSketchObject()->MakeInternals.getValue()) { + updateVisual(); } } +// clang-format on +bool ViewProviderSketch::getElementPicked(const SoPickedPoint* pp, std::string& subname) const +{ + if (pp->getPath()->containsNode(pcSketchFaces) && !isInEditMode()) { + if (ViewProvider2DObject::getElementPicked(pp, subname)) { + subname = SketchObject::internalPrefix() + subname; + auto& elementMap = getSketchObject()->getInternalElementMap(); + + if (auto it = elementMap.find(subname); it != elementMap.end()) { + subname = it->second; + } + + return true; + } + } + + return ViewProvider2DObject::getElementPicked(pp, subname); +} + +bool ViewProviderSketch::getDetailPath(const char* subname, + SoFullPath* pPath, + bool append, + SoDetail*& det) const +{ + const auto getLastPartOfName = [](const char* subname) -> const char* { + const char* realName = strrchr(subname, '.'); + + return realName ? realName + 1 : subname; + }; + + if (!isInEditMode() && subname) { + const char* realName = getLastPartOfName(subname); + + realName = SketchObject::convertInternalName(realName); + if (realName) { + auto len = pPath->getLength(); + if (append) { + pPath->append(pcRoot); + pPath->append(pcModeSwitch); + } + + if (!ViewProvider2DObject::getDetailPath(realName, pPath, false, det)) { + pPath->truncate(len); + return false; + } + return true; + } + } + + return ViewProvider2DObject::getDetailPath(subname, pPath, append, det); +} +// clang-format off + void ViewProviderSketch::attach(App::DocumentObject* pcFeat) { ViewProvider2DObject::attach(pcFeat); + + getAnnotation()->addChild(pcSketchFacesToggle); } void ViewProviderSketch::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.h b/src/Mod/Sketcher/Gui/ViewProviderSketch.h index 629250d417..4bfaf0a590 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.h +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.h @@ -45,6 +45,9 @@ #include "ShortcutListener.h" #include "Utils.h" +#include +#include + class TopoDS_Shape; class TopoDS_Face; @@ -97,6 +100,20 @@ class DrawSketchHandler; using GeoList = Sketcher::GeoList; using GeoListFacade = Sketcher::GeoListFacade; +class SketcherGuiExport SoSketchFaces: public PartGui::SoFCShape +{ + using inherited = SoFCShape; + SO_NODE_HEADER(SoSketchFaces); + +public: + SoSketchFaces(); + + static void initClass(); + + SoSFColor color; + SoSFFloat transparency; +}; + /** @brief The Sketch ViewProvider * * @details @@ -191,6 +208,8 @@ private: float g, float b); + void updateShapeAppearanceProperty(const std::string& string, App::Property* property); + void updateEscapeKeyBehaviour(const std::string& string, App::Property* property); void updateAutoRecompute(const std::string& string, App::Property* property); @@ -747,6 +766,12 @@ protected: void startRestoring() override; void finishRestoring() override; + bool getElementPicked(const SoPickedPoint* pp, std::string& subname) const override; + bool getDetailPath(const char* subname, + SoFullPath* pPath, + bool append, + SoDetail*& det) const override; + private: /// function to handle OCCT BSpline weight calculation singularities and representation void scaleBSplinePoleCirclesAndUpdateSolverAndSketchObjectGeometry( @@ -828,6 +853,8 @@ private: void slotToolWidgetChanged(QWidget* newwidget); + void updateColorPropertiesVisibility(); + /** @name Attorney functions*/ //@{ /* private functions to decouple Attorneys and Clients from the internal implementation of @@ -944,6 +971,9 @@ private: std::string editObjName; std::string editSubName; + Gui::CoinPtr pcSketchFaces; + Gui::CoinPtr pcSketchFacesToggle; + ShortcutListener* listener; std::unique_ptr editCoinManager;