From: mpa Date: Mon, 6 Apr 2015 13:05:10 +0000 (+0300) Subject: OCCT dev compatibility X-Git-Tag: V7_6_0b1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c411f5794ea45f2514a9fb50636d09e5a6dd807;p=modules%2Fgui.git OCCT dev compatibility --- diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.cxx b/src/OCCViewer/OCCViewer_ClippingDlg.cxx index 6cc85fa25..37fc6c6d0 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.cxx +++ b/src/OCCViewer/OCCViewer_ClippingDlg.cxx @@ -43,10 +43,16 @@ #include #include #include +#include #include #include #include #include +#if OCC_VERSION_LARGE > 0x06080000 + #include +#else + #include +#endif #include #include #include @@ -858,7 +864,9 @@ void OCCViewer_ClippingDlg::displayPreview() clipPlaneParams(aClipPlane, ic, aSize, aBasePnt, aNormal, myModel->trihedronSize()); myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ), aBasePnt ); myPreviewPlane->SetTypeOfSensitivity( Select3D_TOS_INTERIOR ); - myPreviewPlane->SetSize( aSize, aSize ); + Handle(Prs3d_PlaneAspect) aPlaneAspect = new Prs3d_PlaneAspect(); + aPlaneAspect->SetPlaneLength( aSize, aSize ); + myPreviewPlane->Attributes()->SetPlaneAspect( aPlaneAspect ); ic->SetWidth( myPreviewPlane, 10, false ); ic->SetMaterial( myPreviewPlane, Graphic3d_NOM_PLASTIC, false ); ic->SetTransparency( myPreviewPlane, 0.5, false ); @@ -914,7 +922,9 @@ void OCCViewer_ClippingDlg::updatePreview() { //Plane was not created myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ), aBasePnt ); myPreviewPlane->SetTypeOfSensitivity( Select3D_TOS_INTERIOR ); - myPreviewPlane->SetSize( aSize, aSize ); + Handle(Prs3d_PlaneAspect) aPlaneAspect = new Prs3d_PlaneAspect(); + aPlaneAspect->SetPlaneLength( aSize, aSize ); + myPreviewPlane->Attributes()->SetPlaneAspect( aPlaneAspect ); ic->Display( myPreviewPlane, 1, 0, false ); ic->SetWidth( myPreviewPlane, 10, false ); ic->SetMaterial( myPreviewPlane, Graphic3d_NOM_PLASTIC, false );