1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030791: Visualization - possibility to display materials by different hatching style for clipping

#compilation corrections
This commit is contained in:
nds
2019-10-05 17:02:39 +03:00
parent 64c52c0521
commit c0b0919b8c
3 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

@@ -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")