From 188f287291e4fd092e78de860f87c37c137c7519 Mon Sep 17 00:00:00 2001 From: Natalia ERMOLAEVA Date: Sun, 12 Apr 2020 09:48:32 +0300 Subject: [PATCH] Revert "0031495: Data Exchange: Store Sections visibility status in views." This reverts commit 8c8a84acac0d9c48f7419ea340b20c29b3750ce3. --- src/XCAFDoc/XCAFDoc.cxx | 11 ------ src/XCAFDoc/XCAFDoc.hxx | 3 -- src/XCAFDoc/XCAFDoc_ViewTool.cxx | 63 -------------------------------- src/XCAFDoc/XCAFDoc_ViewTool.hxx | 9 ----- 4 files changed, 86 deletions(-) diff --git a/src/XCAFDoc/XCAFDoc.cxx b/src/XCAFDoc/XCAFDoc.cxx index abcc5cbd08..e6c123c83e 100644 --- a/src/XCAFDoc/XCAFDoc.cxx +++ b/src/XCAFDoc/XCAFDoc.cxx @@ -271,17 +271,6 @@ const Standard_GUID& XCAFDoc::ViewRefPlaneGUID() return ID; } -//======================================================================= -//function : ViewRefSectionGUID -//purpose : -//======================================================================= - -const Standard_GUID& XCAFDoc::ViewRefSectionGUID() -{ - static const Standard_GUID ID("25709d87-4b29-49cd-9982-1a71e34e43fa"); - return ID; -} - //======================================================================= //function : ViewRefNoteGUID //purpose : diff --git a/src/XCAFDoc/XCAFDoc.hxx b/src/XCAFDoc/XCAFDoc.hxx index e157d73c77..f068198054 100644 --- a/src/XCAFDoc/XCAFDoc.hxx +++ b/src/XCAFDoc/XCAFDoc.hxx @@ -126,9 +126,6 @@ public: //! Return GUIDs for TreeNode representing specified types of View Standard_EXPORT static const Standard_GUID& ViewRefPlaneGUID(); - //! Return GUIDs for GraphNode representing Section - Standard_EXPORT static const Standard_GUID& ViewRefSectionGUID(); - //! Return GUIDs for GraphNode representing specified types of View Standard_EXPORT static const Standard_GUID& ViewRefNoteGUID(); diff --git a/src/XCAFDoc/XCAFDoc_ViewTool.cxx b/src/XCAFDoc/XCAFDoc_ViewTool.cxx index 1950c91891..059bd59577 100644 --- a/src/XCAFDoc/XCAFDoc_ViewTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ViewTool.cxx @@ -464,46 +464,6 @@ void XCAFDoc_ViewTool::SetClippingPlanes(const TDF_LabelSequence& theClippingPla aChGNode->SetFather(aPlaneGNode); } } - -//======================================================================= -//function : SetSections -//purpose : -//======================================================================= -void XCAFDoc_ViewTool::SetSections(const TDF_LabelSequence& theSectionsLabels, - const TDF_Label& theViewL) const -{ - if (!IsView(theViewL)) - return; - - Handle(XCAFDoc_GraphNode) aChGNode; - Handle(XCAFDoc_GraphNode) aSectionGNode; - - if (theViewL.FindAttribute(XCAFDoc::ViewRefSectionGUID(), aChGNode)) { - while (aChGNode->NbFathers() > 0) { - aSectionGNode = aChGNode->GetFather(1); - aSectionGNode->UnSetChild(aChGNode); - if (aSectionGNode->NbChildren() == 0) - aSectionGNode->ForgetAttribute(XCAFDoc::ViewRefSectionGUID()); - } - theViewL.ForgetAttribute(XCAFDoc::ViewRefSectionGUID()); - } - - if (!theViewL.FindAttribute(XCAFDoc::ViewRefSectionGUID(), aChGNode) && theSectionsLabels.Length() > 0) { - aChGNode = new XCAFDoc_GraphNode; - aChGNode = XCAFDoc_GraphNode::Set(theViewL); - aChGNode->SetGraphID(XCAFDoc::ViewRefSectionGUID()); - } - for (Standard_Integer i = theSectionsLabels.Lower(); i <= theSectionsLabels.Upper(); i++) { - if (!theSectionsLabels.Value(i).FindAttribute(XCAFDoc::ViewRefSectionGUID(), aSectionGNode)) { - aSectionGNode = new XCAFDoc_GraphNode; - aSectionGNode = XCAFDoc_GraphNode::Set(theSectionsLabels.Value(i)); - } - aSectionGNode->SetGraphID(XCAFDoc::ViewRefSectionGUID()); - aSectionGNode->SetChild(aChGNode); - aChGNode->SetFather(aSectionGNode); - } -} - //======================================================================= //function : SetEnabledShapes //purpose : @@ -697,29 +657,6 @@ Standard_Boolean XCAFDoc_ViewTool::GetRefClippingPlaneLabel(const TDF_Label& the return Standard_True; } -//======================================================================= -//function : GetRefSectionsLabels -//purpose : -//======================================================================= -Standard_Boolean XCAFDoc_ViewTool::GetRefSectionsLabels(const TDF_Label& theViewL, - TDF_LabelSequence& theSectionsLabels) const -{ - theSectionsLabels.Clear(); - Handle(TDataStd_TreeNode) aNode; - if (!theViewL.FindAttribute(XCAFDoc::ViewRefGUID(), aNode) || !aNode->HasFather()) { - Handle(XCAFDoc_GraphNode) aGNode; - if (theViewL.FindAttribute(XCAFDoc::ViewRefSectionGUID(), aGNode) && aGNode->NbFathers() > 0) { - for (Standard_Integer i = 1; i <= aGNode->NbFathers(); i++) - theSectionsLabels.Append(aGNode->GetFather(i)->Label()); - return Standard_True; - } else - return Standard_False; - } - - theSectionsLabels.Append(aNode->Father()->Label()); - return Standard_True; -} - //======================================================================= //function : GetRefEnabledShapesLabel //purpose : diff --git a/src/XCAFDoc/XCAFDoc_ViewTool.hxx b/src/XCAFDoc/XCAFDoc_ViewTool.hxx index 4175f9d291..d24d4f9eb7 100644 --- a/src/XCAFDoc/XCAFDoc_ViewTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ViewTool.hxx @@ -86,11 +86,6 @@ public: //! Set Clipping planes to given View Standard_EXPORT void SetClippingPlanes(const TDF_LabelSequence& theClippingPlaneLabels, const TDF_Label& theViewL) const; - - //! Set Sections to given View - Standard_EXPORT void SetSections(const TDF_LabelSequence& theSectionsLabels, - const TDF_Label& theViewL) const; - Standard_EXPORT void SetEnabledShapes(const TDF_LabelSequence& theShapesTransparencyLabels, const TDF_Label& theViewL) const; @@ -134,10 +129,6 @@ public: //! Returns False if the theViewL is not in View table Standard_EXPORT Standard_Boolean GetRefClippingPlaneLabel(const TDF_Label& theViewL, TDF_LabelSequence& theClippingPlaneLabels) const; - //! Returns Sections labels defined for label theViewL - //! Returns False if the theViewL is not in View table - Standard_EXPORT Standard_Boolean GetRefSectionsLabels(const TDF_Label& theViewL, TDF_LabelSequence& theSectionsLabels) const; - //! Returns shapes transparency labels defined for label theViewL //! Returns False if the theViewL is not in View table Standard_EXPORT Standard_Boolean GetRefEnabledShapesLabel(const TDF_Label& theViewL, TDF_LabelSequence& theShapesTranspanencyLabels) const; -- 2.39.5