From: asl Date: Fri, 6 Dec 2013 05:09:42 +0000 (+0000) Subject: bug #190: invisible polyline 3d X-Git-Tag: BR_hydro_v_0_4~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=98e31f4b1094b875c49a8702548d8abeb7bef812;p=modules%2Fhydro.git bug #190: invisible polyline 3d --- diff --git a/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx b/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx index b2316376..90a85850 100644 --- a/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx +++ b/src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx @@ -103,6 +103,7 @@ HYDROGUI_Shape* HYDROGUI_OCCDisplayer::createShape( const int ObjectKind anObjectKind = theObject->GetKind(); if ( anObjectKind != KIND_IMAGE && anObjectKind != KIND_POLYLINEXY && + anObjectKind != KIND_POLYLINE && anObjectKind != KIND_IMMERSIBLE_ZONE && anObjectKind != KIND_REGION && anObjectKind != KIND_ZONE && diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index 4ba2ed2d..b9b656c5 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -164,6 +165,26 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) } } } + else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Polyline3D) ) ) + { + Handle(HYDROData_Polyline3D) aPolyline = + Handle(HYDROData_Polyline3D)::DownCast( myObject ); + + TopoDS_Shape aPolylineShape = aPolyline->GetShape3D(); + + if ( !aPolylineShape.IsNull() ) { + if ( aPolylineShape.ShapeType() == TopAbs_WIRE ) { + TopoDS_Wire aPolylineWire = TopoDS::Wire( aPolylineShape ); + setWire( aPolylineWire, false, false ); + } else { + myTopoShape = aPolylineShape; + myDisplayMode = AIS_WireFrame; + + buildShape(); + updateShape( false, false ); + } + } + } else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Zone) ) ) { Handle(HYDROData_Zone) aZone = diff --git a/src/HYDROGUI/HYDROGUI_Tool.cxx b/src/HYDROGUI/HYDROGUI_Tool.cxx index ce0d25b3..da585626 100644 --- a/src/HYDROGUI/HYDROGUI_Tool.cxx +++ b/src/HYDROGUI/HYDROGUI_Tool.cxx @@ -217,6 +217,7 @@ void HYDROGUI_Tool::GetPrsSubObjects( HYDROGUI_Module* theModule, if( !anObject.IsNull() && ( ( anObject->GetKind() == KIND_IMAGE ) || ( anObject->GetKind() == KIND_POLYLINEXY ) || + ( anObject->GetKind() == KIND_POLYLINE ) || ( anObject->GetKind() == KIND_IMMERSIBLE_ZONE ) || ( anObject->GetKind() == KIND_REGION ) || ( anObject->GetKind() == KIND_BATHYMETRY ) ||