From 0c411f5794ea45f2514a9fb50636d09e5a6dd807 Mon Sep 17 00:00:00 2001 From: mpa Date: Mon, 6 Apr 2015 16:05:10 +0300 Subject: [PATCH] OCCT dev compatibility --- src/OCCViewer/OCCViewer_ClippingDlg.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 ); -- 2.39.2