From: nds Date: Sat, 5 Oct 2019 14:02:39 +0000 (+0300) Subject: 0030791: Visualization - possibility to display materials by different hatching style... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=c0b0919b8c5812a6ab1df1fd918ec466c48e6b8d;p=occt-copy.git 0030791: Visualization - possibility to display materials by different hatching style for clipping #compilation corrections --- diff --git a/src/Graphic3d/Graphic3d_ClipPlane.cxx b/src/Graphic3d/Graphic3d_ClipPlane.cxx index 3babbf2d17..c9922ba826 100755 --- a/src/Graphic3d/Graphic3d_ClipPlane.cxx +++ b/src/Graphic3d/Graphic3d_ClipPlane.cxx @@ -133,8 +133,8 @@ Handle(Graphic3d_ClipPlane) Graphic3d_ClipPlane::Clone() const // ======================================================================= void Graphic3d_ClipPlane::SetCappingColor (const Quantity_Color& theColor) { - myAspect->SetInteriorColor (theColor); - myAspect->ChangeFrontMaterial().SetColor (theColor); + mySectionStyle->SetInteriorColor (theColor); + mySectionStyle->ChangeFrontMaterial().SetColor (theColor); ++myAspectMod; } @@ -144,7 +144,7 @@ void Graphic3d_ClipPlane::SetCappingColor (const Quantity_Color& theColor) void Graphic3d_ClipPlane::SetCappingSectionStyle (const Handle(Graphic3d_AspectFillCapping)& theStyle) { mySectionStyle = theStyle; - if (myAspect->FrontMaterial().MaterialType() != Graphic3d_MATERIAL_ASPECT) + if (mySectionStyle->FrontMaterial().MaterialType() != Graphic3d_MATERIAL_ASPECT) { } } @@ -281,9 +281,9 @@ void Graphic3d_ClipPlane::SetChainNextPlane (const Handle(Graphic3d_ClipPlane)& // ======================================================================= void Graphic3d_ClipPlane::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const { - OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get()); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySectionStyle.get()); - OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myId); + //OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myId); OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPlane); diff --git a/src/Graphic3d/Graphic3d_ClipPlane.hxx b/src/Graphic3d/Graphic3d_ClipPlane.hxx index 781125d024..f9c04837b8 100755 --- a/src/Graphic3d/Graphic3d_ClipPlane.hxx +++ b/src/Graphic3d/Graphic3d_ClipPlane.hxx @@ -170,7 +170,7 @@ public: public: // @name user-defined graphical attributes //! Return color for rendering capping surface. - Quantity_Color CappingColor() const { return myAspect->FrontMaterial().MaterialType() == Graphic3d_MATERIAL_ASPECT ? myAspect->FrontMaterial().Color() : myAspect->InteriorColor(); } + Quantity_Color CappingColor() const { return mySectionStyle->FrontMaterial().MaterialType() == Graphic3d_MATERIAL_ASPECT ? mySectionStyle->FrontMaterial().Color() : mySectionStyle->InteriorColor(); } //! Set color for rendering capping surface. Standard_EXPORT void SetCappingColor (const Quantity_Color& theColor); diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index d2a7b1de5a..3ced0de064 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -9896,7 +9896,7 @@ static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, cons std::cout << "Syntax error: unknown material '" << aChangeArgs[1] << "'.\n"; return 1; } - aClipPlane->SetCappingMaterial (aMatName); + //aClipPlane->SetCappingMaterial (aMatName); } else if (aChangeArg == "-overrideaspect" || aChangeArg == "overrideaspect")