]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
bug #190: invisible polyline 3d
authorasl <asl@opencascade.com>
Fri, 6 Dec 2013 05:09:42 +0000 (05:09 +0000)
committerasl <asl@opencascade.com>
Fri, 6 Dec 2013 05:09:42 +0000 (05:09 +0000)
src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx
src/HYDROGUI/HYDROGUI_Shape.cxx
src/HYDROGUI/HYDROGUI_Tool.cxx

index b2316376c5af6c293bea39822b9b586cc0a92b2e..90a8585013849155bc42db6d7dc56c31a3f8e6be 100644 (file)
@@ -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 &&
index 4ba2ed2dd7422ba0768d12003154d2bfb9796140..b9b656c565561c4eea7f053fe9b8cf4e33309f0f 100644 (file)
@@ -43,6 +43,7 @@
 #include <HYDROData_ImmersibleZone.h>
 #include <HYDROData_Obstacle.h>
 #include <HYDROData_PolylineXY.h>
+#include <HYDROData_Polyline3D.h>
 #include <HYDROData_Profile.h>
 #include <HYDROData_Region.h>
 #include <HYDROData_Stream.h>
@@ -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 =
index ce0d25b3dd6a7363bd1b8b2dec0061f283aa7995..da585626e88ea249033e48cd03d9a717521a974d 100644 (file)
@@ -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 ) ||