From f0db2a4a205eb5faa6b831047176e3f50217dcee Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 10 Jan 2020 16:27:22 +0300 Subject: [PATCH] Correct visualization problems with OCCT 7.4.0 --- src/ModuleBase/ModuleBase_ResultPrs.cpp | 3 +++ src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp | 2 +- src/XGUI/XGUI_Displayer.cpp | 5 +++-- src/XGUI/XGUI_ViewerProxy.cpp | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index 9bf101d3f..e58f460da 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -81,6 +81,9 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) new Prs3d_LineAspect(Quantity_NOC_GREEN, Aspect_TOL_SOLID, 1); aDrawer->SetFreeBoundaryAspect(aFreeBndAspect); + aDrawer->VIsoAspect()->SetNumber(0); + aDrawer->UIsoAspect()->SetNumber(0); + if (aDrawer->HasOwnPointAspect()) aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS); else diff --git a/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp b/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp index 2ccfd3422..12776d98c 100644 --- a/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp +++ b/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp @@ -407,7 +407,7 @@ void SHAPERGUI_SalomeViewer::setViewProjection(double theX, double theY, aView3d->SetProj(theX, theY, theZ); aView3d->SetTwist( theTwist ); aView3d->FitAll(0.01, false); - aView3d->SetZSize(0.); + //aView3d->SetZSize(0.); if (aView3d->Depth() < 0.1) aView3d->DepthFitAll(); } diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index ae806ab7a..f1c43984f 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -625,8 +625,9 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const myContextId = aContext.get(); if (!myWorkshop->selectionActivate()->isTrihedronActive()) selectionActivate()->deactivateTrihedron(true); - aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0); - aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0); + // Do not modify default drawer. The same is done in ModuleBase_ResultPrs + //aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0); + //aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0); //Handle(AIS_Trihedron) aTrihedron = myWorkshop->viewer()->trihedron(); //aTrihedron->getHighlightPointAspect()->SetScale(2.0); diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index fbff53c41..82154a769 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -122,7 +122,7 @@ void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ, aView3d->SetProj(theX, theY, theZ); aView3d->SetTwist( theTwist ); aView3d->FitAll(0.01, false); - aView3d->SetZSize(0.); + //aView3d->SetZSize(0.); if (aView3d->Depth() < 0.1) aView3d->DepthFitAll(); } -- 2.39.2