From 26197be88e35b978201cdd05c4b34d4acbfad111 Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 20 Sep 2017 17:01:08 +0300 Subject: [PATCH] refs #1330: basic implementation of the not zoomable polyline arrows --- .../HYDROGUI_ImportLandCoverMapOp.cxx | 4 +- src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx | 9 +- src/HYDROGUI/HYDROGUI_Polyline.cxx | 160 ++++++------ src/HYDROGUI/HYDROGUI_Polyline.h | 33 ++- src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx | 4 +- src/HYDROGUI/HYDROGUI_Shape.cxx | 236 ++++++++++-------- src/HYDROGUI/HYDROGUI_Shape.h | 9 +- src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx | 18 +- src/HYDROGUI/HYDROGUI_ShapeBathymetry.h | 2 +- src/HYDROGUI/HYDROGUI_ShapeImage.cxx | 7 +- src/HYDROGUI/HYDROGUI_ShapeImage.h | 2 +- src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.cxx | 11 +- src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.h | 2 +- src/HYDRO_tests/TestViewer.cxx | 21 +- src/HYDRO_tests/TestViewer.h | 2 + .../reference_data/Polyline_Presentation.png | Bin 8060 -> 8424 bytes src/HYDRO_tests/test_HYDROData_DTM.cxx | 2 +- src/HYDRO_tests/test_HYDROData_PolylineXY.cxx | 13 +- src/HYDRO_tests/test_HYDROGUI_Shape.cxx | 2 +- 19 files changed, 285 insertions(+), 252 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx index ecae1836..c4a5a0d5 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx @@ -311,7 +311,7 @@ void HYDROGUI_ImportLandCoverMapOp::onSelectionChanged( const QStringList& theSe foreach ( QString aName, myPolygonName2PrsShape.keys() ) { Handle(AIS_InteractiveObject) anObject = - myPolygonName2PrsShape.value(aName)->getAISObject(); + myPolygonName2PrsShape.value(aName)->getAISObjects()[0]; bool isSelected = theSelectedNames.contains( aName ); if ( ( isSelected && !aCtx->IsSelected( anObject) ) || ( !isSelected && aCtx->IsSelected( anObject) ) ) @@ -353,7 +353,7 @@ void HYDROGUI_ImportLandCoverMapOp::onViewerSelectionChanged() { QStringList aSelectedNames; foreach ( QString aName, myPolygonName2PrsShape.keys() ) { - bool isSelected = aCtx->IsSelected( myPolygonName2PrsShape.value(aName)->getAISObject() ); + bool isSelected = aCtx->IsSelected( myPolygonName2PrsShape.value(aName)->getAISObjects()[0] ); if ( isSelected ) aSelectedNames << aName; } diff --git a/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx b/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx index f0386a46..d447abbe 100644 --- a/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx +++ b/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx @@ -398,8 +398,11 @@ void HYDROGUI_OCCDisplayer::SetZLayer( const OCCViewer_Viewer* theViewer, HYDROGUI_Shape* anObjShape = module()->getObjectShape( aViewerId, theObject ); // Set Z layer - if ( anObjShape ) { - aCtx->SetZLayer( anObjShape->getAISObject(), theZLayerId ); + if ( anObjShape ) + { + QList shapes = anObjShape->getAISObjects(); + foreach( Handle(AIS_InteractiveObject) shape, shapes ) + aCtx->SetZLayer( shape, theZLayerId ); } } @@ -517,7 +520,7 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer if( isScalarMode != isLandCoverColoringOn ) { aLandCoverMapShape->setScalarMapModeEnabled( isLandCoverColoringOn ); - theViewer->getAISContext()->Redisplay( aLandCoverMapShape->getAISObject() ); + theViewer->getAISContext()->Redisplay( aLandCoverMapShape->getAISObjects()[0], Standard_False ); } } diff --git a/src/HYDROGUI/HYDROGUI_Polyline.cxx b/src/HYDROGUI/HYDROGUI_Polyline.cxx index b9a7a2aa..e640f9a7 100644 --- a/src/HYDROGUI/HYDROGUI_Polyline.cxx +++ b/src/HYDROGUI/HYDROGUI_Polyline.cxx @@ -17,29 +17,21 @@ // #include - -#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include #include -#include -#include +#include +#include +#include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape) @@ -75,6 +67,7 @@ void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre const Standard_Integer aMode) { //AIS_Shape::Compute(aPresentationManager, aPrs, aMode); + //return; aPrs->Clear(); Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs ); @@ -106,79 +99,76 @@ void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre aGroup->AddPrimitiveArray( anArray ); } } +} - - TopExp_Explorer Exp ( myshape, TopAbs_EDGE ); - for ( ; Exp.More(); Exp.Next() ) { - TopoDS_Vertex aV1, aV2; +QList HYDROGUI_Polyline::createPresentations( const TopoDS_Shape& shape ) +{ + QList shapes; + + // 1. Main shape + shapes.append( new HYDROGUI_Polyline( shape ) ); + + // 2. Shapes for direction arrows on edges + TopExp_Explorer Exp ( shape, TopAbs_EDGE ); + for ( ; Exp.More(); Exp.Next() ) + { TopoDS_Edge anEdge = TopoDS::Edge(Exp.Current()); - - if ( anEdge.IsNull() ) - continue; - TopExp::Vertices(anEdge, aV1, aV2); - gp_Pnt aP = BRep_Tool::Pnt(aV1); - gp_Vec aDirVec; - double aFp, aLp; - Handle(Geom_Curve) C = BRep_Tool::Curve(anEdge,aFp,aLp); - if ( C.IsNull() ) - continue; - - Bnd_Box aBB; - BRepBndLib::Add(anEdge, aBB); - Standard_Real aXmin,aYmin,aZmin,aXmax,aYmax,aZmax; - aBB.Get(aXmin,aYmin,aZmin,aXmax,aYmax,aZmax); - Standard_Real aLen = Max(Abs(aXmax - aXmin), Max (Abs(aZmax - aZmin), Abs(aYmax - aYmin))); - - GeomAdaptor_Curve aAdC; - aAdC.Load(C, aFp, aLp); - double aLenC; - double aLenH; - int aNbSegments = 20; - double aArrLen = aLen / 10.; - double anIncr = (aLp-aFp)/aNbSegments; - double aMaxRatio = 0; - double aMaxRatioStep = 1; - for (double t = aFp; t < aLp - anIncr; t += anIncr) - { - aLenC = GCPnts_AbscissaPoint::Length(aAdC, t, t + anIncr); - aLenH = C->Value (t).Distance (C->Value (t + anIncr)); - if ( aLenH / aLenC > aMaxRatio) { - aMaxRatio = aLenH / aLenC; - aMaxRatioStep = t; - } - } + if ( !anEdge.IsNull() ) + shapes.append( new HYDROGUI_Arrow( anEdge ) ); + } - bool UseD1 = false; - if (Abs(aMaxRatioStep) < Precision::Confusion()) - { - aMaxRatioStep = (aLp - aFp)/2.0; - UseD1 = true; - } + return shapes; +} - if (Abs(aLp - aMaxRatioStep) < Precision::Confusion()) - { - aMaxRatioStep = (aLp - aFp)/2.0; - UseD1 = true; - } - - gp_Pnt aPnt1 = C->Value (aMaxRatioStep); - gp_Vec aDir; - if (!UseD1) - { - GCPnts_AbscissaPoint aAbsPoint(aAdC, -aArrLen, aMaxRatioStep); - double aParam = aAbsPoint.Parameter(); - gp_Pnt aPnt2 = C->Value (aParam); - gp_XYZ D = aPnt1.XYZ(); - D.Subtract (aPnt2.XYZ()); - aDir = D; - } - if (UseD1 || aDir.IsEqual (gp_Vec(0,0,0), Precision::Confusion(), Precision::Angular())) - C->D1(aMaxRatioStep, aPnt1, aDir); - - if ( anEdge.Orientation() == TopAbs_REVERSED ) - aDir = -aDir; - - Prs3d_Arrow::Draw(aPrs, aPnt1, aDir, M_PI/180.*12., aArrLen); - } + + + +IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_Arrow, AIS_Shape) + + +HYDROGUI_Arrow::HYDROGUI_Arrow( const TopoDS_Edge& edge ) + : AIS_Shape( edge ) +{ +} + +HYDROGUI_Arrow::~HYDROGUI_Arrow() +{ +} + +void HYDROGUI_Arrow::Compute( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPrs, + const Standard_Integer aMode ) +{ + aPrs->Clear(); + + TopoDS_Edge anEdge = TopoDS::Edge( myshape ); + if( anEdge.IsNull() ) + return; + + BRepAdaptor_Curve anAdaptor( anEdge ); + double curveLen = GCPnts_AbscissaPoint::Length( anAdaptor, anAdaptor.FirstParameter(), anAdaptor.LastParameter() ); + double arrowLen = qMin( curveLen/10, 35.0 ); + + double t = ( anAdaptor.FirstParameter() + anAdaptor.LastParameter() ) / 2; + gp_Pnt P; + gp_Vec V; + anAdaptor.D1( t, P, V ); + + gp_Trsf tr; + tr.SetTranslation( -gp_Vec( gp_Pnt(), P ) ); + aPrs->SetTransformation( new Geom_Transformation( tr ) ); + + Handle(Graphic3d_TransformPers) tp = new Graphic3d_TransformPers( Graphic3d_TMF_ZoomPers, P ); + SetTransformPersistence( tp ); + + Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs ); + Quantity_Color aColor; + Aspect_TypeOfLine aType; + Standard_Real anWidth; + Attributes()->LineAspect()->Aspect()->Values( aColor, aType, anWidth ); + anWidth = 1; + Handle(Graphic3d_AspectLine3d) anAspect = new Graphic3d_AspectLine3d( aColor, aType, anWidth ); + aGroup->SetPrimitivesAspect( anAspect ); + Prs3d_Arrow::Draw( aGroup, gp_Pnt(), V, M_PI/180.*12., arrowLen ); } diff --git a/src/HYDROGUI/HYDROGUI_Polyline.h b/src/HYDROGUI/HYDROGUI_Polyline.h index 7b70a15f..130dc879 100644 --- a/src/HYDROGUI/HYDROGUI_Polyline.h +++ b/src/HYDROGUI/HYDROGUI_Polyline.h @@ -20,30 +20,39 @@ #define _HYDROGUI_Polyline_HeaderFile #include -#include - -#include -#include -#include -#include -#include -#include +#include class TopoDS_Shape; +class TopoDS_Edge; class HYDROGUI_Polyline : public AIS_Shape { public: - - Standard_EXPORT HYDROGUI_Polyline(const TopoDS_Shape& shape); - Standard_EXPORT ~HYDROGUI_Polyline(); + HYDROGUI_Polyline( const TopoDS_Shape& shape ); + virtual ~HYDROGUI_Polyline(); - Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0); + static QList createPresentations( const TopoDS_Shape& shape ); + public: DEFINE_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape); }; +class HYDROGUI_Arrow : public AIS_Shape +{ +public: + HYDROGUI_Arrow( const TopoDS_Edge& edge ); + virtual ~HYDROGUI_Arrow(); + + virtual void Compute( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode = 0 ); + +public: + DEFINE_STANDARD_RTTIEXT(HYDROGUI_Arrow, AIS_Shape); +}; + #endif diff --git a/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx b/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx index dfb279ff..20220731 100644 --- a/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx +++ b/src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx @@ -443,7 +443,7 @@ void HYDROGUI_RecognizeContoursOp::onSelectionChanged( const QStringList& theSel if ( !aCtx.IsNull() ) { foreach ( QString aName, myPolylineShapes.keys() ) { Handle(AIS_InteractiveObject) anObject = - myPolylineShapes.value(aName)->getAISObject(); + myPolylineShapes.value(aName)->getAISObjects()[0]; bool isSelected = theSelectedNames.contains( aName ); if ( ( isSelected && !aCtx->IsSelected( anObject) ) || @@ -481,7 +481,7 @@ void HYDROGUI_RecognizeContoursOp::onViewerSelectionChanged() QStringList aSelectedNames; foreach ( QString aName, myPolylineShapes.keys() ) { - bool isSelected = aCtx->IsSelected( myPolylineShapes.value(aName)->getAISObject() ); + bool isSelected = aCtx->IsSelected( myPolylineShapes.value(aName)->getAISObjects()[0] ); if ( isSelected ) { aSelectedNames << aName; } diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index c34f2cc9..8f271e54 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -62,9 +62,6 @@ HYDROGUI_Shape::HYDROGUI_Shape( const Handle(AIS_InteractiveContext)& theContext HYDROGUI_Shape::~HYDROGUI_Shape() { erase( false ); - - if ( !myShape.IsNull() ) - myShape.Nullify(); } Handle(AIS_InteractiveContext) HYDROGUI_Shape::getContext() const @@ -97,14 +94,14 @@ bool HYDROGUI_Shape::isVisible() const return myIsVisible; } -Handle(AIS_InteractiveObject) HYDROGUI_Shape::getAISObject() const +QList HYDROGUI_Shape::getAISObjects() const { - return myShape; + return myShapes; } void HYDROGUI_Shape::display( const bool theIsUpdateViewer ) { - if ( myContext.IsNull() || myShape.IsNull() || !isVisible() ) + if ( myContext.IsNull() || myShapes.empty() || !isVisible() ) return; displayShape( theIsUpdateViewer ); @@ -112,7 +109,7 @@ void HYDROGUI_Shape::display( const bool theIsUpdateViewer ) void HYDROGUI_Shape::erase( const bool theIsUpdateViewer ) { - if ( myContext.IsNull() || myShape.IsNull() ) + if ( myContext.IsNull() || myShapes.empty() ) return; eraseShape( theIsUpdateViewer ); @@ -305,13 +302,14 @@ void HYDROGUI_Shape::update( bool isUpdateViewer, } } - if ( myShape.IsNull() || !isVisible() ) + if ( myShapes.empty() || !isVisible() ) return; displayShape( isUpdateViewer ); if (isDeactivateSelection) - myContext->Deactivate(myShape); + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) + myContext->Deactivate( aShape ); } void HYDROGUI_Shape::setVisible( const bool theState, @@ -319,11 +317,11 @@ void HYDROGUI_Shape::setVisible( const bool theState, { myIsVisible = theState; - if ( myShape.IsNull() ) + if ( myShapes.empty() ) return; - if ( ( myIsVisible && myContext->IsDisplayed( myShape ) ) || - ( !myIsVisible && !myContext->IsDisplayed( myShape ) ) ) + if ( ( myIsVisible && myContext->IsDisplayed( myShapes[0] ) ) || + ( !myIsVisible && !myContext->IsDisplayed( myShapes[0] ) ) ) return; if ( myIsVisible ) { @@ -340,7 +338,7 @@ void HYDROGUI_Shape::highlight( bool theIsHighlight, bool isUpdateViewer ) myIsHighlight = theIsHighlight; - if ( myContext.IsNull() || myShape.IsNull() ) + if ( myContext.IsNull() || myShapes.empty() ) return; colorShapeBorder( getActiveColor() ); @@ -476,14 +474,16 @@ void HYDROGUI_Shape::setZLayer( const int theZLayer ) return; myZLayer = theZLayer; - if ( !myShape.IsNull() && isVisible() && !myContext.IsNull() && myZLayer >= 0 ) - myContext->SetZLayer( myShape, myZLayer ); + if( isVisible() && !myContext.IsNull() && myZLayer >= 0 ) + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) + myContext->SetZLayer( aShape, myZLayer ); } -Handle(AIS_InteractiveObject) HYDROGUI_Shape::createShape() const +QList HYDROGUI_Shape::createShape() const { + QList shapes; if( myTopoShape.IsNull() ) { - return Handle(AIS_InteractiveObject)(); + return shapes; } TopAbs_ShapeEnum aShapeType = myTopoShape.ShapeType(); @@ -497,11 +497,15 @@ Handle(AIS_InteractiveObject) HYDROGUI_Shape::createShape() const } } - if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE || IsWireEdgeCompound) { - return new HYDROGUI_Polyline( myTopoShape ); - } else { - return new HYDROGUI_AISShape( myTopoShape ); + if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE || IsWireEdgeCompound) + { + shapes.append( HYDROGUI_Polyline::createPresentations( myTopoShape ) ); + } + else + { + shapes.append( new HYDROGUI_AISShape( myTopoShape ) ); } + return shapes; } void HYDROGUI_Shape::buildShape() @@ -509,45 +513,48 @@ void HYDROGUI_Shape::buildShape() // Erase previously created shape erase(false); - myShape = createShape(); - if( myShape.IsNull() ) + myShapes = createShape(); + if( myShapes.empty() ) return; - Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast( myShape ); - if( !anAISShape.IsNull() ) - anAISShape ->SetHLRAngleAndDeviation( 0.001 ); + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) + { + Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast( aShape ); + if( !anAISShape.IsNull() ) + anAISShape ->SetHLRAngleAndDeviation( 0.001 ); - if ( !myObject.IsNull() ) - myShape->SetOwner( myObject ); + if ( !myObject.IsNull() ) + aShape->SetOwner( myObject ); - if ( !myObject.IsNull() && !myObject->IsKind( STANDARD_TYPE(HYDROData_LandCoverMap) ) ) - myShape->SetTransparency( 0 ); - myShape->SetDisplayMode( (AIS_DisplayMode)myDisplayMode ); + if ( !myObject.IsNull() && !myObject->IsKind( STANDARD_TYPE(HYDROData_LandCoverMap) ) ) + aShape->SetTransparency( 0 ); + aShape->SetDisplayMode( (AIS_DisplayMode)myDisplayMode ); - // Init default params for shape - const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes(); - if ( !anAttributes.IsNull() ) - { - Handle(Prs3d_IsoAspect) anIsoAspect = anAttributes->UIsoAspect(); - if ( !anIsoAspect.IsNull() ) { - anIsoAspect->SetNumber( 0 ); - anAttributes->SetUIsoAspect( anIsoAspect ); - } - - anIsoAspect = anAttributes->VIsoAspect(); - if ( !anIsoAspect.IsNull() ) + // Init default params for shape + const Handle(Prs3d_Drawer)& anAttributes = aShape->Attributes(); + if ( !anAttributes.IsNull() ) { - anIsoAspect->SetNumber( 0 ); - anAttributes->SetVIsoAspect( anIsoAspect ); - } + Handle(Prs3d_IsoAspect) anIsoAspect = anAttributes->UIsoAspect(); + if ( !anIsoAspect.IsNull() ) { + anIsoAspect->SetNumber( 0 ); + anAttributes->SetUIsoAspect( anIsoAspect ); + } + + anIsoAspect = anAttributes->VIsoAspect(); + if ( !anIsoAspect.IsNull() ) + { + anIsoAspect->SetNumber( 0 ); + anAttributes->SetVIsoAspect( anIsoAspect ); + } - if ( myDisplayMode == AIS_Shaded ) - { - myShape->SetMaterial( Graphic3d_NOM_PLASTIC ); - } - else if ( myDisplayMode == AIS_WireFrame ) - { - anAttributes->SetWireDraw( true ); + if ( myDisplayMode == AIS_Shaded ) + { + aShape->SetMaterial( Graphic3d_NOM_PLASTIC ); + } + else if ( myDisplayMode == AIS_WireFrame ) + { + anAttributes->SetWireDraw( true ); + } } } } @@ -555,30 +562,30 @@ void HYDROGUI_Shape::buildShape() void HYDROGUI_Shape::updateShape( const bool theToDisplay, const bool theIsUpdateViewer ) { - if ( myShape.IsNull() ) - return; - - const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes(); - if ( !anAttributes.IsNull() ) + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) { - if ( myDisplayMode == AIS_Shaded && myFillingColor.isValid() ) - { - Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ), - getQuantityColorVal( myFillingColor.green() ), - getQuantityColorVal( myFillingColor.blue() ), - Quantity_TOC_RGB ); - - myShape->SetColor( aFillingColor ); - myShape->SetTransparency( 1 - getQuantityColorVal( myFillingColor.alpha() ) ); - } - else if ( myDisplayMode == AIS_WireFrame ) + const Handle(Prs3d_Drawer)& anAttributes = aShape->Attributes(); + if ( !anAttributes.IsNull() ) { + if ( myDisplayMode == AIS_Shaded && myFillingColor.isValid() ) + { + Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ), + getQuantityColorVal( myFillingColor.green() ), + getQuantityColorVal( myFillingColor.blue() ), + Quantity_TOC_RGB ); + + aShape->SetColor( aFillingColor ); + aShape->SetTransparency( 1 - getQuantityColorVal( myFillingColor.alpha() ) ); + } + else if ( myDisplayMode == AIS_WireFrame ) + { + } + + // Coloring borders } - - // Coloring borders - colorShapeBorder( myBorderColor ); } - + + colorShapeBorder( myBorderColor ); if ( !theToDisplay || !isVisible() || myContext.IsNull() ) return; @@ -590,27 +597,34 @@ void HYDROGUI_Shape::displayShape( const bool theIsUpdateViewer ) if ( myContext->HasOpenedContext() && mySelectionMode > 0 ) myContext->CloseLocalContext(); - if ( mySelectionMode > 0 ) - // Display object in local context with selection - myContext->Display( myShape, myDisplayMode, mySelectionMode, Standard_False, Standard_False ); - else + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) { - if ( !myContext->HasOpenedContext() ) - // Ordinary display of object published in the Object Browser - myContext->Display( myShape, Standard_False ); + if ( mySelectionMode > 0 ) + // Display object in local context with selection + myContext->Display( aShape, myDisplayMode, mySelectionMode, Standard_False, Standard_False ); else - // Display object in local context without selection - myContext->Display( myShape, myDisplayMode, -1, Standard_False, Standard_False ); + { + if ( !myContext->HasOpenedContext() ) + // Ordinary display of object published in the Object Browser + myContext->Display( aShape, Standard_False ); + else + // Display object in local context without selection + myContext->Display( aShape, myDisplayMode, -1, Standard_False, Standard_False ); + } } if ( mySelectionMode > 0 ) { myContext->OpenLocalContext(); - myContext->Activate( myShape, mySelectionMode, Standard_True ); + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) + myContext->Activate( aShape, mySelectionMode, Standard_True ); } if ( myZLayer >= 0 ) - myContext->SetZLayer( myShape, myZLayer ); + { + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) + myContext->SetZLayer( aShape, myZLayer ); + } if ( theIsUpdateViewer ) { myContext->UpdateCurrentViewer(); @@ -622,7 +636,11 @@ void HYDROGUI_Shape::eraseShape( const bool theIsUpdateViewer ) if ( myContext->HasOpenedContext() && mySelectionMode > 0 ) myContext->CloseLocalContext(); - myContext->Erase( myShape, theIsUpdateViewer ); + foreach( Handle(AIS_InteractiveObject) aShape, myShapes ) + myContext->Erase( aShape, Standard_False ); + + if( theIsUpdateViewer ) + myContext->UpdateCurrentViewer(); } QColor HYDROGUI_Shape::getActiveColor() const @@ -637,33 +655,33 @@ double HYDROGUI_Shape::getQuantityColorVal( const int theColorVal ) void HYDROGUI_Shape::colorShapeBorder( const QColor& theColor ) { - if ( myShape.IsNull() ) - return; - - const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes(); - if ( anAttributes.IsNull() ) - return; + foreach( Handle(AIS_InteractiveObject) aShape1, myShapes ) + { + const Handle(Prs3d_Drawer)& anAttributes = aShape1->Attributes(); + if ( anAttributes.IsNull() ) + continue; - Quantity_Color aBorderColor( getQuantityColorVal( theColor.red() ), - getQuantityColorVal( theColor.green() ), - getQuantityColorVal( theColor.blue() ), - Quantity_TOC_RGB ); + Quantity_Color aBorderColor( getQuantityColorVal( theColor.red() ), + getQuantityColorVal( theColor.green() ), + getQuantityColorVal( theColor.blue() ), + Quantity_TOC_RGB ); - if( !myTopoShape.IsNull() ) - { - if ( myTopoShape.ShapeType() == TopAbs_WIRE ) // Note that we display polylines in shaded mode - { - myShape->SetColor( aBorderColor ); - } - else if ( myDisplayMode == AIS_Shaded ) + if( !myTopoShape.IsNull() ) { - Handle(HYDROGUI_AISShape) aShape = Handle(HYDROGUI_AISShape)::DownCast( myShape ); - if( !aShape.IsNull() ) - aShape->SetBorderColor( aBorderColor ); - } - else if ( myDisplayMode == AIS_WireFrame ) - { - myShape->SetColor( aBorderColor ); + if ( myTopoShape.ShapeType() == TopAbs_WIRE ) // Note that we display polylines in shaded mode + { + aShape1->SetColor( aBorderColor ); + } + else if ( myDisplayMode == AIS_Shaded ) + { + Handle(HYDROGUI_AISShape) aShape = Handle(HYDROGUI_AISShape)::DownCast( aShape1 ); + if( !aShape.IsNull() ) + aShape->SetBorderColor( aBorderColor ); + } + else if ( myDisplayMode == AIS_WireFrame ) + { + aShape1->SetColor( aBorderColor ); + } } } } diff --git a/src/HYDROGUI/HYDROGUI_Shape.h b/src/HYDROGUI/HYDROGUI_Shape.h index 76113ba1..76b002ca 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.h +++ b/src/HYDROGUI/HYDROGUI_Shape.h @@ -95,12 +95,11 @@ public: virtual void setHighlightColor( const QColor& theColor ); virtual QColor getHighlightColor() const; - virtual Handle(AIS_InteractiveObject) getAISObject() const; - void setZLayer( const int theZLayer ); - void setSelectionMode( int theSelectionMode ); + QList getAISObjects() const; + protected: virtual void buildShape(); virtual void updateShape( const bool theToDisplay = true, @@ -109,7 +108,7 @@ protected: virtual void eraseShape( const bool theIsUpdateViewer ); virtual QColor getActiveColor() const; - virtual Handle(AIS_InteractiveObject) createShape() const; + virtual QList createShape() const; void setDisplayMode( int theDisplayMode ); @@ -120,7 +119,7 @@ private: private: Handle(AIS_InteractiveContext) myContext; Handle(HYDROData_Entity) myObject; - Handle(AIS_InteractiveObject) myShape; + QList myShapes; int myZLayer; diff --git a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx index a88b5069..3a72a138 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx +++ b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx @@ -58,8 +58,10 @@ void HYDROGUI_ShapeBathymetry::update( bool theIsUpdateViewer, bool isDeactivate } -Handle(AIS_InteractiveObject) HYDROGUI_ShapeBathymetry::createShape() const +QList HYDROGUI_ShapeBathymetry::createShape() const { + QList shapes; + Handle(AIS_InteractiveObject) aPntCloud; Handle(HYDROData_Bathymetry) aBath = Handle(HYDROData_Bathymetry)::DownCast( getObject() ); @@ -78,9 +80,11 @@ Handle(AIS_InteractiveObject) HYDROGUI_ShapeBathymetry::createShape() const aThat->myColors = new Quantity_HArray1OfColor( aLower, anUpper ); for( int i=aLower; i<=anUpper; i++ ) aThat->myCoords->SetValue( i, gp_Pnt( aBathPoints[i].X, aBathPoints[i].Y, aBathPoints[i].Z ) ); + + shapes.append( aPntCloud ); } - return aPntCloud; + return shapes; } void HYDROGUI_ShapeBathymetry::GetRange( double& theMin, double& theMax ) const @@ -113,7 +117,7 @@ void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(AIS_ColorScale theColorScale->FindColor( z, aColor ); myColors->SetValue( i, aColor ); } - Handle(AIS_PointCloud) aPntCloud = Handle(AIS_PointCloud)::DownCast( getAISObject() ); + Handle(AIS_PointCloud) aPntCloud = Handle(AIS_PointCloud)::DownCast( getAISObjects()[0] ); aPntCloud->SetPoints( myCoords, myColors ); getContext()->Redisplay( aPntCloud, Standard_False ); } @@ -121,7 +125,7 @@ void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(AIS_ColorScale void HYDROGUI_ShapeBathymetry::setVisible( const bool theState, const bool theIsUpdateViewer ) { - bool isShown = getContext()->IsDisplayed( getAISObject() ); + bool isShown = getContext()->IsDisplayed( getAISObjects()[0] ); bool isChanged = ( isShown != theState ); HYDROGUI_Shape::setVisible( theState, theIsUpdateViewer ); setToUpdateColorScale( isChanged ); @@ -129,7 +133,7 @@ void HYDROGUI_ShapeBathymetry::setVisible( const bool theState, void HYDROGUI_ShapeBathymetry::displayShape( const bool theIsUpdateViewer ) { - bool isShown = getContext()->IsDisplayed( getAISObject() ); + bool isShown = getContext()->IsDisplayed( getAISObjects()[0] ); bool isChanged = ( !isShown ); HYDROGUI_Shape::displayShape( theIsUpdateViewer ); setToUpdateColorScale( isChanged ); @@ -137,7 +141,7 @@ void HYDROGUI_ShapeBathymetry::displayShape( const bool theIsUpdateViewer ) void HYDROGUI_ShapeBathymetry::display( const bool theIsUpdateViewer ) { - bool isShown = getContext()->IsDisplayed( getAISObject() ); + bool isShown = getContext()->IsDisplayed( getAISObjects()[0] ); bool isChanged = ( !isShown ); HYDROGUI_Shape::display( theIsUpdateViewer ); setToUpdateColorScale( isChanged ); @@ -145,7 +149,7 @@ void HYDROGUI_ShapeBathymetry::display( const bool theIsUpdateViewer ) void HYDROGUI_ShapeBathymetry::erase( const bool theIsUpdateViewer ) { - bool isShown = getContext()->IsDisplayed( getAISObject() ); + bool isShown = getContext()->IsDisplayed( getAISObjects()[0] ); bool isChanged = ( isShown ); HYDROGUI_Shape::erase( theIsUpdateViewer ); setToUpdateColorScale( isChanged ); diff --git a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h index c736c60f..91a0a772 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h +++ b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h @@ -48,7 +48,7 @@ public: virtual void setVisible( const bool theState, const bool theIsUpdateViewer = true ); protected: - virtual Handle(AIS_InteractiveObject) createShape() const; + virtual QList createShape() const; virtual void displayShape( const bool theIsUpdateViewer ); void setToUpdateColorScale( bool isChanged ); diff --git a/src/HYDROGUI/HYDROGUI_ShapeImage.cxx b/src/HYDROGUI/HYDROGUI_ShapeImage.cxx index 4f832399..d57f726d 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeImage.cxx +++ b/src/HYDROGUI/HYDROGUI_ShapeImage.cxx @@ -46,17 +46,20 @@ void HYDROGUI_ShapeImage::update( bool theIsUpdateViewer, bool isDeactivateSelec HYDROGUI_Shape::update( theIsUpdateViewer, isDeactivateSelection ); } -Handle(AIS_InteractiveObject) HYDROGUI_ShapeImage::createShape() const +QList HYDROGUI_ShapeImage::createShape() const { + QList shapes; + Handle(HYDROGUI_ImagePrs) aPrs; Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast( getObject() ); if ( !anImageObj.IsNull() ) { aPrs = new HYDROGUI_ImagePrs( imagePixMap( anImageObj ), imageContour( anImageObj ) ); + shapes.append( aPrs ); } - return aPrs; + return shapes; } Handle(Image_PixMap) HYDROGUI_ShapeImage::imagePixMap( const Handle(HYDROData_Image)& theImageObj ) const diff --git a/src/HYDROGUI/HYDROGUI_ShapeImage.h b/src/HYDROGUI/HYDROGUI_ShapeImage.h index aba5b82b..17c6dec0 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeImage.h +++ b/src/HYDROGUI/HYDROGUI_ShapeImage.h @@ -36,7 +36,7 @@ public: virtual void update( bool isUpdateViewer, bool isDeactivateSelection ); protected: - virtual Handle(AIS_InteractiveObject) createShape() const; + virtual QList createShape() const; Handle(Image_PixMap) imagePixMap( const Handle(HYDROData_Image)& ) const; QPolygonF imageContour( const Handle(HYDROData_Image)& ) const; }; diff --git a/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.cxx b/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.cxx index 3446545e..66e56301 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.cxx +++ b/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.cxx @@ -60,7 +60,8 @@ void HYDROGUI_ShapeLandCoverMap::update( bool theIsUpdateViewer, bool isDeactiva setShape( aLandCoverMapShape, false, false ); } - Handle(HYDROGUI_LandCoverMapPrs) aLandCoverMapPrs = Handle(HYDROGUI_LandCoverMapPrs)::DownCast( getAISObject() ); + Handle(HYDROGUI_LandCoverMapPrs) aLandCoverMapPrs = + Handle(HYDROGUI_LandCoverMapPrs)::DownCast( getAISObjects()[0] ); if ( !aLandCoverMapPrs.IsNull() ) aLandCoverMapPrs->UpdateColors(); @@ -91,8 +92,10 @@ void HYDROGUI_ShapeLandCoverMap::displayShape( const bool theIsUpdateViewer ) myDisplayer->SetToUpdateColorScale(); } -Handle(AIS_InteractiveObject) HYDROGUI_ShapeLandCoverMap::createShape() const +QList HYDROGUI_ShapeLandCoverMap::createShape() const { + QList shapes; + Handle(HYDROData_LandCoverMap) aLandCoverMap = Handle(HYDROData_LandCoverMap)::DownCast( getObject() ); if ( !aLandCoverMap.IsNull() ) { @@ -119,9 +122,9 @@ Handle(AIS_InteractiveObject) HYDROGUI_ShapeLandCoverMap::createShape() const } } } - return aLandCoverMapPrs; + shapes.append( aLandCoverMapPrs ); } - return NULL; + return shapes; } void HYDROGUI_ShapeLandCoverMap::display( const bool theIsUpdateViewer ) diff --git a/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.h b/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.h index 526c52e5..a030a370 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.h +++ b/src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.h @@ -54,7 +54,7 @@ public: protected: virtual void displayShape( const bool theIsUpdateViewer ); - virtual Handle(AIS_InteractiveObject) createShape() const; + virtual QList createShape() const; private: HYDROGUI_OCCDisplayer* myDisplayer; diff --git a/src/HYDRO_tests/TestViewer.cxx b/src/HYDRO_tests/TestViewer.cxx index 5ef6d2d9..71cd941b 100644 --- a/src/HYDRO_tests/TestViewer.cxx +++ b/src/HYDRO_tests/TestViewer.cxx @@ -142,10 +142,13 @@ void TestViewer::show( const Handle(AIS_InteractiveObject)& theObject, } if( isFitAll ) - { - viewWindow()->onTopView(); - viewWindow()->onFitAll(); - } + fitAll(); +} + +void TestViewer::fitAll() +{ + viewWindow()->onTopView(); + viewWindow()->onFitAll(); } void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor, @@ -167,10 +170,7 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, context()->Display( aShape, theMode, 0, Standard_False ); if( isFitAll ) - { - viewWindow()->onTopView(); - viewWindow()->onFitAll(); - } + fitAll(); } void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey, int theUIANb, int theVIANb) @@ -217,10 +217,7 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, show( aLE.Value(), theMode, false, GetColor(i) ); if( isFitAll ) - { - viewWindow()->onTopView(); - viewWindow()->onFitAll(); - } + fitAll(); } /*void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i) diff --git a/src/HYDRO_tests/TestViewer.h b/src/HYDRO_tests/TestViewer.h index 90aac840..8a0db3c9 100644 --- a/src/HYDRO_tests/TestViewer.h +++ b/src/HYDRO_tests/TestViewer.h @@ -60,6 +60,8 @@ public: int theLinesToOmit, QString& theMsg ); + static void fitAll(); + private: static OCCViewer_ViewManager* myViewManager; static OCCViewer_ViewWindow* myViewWindow; diff --git a/src/HYDRO_tests/reference_data/Polyline_Presentation.png b/src/HYDRO_tests/reference_data/Polyline_Presentation.png index 1a4f14fdff8e0e089bbb72736205a6e533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}YYmMl>D(l}*S5^LaVzpMn zIV89uVIfkqG{(d}+N7ed`rh5UW54zNe^x77y&1kVF>zS+Te8>AKH2Z#FD*xo_V|~_ zj1TwTj4{+bgNEGf!1!+BkDQVB13y$h_8s4CIo`b^x@UjmMBUPp5(77HReWpQ@nJ04 z)c=z6r9E#(wCZ-p{=EP5O8Vzj{(F0V9QnTJ-sp>a8!3++KA^nzXKG@i z&e`Z6i#|;b-}*f~|0N^5X8hww<-PC1vtsAII;{e}iVR({sVM4hRM+yCV_U9N4Ey}r z;oN_}acy$!*sIjf@AMufh>z~BibOM2zPHRx`LX7%*uMDd+P1N4yuP7tdnIRy-Y=kF zvhKxH1o<1GR{I`A!3VcOThXBNzvBxGqLK|cGzib=_@RyeZ~Q@=N<;(5|A>44hh%UE z6%BXM+Z8k)M;waoBhk#W?tdcLj=II+==B5oGTrF@L6K^Mf&M=oS!6WxyWt~vTZn2! pMBOng_NS;4KHT*dg-?9XXzY%TP^q=^PBkHx;AHP=SIlC^{TGtLjt2k$ diff --git a/src/HYDRO_tests/test_HYDROData_DTM.cxx b/src/HYDRO_tests/test_HYDROData_DTM.cxx index d4338722..9c06cc7e 100644 --- a/src/HYDRO_tests/test_HYDROData_DTM.cxx +++ b/src/HYDRO_tests/test_HYDROData_DTM.cxx @@ -48,7 +48,7 @@ class DTM_item : public QGraphicsItem public: DTM_item( HYDROGUI_ShapeBathymetry* theDTM, double d ) { - Handle(AIS_PointCloud) pc = Handle(AIS_PointCloud)::DownCast( theDTM->getAISObject() ); + Handle(AIS_PointCloud) pc = Handle(AIS_PointCloud)::DownCast( theDTM->getAISObjects()[0] ); Handle(Graphic3d_ArrayOfPoints) pp = pc->GetPoints(); myBB = QRectF(); double xmin, xmax, ymin, ymax; diff --git a/src/HYDRO_tests/test_HYDROData_PolylineXY.cxx b/src/HYDRO_tests/test_HYDROData_PolylineXY.cxx index 57d6435f..b3af935f 100644 --- a/src/HYDRO_tests/test_HYDROData_PolylineXY.cxx +++ b/src/HYDRO_tests/test_HYDROData_PolylineXY.cxx @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -253,15 +254,19 @@ void test_HYDROData_PolylineXY::test_presentation() aPointsPrs->SetColor( Quantity_NOC_BLUE1 ); aPointsPrs->Attributes()->PointAspect()->SetTypeOfMarker( Aspect_TOM_O ); - Handle(HYDROGUI_Polyline) aNewPolylinePrs = new HYDROGUI_Polyline( aPolyline2d->GetShape() ); - aNewPolylinePrs->SetColor( Quantity_NOC_DARKGREEN ); + aPolyline2d->SetWireColor( Qt::darkGreen ); + HYDROGUI_Shape* aNewPolylinePrs = new HYDROGUI_Shape( TestViewer::context(), aPolyline2d ); + aNewPolylinePrs->update( true, true ); TestViewer::show( aPointsPrs, AIS_PointCloud::DM_Points, 0, true, "Polyline_Presentation" ); TestViewer::show( aPolyline2d->GetShape(), 0, true, Qt::red ); - TestViewer::show( aNewPolylinePrs, AIS_PointCloud::DM_Points, 0, true, "" ); + //TestViewer::show( aNewPolylinePrs, AIS_PointCloud::DM_Points, 0, true, "" ); + aNewPolylinePrs->display(); + TestViewer::fitAll(); CPPUNIT_ASSERT_IMAGES aDoc->Close(); + //QTest::qWait( 50000 ); } void test_HYDROData_PolylineXY::test_split_refs_627() diff --git a/src/HYDRO_tests/test_HYDROGUI_Shape.cxx b/src/HYDRO_tests/test_HYDROGUI_Shape.cxx index ee5ca41f..30b2d776 100644 --- a/src/HYDRO_tests/test_HYDROGUI_Shape.cxx +++ b/src/HYDRO_tests/test_HYDROGUI_Shape.cxx @@ -39,7 +39,7 @@ void test_HYDROGUI_Shape::test_face_in_preview() aPreview->setFillingColor( Qt::red, false, false ); aPreview->setBorderColor( Qt::darkBlue, false, false ); - TestViewer::show( aPreview->getAISObject(), AIS_Shaded, 0, true, "Shape_preview_im_zone" ); + TestViewer::show( aPreview->getAISObjects()[0], AIS_Shaded, 0, true, "Shape_preview_im_zone" ); CPPUNIT_ASSERT_IMAGES delete aPreview; -- 2.39.2