]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bugs 113, 114: polyline which are not a wire is not allowed to be a limit.
authormzn <mzn@opencascade.com>
Fri, 22 Nov 2013 07:36:13 +0000 (07:36 +0000)
committermzn <mzn@opencascade.com>
Fri, 22 Nov 2013 07:36:13 +0000 (07:36 +0000)
src/HYDROGUI/HYDROGUI_CalculationOp.cxx

index 192e5559f87a367eca823cc29b4ea7457e615956..707a308655bc1726839d9f5aa9a70db953a4e33b 100644 (file)
@@ -93,12 +93,16 @@ void HYDROGUI_CalculationOp::startOperation()
     aPolylineObj = Handle(HYDROData_Polyline)::DownCast( anIter.Current() );
 
     if ( !aPolylineObj.IsNull() && aPolylineObj->IsClosed() )
-    {
-      aPolylineName = aPolylineObj->GetName();
-      if ( !aPolylineName.isEmpty() )
-      {
-        aList.append( aPolylineName );
-        anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) );
+    { 
+      // Check the polyline shape
+      TopoDS_Shape aPolylineShape = aPolylineObj->GetTopShape();
+      if ( !aPolylineShape.IsNull() && aPolylineShape.ShapeType() == TopAbs_WIRE ) {
+        aPolylineName = aPolylineObj->GetName();
+        if ( !aPolylineName.isEmpty() )
+        {
+          aList.append( aPolylineName );
+          anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) );
+        }
       }
     }
   }